summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/BitmapBuffer.hxx6
-rw-r--r--include/vcl/BitmapConvolutionMatrixFilter.hxx4
-rw-r--r--include/vcl/BitmapFilter.hxx9
-rw-r--r--include/vcl/BitmapTools.hxx2
-rw-r--r--include/vcl/GraphicAttributes.hxx20
-rw-r--r--include/vcl/GraphicObject.hxx4
-rw-r--r--include/vcl/ITiledRenderable.hxx4
-rw-r--r--include/vcl/RawBitmap.hxx14
-rw-r--r--include/vcl/accessibletable.hxx4
-rw-r--r--include/vcl/accessibletableprovider.hxx10
-rw-r--r--include/vcl/animate/Animation.hxx6
-rw-r--r--include/vcl/animate/AnimationBitmap.hxx4
-rw-r--r--include/vcl/bitmap.hxx2
-rw-r--r--include/vcl/bitmapaccess.hxx92
-rw-r--r--include/vcl/bitmapex.hxx4
-rw-r--r--include/vcl/button.hxx8
-rw-r--r--include/vcl/commandevent.hxx20
-rw-r--r--include/vcl/ctrl.hxx8
-rw-r--r--include/vcl/cursor.hxx6
-rw-r--r--include/vcl/dockwin.hxx28
-rw-r--r--include/vcl/embeddedfontshelper.hxx3
-rw-r--r--include/vcl/fixed.hxx6
-rw-r--r--include/vcl/font.hxx9
-rw-r--r--include/vcl/gdimtf.hxx6
-rw-r--r--include/vcl/graph.hxx4
-rw-r--r--include/vcl/hatch.hxx9
-rw-r--r--include/vcl/headbar.hxx34
-rw-r--r--include/vcl/i18nhelp.hxx3
-rw-r--r--include/vcl/imap.hxx2
-rw-r--r--include/vcl/layout.hxx76
-rw-r--r--include/vcl/menu.hxx15
-rw-r--r--include/vcl/metaact.hxx96
-rw-r--r--include/vcl/metric.hxx42
-rw-r--r--include/vcl/notebookbar.hxx2
-rw-r--r--include/vcl/opengl/OpenGLHelper.hxx6
-rw-r--r--include/vcl/outdev.hxx156
-rw-r--r--include/vcl/outdevmap.hxx20
-rw-r--r--include/vcl/pdfwriter.hxx6
-rw-r--r--include/vcl/print.hxx14
-rw-r--r--include/vcl/region.hxx2
-rw-r--r--include/vcl/salgtype.hxx24
-rw-r--r--include/vcl/salnativewidgets.hxx26
-rw-r--r--include/vcl/scrbar.hxx64
-rw-r--r--include/vcl/settings.hxx46
-rw-r--r--include/vcl/split.hxx14
-rw-r--r--include/vcl/splitwin.hxx44
-rw-r--r--include/vcl/status.hxx20
-rw-r--r--include/vcl/svapp.hxx4
-rw-r--r--include/vcl/sysdata.hxx5
-rw-r--r--include/vcl/syswin.hxx2
-rw-r--r--include/vcl/tabctrl.hxx18
-rw-r--r--include/vcl/texteng.hxx40
-rw-r--r--include/vcl/textrectinfo.hxx4
-rw-r--r--include/vcl/textview.hxx2
-rw-r--r--include/vcl/toolbox.hxx42
-rw-r--r--include/vcl/toolkit/button.hxx4
-rw-r--r--include/vcl/toolkit/combobox.hxx8
-rw-r--r--include/vcl/toolkit/controllayout.hxx10
-rw-r--r--include/vcl/toolkit/dialog.hxx4
-rw-r--r--include/vcl/toolkit/edit.hxx10
-rw-r--r--include/vcl/toolkit/fixedhyper.hxx2
-rw-r--r--include/vcl/toolkit/ivctrl.hxx6
-rw-r--r--include/vcl/toolkit/lstbox.hxx6
-rw-r--r--include/vcl/toolkit/prgsbar.hxx4
-rw-r--r--include/vcl/toolkit/spin.hxx24
-rw-r--r--include/vcl/toolkit/svlbitm.hxx8
-rw-r--r--include/vcl/toolkit/svtabbx.hxx16
-rw-r--r--include/vcl/toolkit/treelistbox.hxx30
-rw-r--r--include/vcl/toolkit/vclmedit.hxx2
-rw-r--r--include/vcl/vcllayout.hxx2
-rw-r--r--include/vcl/virdev.hxx4
-rw-r--r--include/vcl/window.hxx32
-rw-r--r--vcl/backendtest/VisualBackendTest.cxx20
-rw-r--r--vcl/backendtest/outputdevice/common.cxx84
-rw-r--r--vcl/backendtest/outputdevice/pixel.cxx12
-rw-r--r--vcl/headless/CustomWidgetDraw.cxx4
-rw-r--r--vcl/headless/svpbmp.cxx2
-rw-r--r--vcl/headless/svpdummies.cxx4
-rw-r--r--vcl/headless/svpframe.cxx20
-rw-r--r--vcl/headless/svpgdi.cxx56
-rw-r--r--vcl/headless/svpinst.cxx2
-rw-r--r--vcl/headless/svptext.cxx4
-rw-r--r--vcl/headless/svpvd.cxx10
-rw-r--r--vcl/inc/FileDefinitionWidgetDraw.hxx4
-rw-r--r--vcl/inc/PhysicalFontFace.hxx5
-rw-r--r--vcl/inc/WidgetThemeLibrary.hxx71
-rw-r--r--vcl/inc/bitmap/impoctree.hxx24
-rw-r--r--vcl/inc/bitmapwriteaccess.hxx8
-rw-r--r--vcl/inc/bmpfast.hxx5
-rw-r--r--vcl/inc/brdwin.hxx56
-rw-r--r--vcl/inc/calendar.hxx22
-rw-r--r--vcl/inc/fontinstance.hxx2
-rw-r--r--vcl/inc/headless/svpdummies.hxx4
-rw-r--r--vcl/inc/headless/svpframe.hxx20
-rw-r--r--vcl/inc/headless/svpgdi.hxx36
-rw-r--r--vcl/inc/headless/svpinst.hxx2
-rw-r--r--vcl/inc/headless/svpvd.hxx10
-rw-r--r--vcl/inc/hyperlabel.hxx2
-rw-r--r--vcl/inc/iconview.hxx4
-rw-r--r--vcl/inc/impanmvw.hxx6
-rw-r--r--vcl/inc/impfontmetricdata.hxx135
-rw-r--r--vcl/inc/impgraph.hxx4
-rw-r--r--vcl/inc/jobset.h12
-rw-r--r--vcl/inc/listbox.hxx50
-rw-r--r--vcl/inc/opengl/RenderList.hxx6
-rw-r--r--vcl/inc/opengl/gdiimpl.hxx34
-rw-r--r--vcl/inc/opengl/program.hxx2
-rw-r--r--vcl/inc/opengl/salbmp.hxx2
-rw-r--r--vcl/inc/opengl/x11/salvd.hxx8
-rw-r--r--vcl/inc/qt5/Qt5Graphics.hxx38
-rw-r--r--vcl/inc/qt5/Qt5VirtualDevice.hxx9
-rw-r--r--vcl/inc/regband.hxx32
-rw-r--r--vcl/inc/regionband.hxx22
-rw-r--r--vcl/inc/salframe.hxx16
-rw-r--r--vcl/inc/salgdi.hxx78
-rw-r--r--vcl/inc/salgdiimpl.hxx32
-rw-r--r--vcl/inc/salgeom.hxx7
-rw-r--r--vcl/inc/salinst.hxx2
-rw-r--r--vcl/inc/sallayout.hxx6
-rw-r--r--vcl/inc/salobj.hxx4
-rw-r--r--vcl/inc/salprn.hxx2
-rw-r--r--vcl/inc/salvd.hxx4
-rw-r--r--vcl/inc/salvtables.hxx2
-rw-r--r--vcl/inc/salwtype.hxx65
-rw-r--r--vcl/inc/scanlinewriter.hxx6
-rw-r--r--vcl/inc/scrwnd.hxx6
-rw-r--r--vcl/inc/skia/gdiimpl.hxx42
-rw-r--r--vcl/inc/skia/x11/salvd.hxx8
-rw-r--r--vcl/inc/slider.hxx58
-rw-r--r--vcl/inc/svdata.hxx4
-rw-r--r--vcl/inc/svimpbox.hxx24
-rw-r--r--vcl/inc/test/outputdevice.hxx2
-rw-r--r--vcl/inc/textlayout.hxx12
-rw-r--r--vcl/inc/textlineinfo.hxx6
-rw-r--r--vcl/inc/textrender.hxx4
-rw-r--r--vcl/inc/toolbox.h10
-rw-r--r--vcl/inc/unx/freetypetextrender.hxx4
-rw-r--r--vcl/inc/unx/genprn.h2
-rw-r--r--vcl/inc/unx/genpspgraphics.h40
-rw-r--r--vcl/inc/unx/glyphcache.hxx4
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx24
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtkobject.hxx6
-rw-r--r--vcl/inc/unx/salbmp.h60
-rw-r--r--vcl/inc/unx/saldisp.hxx2
-rw-r--r--vcl/inc/unx/salframe.h12
-rw-r--r--vcl/inc/unx/salgdi.h38
-rw-r--r--vcl/inc/unx/salinst.h4
-rw-r--r--vcl/inc/unx/salobj.h6
-rw-r--r--vcl/inc/unx/salunx.h4
-rw-r--r--vcl/inc/unx/salvd.h8
-rw-r--r--vcl/inc/unx/wmadaptor.hxx2
-rw-r--r--vcl/inc/window.h34
-rw-r--r--vcl/inc/wizdlg.hxx6
-rw-r--r--vcl/opengl/RenderList.cxx6
-rw-r--r--vcl/opengl/gdiimpl.cxx70
-rw-r--r--vcl/opengl/program.cxx2
-rw-r--r--vcl/opengl/salbmp.cxx2
-rw-r--r--vcl/opengl/texture.cxx8
-rw-r--r--vcl/opengl/x11/salvd.cxx4
-rw-r--r--vcl/qa/cppunit/BitmapFilterTest.cxx32
-rw-r--r--vcl/qa/cppunit/BitmapScaleTest.cxx40
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx32
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx4
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx12
-rw-r--r--vcl/qa/cppunit/complextext.cxx2
-rw-r--r--vcl/qa/cppunit/jpeg/JpegReaderTest.cxx18
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx2
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx2
-rw-r--r--vcl/qt5/Qt5Bitmap.cxx2
-rw-r--r--vcl/qt5/Qt5FilePicker.cxx4
-rw-r--r--vcl/qt5/Qt5Frame.cxx14
-rw-r--r--vcl/qt5/Qt5Graphics_Controls.cxx3
-rw-r--r--vcl/qt5/Qt5Graphics_GDI.cxx33
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx4
-rw-r--r--vcl/qt5/Qt5Instance.cxx7
-rw-r--r--vcl/qt5/Qt5Object.cxx5
-rw-r--r--vcl/qt5/Qt5VirtualDevice.cxx9
-rw-r--r--vcl/skia/gdiimpl.cxx49
-rw-r--r--vcl/skia/salbmp.cxx22
-rw-r--r--vcl/skia/x11/salvd.cxx6
-rw-r--r--vcl/source/animate/Animation.cxx4
-rw-r--r--vcl/source/app/help.cxx4
-rw-r--r--vcl/source/app/i18nhelp.cxx2
-rw-r--r--vcl/source/app/salvtables.cxx10
-rw-r--r--vcl/source/app/settings.cxx70
-rw-r--r--vcl/source/app/svapp.cxx16
-rw-r--r--vcl/source/app/svmain.cxx6
-rw-r--r--vcl/source/bitmap/BitmapAlphaClampFilter.cxx4
-rw-r--r--vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx79
-rw-r--r--vcl/source/bitmap/BitmapColorQuantizationFilter.cxx32
-rw-r--r--vcl/source/bitmap/BitmapColorizeFilter.cxx8
-rw-r--r--vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx12
-rw-r--r--vcl/source/bitmap/BitmapDisabledImageFilter.cxx4
-rw-r--r--vcl/source/bitmap/BitmapDuoToneFilter.cxx8
-rw-r--r--vcl/source/bitmap/BitmapEmbossGreyFilter.cxx22
-rw-r--r--vcl/source/bitmap/BitmapFastScaleFilter.cxx22
-rw-r--r--vcl/source/bitmap/BitmapFilterStackBlur.cxx191
-rw-r--r--vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx4
-rw-r--r--vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx68
-rw-r--r--vcl/source/bitmap/BitmapLightenFilter.cxx4
-rw-r--r--vcl/source/bitmap/BitmapMedianFilter.cxx14
-rw-r--r--vcl/source/bitmap/BitmapMonochromeFilter.cxx12
-rw-r--r--vcl/source/bitmap/BitmapMosaicFilter.cxx6
-rw-r--r--vcl/source/bitmap/BitmapPopArtFilter.cxx8
-rw-r--r--vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx74
-rw-r--r--vcl/source/bitmap/BitmapScaleSuperFilter.cxx192
-rw-r--r--vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx8
-rw-r--r--vcl/source/bitmap/BitmapSepiaFilter.cxx14
-rw-r--r--vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx12
-rw-r--r--vcl/source/bitmap/BitmapSobelGreyFilter.cxx28
-rw-r--r--vcl/source/bitmap/BitmapSolarizeFilter.cxx8
-rw-r--r--vcl/source/bitmap/BitmapSymmetryCheck.cxx16
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx66
-rw-r--r--vcl/source/bitmap/Octree.cxx38
-rw-r--r--vcl/source/bitmap/bitmap.cxx136
-rw-r--r--vcl/source/bitmap/bitmappaint.cxx221
-rw-r--r--vcl/source/bitmap/salbmp.cxx4
-rw-r--r--vcl/source/control/button.cxx50
-rw-r--r--vcl/source/control/calendar.cxx90
-rw-r--r--vcl/source/control/combobox.cxx36
-rw-r--r--vcl/source/control/ctrl.cxx28
-rw-r--r--vcl/source/control/edit.cxx80
-rw-r--r--vcl/source/control/field.cxx10
-rw-r--r--vcl/source/control/fixed.cxx18
-rw-r--r--vcl/source/control/hyperlabel.cxx2
-rw-r--r--vcl/source/control/imgctrl.cxx2
-rw-r--r--vcl/source/control/imivctl.hxx36
-rw-r--r--vcl/source/control/imivctl1.cxx86
-rw-r--r--vcl/source/control/imivctl2.cxx56
-rw-r--r--vcl/source/control/imp_listbox.cxx108
-rw-r--r--vcl/source/control/listbox.cxx30
-rw-r--r--vcl/source/control/longcurr.cxx8
-rw-r--r--vcl/source/control/notebookbar.cxx2
-rw-r--r--vcl/source/control/prgsbar.cxx2
-rw-r--r--vcl/source/control/roadmap.cxx12
-rw-r--r--vcl/source/control/scrbar.cxx56
-rw-r--r--vcl/source/control/slider.cxx52
-rw-r--r--vcl/source/control/spinbtn.cxx10
-rw-r--r--vcl/source/control/spinfld.cxx12
-rw-r--r--vcl/source/control/tabctrl.cxx102
-rw-r--r--vcl/source/control/throbber.cxx2
-rw-r--r--vcl/source/control/thumbpos.hxx4
-rw-r--r--vcl/source/control/wizardmachine.cxx42
-rw-r--r--vcl/source/control/wizimpldata.hxx2
-rw-r--r--vcl/source/edit/textdat2.hxx4
-rw-r--r--vcl/source/edit/texteng.cxx100
-rw-r--r--vcl/source/edit/textview.cxx38
-rw-r--r--vcl/source/edit/vclmedit.cxx40
-rw-r--r--vcl/source/filter/graphicfilter.cxx4
-rw-r--r--vcl/source/filter/igif/gifread.cxx18
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx4
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx14
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx2
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx20
-rw-r--r--vcl/source/filter/jpeg/JpegReader.hxx6
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx14
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.hxx2
-rw-r--r--vcl/source/filter/jpeg/jpeg.h8
-rw-r--r--vcl/source/filter/jpeg/jpegc.cxx20
-rw-r--r--vcl/source/filter/png/pngread.cxx46
-rw-r--r--vcl/source/filter/png/pngwrite.cxx10
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx8
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx16
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx8
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx4
-rw-r--r--vcl/source/font/font.cxx8
-rw-r--r--vcl/source/font/fontmetric.cxx36
-rw-r--r--vcl/source/fontsubset/cff.cxx2
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx61
-rw-r--r--vcl/source/gdi/alpha.cxx26
-rw-r--r--vcl/source/gdi/bitmap3.cxx142
-rw-r--r--vcl/source/gdi/bitmapex.cxx92
-rw-r--r--vcl/source/gdi/bmpacc.cxx10
-rw-r--r--vcl/source/gdi/bmpacc2.cxx68
-rw-r--r--vcl/source/gdi/bmpacc3.cxx50
-rw-r--r--vcl/source/gdi/bmpfast.cxx14
-rw-r--r--vcl/source/gdi/dibtools.cxx54
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx4
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx4
-rw-r--r--vcl/source/gdi/gdimtf.cxx20
-rw-r--r--vcl/source/gdi/gradient.cxx30
-rw-r--r--vcl/source/gdi/graph.cxx16
-rw-r--r--vcl/source/gdi/hatch.cxx4
-rw-r--r--vcl/source/gdi/impanmvw.cxx2
-rw-r--r--vcl/source/gdi/impgraph.cxx4
-rw-r--r--vcl/source/gdi/impvect.cxx98
-rw-r--r--vcl/source/gdi/jobset.cxx8
-rw-r--r--vcl/source/gdi/metaact.cxx82
-rw-r--r--vcl/source/gdi/pdfwriter.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx88
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx16
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx38
-rw-r--r--vcl/source/gdi/print.cxx18
-rw-r--r--vcl/source/gdi/print2.cxx22
-rw-r--r--vcl/source/gdi/print3.cxx22
-rw-r--r--vcl/source/gdi/regband.cxx32
-rw-r--r--vcl/source/gdi/region.cxx46
-rw-r--r--vcl/source/gdi/regionband.cxx96
-rw-r--r--vcl/source/gdi/salgdilayout.cxx58
-rw-r--r--vcl/source/gdi/sallayout.cxx28
-rw-r--r--vcl/source/gdi/salmisc.cxx98
-rw-r--r--vcl/source/gdi/textlayout.cxx26
-rw-r--r--vcl/source/gdi/virdev.cxx10
-rw-r--r--vcl/source/graphic/GraphicObject.cxx22
-rw-r--r--vcl/source/helper/canvasbitmap.cxx28
-rw-r--r--vcl/source/helper/canvastools.cxx4
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx10
-rw-r--r--vcl/source/outdev/bitmap.cxx134
-rw-r--r--vcl/source/outdev/clipping.cxx2
-rw-r--r--vcl/source/outdev/font.cxx40
-rw-r--r--vcl/source/outdev/gradient.cxx194
-rw-r--r--vcl/source/outdev/hatch.cxx36
-rw-r--r--vcl/source/outdev/map.cxx102
-rw-r--r--vcl/source/outdev/outdev.cxx18
-rw-r--r--vcl/source/outdev/pixel.cxx4
-rw-r--r--vcl/source/outdev/polyline.cxx6
-rw-r--r--vcl/source/outdev/rect.cxx48
-rw-r--r--vcl/source/outdev/text.cxx178
-rw-r--r--vcl/source/outdev/textline.cxx172
-rw-r--r--vcl/source/outdev/transparent.cxx16
-rw-r--r--vcl/source/outdev/wallpaper.cxx40
-rw-r--r--vcl/source/toolkit/group.cxx4
-rw-r--r--vcl/source/toolkit/morebtn.cxx2
-rw-r--r--vcl/source/treelist/headbar.cxx56
-rw-r--r--vcl/source/treelist/iconview.cxx4
-rw-r--r--vcl/source/treelist/iconviewimpl.cxx52
-rw-r--r--vcl/source/treelist/iconviewimpl.hxx4
-rw-r--r--vcl/source/treelist/imap.cxx4
-rw-r--r--vcl/source/treelist/imap2.cxx8
-rw-r--r--vcl/source/treelist/svimpbox.cxx136
-rw-r--r--vcl/source/treelist/svlbitm.cxx4
-rw-r--r--vcl/source/treelist/svtabbx.cxx18
-rw-r--r--vcl/source/treelist/treelist.cxx8
-rw-r--r--vcl/source/treelist/treelistbox.cxx90
-rw-r--r--vcl/source/uitest/uiobject.cxx12
-rw-r--r--vcl/source/window/brdwin.cxx66
-rw-r--r--vcl/source/window/commandevent.cxx4
-rw-r--r--vcl/source/window/cursor.cxx6
-rw-r--r--vcl/source/window/debugevent.cxx2
-rw-r--r--vcl/source/window/decoview.cxx64
-rw-r--r--vcl/source/window/dialog.cxx10
-rw-r--r--vcl/source/window/dockmgr.cxx8
-rw-r--r--vcl/source/window/dockwin.cxx4
-rw-r--r--vcl/source/window/layout.cxx142
-rw-r--r--vcl/source/window/menu.cxx88
-rw-r--r--vcl/source/window/menubarwindow.cxx24
-rw-r--r--vcl/source/window/menubarwindow.hxx6
-rw-r--r--vcl/source/window/menufloatingwindow.cxx58
-rw-r--r--vcl/source/window/menufloatingwindow.hxx4
-rw-r--r--vcl/source/window/mouse.cxx4
-rw-r--r--vcl/source/window/paint.cxx20
-rw-r--r--vcl/source/window/printdlg.cxx22
-rw-r--r--vcl/source/window/scrwnd.cxx10
-rw-r--r--vcl/source/window/split.cxx22
-rw-r--r--vcl/source/window/splitwin.cxx212
-rw-r--r--vcl/source/window/status.cxx80
-rw-r--r--vcl/source/window/syswin.cxx16
-rw-r--r--vcl/source/window/tabdlg.cxx18
-rw-r--r--vcl/source/window/toolbox.cxx174
-rw-r--r--vcl/source/window/toolbox2.cxx18
-rw-r--r--vcl/source/window/window.cxx56
-rw-r--r--vcl/source/window/window2.cxx26
-rw-r--r--vcl/source/window/winproc.cxx28
-rw-r--r--vcl/unx/generic/app/saldisp.cxx18
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx18
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx6
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.hxx6
-rw-r--r--vcl/unx/generic/gdi/font.cxx4
-rw-r--r--vcl/unx/generic/gdi/freetypetextrender.cxx4
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx46
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.hxx34
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx62
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx14
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx22
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx12
-rw-r--r--vcl/unx/generic/gdi/x11cairotextrender.cxx2
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx22
-rw-r--r--vcl/unx/generic/print/bitmap_gfx.cxx22
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx6
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx34
-rw-r--r--vcl/unx/generic/print/glyphset.cxx2
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx2
-rw-r--r--vcl/unx/generic/window/salframe.cxx46
-rw-r--r--vcl/unx/generic/window/salobj.cxx10
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx40
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkobject.cxx6
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx22
-rw-r--r--vcl/workben/vcldemo.cxx44
391 files changed, 5322 insertions, 5224 deletions
diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx
index 2a064951c447..4a4ec8404a08 100644
--- a/include/vcl/BitmapBuffer.hxx
+++ b/include/vcl/BitmapBuffer.hxx
@@ -30,9 +30,9 @@ struct SalTwoRect;
struct VCL_DLLPUBLIC BitmapBuffer
{
ScanlineFormat mnFormat;
- long mnWidth;
- long mnHeight;
- long mnScanlineSize;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
+ tools::Long mnScanlineSize;
sal_uInt16 mnBitCount;
ColorMask maColorMask;
BitmapPalette maPalette;
diff --git a/include/vcl/BitmapConvolutionMatrixFilter.hxx b/include/vcl/BitmapConvolutionMatrixFilter.hxx
index 185d14012d49..2d787cefe19f 100644
--- a/include/vcl/BitmapConvolutionMatrixFilter.hxx
+++ b/include/vcl/BitmapConvolutionMatrixFilter.hxx
@@ -20,7 +20,7 @@ class BitmapEx;
class VCL_DLLPUBLIC BitmapConvolutionMatrixFilter : public BitmapFilter
{
public:
- BitmapConvolutionMatrixFilter(const long (&rMatrix)[9])
+ BitmapConvolutionMatrixFilter(const tools::Long (&rMatrix)[9])
: mrMatrix(rMatrix)
{
}
@@ -28,7 +28,7 @@ public:
virtual BitmapEx execute(BitmapEx const& rBitmapEx) const override;
private:
- const long (&mrMatrix)[9];
+ const tools::Long (&mrMatrix)[9];
};
#endif
diff --git a/include/vcl/BitmapFilter.hxx b/include/vcl/BitmapFilter.hxx
index 899d98047a03..c19d83b2d507 100644
--- a/include/vcl/BitmapFilter.hxx
+++ b/include/vcl/BitmapFilter.hxx
@@ -28,13 +28,14 @@ namespace vcl::bitmap
// [0, 31, false], [32, 63, false], [64, 95, false], [96, 100, true]
template <int STRIP_SIZE>
void generateStripRanges(
- long nFirst, long nLast,
- std::function<void(long const nStart, long const nEnd, bool const bLast)> aFunction)
+ tools::Long nFirst, tools::Long nLast,
+ std::function<void(tools::Long const nStart, tools::Long const nEnd, bool const bLast)>
+ aFunction)
{
- long nStart = nFirst;
+ tools::Long nStart = nFirst;
for (; nStart < nLast - STRIP_SIZE; nStart += STRIP_SIZE)
{
- long nEnd = nStart + STRIP_SIZE - 1;
+ tools::Long nEnd = nStart + STRIP_SIZE - 1;
aFunction(nStart, nEnd, false);
}
aFunction(nStart, nLast, true);
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 76598cb80812..12cdb1947b2c 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -69,7 +69,7 @@ VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > GetMaskDIB(BitmapEx const & aBmpEx)
* @param data will be filled with alpha data, if xBitmap is alpha/transparent image
* @param bHasAlpha will be set to true if resulting surface has alpha
**/
-VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx const & rBmpEx, Bitmap & rBitmap, unsigned char*& data, bool& bHasAlpha, long& rnWidth, long& rnHeight );
+VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx const & rBmpEx, Bitmap & rBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight );
VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const & rBitmapEx, const css::geometry::IntegerRectangle2D& rect);
diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx
index 08b716b3db08..a26f59edc890 100644
--- a/include/vcl/GraphicAttributes.hxx
+++ b/include/vcl/GraphicAttributes.hxx
@@ -35,10 +35,10 @@ class VCL_DLLPUBLIC GraphicAttr
private:
double mfGamma;
BmpMirrorFlags mnMirrFlags;
- long mnLeftCrop;
- long mnTopCrop;
- long mnRightCrop;
- long mnBottomCrop;
+ tools::Long mnLeftCrop;
+ tools::Long mnTopCrop;
+ tools::Long mnRightCrop;
+ tools::Long mnBottomCrop;
sal_uInt16 mnRotate10;
short mnContPercent;
short mnLumPercent;
@@ -61,18 +61,18 @@ public:
void SetMirrorFlags(BmpMirrorFlags nMirrFlags) { mnMirrFlags = nMirrFlags; }
BmpMirrorFlags GetMirrorFlags() const { return mnMirrFlags; }
- void SetCrop(long nLeft_100TH_MM, long nTop_100TH_MM, long nRight_100TH_MM,
- long nBottom_100TH_MM)
+ void SetCrop(tools::Long nLeft_100TH_MM, tools::Long nTop_100TH_MM, tools::Long nRight_100TH_MM,
+ tools::Long nBottom_100TH_MM)
{
mnLeftCrop = nLeft_100TH_MM;
mnTopCrop = nTop_100TH_MM;
mnRightCrop = nRight_100TH_MM;
mnBottomCrop = nBottom_100TH_MM;
}
- long GetLeftCrop() const { return mnLeftCrop; }
- long GetTopCrop() const { return mnTopCrop; }
- long GetRightCrop() const { return mnRightCrop; }
- long GetBottomCrop() const { return mnBottomCrop; }
+ tools::Long GetLeftCrop() const { return mnLeftCrop; }
+ tools::Long GetTopCrop() const { return mnTopCrop; }
+ tools::Long GetRightCrop() const { return mnRightCrop; }
+ tools::Long GetBottomCrop() const { return mnBottomCrop; }
void SetRotation(sal_uInt16 nRotate10) { mnRotate10 = nRotate10; }
sal_uInt16 GetRotation() const { return mnRotate10; }
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index c900bb02cbf7..e4c1edc817d6 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -265,11 +265,11 @@ public:
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
- long nExtraData = 0,
+ tools::Long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = nullptr
);
- void StopAnimation( const OutputDevice* pOut = nullptr, long nExtraData = 0 );
+ void StopAnimation( const OutputDevice* pOut = nullptr, tools::Long nExtraData = 0 );
static bool isGraphicObjectUniqueIdURL(OUString const & rURL);
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 2e8b557505f1..42689ed98c2a 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -61,8 +61,8 @@ public:
int nOutputHeight,
int nTilePosX,
int nTilePosY,
- long nTileWidth,
- long nTileHeight ) = 0;
+ tools::Long nTileWidth,
+ tools::Long nTileHeight ) = 0;
/**
* Get the document size in twips.
diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx
index 92e903b4292d..7fac44a166af 100644
--- a/include/vcl/RawBitmap.hxx
+++ b/include/vcl/RawBitmap.hxx
@@ -40,27 +40,27 @@ public:
}
mpData.reset(new sal_uInt8[nDataSize]);
}
- void SetPixel(long nY, long nX, Color nColor)
+ void SetPixel(tools::Long nY, tools::Long nX, Color nColor)
{
- long p = (nY * maSize.getWidth() + nX) * (mnBitCount / 8);
+ tools::Long p = (nY * maSize.getWidth() + nX) * (mnBitCount / 8);
mpData[p++] = nColor.GetRed();
mpData[p++] = nColor.GetGreen();
mpData[p++] = nColor.GetBlue();
if (mnBitCount == 32)
mpData[p] = nColor.GetTransparency();
}
- Color GetPixel(long nY, long nX) const
+ Color GetPixel(tools::Long nY, tools::Long nX) const
{
- long p = (nY * maSize.getWidth() + nX) * mnBitCount / 8;
+ tools::Long p = (nY * maSize.getWidth() + nX) * mnBitCount / 8;
if (mnBitCount == 24)
return Color(mpData[p], mpData[p + 1], mpData[p + 2]);
else
return Color(mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]);
}
// so we don't accidentally leave any code in that uses palette color indexes
- void SetPixel(long nY, long nX, BitmapColor nColor) = delete;
- long Height() { return maSize.Height(); }
- long Width() { return maSize.Width(); }
+ void SetPixel(tools::Long nY, tools::Long nX, BitmapColor nColor) = delete;
+ tools::Long Height() { return maSize.Height(); }
+ tools::Long Width() { return maSize.Width(); }
sal_uInt8 GetBitCount() const { return mnBitCount; }
};
diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index 8c2aeba6b7c3..b98080273dae 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -81,8 +81,8 @@ public:
virtual vcl::Window* GetWindowInstance()= 0;
virtual sal_Int32 GetAccessibleControlCount() const = 0;
virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )= 0;
- virtual long GetRowCount() const= 0;
- virtual long GetColumnCount() const= 0;
+ virtual tools::Long GetRowCount() const= 0;
+ virtual tools::Long GetColumnCount() const= 0;
virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0;
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0;
virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0;
diff --git a/include/vcl/accessibletableprovider.hxx b/include/vcl/accessibletableprovider.hxx
index b69548ef2355..637abf236134 100644
--- a/include/vcl/accessibletableprovider.hxx
+++ b/include/vcl/accessibletableprovider.hxx
@@ -51,7 +51,7 @@ class IAccessibleTableProvider
{
public:
/** @return The count of the rows. */
- virtual long GetRowCount() const = 0;
+ virtual tools::Long GetRowCount() const = 0;
/** @return The count of the columns. */
virtual sal_uInt16 GetColumnCount() const = 0;
@@ -73,19 +73,19 @@ public:
virtual void SetNoSelection() = 0;
virtual void SelectAll() = 0;
- virtual void SelectRow( long _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
+ virtual void SelectRow( tools::Long _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
virtual void SelectColumn( sal_uInt16 _nColumnPos, bool _bSelect = true ) = 0;
virtual sal_Int32 GetSelectedRowCount() const = 0;
virtual sal_Int32 GetSelectedColumnCount() const = 0;
/** @return <TRUE/>, if the row is selected. */
- virtual bool IsRowSelected( long _nRow ) const = 0;
- virtual bool IsColumnSelected( long _nColumnPos ) const = 0;
+ virtual bool IsRowSelected( tools::Long _nRow ) const = 0;
+ virtual bool IsColumnSelected( tools::Long _nColumnPos ) const = 0;
virtual void GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const = 0;
virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const = 0;
/** @return <TRUE/>, if the cell is visible. */
virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
- virtual OUString GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const = 0;
+ virtual OUString GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const = 0;
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0;
virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) = 0;
diff --git a/include/vcl/animate/Animation.hxx b/include/vcl/animate/Animation.hxx
index e355d7d1e2a1..e6b55a7c510f 100644
--- a/include/vcl/animate/Animation.hxx
+++ b/include/vcl/animate/Animation.hxx
@@ -41,10 +41,10 @@ public:
void Clear();
- bool Start(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, long nExtraData,
- OutputDevice* pFirstFrameOutDev);
+ bool Start(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz,
+ tools::Long nExtraData, OutputDevice* pFirstFrameOutDev);
- void Stop(const OutputDevice* pOutDev = nullptr, long nExtraData = 0);
+ void Stop(const OutputDevice* pOutDev = nullptr, tools::Long nExtraData = 0);
void Draw(OutputDevice* pOutDev, const Point& rDestPt) const;
void Draw(OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz) const;
diff --git a/include/vcl/animate/AnimationBitmap.hxx b/include/vcl/animate/AnimationBitmap.hxx
index 6f5aa1768629..d06f820f8f97 100644
--- a/include/vcl/animate/AnimationBitmap.hxx
+++ b/include/vcl/animate/AnimationBitmap.hxx
@@ -34,7 +34,7 @@ struct AnimationBitmap
BitmapEx maBitmapEx;
Point maPositionPixel;
Size maSizePixel;
- long mnWait;
+ tools::Long mnWait;
Disposal meDisposal;
bool mbUserInput;
@@ -46,7 +46,7 @@ struct AnimationBitmap
}
AnimationBitmap(const BitmapEx& rBitmapEx, const Point& rPositionPixel, const Size& rSizePixel,
- long nWait = 0, Disposal eDisposal = Disposal::Not)
+ tools::Long nWait = 0, Disposal eDisposal = Disposal::Not)
: maBitmapEx(rBitmapEx)
, maPositionPixel(rPositionPixel)
, maSizePixel(rSizePixel)
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 9ed602942322..932bab285784 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -349,7 +349,7 @@ public:
@return true, if the operation was completed successfully.
*/
- bool Rotate( long nAngle10, const Color& rFillColor );
+ bool Rotate( tools::Long nAngle10, const Color& rFillColor );
/** Create on-off mask from bitmap
diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx
index 72f53af6e31e..439228b2451e 100644
--- a/include/vcl/bitmapaccess.hxx
+++ b/include/vcl/bitmapaccess.hxx
@@ -27,8 +27,8 @@
#include <vcl/BitmapColor.hxx>
#include <vcl/BitmapAccessMode.hxx>
-typedef BitmapColor (*FncGetPixel)(ConstScanline pScanline, long nX, const ColorMask& rMask);
-typedef void (*FncSetPixel)(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+typedef BitmapColor (*FncGetPixel)(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+typedef void (*FncSetPixel)(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
class VCL_DLLPUBLIC BitmapInfoAccess
{
@@ -43,12 +43,12 @@ public:
return mpBuffer == nullptr;
}
- long Width() const
+ tools::Long Width() const
{
return mpBuffer ? mpBuffer->mnWidth : 0L;
}
- long Height() const
+ tools::Long Height() const
{
return mpBuffer ? mpBuffer->mnHeight : 0L;
}
@@ -164,7 +164,7 @@ public:
return mpBuffer ? mpBuffer->mpBits : nullptr;
}
- Scanline GetScanline(long nY) const
+ Scanline GetScanline(tools::Long nY) const
{
assert(mpBuffer && "Access is not valid!");
assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!");
@@ -176,26 +176,26 @@ public:
return mpBuffer->mpBits + ((mpBuffer->mnHeight - 1 - nY) * mpBuffer->mnScanlineSize);
}
- BitmapColor GetPixelFromData(const sal_uInt8* pData, long nX) const
+ BitmapColor GetPixelFromData(const sal_uInt8* pData, tools::Long nX) const
{
assert(pData && "Access is not valid!");
return mFncGetPixel( pData, nX, maColorMask );
}
- sal_uInt8 GetIndexFromData(const sal_uInt8* pData, long nX) const
+ sal_uInt8 GetIndexFromData(const sal_uInt8* pData, tools::Long nX) const
{
return GetPixelFromData( pData, nX ).GetIndex();
}
- void SetPixelOnData(sal_uInt8* pData, long nX, const BitmapColor& rBitmapColor)
+ void SetPixelOnData(sal_uInt8* pData, tools::Long nX, const BitmapColor& rBitmapColor)
{
assert(pData && "Access is not valid!");
mFncSetPixel(pData, nX, rBitmapColor, maColorMask);
}
- BitmapColor GetPixel(long nY, long nX) const
+ BitmapColor GetPixel(tools::Long nY, tools::Long nX) const
{
assert(mpBuffer && "Access is not valid!");
assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!");
@@ -204,7 +204,7 @@ public:
return mFncGetPixel(GetScanline(nY), nX, maColorMask );
}
- BitmapColor GetColor(long nY, long nX) const
+ BitmapColor GetColor(tools::Long nY, tools::Long nX) const
{
if (HasPalette())
return mpBuffer->maPalette[GetPixelIndex(nY, nX)];
@@ -212,7 +212,7 @@ public:
return GetPixel(nY, nX);
}
- sal_uInt8 GetPixelIndex(long nY, long nX) const
+ sal_uInt8 GetPixelIndex(tools::Long nY, tools::Long nX) const
{
return GetPixel(nY, nX).GetIndex();
}
@@ -239,41 +239,41 @@ public:
return mpBuffer;
}
- static BitmapColor GetPixelForN1BitMsbPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN1BitLsbPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN4BitMsnPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN4BitLsnPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN8BitPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN8BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN24BitTcBgr(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN24BitTcRgb(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcAbgr(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcXbgr(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcArgb(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcXrgb(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcBgra(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcBgrx(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcRgba(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcRgbx(ConstScanline pScanline, long nX, const ColorMask& rMask);
- static BitmapColor GetPixelForN32BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask);
-
- static void SetPixelForN1BitMsbPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN1BitLsbPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN4BitMsnPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN4BitLsnPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN8BitPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN8BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN24BitTcBgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN24BitTcRgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcAbgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcXbgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcArgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcXrgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcBgra(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcBgrx(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcRgba(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcRgbx(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
- static void SetPixelForN32BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static BitmapColor GetPixelForN1BitMsbPal(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN1BitLsbPal(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN4BitMsnPal(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN4BitLsnPal(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN8BitPal(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN8BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN24BitTcBgr(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN24BitTcRgb(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcAbgr(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcXbgr(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcArgb(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcXrgb(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcBgra(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcBgrx(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcRgba(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcRgbx(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+ static BitmapColor GetPixelForN32BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask);
+
+ static void SetPixelForN1BitMsbPal(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN1BitLsbPal(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN4BitMsnPal(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN4BitLsnPal(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN8BitPal(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN8BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN24BitTcBgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN24BitTcRgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcAbgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcXbgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcArgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcXrgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcBgra(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcBgrx(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcRgba(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcRgbx(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
+ static void SetPixelForN32BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
static FncGetPixel GetPixelFunction( ScanlineFormat nFormat );
static FncSetPixel SetPixelFunction( ScanlineFormat nFormat );
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 4dac473bb2f5..7c9eb69383c1 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -233,7 +233,7 @@ public:
@return true, if the operation was completed successfully.
*/
bool Rotate(
- long nAngle10,
+ tools::Long nAngle10,
const Color& rFillColor );
/** Replace all pixel having the search color with the specified color
@@ -436,7 +436,7 @@ public:
BitmapEx ModifyBitmapEx( const basegfx::BColorModifierStack& rBColorModifierStack) const;
[[nodiscard]]
- static BitmapEx AutoScaleBitmap( BitmapEx const & aBitmap, const long aStandardSize );
+ static BitmapEx AutoScaleBitmap( BitmapEx const & aBitmap, const tools::Long aStandardSize );
/// populate from a canvas implementation
bool Create(
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 4c3a7beafa5f..b91f87481305 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -55,8 +55,8 @@ public:
SAL_DLLPRIVATE const tools::Rectangle& ImplGetFocusRect() const;
SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign );
/// The x-coordinate of the vertical separator line, use in MenuButton subclass only.
- SAL_DLLPRIVATE long ImplGetSeparatorX() const;
- SAL_DLLPRIVATE void ImplSetSeparatorX( long nX );
+ SAL_DLLPRIVATE tools::Long ImplGetSeparatorX() const;
+ SAL_DLLPRIVATE void ImplSetSeparatorX( tools::Long nX );
protected:
explicit Button( WindowType nType );
@@ -240,7 +240,7 @@ private:
SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& rRenderContext );
SAL_DLLPRIVATE void ImplUncheckAllOther();
SAL_DLLPRIVATE Size ImplGetRadioImageSize() const;
- SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
+ SAL_DLLPRIVATE tools::Long ImplGetImageToTextDistance() const;
RadioButton(const RadioButton &) = delete;
RadioButton& operator= (const RadioButton &) = delete;
@@ -301,7 +301,7 @@ public:
static Image GetRadioImage( const AllSettings& rSettings, DrawButtonFlags nFlags );
- Size CalcMinimumSize( long nMaxWidth = 0 ) const;
+ Size CalcMinimumSize( tools::Long nMaxWidth = 0 ) const;
virtual Size GetOptimalSize() const override;
void SetToggleHdl( const Link<RadioButton&,void>& rLink ) { maToggleHdl = rLink; }
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index fd834bd822ac..9edcdb4d6f13 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -137,8 +137,8 @@ enum class CommandWheelMode
class VCL_DLLPUBLIC CommandWheelData
{
private:
- long mnDelta;
- long mnNotchDelta;
+ tools::Long mnDelta;
+ tools::Long mnNotchDelta;
double mnLines;
CommandWheelMode mnWheelMode;
sal_uInt16 mnCode;
@@ -147,13 +147,13 @@ private:
public:
CommandWheelData();
- CommandWheelData( long nWheelDelta, long nWheelNotchDelta,
+ CommandWheelData( tools::Long nWheelDelta, tools::Long nWheelNotchDelta,
double nScrollLines,
CommandWheelMode nWheelMode, sal_uInt16 nKeyModifier,
bool bHorz, bool bDeltaIsPixel = false );
- long GetDelta() const { return mnDelta; }
- long GetNotchDelta() const { return mnNotchDelta; }
+ tools::Long GetDelta() const { return mnDelta; }
+ tools::Long GetNotchDelta() const { return mnNotchDelta; }
double GetScrollLines() const { return mnLines; }
bool IsHorz() const { return mbHorz; }
bool IsDeltaPixel() const { return mbDeltaIsPixel; }
@@ -173,14 +173,14 @@ public:
class CommandScrollData
{
private:
- long mnDeltaX;
- long mnDeltaY;
+ tools::Long mnDeltaX;
+ tools::Long mnDeltaY;
public:
- CommandScrollData( long nDeltaX, long nDeltaY );
+ CommandScrollData( tools::Long nDeltaX, tools::Long nDeltaY );
- long GetDeltaX() const { return mnDeltaX; }
- long GetDeltaY() const { return mnDeltaY; }
+ tools::Long GetDeltaX() const { return mnDeltaX; }
+ tools::Long GetDeltaY() const { return mnDeltaY; }
};
class CommandModKeyData
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx
index 3b734e494404..db285cba9054 100644
--- a/include/vcl/ctrl.hxx
+++ b/include/vcl/ctrl.hxx
@@ -140,13 +140,13 @@ public:
// gets the displayed text
virtual OUString GetDisplayText() const override;
// returns the bounding box for the character at index nIndex (in control coordinates)
- tools::Rectangle GetCharacterBounds( long nIndex ) const;
+ tools::Rectangle GetCharacterBounds( tools::Long nIndex ) const;
// returns the character index for corresponding to rPoint (in control coordinates)
// -1 is returned if no character is at that point
- long GetIndexForPoint( const Point& rPoint ) const;
+ tools::Long GetIndexForPoint( const Point& rPoint ) const;
// returns the interval [start,end] of line nLine
// returns [-1,-1] for an invalid line
- Pair GetLineStartEnd( long nLine ) const;
+ Pair GetLineStartEnd( tools::Long nLine ) const;
/** ToRelativeLineIndex changes a layout data index to a count relative to its line.
This is equivalent to getting the line start/end pairs with
@@ -159,7 +159,7 @@ public:
the relative index inside the displayed line or -1 if the absolute index does
not match any line
*/
- long ToRelativeLineIndex( long nIndex ) const;
+ tools::Long ToRelativeLineIndex( tools::Long nIndex ) const;
void SetLoseFocusHdl( const Link<Control&,void>& rLink ) { maLoseFocusHdl = rLink; }
diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx
index c8e46da8082c..3937c0e48c4e 100644
--- a/include/vcl/cursor.hxx
+++ b/include/vcl/cursor.hxx
@@ -83,9 +83,9 @@ public:
void SetSize( const Size& rNewSize );
const Size& GetSize() const { return maSize; }
- void SetWidth( long nNewWidth );
- long GetWidth() const { return maSize.Width(); }
- long GetHeight() const { return maSize.Height(); }
+ void SetWidth( tools::Long nNewWidth );
+ tools::Long GetWidth() const { return maSize.Width(); }
+ tools::Long GetHeight() const { return maSize.Height(); }
void SetOrientation( short nOrientation = 0 );
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 9f0f7b9cf74f..0dd5988c23e7 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -90,10 +90,10 @@ private:
Size maMinOutSize;
Size maMaxOutSize;
tools::Rectangle maDragArea;
- long mnTrackX;
- long mnTrackY;
- long mnTrackWidth;
- long mnTrackHeight;
+ tools::Long mnTrackX;
+ tools::Long mnTrackY;
+ tools::Long mnTrackWidth;
+ tools::Long mnTrackHeight;
sal_Int32 mnDockLeft;
sal_Int32 mnDockTop;
sal_Int32 mnDockRight;
@@ -160,8 +160,8 @@ public:
void SetFloatStyle( WinBits nWinStyle );
WinBits GetFloatStyle() const { return mnFloatBits;}
- void setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight,
+ void setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags );
Point GetPosPixel() const;
Size GetSizePixel() const;
@@ -202,8 +202,8 @@ public:
// required because those methods are not virtual in Window (!!!) and must
// be available from the toolkit
- void SetPosSizePixel( vcl::Window const *pWin, long nX, long nY,
- long nWidth, long nHeight,
+ void SetPosSizePixel( vcl::Window const *pWin, tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags );
tools::Rectangle GetPosSizePixel( const vcl::Window *pWin );
};
@@ -223,10 +223,10 @@ private:
Point maMouseOff;
Size maRollUpOutSize;
Size maMinOutSize;
- long mnTrackX;
- long mnTrackY;
- long mnTrackWidth;
- long mnTrackHeight;
+ tools::Long mnTrackX;
+ tools::Long mnTrackY;
+ tools::Long mnTrackWidth;
+ tools::Long mnTrackHeight;
sal_Int32 mnDockLeft;
sal_Int32 mnDockTop;
sal_Int32 mnDockRight;
@@ -321,8 +321,8 @@ public:
void SetFloatStyle( WinBits nWinStyle );
WinBits GetFloatStyle() const;
- virtual void setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight,
+ virtual void setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags = PosSizeFlags::All ) override;
using Window::SetPosSizePixel;
Point GetPosPixel() const override;
diff --git a/include/vcl/embeddedfontshelper.hxx b/include/vcl/embeddedfontshelper.hxx
index 19ec9b1e1076..e1f2e5c28ece 100644
--- a/include/vcl/embeddedfontshelper.hxx
+++ b/include/vcl/embeddedfontshelper.hxx
@@ -14,6 +14,7 @@
#include <rtl/ustring.hxx>
#include <tools/fontenum.hxx>
+#include <tools/long.hxx>
#include <vector>
namespace com::sun::star::io { class XInputStream; }
@@ -77,7 +78,7 @@ public:
@param size size of the font data
@param rights type of operation to be allowed for the font
*/
- static bool sufficientTTFRights( const void* data, long size, FontRights rights );
+ static bool sufficientTTFRights( const void* data, tools::Long size, FontRights rights );
/**
Removes all temporary fonts in the path used by fileUrlForTemporaryFont().
diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index 4dcce65a73e4..ee52c7c400d9 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -63,9 +63,9 @@ public:
void setMaxWidthChars(sal_Int32 nWidth);
void setMinWidthChars(sal_Int32 nWidth);
- static Size CalcMinimumTextSize(Control const* pControl, long nMaxWidth = 0x7fffffff);
- static Size getTextDimensions(Control const *pControl, const OUString &rTxt, long nMaxWidth);
- Size CalcMinimumSize(long nMaxWidth = 0x7fffffff) const;
+ static Size CalcMinimumTextSize(Control const* pControl, tools::Long nMaxWidth = 0x7fffffff);
+ static Size getTextDimensions(Control const *pControl, const OUString &rTxt, tools::Long nMaxWidth);
+ Size CalcMinimumSize(tools::Long nMaxWidth = 0x7fffffff) const;
virtual Size GetOptimalSize() const override;
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
void set_mnemonic_widget(vcl::Window *pWindow);
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index faccd0cff1a5..02f4a6d3f264 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -25,6 +25,7 @@
#include <vcl/dllapi.h>
#include <tools/color.hxx>
#include <tools/fontenum.hxx>
+#include <tools/long.hxx>
#include <i18nlangtag/lang.h>
#include <vcl/fntstyle.hxx>
#include <o3tl/cow_wrapper.hxx>
@@ -106,10 +107,10 @@ public:
void SetFontSize( const Size& );
const Size& GetFontSize() const;
- void SetFontHeight( long nHeight );
- long GetFontHeight() const;
- void SetAverageFontWidth( long nWidth );
- long GetAverageFontWidth() const;
+ void SetFontHeight( tools::Long nHeight );
+ tools::Long GetFontHeight() const;
+ void SetAverageFontWidth( tools::Long nWidth );
+ tools::Long GetAverageFontWidth() const;
// Prefer LanguageTag over LanguageType
void SetLanguageTag( const LanguageTag & );
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 3727f6531eff..bb20b618719a 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -111,12 +111,12 @@ public:
void Clear();
void Mirror( BmpMirrorFlags nMirrorFlags );
- void Move( long nX, long nY );
+ void Move( tools::Long nX, tools::Long nY );
// additional Move method getting specifics how to handle MapMode( MapUnit::MapPixel )
- void Move( long nX, long nY, long nDPIX, long nDPIY );
+ void Move( tools::Long nX, tools::Long nY, tools::Long nDPIX, tools::Long nDPIY );
void Scale( double fScaleX, double fScaleY );
void Scale( const Fraction& rScaleX, const Fraction& rScaleY );
- void Rotate( long nAngle10 );
+ void Rotate( tools::Long nAngle10 );
void Clip( const tools::Rectangle& );
bool HasTransparentActions() const;
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 0a8ddaf0173d..983330a89745 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -158,10 +158,10 @@ public:
void StartAnimation( OutputDevice* pOutDev,
const Point& rDestPt,
const Size& rDestSize,
- long nExtraData = 0,
+ tools::Long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = nullptr );
void StopAnimation( const OutputDevice* pOutputDevice,
- long nExtraData );
+ tools::Long nExtraData );
void SetAnimationNotifyHdl( const Link<Animation*,void>& rLink );
Link<Animation*,void> GetAnimationNotifyHdl() const;
diff --git a/include/vcl/hatch.hxx b/include/vcl/hatch.hxx
index c297e30fd414..92afd57b6126 100644
--- a/include/vcl/hatch.hxx
+++ b/include/vcl/hatch.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_HATCH_HXX
#include <tools/color.hxx>
+#include <tools/long.hxx>
#include <vcl/dllapi.h>
#include <vcl/vclenum.hxx>
@@ -33,7 +34,7 @@ struct ImplHatch
{
Color maColor;
HatchStyle meStyle;
- long mnDistance;
+ tools::Long mnDistance;
sal_uInt16 mnAngle;
ImplHatch();
@@ -47,7 +48,7 @@ public:
Hatch();
Hatch( const Hatch& rHatch );
- Hatch( HatchStyle eStyle, const Color& rHatchColor, long nDistance, sal_uInt16 nAngle10 );
+ Hatch( HatchStyle eStyle, const Color& rHatchColor, tools::Long nDistance, sal_uInt16 nAngle10 );
~Hatch();
Hatch& operator=( const Hatch& rHatch );
@@ -59,8 +60,8 @@ public:
void SetColor( const Color& rColor );
const Color& GetColor() const { return mpImplHatch->maColor; }
- void SetDistance( long nDistance );
- long GetDistance() const { return mpImplHatch->mnDistance; }
+ void SetDistance( tools::Long nDistance );
+ tools::Long GetDistance() const { return mpImplHatch->mnDistance; }
void SetAngle( sal_uInt16 nAngle10 );
sal_uInt16 GetAngle() const { return mpImplHatch->mnAngle; }
diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx
index 12d5c59415e6..3a19e9d73365 100644
--- a/include/vcl/headbar.hxx
+++ b/include/vcl/headbar.hxx
@@ -199,21 +199,21 @@ namespace o3tl
#define HEADERBAR_APPEND (sal_uInt16(0xFFFF))
#define HEADERBAR_ITEM_NOTFOUND (sal_uInt16(0xFFFF))
-#define HEADERBAR_FULLSIZE (long(1000000000))
+#define HEADERBAR_FULLSIZE (tools::Long(1000000000))
class VCL_DLLPUBLIC HeaderBar : public vcl::Window
{
private:
std::vector<std::unique_ptr<ImplHeadItem>> mvItemList;
- long mnBorderOff1;
- long mnBorderOff2;
- long mnOffset;
- long mnDX;
- long mnDY;
- long mnDragSize;
- long mnStartPos;
- long mnDragPos;
- long mnMouseOff;
+ tools::Long mnBorderOff1;
+ tools::Long mnBorderOff2;
+ tools::Long mnOffset;
+ tools::Long mnDX;
+ tools::Long mnDY;
+ tools::Long mnDragSize;
+ tools::Long mnStartPos;
+ tools::Long mnDragPos;
+ tools::Long mnMouseOff;
sal_uInt16 mnCurItemId;
sal_uInt16 mnItemDragPos;
bool mbDragable;
@@ -233,10 +233,10 @@ private:
using Window::ImplInit;
VCL_DLLPRIVATE void ImplInit( WinBits nWinStyle );
VCL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
- VCL_DLLPRIVATE long ImplGetItemPos( sal_uInt16 nPos ) const;
+ VCL_DLLPRIVATE tools::Long ImplGetItemPos( sal_uInt16 nPos ) const;
VCL_DLLPRIVATE tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ) const;
using Window::ImplHitTest;
- VCL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, long& nMouseOff, sal_uInt16& nPos ) const;
+ VCL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, tools::Long& nMouseOff, sal_uInt16& nPos ) const;
VCL_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos );
VCL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh,
const tools::Rectangle& rItemRect, const tools::Rectangle* pRect);
@@ -272,14 +272,14 @@ public:
virtual void DoubleClick();
void InsertItem( sal_uInt16 nItemId, const OUString& rText,
- long nSize, HeaderBarItemBits nBits = HeaderBarItemBits::STDSTYLE,
+ tools::Long nSize, HeaderBarItemBits nBits = HeaderBarItemBits::STDSTYLE,
sal_uInt16 nPos = HEADERBAR_APPEND );
void RemoveItem( sal_uInt16 nItemId );
void MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos );
void Clear();
- void SetOffset( long nNewOffset );
- void SetDragSize( long nNewSize ) { mnDragSize = nNewSize; }
+ void SetOffset( tools::Long nNewOffset );
+ void SetDragSize( tools::Long nNewSize ) { mnDragSize = nNewSize; }
sal_uInt16 GetItemCount() const;
sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
@@ -289,8 +289,8 @@ public:
sal_uInt16 GetCurItemId() const { return mnCurItemId; }
bool IsItemMode() const { return mbItemMode; }
- void SetItemSize( sal_uInt16 nItemId, long nNewSize );
- long GetItemSize( sal_uInt16 nItemId ) const;
+ void SetItemSize( sal_uInt16 nItemId, tools::Long nNewSize );
+ tools::Long GetItemSize( sal_uInt16 nItemId ) const;
void SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits );
HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
diff --git a/include/vcl/i18nhelp.hxx b/include/vcl/i18nhelp.hxx
index 306440f61439..5be46d598a7e 100644
--- a/include/vcl/i18nhelp.hxx
+++ b/include/vcl/i18nhelp.hxx
@@ -24,6 +24,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
+#include <tools/long.hxx>
#include <vcl/dllapi.h>
#include <memory>
@@ -64,7 +65,7 @@ public:
bool MatchString( const OUString& rStr1, const OUString& rStr2 ) const;
bool MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const;
- OUString GetNum( long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep = true, bool bTrailingZeros = true ) const;
+ OUString GetNum( tools::Long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep = true, bool bTrailingZeros = true ) const;
static OUString filterFormattingChars( const OUString& );
};
diff --git a/include/vcl/imap.hxx b/include/vcl/imap.hxx
index 02d8f2ddf96b..5a71efdce90e 100644
--- a/include/vcl/imap.hxx
+++ b/include/vcl/imap.hxx
@@ -51,7 +51,7 @@ private:
void ImpReadCERNLine( const OString& rLine );
static Point ImpReadCERNCoords( const char** ppStr );
- static long ImpReadCERNRadius( const char** ppStr );
+ static tools::Long ImpReadCERNRadius( const char** ppStr );
static OUString ImpReadCERNURL( const char** ppStr );
void ImpReadNCSALine( const OString& rLine );
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index e15f49b96d58..60a7f44825e4 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -107,12 +107,12 @@ protected:
virtual Size calculateRequisition() const override;
virtual void setAllocation(const Size &rAllocation) override;
- virtual long getPrimaryDimension(const Size &rSize) const = 0;
- virtual void setPrimaryDimension(Size &rSize, long) const = 0;
- virtual long getPrimaryCoordinate(const Point &rPos) const = 0;
- virtual void setPrimaryCoordinate(Point &rPos, long) const = 0;
- virtual long getSecondaryDimension(const Size &rSize) const = 0;
- virtual void setSecondaryDimension(Size &rSize, long) const = 0;
+ virtual tools::Long getPrimaryDimension(const Size &rSize) const = 0;
+ virtual void setPrimaryDimension(Size &rSize, tools::Long) const = 0;
+ virtual tools::Long getPrimaryCoordinate(const Point &rPos) const = 0;
+ virtual void setPrimaryCoordinate(Point &rPos, tools::Long) const = 0;
+ virtual tools::Long getSecondaryDimension(const Size &rSize) const = 0;
+ virtual void setSecondaryDimension(Size &rSize, tools::Long) const = 0;
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const = 0;
};
@@ -126,27 +126,27 @@ public:
m_bVerticalContainer = true;
}
protected:
- virtual long getPrimaryDimension(const Size &rSize) const override
+ virtual tools::Long getPrimaryDimension(const Size &rSize) const override
{
return rSize.getHeight();
}
- virtual void setPrimaryDimension(Size &rSize, long nHeight) const override
+ virtual void setPrimaryDimension(Size &rSize, tools::Long nHeight) const override
{
rSize.setHeight(nHeight);
}
- virtual long getPrimaryCoordinate(const Point &rPos) const override
+ virtual tools::Long getPrimaryCoordinate(const Point &rPos) const override
{
return rPos.getY();
}
- virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
+ virtual void setPrimaryCoordinate(Point &rPos, tools::Long nPos) const override
{
rPos.setY(nPos);
}
- virtual long getSecondaryDimension(const Size &rSize) const override
+ virtual tools::Long getSecondaryDimension(const Size &rSize) const override
{
return rSize.getWidth();
}
- virtual void setSecondaryDimension(Size &rSize, long nWidth) const override
+ virtual void setSecondaryDimension(Size &rSize, tools::Long nWidth) const override
{
rSize.setWidth(nWidth);
}
@@ -165,27 +165,27 @@ public:
m_bVerticalContainer = false;
}
protected:
- virtual long getPrimaryDimension(const Size &rSize) const override
+ virtual tools::Long getPrimaryDimension(const Size &rSize) const override
{
return rSize.getWidth();
}
- virtual void setPrimaryDimension(Size &rSize, long nWidth) const override
+ virtual void setPrimaryDimension(Size &rSize, tools::Long nWidth) const override
{
rSize.setWidth(nWidth);
}
- virtual long getPrimaryCoordinate(const Point &rPos) const override
+ virtual tools::Long getPrimaryCoordinate(const Point &rPos) const override
{
return rPos.getX();
}
- virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
+ virtual void setPrimaryCoordinate(Point &rPos, tools::Long nPos) const override
{
rPos.setX(nPos);
}
- virtual long getSecondaryDimension(const Size &rSize) const override
+ virtual tools::Long getSecondaryDimension(const Size &rSize) const override
{
return rSize.getHeight();
}
- virtual void setSecondaryDimension(Size &rSize, long nHeight) const override
+ virtual void setSecondaryDimension(Size &rSize, tools::Long nHeight) const override
{
rSize.setHeight(nHeight);
}
@@ -240,27 +240,27 @@ public:
m_bVerticalContainer = true;
}
protected:
- virtual long getPrimaryDimension(const Size &rSize) const override
+ virtual tools::Long getPrimaryDimension(const Size &rSize) const override
{
return rSize.getHeight();
}
- virtual void setPrimaryDimension(Size &rSize, long nHeight) const override
+ virtual void setPrimaryDimension(Size &rSize, tools::Long nHeight) const override
{
rSize.setHeight(nHeight);
}
- virtual long getPrimaryCoordinate(const Point &rPos) const override
+ virtual tools::Long getPrimaryCoordinate(const Point &rPos) const override
{
return rPos.getY();
}
- virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
+ virtual void setPrimaryCoordinate(Point &rPos, tools::Long nPos) const override
{
rPos.setY(nPos);
}
- virtual long getSecondaryDimension(const Size &rSize) const override
+ virtual tools::Long getSecondaryDimension(const Size &rSize) const override
{
return rSize.getWidth();
}
- virtual void setSecondaryDimension(Size &rSize, long nWidth) const override
+ virtual void setSecondaryDimension(Size &rSize, tools::Long nWidth) const override
{
rSize.setWidth(nWidth);
}
@@ -279,27 +279,27 @@ public:
m_bVerticalContainer = false;
}
private:
- virtual long getPrimaryDimension(const Size &rSize) const override
+ virtual tools::Long getPrimaryDimension(const Size &rSize) const override
{
return rSize.getWidth();
}
- virtual void setPrimaryDimension(Size &rSize, long nWidth) const override
+ virtual void setPrimaryDimension(Size &rSize, tools::Long nWidth) const override
{
rSize.setWidth(nWidth);
}
- virtual long getPrimaryCoordinate(const Point &rPos) const override
+ virtual tools::Long getPrimaryCoordinate(const Point &rPos) const override
{
return rPos.getX();
}
- virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
+ virtual void setPrimaryCoordinate(Point &rPos, tools::Long nPos) const override
{
rPos.setX(nPos);
}
- virtual long getSecondaryDimension(const Size &rSize) const override
+ virtual tools::Long getSecondaryDimension(const Size &rSize) const override
{
return rSize.getHeight();
}
- virtual void setSecondaryDimension(Size &rSize, long nHeight) const override
+ virtual void setSecondaryDimension(Size &rSize, tools::Long nHeight) const override
{
rSize.setHeight(nHeight);
}
@@ -320,7 +320,7 @@ private:
public:
struct Value
{
- long m_nValue;
+ tools::Long m_nValue;
bool m_bExpand;
Value() : m_nValue(0), m_bExpand(false) {}
};
@@ -381,42 +381,42 @@ class VclPaned : public VclContainer
{
protected:
VclPtr<Splitter> m_pSplitter;
- long m_nPosition;
+ tools::Long m_nPosition;
VclPaned(vcl::Window *pParent, bool bVertical);
public:
virtual ~VclPaned() override;
virtual void dispose() override;
- long get_position() const { return m_nPosition; }
- virtual void set_position(long nPosition) { m_nPosition = nPosition; }
+ tools::Long get_position() const { return m_nPosition; }
+ virtual void set_position(tools::Long nPosition) { m_nPosition = nPosition; }
};
class VclVPaned final : public VclPaned
{
private:
DECL_LINK(SplitHdl, Splitter*, void);
- void arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight);
+ void arrange(const Size& rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight);
public:
VclVPaned(vcl::Window *pParent);
virtual ~VclVPaned() override;
virtual Size calculateRequisition() const override;
virtual void setAllocation(const Size &rAllocation) override;
- virtual void set_position(long nPosition) override;
+ virtual void set_position(tools::Long nPosition) override;
};
class VclHPaned final : public VclPaned
{
private:
DECL_LINK(SplitHdl, Splitter*, void);
- void arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight);
+ void arrange(const Size& rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight);
public:
VclHPaned(vcl::Window *pParent);
virtual ~VclHPaned() override;
virtual Size calculateRequisition() const override;
virtual void setAllocation(const Size &rAllocation) override;
- virtual void set_position(long nPosition) override;
+ virtual void set_position(tools::Long nPosition) override;
};
class VclFrame final : public VclBin
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 9522204de0b6..7613f14f157c 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -23,6 +23,7 @@
#include <memory>
#include <vcl/vclenum.hxx>
#include <tools/link.hxx>
+#include <tools/long.hxx>
#include <vcl/dllapi.h>
#include <vcl/keycod.hxx>
#include <vcl/vclreferencebase.hxx>
@@ -170,7 +171,7 @@ protected:
SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible( sal_uInt16 nPos ) const;
SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible( sal_uInt16 nPos ) const;
SAL_DLLPRIVATE void ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
- sal_uInt16 nBorder, long nOffY = 0, MenuItemData const * pThisDataOnly = nullptr,
+ sal_uInt16 nBorder, tools::Long nOffY = 0, MenuItemData const * pThisDataOnly = nullptr,
bool bHighlighted = false, bool bLayout = false, bool bRollover = false ) const;
SAL_DLLPRIVATE void ImplPaintMenuTitle(vcl::RenderContext&, const tools::Rectangle& rRect) const;
SAL_DLLPRIVATE void ImplSelect();
@@ -184,11 +185,11 @@ protected:
// returns native check and option menu symbol height in rCheckHeight and rRadioHeight
// return value is maximum width and height of checkboxes and radiobuttons
- SAL_DLLPRIVATE Size ImplGetNativeCheckAndRadioSize(vcl::RenderContext const & rRenderContext, long& rCheckHeight, long& rRadioHeight) const;
+ SAL_DLLPRIVATE Size ImplGetNativeCheckAndRadioSize(vcl::RenderContext const & rRenderContext, tools::Long& rCheckHeight, tools::Long& rRadioHeight) const;
// returns native submenu arrow size and spacing from right border
// return value is whether it's supported natively
- SAL_DLLPRIVATE static bool ImplGetNativeSubmenuArrowSize(vcl::RenderContext const & rRenderContext, Size& rArrowSize, long& rArrowSpacing);
+ SAL_DLLPRIVATE static bool ImplGetNativeSubmenuArrowSize(vcl::RenderContext const & rRenderContext, Size& rArrowSize, tools::Long& rArrowSpacing);
SAL_DLLPRIVATE void ImplAddDel( ImplMenuDelData &rDel );
SAL_DLLPRIVATE void ImplRemoveDel( ImplMenuDelData &rDel );
@@ -357,10 +358,10 @@ public:
// returns the bounding box for the character at index nIndex
// where nIndex is relative to the starting index of the item
// with id nItemId (in coordinates of the displaying window)
- tools::Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ) const;
+ tools::Rectangle GetCharacterBounds( sal_uInt16 nItemId, tools::Long nIndex ) const;
// -1 is returned if no character is at that point
// if an index is found the corresponding item id is filled in (else 0)
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const;
+ tools::Long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const;
// returns the bounding rectangle for an item at pos nItemPos
tools::Rectangle GetBoundingRectangle( sal_uInt16 nItemPos ) const;
@@ -494,8 +495,8 @@ private:
protected:
SAL_DLLPRIVATE sal_uInt16 ImplExecute( const VclPtr<vcl::Window>& pW, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst );
SAL_DLLPRIVATE void ImplFlushPendingSelect();
- SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const;
- SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible = nullptr ) const;
+ SAL_DLLPRIVATE tools::Long ImplCalcHeight( sal_uInt16 nEntries ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( tools::Long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible = nullptr ) const;
public:
PopupMenu();
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index fad89ec4b838..52c1bf7d935d 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -81,7 +81,7 @@ public:
virtual rtl::Reference<MetaAction> Clone();
- virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
@@ -119,7 +119,7 @@ public:
MetaPixelAction( const Point& rPt, const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Point& GetPoint() const { return maPt; }
@@ -147,7 +147,7 @@ public:
explicit MetaPointAction( const Point& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Point& GetPoint() const { return maPt; }
@@ -179,7 +179,7 @@ public:
MetaLineAction( const Point& rStart, const Point& rEnd,
const LineInfo& rLineInfo );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Point& GetStartPoint() const { return maStartPt; }
@@ -209,7 +209,7 @@ public:
explicit MetaRectAction( const tools::Rectangle& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -240,7 +240,7 @@ public:
MetaRoundRectAction( const tools::Rectangle& rRect,
sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -270,7 +270,7 @@ public:
explicit MetaEllipseAction( const tools::Rectangle& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -301,7 +301,7 @@ public:
MetaArcAction( const tools::Rectangle& rRect,
const Point& rStart, const Point& rEnd );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -334,7 +334,7 @@ public:
MetaPieAction( const tools::Rectangle& rRect,
const Point& rStart, const Point& rEnd );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -367,7 +367,7 @@ public:
MetaChordAction( const tools::Rectangle& rRect,
const Point& rStart, const Point& rEnd );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -399,7 +399,7 @@ public:
explicit MetaPolyLineAction( const tools::Polygon& );
explicit MetaPolyLineAction( const tools::Polygon&, const LineInfo& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Polygon& GetPolygon() const { return maPoly; }
@@ -428,7 +428,7 @@ public:
explicit MetaPolygonAction( const tools::Polygon& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Polygon& GetPolygon() const { return maPoly; }
@@ -456,7 +456,7 @@ public:
explicit MetaPolyPolygonAction( const tools::PolyPolygon& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
@@ -488,7 +488,7 @@ public:
MetaTextAction( const Point& rPt, const OUString& rStr,
sal_Int32 nIndex, sal_Int32 nLen );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Point& GetPoint() const { return maPt; }
@@ -514,14 +514,14 @@ public:
MetaTextArrayAction();
MetaTextArrayAction( const MetaTextArrayAction& rAction );
MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
- const long* pDXAry, sal_Int32 nIndex,
+ const tools::Long* pDXAry, sal_Int32 nIndex,
sal_Int32 nLen );
virtual void Execute( OutputDevice* pOut ) override;
virtual rtl::Reference<MetaAction> Clone() override;
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
@@ -531,7 +531,7 @@ public:
const OUString& GetText() const { return maStr; }
sal_Int32 GetIndex() const { return mnIndex; }
sal_Int32 GetLen() const { return mnLen; }
- long* GetDXArray() const { return mpDXAry.get(); }
+ tools::Long* GetDXArray() const { return mpDXAry.get(); }
};
class SAL_DLLPUBLIC_RTTI MetaStretchTextAction final : public MetaAction
@@ -562,7 +562,7 @@ public:
const OUString& rStr,
sal_Int32 nIndex, sal_Int32 nLen );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Point& GetPoint() const { return maPt; }
@@ -597,7 +597,7 @@ public:
MetaTextRectAction( const tools::Rectangle& rRect,
const OUString& rStr, DrawTextFlags nStyle );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -610,7 +610,7 @@ class SAL_DLLPUBLIC_RTTI MetaTextLineAction final : public MetaAction
private:
Point maPos;
- long mnWidth;
+ tools::Long mnWidth;
FontStrikeout meStrikeout;
FontLineStyle meUnderline;
FontLineStyle meOverline;
@@ -629,15 +629,15 @@ public:
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
- MetaTextLineAction( const Point& rPos, long nWidth,
+ MetaTextLineAction( const Point& rPos, tools::Long nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Point& GetStartPoint() const { return maPos; }
- long GetWidth() const { return mnWidth; }
+ tools::Long GetWidth() const { return mnWidth; }
FontStrikeout GetStrikeout() const { return meStrikeout; }
FontLineStyle GetUnderline() const { return meUnderline; }
FontLineStyle GetOverline() const { return meOverline; }
@@ -666,7 +666,7 @@ public:
MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Bitmap& GetBitmap() const { return maBmp; }
@@ -698,7 +698,7 @@ public:
MetaBmpScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Bitmap& GetBitmap() const { return maBmp; }
@@ -734,7 +734,7 @@ public:
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Bitmap& GetBitmap() const { return maBmp; }
@@ -767,7 +767,7 @@ public:
MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const BitmapEx& GetBitmapEx() const { return maBmpEx; }
@@ -800,7 +800,7 @@ public:
MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx ) ;
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const BitmapEx& GetBitmapEx() const { return maBmpEx; }
@@ -837,7 +837,7 @@ public:
const Point& rSrcPt, const Size& rSrcSz,
const BitmapEx& rBmpEx );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const BitmapEx& GetBitmapEx() const { return maBmpEx; }
@@ -874,7 +874,7 @@ public:
const Bitmap& rBmp,
const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Bitmap& GetBitmap() const { return maBmp; }
@@ -909,7 +909,7 @@ public:
const Bitmap& rBmp,
const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Bitmap& GetBitmap() const { return maBmp; }
@@ -948,7 +948,7 @@ public:
const Bitmap& rBmp,
const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const Bitmap& GetBitmap() const { return maBmp; }
@@ -982,7 +982,7 @@ public:
MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -1012,7 +1012,7 @@ public:
MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
@@ -1042,7 +1042,7 @@ public:
MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
@@ -1073,7 +1073,7 @@ public:
MetaWallpaperAction( const tools::Rectangle& rRect,
const Wallpaper& rPaper );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -1103,7 +1103,7 @@ public:
MetaClipRegionAction( const vcl::Region& rRegion, bool bClip );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const vcl::Region& GetRegion() const { return maRegion; }
@@ -1132,7 +1132,7 @@ public:
explicit MetaISectRectClipRegionAction( const tools::Rectangle& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::Rectangle& GetRect() const { return maRect; }
@@ -1160,7 +1160,7 @@ public:
explicit MetaISectRegionClipRegionAction( const vcl::Region& );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const vcl::Region& GetRegion() const { return maRegion; }
@@ -1170,8 +1170,8 @@ class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaMoveClipRegionAction final : public Me
{
private:
- long mnHorzMove;
- long mnVertMove;
+ tools::Long mnHorzMove;
+ tools::Long mnVertMove;
public:
MetaMoveClipRegionAction();
@@ -1187,12 +1187,12 @@ public:
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override;
virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override;
- MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
+ MetaMoveClipRegionAction( tools::Long nHorzMove, tools::Long nVertMove );
virtual void Scale( double fScaleX, double fScaleY ) override;
- long GetHorzMove() const { return mnHorzMove; }
- long GetVertMove() const { return mnVertMove; }
+ tools::Long GetHorzMove() const { return mnHorzMove; }
+ tools::Long GetVertMove() const { return mnVertMove; }
};
class VCL_DLLPUBLIC MetaLineColorAction final : public MetaAction
@@ -1525,7 +1525,7 @@ public:
MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const tools::PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
@@ -1560,7 +1560,7 @@ public:
MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
const Size& rSize, const Gradient& rGradient );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
@@ -1596,7 +1596,7 @@ public:
MetaEPSAction( const Point& rPoint, const Size& rSize,
const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
const GfxLink& GetLink() const { return maGfxLink; }
@@ -1652,7 +1652,7 @@ public:
explicit MetaCommentAction( const MetaCommentAction& rAct );
explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 );
- virtual void Move( long nHorzMove, long nVertMove ) override;
+ virtual void Move( tools::Long nHorzMove, tools::Long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
virtual void Execute( OutputDevice* pOut ) override;
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index aa1e6943a10a..9de279fd222d 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -36,21 +36,21 @@ public:
FontMetric( const FontMetric& ); // TODO make this explicit
~FontMetric() override;
- long GetAscent() const { return mnAscent; }
- long GetDescent() const { return mnDescent; }
- long GetInternalLeading() const { return mnIntLeading; }
- long GetExternalLeading() const { return mnExtLeading; }
- long GetLineHeight() const { return mnLineHeight; } // TODO this is ascent + descnt
- long GetSlant() const { return mnSlant; }
- long GetBulletOffset() const { return mnBulletOffset; }
+ tools::Long GetAscent() const { return mnAscent; }
+ tools::Long GetDescent() const { return mnDescent; }
+ tools::Long GetInternalLeading() const { return mnIntLeading; }
+ tools::Long GetExternalLeading() const { return mnExtLeading; }
+ tools::Long GetLineHeight() const { return mnLineHeight; } // TODO this is ascent + descnt
+ tools::Long GetSlant() const { return mnSlant; }
+ tools::Long GetBulletOffset() const { return mnBulletOffset; }
- void SetAscent( long nAscent ) { mnAscent = nAscent; }
- void SetDescent( long nDescent ) { mnDescent = nDescent; }
- void SetExternalLeading( long nExtLeading ) { mnExtLeading = nExtLeading; }
- void SetInternalLeading( long nIntLeading ) { mnIntLeading = nIntLeading; }
- void SetLineHeight( long nHeight ) { mnLineHeight = nHeight; } // TODO this is ascent + descent
- void SetSlant( long nSlant ) { mnSlant = nSlant; }
- void SetBulletOffset( long nOffset ) { mnBulletOffset = nOffset; }
+ void SetAscent( tools::Long nAscent ) { mnAscent = nAscent; }
+ void SetDescent( tools::Long nDescent ) { mnDescent = nDescent; }
+ void SetExternalLeading( tools::Long nExtLeading ) { mnExtLeading = nExtLeading; }
+ void SetInternalLeading( tools::Long nIntLeading ) { mnIntLeading = nIntLeading; }
+ void SetLineHeight( tools::Long nHeight ) { mnLineHeight = nHeight; } // TODO this is ascent + descent
+ void SetSlant( tools::Long nSlant ) { mnSlant = nSlant; }
+ void SetBulletOffset( tools::Long nOffset ) { mnBulletOffset = nOffset; }
bool IsFullstopCentered() const { return mbFullstopCentered; }
@@ -63,13 +63,13 @@ public:
bool operator!=( const FontMetric& rMetric ) const
{ return !operator==( rMetric ); }
private:
- long mnAscent; // Ascent
- long mnDescent; // Descent
- long mnIntLeading; // Internal Leading
- long mnExtLeading; // External Leading
- long mnLineHeight; // Ascent+Descent+EmphasisMark
- long mnSlant; // Slant
- long mnBulletOffset; // Offset for non-printing character
+ tools::Long mnAscent; // Ascent
+ tools::Long mnDescent; // Descent
+ tools::Long mnIntLeading; // Internal Leading
+ tools::Long mnExtLeading; // External Leading
+ tools::Long mnLineHeight; // Ascent+Descent+EmphasisMark
+ tools::Long mnSlant; // Slant
+ tools::Long mnBulletOffset; // Offset for non-printing character
bool mbFullstopCentered;
};
diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx
index fa58dda4bbbf..759e0a143a09 100644
--- a/include/vcl/notebookbar.hxx
+++ b/include/vcl/notebookbar.hxx
@@ -36,7 +36,7 @@ public:
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
virtual Size GetOptimalSize() const override;
- virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
+ virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
virtual void Resize() override;
void SetSystemWindow(SystemWindow* pSystemWindow);
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index 493fd5d2e014..f4742d268b49 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -59,12 +59,12 @@ public:
* this method. The buffer size is assumed to be 4*width*height and the format
* to be OptimalBufferFormat().
**/
- static BitmapEx ConvertBufferToBitmapEx(const sal_uInt8* const pBuffer, long nWidth, long nHeight);
+ static BitmapEx ConvertBufferToBitmapEx(const sal_uInt8* const pBuffer, tools::Long nWidth, tools::Long nHeight);
/**
* Returns the optimal buffer format for OpenGL (GL_BGRA or GL_RGBA).
**/
static GLenum OptimalBufferFormat();
- static void renderToFile(long nWidth, long nHeight, const OUString& rFileName);
+ static void renderToFile(tools::Long nWidth, tools::Long nHeight, const OUString& rFileName);
static const char* GLErrorString(GLenum errorCode);
@@ -80,7 +80,7 @@ public:
* @param nRenderbufferDepthId RenderBuffer's depth ID
* @param nRenderbufferColorId RenderBuffer's color ID
*/
- static void createFramebuffer(long nWidth, long nHeight, GLuint& nFramebufferId,
+ static void createFramebuffer(tools::Long nWidth, tools::Long nHeight, GLuint& nFramebufferId,
GLuint& nRenderbufferDepthId, GLuint& nRenderbufferColorId);
/// Get OpenGL version (needs a context)
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 18f91b205faf..e1f6b17c47a0 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -305,7 +305,7 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC OutputDevice : public virtual VclReferenceBa
friend class VirtualDevice;
friend class vcl::Window;
friend class WorkWindow;
- friend void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight );
+ friend void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
private:
OutputDevice(const OutputDevice&) = delete;
@@ -329,27 +329,27 @@ private:
VclPtr<VirtualDevice> mpAlphaVDev;
/// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffOrigX;
+ tools::Long mnOutOffOrigX;
/// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffLogicX;
+ tools::Long mnOutOffLogicX;
/// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffOrigY;
+ tools::Long mnOutOffOrigY;
/// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffLogicY;
+ tools::Long mnOutOffLogicY;
/// Output offset for device output in pixel (pseudo window offset within window system's frames)
- long mnOutOffX;
+ tools::Long mnOutOffX;
/// Output offset for device output in pixel (pseudo window offset within window system's frames)
- long mnOutOffY;
- long mnOutWidth;
- long mnOutHeight;
+ tools::Long mnOutOffY;
+ tools::Long mnOutWidth;
+ tools::Long mnOutHeight;
sal_Int32 mnDPIX;
sal_Int32 mnDPIY;
sal_Int32 mnDPIScalePercentage; ///< For HiDPI displays, we want to draw elements for a percentage larger
/// font specific text alignment offsets in pixel units
- mutable long mnTextOffX;
- mutable long mnTextOffY;
- mutable long mnEmphasisAscent;
- mutable long mnEmphasisDescent;
+ mutable tools::Long mnTextOffX;
+ mutable tools::Long mnTextOffY;
+ mutable tools::Long mnEmphasisAscent;
+ mutable tools::Long mnEmphasisDescent;
DrawModeFlags mnDrawMode;
ComplexTextLayoutFlags mnTextLayoutMode;
ImplMapRes maMapRes;
@@ -440,12 +440,12 @@ public:
Size GetOutputSizePixel() const
{ return Size( mnOutWidth, mnOutHeight ); }
- long GetOutputWidthPixel() const { return mnOutWidth; }
- long GetOutputHeightPixel() const { return mnOutHeight; }
- long GetOutOffXPixel() const { return mnOutOffX; }
- long GetOutOffYPixel() const { return mnOutOffY; }
- void SetOutOffXPixel(long nOutOffX);
- void SetOutOffYPixel(long nOutOffY);
+ tools::Long GetOutputWidthPixel() const { return mnOutWidth; }
+ tools::Long GetOutputHeightPixel() const { return mnOutHeight; }
+ tools::Long GetOutOffXPixel() const { return mnOutOffX; }
+ tools::Long GetOutOffYPixel() const { return mnOutOffY; }
+ void SetOutOffXPixel(tools::Long nOutOffX);
+ void SetOutOffYPixel(tools::Long nOutOffY);
Size GetOutputSize() const
{ return PixelToLogic( GetOutputSizePixel() ); }
@@ -674,7 +674,7 @@ public:
bool IsClipRegion() const { return mbClipRegion; }
- void MoveClipRegion( long nHorzMove, long nVertMove );
+ void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
void IntersectClipRegion( const tools::Rectangle& rRect );
void IntersectClipRegion( const vcl::Region& rRegion );
@@ -919,7 +919,7 @@ protected:
virtual bool UsePolyPolygonForComplexGradient() = 0;
- virtual long GetGradientStepCount( long nMinRect );
+ virtual tools::Long GetGradientStepCount( tools::Long nMinRect );
private:
@@ -930,7 +930,7 @@ private:
SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
- SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
+ SAL_DLLPRIVATE tools::Long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
SAL_DLLPRIVATE Color GetSingleColorGradientFill();
SAL_DLLPRIVATE void SetGrayscaleColors( Gradient &rGradient );
@@ -959,7 +959,7 @@ public:
private:
- SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
+ SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, tools::Long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
///@}
@@ -975,12 +975,12 @@ public:
void Erase(const tools::Rectangle& rRect);
protected:
- void DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+ void DrawGradientWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
private:
- SAL_DLLPRIVATE void DrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
- SAL_DLLPRIVATE void DrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
- SAL_DLLPRIVATE void DrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void DrawWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void DrawColorWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void DrawBitmapWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
///@}
@@ -1013,20 +1013,20 @@ public:
DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
const SalLayoutGlyphs* pGlyphs = nullptr);
- void DrawTextLine( const Point& rPos, long nWidth,
+ void DrawTextLine( const Point& rPos, tools::Long nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline,
bool bUnderlineAbove = false );
- void ImplDrawTextLine( long nBaseX, long nX, long nY, DeviceCoordinate nWidth,
+ void ImplDrawTextLine( tools::Long nBaseX, tools::Long nX, tools::Long nY, DeviceCoordinate nWidth,
FontStrikeout eStrikeout, FontLineStyle eUnderline,
FontLineStyle eOverline, bool bUnderlineAbove );
void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
- void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, long nLineWidth = 1 );
+ void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth = 1 );
bool ImplDrawRotateText( SalLayout& );
@@ -1086,7 +1086,7 @@ public:
*/
bool GetTextBoundRect( tools::Rectangle& rRect,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr,
+ sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr,
const SalLayoutGlyphs* pGlyphs = nullptr ) const;
tools::Rectangle ImplGetTextBoundRect( const SalLayout& );
@@ -1097,18 +1097,18 @@ public:
bool GetTextOutlines( PolyPolyVector&,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
+ sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr ) const;
bool GetTextOutlines( basegfx::B2DPolyPolygonVector &rVector,
const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
+ sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr ) const;
- OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
+ OUString GetEllipsisString( const OUString& rStr, tools::Long nMaxWidth,
DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
- long GetCtrlTextWidth( const OUString& rStr,
+ tools::Long GetCtrlTextWidth( const OUString& rStr,
const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
@@ -1154,7 +1154,7 @@ public:
See also GetTextBoundRect() for more explanation + code examples.
*/
- long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
+ tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
vcl::TextLayoutCache const* = nullptr,
SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
@@ -1162,35 +1162,35 @@ public:
See also GetTextBoundRect() for more explanation + code examples.
*/
- long GetTextHeight() const;
+ tools::Long GetTextHeight() const;
float approximate_digit_width() const;
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const long* pDXAry,
+ const tools::Long* pDXAry,
sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
SalLayoutFlags flags = SalLayoutFlags::NONE,
const SalLayoutGlyphs* pLayoutCache = nullptr);
- long GetTextArray( const OUString& rStr, long* pDXAry,
+ tools::Long GetTextArray( const OUString& rStr, tools::Long* pDXAry,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
vcl::TextLayoutCache const* = nullptr,
SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
- void GetCaretPositions( const OUString&, long* pCaretXArray,
+ void GetCaretPositions( const OUString&, tools::Long* pCaretXArray,
sal_Int32 nIndex, sal_Int32 nLen,
const SalLayoutGlyphs* pGlyphs = nullptr ) const;
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
- sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
+ sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
sal_Int32 nIndex, sal_Int32 nLen = -1,
- long nCharExtra = 0,
+ tools::Long nCharExtra = 0,
vcl::TextLayoutCache const* = nullptr,
const SalLayoutGlyphs* pGlyphs = nullptr) const;
- sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
+ sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
sal_Int32 nIndex, sal_Int32 nLen,
- long nCharExtra,
+ tools::Long nCharExtra,
vcl::TextLayoutCache const* = nullptr) const;
static std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&);
@@ -1198,23 +1198,23 @@ protected:
SAL_DLLPRIVATE void ImplInitTextLineSize();
SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
static
- SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
+ SAL_DLLPRIVATE tools::Long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, tools::Long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
SAL_DLLPRIVATE float approximate_char_width() const;
private:
SAL_DLLPRIVATE void ImplInitTextColor();
SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
- SAL_DLLPRIVATE void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
+ SAL_DLLPRIVATE void ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
- SAL_DLLPRIVATE static void ImplDrawWavePixel( long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice const * pOutDev,
- bool bDrawPixAsRect, long nPixWidth, long nPixHeight );
- SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
- SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
- SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
- SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
- SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
- SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
+ SAL_DLLPRIVATE static void ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY, tools::Long nCurX, tools::Long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice const * pOutDev,
+ bool bDrawPixAsRect, tools::Long nPixWidth, tools::Long nPixHeight );
+ SAL_DLLPRIVATE void ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nStartX, tools::Long nStartY, tools::Long nWidth, tools::Long nHeight, tools::Long nLineWidth, short nOrientation, const Color& rColor );
+ SAL_DLLPRIVATE void ImplDrawWaveTextLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
+ SAL_DLLPRIVATE void ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
+ SAL_DLLPRIVATE void ImplDrawStrikeoutLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
+ SAL_DLLPRIVATE void ImplDrawStrikeoutChar( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
+ SAL_DLLPRIVATE void ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools::Long nWidth );
///@}
@@ -1246,7 +1246,7 @@ public:
bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
- long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight );
+ tools::Long& rYOff, tools::Long& rWidth, FontEmphasisMark eEmphasis, tools::Long nHeight );
SAL_DLLPRIVATE static FontEmphasisMark
ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
@@ -1256,7 +1256,7 @@ public:
sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
- long GetMinKashida() const;
+ tools::Long GetMinKashida() const;
// i60594
// validate kashida positions against the current font
@@ -1297,12 +1297,12 @@ public:
protected:
SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
- SAL_DLLPRIVATE long GetEmphasisAscent() const { return mnEmphasisAscent; }
- SAL_DLLPRIVATE long GetEmphasisDescent() const { return mnEmphasisDescent; }
+ SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; }
+ SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const { return mnEmphasisDescent; }
SAL_DLLPRIVATE bool InitFont() const;
virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
- virtual long GetFontExtLeading() const;
+ virtual tools::Long GetFontExtLeading() const;
virtual void ImplClearFontData(bool bNewFontLists);
virtual void ImplRefreshFontData(bool bNewFontLists);
@@ -1321,9 +1321,9 @@ private:
static
SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
- long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
+ tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
- SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
+ SAL_DLLPRIVATE void ImplDrawEmphasisMark( tools::Long nBaseX, tools::Long nX, tools::Long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
///@}
@@ -1343,8 +1343,8 @@ public:
virtual bool HasMirroredGraphics() const;
std::unique_ptr<SalLayout>
ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
- const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
- const long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
+ const Point& rLogicPos = Point(0,0), tools::Long nLogicWidth=0,
+ const tools::Long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
vcl::TextLayoutCache const* = nullptr,
const SalLayoutGlyphs* pGlyphs = nullptr) const;
SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
@@ -1556,8 +1556,8 @@ private:
const Size& aOutSz,
const bool bHMirr,
const bool bVMirr,
- const long* pMapX,
- const long* pMapY );
+ const tools::Long* pMapX,
+ const tools::Long* pMapY );
SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
Bitmap& aBmp,
@@ -1568,8 +1568,8 @@ private:
const sal_Int32 nDstHeight,
const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
- const long* pMapX,
- const long* pMapY );
+ const tools::Long* pMapX,
+ const tools::Long* pMapY );
/** Retrieve downsampled and cropped bitmap
@@ -1581,8 +1581,8 @@ private:
const Point& rSrcPt,
const Size& rSrcSz,
const Bitmap& rBmp,
- long nMaxBmpDPIX,
- long nMaxBmpDPIY );
+ tools::Long nMaxBmpDPIX,
+ tools::Long nMaxBmpDPIY );
///@}
@@ -1605,7 +1605,7 @@ public:
*/
bool RemoveTransparenciesFromMetaFile(
const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
- long nMaxBmpDPIX, long nMaxBmpDPIY,
+ tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY,
bool bReduceTransparency,
bool bTransparencyAutoMode,
bool bDownsampleBitmaps,
@@ -1784,7 +1784,7 @@ public:
static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
const MapMode& rMapModeSource,
const MapMode& rMapModeDest );
- static long LogicToLogic( long nLongSource,
+ static tools::Long LogicToLogic( tools::Long nLongSource,
MapUnit eUnitSource,
MapUnit eUnitDest );
@@ -1822,9 +1822,9 @@ public:
@returns Width in units of device pixels.
*/
- SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
+ SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel( tools::Long nWidth ) const;
- SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( long nWidth ) const;
+ SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( tools::Long nWidth ) const;
/** Convert a logical X coordinate to a device pixel's X coordinate.
@@ -1837,7 +1837,7 @@ public:
@returns Device's X pixel coordinate
*/
- SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
+ SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel( tools::Long nX ) const;
/** Convert a logical Y coordinate to a device pixel's Y coordinate.
@@ -1850,7 +1850,7 @@ public:
@returns Device's Y pixel coordinate
*/
- SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
+ SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel( tools::Long nY ) const;
/** Convert a logical height to a height in units of device pixels.
@@ -1862,7 +1862,7 @@ public:
@returns Height in units of device pixels.
*/
- SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
+ SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel( tools::Long nHeight ) const;
/** Convert device pixels to a width in logical units.
@@ -1873,7 +1873,7 @@ public:
@returns Width in logical units.
*/
- SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
+ SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth( tools::Long nWidth ) const;
/** Convert device pixels to a height in logical units.
@@ -1884,7 +1884,7 @@ public:
@returns Height in logical units.
*/
- SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
+ SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight( tools::Long nHeight ) const;
/** Convert logical height to device pixels, with exact sub-pixel value.
diff --git a/include/vcl/outdevmap.hxx b/include/vcl/outdevmap.hxx
index c6494f0650a0..e195753892c7 100644
--- a/include/vcl/outdevmap.hxx
+++ b/include/vcl/outdevmap.hxx
@@ -22,20 +22,20 @@
struct ImplMapRes
{
- long mnMapOfsX; // Offset in X direction
- long mnMapOfsY; // Offset in Y direction
- long mnMapScNumX; // Scaling factor - numerator in X direction
- long mnMapScNumY; // Scaling factor - numerator in Y direction
- long mnMapScDenomX; // Scaling factor - denominator in X direction
- long mnMapScDenomY; // Scaling factor - denominator in Y direction
+ tools::Long mnMapOfsX; // Offset in X direction
+ tools::Long mnMapOfsY; // Offset in Y direction
+ tools::Long mnMapScNumX; // Scaling factor - numerator in X direction
+ tools::Long mnMapScNumY; // Scaling factor - numerator in Y direction
+ tools::Long mnMapScDenomX; // Scaling factor - denominator in X direction
+ tools::Long mnMapScDenomY; // Scaling factor - denominator in Y direction
};
struct ImplThresholdRes
{
- long mnThresLogToPixX; // Thresholds for calculation
- long mnThresLogToPixY; // with BigInts
- long mnThresPixToLogX; // ""
- long mnThresPixToLogY; // ""
+ tools::Long mnThresLogToPixX; // Thresholds for calculation
+ tools::Long mnThresLogToPixY; // with BigInts
+ tools::Long mnThresPixToLogX; // ""
+ tools::Long mnThresPixToLogY; // ""
};
#endif // INCLUDED_VCL_OUTDEVMAP_HXX
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index f635a924507b..f7010910299a 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -712,7 +712,7 @@ The following structure describes the permissions used in PDF security
void SetClipRegion();
void SetClipRegion( const basegfx::B2DPolyPolygon& rRegion );
- void MoveClipRegion( long nHorzMove, long nVertMove );
+ void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
void IntersectClipRegion( const tools::Rectangle& rRect );
void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
@@ -742,12 +742,12 @@ The following structure describes the permissions used in PDF security
/* actual drawing functions */
void DrawText( const Point& rPos, const OUString& rText );
- void DrawTextLine( const Point& rPos, long nWidth,
+ void DrawTextLine( const Point& rPos, tools::Long nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline );
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const long* pDXAry,
+ const tools::Long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen );
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index eed2722f824f..6d3adf0e00d7 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -197,7 +197,7 @@ protected:
virtual void ReleaseGraphics( bool bRelease = true ) override;
virtual void ImplReleaseFonts() override;
- virtual long GetGradientStepCount( long nMinRect ) override;
+ virtual tools::Long GetGradientStepCount( tools::Long nMinRect ) override;
virtual bool UsePolyPolygonForComplexGradient() override;
virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
const tools::PolyPolygon &rPolyPoly ) override;
@@ -385,12 +385,12 @@ public:
int nRows;
int nColumns;
Size aPaperSize;
- long nLeftMargin;
- long nTopMargin;
- long nRightMargin;
- long nBottomMargin;
- long nHorizontalSpacing;
- long nVerticalSpacing;
+ tools::Long nLeftMargin;
+ tools::Long nTopMargin;
+ tools::Long nRightMargin;
+ tools::Long nBottomMargin;
+ tools::Long nHorizontalSpacing;
+ tools::Long nVerticalSpacing;
bool bDrawBorder;
NupOrderType nOrder;
diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx
index 0c8fad891cc0..92dd9deb12df 100644
--- a/include/vcl/region.hxx
+++ b/include/vcl/region.hxx
@@ -87,7 +87,7 @@ public:
const RegionBand* GetAsRegionBand() const;
// manipulators
- void Move( long nHorzMove, long nVertMove );
+ void Move( tools::Long nHorzMove, tools::Long nVertMove );
void Scale( double fScaleX, double fScaleY );
void Union( const tools::Rectangle& rRegion );
void Intersect( const tools::Rectangle& rRegion );
diff --git a/include/vcl/salgtype.hxx b/include/vcl/salgtype.hxx
index 3c1f59512586..720c4c1d8255 100644
--- a/include/vcl/salgtype.hxx
+++ b/include/vcl/salgtype.hxx
@@ -39,25 +39,25 @@ constexpr ::Color SALCOLOR_NONE ( 0xFF, 0xFF, 0xFF, 0xFF );
// must equal to class Point
struct SalPoint
{
- long mnX;
- long mnY;
+ tools::Long mnX;
+ tools::Long mnY;
};
typedef const SalPoint* PCONSTSALPOINT;
struct SalTwoRect
{
- long mnSrcX;
- long mnSrcY;
- long mnSrcWidth;
- long mnSrcHeight;
- long mnDestX;
- long mnDestY;
- long mnDestWidth;
- long mnDestHeight;
+ tools::Long mnSrcX;
+ tools::Long mnSrcY;
+ tools::Long mnSrcWidth;
+ tools::Long mnSrcHeight;
+ tools::Long mnDestX;
+ tools::Long mnDestY;
+ tools::Long mnDestWidth;
+ tools::Long mnDestHeight;
- SalTwoRect(long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight,
- long nDestX, long nDestY, long nDestWidth, long nDestHeight)
+ SalTwoRect(tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
+ tools::Long nDestX, tools::Long nDestY, tools::Long nDestWidth, tools::Long nDestHeight)
: mnSrcX(nSrcX), mnSrcY(nSrcY), mnSrcWidth(nSrcWidth), mnSrcHeight(nSrcHeight)
, mnDestX(nDestX), mnDestY(nDestY), mnDestWidth(nDestWidth), mnDestHeight(nDestHeight)
{
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index b53331484e96..faa273b3f571 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -251,9 +251,9 @@ class VCL_DLLPUBLIC ImplControlValue
private:
ControlType mType;
ButtonValue mTristate; // Tristate value: on, off, mixed
- long mNumber; // numeric value
+ tools::Long mNumber; // numeric value
protected:
- ImplControlValue( ControlType i_eType, long i_nNumber )
+ ImplControlValue( ControlType i_eType, tools::Long i_nNumber )
: mType( i_eType )
, mTristate( ButtonValue::DontKnow )
, mNumber( i_nNumber )
@@ -262,7 +262,7 @@ class VCL_DLLPUBLIC ImplControlValue
public:
explicit ImplControlValue( ButtonValue nTristate )
: mType( ControlType::Generic ), mTristate(nTristate), mNumber(0) {}
- explicit ImplControlValue( long nNumeric )
+ explicit ImplControlValue( tools::Long nNumeric )
: mType( ControlType::Generic ), mTristate(ButtonValue::DontKnow), mNumber( nNumeric) {}
ImplControlValue()
: mType( ControlType::Generic ), mTristate(ButtonValue::DontKnow), mNumber(0) {}
@@ -281,8 +281,8 @@ class VCL_DLLPUBLIC ImplControlValue
ButtonValue getTristateVal() const { return mTristate; }
void setTristateVal( ButtonValue nTristate ) { mTristate = nTristate; }
- long getNumericVal() const { return mNumber; }
- void setNumericVal( long nNumeric ) { mNumber = nNumeric; }
+ tools::Long getNumericVal() const { return mNumber; }
+ void setNumericVal( tools::Long nNumeric ) { mNumber = nNumeric; }
};
/* ScrollbarValue:
@@ -292,10 +292,10 @@ class VCL_DLLPUBLIC ImplControlValue
class SAL_DLLPUBLIC_RTTI ScrollbarValue final : public ImplControlValue
{
public:
- long mnMin;
- long mnMax;
- long mnCur;
- long mnVisibleSize;
+ tools::Long mnMin;
+ tools::Long mnMax;
+ tools::Long mnCur;
+ tools::Long mnVisibleSize;
tools::Rectangle maThumbRect;
tools::Rectangle maButton1Rect;
tools::Rectangle maButton2Rect;
@@ -322,9 +322,9 @@ class SAL_DLLPUBLIC_RTTI ScrollbarValue final : public ImplControlValue
class SAL_DLLPUBLIC_RTTI SliderValue final : public ImplControlValue
{
public:
- long mnMin;
- long mnMax;
- long mnCur;
+ tools::Long mnMin;
+ tools::Long mnMax;
+ tools::Long mnCur;
tools::Rectangle maThumbRect;
ControlState mnThumbState;
@@ -494,7 +494,7 @@ public:
class SAL_DLLPUBLIC_RTTI MenupopupValue final : public ImplControlValue
{
public:
- MenupopupValue( long i_nGutterWidth, const tools::Rectangle& i_rItemRect )
+ MenupopupValue( tools::Long i_nGutterWidth, const tools::Rectangle& i_rItemRect )
: ImplControlValue( ControlType::MenuPopup, i_nGutterWidth )
, maItemRect( i_rItemRect )
{}
diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx
index e3474ee0ac84..47bcded8697b 100644
--- a/include/vcl/scrbar.hxx
+++ b/include/vcl/scrbar.hxx
@@ -46,18 +46,18 @@ private:
tools::Rectangle maThumbRect;
tools::Rectangle maTrackRect;
std::unique_ptr<ImplScrollBarData> mpData;
- long mnStartPos;
- long mnMouseOff;
- long mnThumbPixRange;
- long mnThumbPixPos;
- long mnThumbPixSize;
- long mnMinRange;
- long mnMaxRange;
- long mnThumbPos;
- long mnVisibleSize;
- long mnLineSize;
- long mnPageSize;
- long mnDelta;
+ tools::Long mnStartPos;
+ tools::Long mnMouseOff;
+ tools::Long mnThumbPixRange;
+ tools::Long mnThumbPixPos;
+ tools::Long mnThumbPixSize;
+ tools::Long mnMinRange;
+ tools::Long mnMaxRange;
+ tools::Long mnThumbPos;
+ tools::Long mnVisibleSize;
+ tools::Long mnLineSize;
+ tools::Long mnPageSize;
+ tools::Long mnDelta;
sal_uInt16 mnStateFlags;
ScrollType meScrollType;
bool mbCalcSize;
@@ -70,13 +70,13 @@ private:
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplUpdateRects( bool bUpdate = true );
- SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
- SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
+ SAL_DLLPRIVATE tools::Long ImplCalcThumbPos( tools::Long nPixPos );
+ SAL_DLLPRIVATE tools::Long ImplCalcThumbPosPix( tools::Long nPos );
SAL_DLLPRIVATE void ImplCalc( bool bUpdate = true );
SAL_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext);
using Window::ImplScroll;
- SAL_DLLPRIVATE long ImplScroll( long nNewPos, bool bCallEndScroll );
- SAL_DLLPRIVATE long ImplDoAction( bool bCallEndScroll );
+ SAL_DLLPRIVATE tools::Long ImplScroll( tools::Long nNewPos, bool bCallEndScroll );
+ SAL_DLLPRIVATE tools::Long ImplDoAction( bool bCallEndScroll );
SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, bool bCallAction = true );
SAL_DLLPRIVATE void ImplInvert();
SAL_DLLPRIVATE bool ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFlags);
@@ -107,27 +107,27 @@ public:
void Scroll();
virtual void EndScroll();
- long DoScroll( long nNewPos );
- long DoScrollAction( ScrollType eScrollType );
+ tools::Long DoScroll( tools::Long nNewPos );
+ tools::Long DoScrollAction( ScrollType eScrollType );
void EnableDrag() { mbFullDrag = true; }
- void SetRangeMin( long nNewRange );
- long GetRangeMin() const { return mnMinRange; }
- void SetRangeMax( long nNewRange );
- long GetRangeMax() const { return mnMaxRange; }
+ void SetRangeMin( tools::Long nNewRange );
+ tools::Long GetRangeMin() const { return mnMinRange; }
+ void SetRangeMax( tools::Long nNewRange );
+ tools::Long GetRangeMax() const { return mnMaxRange; }
void SetRange( const Range& rRange );
Range GetRange() const { return Range( GetRangeMin(), GetRangeMax() ); }
- void SetThumbPos( long nThumbPos );
- long GetThumbPos() const { return mnThumbPos; }
- void SetLineSize( long nNewSize ) { mnLineSize = nNewSize; }
- long GetLineSize() const { return mnLineSize; }
- void SetPageSize( long nNewSize ) { mnPageSize = nNewSize; }
- long GetPageSize() const { return mnPageSize; }
- void SetVisibleSize( long nNewSize );
- long GetVisibleSize() const { return mnVisibleSize; }
-
- long GetDelta() const { return mnDelta; }
+ void SetThumbPos( tools::Long nThumbPos );
+ tools::Long GetThumbPos() const { return mnThumbPos; }
+ void SetLineSize( tools::Long nNewSize ) { mnLineSize = nNewSize; }
+ tools::Long GetLineSize() const { return mnLineSize; }
+ void SetPageSize( tools::Long nNewSize ) { mnPageSize = nNewSize; }
+ tools::Long GetPageSize() const { return mnPageSize; }
+ void SetVisibleSize( tools::Long nNewSize );
+ tools::Long GetVisibleSize() const { return mnVisibleSize; }
+
+ tools::Long GetDelta() const { return mnDelta; }
ScrollType GetType() const { return meScrollType; }
void SetScrollHdl( const Link<ScrollBar*,void>& rLink ) { maScrollHdl = rLink; }
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index d6c365565e9c..30023a601ab9 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -97,17 +97,17 @@ public:
void SetDoubleClickTime( sal_uInt64 nDoubleClkTime );
sal_uInt64 GetDoubleClickTime() const;
- void SetDoubleClickWidth( long nDoubleClkWidth );
- long GetDoubleClickWidth() const;
+ void SetDoubleClickWidth( tools::Long nDoubleClkWidth );
+ tools::Long GetDoubleClickWidth() const;
- void SetDoubleClickHeight( long nDoubleClkHeight );
- long GetDoubleClickHeight() const;
+ void SetDoubleClickHeight( tools::Long nDoubleClkHeight );
+ tools::Long GetDoubleClickHeight() const;
- void SetStartDragWidth( long nDragWidth );
- long GetStartDragWidth() const;
+ void SetStartDragWidth( tools::Long nDragWidth );
+ tools::Long GetStartDragWidth() const;
- void SetStartDragHeight( long nDragHeight );
- long GetStartDragHeight() const;
+ void SetStartDragHeight( tools::Long nDragHeight );
+ tools::Long GetStartDragHeight() const;
static sal_uInt16 GetStartDragCode();
@@ -492,27 +492,27 @@ public:
void SetTabFont( const vcl::Font& rFont );
const vcl::Font& GetTabFont() const;
- static long GetBorderSize();
+ static tools::Long GetBorderSize();
- void SetTitleHeight( long nSize );
- long GetTitleHeight() const;
+ void SetTitleHeight( tools::Long nSize );
+ tools::Long GetTitleHeight() const;
- void SetFloatTitleHeight( long nSize );
- long GetFloatTitleHeight() const;
+ void SetFloatTitleHeight( tools::Long nSize );
+ tools::Long GetFloatTitleHeight() const;
- void SetScrollBarSize( long nSize );
- long GetScrollBarSize() const;
+ void SetScrollBarSize( tools::Long nSize );
+ tools::Long GetScrollBarSize() const;
- void SetMinThumbSize( long nSize );
- long GetMinThumbSize() const;
+ void SetMinThumbSize( tools::Long nSize );
+ tools::Long GetMinThumbSize() const;
- void SetSpinSize( long nSize );
- long GetSpinSize() const;
+ void SetSpinSize( tools::Long nSize );
+ tools::Long GetSpinSize() const;
- static long GetSplitSize();
+ static tools::Long GetSplitSize();
- void SetCursorSize( long nSize );
- long GetCursorSize() const;
+ void SetCursorSize( tools::Long nSize );
+ tools::Long GetCursorSize() const;
void SetCursorBlinkTime( sal_uInt64 nBlinkTime );
sal_uInt64 GetCursorBlinkTime() const;
@@ -526,7 +526,7 @@ public:
void SetDisplayOptions( DisplayOptions nOptions );
DisplayOptions GetDisplayOptions() const;
- void SetAntialiasingMinPixelHeight( long nMinPixel );
+ void SetAntialiasingMinPixelHeight( tools::Long nMinPixel );
sal_uLong GetAntialiasingMinPixelHeight() const;
void SetOptions( StyleSettingsOptions nOptions );
diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx
index fcc2fb182532..4d8624c49b2e 100644
--- a/include/vcl/split.hxx
+++ b/include/vcl/split.hxx
@@ -30,16 +30,16 @@ class VCL_DLLPUBLIC Splitter : public vcl::Window
{
private:
VclPtr<vcl::Window> mpRefWin;
- long mnSplitPos;
- long mnLastSplitPos;
- long mnStartSplitPos;
+ tools::Long mnSplitPos;
+ tools::Long mnLastSplitPos;
+ tools::Long mnStartSplitPos;
Point maDragPos;
tools::Rectangle maDragRect;
bool mbHorzSplit;
bool mbDragFull;
bool mbKbdSplitting;
bool mbInKeyEvent;
- long mnKeyboardStepSize;
+ tools::Long mnKeyboardStepSize;
Link<Splitter*,void> maStartSplitHdl;
Link<Splitter*,void> maSplitHdl;
Link<Splitter*,void> maEndSplitHdl;
@@ -85,15 +85,15 @@ public:
void SetDragRectPixel( const tools::Rectangle& rDragRect,
vcl::Window* pRefWin = nullptr );
- void SetSplitPosPixel( long nPos );
- long GetSplitPosPixel() const { return mnSplitPos; }
+ void SetSplitPosPixel( tools::Long nPos );
+ tools::Long GetSplitPosPixel() const { return mnSplitPos; }
bool IsHorizontal() const { return mbHorzSplit; }
void SetHorizontal(bool bNew);
// set the stepsize of the splitter for cursor movement
// the default is 10% of the reference window's width/height
- void SetKeyboardStepSize( long nStepSize );
+ void SetKeyboardStepSize( tools::Long nStepSize );
void SetStartSplitHdl( const Link<Splitter*,void>& rLink ) { maStartSplitHdl = rLink; }
void SetSplitHdl( const Link<Splitter*,void>& rLink ) { maSplitHdl = rLink; }
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index fcec64ef7892..c88f015a9471 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -48,18 +48,18 @@ private:
std::unique_ptr<ImplSplitSet> mpMainSet;
ImplSplitSet* mpBaseSet;
ImplSplitSet* mpSplitSet;
- long* mpLastSizes;
+ tools::Long* mpLastSizes;
tools::Rectangle maDragRect;
- long mnDX;
- long mnDY;
- long mnLeftBorder;
- long mnTopBorder;
- long mnRightBorder;
- long mnBottomBorder;
- long mnMaxSize;
- long mnMouseOff;
- long mnMStartPos;
- long mnMSplitPos;
+ tools::Long mnDX;
+ tools::Long mnDY;
+ tools::Long mnLeftBorder;
+ tools::Long mnTopBorder;
+ tools::Long mnRightBorder;
+ tools::Long mnBottomBorder;
+ tools::Long mnMaxSize;
+ tools::Long mnMouseOff;
+ tools::Long mnMStartPos;
+ tools::Long mnMSplitPos;
WinBits mnWinStyle;
WindowAlign meAlign;
sal_uInt16 mnSplitTest;
@@ -85,7 +85,7 @@ private:
SAL_DLLPRIVATE void ImplInitSettings();
SAL_DLLPRIVATE void ImplCalcLayout();
SAL_DLLPRIVATE void ImplUpdate();
- SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
+ SAL_DLLPRIVATE void ImplSetWindowSize( tools::Long nDelta );
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos );
SAL_DLLPRIVATE void ImplGetButtonRect( tools::Rectangle& rRect, bool bTest ) const;
SAL_DLLPRIVATE void ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest = false ) const;
@@ -101,10 +101,10 @@ private:
static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide,
bool bRows );
static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
+ tools::Long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
bool bRows );
static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( const SplitWindow* pWindow, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos );
+ tools::Long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos );
SAL_DLLPRIVATE void ImplDrawSplitTracking(const Point& rPos);
SplitWindow (const SplitWindow &) = delete;
@@ -130,19 +130,19 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
- void InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize,
+ void InsertItem( sal_uInt16 nId, vcl::Window* pWindow, tools::Long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
SplitWindowItemFlags nBits );
- void InsertItem( sal_uInt16 nId, long nSize,
+ void InsertItem( sal_uInt16 nId, tools::Long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
SplitWindowItemFlags nBits );
void RemoveItem( sal_uInt16 nId );
- void SplitItem( sal_uInt16 nId, long nNewSize,
+ void SplitItem( sal_uInt16 nId, tools::Long nNewSize,
bool bPropSmall,
bool bPropGreat );
- void SetItemSize( sal_uInt16 nId, long nNewSize );
- long GetItemSize( sal_uInt16 nId ) const;
+ void SetItemSize( sal_uInt16 nId, tools::Long nNewSize );
+ tools::Long GetItemSize( sal_uInt16 nId ) const;
/** Set a range that limits the (variable part of the) size with an
upper and a lower bound (both are valid values themselves.)
@param nId
@@ -154,7 +154,7 @@ public:
void SetItemSizeRange (sal_uInt16 nId, const Range& rRange);
/** Return the current size limits for the specified item.
*/
- long GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) const;
+ tools::Long GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) const;
sal_uInt16 GetSet( sal_uInt16 nId ) const;
sal_uInt16 GetItemId( vcl::Window* pWindow ) const;
sal_uInt16 GetItemId( const Point& rPos ) const;
@@ -167,13 +167,13 @@ public:
WindowAlign GetAlign() const { return meAlign; }
bool IsHorizontal() const { return mbHorz; }
- void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; }
+ void SetMaxSizePixel( tools::Long nNewMaxSize ) { mnMaxSize = nNewMaxSize; }
Size CalcLayoutSizePixel( const Size& aNewSize );
void ShowFadeInHideButton();
void ShowFadeOutButton();
- long GetFadeInSize() const;
+ tools::Long GetFadeInSize() const;
bool IsFadeNoButtonMode() const { return mbFadeNoButtonMode; }
void SetSplitHdl( const Link<SplitWindow*,void>& rLink ) { maSplitHdl = rLink; }
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index 2700e2a8e145..834fbe4bd7ba 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -34,7 +34,7 @@ class UserDrawEvent;
struct ImplStatusItem;
void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos,
- long nOffset, long nPrgsWidth, long nPrgsHeight,
+ tools::Long nOffset, tools::Long nPrgsWidth, tools::Long nPrgsHeight,
sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount,
const tools::Rectangle& rFramePosSize);
@@ -58,7 +58,7 @@ namespace o3tl
#define STATUSBAR_APPEND (sal_uInt16(0xFFFF))
#define STATUSBAR_ITEM_NOTFOUND (sal_uInt16(0xFFFF))
-#define STATUSBAR_OFFSET (long(5))
+#define STATUSBAR_OFFSET (tools::Long(5))
class VCL_DLLPUBLIC StatusBar : public vcl::Window
@@ -70,12 +70,12 @@ private:
OUString maPrgsTxt;
Point maPrgsTxtPos;
tools::Rectangle maPrgsFrameRect;
- long mnPrgsSize;
- long mnItemsWidth;
- long mnDX;
- long mnDY;
- long mnCalcHeight;
- long mnTextY;
+ tools::Long mnPrgsSize;
+ tools::Long mnItemsWidth;
+ tools::Long mnDX;
+ tools::Long mnDY;
+ tools::Long mnCalcHeight;
+ tools::Long mnTextY;
sal_uInt16 mnCurItemId;
sal_uInt16 mnPercent;
sal_uInt16 mnPercentCount;
@@ -125,7 +125,7 @@ public:
void InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
StatusBarItemBits nBits = StatusBarItemBits::Center | StatusBarItemBits::In,
- long nOffset = STATUSBAR_OFFSET,
+ tools::Long nOffset = STATUSBAR_OFFSET,
sal_uInt16 nPos = STATUSBAR_APPEND );
void RemoveItem( sal_uInt16 nItemId );
@@ -148,7 +148,7 @@ public:
sal_uLong GetItemWidth( sal_uInt16 nItemId ) const;
StatusBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
- long GetItemOffset( sal_uInt16 nItemId ) const;
+ tools::Long GetItemOffset( sal_uInt16 nItemId ) const;
/// @param nCharsWidth, if not -1, overrides the normal width calculation
void SetItemText( sal_uInt16 nItemId, const OUString& rText, int nCharsWidth = -1 );
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 16356c8b93e7..e5ecc5cb499d 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -845,7 +845,7 @@ public:
GetActiveTopWindow
*/
- static long GetTopWindowCount();
+ static tools::Long GetTopWindowCount();
/** Get the nth top window.
@@ -859,7 +859,7 @@ public:
@see GetFirstTopLevelWindow, GetNextTopLevelWindow, GetTopWindowCount,
GetActiveTopWindow
*/
- static vcl::Window* GetTopWindow( long nIndex );
+ static vcl::Window* GetTopWindow( tools::Long nIndex );
/** Get the "active" top window.
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index c4fae1adb8bc..14685c3b9d61 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_SYSDATA_HXX
#include <sal/types.h>
+#include <tools/long.hxx>
#ifdef MACOSX
// predeclare the native classes to avoid header/include problems
@@ -108,7 +109,7 @@ struct SystemParentData
#elif defined( IOS )
// Nothing
#elif defined( UNX )
- long aWindow; // the window of the object
+ tools::Long aWindow; // the window of the object
bool bXEmbedSupport:1; // decides whether the object in question
// should support the XEmbed protocol
#endif
@@ -137,7 +138,7 @@ struct SystemGraphicsData
CGContextRef rCGContext; // CoreGraphics graphic context
#elif defined( UNX )
void* pDisplay; // the relevant display connection
- long hDrawable; // a drawable
+ tools::Long hDrawable; // a drawable
void* pVisual; // the visual in use
int nScreen; // the current screen of the drawable
void* pXRenderFormat; // render format for drawable
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index f694c4d64c8e..da7620a55ce6 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -87,7 +87,7 @@ public:
SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDeferredInit; }
private:
- SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window const * i_pConfigureWin );
+ SAL_DLLPRIVATE void ImplMoveToScreen( tools::Long& io_rX, tools::Long& io_rY, tools::Long i_nWidth, tools::Long i_nHeight, vcl::Window const * i_pConfigureWin );
SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox);
DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, Timer*, void );
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index edfa86cf37f0..9369086b043b 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -52,8 +52,8 @@ class VCL_DLLPUBLIC TabControl : public Control
{
protected:
std::unique_ptr<ImplTabCtrlData> mpTabCtrlData;
- long mnLastWidth;
- long mnLastHeight;
+ tools::Long mnLastWidth;
+ tools::Long mnLastHeight;
sal_uInt16 mnActPageId;
sal_uInt16 mnCurPageId;
bool mbFormat;
@@ -67,9 +67,9 @@ protected:
SAL_DLLPRIVATE void ImplInitSettings( bool bBackground );
SAL_DLLPRIVATE ImplTabItem* ImplGetItem( sal_uInt16 nId ) const;
SAL_DLLPRIVATE ImplTabItem* ImplGetItem(const Point& rPt) const;
- SAL_DLLPRIVATE Size ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth );
- SAL_DLLPRIVATE tools::Rectangle ImplGetTabRect( sal_uInt16 nPos, long nWidth = -1, long nHeight = -1 );
- SAL_DLLPRIVATE tools::Rectangle ImplGetTabRect(const ImplTabItem*, long nWidth = -1, long nHeight = -1);
+ SAL_DLLPRIVATE Size ImplGetItemSize( ImplTabItem* pItem, tools::Long nMaxWidth );
+ SAL_DLLPRIVATE tools::Rectangle ImplGetTabRect( sal_uInt16 nPos, tools::Long nWidth = -1, tools::Long nHeight = -1 );
+ SAL_DLLPRIVATE tools::Rectangle ImplGetTabRect(const ImplTabItem*, tools::Long nWidth = -1, tools::Long nHeight = -1);
SAL_DLLPRIVATE void ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId );
SAL_DLLPRIVATE bool ImplPosCurTabPage();
virtual void ImplActivateTabPage( bool bNext );
@@ -89,7 +89,7 @@ protected:
virtual void FillLayoutData() const override;
virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const override;
virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const override;
- virtual bool ImplPlaceTabs( long nWidth );
+ virtual bool ImplPlaceTabs( tools::Long nWidth );
SAL_DLLPRIVATE Size ImplCalculateRequisition(sal_uInt16& nHeaderHeight) const;
public:
@@ -169,12 +169,12 @@ public:
// returns (control relative) bounding rectangle for the
// character at index nIndex relative to the text of page nPageId
using Control::GetCharacterBounds;
- tools::Rectangle GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const;
+ tools::Rectangle GetCharacterBounds( sal_uInt16 nPageId, tools::Long nIndex ) const;
// returns the index relative to the text of page nPageId (also returned)
// at position rPoint (control relative)
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const;
+ tools::Long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const;
// returns the rectangle of the tab for page nPageId
tools::Rectangle GetTabBounds( sal_uInt16 nPageId ) const;
@@ -215,7 +215,7 @@ public:
static sal_uInt16 GetHeaderHeight();
protected:
- virtual bool ImplPlaceTabs( long nWidth ) override;
+ virtual bool ImplPlaceTabs( tools::Long nWidth ) override;
virtual void ImplActivateTabPage( bool bNext ) override;
private:
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index a7042407dcbf..7ad2a7e85b91 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -105,11 +105,11 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster
Color maTextColor;
sal_Int32 mnMaxTextLen;
- long mnMaxTextWidth;
- long mnCharHeight;
- long mnCurTextWidth;
- long mnCurTextHeight;
- long mnDefTab;
+ tools::Long mnMaxTextWidth;
+ tools::Long mnCharHeight;
+ tools::Long mnCurTextWidth;
+ tools::Long mnCurTextHeight;
+ tools::Long mnDefTab;
TxtAlign meAlign;
@@ -159,7 +159,7 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster
bool CreateLines( sal_uInt32 nPara );
void CreateAndInsertEmptyLine( sal_uInt32 nPara );
- void ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, long nRemainingWidth );
+ void ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, tools::Long nRemainingWidth );
std::size_t SplitTextPortion( sal_uInt32 nPara, sal_Int32 nPos );
void CreateTextPortions( sal_uInt32 nPara, sal_Int32 nStartPos );
void RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_Int32 nNewChars );
@@ -175,20 +175,20 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster
bool IsFormatted() const { return mbFormatted; }
- sal_Int32 GetCharPos( sal_uInt32 nPara, std::vector<TextLine>::size_type nLine, long nDocPosX );
+ sal_Int32 GetCharPos( sal_uInt32 nPara, std::vector<TextLine>::size_type nLine, tools::Long nDocPosX );
tools::Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false );
sal_Int32 ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara );
- long ImpGetPortionXOffset( sal_uInt32 nPara, TextLine const * pLine, std::size_t nTextPortion );
- long ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false );
- long ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 );
+ tools::Long ImpGetPortionXOffset( sal_uInt32 nPara, TextLine const * pLine, std::size_t nTextPortion );
+ tools::Long ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false );
+ tools::Long ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 );
bool ImpGetRightToLeft( sal_uInt32 nPara, sal_Int32 nPos );
static void ImpInitLayoutMode( OutputDevice* pOutDev );
TxtAlign ImpGetAlign() const;
- long CalcTextHeight();
- long CalcParaHeight( sal_uInt32 nParagraph ) const;
- long CalcTextWidth( sal_uInt32 nPara );
- long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen);
+ tools::Long CalcTextHeight();
+ tools::Long CalcParaHeight( sal_uInt32 nParagraph ) const;
+ tools::Long CalcTextWidth( sal_uInt32 nPara );
+ tools::Long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen);
Range GetInvalidYOffsets( sal_uInt32 nPortion );
// for Undo/Redo
@@ -233,17 +233,17 @@ public:
void SetMaxTextLen( sal_Int32 nLen );
sal_Int32 GetMaxTextLen() const { return mnMaxTextLen; }
- void SetMaxTextWidth( long nWidth );
- long GetMaxTextWidth() const { return mnMaxTextWidth; }
+ void SetMaxTextWidth( tools::Long nWidth );
+ tools::Long GetMaxTextWidth() const { return mnMaxTextWidth; }
- long GetTextHeight() const;
- long CalcTextWidth();
- long GetCharHeight() const { return mnCharHeight; }
+ tools::Long GetTextHeight() const;
+ tools::Long CalcTextWidth();
+ tools::Long GetCharHeight() const { return mnCharHeight; }
sal_uInt32 GetParagraphCount() const;
OUString GetText( sal_uInt32 nParagraph ) const;
sal_Int32 GetTextLen( sal_uInt32 nParagraph ) const;
- long GetTextHeight( sal_uInt32 nParagraph ) const;
+ tools::Long GetTextHeight( sal_uInt32 nParagraph ) const;
void GetTextPortionRange(const TextPaM& rPaM, sal_Int32& nStart, sal_Int32& nEnd);
diff --git a/include/vcl/textrectinfo.hxx b/include/vcl/textrectinfo.hxx
index c13d65e80362..3802187b5e35 100644
--- a/include/vcl/textrectinfo.hxx
+++ b/include/vcl/textrectinfo.hxx
@@ -28,14 +28,14 @@ class VCL_DLLPUBLIC TextRectInfo
friend class ::OutputDevice;
private:
- long mnMaxWidth;
+ tools::Long mnMaxWidth;
sal_uInt16 mnLineCount;
bool mbEllipsis;
public:
TextRectInfo();
- long GetMaxLineWidth() const { return mnMaxWidth; }
+ tools::Long GetMaxLineWidth() const { return mnMaxWidth; }
bool IsEllipses() const { return mbEllipsis; }
bool operator ==( const TextRectInfo& rInfo ) const
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index bf0ea21ec1f4..d913dfd99c0a 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -128,7 +128,7 @@ public:
vcl::Window* GetWindow() const;
void Invalidate();
- void Scroll( long nHorzScroll, long nVertScroll );
+ void Scroll( tools::Long nHorzScroll, tools::Long nVertScroll );
void ShowCursor( bool bGotoCursor = true, bool bForceVisCursor = true );
void HideCursor();
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 8383662129f8..8a5b9d2f502b 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -91,8 +91,8 @@ public:
private:
struct ImplToolSize
{
- long mnWidth;
- long mnHeight;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
ImplToolItems::size_type mnLines;
};
@@ -103,18 +103,18 @@ private:
tools::Rectangle maLowerRect;
tools::Rectangle maPaintRect;
VclPtr<FloatingWindow> mpFloatWin;
- long mnDX;
- long mnDY;
- long mnMaxItemWidth; // max item width
- long mnMaxItemHeight; // max item height (for standard items)
- long mnWinHeight; // max window height (for window items)
- long mnLeftBorder; // inner border
- long mnTopBorder;
- long mnRightBorder;
- long mnBottomBorder;
- long mnLastResizeDY;
- long mnActivateCount;
- long mnImagesRotationAngle;
+ tools::Long mnDX;
+ tools::Long mnDY;
+ tools::Long mnMaxItemWidth; // max item width
+ tools::Long mnMaxItemHeight; // max item height (for standard items)
+ tools::Long mnWinHeight; // max window height (for window items)
+ tools::Long mnLeftBorder; // inner border
+ tools::Long mnTopBorder;
+ tools::Long mnRightBorder;
+ tools::Long mnBottomBorder;
+ tools::Long mnLastResizeDY;
+ tools::Long mnActivateCount;
+ tools::Long mnImagesRotationAngle;
sal_uInt16 mnLastFocusItemId;
sal_uInt16 mnOutStyle;
sal_uInt16 mnHighItemId;
@@ -177,7 +177,7 @@ private:
SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
SAL_DLLPRIVATE ImplToolItem* ImplGetItem( sal_uInt16 nId ) const;
SAL_DLLPRIVATE bool ImplCalcItem();
- SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz ) const;
+ SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcBreaks( tools::Long nWidth, tools::Long* pMaxLineWidth, bool bCalcHorz ) const;
SAL_DLLPRIVATE void ImplFormat( bool bResize = false );
SAL_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const tools::Rectangle& rRect);
@@ -221,8 +221,8 @@ public:
static SAL_DLLPRIVATE int ImplGetDragWidth( const vcl::RenderContext& rRenderContext,
bool bHorz );
SAL_DLLPRIVATE void ImplUpdateDragArea() const;
- SAL_DLLPRIVATE void ImplCalcBorder( WindowAlign eAlign, long& rLeft, long& rTop,
- long& rRight, long& rBottom ) const;
+ SAL_DLLPRIVATE void ImplCalcBorder( WindowAlign eAlign, tools::Long& rLeft, tools::Long& rTop,
+ tools::Long& rRight, tools::Long& rBottom ) const;
SAL_DLLPRIVATE void ImplCheckUpdate();
static SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext,
const tools::Rectangle &aDragArea, int nDragWidth,
@@ -244,7 +244,7 @@ public:
SAL_DLLPRIVATE Size ImplCalcFloatSize( ImplToolItems::size_type& rLines );
SAL_DLLPRIVATE void ImplCalcMinMaxFloatSize( Size& rMinSize, Size& rMaxSize );
SAL_DLLPRIVATE void ImplSetMinMaxFloatSize();
- SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcLines( long nToolSize ) const;
+ SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcLines( tools::Long nToolSize ) const;
SAL_DLLPRIVATE sal_uInt16 ImplTestLineSize( const Point& rPos ) const;
SAL_DLLPRIVATE void ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode );
SAL_DLLPRIVATE static ImplToolItems::size_type ImplFindItemPos( const ImplToolItem* pItem, const ImplToolItems& rList );
@@ -369,7 +369,7 @@ public:
void* GetItemData( sal_uInt16 nItemId ) const;
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
Image GetItemImage( sal_uInt16 nItemId ) const;
- void SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 );
+ void SetItemImageAngle( sal_uInt16 nItemId, tools::Long nAngle10 );
void SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror );
void SetItemText( sal_uInt16 nItemId, const OUString& rText );
const OUString& GetItemText( sal_uInt16 nItemId ) const;
@@ -493,10 +493,10 @@ public:
// returns the bounding box for the character at index nIndex
// where nIndex is relative to the starting index of the item
// with id nItemId (in coordinates of the displaying window)
- tools::Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex );
+ tools::Rectangle GetCharacterBounds( sal_uInt16 nItemId, tools::Long nIndex );
// -1 is returned if no character is at that point
// if an index is found the corresponding item id is filled in (else 0)
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID );
+ tools::Long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID );
static Size GetDefaultImageSize(ToolBoxButtonSize eToolBoxButtonSize);
Size GetDefaultImageSize() const;
diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx
index 49748cdc73d9..4e0149ac0845 100644
--- a/include/vcl/toolkit/button.hxx
+++ b/include/vcl/toolkit/button.hxx
@@ -95,7 +95,7 @@ private:
const Size& rImageSize, tools::Rectangle& rStateRect,
tools::Rectangle& rMouseRect );
SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext& rRenderContext );
- SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
+ SAL_DLLPRIVATE tools::Long ImplGetImageToTextDistance() const;
SAL_DLLPRIVATE Size ImplGetCheckImageSize() const;
CheckBox(const CheckBox &) = delete;
@@ -152,7 +152,7 @@ public:
static Image GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFlags );
- Size CalcMinimumSize( long nMaxWidth = 0 ) const;
+ Size CalcMinimumSize( tools::Long nMaxWidth = 0 ) const;
virtual Size GetOptimalSize() const override;
void SetToggleHdl( const Link<CheckBox&,void>& rLink ) { maToggleHdl = rLink; }
diff --git a/include/vcl/toolkit/combobox.hxx b/include/vcl/toolkit/combobox.hxx
index 172963beb33b..dc21395d7f68 100644
--- a/include/vcl/toolkit/combobox.hxx
+++ b/include/vcl/toolkit/combobox.hxx
@@ -46,7 +46,7 @@ protected:
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplCalcEditHeight();
- SAL_DLLPRIVATE long getMaxWidthScrollBarAndDownButton() const;
+ SAL_DLLPRIVATE tools::Long getMaxWidthScrollBarAndDownButton() const;
protected:
bool IsDropDownBox() const;
@@ -71,7 +71,7 @@ public:
virtual const Wallpaper& GetDisplayBackground() const override;
- virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override;
+ virtual void setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override;
tools::Rectangle GetDropDownPosSizePixel() const;
@@ -176,13 +176,13 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
+ tools::Long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
void setMaxWidthChars(sal_Int32 nWidth);
void SetWidthInChars(sal_Int32 nWidthInChars);
- long GetDropDownEntryHeight() const;
+ tools::Long GetDropDownEntryHeight() const;
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
diff --git a/include/vcl/toolkit/controllayout.hxx b/include/vcl/toolkit/controllayout.hxx
index ffd643f640ee..53ffeab4b32c 100644
--- a/include/vcl/toolkit/controllayout.hxx
+++ b/include/vcl/toolkit/controllayout.hxx
@@ -50,15 +50,15 @@ struct VCL_DLLPUBLIC ControlLayoutData
ControlLayoutData();
~ControlLayoutData();
- tools::Rectangle GetCharacterBounds( long nIndex ) const;
+ tools::Rectangle GetCharacterBounds( tools::Long nIndex ) const;
// returns the character index for corresponding to rPoint (in control coordinates)
// -1 is returned if no character is at that point
- long GetIndexForPoint( const Point& rPoint ) const;
+ tools::Long GetIndexForPoint( const Point& rPoint ) const;
// returns the number of lines in the result of GetDisplayText()
- long GetLineCount() const;
+ tools::Long GetLineCount() const;
// returns the interval [start,end] of line nLine
// returns [-1,-1] for an invalid line
- ::Pair GetLineStartEnd( long nLine ) const;
+ ::Pair GetLineStartEnd( tools::Long nLine ) const;
/** ToRelativeLineIndex changes a layout data index to a count relative to its line.
This is equivalent to getting the line start/end pairs with
@@ -71,7 +71,7 @@ struct VCL_DLLPUBLIC ControlLayoutData
the relative index inside the displayed line or -1 if the absolute index does
not match any line
*/
- long ToRelativeLineIndex( long nIndex ) const;
+ tools::Long ToRelativeLineIndex( tools::Long nIndex ) const;
};
} // namespace vcl
diff --git a/include/vcl/toolkit/dialog.hxx b/include/vcl/toolkit/dialog.hxx
index c663f21a2e03..3c519d0a5004 100644
--- a/include/vcl/toolkit/dialog.hxx
+++ b/include/vcl/toolkit/dialog.hxx
@@ -49,7 +49,7 @@ public:
private:
std::unique_ptr<DialogImpl> mpDialogImpl;
- long mnMousePositioned;
+ tools::Long mnMousePositioned;
bool mbInExecute;
bool mbInSyncExecute;
bool mbInClose;
@@ -134,7 +134,7 @@ public:
// Dialog::Execute replacement API
- void EndDialog( long nResult = RET_CANCEL );
+ void EndDialog( tools::Long nResult = RET_CANCEL );
void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
diff --git a/include/vcl/toolkit/edit.hxx b/include/vcl/toolkit/edit.hxx
index c2a6f305fb2a..99631d3a3dea 100644
--- a/include/vcl/toolkit/edit.hxx
+++ b/include/vcl/toolkit/edit.hxx
@@ -63,7 +63,7 @@ private:
OUString maPlaceholderText;
OUString maSaveValue;
OUString maUndoText;
- long mnXOffset;
+ tools::Long mnXOffset;
Selection maSelection;
sal_uInt16 mnAlign;
sal_Int32 mnMaxTextLen;
@@ -95,7 +95,7 @@ private:
SAL_DLLPRIVATE void ImplSetText( const OUString& rStr, const Selection* pNewSelection );
SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = nullptr, bool bIsUserInput = false );
SAL_DLLPRIVATE static OUString ImplGetValidString( const OUString& rString );
- SAL_DLLPRIVATE void ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, long nXStart, long nXEnd);
+ SAL_DLLPRIVATE void ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, tools::Long nXStart, tools::Long nXEnd);
SAL_DLLPRIVATE void ImplPaintBorder(vcl::RenderContext const & rRenderContext);
SAL_DLLPRIVATE void ImplShowCursor( bool bOnlyIfVisible = true );
SAL_DLLPRIVATE void ImplAlign();
@@ -108,7 +108,7 @@ private:
SAL_DLLPRIVATE void ImplCopyToSelectionClipboard();
SAL_DLLPRIVATE void ImplCopy(css::uno::Reference<css::datatransfer::clipboard::XClipboard> const & rxClipboard);
SAL_DLLPRIVATE void ImplPaste(css::uno::Reference<css::datatransfer::clipboard::XClipboard> const & rxClipboard);
- SAL_DLLPRIVATE long ImplGetTextYPosition() const;
+ SAL_DLLPRIVATE tools::Long ImplGetTextYPosition() const;
SAL_DLLPRIVATE css::uno::Reference<css::i18n::XExtendedInputSequenceChecker> const& ImplGetInputSequenceChecker();
SAL_DLLPRIVATE css::uno::Reference<css::i18n::XBreakIterator> const& ImplGetBreakIterator();
SAL_DLLPRIVATE void filterText();
@@ -120,8 +120,8 @@ protected:
SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplSetSelection( const Selection& rSelection, bool bPaint = true );
SAL_DLLPRIVATE ControlType ImplGetNativeControlType() const;
- SAL_DLLPRIVATE long ImplGetExtraXOffset() const;
- SAL_DLLPRIVATE long ImplGetExtraYOffset() const;
+ SAL_DLLPRIVATE tools::Long ImplGetExtraXOffset() const;
+ SAL_DLLPRIVATE tools::Long ImplGetExtraYOffset() const;
static SAL_DLLPRIVATE void ImplInvalidateOutermostBorder( vcl::Window* pWin );
css::uno::Reference<css::datatransfer::dnd::XDragSourceListener > mxDnDListener;
diff --git a/include/vcl/toolkit/fixedhyper.hxx b/include/vcl/toolkit/fixedhyper.hxx
index cb4e6bae2957..75516984bce0 100644
--- a/include/vcl/toolkit/fixedhyper.hxx
+++ b/include/vcl/toolkit/fixedhyper.hxx
@@ -31,7 +31,7 @@
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) FixedHyperlink final : public FixedText
{
private:
- long m_nTextLen;
+ tools::Long m_nTextLen;
PointerStyle m_aOldPointer;
Link<FixedHyperlink&,void> m_aClickHdl;
OUString m_sURL;
diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx
index 67efcf09da34..f4c50b48c84d 100644
--- a/include/vcl/toolkit/ivctrl.hxx
+++ b/include/vcl/toolkit/ivctrl.hxx
@@ -126,15 +126,15 @@ public:
class SvxIconChoiceCtrlColumnInfo
{
- long nWidth;
+ tools::Long nWidth;
public:
SvxIconChoiceCtrlColumnInfo() :
nWidth( 100 ) {}
SvxIconChoiceCtrlColumnInfo( const SvxIconChoiceCtrlColumnInfo& );
- void SetWidth( long nWd ) { nWidth = nWd; }
- long GetWidth() const { return nWidth; }
+ void SetWidth( tools::Long nWd ) { nWidth = nWd; }
+ tools::Long GetWidth() const { return nWidth; }
};
diff --git a/include/vcl/toolkit/lstbox.hxx b/include/vcl/toolkit/lstbox.hxx
index 01f76b58a3bd..fe67d90569cf 100644
--- a/include/vcl/toolkit/lstbox.hxx
+++ b/include/vcl/toolkit/lstbox.hxx
@@ -138,8 +138,8 @@ public:
virtual const Wallpaper& GetDisplayBackground() const override;
- virtual void setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override;
+ virtual void setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override;
tools::Rectangle GetDropDownPosSizePixel() const;
@@ -246,7 +246,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
+ tools::Long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
void setMaxWidthChars(sal_Int32 nWidth);
diff --git a/include/vcl/toolkit/prgsbar.hxx b/include/vcl/toolkit/prgsbar.hxx
index 7f248b19a210..3c0e121b0b0e 100644
--- a/include/vcl/toolkit/prgsbar.hxx
+++ b/include/vcl/toolkit/prgsbar.hxx
@@ -55,8 +55,8 @@ class UNLESS_MERGELIBS(VCL_DLLPUBLIC) ProgressBar final : public vcl::Window
{
private:
Point maPos;
- long mnPrgsWidth;
- long mnPrgsHeight;
+ tools::Long mnPrgsWidth;
+ tools::Long mnPrgsHeight;
sal_uInt16 mnPercent;
sal_uInt16 mnPercentCount;
bool mbCalcNew;
diff --git a/include/vcl/toolkit/spin.hxx b/include/vcl/toolkit/spin.hxx
index cc68f9d87e4c..6b152bbc16f8 100644
--- a/include/vcl/toolkit/spin.hxx
+++ b/include/vcl/toolkit/spin.hxx
@@ -43,10 +43,10 @@ private:
bool mbInitialDown : 1;
bool mbHorz : 1;
bool mbUpperIsFocused : 1;
- long mnMinRange;
- long mnMaxRange;
- long mnValue;
- long mnValueStep;
+ tools::Long mnMinRange;
+ tools::Long mnMaxRange;
+ tools::Long mnValue;
+ tools::Long mnValueStep;
SAL_DLLPRIVATE tools::Rectangle* ImplFindPartRect( const Point& rPt );
using Window::ImplInit;
@@ -70,15 +70,15 @@ public:
virtual void GetFocus() override;
virtual void LoseFocus() override;
- void SetRangeMin( long nNewRange );
- long GetRangeMin() const { return mnMinRange; }
- void SetRangeMax( long nNewRange );
- long GetRangeMax() const { return mnMaxRange; }
+ void SetRangeMin( tools::Long nNewRange );
+ tools::Long GetRangeMin() const { return mnMinRange; }
+ void SetRangeMax( tools::Long nNewRange );
+ tools::Long GetRangeMax() const { return mnMaxRange; }
void SetRange( const Range& rRange );
- void SetValue( long nValue );
- long GetValue() const { return mnValue; }
- void SetValueStep( long nNewStep ) { mnValueStep = nNewStep; }
- long GetValueStep() const { return mnValueStep; }
+ void SetValue( tools::Long nValue );
+ tools::Long GetValue() const { return mnValue; }
+ void SetValueStep( tools::Long nNewStep ) { mnValueStep = nNewStep; }
+ tools::Long GetValueStep() const { return mnValueStep; }
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
private:
diff --git a/include/vcl/toolkit/svlbitm.hxx b/include/vcl/toolkit/svlbitm.hxx
index fa36fe88f9f6..ccb0f64301e5 100644
--- a/include/vcl/toolkit/svlbitm.hxx
+++ b/include/vcl/toolkit/svlbitm.hxx
@@ -63,8 +63,8 @@ class VCL_DLLPUBLIC SvLBoxButtonData
{
private:
Link<SvLBoxButtonData*,void> aLink;
- long nWidth;
- long nHeight;
+ tools::Long nWidth;
+ tools::Long nHeight;
std::unique_ptr<SvLBoxButtonData_Impl> pImpl;
bool bDataOk;
std::vector<Image> aBmps; // indices s. constants BMP_...
@@ -78,8 +78,8 @@ public:
~SvLBoxButtonData();
static SvBmp GetIndex( SvItemStateFlags nItemState );
- long Width();
- long Height();
+ tools::Long Width();
+ tools::Long Height();
void SetLink( const Link<SvLBoxButtonData*,void>& rLink) { aLink=rLink; }
bool IsRadio() const;
// as buttons are not derived from LinkHdl
diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx
index e73cbc47c1e2..c1545c3a7c60 100644
--- a/include/vcl/toolkit/svtabbx.hxx
+++ b/include/vcl/toolkit/svtabbx.hxx
@@ -58,9 +58,9 @@ public:
SvTabListBox( vcl::Window* pParent, WinBits );
virtual ~SvTabListBox() override;
virtual void dispose() override;
- void SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit = MapUnit::MapAppFont);
+ void SetTabs(sal_uInt16 nTabs, tools::Long const pTabPositions[], MapUnit = MapUnit::MapAppFont);
using SvTreeListBox::GetTab;
- long GetLogicTab( sal_uInt16 nTab );
+ tools::Long GetLogicTab( sal_uInt16 nTab );
virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = nullptr,
bool bChildrenOnDemand = false,
@@ -133,10 +133,10 @@ public:
// Accessible -------------------------------------------------------------
- bool IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriState& _rState );
+ bool IsCellCheckBox( tools::Long _nRow, sal_uInt16 _nColumn, TriState& _rState );
/** @return The count of the rows. */
- virtual long GetRowCount() const override;
+ virtual tools::Long GetRowCount() const override;
/** @return The count of the columns. */
virtual sal_uInt16 GetColumnCount() const override;
@@ -160,19 +160,19 @@ public:
virtual void SetNoSelection() override;
using SvTabListBox::SelectAll;
virtual void SelectAll() override;
- virtual void SelectRow( long _nRow, bool _bSelect = true, bool bExpand = true ) override;
+ virtual void SelectRow( tools::Long _nRow, bool _bSelect = true, bool bExpand = true ) override;
virtual void SelectColumn( sal_uInt16 _nColumn, bool _bSelect = true ) override;
virtual sal_Int32 GetSelectedRowCount() const override;
virtual sal_Int32 GetSelectedColumnCount() const override;
/** @return <TRUE/>, if the row is selected. */
- virtual bool IsRowSelected( long _nRow ) const override;
- virtual bool IsColumnSelected( long _nColumn ) const override;
+ virtual bool IsRowSelected( tools::Long _nRow ) const override;
+ virtual bool IsColumnSelected( tools::Long _nColumn ) const override;
virtual void GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const override;
virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const override;
/** @return <TRUE/>, if the cell is visible. */
virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override;
- virtual OUString GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const override;
+ virtual OUString GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const override;
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) override;
virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) override;
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx
index 3ef56b39d67c..379401ac7ea5 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -102,19 +102,19 @@ enum class SvLBoxItemType {String, Button, ContextBmp};
class SvLBoxTab
{
- long nPos;
+ tools::Long nPos;
public:
SvLBoxTab();
- SvLBoxTab( long nPos, SvLBoxTabFlags nFlags );
+ SvLBoxTab( tools::Long nPos, SvLBoxTabFlags nFlags );
SvLBoxTab( const SvLBoxTab& );
~SvLBoxTab();
SvLBoxTabFlags nFlags;
bool IsDynamic() const { return bool(nFlags & SvLBoxTabFlags::DYNAMIC); }
- void SetPos( long nNewPos) { nPos = nNewPos; }
- long GetPos() const { return nPos; }
- long CalcOffset( long nItemLength, long nTabWidth );
+ void SetPos( tools::Long nNewPos) { nPos = nNewPos; }
+ tools::Long GetPos() const { return nPos; }
+ tools::Long CalcOffset( tools::Long nItemLength, tools::Long nTabWidth );
bool IsEditable() const { return bool(nFlags & SvLBoxTabFlags::EDITABLE); }
};
@@ -214,7 +214,7 @@ class VCL_DLLPUBLIC SvTreeListBox
short nFocusWidth;
sal_uInt16 nFirstSelTab;
sal_uInt16 nLastSelTab;
- long mnCheckboxItemWidth;
+ tools::Long mnCheckboxItemWidth;
bool mbContextBmpExpanded;
bool mbAlternatingRowColors;
bool mbUpdateAlternatingRows;
@@ -475,10 +475,10 @@ protected:
VCL_DLLPRIVATE void AdjustEntryHeight();
VCL_DLLPRIVATE void ImpEntryInserted( SvTreeListEntry* pEntry );
- VCL_DLLPRIVATE void PaintEntry1( SvTreeListEntry&, long nLine, vcl::RenderContext& rRenderContext );
+ VCL_DLLPRIVATE void PaintEntry1( SvTreeListEntry&, tools::Long nLine, vcl::RenderContext& rRenderContext );
VCL_DLLPRIVATE void InitTreeView();
- VCL_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvTreeListEntry*, long nX, SvLBoxTab** ppTab );
+ VCL_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvTreeListEntry*, tools::Long nX, SvLBoxTab** ppTab );
VCL_DLLPRIVATE void ImplInitStyle();
void SetupDragOrigin();
@@ -489,7 +489,7 @@ protected:
// Recalculate all tabs depending on TreeListStyle and Bitmap sizes
// Is called automatically when inserting/changing Bitmaps, changing the Model etc.
virtual void SetTabs();
- void AddTab( long nPos, SvLBoxTabFlags nFlags );
+ void AddTab( tools::Long nPos, SvLBoxTabFlags nFlags );
sal_uInt16 TabCount() const { return aTabs.size(); }
SvLBoxTab* GetFirstDynamicTab() const;
SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos ) const;
@@ -502,7 +502,7 @@ protected:
void NotifyScrolled();
void SetScrolledHdl( const Link<SvTreeListBox*,void>& rLink ) { aScrolledHdl = rLink; }
- long GetXOffset() const { return GetMapMode().GetOrigin().X(); }
+ tools::Long GetXOffset() const { return GetMapMode().GetOrigin().X(); }
virtual void Command( const CommandEvent& rCEvt ) override;
@@ -629,12 +629,12 @@ public:
SvTreeListEntry* GetEntry( const Point& rPos, bool bHit = false ) const;
- virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, long nLine );
+ virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, tools::Long nLine );
// Respects indentation
sal_IntPtr GetTabPos(const SvTreeListEntry*, const SvLBoxTab*);
void InvalidateEntry( SvTreeListEntry* );
- SvLBoxItem* GetItem( SvTreeListEntry*, long nX, SvLBoxTab** ppTab);
- SvLBoxItem* GetItem( SvTreeListEntry*, long nX );
+ SvLBoxItem* GetItem( SvTreeListEntry*, tools::Long nX, SvLBoxTab** ppTab);
+ SvLBoxItem* GetItem( SvTreeListEntry*, tools::Long nX );
void SetDragDropMode( DragDropMode );
void SetSelectionMode( SelectionMode );
@@ -662,9 +662,9 @@ public:
SvTreeListEntry* GetFirstEntryInView() const;
SvTreeListEntry* GetNextEntryInView(SvTreeListEntry*) const;
- void ScrollToAbsPos( long nPos );
+ void ScrollToAbsPos( tools::Long nPos );
- long getPreferredDimensions(std::vector<long> &rWidths) const;
+ tools::Long getPreferredDimensions(std::vector<long> &rWidths) const;
virtual Size GetOptimalSize() const override;
diff --git a/include/vcl/toolkit/vclmedit.hxx b/include/vcl/toolkit/vclmedit.hxx
index 8a0088ab156d..e5e32244c32b 100644
--- a/include/vcl/toolkit/vclmedit.hxx
+++ b/include/vcl/toolkit/vclmedit.hxx
@@ -118,7 +118,7 @@ public:
virtual void SetMaxTextLen(sal_Int32 nMaxLen) override;
virtual sal_Int32 GetMaxTextLen() const override;
- void SetMaxTextWidth(long nMaxWidth);
+ void SetMaxTextWidth(tools::Long nMaxWidth);
virtual void SetSelection( const Selection& rSelection ) override;
virtual const Selection& GetSelection() const override;
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index 1d6aa9f174f5..ea8da12b7a9d 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -84,7 +84,7 @@ public:
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const = 0;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const = 0;
virtual DeviceCoordinate GetTextWidth() const { return FillDXArray( nullptr ); }
- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const = 0;
+ virtual void GetCaretPositions( int nArraySize, tools::Long* pCaretXArray ) const = 0;
virtual bool IsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594
// methods using glyph indexing
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 0268e49a1b1e..b13a2a0d9ef8 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -55,7 +55,7 @@ private:
RefDevMode meRefDevMode;
bool mbForceZeroExtleadBug;
- SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, const SystemGraphicsData *pData = nullptr );
+ SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData = nullptr );
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
sal_uInt8* pBuffer );
SAL_DLLPRIVATE bool ImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
@@ -185,7 +185,7 @@ private:
protected:
virtual bool UsePolyPolygonForComplexGradient() override;
- virtual long GetFontExtLeading() const override;
+ virtual tools::Long GetFontExtLeading() const override;
};
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index bb2d7355b0d8..48b7f1137f69 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -473,7 +473,7 @@ public:
static void DrawSelectionBackground(vcl::RenderContext& rRenderContext, vcl::Window const & rWindow,
const tools::Rectangle& rRect, sal_uInt16 nHighlight,
bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly,
- Color* pSelectionTextColor = nullptr, long nCornerRadius = 0,
+ Color* pSelectionTextColor = nullptr, tools::Long nCornerRadius = 0,
Color const * pPaintColor = nullptr);
};
@@ -581,7 +581,7 @@ public:
SAL_DLLPRIVATE void ImplMirrorFramePos( Point &pt ) const;
- SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags );
+ SAL_DLLPRIVATE void ImplPosSizeWindow( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags );
SAL_DLLPRIVATE void ImplCallResize();
SAL_DLLPRIVATE void ImplCallMove();
@@ -603,8 +603,8 @@ protected:
SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( vcl::Region& rRegion );
SAL_DLLPRIVATE void ImplValidateFrameRegion( const vcl::Region* rRegion, ValidateFlags nFlags );
SAL_DLLPRIVATE void ImplValidate();
- SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
- SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
+ SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const tools::Rectangle& rRect, tools::Long nHorzScroll, tools::Long nVertScroll, bool bChildren );
+ SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect, tools::Long nHorzScroll, tools::Long nVertScroll, bool bChildren );
SAL_DLLPRIVATE vcl::Window* ImplGetBorderWindow() const;
@@ -614,7 +614,7 @@ protected:
SAL_DLLPRIVATE void ImplSetMouseTransparent( bool bTransparent );
- SAL_DLLPRIVATE void ImplScroll( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, ScrollFlags nFlags );
+ SAL_DLLPRIVATE void ImplScroll( const tools::Rectangle& rRect, tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags );
SAL_DLLPRIVATE bool ImplSetClipFlagChildren( bool bSysObjOnlySmaller );
SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller = false );
@@ -718,7 +718,7 @@ private:
SAL_DLLPRIVATE static void ImplHandleScroll(ScrollBar* pHScrl, double nX, ScrollBar* pVScrl, double nY);
SAL_DLLPRIVATE tools::Rectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle& rRect ) const;
- SAL_DLLPRIVATE long ImplGetUnmirroredOutOffX();
+ SAL_DLLPRIVATE tools::Long ImplGetUnmirroredOutOffX();
// retrieves the list of owner draw decorated windows for this window hierarchy
SAL_DLLPRIVATE ::std::vector<VclPtr<vcl::Window> >& ImplGetOwnerDrawList();
@@ -858,7 +858,7 @@ public:
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
Size CalcWindowSize( const Size& rOutSz ) const;
Size CalcOutputSize( const Size& rWinSz ) const;
- long CalcTitleWidth() const;
+ tools::Long CalcTitleWidth() const;
void EnableClipSiblings( bool bClipSiblings = true );
@@ -886,11 +886,11 @@ public:
const InputContext& GetInputContext() const;
void PostExtTextInputEvent(VclEventId nType, const OUString& rText);
void EndExtTextInput();
- void SetCursorRect( const tools::Rectangle* pRect = nullptr, long nExtTextInputWidth = 0 );
+ void SetCursorRect( const tools::Rectangle* pRect = nullptr, tools::Long nExtTextInputWidth = 0 );
const tools::Rectangle* GetCursorRect() const;
- long GetCursorExtTextInputWidth() const;
+ tools::Long GetCursorExtTextInputWidth() const;
- void SetCompositionCharRect( const tools::Rectangle* pRect, long nCompositionLength, bool bVertical = false );
+ void SetCompositionCharRect( const tools::Rectangle* pRect, tools::Long nCompositionLength, bool bVertical = false );
using ::OutputDevice::SetSettings;
virtual void SetSettings( const AllSettings& rSettings ) override;
@@ -901,7 +901,7 @@ public:
void SetPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont);
vcl::Font GetPointFont(vcl::RenderContext const & rRenderContext) const;
void SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont);
- long GetDrawPixel( ::OutputDevice const * pDev, long nPixels ) const;
+ tools::Long GetDrawPixel( ::OutputDevice const * pDev, tools::Long nPixels ) const;
vcl::Font GetDrawPixelFont( ::OutputDevice const * pDev ) const;
void SetControlFont();
@@ -988,8 +988,8 @@ public:
void EnableAlwaysOnTop( bool bEnable = true );
bool IsAlwaysOnTopEnabled() const;
- virtual void setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight,
+ virtual void setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags = PosSizeFlags::All );
virtual void SetPosPixel( const Point& rNewPos );
virtual Point GetPosPixel() const;
@@ -1015,9 +1015,9 @@ public:
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const;
bool IsScrollable() const;
- virtual void Scroll( long nHorzScroll, long nVertScroll,
+ virtual void Scroll( tools::Long nHorzScroll, tools::Long nVertScroll,
ScrollFlags nFlags = ScrollFlags::NONE );
- void Scroll( long nHorzScroll, long nVertScroll,
+ void Scroll( tools::Long nHorzScroll, tools::Long nVertScroll,
const tools::Rectangle& rRect, ScrollFlags nFlags = ScrollFlags::NONE );
virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE );
virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE );
@@ -1097,7 +1097,7 @@ public:
void SetZoom( const Fraction& rZoom );
const Fraction& GetZoom() const;
bool IsZoom() const;
- long CalcZoom( long n ) const;
+ tools::Long CalcZoom( tools::Long n ) const;
virtual void SetText( const OUString& rStr );
virtual OUString GetText() const;
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index 0383dfab6a2d..5f7a7517a8d0 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -37,8 +37,8 @@ using namespace css;
static void drawBitmapCentered(tools::Rectangle const& rRect, const Bitmap& aBitmap,
vcl::RenderContext& rRenderContext)
{
- long nWidth = rRect.GetWidth();
- long nHeight = rRect.GetHeight();
+ tools::Long nWidth = rRect.GetWidth();
+ tools::Long nHeight = rRect.GetHeight();
Size aBitmapSize(aBitmap.GetSizePixel());
@@ -52,8 +52,8 @@ static void drawBitmapCentered(tools::Rectangle const& rRect, const Bitmap& aBit
static void drawBitmapScaledAndCentered(tools::Rectangle const & rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext, BmpScaleFlag aFlag = BmpScaleFlag::Fast)
{
- long nWidth = rRect.GetWidth();
- long nHeight = rRect.GetHeight();
+ tools::Long nWidth = rRect.GetWidth();
+ tools::Long nHeight = rRect.GetHeight();
Size aBitmapSize(aBitmap.GetSizePixel());
@@ -150,10 +150,10 @@ public:
{
for (int x = 0; x < nPartitionsX; x++)
{
- long x1 = x * (nWidth / nPartitionsX);
- long y1 = y * (nHeight / nPartitionsY);
- long x2 = (x+1) * (nWidth / nPartitionsX);
- long y2 = (y+1) * (nHeight / nPartitionsY);
+ tools::Long x1 = x * (nWidth / nPartitionsX);
+ tools::Long y1 = y * (nHeight / nPartitionsY);
+ tools::Long x2 = (x+1) * (nWidth / nPartitionsX);
+ tools::Long y2 = (y+1) * (nHeight / nPartitionsY);
aRegions.emplace_back(x1 + 1, y1 + 1, x2 - 6, y2 - 2);
}
@@ -659,8 +659,8 @@ public:
Size aSize = GetOutputSizePixel();
- long nWidth = aSize.Width();
- long nHeight = aSize.Height();
+ tools::Long nWidth = aSize.Width();
+ tools::Long nHeight = aSize.Height();
if (mnTest % gnNumberOfTests == 0)
{
diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx
index ea71d434a8a0..a002868715b8 100644
--- a/vcl/backendtest/outputdevice/common.cxx
+++ b/vcl/backendtest/outputdevice/common.cxx
@@ -84,8 +84,8 @@ std::map<Color, int> collectColors(Bitmap& bitmap, const tools::Rectangle& recta
{
std::map<Color, int> colors;
BitmapScopedWriteAccess pAccess(bitmap);
- for( long y = rectangle.getY(); y < rectangle.GetHeight(); ++y)
- for( long x = rectangle.getX(); x < rectangle.GetWidth(); ++x)
+ for( tools::Long y = rectangle.getY(); y < rectangle.GetHeight(); ++y)
+ for( tools::Long x = rectangle.getX(); x < rectangle.GetWidth(); ++x)
++colors[pAccess->GetPixel(y, x)]; // operator[] initializes to 0 (default ctor) if creating
return colors;
}
@@ -93,14 +93,14 @@ std::map<Color, int> collectColors(Bitmap& bitmap, const tools::Rectangle& recta
TestResult checkRect(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
{
BitmapScopedWriteAccess pAccess(rBitmap);
- long nHeight = pAccess->Height();
- long nWidth = pAccess->Width();
+ tools::Long nHeight = pAccess->Height();
+ tools::Long nWidth = pAccess->Width();
- long firstX = 0 + aLayerNumber;
- long firstY = 0 + aLayerNumber;
+ tools::Long firstX = 0 + aLayerNumber;
+ tools::Long firstY = 0 + aLayerNumber;
- long lastX = nWidth - aLayerNumber - 1;
- long lastY = nHeight - aLayerNumber - 1;
+ tools::Long lastX = nWidth - aLayerNumber - 1;
+ tools::Long lastY = nHeight - aLayerNumber - 1;
TestResult aResult = TestResult::Passed;
int nNumberOfQuirks = 0;
@@ -112,12 +112,12 @@ TestResult checkRect(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
checkValue(pAccess, firstX, lastY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true);
checkValue(pAccess, lastX, lastY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true);
- for (long y = firstY + 1; y <= lastY - 1; y++)
+ for (tools::Long y = firstY + 1; y <= lastY - 1; y++)
{
checkValue(pAccess, firstX, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
checkValue(pAccess, lastX, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
}
- for (long x = firstX + 1; x <= lastX - 1; x++)
+ for (tools::Long x = firstX + 1; x <= lastX - 1; x++)
{
checkValue(pAccess, x, firstY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
checkValue(pAccess, x, lastY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
@@ -132,8 +132,8 @@ TestResult checkRect(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpectedColor, int nColorThresh)
{
BitmapScopedWriteAccess pAccess(rBitmap);
- long nWidth = pAccess->Width();
- long nHeight = pAccess->Height();
+ tools::Long nWidth = pAccess->Width();
+ tools::Long nHeight = pAccess->Height();
TestResult aResult = TestResult::Passed;
int nNumberOfQuirks = 0;
@@ -141,15 +141,15 @@ TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpected
// check horizontal line
{
- long startX = 4;
- long endX = nWidth - 2;
+ tools::Long startX = 4;
+ tools::Long endX = nWidth - 2;
- long y = 1;
+ tools::Long y = 1;
checkValue(pAccess, startX, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true, nColorThresh);
checkValue(pAccess, endX, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true, nColorThresh);
- for (long x = startX + 1; x <= endX - 1; x++)
+ for (tools::Long x = startX + 1; x <= endX - 1; x++)
{
checkValue(pAccess, x, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false, nColorThresh);
}
@@ -157,15 +157,15 @@ TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpected
// check vertical line
{
- long startY = 4;
- long endY = nHeight - 2;
+ tools::Long startY = 4;
+ tools::Long endY = nHeight - 2;
- long x = 1;
+ tools::Long x = 1;
checkValue(pAccess, x, startY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true, nColorThresh);
checkValue(pAccess, x, endY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true, nColorThresh);
- for (long y = startY + 1; y <= endY - 1; y++)
+ for (tools::Long y = startY + 1; y <= endY - 1; y++)
{
checkValue(pAccess, x, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false, nColorThresh);
}
@@ -173,14 +173,14 @@ TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpected
// check diagonal line
{
- long startX = 1;
- long endX = nWidth - 2;
+ tools::Long startX = 1;
+ tools::Long endX = nWidth - 2;
- long startY = 1;
- long endY = nHeight - 2;
+ tools::Long startY = 1;
+ tools::Long endY = nHeight - 2;
- long x = startX;
- long y = startY;
+ tools::Long x = startX;
+ tools::Long y = startY;
checkValue(pAccess, startX, startY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true, nColorThresh);
checkValue(pAccess, endX, endY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true, nColorThresh);
@@ -204,19 +204,19 @@ TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpected
TestResult checkDiamondLine(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
{
BitmapScopedWriteAccess pAccess(rBitmap);
- long nHeight = pAccess->Height();
- long nWidth = pAccess->Width();
+ tools::Long nHeight = pAccess->Height();
+ tools::Long nWidth = pAccess->Width();
- long midX = nWidth / 2;
- long midY = nHeight / 2;
+ tools::Long midX = nWidth / 2;
+ tools::Long midY = nHeight / 2;
- long firstX = aLayerNumber;
- long lastX = nWidth - aLayerNumber - 1;
+ tools::Long firstX = aLayerNumber;
+ tools::Long lastX = nWidth - aLayerNumber - 1;
- long firstY = aLayerNumber;
- long lastY = nHeight - aLayerNumber - 1;
+ tools::Long firstY = aLayerNumber;
+ tools::Long lastY = nHeight - aLayerNumber - 1;
- long offsetFromMid = 0;
+ tools::Long offsetFromMid = 0;
TestResult aResult = TestResult::Passed;
int nNumberOfQuirks = 0;
@@ -228,7 +228,7 @@ TestResult checkDiamondLine(Bitmap& rBitmap, int aLayerNumber, Color aExpectedCo
checkValue(pAccess, midX, lastY, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, true);
offsetFromMid = 1;
- for (long x = firstX + 1; x <= midX - 1; x++)
+ for (tools::Long x = firstX + 1; x <= midX - 1; x++)
{
checkValue(pAccess, x, midY - offsetFromMid, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
checkValue(pAccess, x, midY + offsetFromMid, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
@@ -238,7 +238,7 @@ TestResult checkDiamondLine(Bitmap& rBitmap, int aLayerNumber, Color aExpectedCo
offsetFromMid = midY - aLayerNumber - 1;
- for (long x = midX + 1; x <= lastX - 1; x++)
+ for (tools::Long x = midX + 1; x <= lastX - 1; x++)
{
checkValue(pAccess, x, midY - offsetFromMid, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
checkValue(pAccess, x, midY + offsetFromMid, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
@@ -272,7 +272,7 @@ OUString OutputDeviceTestCommon::getRenderBackendName() const
return OUString();
}
-void OutputDeviceTestCommon::initialSetup(long nWidth, long nHeight, Color aColor, bool bEnableAA, bool bAlphaVirtualDevice)
+void OutputDeviceTestCommon::initialSetup(tools::Long nWidth, tools::Long nHeight, Color aColor, bool bEnableAA, bool bAlphaVirtualDevice)
{
if (bAlphaVirtualDevice)
mpVirtualDevice = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
@@ -422,9 +422,9 @@ TestResult OutputDeviceTestCommon::checkFilled(Bitmap& rBitmap, tools::Rectangle
int nNumberOfQuirks = 0;
int nNumberOfErrors = 0;
- for (long y = aRectangle.Top(); y < aRectangle.Top() + aRectangle.GetHeight(); y++)
+ for (tools::Long y = aRectangle.Top(); y < aRectangle.Top() + aRectangle.GetHeight(); y++)
{
- for (long x = aRectangle.Left(); x < aRectangle.Left() + aRectangle.GetWidth(); x++)
+ for (tools::Long x = aRectangle.Left(); x < aRectangle.Left() + aRectangle.GetWidth(); x++)
{
checkValue(pAccess, x, y, aExpectedColor, nNumberOfQuirks, nNumberOfErrors, false);
}
@@ -476,8 +476,8 @@ void OutputDeviceTestCommon::createDiamondPoints(tools::Rectangle rRect, int nOf
Point& rPoint1, Point& rPoint2,
Point& rPoint3, Point& rPoint4)
{
- long midPointX = rRect.Left() + (rRect.Right() - rRect.Left()) / 2.0;
- long midPointY = rRect.Top() + (rRect.Bottom() - rRect.Top()) / 2.0;
+ tools::Long midPointX = rRect.Left() + (rRect.Right() - rRect.Left()) / 2.0;
+ tools::Long midPointY = rRect.Top() + (rRect.Bottom() - rRect.Top()) / 2.0;
rPoint1 = Point(midPointX , midPointY - nOffset);
rPoint2 = Point(midPointX + nOffset, midPointY );
diff --git a/vcl/backendtest/outputdevice/pixel.cxx b/vcl/backendtest/outputdevice/pixel.cxx
index 71997868fdf6..520cf50fe92f 100644
--- a/vcl/backendtest/outputdevice/pixel.cxx
+++ b/vcl/backendtest/outputdevice/pixel.cxx
@@ -17,19 +17,19 @@ namespace
void drawPixelOffset(OutputDevice& rDevice, tools::Rectangle const & rRect, int nOffset)
{
- for (long x = 0 + nOffset; x < (rRect.GetWidth() - nOffset); ++x)
+ for (tools::Long x = 0 + nOffset; x < (rRect.GetWidth() - nOffset); ++x)
{
- long y1 = nOffset;
- long y2 = rRect.GetHeight() - nOffset - 1;
+ tools::Long y1 = nOffset;
+ tools::Long y2 = rRect.GetHeight() - nOffset - 1;
rDevice.DrawPixel(Point(x, y1));
rDevice.DrawPixel(Point(x, y2));
}
- for (long y = 0 + nOffset; y < (rRect.GetHeight() - nOffset); ++y)
+ for (tools::Long y = 0 + nOffset; y < (rRect.GetHeight() - nOffset); ++y)
{
- long x1 = nOffset;
- long x2 = rRect.GetWidth() - nOffset - 1;
+ tools::Long x1 = nOffset;
+ tools::Long x2 = rRect.GetWidth() - nOffset - 1;
rDevice.DrawPixel(Point(x1, y));
rDevice.DrawPixel(Point(x2, y));
diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx
index 7515a1a136bc..6ff10a34c7bb 100644
--- a/vcl/headless/CustomWidgetDraw.cxx
+++ b/vcl/headless/CustomWidgetDraw.cxx
@@ -84,8 +84,8 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart,
cairo_translate(pCairoContext, rControlRegion.Left(), rControlRegion.Top());
- long nWidth = rControlRegion.GetWidth();
- long nHeight = rControlRegion.GetHeight();
+ tools::Long nWidth = rControlRegion.GetWidth();
+ tools::Long nHeight = rControlRegion.GetHeight();
bool bOK = false;
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 4d881f025d0b..b5748e560d2c 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -101,7 +101,7 @@ static std::unique_ptr<BitmapBuffer> ImplCreateDIB(
pDIB->mnFormat |= ScanlineFormat::TopDown;
pDIB->mnWidth = rSize.Width();
pDIB->mnHeight = rSize.Height();
- long nScanlineBase;
+ tools::Long nScanlineBase;
bool bFail = o3tl::checked_multiply<long>(pDIB->mnWidth, nBitCount, nScanlineBase);
if (bFail)
{
diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx
index 548868c05349..4d8e639b78dc 100644
--- a/vcl/headless/svpdummies.cxx
+++ b/vcl/headless/svpdummies.cxx
@@ -27,9 +27,9 @@ SvpSalObject::~SvpSalObject()
void SvpSalObject::ResetClipRegion() {}
void SvpSalObject::BeginSetClipRegion( sal_uInt32 ) {}
-void SvpSalObject::UnionClipRegion( long, long, long, long ) {}
+void SvpSalObject::UnionClipRegion( tools::Long, tools::Long, tools::Long, tools::Long ) {}
void SvpSalObject::EndSetClipRegion() {}
-void SvpSalObject::SetPosSize( long, long, long, long ) {}
+void SvpSalObject::SetPosSize( tools::Long, tools::Long, tools::Long, tools::Long ) {}
void SvpSalObject::Show( bool ) {}
const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; }
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 7e5d00af208c..3f79ead63783 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -217,19 +217,19 @@ void SvpSalFrame::Show( bool bVisible, bool bNoActivate )
}
}
-void SvpSalFrame::SetMinClientSize( long nWidth, long nHeight )
+void SvpSalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight )
{
m_nMinWidth = nWidth;
m_nMinHeight = nHeight;
}
-void SvpSalFrame::SetMaxClientSize( long nWidth, long nHeight )
+void SvpSalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight )
{
m_nMaxWidth = nWidth;
m_nMaxHeight = nHeight;
}
-void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+void SvpSalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags )
{
if( (nFlags & SAL_FRAME_POSSIZE_X) != 0 )
maGeometry.nX = nX;
@@ -283,7 +283,7 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
#endif
}
-void SvpSalFrame::GetClientSize( long& rWidth, long& rHeight )
+void SvpSalFrame::GetClientSize( tools::Long& rWidth, tools::Long& rHeight )
{
rWidth = maGeometry.nWidth;
rHeight = maGeometry.nHeight;
@@ -313,10 +313,10 @@ void SvpSalFrame::SetWindowState( const SalFrameState *pState )
if (!(pState->mnMask & FRAMESTATE_MASK_GEOMETRY))
return;
- long nX = maGeometry.nX;
- long nY = maGeometry.nY;
- long nWidth = maGeometry.nWidth;
- long nHeight = maGeometry.nHeight;
+ tools::Long nX = maGeometry.nX;
+ tools::Long nY = maGeometry.nY;
+ tools::Long nWidth = maGeometry.nWidth;
+ tools::Long nHeight = maGeometry.nHeight;
// change requested properties
if (pState->mnMask & WindowStateMask::X)
@@ -372,7 +372,7 @@ void SvpSalFrame::CaptureMouse( bool )
{
}
-void SvpSalFrame::SetPointerPos( long, long )
+void SvpSalFrame::SetPointerPos( tools::Long, tools::Long )
{
}
@@ -491,7 +491,7 @@ void SvpSalFrame::BeginSetClipRegion( sal_uInt32 )
{
}
-void SvpSalFrame::UnionClipRegion( long, long, long, long )
+void SvpSalFrame::UnionClipRegion( tools::Long, tools::Long, tools::Long, tools::Long )
{
}
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index c9826c774d59..edf0e061d0a6 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -175,8 +175,8 @@ namespace
return nullptr;
assert(pSrc->mnFormat == SVP_24BIT_FORMAT);
- const long nWidth = pSrc->mnWidth;
- const long nHeight = pSrc->mnHeight;
+ const tools::Long nWidth = pSrc->mnWidth;
+ const tools::Long nHeight = pSrc->mnHeight;
std::unique_ptr<BitmapBuffer> pDst(new BitmapBuffer);
pDst->mnFormat = (ScanlineFormat::N32BitTcArgb | ScanlineFormat::TopDown);
pDst->mnWidth = nWidth;
@@ -185,7 +185,7 @@ namespace
pDst->maColorMask = pSrc->maColorMask;
pDst->maPalette = pSrc->maPalette;
- long nScanlineBase;
+ tools::Long nScanlineBase;
const bool bFail = o3tl::checked_multiply<long>(pDst->mnBitCount, nWidth, nScanlineBase);
if (bFail)
{
@@ -213,11 +213,11 @@ namespace
return nullptr;
}
- for (long y = 0; y < nHeight; ++y)
+ for (tools::Long y = 0; y < nHeight; ++y)
{
sal_uInt8* pS = pSrc->mpBits + y * pSrc->mnScanlineSize;
sal_uInt8* pD = pDst->mpBits + y * pDst->mnScanlineSize;
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
#if defined(ANDROID) && !HAVE_FEATURE_ANDROID_LOK
static_assert((SVP_CAIRO_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcRgba, "Expected SVP_CAIRO_FORMAT set to N32BitTcBgra");
@@ -467,8 +467,8 @@ namespace
if(pSurface)
{
- const long nStride(cairo_image_surface_get_stride(pSurface));
- const long nHeight(cairo_image_surface_get_height(pSurface));
+ const tools::Long nStride(cairo_image_surface_get_stride(pSurface));
+ const tools::Long nHeight(cairo_image_surface_get_height(pSurface));
nRetval = nStride * nHeight;
@@ -597,7 +597,7 @@ namespace
// MM02 decide to use buffers or not
const char* pDisableMM02Goodies(getenv("SAL_DISABLE_MM02_GOODIES"));
bool bUseBuffer(nullptr == pDisableMM02Goodies);
- long nMinimalSquareSizeToBuffer(64*64);
+ tools::Long nMinimalSquareSizeToBuffer(64*64);
void tryToUseSourceBuffer(
const SalBitmap& rSourceBitmap,
@@ -765,8 +765,8 @@ bool SvpSalGraphics::drawTransformedBitmap(
// MM02 try to access buffered BitmapHelper
std::shared_ptr<BitmapHelper> aSurface;
tryToUseSourceBuffer(rSourceBitmap, aSurface);
- const long nDestWidth(basegfx::fround(basegfx::B2DVector(rX - rNull).getLength()));
- const long nDestHeight(basegfx::fround(basegfx::B2DVector(rY - rNull).getLength()));
+ const tools::Long nDestWidth(basegfx::fround(basegfx::B2DVector(rX - rNull).getLength()));
+ const tools::Long nDestHeight(basegfx::fround(basegfx::B2DVector(rY - rNull).getLength()));
cairo_surface_t* source(
aSurface->getSurface(
nDestWidth,
@@ -853,7 +853,7 @@ void SvpSalGraphics::clipRegion(cairo_t* cr)
SvpSalGraphics::clipRegion(cr, m_aClipRegion);
}
-bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency)
+bool SvpSalGraphics::drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency)
{
const bool bHasFill(m_aFillColor != SALCOLOR_NONE);
const bool bHasLine(m_aLineColor != SALCOLOR_NONE);
@@ -949,7 +949,7 @@ sal_uInt16 SvpSalGraphics::GetBitCount() const
return 32;
}
-long SvpSalGraphics::GetGraphicsWidth() const
+tools::Long SvpSalGraphics::GetGraphicsWidth() const
{
return m_pSurface ? m_aFrameSize.getX() : 0;
}
@@ -1022,7 +1022,7 @@ void SvpSalGraphics::SetROPFillColor( SalROPColor nROPColor )
}
}
-void SvpSalGraphics::drawPixel( long nX, long nY )
+void SvpSalGraphics::drawPixel( tools::Long nX, tools::Long nY )
{
if (m_aLineColor != SALCOLOR_NONE)
{
@@ -1030,7 +1030,7 @@ void SvpSalGraphics::drawPixel( long nX, long nY )
}
}
-void SvpSalGraphics::drawPixel( long nX, long nY, Color aColor )
+void SvpSalGraphics::drawPixel( tools::Long nX, tools::Long nY, Color aColor )
{
cairo_t* cr = getCairoContext(true);
clipRegion(cr);
@@ -1043,7 +1043,7 @@ void SvpSalGraphics::drawPixel( long nX, long nY, Color aColor )
releaseCairoContext(cr, true, extents);
}
-void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
+void SvpSalGraphics::drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
// because of the -1 hack we have to do fill and draw separately
Color aOrigFillColor = m_aFillColor;
@@ -1329,7 +1329,7 @@ static size_t AddPolygonToPath(
return nSizeMeasure;
}
-void SvpSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
+void SvpSalGraphics::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 )
{
basegfx::B2DPolygon aPoly;
@@ -2041,12 +2041,12 @@ void SvpSalGraphics::applyColor(cairo_t *cr, Color aColor, double fTransparency)
}
}
-void SvpSalGraphics::copyArea( long nDestX,
- long nDestY,
- long nSrcX,
- long nSrcY,
- long nSrcWidth,
- long nSrcHeight,
+void SvpSalGraphics::copyArea( tools::Long nDestX,
+ tools::Long nDestY,
+ tools::Long nSrcX,
+ tools::Long nSrcY,
+ tools::Long nSrcWidth,
+ tools::Long nSrcHeight,
bool /*bWindowInvalidate*/ )
{
SalTwoRect aTR(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight);
@@ -2196,11 +2196,11 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
sal_Int32 nStride;
unsigned char *mask_data = aSurface.getBits(nStride);
vcl::bitmap::lookup_table unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
- for (long y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
+ for (tools::Long y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
{
unsigned char *row = mask_data + (nStride*y);
unsigned char *data = row + (rTR.mnSrcX * 4);
- for (long x = rTR.mnSrcX; x < rTR.mnSrcX + rTR.mnSrcWidth; ++x)
+ for (tools::Long x = rTR.mnSrcX; x < rTR.mnSrcX + rTR.mnSrcWidth; ++x)
{
sal_uInt8 a = data[SVP_CAIRO_ALPHA];
sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
@@ -2250,7 +2250,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
releaseCairoContext(cr, false, extents);
}
-std::shared_ptr<SalBitmap> SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
+std::shared_ptr<SalBitmap> SvpSalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
std::shared_ptr<SvpSalBitmap> pBitmap = std::make_shared<SvpSalBitmap>();
BitmapPalette aPal;
@@ -2286,7 +2286,7 @@ std::shared_ptr<SalBitmap> SvpSalGraphics::getBitmap( long nX, long nY, long nWi
return pBitmap;
}
-Color SvpSalGraphics::getPixel( long nX, long nY )
+Color SvpSalGraphics::getPixel( tools::Long nX, tools::Long nY )
{
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
cairo_surface_t *target = cairo_surface_create_similar_image(m_pSurface, CAIRO_FORMAT_ARGB32, 1, 1);
@@ -2406,7 +2406,7 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags)
releaseCairoContext(cr, false, extents);
}
-void SvpSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags )
+void SvpSalGraphics::invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags )
{
basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+nWidth, nY+nHeight));
@@ -2424,7 +2424,7 @@ void SvpSalGraphics::invert(sal_uInt32 nPoints, const SalPoint* pPtAry, SalInver
invert(aPoly, nFlags);
}
-bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uInt32 )
+bool SvpSalGraphics::drawEPS( tools::Long, tools::Long, tools::Long, tools::Long, void*, sal_uInt32 )
{
return false;
}
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 4893b8ddd44b..9654243f5ac3 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -242,7 +242,7 @@ void SvpSalInstance::DestroyObject( SalObject* pObject )
#ifndef IOS
std::unique_ptr<SalVirtualDevice> SvpSalInstance::CreateVirtualDevice(SalGraphics* pGraphics,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat,
const SystemGraphicsData* pGd)
{
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index f44373f5acc1..0abb57e6e9e4 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -73,12 +73,12 @@ bool SvpSalGraphics::CreateFontSubset(
return m_aTextRenderImpl.CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
}
-const void* SvpSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
+const void* SvpSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen)
{
return m_aTextRenderImpl.GetEmbedFontData(pFont, pDataLen);
}
-void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen )
+void SvpSalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen )
{
m_aTextRenderImpl.FreeEmbedFontData(pData, nLen);
}
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 70ac5785ec71..9025326827a6 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -65,12 +65,12 @@ void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics )
delete pGraphics;
}
-bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
+bool SvpSalVirtualDevice::SetSize( tools::Long nNewDX, tools::Long nNewDY )
{
return SetSizeUsingBuffer(nNewDX, nNewDY, nullptr);
}
-void SvpSalVirtualDevice::CreateSurface(long nNewDX, long nNewDY, sal_uInt8 *const pBuffer)
+void SvpSalVirtualDevice::CreateSurface(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *const pBuffer)
{
if (m_pSurface)
{
@@ -108,7 +108,7 @@ void SvpSalVirtualDevice::CreateSurface(long nNewDX, long nNewDY, sal_uInt8 *con
}
}
-bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
+bool SvpSalVirtualDevice::SetSizeUsingBuffer( tools::Long nNewDX, tools::Long nNewDY,
sal_uInt8 *const pBuffer)
{
if (nNewDX == 0)
@@ -133,12 +133,12 @@ bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
return true;
}
-long SvpSalVirtualDevice::GetWidth() const
+tools::Long SvpSalVirtualDevice::GetWidth() const
{
return m_pSurface ? m_aFrameSize.getX() : 0;
}
-long SvpSalVirtualDevice::GetHeight() const
+tools::Long SvpSalVirtualDevice::GetHeight() const
{
return m_pSurface ? m_aFrameSize.getY() : 0;
}
diff --git a/vcl/inc/FileDefinitionWidgetDraw.hxx b/vcl/inc/FileDefinitionWidgetDraw.hxx
index 68f5d348901d..fc99471ba336 100644
--- a/vcl/inc/FileDefinitionWidgetDraw.hxx
+++ b/vcl/inc/FileDefinitionWidgetDraw.hxx
@@ -26,8 +26,8 @@ private:
std::shared_ptr<WidgetDefinition> m_pWidgetDefinition;
bool resolveDefinition(ControlType eType, ControlPart ePart, ControlState eState,
- const ImplControlValue& rValue, long nX, long nY, long nWidth,
- long nHeight);
+ const ImplControlValue& rValue, tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight);
public:
FileDefinitionWidgetDraw(SalGraphics& rGraphics);
diff --git a/vcl/inc/PhysicalFontFace.hxx b/vcl/inc/PhysicalFontFace.hxx
index b6c0be37d99c..4ecc751b5445 100644
--- a/vcl/inc/PhysicalFontFace.hxx
+++ b/vcl/inc/PhysicalFontFace.hxx
@@ -22,6 +22,7 @@
#include <salhelper/simplereferenceobject.hxx>
#include <rtl/ref.hxx>
+#include <tools/long.hxx>
#include <vcl/dllapi.h>
#include <vcl/fontcharmap.hxx>
@@ -76,8 +77,8 @@ protected:
explicit PhysicalFontFace(const FontAttributes&);
void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; }
- long mnWidth; // Width (in pixels)
- long mnHeight; // Height (in pixels)
+ tools::Long mnWidth; // Width (in pixels)
+ tools::Long mnHeight; // Height (in pixels)
};
#endif // INCLUDED_VCL_INC_PHYSICALFONTFACE_HXX
diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx
index ace74a49a965..9a593e6dc6a2 100644
--- a/vcl/inc/WidgetThemeLibrary.hxx
+++ b/vcl/inc/WidgetThemeLibrary.hxx
@@ -110,8 +110,8 @@ typedef struct WidgetThemeLibrary_t WidgetThemeLibrary;
typedef struct _rectangle
{
- long x, y;
- long width, height;
+ tools::Long x, y;
+ tools::Long width, height;
} rectangle_t;
struct WidgetThemeLibrary_t
@@ -123,29 +123,50 @@ struct WidgetThemeLibrary_t
const rectangle_t& rBoundingControlRegion, rectangle_t& rNativeBoundingRegion,
rectangle_t& rNativeContentRegion);
- bool (*drawPushButton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawRadiobutton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawCheckbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawCombobox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawEditbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawScrollbar)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawSpinButtons)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawSpinbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawTabItem)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawTabPane)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawTabHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawTabBody)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawSlider)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawFixedline)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawToolbar)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawProgress)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawWindowsBackground)(ControlDrawParameters const& rParameters, long nWidth,
- long nHeight);
- bool (*drawListbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawFrame)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawListNode)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawListNet)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
- bool (*drawListHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
+ bool (*drawPushButton)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawRadiobutton)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawCheckbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawCombobox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawEditbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawScrollbar)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawSpinButtons)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawSpinbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawTabItem)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawTabPane)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawTabHeader)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawTabBody)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawSlider)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawFixedline)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawToolbar)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawProgress)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawWindowsBackground)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawListbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawFrame)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawListNode)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawListNet)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
+ bool (*drawListHeader)(ControlDrawParameters const& rParameters, tools::Long nWidth,
+ tools::Long nHeight);
bool (*updateSettings)(WidgetDrawStyle& rStyle);
};
diff --git a/vcl/inc/bitmap/impoctree.hxx b/vcl/inc/bitmap/impoctree.hxx
index 06fbd69249d0..6b242a2a367c 100644
--- a/vcl/inc/bitmap/impoctree.hxx
+++ b/vcl/inc/bitmap/impoctree.hxx
@@ -24,9 +24,9 @@
class ImpErrorQuad
{
- long nRed;
- long nGreen;
- long nBlue;
+ tools::Long nRed;
+ tools::Long nGreen;
+ tools::Long nBlue;
public:
ImpErrorQuad()
@@ -37,9 +37,9 @@ public:
}
ImpErrorQuad(const BitmapColor& rColor)
- : nRed(long(rColor.GetRed()) << 5)
- , nGreen(long(rColor.GetGreen()) << 5)
- , nBlue(long(rColor.GetBlue()) << 5)
+ : nRed(tools::Long(rColor.GetRed()) << 5)
+ , nGreen(tools::Long(rColor.GetGreen()) << 5)
+ , nBlue(tools::Long(rColor.GetBlue()) << 5)
{
}
@@ -56,16 +56,16 @@ public:
inline void ImpErrorQuad::operator=(const BitmapColor& rColor)
{
- nRed = long(rColor.GetRed()) << 5;
- nGreen = long(rColor.GetGreen()) << 5;
- nBlue = long(rColor.GetBlue()) << 5;
+ nRed = tools::Long(rColor.GetRed()) << 5;
+ nGreen = tools::Long(rColor.GetGreen()) << 5;
+ nBlue = tools::Long(rColor.GetBlue()) << 5;
}
inline ImpErrorQuad& ImpErrorQuad::operator-=(const BitmapColor& rColor)
{
- nRed -= long(rColor.GetRed()) << 5;
- nGreen -= long(rColor.GetGreen()) << 5;
- nBlue -= long(rColor.GetBlue()) << 5;
+ nRed -= tools::Long(rColor.GetRed()) << 5;
+ nGreen -= tools::Long(rColor.GetGreen()) << 5;
+ nBlue -= tools::Long(rColor.GetBlue()) << 5;
return *this;
}
diff --git a/vcl/inc/bitmapwriteaccess.hxx b/vcl/inc/bitmapwriteaccess.hxx
index f747223ec3fd..f8916d800cc2 100644
--- a/vcl/inc/bitmapwriteaccess.hxx
+++ b/vcl/inc/bitmapwriteaccess.hxx
@@ -28,8 +28,8 @@ public:
BitmapWriteAccess(Bitmap& rBitmap);
virtual ~BitmapWriteAccess() override;
- void CopyScanline(long nY, const BitmapReadAccess& rReadAcc);
- void CopyScanline(long nY, ConstScanline aSrcScanline, ScanlineFormat nSrcScanlineFormat,
+ void CopyScanline(tools::Long nY, const BitmapReadAccess& rReadAcc);
+ void CopyScanline(tools::Long nY, ConstScanline aSrcScanline, ScanlineFormat nSrcScanlineFormat,
sal_uInt32 nSrcScanlineSize);
void SetPalette(const BitmapPalette& rPalette)
@@ -54,7 +54,7 @@ public:
mpBuffer->maPalette[nColor] = rBitmapColor;
}
- void SetPixel(long nY, long nX, const BitmapColor& rBitmapColor)
+ void SetPixel(tools::Long nY, tools::Long nX, const BitmapColor& rBitmapColor)
{
assert(mpBuffer && "Access is not valid!");
assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!");
@@ -63,7 +63,7 @@ public:
mFncSetPixel(GetScanline(nY), nX, rBitmapColor, maColorMask);
}
- void SetPixelIndex(long nY, long nX, sal_uInt8 cIndex)
+ void SetPixelIndex(tools::Long nY, tools::Long nX, sal_uInt8 cIndex)
{
SetPixel(nY, nX, BitmapColor(cIndex));
}
diff --git a/vcl/inc/bmpfast.hxx b/vcl/inc/bmpfast.hxx
index ebdb431fc941..3234f7a840c1 100644
--- a/vcl/inc/bmpfast.hxx
+++ b/vcl/inc/bmpfast.hxx
@@ -22,6 +22,7 @@
#include <vcl/dllapi.h>
#include <vcl/Scanline.hxx>
+#include <tools/long.hxx>
class BitmapWriteAccess;
class BitmapReadAccess;
@@ -35,8 +36,8 @@ struct SalTwoRect;
VCL_DLLPUBLIC bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
const SalTwoRect& rTwoRect );
-bool ImplFastCopyScanline( long nY, BitmapBuffer& rDst, const BitmapBuffer& rSrc);
-bool ImplFastCopyScanline( long nY, BitmapBuffer& rDst, ConstScanline aSrcScanline,
+bool ImplFastCopyScanline( tools::Long nY, BitmapBuffer& rDst, const BitmapBuffer& rSrc);
+bool ImplFastCopyScanline( tools::Long nY, BitmapBuffer& rDst, ConstScanline aSrcScanline,
ScanlineFormat nSrcScanlineFormat, sal_uInt32 nSrcScanlineSize);
bool ImplFastBitmapBlending( BitmapWriteAccess const & rDst,
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index 1dedce0e2ff2..b32fd963fb57 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -85,11 +85,11 @@ private:
std::unique_ptr<ImplBorderWindowView> mpBorderView;
VclPtr<vcl::Window> mpMenuBarWindow;
VclPtr<NotebookBar> mpNotebookBar;
- long mnMinWidth;
- long mnMinHeight;
- long mnMaxWidth;
- long mnMaxHeight;
- long mnOrgMenuHeight;
+ tools::Long mnMinWidth;
+ tools::Long mnMinHeight;
+ tools::Long mnMaxWidth;
+ tools::Long mnMaxHeight;
+ tools::Long mnOrgMenuHeight;
BorderWindowTitleType mnTitleType;
WindowBorderStyle mnBorderStyle;
bool mbFloatWindow;
@@ -159,14 +159,14 @@ public:
void CloseNotebookBar();
const VclPtr<NotebookBar>& GetNotebookBar() const { return mpNotebookBar; }
- void SetMinOutputSize( long nWidth, long nHeight )
+ void SetMinOutputSize( tools::Long nWidth, tools::Long nHeight )
{ mnMinWidth = nWidth; mnMinHeight = nHeight; }
- void SetMaxOutputSize( long nWidth, long nHeight )
+ void SetMaxOutputSize( tools::Long nWidth, tools::Long nHeight )
{ mnMaxWidth = nWidth; mnMaxHeight = nHeight; }
void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- long CalcTitleWidth() const;
+ tools::Long CalcTitleWidth() const;
tools::Rectangle GetMenuRect() const;
@@ -185,19 +185,19 @@ struct ImplBorderFrameData
tools::Rectangle maHideRect;
tools::Rectangle maHelpRect;
Point maMouseOff;
- long mnWidth;
- long mnHeight;
- long mnTrackX;
- long mnTrackY;
- long mnTrackWidth;
- long mnTrackHeight;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
+ tools::Long mnTrackX;
+ tools::Long mnTrackY;
+ tools::Long mnTrackWidth;
+ tools::Long mnTrackHeight;
sal_Int32 mnLeftBorder;
sal_Int32 mnTopBorder;
sal_Int32 mnRightBorder;
sal_Int32 mnBottomBorder;
- long mnNoTitleTop;
- long mnBorderSize;
- long mnTitleHeight;
+ tools::Long mnNoTitleTop;
+ tools::Long mnBorderSize;
+ tools::Long mnTitleHeight;
BorderWindowHitTest mnHitTest;
DrawButtonFlags mnCloseState;
DrawButtonFlags mnRollState;
@@ -220,10 +220,10 @@ public:
virtual bool Tracking( const TrackingEvent& rTEvt );
virtual OUString RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect );
- virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0;
+ virtual void Init( OutputDevice* pDev, tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0;
- virtual long CalcTitleWidth() const = 0;
+ virtual tools::Long CalcTitleWidth() const = 0;
virtual void DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset = nullptr) = 0;
virtual tools::Rectangle GetMenuRect() const;
@@ -231,7 +231,7 @@ public:
static BorderWindowHitTest ImplHitTest( ImplBorderFrameData const * pData, const Point& rPos );
static void ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
static OUString ImplRequestHelp( ImplBorderFrameData const * pData, const Point& rPos, tools::Rectangle& rHelpRect );
- static long ImplCalcTitleWidth( const ImplBorderFrameData* pData );
+ static tools::Long ImplCalcTitleWidth( const ImplBorderFrameData* pData );
};
class ImplNoBorderWindowView final : public ImplBorderWindowView
@@ -239,10 +239,10 @@ class ImplNoBorderWindowView final : public ImplBorderWindowView
public:
ImplNoBorderWindowView();
- virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) override;
+ virtual void Init( OutputDevice* pDev, tools::Long nWidth, tools::Long nHeight ) override;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const override;
- virtual long CalcTitleWidth() const override;
+ virtual tools::Long CalcTitleWidth() const override;
virtual void DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset = nullptr) override;
};
@@ -250,8 +250,8 @@ class ImplSmallBorderWindowView : public ImplBorderWindowView
{
VclPtr<ImplBorderWindow> mpBorderWindow;
VclPtr<OutputDevice> mpOutDev;
- long mnWidth;
- long mnHeight;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
sal_Int32 mnLeftBorder;
sal_Int32 mnTopBorder;
sal_Int32 mnRightBorder;
@@ -261,10 +261,10 @@ class ImplSmallBorderWindowView : public ImplBorderWindowView
public:
ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow );
- virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight ) override;
+ virtual void Init( OutputDevice* pOutDev, tools::Long nWidth, tools::Long nHeight ) override;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const override;
- virtual long CalcTitleWidth() const override;
+ virtual tools::Long CalcTitleWidth() const override;
virtual void DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset = nullptr) override;
};
@@ -282,10 +282,10 @@ public:
virtual OUString RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect ) override;
virtual tools::Rectangle GetMenuRect() const override;
- virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) override;
+ virtual void Init( OutputDevice* pDev, tools::Long nWidth, tools::Long nHeight ) override;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const override;
- virtual long CalcTitleWidth() const override;
+ virtual tools::Long CalcTitleWidth() const override;
virtual void DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset = nullptr) override;
};
diff --git a/vcl/inc/calendar.hxx b/vcl/inc/calendar.hxx
index 46aea4c63c1f..fe49ec69b0d0 100644
--- a/vcl/inc/calendar.hxx
+++ b/vcl/inc/calendar.hxx
@@ -126,7 +126,7 @@ class Calendar final : public Control
tools::Rectangle maPrevRect;
tools::Rectangle maNextRect;
OUString maDayOfWeekText;
- long mnDayOfWeekAry[7];
+ tools::Long mnDayOfWeekAry[7];
Date maOldFormatFirstDate;
Date maOldFormatLastDate;
Date maFirstDate;
@@ -136,15 +136,15 @@ class Calendar final : public Control
Color maSelColor;
Color maOtherColor;
sal_Int32 mnDayCount;
- long mnDaysOffX;
- long mnWeekDayOffY;
- long mnDaysOffY;
- long mnMonthHeight;
- long mnMonthWidth;
- long mnMonthPerLine;
- long mnLines;
- long mnDayWidth;
- long mnDayHeight;
+ tools::Long mnDaysOffX;
+ tools::Long mnWeekDayOffY;
+ tools::Long mnDaysOffY;
+ tools::Long mnMonthHeight;
+ tools::Long mnMonthWidth;
+ tools::Long mnMonthPerLine;
+ tools::Long mnLines;
+ tools::Long mnDayWidth;
+ tools::Long mnDayHeight;
WinBits mnWinStyle;
sal_Int16 mnFirstYear;
sal_Int16 mnLastYear;
@@ -169,7 +169,7 @@ class Calendar final : public Control
using Window::ImplHitTest;
sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const;
void ImplDrawSpin(vcl::RenderContext& rRenderContext);
- void ImplDrawDate(vcl::RenderContext& rRenderContext, long nX, long nY,
+ void ImplDrawDate(vcl::RenderContext& rRenderContext, tools::Long nX, tools::Long nY,
sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear,
bool bOther, sal_Int32 nToday);
void ImplDraw(vcl::RenderContext& rRenderContext);
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index 4aff50c9577e..f20c0abbdfe7 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -55,7 +55,7 @@ public: // TODO: make data members private
ImplFontMetricDataRef mxFontMetric; // Font attributes
const ConvertChar* mpConversion; // used e.g. for StarBats->StarSymbol
- long mnLineHeight;
+ tools::Long mnLineHeight;
short mnOwnOrientation; // text angle if lower layers don't rotate text themselves
short mnOrientation; // text angle in 3600 system
bool mbInit; // true if maFontMetric member is valid
diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index 51007916b43b..cdcdcc0b1a73 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -36,10 +36,10 @@ public:
// override all pure virtual methods
virtual void ResetClipRegion() override;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void EndSetClipRegion() override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void Show( bool bVisible ) override;
virtual const SystemEnvData* GetSystemData() const override;
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 9faf8b8230f4..6d003d545398 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -44,10 +44,10 @@ class SvpSalFrame : public SalFrame
#ifndef IOS
cairo_surface_t* m_pSurface;
#endif
- long m_nMinWidth;
- long m_nMinHeight;
- long m_nMaxWidth;
- long m_nMaxHeight;
+ tools::Long m_nMinWidth;
+ tools::Long m_nMinHeight;
+ tools::Long m_nMaxWidth;
+ tools::Long m_nMaxHeight;
SystemEnvData m_aSystemChildData;
@@ -77,10 +77,10 @@ public:
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override;
virtual void Show( bool bVisible, bool bNoActivate = false ) override;
- virtual void SetMinClientSize( long nWidth, long nHeight ) override;
- virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
- virtual void GetClientSize( long& rWidth, long& rHeight ) override;
+ virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) override;
+ virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) override;
virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
@@ -91,7 +91,7 @@ public:
virtual void ToTop( SalFrameToTop nFlags ) override;
virtual void SetPointer( PointerStyle ePointerStyle ) override;
virtual void CaptureMouse( bool bMouse ) override;
- virtual void SetPointerPos( long nX, long nY ) override;
+ virtual void SetPointerPos( tools::Long nX, tools::Long nY ) override;
using SalFrame::Flush;
virtual void Flush() override;
virtual void SetInputContext( SalInputContext* pContext ) override;
@@ -109,7 +109,7 @@ public:
virtual bool SetPluginParent( SystemParentData* pNewParent ) override;
virtual void ResetClipRegion() override;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void EndSetClipRegion() override;
/*TODO: functional implementation */
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index c88c136f5066..0ce14b3a5274 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -145,7 +145,7 @@ protected:
const basegfx::B2DPoint& rY,
const SalBitmap& rSourceBitmap,
const SalBitmap* pAlphaBitmap) override;
- virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) override;
+ virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency ) override;
cairo_t* createTmpCompatibleCairoContext() const;
@@ -156,7 +156,7 @@ public:
virtual SalGraphicsImpl* GetImpl() const override { return nullptr; };
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
virtual sal_uInt16 GetBitCount() const override;
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
virtual void ResetClipRegion() override;
virtual bool setClipRegion( const vcl::Region& ) override;
@@ -187,8 +187,8 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo
) override;
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
virtual void GetGlyphWidths( const PhysicalFontFace*,
bool bVertical,
std::vector< sal_Int32 >& rWidths,
@@ -197,10 +197,10 @@ public:
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
virtual bool supportsOperation( OutDevSupportType ) const override;
- virtual void drawPixel( long nX, long nY ) override;
- virtual void drawPixel( long nX, long nY, Color nColor ) override;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual bool drawPolyPolygon(
const basegfx::B2DHomMatrix& rObjectToDevice,
@@ -237,12 +237,12 @@ public:
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rGradient) override;
- virtual void copyArea( long nDestX,
- long nDestY,
- long nSrcX,
- long nSrcY,
- long nSrcWidth,
- long nSrcHeight,
+ virtual void copyArea( tools::Long nDestX,
+ tools::Long nDestY,
+ tools::Long nSrcX,
+ tools::Long nSrcY,
+ tools::Long nSrcWidth,
+ tools::Long nSrcHeight,
bool bWindowInvalidate) override;
virtual void copyBits( const SalTwoRect& rPosAry,
SalGraphics* pSrcGraphics ) override;
@@ -257,12 +257,12 @@ public:
virtual void drawMask( const SalTwoRect& rPosAry,
const SalBitmap& rSalBitmap,
Color nMaskColor ) override;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
- virtual Color getPixel( long nX, long nY ) override;
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags ) override;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
- virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize ) override;
+ virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
virtual SystemGraphicsData GetGraphicsData() const override;
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index ae1290729b4c..e95353a0c227 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -135,7 +135,7 @@ public:
// pData allows for using a system dependent graphics or device context
virtual std::unique_ptr<SalVirtualDevice>
CreateVirtualDevice( SalGraphics* pGraphics,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
// Printer
diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx
index 7ec66670957e..f7270a3ee0e6 100644
--- a/vcl/inc/headless/svpvd.hxx
+++ b/vcl/inc/headless/svpvd.hxx
@@ -38,7 +38,7 @@ class VCL_DLLPUBLIC SvpSalVirtualDevice : public SalVirtualDevice
basegfx::B2IVector m_aFrameSize;
std::vector< SvpSalGraphics* > m_aGraphics;
- void CreateSurface(long nNewDX, long nNewDY, sal_uInt8 *const pBuffer);
+ void CreateSurface(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8 *const pBuffer);
protected:
SvpSalGraphics* AddGraphics(SvpSalGraphics* aGraphics);
@@ -51,16 +51,16 @@ public:
virtual SalGraphics* AcquireGraphics() override;
virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
- virtual bool SetSize( long nNewDX, long nNewDY ) override;
- virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
+ virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
+ virtual bool SetSizeUsingBuffer( tools::Long nNewDX, tools::Long nNewDY,
sal_uInt8 * pBuffer
) override;
cairo_surface_t* GetSurface() const { return m_pSurface; }
// SalGeometryProvider
- virtual long GetWidth() const override;
- virtual long GetHeight() const override;
+ virtual tools::Long GetWidth() const override;
+ virtual tools::Long GetHeight() const override;
};
#endif // INCLUDED_VCL_INC_HEADLESS_SVPVD_HXX
diff --git a/vcl/inc/hyperlabel.hxx b/vcl/inc/hyperlabel.hxx
index 20076a89b253..5ff87d878465 100644
--- a/vcl/inc/hyperlabel.hxx
+++ b/vcl/inc/hyperlabel.hxx
@@ -62,7 +62,7 @@ namespace vcl
void SetClickHdl( const Link<HyperLabel*,void>& rLink ) { maClickHdl = rLink; }
- Size const & CalcMinimumSize( long nMaxWidth ) const;
+ Size const & CalcMinimumSize( tools::Long nMaxWidth ) const;
};
}
diff --git a/vcl/inc/iconview.hxx b/vcl/inc/iconview.hxx
index f9b623688621..091f08fb2d3b 100644
--- a/vcl/inc/iconview.hxx
+++ b/vcl/inc/iconview.hxx
@@ -29,9 +29,9 @@ public:
virtual void Resize() override;
- virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, long nEntryPos) override;
+ virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, tools::Long nEntryPos) override;
- void PaintEntry( SvTreeListEntry&, long nX, long nY, vcl::RenderContext& rRenderContext);
+ void PaintEntry( SvTreeListEntry&, tools::Long nX, tools::Long nY, vcl::RenderContext& rRenderContext);
};
#endif
diff --git a/vcl/inc/impanmvw.hxx b/vcl/inc/impanmvw.hxx
index b4e634071279..99bd7cd5dff2 100644
--- a/vcl/inc/impanmvw.hxx
+++ b/vcl/inc/impanmvw.hxx
@@ -34,7 +34,7 @@ struct AInfo
Size aStartSize;
VclPtr<OutputDevice> pOutDev;
void* pViewData;
- long nExtraData;
+ tools::Long nExtraData;
bool bPause;
AInfo();
@@ -49,7 +49,7 @@ private:
Animation* mpParent;
VclPtr<OutputDevice> mpRenderContext;
- long mnExtraData;
+ tools::Long mnExtraData;
Point maPt;
Point maDispPt;
Point maRestPt;
@@ -74,7 +74,7 @@ private:
const Point& rPt, const Size& rSz, sal_uLong nExtraData,
OutputDevice* pFirstFrameOutDev = nullptr );
- bool matches(const OutputDevice* pOut, long nExtraData) const;
+ bool matches(const OutputDevice* pOut, tools::Long nExtraData) const;
void drawToPos( sal_uLong nPos );
void draw( sal_uLong nPos, VirtualDevice* pVDev=nullptr );
void repaint();
diff --git a/vcl/inc/impfontmetricdata.hxx b/vcl/inc/impfontmetricdata.hxx
index d801b9e41c13..ec1d98ccba41 100644
--- a/vcl/inc/impfontmetricdata.hxx
+++ b/vcl/inc/impfontmetricdata.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_INC_IMPFONTMETRICDATA_HXX
#include <vcl/dllapi.h>
+#include <tools/long.hxx>
#include <tools/ref.hxx>
#include "fontattributes.hxx"
#include "sft.hxx"
@@ -40,55 +41,55 @@ public:
explicit ImplFontMetricData( const FontSelectPattern& );
// font instance attributes from the font request
- long GetWidth() const { return mnWidth; }
+ tools::Long GetWidth() const { return mnWidth; }
short GetOrientation() const { return mnOrientation; }
- void SetWidth(long nWidth) { mnWidth=nWidth; }
+ void SetWidth(tools::Long nWidth) { mnWidth=nWidth; }
void SetOrientation(short nOrientation) { mnOrientation=nOrientation; }
// font metrics measured for the font instance
- long GetAscent() const { return mnAscent; }
- long GetDescent() const { return mnDescent; }
- long GetInternalLeading() const { return mnIntLeading; }
- long GetExternalLeading() const { return mnExtLeading; }
+ tools::Long GetAscent() const { return mnAscent; }
+ tools::Long GetDescent() const { return mnDescent; }
+ tools::Long GetInternalLeading() const { return mnIntLeading; }
+ tools::Long GetExternalLeading() const { return mnExtLeading; }
int GetSlant() const { return mnSlant; }
- long GetMinKashida() const { return mnMinKashida; }
+ tools::Long GetMinKashida() const { return mnMinKashida; }
void SetSlant(int nSlant) { mnSlant=nSlant; }
- void SetMinKashida( long nMinKashida ) { mnMinKashida=nMinKashida; }
+ void SetMinKashida( tools::Long nMinKashida ) { mnMinKashida=nMinKashida; }
// font attributes queried from the font instance
bool IsFullstopCentered() const { return mbFullstopCentered; }
- long GetBulletOffset() const { return mnBulletOffset; }
+ tools::Long GetBulletOffset() const { return mnBulletOffset; }
void SetFullstopCenteredFlag(bool bFullstopCentered) { mbFullstopCentered = bFullstopCentered; }
// font metrics that are usually derived from the measurements
- long GetUnderlineSize() const { return mnUnderlineSize; }
- long GetUnderlineOffset() const { return mnUnderlineOffset; }
- long GetBoldUnderlineSize() const { return mnBUnderlineSize; }
- long GetBoldUnderlineOffset() const { return mnBUnderlineOffset; }
- long GetDoubleUnderlineSize() const { return mnDUnderlineSize; }
- long GetDoubleUnderlineOffset1() const { return mnDUnderlineOffset1; }
- long GetDoubleUnderlineOffset2() const { return mnDUnderlineOffset2; }
- long GetWavelineUnderlineSize() const { return mnWUnderlineSize; }
- long GetWavelineUnderlineOffset() const { return mnWUnderlineOffset; }
- long GetAboveUnderlineSize() const { return mnAboveUnderlineSize; }
- long GetAboveUnderlineOffset() const { return mnAboveUnderlineOffset; }
- long GetAboveBoldUnderlineSize() const { return mnAboveBUnderlineSize; }
- long GetAboveBoldUnderlineOffset() const { return mnAboveBUnderlineOffset; }
- long GetAboveDoubleUnderlineSize() const { return mnAboveDUnderlineSize; }
- long GetAboveDoubleUnderlineOffset1() const { return mnAboveDUnderlineOffset1; }
- long GetAboveDoubleUnderlineOffset2() const { return mnAboveDUnderlineOffset2; }
- long GetAboveWavelineUnderlineSize() const { return mnAboveWUnderlineSize; }
- long GetAboveWavelineUnderlineOffset() const { return mnAboveWUnderlineOffset; }
- long GetStrikeoutSize() const { return mnStrikeoutSize; }
- long GetStrikeoutOffset() const { return mnStrikeoutOffset; }
- long GetBoldStrikeoutSize() const { return mnBStrikeoutSize; }
- long GetBoldStrikeoutOffset() const { return mnBStrikeoutOffset; }
- long GetDoubleStrikeoutSize() const { return mnDStrikeoutSize; }
- long GetDoubleStrikeoutOffset1() const { return mnDStrikeoutOffset1; }
- long GetDoubleStrikeoutOffset2() const { return mnDStrikeoutOffset2; }
+ tools::Long GetUnderlineSize() const { return mnUnderlineSize; }
+ tools::Long GetUnderlineOffset() const { return mnUnderlineOffset; }
+ tools::Long GetBoldUnderlineSize() const { return mnBUnderlineSize; }
+ tools::Long GetBoldUnderlineOffset() const { return mnBUnderlineOffset; }
+ tools::Long GetDoubleUnderlineSize() const { return mnDUnderlineSize; }
+ tools::Long GetDoubleUnderlineOffset1() const { return mnDUnderlineOffset1; }
+ tools::Long GetDoubleUnderlineOffset2() const { return mnDUnderlineOffset2; }
+ tools::Long GetWavelineUnderlineSize() const { return mnWUnderlineSize; }
+ tools::Long GetWavelineUnderlineOffset() const { return mnWUnderlineOffset; }
+ tools::Long GetAboveUnderlineSize() const { return mnAboveUnderlineSize; }
+ tools::Long GetAboveUnderlineOffset() const { return mnAboveUnderlineOffset; }
+ tools::Long GetAboveBoldUnderlineSize() const { return mnAboveBUnderlineSize; }
+ tools::Long GetAboveBoldUnderlineOffset() const { return mnAboveBUnderlineOffset; }
+ tools::Long GetAboveDoubleUnderlineSize() const { return mnAboveDUnderlineSize; }
+ tools::Long GetAboveDoubleUnderlineOffset1() const { return mnAboveDUnderlineOffset1; }
+ tools::Long GetAboveDoubleUnderlineOffset2() const { return mnAboveDUnderlineOffset2; }
+ tools::Long GetAboveWavelineUnderlineSize() const { return mnAboveWUnderlineSize; }
+ tools::Long GetAboveWavelineUnderlineOffset() const { return mnAboveWUnderlineOffset; }
+ tools::Long GetStrikeoutSize() const { return mnStrikeoutSize; }
+ tools::Long GetStrikeoutOffset() const { return mnStrikeoutOffset; }
+ tools::Long GetBoldStrikeoutSize() const { return mnBStrikeoutSize; }
+ tools::Long GetBoldStrikeoutOffset() const { return mnBStrikeoutOffset; }
+ tools::Long GetDoubleStrikeoutSize() const { return mnDStrikeoutSize; }
+ tools::Long GetDoubleStrikeoutOffset1() const { return mnDStrikeoutOffset1; }
+ tools::Long GetDoubleStrikeoutOffset2() const { return mnDStrikeoutOffset2; }
void ImplInitTextLineSize( const OutputDevice* pDev );
void ImplInitAboveTextLineSize();
@@ -99,48 +100,48 @@ private:
bool ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo);
// font instance attributes from the font request
- long mnHeight; // Font size
- long mnWidth; // Reference Width
+ tools::Long mnHeight; // Font size
+ tools::Long mnWidth; // Reference Width
short mnOrientation; // Rotation in 1/10 degrees
// font metrics measured for the font instance
- long mnAscent; // Ascent
- long mnDescent; // Descent
- long mnIntLeading; // Internal Leading
- long mnExtLeading; // External Leading
+ tools::Long mnAscent; // Ascent
+ tools::Long mnDescent; // Descent
+ tools::Long mnIntLeading; // Internal Leading
+ tools::Long mnExtLeading; // External Leading
int mnSlant; // Slant (Italic/Oblique)
- long mnMinKashida; // Minimal width of kashida (Arabic)
+ tools::Long mnMinKashida; // Minimal width of kashida (Arabic)
// font attributes queried from the font instance
bool mbFullstopCentered;
- long mnBulletOffset; // Offset to position non-print character
+ tools::Long mnBulletOffset; // Offset to position non-print character
// font metrics that are usually derived from the measurements
- long mnUnderlineSize; // Lineheight of Underline
- long mnUnderlineOffset; // Offset from Underline to Baseline
- long mnBUnderlineSize; // Height of bold underline
- long mnBUnderlineOffset; // Offset from bold underline to baseline
- long mnDUnderlineSize; // Height of double underline
- long mnDUnderlineOffset1; // Offset from double underline to baseline
- long mnDUnderlineOffset2; // Offset from double underline to baseline
- long mnWUnderlineSize; // Height of WaveLine underline
- long mnWUnderlineOffset; // Offset from WaveLine underline to baseline, but centrered to WaveLine
- long mnAboveUnderlineSize; // Height of single underline (for Vertical Right)
- long mnAboveUnderlineOffset; // Offset from single underline to baseline (for Vertical Right)
- long mnAboveBUnderlineSize; // Height of bold underline (for Vertical Right)
- long mnAboveBUnderlineOffset; // Offset from bold underline to baseline (for Vertical Right)
- long mnAboveDUnderlineSize; // Height of double underline (for Vertical Right)
- long mnAboveDUnderlineOffset1; // Offset from double underline to baseline (for Vertical Right)
- long mnAboveDUnderlineOffset2; // Offset from double underline to baseline (for Vertical Right)
- long mnAboveWUnderlineSize; // Height of WaveLine-strike-out (for Vertical Right)
- long mnAboveWUnderlineOffset; // Offset from WaveLine-strike-out to baseline, but centrered to the WaveLine (for Vertical Right)
- long mnStrikeoutSize; // Height of single strike-out
- long mnStrikeoutOffset; // Offset from single strike-out to baseline
- long mnBStrikeoutSize; // Height of bold strike-out
- long mnBStrikeoutOffset; // Offset of bold strike-out to baseline
- long mnDStrikeoutSize; // Height of double strike-out
- long mnDStrikeoutOffset1; // Offset of double strike-out to baseline
- long mnDStrikeoutOffset2; // Offset of double strike-out to baseline
+ tools::Long mnUnderlineSize; // Lineheight of Underline
+ tools::Long mnUnderlineOffset; // Offset from Underline to Baseline
+ tools::Long mnBUnderlineSize; // Height of bold underline
+ tools::Long mnBUnderlineOffset; // Offset from bold underline to baseline
+ tools::Long mnDUnderlineSize; // Height of double underline
+ tools::Long mnDUnderlineOffset1; // Offset from double underline to baseline
+ tools::Long mnDUnderlineOffset2; // Offset from double underline to baseline
+ tools::Long mnWUnderlineSize; // Height of WaveLine underline
+ tools::Long mnWUnderlineOffset; // Offset from WaveLine underline to baseline, but centrered to WaveLine
+ tools::Long mnAboveUnderlineSize; // Height of single underline (for Vertical Right)
+ tools::Long mnAboveUnderlineOffset; // Offset from single underline to baseline (for Vertical Right)
+ tools::Long mnAboveBUnderlineSize; // Height of bold underline (for Vertical Right)
+ tools::Long mnAboveBUnderlineOffset; // Offset from bold underline to baseline (for Vertical Right)
+ tools::Long mnAboveDUnderlineSize; // Height of double underline (for Vertical Right)
+ tools::Long mnAboveDUnderlineOffset1; // Offset from double underline to baseline (for Vertical Right)
+ tools::Long mnAboveDUnderlineOffset2; // Offset from double underline to baseline (for Vertical Right)
+ tools::Long mnAboveWUnderlineSize; // Height of WaveLine-strike-out (for Vertical Right)
+ tools::Long mnAboveWUnderlineOffset; // Offset from WaveLine-strike-out to baseline, but centrered to the WaveLine (for Vertical Right)
+ tools::Long mnStrikeoutSize; // Height of single strike-out
+ tools::Long mnStrikeoutOffset; // Offset from single strike-out to baseline
+ tools::Long mnBStrikeoutSize; // Height of bold strike-out
+ tools::Long mnBStrikeoutOffset; // Offset of bold strike-out to baseline
+ tools::Long mnDStrikeoutSize; // Height of double strike-out
+ tools::Long mnDStrikeoutOffset1; // Offset of double strike-out to baseline
+ tools::Long mnDStrikeoutOffset2; // Offset of double strike-out to baseline
};
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 211a2ecd56ea..9ad34e6f57b1 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -157,10 +157,10 @@ private:
void ImplStartAnimation( OutputDevice* pOutDev,
const Point& rDestPt,
const Size& rDestSize,
- long nExtraData,
+ tools::Long nExtraData,
OutputDevice* pFirstFrameOutDev );
void ImplStopAnimation( const OutputDevice* pOutputDevice,
- long nExtraData );
+ tools::Long nExtraData );
void ImplSetAnimationNotifyHdl( const Link<Animation*,void>& rLink );
Link<Animation*,void> ImplGetAnimationNotifyHdl() const;
diff --git a/vcl/inc/jobset.h b/vcl/inc/jobset.h
index ce53c0541284..e3f154254e35 100644
--- a/vcl/inc/jobset.h
+++ b/vcl/inc/jobset.h
@@ -41,8 +41,8 @@ private:
DuplexMode meDuplexMode; //< Duplex
sal_uInt16 mnPaperBin; //< paper bin / in tray
Paper mePaperFormat; //< paper format
- long mnPaperWidth; //< paper width (100th mm)
- long mnPaperHeight; //< paper height (100th mm)
+ tools::Long mnPaperWidth; //< paper width (100th mm)
+ tools::Long mnPaperHeight; //< paper height (100th mm)
sal_uInt32 mnDriverDataLen; //< length of system specific data
sal_uInt8* mpDriverData; //< system specific data (will be streamed a byte block)
bool mbPapersizeFromSetup;
@@ -79,11 +79,11 @@ public:
Paper GetPaperFormat() const { return mePaperFormat; }
void SetPaperFormat(Paper ePaperFormat);
- long GetPaperWidth() const { return mnPaperWidth; }
- void SetPaperWidth(long nWidth);
+ tools::Long GetPaperWidth() const { return mnPaperWidth; }
+ void SetPaperWidth(tools::Long nWidth);
- long GetPaperHeight() const { return mnPaperHeight; }
- void SetPaperHeight(long nHeight);
+ tools::Long GetPaperHeight() const { return mnPaperHeight; }
+ void SetPaperHeight(tools::Long nHeight);
sal_uInt32 GetDriverDataLen() const { return mnDriverDataLen; }
void SetDriverDataLen(sal_uInt32 nDriverDataLen);
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 4d714e418d81..f18233574e7f 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -55,9 +55,9 @@ struct ImplEntryType
void* mpUserData;
bool mbIsSelected;
ListBoxEntryFlags mnFlags;
- long mnHeight;
+ tools::Long mnHeight;
- long getHeightWithMargin() const;
+ tools::Long getHeightWithMargin() const;
ImplEntryType( const OUString& rStr, const Image& rImage ) :
maStr( rStr ),
@@ -121,8 +121,8 @@ public:
/// GetAddedHeight( 0 ) @return 0
/// GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) @return 0
/// GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i )
- long GetAddedHeight( sal_Int32 nEndIndex, sal_Int32 nBeginIndex ) const;
- long GetEntryHeight( sal_Int32 nPos ) const;
+ tools::Long GetAddedHeight( sal_Int32 nEndIndex, sal_Int32 nBeginIndex ) const;
+ tools::Long GetEntryHeight( sal_Int32 nPos ) const;
sal_Int32 GetEntryCount() const { return static_cast<sal_Int32>(maEntries.size()); }
bool HasImages() const { return mnImages != 0; }
@@ -179,15 +179,15 @@ private:
Size maUserItemSize;
- long mnMaxTxtHeight; ///< Maximum height of a text item
- long mnMaxTxtWidth; ///< Maximum width of a text item
+ tools::Long mnMaxTxtHeight; ///< Maximum height of a text item
+ tools::Long mnMaxTxtWidth; ///< Maximum width of a text item
///< Entry without Image
- long mnMaxImgTxtWidth;///< Maximum width of a text item
+ tools::Long mnMaxImgTxtWidth;///< Maximum width of a text item
///< Entry AND Image
- long mnMaxImgWidth; ///< Maximum width of an image item
- long mnMaxImgHeight; ///< Maximum height of an image item
- long mnMaxWidth; ///< Maximum width of an entry
- long mnMaxHeight; ///< Maximum height of an entry
+ tools::Long mnMaxImgWidth; ///< Maximum width of an image item
+ tools::Long mnMaxImgHeight; ///< Maximum height of an image item
+ tools::Long mnMaxWidth; ///< Maximum width of an entry
+ tools::Long mnMaxHeight; ///< Maximum height of an entry
sal_Int32 mnCurrentPos; ///< Position (Focus)
sal_Int32 mnTrackingSaveSelection; ///< Selection before Tracking();
@@ -197,8 +197,8 @@ private:
sal_Int32 mnUserDrawEntry;
sal_Int32 mnTop; ///< output from line on
- long mnLeft; ///< output from column on
- long mnTextHeight; ///< text height
+ tools::Long mnLeft; ///< output from column on
+ tools::Long mnTextHeight; ///< text height
sal_uInt16 mnSelectModifier; ///< Modifiers
@@ -290,9 +290,9 @@ public:
using Window::IsVisible;
bool IsVisible( sal_Int32 nEntry ) const;
- long GetLeftIndent() const { return mnLeft; }
- void SetLeftIndent( long n );
- void ScrollHorz( long nDiff );
+ tools::Long GetLeftIndent() const { return mnLeft; }
+ void SetLeftIndent( tools::Long n );
+ void ScrollHorz( tools::Long nDiff );
void AllowGrabFocus( bool b ) { mbGrabFocus = b; }
bool IsGrabFocusAllowed() const { return mbGrabFocus; }
@@ -337,9 +337,9 @@ public:
Size CalcSize(sal_Int32 nMaxLines) const;
tools::Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
- long GetEntryHeight() const { return mnMaxHeight; }
- long GetEntryHeightWithMargin() const;
- long GetMaxEntryWidth() const { return mnMaxWidth; }
+ tools::Long GetEntryHeight() const { return mnMaxHeight; }
+ tools::Long GetEntryHeightWithMargin() const;
+ tools::Long GetMaxEntryWidth() const { return mnMaxWidth; }
void SetScrollHdl( const Link<ImplListBoxWindow*,void>& rLink ) { maScrollHdl = rLink; }
void SetSelectHdl( const Link<LinkParamNone*,void>& rLink ) { maSelectHdl = rLink; }
@@ -451,7 +451,7 @@ public:
using Window::IsVisible;
bool IsVisible( sal_Int32 nEntry ) const { return maLBWindow->IsVisible( nEntry ); }
- long GetLeftIndent() const { return maLBWindow->GetLeftIndent(); }
+ tools::Long GetLeftIndent() const { return maLBWindow->GetLeftIndent(); }
void SetLeftIndent( sal_uInt16 n ) { maLBWindow->SetLeftIndent( n ); }
void SetTravelSelect( bool bTravelSelect ) { maLBWindow->SetTravelSelect( bTravelSelect ); }
@@ -467,9 +467,9 @@ public:
bool IsReadOnly() const { return maLBWindow->IsReadOnly(); }
Size CalcSize( sal_Int32 nMaxLines ) const { return maLBWindow->CalcSize( nMaxLines ); }
- long GetEntryHeight() const { return maLBWindow->GetEntryHeight(); }
- long GetEntryHeightWithMargin() const{ return maLBWindow->GetEntryHeightWithMargin(); }
- long GetMaxEntryWidth() const { return maLBWindow->GetMaxEntryWidth(); }
+ tools::Long GetEntryHeight() const { return maLBWindow->GetEntryHeight(); }
+ tools::Long GetEntryHeightWithMargin() const{ return maLBWindow->GetEntryHeightWithMargin(); }
+ tools::Long GetMaxEntryWidth() const { return maLBWindow->GetMaxEntryWidth(); }
void SetScrollHdl( const Link<ImplListBox*,void>& rLink ) { maScrollHdl = rLink; }
void SetSelectHdl( const Link<LinkParamNone*,void>& rLink ) { maLBWindow->SetSelectHdl( rLink ); }
@@ -520,8 +520,8 @@ public:
Size CalcFloatSize();
void StartFloat( bool bStartTracking );
- virtual void setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override;
+ virtual void setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override;
void SetDropDownLineCount( sal_uInt16 n ) { mnDDLineCount = n; }
sal_uInt16 GetDropDownLineCount() const { return mnDDLineCount; }
diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx
index 213a2f43b554..236fa570aec1 100644
--- a/vcl/inc/opengl/RenderList.hxx
+++ b/vcl/inc/opengl/RenderList.hxx
@@ -152,12 +152,12 @@ public:
VCL_DLLPUBLIC void addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, Color nColor, const SalTwoRect& r2Rect);
- void addDrawPixel(long nX, long nY, Color nColor);
+ void addDrawPixel(tools::Long nX, tools::Long nY, Color nColor);
- void addDrawRectangle(long nX, long nY, long nWidth, long nHeight, double fTransparency,
+ void addDrawRectangle(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, double fTransparency,
Color nLineColor, Color nFillColor);
- void addDrawLine(long nX1, long nY1, long nX2, long nY2, Color nLineColor, bool bUseAA);
+ void addDrawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, Color nLineColor, bool bUseAA);
void addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency,
Color nLineColor, Color nFillColor, bool bUseAA);
diff --git a/vcl/inc/opengl/gdiimpl.hxx b/vcl/inc/opengl/gdiimpl.hxx
index da6ce6713998..13f75ae19b3f 100644
--- a/vcl/inc/opengl/gdiimpl.hxx
+++ b/vcl/inc/opengl/gdiimpl.hxx
@@ -124,7 +124,7 @@ public:
void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool blockAA = false );
void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA );
void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA );
- void DrawRect( long nX, long nY, long nWidth, long nHeight );
+ void DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
void DrawRect( const tools::Rectangle& rRect );
void DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry );
void DrawLineSegment(float x1, float y1, float x2, float y2);
@@ -208,7 +208,7 @@ public:
virtual sal_uInt16 GetBitCount() const override;
// get the width of the device
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
// set the clip region to empty
virtual void ResetClipRegion() override;
@@ -237,12 +237,12 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor ) override;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel( long nX, long nY ) override;
- virtual void drawPixel( long nX, long nY, Color nColor ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -284,9 +284,9 @@ public:
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+ tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate ) override;
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -315,21 +315,21 @@ public:
const SalBitmap& rSalBitmap,
Color nMaskColor ) override;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
- virtual Color getPixel( long nX, long nY ) override;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
// invert --> ClipRegion (only Windows or VirDevs)
virtual void invert(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags) override;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
virtual bool drawEPS(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
void* pPtr,
sal_uInt32 nSize ) override;
@@ -374,8 +374,8 @@ public:
@returns true if successfully drawn, false if not able to draw rectangle
*/
virtual bool drawAlphaRect(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency ) override;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index bff248d9bfab..b69eb0282c88 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -89,7 +89,7 @@ public:
void SetColor( const OString& rName, const Color& rColor );
void SetColor( const OString& rName, Color nColor, sal_uInt8 nTransparency );
void SetColorf( const OString& rName, Color nColor, double fTransparency );
- void SetColorWithIntensity( const OString& rName, const Color& rColor, long nFactor );
+ void SetColorWithIntensity( const OString& rName, const Color& rColor, tools::Long nFactor );
void SetTexture( const OString& rName, OpenGLTexture& rTexture );
void SetTransform( const OString& rName, const OpenGLTexture& rTexture,
const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX,
diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
index a01eca89f0fe..61d2d37e90c2 100644
--- a/vcl/inc/opengl/salbmp.hxx
+++ b/vcl/inc/opengl/salbmp.hxx
@@ -84,7 +84,7 @@ public:
public:
- void Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight );
+ void Create( const OpenGLTexture& rTex, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
OpenGLTexture& GetTexture() const;
const BitmapPalette& GetBitmapPalette() const { return maPalette; }
diff --git a/vcl/inc/opengl/x11/salvd.hxx b/vcl/inc/opengl/x11/salvd.hxx
index a77b9874e48b..9c8d3cb70165 100644
--- a/vcl/inc/opengl/x11/salvd.hxx
+++ b/vcl/inc/opengl/x11/salvd.hxx
@@ -33,14 +33,14 @@ class X11OpenGLSalVirtualDevice : public SalVirtualDevice
public:
X11OpenGLSalVirtualDevice( SalGraphics const *pGraphics,
- long nDX, long nDY,
+ tools::Long nDX, tools::Long nDY,
const SystemGraphicsData *pData,
std::unique_ptr<X11SalGraphics> pNewGraphics);
virtual ~X11OpenGLSalVirtualDevice() override;
// SalGeometryProvider
- virtual long GetWidth() const override { return mnWidth; }
- virtual long GetHeight() const override { return mnHeight; }
+ virtual tools::Long GetWidth() const override { return mnWidth; }
+ virtual tools::Long GetHeight() const override { return mnHeight; }
SalDisplay * GetDisplay() const { return mpDisplay; }
const SalX11Screen& GetXScreenNumber() const { return mnXScreen; }
@@ -49,7 +49,7 @@ public:
virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
// Set new size, without saving the old contents
- virtual bool SetSize( long nNewDX, long nNewDY ) override;
+ virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
};
#endif // INCLUDED_VCL_INC_OPENGL_X11_SALVD_H
diff --git a/vcl/inc/qt5/Qt5Graphics.hxx b/vcl/inc/qt5/Qt5Graphics.hxx
index 1515783f6076..bef2f9dc4f66 100644
--- a/vcl/inc/qt5/Qt5Graphics.hxx
+++ b/vcl/inc/qt5/Qt5Graphics.hxx
@@ -99,10 +99,12 @@ public:
virtual bool setClipRegion(const vcl::Region&) override;
virtual void ResetClipRegion() override;
- virtual void drawPixel(long nX, long nY) override;
- virtual void drawPixel(long nX, long nY, Color nColor) override;
- virtual void drawLine(long nX1, long nY1, long nX2, long nY2) override;
- virtual void drawRect(long nX, long nY, long nWidth, long nHeight) override;
+ virtual void drawPixel(tools::Long nX, tools::Long nY) override;
+ virtual void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
+ virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2,
+ tools::Long nY2) override;
+ virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight) override;
virtual void drawPolyLine(sal_uInt32 nPoints, const SalPoint* pPtAry) override;
virtual void drawPolygon(sal_uInt32 nPoints, const SalPoint* pPtAry) override;
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
@@ -123,8 +125,9 @@ public:
double fMiterMinimumAngle, bool bPixelSnapHairline) override;
virtual bool drawGradient(const tools::PolyPolygon&, const Gradient&) override;
- virtual void copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, bool bWindowInvalidate) override;
+ virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX,
+ tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
+ bool bWindowInvalidate) override;
virtual void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
virtual void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
@@ -133,15 +136,16 @@ public:
virtual void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
Color nMaskColor) override;
- virtual std::shared_ptr<SalBitmap> getBitmap(long nX, long nY, long nWidth,
- long nHeight) override;
- virtual Color getPixel(long nX, long nY) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight) override;
+ virtual Color getPixel(tools::Long nX, tools::Long nY) override;
- virtual void invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
+ virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ SalInvert nFlags) override;
virtual void invert(sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags) override;
- virtual bool drawEPS(long nX, long nY, long nWidth, long nHeight, void* pPtr,
- sal_uInt32 nSize) override;
+ virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ void* pPtr, sal_uInt32 nSize) override;
virtual bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
@@ -156,12 +160,12 @@ public:
const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
const SalBitmap* pAlphaBitmap) override;
- virtual bool drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
- sal_uInt8 nTransparency) override;
+ virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency) override;
virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
virtual sal_uInt16 GetBitCount() const override;
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
virtual void SetLineColor() override;
virtual void SetLineColor(Color nColor) override;
@@ -188,8 +192,8 @@ public:
FontSubsetInfo& rInfo // out parameter
) override;
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
- virtual void FreeEmbedFontData(const void* pData, long nDataLen) override;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
+ virtual void FreeEmbedFontData(const void* pData, tools::Long nDataLen) override;
virtual void GetGlyphWidths(const PhysicalFontFace*, bool bVertical,
std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc) override;
diff --git a/vcl/inc/qt5/Qt5VirtualDevice.hxx b/vcl/inc/qt5/Qt5VirtualDevice.hxx
index ad0dc3c3c804..0b94928199c8 100644
--- a/vcl/inc/qt5/Qt5VirtualDevice.hxx
+++ b/vcl/inc/qt5/Qt5VirtualDevice.hxx
@@ -45,12 +45,13 @@ public:
virtual SalGraphics* AcquireGraphics() override;
virtual void ReleaseGraphics(SalGraphics* pGraphics) override;
- virtual bool SetSize(long nNewDX, long nNewDY) override;
- virtual bool SetSizeUsingBuffer(long nNewDX, long nNewDY, sal_uInt8* pBuffer) override;
+ virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY) override;
+ virtual bool SetSizeUsingBuffer(tools::Long nNewDX, tools::Long nNewDY,
+ sal_uInt8* pBuffer) override;
// SalGeometryProvider
- virtual long GetWidth() const override;
- virtual long GetHeight() const override;
+ virtual tools::Long GetWidth() const override;
+ virtual tools::Long GetHeight() const override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/regband.hxx b/vcl/inc/regband.hxx
index c7b9e611947b..f92976c8a569 100644
--- a/vcl/inc/regband.hxx
+++ b/vcl/inc/regband.hxx
@@ -37,8 +37,8 @@ Intersection - the Class will process the clipping for the actual band.
struct ImplRegionBandSep
{
ImplRegionBandSep* mpNextSep;
- long mnXLeft;
- long mnXRight;
+ tools::Long mnXLeft;
+ tools::Long mnXRight;
bool mbRemoved;
};
@@ -48,8 +48,8 @@ enum class LineType { Ascending, Descending };
struct ImplRegionBandPoint
{
ImplRegionBandPoint* mpNextBandPoint;
- long mnX;
- long mnLineId;
+ tools::Long mnX;
+ tools::Long mnLineId;
bool mbEndPoint;
LineType meLineType;
};
@@ -61,13 +61,13 @@ public:
ImplRegionBand* mpPrevBand; // pointer to the previous element of the list (only used temporarily)
ImplRegionBandSep* mpFirstSep; // root of the list with x-separations
ImplRegionBandPoint* mpFirstBandPoint; // root of the list with lines
- long mnYTop; // actual boundary of the band
- long mnYBottom;
+ tools::Long mnYTop; // actual boundary of the band
+ tools::Long mnYBottom;
bool mbTouched : 1;
// create y-band with boundaries
- ImplRegionBand( long nYTop, long nYBottom );
+ ImplRegionBand( tools::Long nYTop, tools::Long nYBottom );
/** copy y-band with all data
@param theSourceBand
The new ImplRegionBand object will
@@ -85,8 +85,8 @@ public:
const bool bIgnorePoints = true);
~ImplRegionBand();
- long GetXLeftBoundary() const;
- long GetXRightBoundary() const;
+ tools::Long GetXLeftBoundary() const;
+ tools::Long GetXRightBoundary() const;
// combine overlapping bands
void OptimizeBand();
@@ -95,18 +95,18 @@ public:
// union with existing separations
void ProcessPoints();
// insert point in the list for later processing
- bool InsertPoint( long nX, long nLineID,
+ bool InsertPoint( tools::Long nX, tools::Long nLineID,
bool bEndPoint, LineType eLineType );
- void Union( long nXLeft, long nXRight );
- void Intersect( long nXLeft, long nXRight );
- void Exclude( long nXLeft, long nXRight );
- void XOr( long nXLeft, long nXRight );
+ void Union( tools::Long nXLeft, tools::Long nXRight );
+ void Intersect( tools::Long nXLeft, tools::Long nXRight );
+ void Exclude( tools::Long nXLeft, tools::Long nXRight );
+ void XOr( tools::Long nXLeft, tools::Long nXRight );
- void MoveX( long nHorzMove );
+ void MoveX( tools::Long nHorzMove );
void ScaleX( double fHorzScale );
- bool IsInside( long nX );
+ bool IsInside( tools::Long nX );
bool IsEmpty() const { return ((!mpFirstSep) && (!mpFirstBandPoint)); }
diff --git a/vcl/inc/regionband.hxx b/vcl/inc/regionband.hxx
index a007261489fb..30a75ac015de 100644
--- a/vcl/inc/regionband.hxx
+++ b/vcl/inc/regionband.hxx
@@ -52,22 +52,22 @@ public:
bool isSingleRectangle() const;
ImplRegionBand* ImplGetFirstRegionBand() const { return mpFirstBand; }
- void ImplAddMissingBands(const long nTop, const long nBottom);
+ void ImplAddMissingBands(const tools::Long nTop, const tools::Long nBottom);
void InsertBand(ImplRegionBand* pPreviousBand, ImplRegionBand* pBandToInsert);
void processPoints();
- void CreateBandRange(long nYTop, long nYBottom);
- void InsertLine(const Point& rStartPt, const Point& rEndPt, long nLineId);
- void InsertPoint(const Point &rPoint, long nLineID, bool bEndPoint, LineType eLineType);
+ void CreateBandRange(tools::Long nYTop, tools::Long nYBottom);
+ void InsertLine(const Point& rStartPt, const Point& rEndPt, tools::Long nLineId);
+ void InsertPoint(const Point &rPoint, tools::Long nLineID, bool bEndPoint, LineType eLineType);
bool OptimizeBandList();
- void Move(long nHorzMove, long nVertMove);
+ void Move(tools::Long nHorzMove, tools::Long nVertMove);
void Scale(double fScaleX, double fScaleY);
- void InsertBands(long nTop, long nBottom);
- static bool InsertSingleBand(ImplRegionBand* pBand, long nYBandPosition);
- void Union(long nLeft, long nTop, long nRight, long nBottom);
- void Intersect(long nLeft, long nTop, long nRight, long nBottom);
+ void InsertBands(tools::Long nTop, tools::Long nBottom);
+ static bool InsertSingleBand(ImplRegionBand* pBand, tools::Long nYBandPosition);
+ void Union(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom);
+ void Intersect(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom);
void Union(const RegionBand& rSource);
- void Exclude(long nLeft, long nTop, long nRight, long nBottom);
- void XOr(long nLeft, long nTop, long nRight, long nBottom);
+ void Exclude(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom);
+ void XOr(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom);
void Intersect(const RegionBand& rSource);
bool Exclude(const RegionBand& rSource);
void XOr(const RegionBand& rSource);
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index b83138e29d40..d55a40b1a93b 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -127,8 +127,8 @@ public:
SalFrameGeometry maGeometry = {}; ///< absolute, unmirrored values
// SalGeometryProvider
- virtual long GetWidth() const override { return maGeometry.nWidth; }
- virtual long GetHeight() const override { return maGeometry.nHeight; }
+ virtual tools::Long GetWidth() const override { return maGeometry.nWidth; }
+ virtual tools::Long GetHeight() const override { return maGeometry.nHeight; }
virtual bool IsOffScreen() const override { return false; }
// SalGraphics or NULL, but two Graphics for all SalFrames
@@ -154,10 +154,10 @@ public:
// Set ClientSize and Center the Window to the desktop
// and send/post a resize message
- virtual void SetMinClientSize( long nWidth, long nHeight ) = 0;
- virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) = 0;
- virtual void GetClientSize( long& rWidth, long& rHeight ) = 0;
+ virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) = 0;
+ virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) = 0;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) = 0;
+ virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) = 0;
virtual void GetWorkArea( tools::Rectangle& rRect ) = 0;
virtual SalFrame* GetParent() const = 0;
// Note: x will be mirrored at parent if UI mirroring is active
@@ -187,7 +187,7 @@ public:
// pointer style
virtual void SetPointer( PointerStyle ePointerStyle ) = 0;
virtual void CaptureMouse( bool bMouse ) = 0;
- virtual void SetPointerPos( long nX, long nY ) = 0;
+ virtual void SetPointerPos( tools::Long nX, tools::Long nY ) = 0;
// flush output buffer
virtual void Flush() = 0;
@@ -246,7 +246,7 @@ public:
// start setting the clipregion consisting of nRects rectangles
virtual void BeginSetClipRegion( sal_uInt32 nRects ) = 0;
// add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
// done setting up the clipregion
virtual void EndSetClipRegion() = 0;
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index c451bcc8e83f..0ae0653ee484 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -95,7 +95,7 @@ public:
virtual sal_uInt16 GetBitCount() const = 0;
// get the width of the device
- virtual long GetGraphicsWidth() const = 0;
+ virtual tools::Long GetGraphicsWidth() const = 0;
// set the clip region to empty
virtual void ResetClipRegion() = 0;
@@ -177,10 +177,10 @@ public:
// embeddable by GetDevFontList or NULL in case of error
// parameters: pFont: describes the font in question
// pDataLen: out parameter, contains the byte length of the returned buffer
- virtual const void* GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen) = 0;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) = 0;
// free the font data again
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) = 0;
// get the same widths as in CreateFontSubset
// in case of an embeddable font also fill the mapping
@@ -202,11 +202,11 @@ public:
SalLayoutFlags GetLayout() const { return m_nLayout; }
void SetLayout( SalLayoutFlags aLayout ) { m_nLayout = aLayout;}
- void mirror( long& nX, const OutputDevice *pOutDev ) const;
+ void mirror( tools::Long& nX, const OutputDevice *pOutDev ) const;
// only called mirror2 to avoid ambiguity
[[nodiscard]]
- long mirror2( long nX, const OutputDevice *pOutDev ) const;
- void mirror( long& nX, long nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
+ tools::Long mirror2( tools::Long nX, const OutputDevice *pOutDev ) const;
+ void mirror( tools::Long& nX, tools::Long nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const;
void mirror( tools::Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const;
@@ -219,12 +219,12 @@ public:
bool SetClipRegion( const vcl::Region&, const OutputDevice *pOutDev );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- void DrawPixel( long nX, long nY, const OutputDevice *pOutDev );
- void DrawPixel( long nX, long nY, Color nColor, const OutputDevice *pOutDev );
+ void DrawPixel( tools::Long nX, tools::Long nY, const OutputDevice *pOutDev );
+ void DrawPixel( tools::Long nX, tools::Long nY, Color nColor, const OutputDevice *pOutDev );
- void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev );
+ void DrawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, const OutputDevice *pOutDev );
- void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
+ void DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice *pOutDev );
void DrawPolyLine( sal_uInt32 nPoints, SalPoint const * pPtAry, const OutputDevice *pOutDev );
@@ -282,9 +282,9 @@ public:
// CopyArea --> No RasterOp, but ClipRegion
void CopyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+ tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
const OutputDevice *pOutDev );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -313,18 +313,18 @@ public:
const OutputDevice *pOutDev );
std::shared_ptr<SalBitmap> GetBitmap(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
const OutputDevice *pOutDev );
Color GetPixel(
- long nX, long nY,
+ tools::Long nX, tools::Long nY,
const OutputDevice *pOutDev );
// invert --> ClipRegion (only Windows)
void Invert(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags,
const OutputDevice *pOutDev );
@@ -335,8 +335,8 @@ public:
const OutputDevice *pOutDev );
bool DrawEPS(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
void* pPtr,
sal_uInt32 nSize,
const OutputDevice *pOutDev );
@@ -416,8 +416,8 @@ public:
const OutputDevice* pOutDev );
bool DrawAlphaRect(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency,
const OutputDevice *pOutDev );
@@ -443,12 +443,12 @@ protected:
virtual bool setClipRegion( const vcl::Region& ) = 0;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel( long nX, long nY ) = 0;
- virtual void drawPixel( long nX, long nY, Color nColor ) = 0;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) = 0;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) = 0;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) = 0;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) = 0;
@@ -500,9 +500,9 @@ protected:
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+ tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate ) = 0;
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -521,21 +521,21 @@ protected:
const SalBitmap& rSalBitmap,
Color nMaskColor ) = 0;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
- virtual Color getPixel( long nX, long nY ) = 0;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) = 0;
// invert --> ClipRegion (only Windows or VirDevs)
virtual void invert(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags) = 0;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
virtual bool drawEPS(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
void* pPtr,
sal_uInt32 nSize ) = 0;
@@ -587,8 +587,8 @@ protected:
* @returns true if successfully drawn, false if not able to draw rectangle
*/
virtual bool drawAlphaRect(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency ) = 0;
private:
@@ -596,13 +596,13 @@ private:
// for buffering the Mirror-Matrix, see ::getMirror
basegfx::B2DHomMatrix m_aLastMirror;
- long m_aLastMirrorW;
+ tools::Long m_aLastMirrorW;
protected:
/// flags which hold the SetAntialiasing() value from OutputDevice
bool m_bAntiAlias : 1;
- inline long GetDeviceWidth(const OutputDevice* pOutDev) const;
+ inline tools::Long GetDeviceWidth(const OutputDevice* pOutDev) const;
/**
* Handle damage done by drawing with a widget draw override
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 1af6e68bc2b0..ce86fcbd74df 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -59,7 +59,7 @@ public:
virtual sal_uInt16 GetBitCount() const = 0;
// get the width of the device
- virtual long GetGraphicsWidth() const = 0;
+ virtual tools::Long GetGraphicsWidth() const = 0;
// set the clip region to empty
virtual void ResetClipRegion() = 0;
@@ -88,12 +88,12 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor ) = 0;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel( long nX, long nY ) = 0;
- virtual void drawPixel( long nX, long nY, Color nColor ) = 0;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) = 0;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) = 0;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) = 0;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) = 0;
@@ -135,9 +135,9 @@ public:
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+ tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate ) = 0;
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -156,21 +156,21 @@ public:
const SalBitmap& rSalBitmap,
Color nMaskColor ) = 0;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
- virtual Color getPixel( long nX, long nY ) = 0;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) = 0;
// invert --> ClipRegion (only Windows or VirDevs)
virtual void invert(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags) = 0;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
virtual bool drawEPS(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
void* pPtr,
sal_uInt32 nSize ) = 0;
@@ -198,8 +198,8 @@ public:
const SalBitmap* pAlphaBitmap) = 0;
virtual bool drawAlphaRect(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency ) = 0;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) = 0;
diff --git a/vcl/inc/salgeom.hxx b/vcl/inc/salgeom.hxx
index 6adeb7a6937c..ac87d83f4a26 100644
--- a/vcl/inc/salgeom.hxx
+++ b/vcl/inc/salgeom.hxx
@@ -23,10 +23,11 @@
#include <iostream>
#include <vcl/dllapi.h>
+#include <tools/long.hxx>
struct SalFrameGeometry {
// screen position of upper left corner of drawable area in pixel
- long nX, nY;
+ tools::Long nX, nY;
// dimensions of the drawable area in pixel
unsigned long nWidth, nHeight;
// thickness of the decoration in pixel
@@ -62,8 +63,8 @@ inline std::ostream &operator <<(std::ostream& s, const SalFrameGeometry& rGeom)
class VCL_PLUGIN_PUBLIC SalGeometryProvider {
public:
virtual ~SalGeometryProvider() {}
- virtual long GetWidth() const = 0;
- virtual long GetHeight() const = 0;
+ virtual tools::Long GetWidth() const = 0;
+ virtual tools::Long GetHeight() const = 0;
virtual bool IsOffScreen() const = 0;
};
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 24c172e7d0f9..1a6ce96cf809 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -106,7 +106,7 @@ public:
// its size; otherwise these remain unchanged.
virtual std::unique_ptr<SalVirtualDevice>
CreateVirtualDevice( SalGraphics* pGraphics,
- long &rDX, long &rDY,
+ tools::Long &rDX, tools::Long &rDY,
DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) = 0;
// Printer
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 9ab526365ea7..6e8b2afb2854 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -128,7 +128,7 @@ public:
void DrawText(SalGraphics&) const override;
sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override;
DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const override;
- void GetCaretPositions(int nArraySize, long* pCaretXArray) const override;
+ void GetCaretPositions(int nArraySize, tools::Long* pCaretXArray) const override;
bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart,
const PhysicalFontFace** pFallbackFont = nullptr) const override;
bool GetOutline(basegfx::B2DPolyPolygonVector&) const override;
@@ -176,7 +176,7 @@ public:
DeviceCoordinate GetTextWidth() const final override;
DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const final override;
sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const final override;
- void GetCaretPositions(int nArraySize, long* pCaretXArray) const final override;
+ void GetCaretPositions(int nArraySize, tools::Long* pCaretXArray) const final override;
// used by display layers
LogicalFontInstance& GetFont() const
@@ -187,7 +187,7 @@ public:
private:
// for glyph+font+script fallback
- void MoveGlyph(int nStart, long nNewXPos);
+ void MoveGlyph(int nStart, tools::Long nNewXPos);
void DropGlyph(int nStart);
void Simplify(bool bIsBase);
diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx
index 6e79e49208bb..b5d9d64f82e4 100644
--- a/vcl/inc/salobj.hxx
+++ b/vcl/inc/salobj.hxx
@@ -41,10 +41,10 @@ public:
virtual void ResetClipRegion() = 0;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) = 0;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void EndSetClipRegion() = 0;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void Show( bool bVisible ) = 0;
virtual void Enable( bool /* nEnable */ ) {} // overridden by WinSalObject
virtual void GrabFocus() {}
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx
index 9c631dc02100..d72853b597bf 100644
--- a/vcl/inc/salprn.hxx
+++ b/vcl/inc/salprn.hxx
@@ -73,7 +73,7 @@ public:
virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) = 0;
virtual void GetPageInfo( const ImplJobSetup* pSetupData,
- long& rOutWidth, long& rOutHeight,
+ tools::Long& rOutWidth, tools::Long& rOutHeight,
Point& rPageOffset,
Size& rPaperSize ) = 0;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) = 0;
diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx
index 8a6fe144c3a1..d1035feaebdd 100644
--- a/vcl/inc/salvd.hxx
+++ b/vcl/inc/salvd.hxx
@@ -41,10 +41,10 @@ public:
virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
// Set new size, without saving the old contents
- virtual bool SetSize( long nNewDX, long nNewDY ) = 0;
+ virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) = 0;
// Set new size using a buffer at the given address
- virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
+ virtual bool SetSizeUsingBuffer( tools::Long nNewDX, tools::Long nNewDY,
sal_uInt8 * /* pBuffer */)
{
// Only the headless virtual device has an implementation that uses
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 7f925973bd92..a2fb935da53d 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -467,7 +467,7 @@ private:
// for calc ref dialog that shrink to range selection widgets and resize back
VclPtr<vcl::Window> m_xRefEdit;
std::vector<VclPtr<vcl::Window>> m_aHiddenWidgets; // vector of hidden Controls
- long m_nOldEditWidthReq; // Original width request of the input field
+ tools::Long m_nOldEditWidthReq; // Original width request of the input field
sal_Int32 m_nOldBorderWidth; // border width for expanded dialog
DECL_LINK(PopupScreenShotMenuHdl, const CommandEvent&, bool);
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index c6820fbc8cb9..ea2ee46af04f 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -24,6 +24,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <tools/solar.h>
+#include <tools/long.hxx>
#include <vcl/GestureEvent.hxx>
class LogicalFontInstance;
@@ -91,8 +92,8 @@ enum class SalEvent {
struct SalAbstractMouseEvent
{
sal_uInt64 mnTime; // Time in ms, when event is created
- long mnX; // X-Position (Pixel, TopLeft-Output)
- long mnY; // Y-Position (Pixel, TopLeft-Output)
+ tools::Long mnX; // X-Position (Pixel, TopLeft-Output)
+ tools::Long mnY; // Y-Position (Pixel, TopLeft-Output)
sal_uInt16 mnCode; // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT)
protected:
@@ -139,13 +140,13 @@ struct SalKeyModEvent
struct SalPaintEvent
{
- long mnBoundX; // BoundRect - X
- long mnBoundY; // BoundRect - Y
- long mnBoundWidth; // BoundRect - Width
- long mnBoundHeight; // BoundRect - Height
+ tools::Long mnBoundX; // BoundRect - X
+ tools::Long mnBoundY; // BoundRect - Y
+ tools::Long mnBoundWidth; // BoundRect - Width
+ tools::Long mnBoundHeight; // BoundRect - Height
bool mbImmediateUpdate; // set to true to force an immediate update
- SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) :
+ SalPaintEvent( tools::Long x, tools::Long y, tools::Long w, tools::Long h, bool bImmediate = false ) :
mnBoundX( x ), mnBoundY( y ),
mnBoundWidth( w ), mnBoundHeight( h ),
mbImmediateUpdate( bImmediate )
@@ -155,8 +156,8 @@ struct SalPaintEvent
#define SAL_WHEELMOUSE_EVENT_PAGESCROLL (sal_uLong(0xFFFFFFFF))
struct SalWheelMouseEvent final : public SalAbstractMouseEvent
{
- long mnDelta; // Number of rotations
- long mnNotchDelta; // Number of fixed rotations
+ tools::Long mnDelta; // Number of rotations
+ tools::Long mnNotchDelta; // Number of fixed rotations
double mnScrollLines; // Actual number of lines to scroll
bool mbHorz; // Horizontal
bool mbDeltaIsPixel; // delta value is a pixel value (on touch devices)
@@ -176,11 +177,11 @@ struct SalExtTextInputEvent
struct SalExtTextInputPosEvent
{
- long mnX; // Cursor-X-Position to upper left corner of frame
- long mnY; // Cursor-Y-Position to upper left corner of frame
- long mnWidth; // Cursor-Width in Pixel
- long mnHeight; // Cursor-Height in Pixel
- long mnExtWidth; // Width of the PreEdit area
+ tools::Long mnX; // Cursor-X-Position to upper left corner of frame
+ tools::Long mnY; // Cursor-Y-Position to upper left corner of frame
+ tools::Long mnWidth; // Cursor-Width in Pixel
+ tools::Long mnHeight; // Cursor-Height in Pixel
+ tools::Long mnExtWidth; // Width of the PreEdit area
bool mbVertical; // true if in vertical mode
SalExtTextInputPosEvent()
: mnX(0)
@@ -215,10 +216,10 @@ struct SalQueryCharPositionEvent
bool mbValid; // The data is valid or not.
sal_uLong mnCharPos; // The index of character in a composition.
bool mbVertical; // The text is vertical or not.
- long mnCursorBoundX; // The cursor bounds corresponding to the character specified by mnCharPos - X
- long mnCursorBoundY; // The cursor bounds corresponding to the character specified by mnCharPos - Y
- long mnCursorBoundWidth; // The cursor bounds corresponding to the character specified by mnCharPos - Width
- long mnCursorBoundHeight; // The cursor bounds corresponding to the character specified by mnCharPos - Height
+ tools::Long mnCursorBoundX; // The cursor bounds corresponding to the character specified by mnCharPos - X
+ tools::Long mnCursorBoundY; // The cursor bounds corresponding to the character specified by mnCharPos - Y
+ tools::Long mnCursorBoundWidth; // The cursor bounds corresponding to the character specified by mnCharPos - Width
+ tools::Long mnCursorBoundHeight; // The cursor bounds corresponding to the character specified by mnCharPos - Height
};
typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalEvent nEvent, const void* pEvent );
@@ -232,14 +233,14 @@ enum class SalObjEvent {
struct SalFrameState
{
WindowStateMask mnMask;
- long mnX;
- long mnY;
- long mnWidth;
- long mnHeight;
- long mnMaximizedX;
- long mnMaximizedY;
- long mnMaximizedWidth;
- long mnMaximizedHeight;
+ tools::Long mnX;
+ tools::Long mnY;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
+ tools::Long mnMaximizedX;
+ tools::Long mnMaximizedY;
+ tools::Long mnMaximizedWidth;
+ tools::Long mnMaximizedHeight;
WindowStateState mnState;
};
@@ -253,14 +254,14 @@ struct SalSwipeEvent
{
double mnVelocityX;
double mnVelocityY;
- long mnX;
- long mnY;
+ tools::Long mnX;
+ tools::Long mnY;
};
struct SalLongPressEvent
{
- long mnX;
- long mnY;
+ tools::Long mnX;
+ tools::Long mnY;
};
struct SalGestureEvent
@@ -268,8 +269,8 @@ struct SalGestureEvent
GestureEventType meEventType;
PanningOrientation meOrientation;
double mfOffset;
- long mnX;
- long mnY;
+ tools::Long mnX;
+ tools::Long mnY;
};
typedef void (*SALTIMERPROC)();
diff --git a/vcl/inc/scanlinewriter.hxx b/vcl/inc/scanlinewriter.hxx
index a5b892b02b6b..6be9623023cd 100644
--- a/vcl/inc/scanlinewriter.hxx
+++ b/vcl/inc/scanlinewriter.hxx
@@ -34,7 +34,7 @@ class ScanlineWriter
sal_uInt8 const mnColorBitSize; // number of bits a color takes
sal_uInt8 const mnColorBitMask; // bit mask used to isolate the color
sal_uInt8* mpCurrentScanline;
- long mnX;
+ tools::Long mnX;
public:
@@ -65,10 +65,10 @@ public:
void writeRGB(sal_uInt8 nR, sal_uInt8 nG, sal_uInt8 nB)
{
// calculate to which index we will write
- long nScanlineIndex = mnX / mnColorsPerByte;
+ tools::Long nScanlineIndex = mnX / mnColorsPerByte;
// calculate the number of shifts to get the color information to the right place
- long nShift = (8 - mnColorBitSize) - ((mnX % mnColorsPerByte) * mnColorBitSize);
+ tools::Long nShift = (8 - mnColorBitSize) - ((mnX % mnColorsPerByte) * mnColorBitSize);
sal_uInt16 nColorIndex = maPalette.GetBestIndex(BitmapColor(nR, nG, nB));
mpCurrentScanline[nScanlineIndex] &= ~(mnColorBitMask << nShift); // clear
diff --git a/vcl/inc/scrwnd.hxx b/vcl/inc/scrwnd.hxx
index c55fbd985497..879daa9c5021 100644
--- a/vcl/inc/scrwnd.hxx
+++ b/vcl/inc/scrwnd.hxx
@@ -52,12 +52,12 @@ private:
WheelMode mnWheelMode;
sal_uLong mnMaxWidth;
sal_uLong mnActDist;
- long mnActDeltaX;
- long mnActDeltaY;
+ tools::Long mnActDeltaX;
+ tools::Long mnActDeltaY;
void ImplCreateImageList();
void ImplSetRegion(const Bitmap& rRegionBmp);
using Window::ImplGetMousePointer;
- PointerStyle ImplGetMousePointer( long nDistX, long nDistY );
+ PointerStyle ImplGetMousePointer( tools::Long nDistX, tools::Long nDistY );
void ImplDrawWheel(vcl::RenderContext& rRenderContext);
void ImplRecalcScrollValues();
diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 3cc577300128..a1c32dd00910 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -57,7 +57,7 @@ public:
virtual sal_uInt16 GetBitCount() const override;
// get the width of the device
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
// set the clip region to empty
virtual void ResetClipRegion() override;
@@ -86,12 +86,14 @@ public:
virtual void SetROPFillColor(SalROPColor nROPColor) override;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel(long nX, long nY) override;
- virtual void drawPixel(long nX, long nY, Color nColor) override;
+ virtual void drawPixel(tools::Long nX, tools::Long nY) override;
+ virtual void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
- virtual void drawLine(long nX1, long nY1, long nX2, long nY2) override;
+ virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2,
+ tools::Long nY2) override;
- virtual void drawRect(long nX, long nY, long nWidth, long nHeight) override;
+ virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight) override;
virtual void drawPolyLine(sal_uInt32 nPoints, const SalPoint* pPtAry) override;
@@ -120,8 +122,9 @@ public:
const PolyFlags* const* pFlgAry) override;
// CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, bool bWindowInvalidate) override;
+ virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX,
+ tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
+ bool bWindowInvalidate) override;
virtual void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
@@ -139,18 +142,19 @@ public:
virtual void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
Color nMaskColor) override;
- virtual std::shared_ptr<SalBitmap> getBitmap(long nX, long nY, long nWidth,
- long nHeight) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight) override;
- virtual Color getPixel(long nX, long nY) override;
+ virtual Color getPixel(tools::Long nX, tools::Long nY) override;
// invert --> ClipRegion (only Windows or VirDevs)
- virtual void invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
+ virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ SalInvert nFlags) override;
virtual void invert(sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags) override;
- virtual bool drawEPS(long nX, long nY, long nWidth, long nHeight, void* pPtr,
- sal_uInt32 nSize) override;
+ virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ void* pPtr, sal_uInt32 nSize) override;
/** Render bitmap with alpha channel
@@ -187,8 +191,8 @@ public:
@returns true if successfully drawn, false if not able to draw rectangle
*/
- virtual bool drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
- sal_uInt8 nTransparency) override;
+ virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency) override;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon,
const Gradient& rGradient) override;
@@ -241,8 +245,8 @@ protected:
virtual void createWindowContext(bool forceRaster = false) = 0;
void createOffscreenSurface();
- void privateDrawAlphaRect(long nX, long nY, long nWidth, long nHeight, double nTransparency,
- bool blockAA = false);
+ void privateDrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, double nTransparency, bool blockAA = false);
void setProvider(SalGeometryProvider* provider) { mProvider = provider; }
@@ -289,8 +293,8 @@ protected:
// rounding results in off-by-one errors (down), especially when drawing using GPU,
// see https://bugs.chromium.org/p/skia/issues/detail?id=9611 . Compensate for
// it by using centers of pixels. Using 0.5 may sometimes round up, so go with 0.495 .
- static constexpr SkScalar toSkX(long x) { return x + 0.495; }
- static constexpr SkScalar toSkY(long y) { return y + 0.495; }
+ static constexpr SkScalar toSkX(tools::Long x) { return x + 0.495; }
+ static constexpr SkScalar toSkY(tools::Long y) { return y + 0.495; }
// Value to add to be exactly in the middle of the pixel.
static constexpr SkScalar toSkXYFix = SkScalar(0.005);
diff --git a/vcl/inc/skia/x11/salvd.hxx b/vcl/inc/skia/x11/salvd.hxx
index 8ff75175dc70..7beada38daf6 100644
--- a/vcl/inc/skia/x11/salvd.hxx
+++ b/vcl/inc/skia/x11/salvd.hxx
@@ -22,14 +22,14 @@ class X11SkiaSalVirtualDevice : public SalVirtualDevice
int mnHeight;
public:
- X11SkiaSalVirtualDevice(SalGraphics const* pGraphics, long nDX, long nDY,
+ X11SkiaSalVirtualDevice(SalGraphics const* pGraphics, tools::Long nDX, tools::Long nDY,
const SystemGraphicsData* pData,
std::unique_ptr<X11SalGraphics> pNewGraphics);
virtual ~X11SkiaSalVirtualDevice() override;
// SalGeometryProvider
- virtual long GetWidth() const override { return mnWidth; }
- virtual long GetHeight() const override { return mnHeight; }
+ virtual tools::Long GetWidth() const override { return mnWidth; }
+ virtual tools::Long GetHeight() const override { return mnHeight; }
SalDisplay* GetDisplay() const { return mpDisplay; }
const SalX11Screen& GetXScreenNumber() const { return mnXScreen; }
@@ -38,7 +38,7 @@ public:
virtual void ReleaseGraphics(SalGraphics* pGraphics) override;
// Set new size, without saving the old contents
- virtual bool SetSize(long nNewDX, long nNewDY) override;
+ virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY) override;
};
#endif // INCLUDED_VCL_INC_SKIA_X11_SALVD_H
diff --git a/vcl/inc/slider.hxx b/vcl/inc/slider.hxx
index 6f57d269c092..d0bac8419830 100644
--- a/vcl/inc/slider.hxx
+++ b/vcl/inc/slider.hxx
@@ -30,20 +30,20 @@ private:
tools::Rectangle maChannel1Rect;
tools::Rectangle maChannel2Rect;
tools::Rectangle maThumbRect;
- long mnStartPos;
- long mnMouseOff;
- long mnThumbPixOffset;
- long mnThumbPixRange;
- long mnThumbPixPos;
- long mnThumbSize;
- long mnChannelPixRange;
- long mnChannelPixTop;
- long mnChannelPixBottom;
- long mnMinRange;
- long mnMaxRange;
- long mnThumbPos;
- long mnLineSize;
- long mnPageSize;
+ tools::Long mnStartPos;
+ tools::Long mnMouseOff;
+ tools::Long mnThumbPixOffset;
+ tools::Long mnThumbPixRange;
+ tools::Long mnThumbPixPos;
+ tools::Long mnThumbSize;
+ tools::Long mnChannelPixRange;
+ tools::Long mnChannelPixTop;
+ tools::Long mnChannelPixBottom;
+ tools::Long mnMinRange;
+ tools::Long mnMaxRange;
+ tools::Long mnThumbPos;
+ tools::Long mnLineSize;
+ tools::Long mnPageSize;
sal_uInt16 mnStateFlags;
ScrollType meScrollType;
bool mbCalcSize;
@@ -55,16 +55,16 @@ private:
void ImplInit( vcl::Window* pParent, WinBits nStyle );
void ImplInitSettings();
void ImplUpdateRects( bool bUpdate = true );
- long ImplCalcThumbPos( long nPixPos );
- long ImplCalcThumbPosPix( long nPos );
+ tools::Long ImplCalcThumbPos( tools::Long nPixPos );
+ tools::Long ImplCalcThumbPosPix( tools::Long nPos );
void ImplCalc( bool bUpdate = true );
void ImplDraw(vcl::RenderContext& rRenderContext);
bool ImplIsPageUp( const Point& rPos );
bool ImplIsPageDown( const Point& rPos );
- long ImplSlide( long nNewPos );
- long ImplDoAction( );
+ tools::Long ImplSlide( tools::Long nNewPos );
+ tools::Long ImplDoAction( );
void ImplDoMouseAction( const Point& rPos, bool bCallAction );
- void ImplDoSlide( long nNewPos );
+ void ImplDoSlide( tools::Long nNewPos );
void ImplDoSlideAction( ScrollType eScrollType );
public:
@@ -81,17 +81,17 @@ public:
void Slide();
- void SetRangeMin(long nNewRange);
- long GetRangeMin() const { return mnMinRange; }
- void SetRangeMax(long nNewRange);
- long GetRangeMax() const { return mnMaxRange; }
+ void SetRangeMin(tools::Long nNewRange);
+ tools::Long GetRangeMin() const { return mnMinRange; }
+ void SetRangeMax(tools::Long nNewRange);
+ tools::Long GetRangeMax() const { return mnMaxRange; }
void SetRange( const Range& rRange );
- void SetThumbPos( long nThumbPos );
- long GetThumbPos() const { return mnThumbPos; }
- void SetLineSize( long nNewSize ) { mnLineSize = nNewSize; }
- long GetLineSize() const { return mnLineSize; }
- void SetPageSize( long nNewSize ) { mnPageSize = nNewSize; }
- long GetPageSize() const { return mnPageSize; }
+ void SetThumbPos( tools::Long nThumbPos );
+ tools::Long GetThumbPos() const { return mnThumbPos; }
+ void SetLineSize( tools::Long nNewSize ) { mnLineSize = nNewSize; }
+ tools::Long GetLineSize() const { return mnLineSize; }
+ void SetPageSize( tools::Long nNewSize ) { mnPageSize = nNewSize; }
+ tools::Long GetPageSize() const { return mnPageSize; }
Size CalcWindowSizePixel();
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 588a51de7115..b8a7a54f35b7 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -223,8 +223,8 @@ struct ImplSVGDIData
lru_scale_cache maScaleCache = lru_scale_cache(10); // Cache for scaled images
ImplDirectFontSubstitution* mpDirectFontSubst = nullptr; // Font-Substitutions defined in Tools->Options->Fonts
GraphicConverter* mpGrfConverter = nullptr; // Converter for graphics
- long mnAppFontX = 0; // AppFont X-Numenator for 40/tel Width
- long mnAppFontY = 0; // AppFont Y-Numenator for 80/tel Height
+ tools::Long mnAppFontX = 0; // AppFont X-Numenator for 40/tel Width
+ tools::Long mnAppFontY = 0; // AppFont Y-Numenator for 80/tel Height
bool mbFontSubChanged = false; // true: FontSubstitution was changed between Begin/End
o3tl::lru_map<OUString, BitmapEx> maThemeImageCache = o3tl::lru_map<OUString, BitmapEx>(10);
diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx
index 92d5754387c7..ae171cca8e65 100644
--- a/vcl/inc/svimpbox.hxx
+++ b/vcl/inc/svimpbox.hxx
@@ -119,8 +119,8 @@ private:
ImpLBSelEng m_aFctSet;
- long m_nNodeBmpWidth;
- long m_nMostRight;
+ tools::Long m_nNodeBmpWidth;
+ tools::Long m_nMostRight;
short m_nHorSBarHeight, m_nVerSBarWidth;
bool m_bUpdateMode : 1;
@@ -136,9 +136,9 @@ private:
DECL_LINK(EditTimerCall, Timer *, void);
- void InvalidateEntriesFrom( long nY ) const;
- bool IsLineVisible( long nY ) const;
- void KeyLeftRight( long nDiff );
+ void InvalidateEntriesFrom( tools::Long nY ) const;
+ bool IsLineVisible( tools::Long nY ) const;
+ void KeyLeftRight( tools::Long nDiff );
void DrawNet(vcl::RenderContext& rRenderContext);
@@ -161,7 +161,7 @@ private:
bool ButtonUpCheckCtrl( const MouseEvent& rMEvt );
bool ButtonDownCheckExpand( const MouseEvent&, SvTreeListEntry* );
- bool EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPos, long nLine);
+ bool EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPos, tools::Long nLine);
void InitScrollBarBox();
SvLBoxTab* NextTab( SvLBoxTab const * );
@@ -198,10 +198,10 @@ protected:
sal_uLong m_nVisibleCount; // Number of lines in control
bool m_bInVScrollHdl : 1;
bool m_bSimpleTravel : 1; // is true if SelectionMode::Single
- long m_nNextVerVisSize;
- long m_nNodeBmpTabDistance; // typical smaller than 0
+ tools::Long m_nNextVerVisSize;
+ tools::Long m_nNodeBmpTabDistance; // typical smaller than 0
- virtual long GetEntryLine(const SvTreeListEntry* pEntry) const;
+ virtual tools::Long GetEntryLine(const SvTreeListEntry* pEntry) const;
virtual void CursorDown();
virtual void CursorUp();
virtual void PageDown( sal_uInt16 nDelta );
@@ -209,7 +209,7 @@ protected:
// set Thumb to FirstEntryToDraw
virtual void SyncVerThumb();
virtual void AdjustScrollBars( Size& rSize );
- virtual void InvalidateEntry( long nY ) const;
+ virtual void InvalidateEntry( tools::Long nY ) const;
tools::Rectangle GetVisibleArea() const;
void SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect = false );
@@ -267,7 +267,7 @@ public:
void SetCurEntry( SvTreeListEntry* );
virtual Point GetEntryPosition(const SvTreeListEntry*) const;
void MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop = false );
- void ScrollToAbsPos( long nPos );
+ void ScrollToAbsPos( tools::Long nPos );
void PaintDDCursor(SvTreeListEntry* pEntry, bool bShow);
@@ -368,7 +368,7 @@ inline Point SvImpLBox::GetEntryPosition(const SvTreeListEntry* pEntry) const
return Point(0, GetEntryLine(pEntry));
}
-inline bool SvImpLBox::IsLineVisible( long nY ) const
+inline bool SvImpLBox::IsLineVisible( tools::Long nY ) const
{
bool bRet = true;
if ( nY < 0 || nY >= m_aOutputSize.Height() )
diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx
index c0d9a61cdb10..6bfed04bc358 100644
--- a/vcl/inc/test/outputdevice.hxx
+++ b/vcl/inc/test/outputdevice.hxx
@@ -45,7 +45,7 @@ public:
OUString getRenderBackendName() const;
- void initialSetup(long nWidth, long nHeight, Color aColor, bool bEnableAA = false, bool bAlphaVirtualDevice = false);
+ void initialSetup(tools::Long nWidth, tools::Long nHeight, Color aColor, bool bEnableAA = false, bool bAlphaVirtualDevice = false);
static TestResult checkRectangle(Bitmap& rBitmap);
static TestResult checkRectangleAA(Bitmap& rBitmap);
diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index e26cc6219b38..a2bd795b470e 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -29,11 +29,11 @@ namespace vcl
class SAL_NO_VTABLE ITextLayout
{
public:
- virtual long GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
+ virtual tools::Long GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
virtual void DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength,
MetricVector* _pVector, OUString* _pDisplayText ) = 0;
- virtual void GetCaretPositions( const OUString& _rText, long* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
- virtual sal_Int32 GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
+ virtual void GetCaretPositions( const OUString& _rText, tools::Long* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
+ virtual sal_Int32 GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
virtual bool DecomposeTextRectAction() const = 0;
protected:
@@ -53,7 +53,7 @@ namespace vcl
virtual ~DefaultTextLayout();
// ITextLayout overridables
- virtual long GetTextWidth( const OUString& _rText,
+ virtual tools::Long GetTextWidth( const OUString& _rText,
sal_Int32 _nStartIndex,
sal_Int32 _nLength ) const override;
@@ -65,12 +65,12 @@ namespace vcl
OUString* _pDisplayText ) override;
virtual void GetCaretPositions( const OUString& _rText,
- long* _pCaretXArray,
+ tools::Long* _pCaretXArray,
sal_Int32 _nStartIndex,
sal_Int32 _nLength ) const override;
virtual sal_Int32 GetTextBreak( const OUString& _rText,
- long _nMaxTextWidth,
+ tools::Long _nMaxTextWidth,
sal_Int32 _nStartIndex,
sal_Int32 _nLength ) const override;
diff --git a/vcl/inc/textlineinfo.hxx b/vcl/inc/textlineinfo.hxx
index 03b19ede96e6..6b0e72ad36aa 100644
--- a/vcl/inc/textlineinfo.hxx
+++ b/vcl/inc/textlineinfo.hxx
@@ -26,19 +26,19 @@
class ImplTextLineInfo
{
private:
- long mnWidth;
+ tools::Long mnWidth;
sal_Int32 mnIndex;
sal_Int32 mnLen;
public:
- ImplTextLineInfo( long nWidth, sal_Int32 nIndex, sal_Int32 nLen )
+ ImplTextLineInfo( tools::Long nWidth, sal_Int32 nIndex, sal_Int32 nLen )
{
mnWidth = nWidth;
mnIndex = nIndex;
mnLen = nLen;
}
- long GetWidth() const { return mnWidth; }
+ tools::Long GetWidth() const { return mnWidth; }
sal_Int32 GetIndex() const { return mnIndex; }
sal_Int32 GetLen() const { return mnLen; }
};
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index f1cbfd8990b5..40c253f1b889 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -51,8 +51,8 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo) = 0;
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) = 0;
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) = 0;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) = 0;
virtual void GetGlyphWidths(
const PhysicalFontFace*,
bool bVertical,
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h
index bf4c51c5d0f8..a1f0cd2aaf33 100644
--- a/vcl/inc/toolbox.h
+++ b/vcl/inc/toolbox.h
@@ -38,7 +38,7 @@ struct ImplToolItem
bool mbNonInteractiveWindow;
void* mpUserData;
Image maImage;
- long mnImageAngle;
+ tools::Long mnImageAngle;
bool mbMirrorMode;
OUString maText;
OUString maQuickHelpText;
@@ -51,8 +51,8 @@ struct ImplToolItem
Size maMinimalItemSize;
/// The overall horizontal item size, including one or more of [image size + textlength + dropdown arrow]
Size maItemSize;
- long mnSepSize;
- long mnDropDownArrowWidth;
+ tools::Long mnSepSize;
+ tools::Long mnDropDownArrowWidth;
/// Size of the content (bitmap or text, without dropdown) that we have in the item.
Size maContentSize;
ToolBoxItemType meType;
@@ -80,7 +80,7 @@ struct ImplToolItem
// the default size is the precomputed size for standard items
// ie those that are just ordinary buttons (no windows or text etc.)
// bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons
- Size GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize );
+ Size GetSize( bool bHorz, bool bCheckMaxWidth, tools::Long maxWidth, const Size& rDefaultSize );
// only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style
void DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbImage, bool& rbText ) const;
@@ -136,7 +136,7 @@ struct ImplToolBoxPrivateData
// a dummy item representing the custom menu button
ImplToolItem maMenubuttonItem;
- long mnMenuButtonWidth;
+ tools::Long mnMenuButtonWidth;
Wallpaper maDisplayBackground;
diff --git a/vcl/inc/unx/freetypetextrender.hxx b/vcl/inc/unx/freetypetextrender.hxx
index 9c4960e0f36c..2ac558eafaed 100644
--- a/vcl/inc/unx/freetypetextrender.hxx
+++ b/vcl/inc/unx/freetypetextrender.hxx
@@ -55,8 +55,8 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo) override;
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
virtual void GetGlyphWidths(
const PhysicalFontFace*,
bool bVertical,
diff --git a/vcl/inc/unx/genprn.h b/vcl/inc/unx/genprn.h
index 14917cf72ef5..0c92446d5286 100644
--- a/vcl/inc/unx/genprn.h
+++ b/vcl/inc/unx/genprn.h
@@ -43,7 +43,7 @@ public:
virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override;
virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
virtual void GetPageInfo( const ImplJobSetup* pSetupData,
- long& rOutWidth, long& rOutHeight,
+ tools::Long& rOutWidth, tools::Long& rOutHeight,
Point& rPageOffset,
Size& rPaperSize ) override;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index c02d6aa21fe3..8eb37ac187dd 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -51,8 +51,8 @@ public:
void Init( psp::JobData* pJob, psp::PrinterGfx* pGfx );
// helper methods
- static const void * DoGetEmbedFontData(psp::fontID aFont, long* pDataLen);
- static void DoFreeEmbedFontData( const void* pData, long nLen );
+ static const void * DoGetEmbedFontData(psp::fontID aFont, tools::Long* pDataLen);
+ static void DoFreeEmbedFontData( const void* pData, tools::Long nLen );
// helper methods for sharing with X11SalGraphics
static void DoGetGlyphWidths( psp::fontID aFont,
@@ -68,7 +68,7 @@ public:
virtual SalGraphicsImpl*GetImpl() const override { return nullptr; };
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
virtual sal_uInt16 GetBitCount() const override;
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
virtual void ResetClipRegion() override;
virtual bool setClipRegion( const vcl::Region& ) override;
@@ -103,8 +103,8 @@ public:
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo ) override;
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
virtual void GetGlyphWidths( const PhysicalFontFace*,
bool bVertical,
std::vector< sal_Int32 >& rWidths,
@@ -113,10 +113,10 @@ public:
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
virtual bool supportsOperation( OutDevSupportType ) const override;
- virtual void drawPixel( long nX, long nY ) override;
- virtual void drawPixel( long nX, long nY, Color nColor ) override;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
virtual void drawPolyPolygon( sal_uInt32 nPoly,
@@ -150,12 +150,12 @@ public:
const PolyFlags* const* pFlgAry ) override;
virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; };
- virtual void copyArea( long nDestX,
- long nDestY,
- long nSrcX,
- long nSrcY,
- long nSrcWidth,
- long nSrcHeight,
+ virtual void copyArea( tools::Long nDestX,
+ tools::Long nDestY,
+ tools::Long nSrcX,
+ tools::Long nSrcY,
+ tools::Long nSrcWidth,
+ tools::Long nSrcHeight,
bool bWindowInvalidate) override;
virtual void copyBits( const SalTwoRect& rPosAry,
SalGraphics* pSrcGraphics ) override;
@@ -167,14 +167,14 @@ public:
virtual void drawMask( const SalTwoRect& rPosAry,
const SalBitmap& rSalBitmap,
Color nMaskColor ) override;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
- virtual Color getPixel( long nX, long nY ) override;
- virtual void invert( long nX, long nY, long nWidth, long nHeight,
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags ) override;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry,
SalInvert nFlags ) override;
- virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight,
+ virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
void* pPtr, sal_uInt32 nSize ) override;
virtual bool blendBitmap( const SalTwoRect&,
const SalBitmap& rBitmap ) override;
@@ -190,7 +190,7 @@ public:
const basegfx::B2DPoint& rY,
const SalBitmap& rSourceBitmap,
const SalBitmap* pAlphaBitmap) override;
- virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight,
+ virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency ) override;
virtual SystemGraphicsData GetGraphicsData() const override;
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 4e409560a981..21b196623f30 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -148,8 +148,8 @@ private:
FreetypeFontInstance& mrFontInstance;
// 16.16 fixed point values used for a rotated font
- long mnCos;
- long mnSin;
+ tools::Long mnCos;
+ tools::Long mnSin;
int mnWidth;
int mnPrioAntiAlias;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index c6eb3471f8d6..27865f2efb12 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -204,8 +204,8 @@ class GtkSalFrame final : public SalFrame
tools::Rectangle m_aFloatRect;
FloatWinPopupFlags m_nFloatFlags;
bool m_bFloatPositioned;
- long m_nWidthRequest;
- long m_nHeightRequest;
+ tools::Long m_nWidthRequest;
+ tools::Long m_nHeightRequest;
cairo_region_t* m_pRegion;
GtkDropTarget* m_pDropTarget;
GtkDragSource* m_pDragSource;
@@ -301,12 +301,12 @@ class GtkSalFrame final : public SalFrame
}
//call gtk_window_resize
- void window_resize(long nWidth, long nHeight);
+ void window_resize(tools::Long nWidth, tools::Long nHeight);
//call gtk_widget_set_size_request
- void widget_set_size_request(long nWidth, long nHeight);
+ void widget_set_size_request(tools::Long nWidth, tools::Long nHeight);
- void resizeWindow( long nWidth, long nHeight );
- void moveWindow( long nX, long nY );
+ void resizeWindow( tools::Long nWidth, tools::Long nHeight );
+ void moveWindow( tools::Long nX, tools::Long nY );
Size calcDefaultSize();
@@ -417,10 +417,10 @@ public:
virtual void Show( bool bVisible, bool bNoActivate = false ) override;
// Set ClientSize and Center the Window to the desktop
// and send/post a resize message
- virtual void SetMinClientSize( long nWidth, long nHeight ) override;
- virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
- virtual void GetClientSize( long& rWidth, long& rHeight ) override;
+ virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) override;
+ virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) override;
virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
@@ -439,7 +439,7 @@ public:
virtual void SetPointer( PointerStyle ePointerStyle ) override;
virtual void CaptureMouse( bool bMouse ) override;
virtual void GrabFocus() override;
- virtual void SetPointerPos( long nX, long nY ) override;
+ virtual void SetPointerPos( tools::Long nX, tools::Long nY ) override;
// flush output buffer
using SalFrame::Flush;
@@ -486,7 +486,7 @@ public:
// start setting the clipregion consisting of nRects rectangles
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
// add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
// done setting up the clipregion
virtual void EndSetClipRegion() override;
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 2352b63a4869..3095e80144b3 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -205,7 +205,7 @@ public:
virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
virtual std::unique_ptr<SalVirtualDevice>
CreateVirtualDevice( SalGraphics*,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat,
const SystemGraphicsData* = nullptr ) override;
virtual std::shared_ptr<SalBitmap> CreateSalBitmap() override;
diff --git a/vcl/inc/unx/gtk/gtkobject.hxx b/vcl/inc/unx/gtk/gtkobject.hxx
index d1a5226cd9cc..8b37492e61cf 100644
--- a/vcl/inc/unx/gtk/gtkobject.hxx
+++ b/vcl/inc/unx/gtk/gtkobject.hxx
@@ -40,7 +40,7 @@ public:
virtual ~GtkSalObjectBase() override;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void SetForwardKey( bool bEnable ) override;
@@ -68,7 +68,7 @@ public:
virtual void ResetClipRegion() override;
virtual void EndSetClipRegion() override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void Show( bool bVisible ) override;
virtual void Reparent(SalFrame* pFrame) override;
};
@@ -96,7 +96,7 @@ public:
virtual void ResetClipRegion() override;
virtual void EndSetClipRegion() override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void Show( bool bVisible ) override;
virtual void Reparent(SalFrame* pFrame) override;
};
diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h
index fc84501294fd..7f9f239d57b0 100644
--- a/vcl/inc/unx/salbmp.h
+++ b/vcl/inc/unx/salbmp.h
@@ -49,11 +49,11 @@ private:
ImplCreateDIB(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
- long nX,
- long nY,
- long nWidth,
- long nHeight,
+ tools::Long nDrawableDepth,
+ tools::Long nX,
+ tools::Long nY,
+ tools::Long nWidth,
+ tools::Long nHeight,
bool bGrey
);
@@ -77,31 +77,31 @@ public:
bool ImplCreateFromDrawable(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
- long nX,
- long nY,
- long nWidth,
- long nHeight
+ tools::Long nDrawableDepth,
+ tools::Long nX,
+ tools::Long nY,
+ tools::Long nWidth,
+ tools::Long nHeight
);
XImage* ImplCreateXImage(
SalDisplay const * pSalDisp,
SalX11Screen nXScreen,
- long nDepth,
+ tools::Long nDepth,
const SalTwoRect& rTwoRect
) const;
ImplSalDDB* ImplGetDDB(
Drawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
+ tools::Long nDrawableDepth,
const SalTwoRect&
) const;
void ImplDraw(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
+ tools::Long nDrawableDepth,
const SalTwoRect& rTwoRect,
const GC& rGC
) const;
@@ -156,19 +156,19 @@ private:
Pixmap maPixmap;
SalTwoRect maTwoRect;
- long mnDepth;
+ tools::Long mnDepth;
SalX11Screen mnXScreen;
static void ImplDraw(
Drawable aSrcDrawable,
- long nSrcDrawableDepth,
+ tools::Long nSrcDrawableDepth,
Drawable aDstDrawable,
- long nSrcX,
- long nSrcY,
- long nDestWidth,
- long nDestHeight,
- long nDestX,
- long nDestY,
+ tools::Long nSrcX,
+ tools::Long nSrcY,
+ tools::Long nDestWidth,
+ tools::Long nDestHeight,
+ tools::Long nDestX,
+ tools::Long nDestY,
const GC& rGC
);
@@ -184,22 +184,22 @@ public:
ImplSalDDB(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
- long nX,
- long nY,
- long nWidth,
- long nHeight
+ tools::Long nDrawableDepth,
+ tools::Long nX,
+ tools::Long nY,
+ tools::Long nWidth,
+ tools::Long nHeight
);
~ImplSalDDB();
Pixmap ImplGetPixmap() const { return maPixmap; }
- long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
- long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
- long ImplGetDepth() const { return mnDepth; }
+ tools::Long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
+ tools::Long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
+ tools::Long ImplGetDepth() const { return mnDepth; }
const SalX11Screen& ImplGetScreen() const { return mnXScreen; }
- bool ImplMatches( SalX11Screen nXScreen, long nDepth, const SalTwoRect& rTwoRect ) const;
+ bool ImplMatches( SalX11Screen nXScreen, tools::Long nDepth, const SalTwoRect& rTwoRect ) const;
void ImplDraw(
Drawable aDrawable,
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 660a87ac47f7..c4fe3e747e59 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -311,7 +311,7 @@ protected:
void processRandREvent( XEvent* );
void doDestruct();
- void addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight );
+ void addXineramaScreenUnique( int i, tools::Long i_nX, tools::Long i_nY, tools::Long i_nWidth, tools::Long i_nHeight );
Time GetEventTimeImpl( bool bAlwaysReget = false ) const;
public:
static bool BestOpenGLVisual(Display* pDisplay, int nScreen, XVisualInfo& rVI);
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 4bc756a01639..ead2eedd7ef1 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -215,10 +215,10 @@ public:
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override;
virtual void Show( bool bVisible, bool bNoActivate = false ) override;
- virtual void SetMinClientSize( long nWidth, long nHeight ) override;
- virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
- virtual void GetClientSize( long& rWidth, long& rHeight ) override;
+ virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) override;
+ virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) override;
virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
@@ -229,7 +229,7 @@ public:
virtual void ToTop( SalFrameToTop nFlags ) override;
virtual void SetPointer( PointerStyle ePointerStyle ) override;
virtual void CaptureMouse( bool bMouse ) override;
- virtual void SetPointerPos( long nX, long nY ) override;
+ virtual void SetPointerPos( tools::Long nX, tools::Long nY ) override;
using SalFrame::Flush;
virtual void Flush() override;
virtual void SetInputContext( SalInputContext* pContext ) override;
@@ -255,7 +255,7 @@ public:
// start setting the clipregion consisting of nRects rectangles
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
// add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
// done setting up the clipregion
virtual void EndSetClipRegion() override;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 6e5e260f1185..e4adf4ec6c20 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -103,7 +103,7 @@ public:
// override all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
virtual sal_uInt16 GetBitCount() const override;
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
virtual void ResetClipRegion() override;
virtual bool setClipRegion( const vcl::Region& ) override;
@@ -137,8 +137,8 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo ) override;
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
virtual void GetGlyphWidths(
const PhysicalFontFace*,
@@ -151,10 +151,10 @@ public:
virtual void DrawTextLayout( const GenericSalLayout& ) override;
virtual bool supportsOperation( OutDevSupportType ) const override;
- virtual void drawPixel( long nX, long nY ) override;
- virtual void drawPixel( long nX, long nY, Color nColor ) override;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -202,12 +202,12 @@ public:
#endif
virtual void copyArea(
- long nDestX,
- long nDestY,
- long nSrcX,
- long nSrcY,
- long nSrcWidth,
- long nSrcHeight,
+ tools::Long nDestX,
+ tools::Long nDestY,
+ tools::Long nSrcX,
+ tools::Long nSrcY,
+ tools::Long nSrcWidth,
+ tools::Long nSrcHeight,
bool bWindowInvalidate ) override;
virtual void copyBits(
@@ -228,12 +228,12 @@ public:
const SalBitmap& rSalBitmap,
Color nMaskColor ) override;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
- virtual Color getPixel( long nX, long nY ) override;
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags ) override;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
- virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize ) override;
+ virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
virtual bool blendBitmap(
const SalTwoRect&,
@@ -258,8 +258,8 @@ public:
const SalBitmap* pAlphaBitmap) override;
virtual bool drawAlphaRect(
- long nX, long nY, long nWidth,
- long nHeight, sal_uInt8 nTransparency ) override;
+ tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency ) override;
virtual SystemGraphicsData GetGraphicsData() const override;
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 933de199654d..69c686de1c0d 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -52,12 +52,12 @@ public:
virtual void DestroyObject( SalObject* pObject ) override;
/// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics.
- static std::unique_ptr<SalVirtualDevice> CreateX11VirtualDevice(SalGraphics const * pGraphics, long &nDX, long &nDY,
+ static std::unique_ptr<SalVirtualDevice> CreateX11VirtualDevice(SalGraphics const * pGraphics, tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat, const SystemGraphicsData* pData, std::unique_ptr<X11SalGraphics> pNewGraphics);
virtual std::unique_ptr<SalVirtualDevice>
CreateVirtualDevice( SalGraphics* pGraphics,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
virtual void PostPrintersChanged() override;
virtual std::unique_ptr<GenPspGraphics> CreatePrintGraphics() override;
diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h
index 52e4b8f2bc6a..6cb63db11dd6 100644
--- a/vcl/inc/unx/salobj.h
+++ b/vcl/inc/unx/salobj.h
@@ -36,7 +36,7 @@ public:
~SalClipRegion();
void BeginSetClipRegion( sal_uInt32 nRects );
- void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
XRectangle *EndSetClipRegion() {
return ClipRectangleList.get(); }
@@ -74,10 +74,10 @@ public:
// override all pure virtual methods
virtual void ResetClipRegion() override;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void EndSetClipRegion() override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void Show( bool bVisible ) override;
virtual void GrabFocus() override;
diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h
index b70f45769d7c..70fb0e4d0a58 100644
--- a/vcl/inc/unx/salunx.h
+++ b/vcl/inc/unx/salunx.h
@@ -20,7 +20,9 @@
#ifndef INCLUDED_VCL_INC_UNX_SALUNX_H
#define INCLUDED_VCL_INC_UNX_SALUNX_H
-inline long Divide( long nDividend, long nDivisor )
+#include <tools/long.hxx>
+
+inline tools::Long Divide( tools::Long nDividend, tools::Long nDivisor )
{ return (nDividend + nDivisor/2) / nDivisor; }
#endif
diff --git a/vcl/inc/unx/salvd.h b/vcl/inc/unx/salvd.h
index b9874a3eb084..f01e3b5076f2 100644
--- a/vcl/inc/unx/salvd.h
+++ b/vcl/inc/unx/salvd.h
@@ -46,7 +46,7 @@ class X11SalVirtualDevice : public SalVirtualDevice
bool bExternPixmap_;
public:
- X11SalVirtualDevice(SalGraphics const *pGraphics, long &nDX, long &nDY,
+ X11SalVirtualDevice(SalGraphics const *pGraphics, tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData, std::unique_ptr<X11SalGraphics> pNewGraphics);
virtual ~X11SalVirtualDevice() override;
@@ -67,11 +67,11 @@ public:
virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
/// Set new size, without saving the old contents
- virtual bool SetSize( long nNewDX, long nNewDY ) override;
+ virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
// SalGeometryProvider
- virtual long GetWidth() const override { return nDX_; }
- virtual long GetHeight() const override { return nDY_; }
+ virtual tools::Long GetWidth() const override { return nDX_; }
+ virtual tools::Long GetHeight() const override { return nDY_; }
};
#endif // INCLUDED_VCL_INC_UNX_SALVD_H
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 1739053a0d41..99420b3066c9 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -227,7 +227,7 @@ public:
/*
* set _NET_WM_USER_TIME property, if NetWM
*/
- virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const;
+ virtual void setUserTime( X11SalFrame* i_pFrame, tools::Long i_nUserTime ) const;
/*
* tells whether fullscreen mode is supported by WM
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index ba318833f11b..a14852ca02c0 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -104,11 +104,11 @@ struct ImplWinData
mpExtOldAttrAry;
std::optional<tools::Rectangle>
mpCursorRect;
- long mnCursorExtWidth;
+ tools::Long mnCursorExtWidth;
bool mbVertical;
std::unique_ptr<tools::Rectangle[]>
mpCompositionCharRects;
- long mnCompositionCharRects;
+ tools::Long mnCompositionCharRects;
std::optional<tools::Rectangle>
mpFocusRect;
std::optional<tools::Rectangle>
@@ -141,14 +141,14 @@ struct ImplFrameData
sal_Int32 mnDPIY; //< Original Screen Resolution
ImplSVEvent * mnFocusId; //< FocusId for PostUserLink
ImplSVEvent * mnMouseMoveId; //< MoveId for PostUserLink
- long mnLastMouseX; //< last x mouse position
- long mnLastMouseY; //< last y mouse position
- long mnBeforeLastMouseX; //< last but one x mouse position
- long mnBeforeLastMouseY; //< last but one y mouse position
- long mnFirstMouseX; //< first x mouse position by mousebuttondown
- long mnFirstMouseY; //< first y mouse position by mousebuttondown
- long mnLastMouseWinX; //< last x mouse position, rel. to pMouseMoveWin
- long mnLastMouseWinY; //< last y mouse position, rel. to pMouseMoveWin
+ tools::Long mnLastMouseX; //< last x mouse position
+ tools::Long mnLastMouseY; //< last y mouse position
+ tools::Long mnBeforeLastMouseX; //< last but one x mouse position
+ tools::Long mnBeforeLastMouseY; //< last but one y mouse position
+ tools::Long mnFirstMouseX; //< first x mouse position by mousebuttondown
+ tools::Long mnFirstMouseY; //< first y mouse position by mousebuttondown
+ tools::Long mnLastMouseWinX; //< last x mouse position, rel. to pMouseMoveWin
+ tools::Long mnLastMouseWinY; //< last y mouse position, rel. to pMouseMoveWin
sal_uInt16 mnModalMode; //< frame based modal count (app based makes no sense anymore)
sal_uInt64 mnMouseDownTime; //< mouse button down time for double click
sal_uInt16 mnClickCount; //< mouse click count
@@ -269,9 +269,9 @@ public:
sal_Int32 mnHeightRequest;
sal_Int32 mnOptimalWidthCache;
sal_Int32 mnOptimalHeightCache;
- long mnX;
- long mnY;
- long mnAbsScreenX;
+ tools::Long mnX;
+ tools::Long mnY;
+ tools::Long mnAbsScreenX;
Point maPos;
OString maHelpId;
OUString maHelpText;
@@ -406,8 +406,8 @@ class VCL_DLLPUBLIC PaintBufferGuard
bool mbBackground;
Wallpaper maBackground;
AllSettings maSettings;
- long mnOutOffX;
- long mnOutOffY;
+ tools::Long mnOutOffX;
+ tools::Long mnOutOffY;
tools::Rectangle m_aPaintRect;
public:
PaintBufferGuard(ImplFrameData* pFrameData, vcl::Window* pWindow);
@@ -422,9 +422,9 @@ public:
// helper methods
bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave,
- long nX, long nY, sal_uInt64 nMsgTime,
+ tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime,
sal_uInt16 nCode, MouseEventModifiers nMode );
-void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight );
+void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
VCL_DLLPUBLIC void ImplWindowStateFromStr(WindowStateData& rData, const OString& rStr);
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index 2c82b3ab8dd3..32a6401a6799 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -85,7 +85,7 @@ namespace vcl
// So use the travelXXX methods if you need to travel
protected:
- long LogicalCoordinateToPixel(int iCoordinate);
+ tools::Long LogicalCoordinateToPixel(int iCoordinate);
/**sets the number of buttons which should be left-aligned. Normally, buttons are right-aligned.
only to be used during construction, before any layouting happened
@@ -120,7 +120,7 @@ namespace vcl
virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
bool ShowPage( sal_uInt16 nLevel );
- bool Finish( long nResult = 0 );
+ bool Finish( tools::Long nResult = 0 );
sal_uInt16 GetCurLevel() const { return mnCurLevel; }
void AddPage( TabPage* pPage );
@@ -128,7 +128,7 @@ namespace vcl
void SetPage( sal_uInt16 nLevel, TabPage* pPage );
TabPage* GetPage( sal_uInt16 nLevel ) const;
- void AddButton( Button* pButton, long nOffset = 0 );
+ void AddButton( Button* pButton, tools::Long nOffset = 0 );
void RemoveButton( Button* pButton );
void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index 8ba437f924c3..1d78b9d499b6 100644
--- a/vcl/opengl/RenderList.cxx
+++ b/vcl/opengl/RenderList.cxx
@@ -195,7 +195,7 @@ void appendRectangle(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndic
} // end anonymous namespace
-void RenderList::addDrawPixel(long nX, long nY, Color nColor)
+void RenderList::addDrawPixel(tools::Long nX, tools::Long nY, Color nColor)
{
if (nColor == SALCOLOR_NONE)
return;
@@ -207,7 +207,7 @@ void RenderList::addDrawPixel(long nX, long nY, Color nColor)
nX - 0.5f, nY - 0.5f, nX + 0.5f, nY + 0.5f, nColor, 0.0f);
}
-void RenderList::addDrawRectangle(long nX, long nY, long nWidth, long nHeight, double fTransparency,
+void RenderList::addDrawRectangle(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, double fTransparency,
Color nLineColor, Color nFillColor)
{
if (nLineColor == SALCOLOR_NONE && nFillColor == SALCOLOR_NONE)
@@ -257,7 +257,7 @@ void RenderList::addDrawRectangle(long nX, long nY, long nWidth, long nHeight, d
fX1 + 0.5f, fY1 + 0.5f, fX2 - 0.5f, fY2 - 0.5f, nFillColor, fTransparency);
}
-void RenderList::addDrawLine(long nX1, long nY1, long nX2, long nY2, Color nLineColor, bool bUseAA)
+void RenderList::addDrawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, Color nLineColor, bool bUseAA)
{
if (nLineColor == SALCOLOR_NONE)
return;
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 6c1164c3b577..1c20a8ef9a46 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -432,7 +432,7 @@ sal_uInt16 OpenGLSalGraphicsImpl::GetBitCount() const
}
// get the width of the device
-long OpenGLSalGraphicsImpl::GetGraphicsWidth() const
+tools::Long OpenGLSalGraphicsImpl::GetGraphicsWidth() const
{
return GetWidth();
}
@@ -852,12 +852,12 @@ void OpenGLSalGraphicsImpl::DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoi
}
}
-void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeight )
+void OpenGLSalGraphicsImpl::DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
- long nX1( nX );
- long nY1( nY );
- long nX2( nX + nWidth );
- long nY2( nY + nHeight );
+ tools::Long nX1( nX );
+ tools::Long nY1( nY );
+ tools::Long nX2( nX + nWidth );
+ tools::Long nY2( nY + nHeight );
const SalPoint aPoints[] = { { nX1, nY2 }, { nX1, nY1 },
{ nX2, nY1 }, { nX2, nY2 }};
@@ -866,10 +866,10 @@ void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeigh
void OpenGLSalGraphicsImpl::DrawRect( const tools::Rectangle& rRect )
{
- long nX1( rRect.Left() );
- long nY1( rRect.Top() );
- long nX2( rRect.Right() );
- long nY2( rRect.Bottom() );
+ tools::Long nX1( rRect.Left() );
+ tools::Long nY1( rRect.Top() );
+ tools::Long nX2( rRect.Right() );
+ tools::Long nY2( rRect.Bottom() );
const SalPoint aPoints[] = { { nX1, nY2 }, { nX1, nY1 },
{ nX2, nY1 }, { nX2, nY2 }};
@@ -946,10 +946,10 @@ void OpenGLSalGraphicsImpl::DrawTextureRect( const SalTwoRect& rPosAry )
SAL_INFO("vcl.opengl", "draw texture rect");
- long nX = rPosAry.mnDestX;
- long nY = rPosAry.mnDestY;
- long nWidth = rPosAry.mnDestWidth;
- long nHeight = rPosAry.mnDestHeight;
+ tools::Long nX = rPosAry.mnDestX;
+ tools::Long nY = rPosAry.mnDestY;
+ tools::Long nWidth = rPosAry.mnDestWidth;
+ tools::Long nHeight = rPosAry.mnDestHeight;
std::vector<GLfloat> aVertices;
aVertices.reserve(8);
@@ -1053,8 +1053,8 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture(
GLfloat aTexCoord[8];
- const long nDestWidth = basegfx::fround(basegfx::B2DVector(rX - rNull).getLength());
- const long nDestHeight = basegfx::fround(basegfx::B2DVector(rY - rNull).getLength());
+ const tools::Long nDestWidth = basegfx::fround(basegfx::B2DVector(rX - rNull).getLength());
+ const tools::Long nDestHeight = basegfx::fround(basegfx::B2DVector(rY - rNull).getLength());
// Invisibly small images shouldn't divide by zero.
if( nDestHeight == 0 || nDestWidth == 0 )
@@ -1421,7 +1421,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
return;
Color aStartCol = rGradient.GetStartColor();
Color aEndCol = rGradient.GetEndColor();
- long nFactor = rGradient.GetStartIntensity();
+ tools::Long nFactor = rGradient.GetStartIntensity();
mpProgram->SetColorWithIntensity( "start_color", aStartCol, nFactor );
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
@@ -1447,7 +1447,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
return;
Color aStartCol = rGradient.GetStartColor();
Color aEndCol = rGradient.GetEndColor();
- long nFactor = rGradient.GetStartIntensity();
+ tools::Long nFactor = rGradient.GetStartIntensity();
mpProgram->SetColorWithIntensity( "start_color", aStartCol, nFactor );
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
@@ -1499,7 +1499,7 @@ void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const
return;
Color aStartCol = rGradient.GetStartColor();
Color aEndCol = rGradient.GetEndColor();
- long nFactor = rGradient.GetStartIntensity();
+ tools::Long nFactor = rGradient.GetStartIntensity();
mpProgram->SetColorWithIntensity( "start_color", aStartCol, nFactor );
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
@@ -1519,28 +1519,28 @@ void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const
DrawRect( rRect );
}
-void OpenGLSalGraphicsImpl::drawPixel(long nX, long nY)
+void OpenGLSalGraphicsImpl::drawPixel(tools::Long nX, tools::Long nY)
{
VCL_GL_INFO("::drawPixel: (" << nX << ", " << nY << ")");
mpRenderList->addDrawPixel(nX, nY, mnLineColor);
PostBatchDraw();
}
-void OpenGLSalGraphicsImpl::drawPixel(long nX, long nY, Color nColor)
+void OpenGLSalGraphicsImpl::drawPixel(tools::Long nX, tools::Long nY, Color nColor)
{
VCL_GL_INFO("::drawPixel: (" << nX << ", " << nY << ")");
mpRenderList->addDrawPixel(nX, nY, nColor);
PostBatchDraw();
}
-void OpenGLSalGraphicsImpl::drawLine(long nX1, long nY1, long nX2, long nY2)
+void OpenGLSalGraphicsImpl::drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)
{
VCL_GL_INFO("::drawLine (" << nX1 << ", " << nY1 << ") (" << nX2 << ", " << nY2 << ")");
mpRenderList->addDrawLine(nX1, nY1, nX2, nY2, mnLineColor, mrParent.getAntiAlias());
PostBatchDraw();
}
-void OpenGLSalGraphicsImpl::drawRect( long nX, long nY, long nWidth, long nHeight )
+void OpenGLSalGraphicsImpl::drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
VCL_GL_INFO("::drawRect (" << nX << ", " << nY << ") [" << nWidth << ", " << nHeight << "]");
mpRenderList->addDrawRectangle(nX, nY, nWidth, nHeight, 0.0, mnLineColor, mnFillColor);
@@ -1737,9 +1737,9 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygonBezier(
// CopyArea --> No RasterOp, but ClipRegion
void OpenGLSalGraphicsImpl::copyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight, bool /*bWindowInvalidate*/ )
+ tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight, bool /*bWindowInvalidate*/ )
{
VCL_GL_INFO( "::copyArea " << nSrcX << "," << nSrcY << " >> " << nDestX << "," << nDestY << " (" << nSrcWidth << "," << nSrcHeight << ")" );
OpenGLTexture aTexture;
@@ -1837,7 +1837,7 @@ void OpenGLSalGraphicsImpl::drawMask(
PostBatchDraw();
}
-std::shared_ptr<SalBitmap> OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long nHeight )
+std::shared_ptr<SalBitmap> OpenGLSalGraphicsImpl::getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
FlushDeferredDrawing();
@@ -1853,7 +1853,7 @@ std::shared_ptr<SalBitmap> OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, l
return pBitmap;
}
-Color OpenGLSalGraphicsImpl::getPixel( long nX, long nY )
+Color OpenGLSalGraphicsImpl::getPixel( tools::Long nX, tools::Long nY )
{
FlushDeferredDrawing();
@@ -1870,8 +1870,8 @@ Color OpenGLSalGraphicsImpl::getPixel( long nX, long nY )
// invert --> ClipRegion (only Windows or VirDevs)
void OpenGLSalGraphicsImpl::invert(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags)
{
PreDraw();
@@ -1937,8 +1937,8 @@ void OpenGLSalGraphicsImpl::invert( sal_uInt32 nPoints, const SalPoint* pPtAry,
}
bool OpenGLSalGraphicsImpl::drawEPS(
- long /*nX*/, long /*nY*/,
- long /*nWidth*/, long /*nHeight*/,
+ tools::Long /*nX*/, tools::Long /*nY*/,
+ tools::Long /*nWidth*/, tools::Long /*nHeight*/,
void* /*pPtr*/,
sal_uInt32 /*nSize*/ )
{
@@ -2089,8 +2089,8 @@ bool OpenGLSalGraphicsImpl::drawTransformedBitmap(
fully transparent rectangle
*/
bool OpenGLSalGraphicsImpl::drawAlphaRect(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency )
{
VCL_GL_INFO("::drawAlphaRect (" << nX << ", " << nY << ") [" << nWidth << ", " << nHeight << "]");
@@ -2152,7 +2152,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
VCL_GL_INFO("::drawGradient -> DrawRect (no gradient)");
Color aColor = rGradient.GetStartColor();
- long nIntensity = rGradient.GetStartIntensity();
+ tools::Long nIntensity = rGradient.GetStartIntensity();
if (UseSolid(Color(aColor.GetRed() * nIntensity / 100.0,
aColor.GetGreen()* nIntensity / 100.0,
aColor.GetBlue() * nIntensity / 100.0)))
diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx
index 6557eccf8f42..eeb0df8df0ab 100644
--- a/vcl/opengl/program.cxx
+++ b/vcl/opengl/program.cxx
@@ -273,7 +273,7 @@ void OpenGLProgram::SetColor( const OString& rName, const Color& rColor )
SetBlendMode( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
}
-void OpenGLProgram::SetColorWithIntensity( const OString& rName, const Color& rColor, long nFactor )
+void OpenGLProgram::SetColorWithIntensity( const OString& rName, const Color& rColor, tools::Long nFactor )
{
GLuint nUniform = GetUniformLocation( rName );
glUniform4f( nUniform,
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index e9b1bca73665..fb4ee7bb0f04 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -108,7 +108,7 @@ OpenGLSalBitmap::~OpenGLSalBitmap()
VCL_GL_INFO( "~OpenGLSalBitmap" );
}
-void OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight )
+void OpenGLSalBitmap::Create( const OpenGLTexture& rTex, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
DBG_TESTSOLARMUTEX();
static const BitmapPalette aEmptyPalette;
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index 35e4098dafa2..42ed5ea16c19 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -550,10 +550,10 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
}
else
{
- long nWidth = maRect.GetWidth();
- long nHeight = maRect.GetHeight();
- long nX = maRect.Left();
- long nY = mpImpl->mnHeight - maRect.Top() - nHeight;
+ tools::Long nWidth = maRect.GetWidth();
+ tools::Long nHeight = maRect.GetHeight();
+ tools::Long nX = maRect.Left();
+ tools::Long nY = mpImpl->mnHeight - maRect.Top() - nHeight;
// Retrieve current context
ImplSVData* pSVData = ImplGetSVData();
diff --git a/vcl/opengl/x11/salvd.cxx b/vcl/opengl/x11/salvd.cxx
index a6ed5602fc3f..2bdc84c6298f 100644
--- a/vcl/opengl/x11/salvd.cxx
+++ b/vcl/opengl/x11/salvd.cxx
@@ -33,7 +33,7 @@ void X11SalGraphics::Init( X11OpenGLSalVirtualDevice *pDevice )
}
X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics const * pGraphics,
- long nDX, long nDY,
+ tools::Long nDX, tools::Long nDY,
const SystemGraphicsData *pData,
std::unique_ptr<X11SalGraphics> pNewGraphics) :
mpGraphics(std::move(pNewGraphics)),
@@ -74,7 +74,7 @@ void X11OpenGLSalVirtualDevice::ReleaseGraphics( SalGraphics* )
}
-bool X11OpenGLSalVirtualDevice::SetSize( long nDX, long nDY )
+bool X11OpenGLSalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY )
{
if( !nDX ) nDX = 1;
if( !nDY ) nDY = 1;
diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx b/vcl/qa/cppunit/BitmapFilterTest.cxx
index 12b32bc316f7..4c878960474b 100644
--- a/vcl/qa/cppunit/BitmapFilterTest.cxx
+++ b/vcl/qa/cppunit/BitmapFilterTest.cxx
@@ -83,8 +83,8 @@ void BitmapFilterTest::testBlurCorrectness()
sal_uInt16 nBPP = aBitmap24Bit.GetBitCount();
{
- long aMargin1 = 1;
- long aMargin2 = 3;
+ tools::Long aMargin1 = 1;
+ tools::Long aMargin2 = 3;
BitmapScopedWriteAccess aWriteAccess(aBitmap24Bit);
scanlineFormat = aWriteAccess->GetScanlineFormat();
aWriteAccess->Erase(COL_WHITE);
@@ -121,8 +121,8 @@ void BitmapFilterTest::testBlurCorrectness()
}
// Check blurred bitmap parameters
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(41), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(31), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(41), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(31), aBitmap24Bit.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(nBPP, aBitmap24Bit.GetBitCount());
@@ -174,7 +174,7 @@ void BitmapFilterTest::testPerformance()
// Prepare bitmap
Bitmap aBigBitmap(aSize, 24);
{
- long aMargin = 500;
+ tools::Long aMargin = 500;
BitmapScopedWriteAccess aWriteAccess(aBigBitmap);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(COL_BLACK);
@@ -214,14 +214,15 @@ void BitmapFilterTest::testPerformance()
void BitmapFilterTest::testGenerateStripRanges()
{
{
- constexpr long nFirstIndex = 0;
- constexpr long nLastIndex = 100;
- constexpr long nStripSize = 32;
+ constexpr tools::Long nFirstIndex = 0;
+ constexpr tools::Long nLastIndex = 100;
+ constexpr tools::Long nStripSize = 32;
- std::vector<std::tuple<long, long, bool>> aRanges;
+ std::vector<std::tuple<tools::Long, tools::Long, bool>> aRanges;
vcl::bitmap::generateStripRanges<nStripSize>(
- nFirstIndex, nLastIndex, [&](long const nStart, long const nEnd, bool const bLast) {
+ nFirstIndex, nLastIndex,
+ [&](tools::Long const nStart, tools::Long const nEnd, bool const bLast) {
aRanges.emplace_back(nStart, nEnd, bLast);
});
@@ -245,14 +246,15 @@ void BitmapFilterTest::testGenerateStripRanges()
}
{
- constexpr long nFirstIndex = 0;
- constexpr long nLastIndex = 95;
- constexpr long nStripSize = 32;
+ constexpr tools::Long nFirstIndex = 0;
+ constexpr tools::Long nLastIndex = 95;
+ constexpr tools::Long nStripSize = 32;
- std::vector<std::tuple<long, long, bool>> aRanges;
+ std::vector<std::tuple<tools::Long, tools::Long, bool>> aRanges;
vcl::bitmap::generateStripRanges<nStripSize>(
- nFirstIndex, nLastIndex, [&](long const nStart, long const nEnd, bool const bLast) {
+ nFirstIndex, nLastIndex,
+ [&](tools::Long const nStart, tools::Long const nEnd, bool const bLast) {
aRanges.emplace_back(nStart, nEnd, bLast);
});
diff --git a/vcl/qa/cppunit/BitmapScaleTest.cxx b/vcl/qa/cppunit/BitmapScaleTest.cxx
index 277e42adbe1b..7de2f7d8678d 100644
--- a/vcl/qa/cppunit/BitmapScaleTest.cxx
+++ b/vcl/qa/cppunit/BitmapScaleTest.cxx
@@ -40,12 +40,12 @@ bool checkBitmapColor(Bitmap const& rBitmap, Color const& rExpectedColor)
bool bResult = true;
Bitmap aBitmap(rBitmap);
Bitmap::ScopedReadAccess pReadAccess(aBitmap);
- long nHeight = pReadAccess->Height();
- long nWidth = pReadAccess->Width();
- for (long y = 0; y < nHeight; ++y)
+ tools::Long nHeight = pReadAccess->Height();
+ tools::Long nWidth = pReadAccess->Width();
+ for (tools::Long y = 0; y < nHeight; ++y)
{
Scanline pScanlineRead = pReadAccess->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
Color aColor = pReadAccess->GetPixelFromData(pScanlineRead, x);
if (aColor != rExpectedColor)
@@ -219,8 +219,8 @@ void BitmapScaleTest::testScale2()
}
// Scale - 65x65
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Height());
Bitmap aScaledBitmap = aBitmap24Bit;
aScaledBitmap.Scale(Size(65, 65));
@@ -231,13 +231,13 @@ void BitmapScaleTest::testScale2()
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(65), aScaledBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(65), aScaledBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(65), aScaledBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(65), aScaledBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT(checkBitmapColor(aScaledBitmap, aBitmapColor));
// Scale - 64x64
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Height());
aScaledBitmap = aBitmap24Bit;
aScaledBitmap.Scale(Size(64, 64));
@@ -248,13 +248,13 @@ void BitmapScaleTest::testScale2()
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(64), aScaledBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(64), aScaledBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(64), aScaledBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(64), aScaledBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT(checkBitmapColor(aScaledBitmap, aBitmapColor));
// Scale - 63x63
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Height());
aScaledBitmap = aBitmap24Bit;
aScaledBitmap.Scale(Size(63, 63));
@@ -265,8 +265,8 @@ void BitmapScaleTest::testScale2()
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(63), aScaledBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(63), aScaledBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(63), aScaledBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(63), aScaledBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT(checkBitmapColor(aScaledBitmap, aBitmapColor));
}
@@ -287,8 +287,8 @@ void BitmapScaleTest::testScaleSymmetry()
BitmapSymmetryCheck aBitmapSymmetryCheck;
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(10), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(10), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(10), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(10), aBitmap24Bit.GetSizePixel().Height());
// Check symmetry of the bitmap
CPPUNIT_ASSERT(BitmapSymmetryCheck::check(aBitmap24Bit));
@@ -302,8 +302,8 @@ void BitmapScaleTest::testScaleSymmetry()
aBitmap24Bit.Scale(2, 2, BmpScaleFlag::Fast);
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(20), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(20), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(20), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(20), aBitmap24Bit.GetSizePixel().Height());
// After scaling the bitmap should still be symmetrical. This check guarantees that
// scaling doesn't misalign the bitmap.
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 02d9fdf2cd56..490a2d3ce8c7 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -88,8 +88,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp;
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(0), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(0), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(0), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(0), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Not empty", aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(0),
@@ -102,8 +102,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 1);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(1),
@@ -116,8 +116,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 4);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(4),
@@ -130,8 +130,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 8);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(8),
@@ -144,8 +144,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 24);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(24),
@@ -163,8 +163,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 32);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
@@ -611,9 +611,9 @@ void BitmapTest::testOctree()
Bitmap aBitmap(aSize, 24);
{
BitmapScopedWriteAccess pWriteAccess(aBitmap);
- for (long y = 0; y < aSize.Height(); ++y)
+ for (tools::Long y = 0; y < aSize.Height(); ++y)
{
- for (long x = 0; x < aSize.Width(); ++x)
+ for (tools::Long x = 0; x < aSize.Width(); ++x)
{
double fPercent = double(x) / double(aSize.Width());
pWriteAccess->SetPixel(y, x,
@@ -657,8 +657,8 @@ void BitmapTest::testEmptyAccess()
{
Bitmap empty;
BitmapInfoAccess access(empty);
- CPPUNIT_ASSERT_EQUAL(long(0), access.Width());
- CPPUNIT_ASSERT_EQUAL(long(0), access.Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), access.Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), access.Height());
}
} // namespace
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 04a0559473ea..353f195eac43 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -153,9 +153,9 @@ bool checkBitmap(Graphic& rGraphic)
Bitmap aBitmap(rGraphic.GetBitmapEx().GetBitmap());
{
Bitmap::ScopedReadAccess pReadAccess(aBitmap);
- for (long y = 0; y < rGraphic.GetSizePixel().Height(); y++)
+ for (tools::Long y = 0; y < rGraphic.GetSizePixel().Height(); y++)
{
- for (long x = 0; x < rGraphic.GetSizePixel().Width(); x++)
+ for (tools::Long x = 0; x < rGraphic.GetSizePixel().Width(); x++)
{
if (pReadAccess->HasPalette())
{
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index b6bd724910b8..dd10d508e243 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -178,8 +178,8 @@ void BitmapRenderTest::testAlphaVirtualDevice()
// Get a BitmapEx from the VirDev -> Colors should have alpha
BitmapEx aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4));
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
Color aColor = aBitmap.GetPixelColor(1, 1);
CPPUNIT_ASSERT_EQUAL(Color(0xffffffff), aColor);
@@ -196,8 +196,8 @@ void BitmapRenderTest::testAlphaVirtualDevice()
// Read back the BitmapEx and check the opaque pixel
aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4));
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
aColor = aBitmap.GetPixelColor(1, 1);
#if defined _WIN32
@@ -219,8 +219,8 @@ void BitmapRenderTest::testAlphaVirtualDevice()
// Read back the BitmapEx and check the semi-transparent pixel
aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4));
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
aColor = aBitmap.GetPixelColor(0, 0);
#if defined _WIN32
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 8cbe9b6c748e..887f8d187fb1 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -78,7 +78,7 @@ void VclComplexTextTest::testArabic()
std::vector<long> aRefCharWidths {6, 9, 16, 16, 22, 22, 26, 29, 32, 32,
36, 40, 49, 53, 56, 63, 63, 66, 72, 72};
std::vector<long> aCharWidths(aOneTwoThree.getLength(), 0);
- long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, aCharWidths.data());
+ tools::Long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, aCharWidths.data());
CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
// this sporadically returns 75 or 74 on some of the windows tinderboxes eg. tb73
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 65f5f8047bb6..6931b42e8677 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -45,22 +45,22 @@ static int deltaColor(BitmapColor aColor1, BitmapColor aColor2)
return std::max(std::max(deltaR, deltaG), deltaB);
}
-static bool checkRect(Bitmap& rBitmap, int aLayerNumber, long nAreaHeight, long nAreaWidth, Color aExpectedColor, int nMaxDelta)
+static bool checkRect(Bitmap& rBitmap, int aLayerNumber, tools::Long nAreaHeight, tools::Long nAreaWidth, Color aExpectedColor, int nMaxDelta)
{
BitmapScopedWriteAccess pAccess(rBitmap);
- long nWidth = std::min(nAreaWidth, pAccess->Width());
- long nHeight = std::min(nAreaHeight, pAccess->Height());
+ tools::Long nWidth = std::min(nAreaWidth, pAccess->Width());
+ tools::Long nHeight = std::min(nAreaHeight, pAccess->Height());
- long firstX = 0 + aLayerNumber;
- long firstY = 0 + aLayerNumber;
+ tools::Long firstX = 0 + aLayerNumber;
+ tools::Long firstY = 0 + aLayerNumber;
- long lastX = nWidth - 1 - aLayerNumber;
- long lastY = nHeight - 1 - aLayerNumber;
+ tools::Long lastX = nWidth - 1 - aLayerNumber;
+ tools::Long lastY = nHeight - 1 - aLayerNumber;
int delta;
- for (long y = firstY; y <= lastY; y++)
+ for (tools::Long y = firstY; y <= lastY; y++)
{
Color aColorFirst = pAccess->GetPixel(y, firstX);
delta = deltaColor(aColorFirst, aExpectedColor);
@@ -72,7 +72,7 @@ static bool checkRect(Bitmap& rBitmap, int aLayerNumber, long nAreaHeight, long
if (delta > nMaxDelta)
return false;
}
- for (long x = firstX; x <= lastX; x++)
+ for (tools::Long x = firstX; x <= lastX; x++)
{
Color aColorFirst = pAccess->GetPixel(firstY, x);
delta = deltaColor(aColorFirst, aExpectedColor);
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 47799ec81b3d..c06745b32efc 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1424,7 +1424,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105954)
Size aMeta = pPageObject->getImageSize(*pPdfPage);
// This was 2000, i.e. the 'reduce to 300 DPI' request was ignored.
// This is now around 238 (228 on macOS).
- CPPUNIT_ASSERT_LESS(static_cast<long>(250), aMeta.getWidth());
+ CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(250), aMeta.getWidth());
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf128630)
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 8960f727ea81..17878c0656e6 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -840,7 +840,7 @@ void SvmTest::testTextArray()
GDIMetaFile aGDIMetaFile;
ScopedVclPtrInstance<VirtualDevice> pVirtualDev;
setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
- long const aDX[] = { 10, 15, 20, 25, 30, 35 };
+ tools::Long const aDX[] = { 10, 15, 20, 25, 30, 35 };
pVirtualDev->DrawTextArray(Point(4,6), "123456", aDX, 1, 4);
checkTextArray(writeAndReadStream(aGDIMetaFile));
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index 01c6ebc4dd2b..bb7f762ee874 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -149,7 +149,7 @@ bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount)
sal_uInt32 nWidth = pBitmap->m_aSize.Height() / 2;
bool isOdd(0 != pBitmap->m_aSize.Height() % 2);
- for (long h = 0; h < pBitmap->m_aSize.Height(); ++h)
+ for (tools::Long h = 0; h < pBitmap->m_aSize.Height(); ++h)
{
sal_uInt8* buffer_data = buffer_data_pos;
buffer_data_pos += pBitmap->m_nScanline;
diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx
index 5e0f88412056..9dea45ed4444 100644
--- a/vcl/qt5/Qt5FilePicker.cxx
+++ b/vcl/qt5/Qt5FilePicker.cxx
@@ -840,11 +840,11 @@ void SAL_CALL Qt5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
aAny >>= xSysWin;
const auto& pFrames = pSalInst->getFrames();
- const long aWindowHandle = xSysWin.WindowHandle;
+ const tools::Long aWindowHandle = xSysWin.WindowHandle;
const auto it
= std::find_if(pFrames.begin(), pFrames.end(), [&aWindowHandle](auto pFrame) -> bool {
const SystemEnvData* pData = pFrame->GetSystemData();
- return pData && long(pData->aWindow) == aWindowHandle;
+ return pData && tools::Long(pData->aWindow) == aWindowHandle;
});
if (it != pFrames.end())
m_pParentWidget = static_cast<Qt5Frame*>(*it)->asChild();
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index f008f4538bd7..41a5a5436a67 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -430,7 +430,7 @@ void Qt5Frame::Show(bool bVisible, bool /*bNoActivate*/)
pSalInst->RunInMainThread([this, bVisible]() { asChild()->setVisible(bVisible); });
}
-void Qt5Frame::SetMinClientSize(long nWidth, long nHeight)
+void Qt5Frame::SetMinClientSize(tools::Long nWidth, tools::Long nHeight)
{
if (!isChild())
{
@@ -439,7 +439,7 @@ void Qt5Frame::SetMinClientSize(long nWidth, long nHeight)
}
}
-void Qt5Frame::SetMaxClientSize(long nWidth, long nHeight)
+void Qt5Frame::SetMaxClientSize(tools::Long nWidth, tools::Long nHeight)
{
if (!isChild())
{
@@ -513,7 +513,8 @@ void Qt5Frame::SetDefaultSize()
assert(!m_bDefaultSize);
}
-void Qt5Frame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags)
+void Qt5Frame::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ sal_uInt16 nFlags)
{
if (!isWindow() || isChild(true, false))
return;
@@ -578,7 +579,7 @@ void Qt5Frame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt1
asChild()->move(round(nX / devicePixelRatioF()), round(nY / devicePixelRatioF()));
}
-void Qt5Frame::GetClientSize(long& rWidth, long& rHeight)
+void Qt5Frame::GetClientSize(tools::Long& rWidth, tools::Long& rHeight)
{
rWidth = round(m_pQWidget->width() * devicePixelRatioF());
rHeight = round(m_pQWidget->height() * devicePixelRatioF());
@@ -795,7 +796,7 @@ void Qt5Frame::CaptureMouse(bool bMouse)
m_pQWidget->releaseMouse();
}
-void Qt5Frame::SetPointerPos(long nX, long nY)
+void Qt5Frame::SetPointerPos(tools::Long nX, tools::Long nY)
{
// some cursor already exists (and it has m_ePointerStyle shape)
// so here we just reposition it
@@ -1179,7 +1180,8 @@ void Qt5Frame::BeginSetClipRegion(sal_uInt32)
m_aRegion = QRegion(QRect(QPoint(0, 0), m_pQWidget->size()));
}
-void Qt5Frame::UnionClipRegion(long nX, long nY, long nWidth, long nHeight)
+void Qt5Frame::UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
m_aRegion
= m_aRegion.united(scaledQRect(QRect(nX, nY, nWidth, nHeight), 1 / devicePixelRatioF()));
diff --git a/vcl/qt5/Qt5Graphics_Controls.cxx b/vcl/qt5/Qt5Graphics_Controls.cxx
index 732c25e241cb..b28734b4aefc 100644
--- a/vcl/qt5/Qt5Graphics_Controls.cxx
+++ b/vcl/qt5/Qt5Graphics_Controls.cxx
@@ -545,7 +545,8 @@ bool Qt5Graphics_Controls::drawNativeControl(ControlType type, ControlPart part,
// If the scrollbar has a mnMin == 0 and mnMax == 0 then mnVisibleSize is set to -1?!
// I don't know if a negative mnVisibleSize makes any sense, so just handle this case
// without crashing LO with a SIGFPE in the Qt library.
- const long nVisibleSize = (sbVal->mnMin == sbVal->mnMax) ? 0 : sbVal->mnVisibleSize;
+ const tools::Long nVisibleSize
+ = (sbVal->mnMin == sbVal->mnMax) ? 0 : sbVal->mnVisibleSize;
option.minimum = sbVal->mnMin;
option.maximum = sbVal->mnMax - nVisibleSize;
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index 2cbced7ddcab..d9a9a2b12f16 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -166,14 +166,14 @@ void Qt5Graphics::ResetClipRegion()
}
}
-void Qt5Graphics::drawPixel(long nX, long nY)
+void Qt5Graphics::drawPixel(tools::Long nX, tools::Long nY)
{
Qt5Painter aPainter(*this);
aPainter.drawPoint(nX, nY);
aPainter.update(nX, nY, 1, 1);
}
-void Qt5Graphics::drawPixel(long nX, long nY, Color nColor)
+void Qt5Graphics::drawPixel(tools::Long nX, tools::Long nY, Color nColor)
{
Qt5Painter aPainter(*this);
aPainter.setPen(toQColor(nColor));
@@ -182,12 +182,12 @@ void Qt5Graphics::drawPixel(long nX, long nY, Color nColor)
aPainter.update(nX, nY, 1, 1);
}
-void Qt5Graphics::drawLine(long nX1, long nY1, long nX2, long nY2)
+void Qt5Graphics::drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)
{
Qt5Painter aPainter(*this);
aPainter.drawLine(nX1, nY1, nX2, nY2);
- long tmp;
+ tools::Long tmp;
if (nX1 > nX2)
{
tmp = nX1;
@@ -203,7 +203,7 @@ void Qt5Graphics::drawLine(long nX1, long nY1, long nX2, long nY2)
aPainter.update(nX1, nY1, nX2 - nX1 + 1, nY2 - nY1 + 1);
}
-void Qt5Graphics::drawRect(long nX, long nY, long nWidth, long nHeight)
+void Qt5Graphics::drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
if (SALCOLOR_NONE == m_aFillColor && SALCOLOR_NONE == m_aLineColor)
return;
@@ -437,8 +437,9 @@ void Qt5Graphics::drawScaledImage(const SalTwoRect& rPosAry, const QImage& rImag
aPainter.update(aDestRect);
}
-void Qt5Graphics::copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, bool /*bWindowInvalidate*/)
+void Qt5Graphics::copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX,
+ tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
+ bool /*bWindowInvalidate*/)
{
if (nDestX == nSrcX && nDestY == nSrcY)
return;
@@ -509,14 +510,16 @@ void Qt5Graphics::drawMask(const SalTwoRect& rPosAry, const SalBitmap& /*rSalBit
assert(rPosAry.mnSrcHeight == rPosAry.mnDestHeight);
}
-std::shared_ptr<SalBitmap> Qt5Graphics::getBitmap(long nX, long nY, long nWidth, long nHeight)
+std::shared_ptr<SalBitmap> Qt5Graphics::getBitmap(tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight)
{
return std::make_shared<Qt5Bitmap>(m_pQImage->copy(nX, nY, nWidth, nHeight));
}
-Color Qt5Graphics::getPixel(long nX, long nY) { return m_pQImage->pixel(nX, nY); }
+Color Qt5Graphics::getPixel(tools::Long nX, tools::Long nY) { return m_pQImage->pixel(nX, nY); }
-void Qt5Graphics::invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags)
+void Qt5Graphics::invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ SalInvert nFlags)
{
Qt5Painter aPainter(*this);
if (SalInvert::N50 & nFlags)
@@ -548,8 +551,8 @@ void Qt5Graphics::invert(sal_uInt32 /*nPoints*/, const SalPoint* /*pPtAry*/, Sal
{
}
-bool Qt5Graphics::drawEPS(long /*nX*/, long /*nY*/, long /*nWidth*/, long /*nHeight*/,
- void* /*pPtr*/, sal_uInt32 /*nSize*/)
+bool Qt5Graphics::drawEPS(tools::Long /*nX*/, tools::Long /*nY*/, tools::Long /*nWidth*/,
+ tools::Long /*nHeight*/, void* /*pPtr*/, sal_uInt32 /*nSize*/)
{
return false;
}
@@ -649,8 +652,8 @@ bool Qt5Graphics::drawTransformedBitmap(const basegfx::B2DPoint& rNull, const ba
return true;
}
-bool Qt5Graphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
- sal_uInt8 nTransparency)
+bool Qt5Graphics::drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency)
{
if (SALCOLOR_NONE == m_aFillColor && SALCOLOR_NONE == m_aLineColor)
return true;
@@ -686,7 +689,7 @@ void Qt5Graphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY)
sal_uInt16 Qt5Graphics::GetBitCount() const { return getFormatBits(m_pQImage->format()); }
-long Qt5Graphics::GetGraphicsWidth() const { return m_pQImage->width(); }
+tools::Long Qt5Graphics::GetGraphicsWidth() const { return m_pQImage->width(); }
void Qt5Graphics::SetLineColor() { m_aLineColor = SALCOLOR_NONE; }
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index de39fc7009b8..b9eb2864bb45 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -253,12 +253,12 @@ bool Qt5Graphics::CreateFontSubset(const OUString& rToFile, const PhysicalFontFa
pGlyphIds, pEncoding, pGlyphWidths, nGlyphCount);
}
-const void* Qt5Graphics::GetEmbedFontData(const PhysicalFontFace*, long* /*pDataLen*/)
+const void* Qt5Graphics::GetEmbedFontData(const PhysicalFontFace*, tools::Long* /*pDataLen*/)
{
return nullptr;
}
-void Qt5Graphics::FreeEmbedFontData(const void* /*pData*/, long /*nDataLen*/) {}
+void Qt5Graphics::FreeEmbedFontData(const void* /*pData*/, tools::Long /*nDataLen*/) {}
void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* pFontFace, bool bVertical,
std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc)
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index bba348890898..ca1f914dd707 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -285,10 +285,9 @@ void Qt5Instance::DestroyObject(SalObject* pObject)
}
}
-std::unique_ptr<SalVirtualDevice> Qt5Instance::CreateVirtualDevice(SalGraphics* pGraphics,
- long& nDX, long& nDY,
- DeviceFormat eFormat,
- const SystemGraphicsData* pGd)
+std::unique_ptr<SalVirtualDevice>
+Qt5Instance::CreateVirtualDevice(SalGraphics* pGraphics, tools::Long& nDX, tools::Long& nDY,
+ DeviceFormat eFormat, const SystemGraphicsData* pGd)
{
if (m_bUseCairo)
{
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx
index 5bbfef5a5870..29bcb980f7c7 100644
--- a/vcl/qt5/Qt5Object.cxx
+++ b/vcl/qt5/Qt5Object.cxx
@@ -84,7 +84,8 @@ void Qt5Object::ResetClipRegion()
void Qt5Object::BeginSetClipRegion(sal_uInt32) { m_pRegion = QRegion(); }
-void Qt5Object::UnionClipRegion(long nX, long nY, long nWidth, long nHeight)
+void Qt5Object::UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
m_pRegion += QRect(nX, nY, nWidth, nHeight);
}
@@ -95,7 +96,7 @@ void Qt5Object::EndSetClipRegion()
m_pRegion = m_pRegion.intersected(m_pQWidget->geometry());
}
-void Qt5Object::SetPosSize(long nX, long nY, long nWidth, long nHeight)
+void Qt5Object::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
if (m_pQWidget)
{
diff --git a/vcl/qt5/Qt5VirtualDevice.cxx b/vcl/qt5/Qt5VirtualDevice.cxx
index 10b2066ccbf6..30b6e37643f8 100644
--- a/vcl/qt5/Qt5VirtualDevice.cxx
+++ b/vcl/qt5/Qt5VirtualDevice.cxx
@@ -46,12 +46,13 @@ void Qt5VirtualDevice::ReleaseGraphics(SalGraphics* pGraphics)
delete pGraphics;
}
-bool Qt5VirtualDevice::SetSize(long nNewDX, long nNewDY)
+bool Qt5VirtualDevice::SetSize(tools::Long nNewDX, tools::Long nNewDY)
{
return SetSizeUsingBuffer(nNewDX, nNewDY, nullptr);
}
-bool Qt5VirtualDevice::SetSizeUsingBuffer(long nNewDX, long nNewDY, sal_uInt8* pBuffer)
+bool Qt5VirtualDevice::SetSizeUsingBuffer(tools::Long nNewDX, tools::Long nNewDY,
+ sal_uInt8* pBuffer)
{
if (nNewDX == 0)
nNewDX = 1;
@@ -88,8 +89,8 @@ bool Qt5VirtualDevice::SetSizeUsingBuffer(long nNewDX, long nNewDY, sal_uInt8* p
return true;
}
-long Qt5VirtualDevice::GetWidth() const { return m_pImage ? m_aFrameSize.width() : 0; }
+tools::Long Qt5VirtualDevice::GetWidth() const { return m_pImage ? m_aFrameSize.width() : 0; }
-long Qt5VirtualDevice::GetHeight() const { return m_pImage ? m_aFrameSize.height() : 0; }
+tools::Long Qt5VirtualDevice::GetHeight() const { return m_pImage ? m_aFrameSize.height() : 0; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 0ed499ca771d..e25f78f0be8b 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -540,7 +540,7 @@ const vcl::Region& SkiaSalGraphicsImpl::getClipRegion() const { return mClipRegi
sal_uInt16 SkiaSalGraphicsImpl::GetBitCount() const { return 32; }
-long SkiaSalGraphicsImpl::GetGraphicsWidth() const { return GetWidth(); }
+tools::Long SkiaSalGraphicsImpl::GetGraphicsWidth() const { return GetWidth(); }
void SkiaSalGraphicsImpl::SetLineColor()
{
@@ -688,9 +688,12 @@ void SkiaSalGraphicsImpl::SetROPFillColor(SalROPColor nROPColor)
}
}
-void SkiaSalGraphicsImpl::drawPixel(long nX, long nY) { drawPixel(nX, nY, mLineColor); }
+void SkiaSalGraphicsImpl::drawPixel(tools::Long nX, tools::Long nY)
+{
+ drawPixel(nX, nY, mLineColor);
+}
-void SkiaSalGraphicsImpl::drawPixel(long nX, long nY, Color nColor)
+void SkiaSalGraphicsImpl::drawPixel(tools::Long nX, tools::Long nY, Color nColor)
{
if (nColor == SALCOLOR_NONE)
return;
@@ -705,7 +708,8 @@ void SkiaSalGraphicsImpl::drawPixel(long nX, long nY, Color nColor)
postDraw();
}
-void SkiaSalGraphicsImpl::drawLine(long nX1, long nY1, long nX2, long nY2)
+void SkiaSalGraphicsImpl::drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2,
+ tools::Long nY2)
{
if (mLineColor == SALCOLOR_NONE)
return;
@@ -720,8 +724,9 @@ void SkiaSalGraphicsImpl::drawLine(long nX1, long nY1, long nX2, long nY2)
postDraw();
}
-void SkiaSalGraphicsImpl::privateDrawAlphaRect(long nX, long nY, long nWidth, long nHeight,
- double fTransparency, bool blockAA)
+void SkiaSalGraphicsImpl::privateDrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, double fTransparency,
+ bool blockAA)
{
preDraw();
SAL_INFO("vcl.skia.trace",
@@ -754,7 +759,8 @@ void SkiaSalGraphicsImpl::privateDrawAlphaRect(long nX, long nY, long nWidth, lo
postDraw();
}
-void SkiaSalGraphicsImpl::drawRect(long nX, long nY, long nWidth, long nHeight)
+void SkiaSalGraphicsImpl::drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
privateDrawAlphaRect(nX, nY, nWidth, nHeight, 0.0, true);
}
@@ -1124,8 +1130,9 @@ bool SkiaSalGraphicsImpl::drawPolyPolygonBezier(sal_uInt32, const sal_uInt32*,
return false;
}
-static void copyArea(SkCanvas* canvas, sk_sp<SkSurface> surface, long nDestX, long nDestY,
- long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, bool srcIsRaster,
+static void copyArea(SkCanvas* canvas, sk_sp<SkSurface> surface, tools::Long nDestX,
+ tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight, bool srcIsRaster,
bool destIsRaster)
{
// Using SkSurface::draw() should be more efficient than SkSurface::makeImageSnapshot(),
@@ -1153,8 +1160,9 @@ static void copyArea(SkCanvas* canvas, sk_sp<SkSurface> surface, long nDestX, lo
canvas->restore();
}
-void SkiaSalGraphicsImpl::copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, bool /*bWindowInvalidate*/)
+void SkiaSalGraphicsImpl::copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX,
+ tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
+ bool /*bWindowInvalidate*/)
{
if (nDestX == nSrcX && nDestY == nSrcY)
return;
@@ -1324,8 +1332,8 @@ void SkiaSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, const SalBitmap& r
skiaBitmap.GetAlphaSkShader()));
}
-std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(long nX, long nY, long nWidth,
- long nHeight)
+std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight)
{
SkiaZone zone;
checkSurface();
@@ -1340,7 +1348,7 @@ std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(long nX, long nY, long
return std::make_shared<SkiaSalBitmap>(image);
}
-Color SkiaSalGraphicsImpl::getPixel(long nX, long nY)
+Color SkiaSalGraphicsImpl::getPixel(tools::Long nX, tools::Long nY)
{
SkiaZone zone;
checkSurface();
@@ -1454,7 +1462,8 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
postDraw();
}
-void SkiaSalGraphicsImpl::invert(long nX, long nY, long nWidth, long nHeight, SalInvert eFlags)
+void SkiaSalGraphicsImpl::invert(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, SalInvert eFlags)
{
basegfx::B2DRectangle aRectangle(nX, nY, nX + nWidth, nY + nHeight);
auto aRect = basegfx::utils::createPolygonFromRect(aRectangle);
@@ -1474,7 +1483,11 @@ void SkiaSalGraphicsImpl::invert(sal_uInt32 nPoints, const SalPoint* pPointArray
invert(aPolygon, eFlags);
}
-bool SkiaSalGraphicsImpl::drawEPS(long, long, long, long, void*, sal_uInt32) { return false; }
+bool SkiaSalGraphicsImpl::drawEPS(tools::Long, tools::Long, tools::Long, tools::Long, void*,
+ sal_uInt32)
+{
+ return false;
+}
// Create SkImage from a bitmap and possibly an alpha mask (the usual VCL one-minus-alpha),
// with the given target size. Result will be possibly cached, unless disabled.
@@ -1764,8 +1777,8 @@ bool SkiaSalGraphicsImpl::drawTransformedBitmap(const basegfx::B2DPoint& rNull,
return true;
}
-bool SkiaSalGraphicsImpl::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
- sal_uInt8 nTransparency)
+bool SkiaSalGraphicsImpl::drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency)
{
privateDrawAlphaRect(nX, nY, nWidth, nHeight, nTransparency / 100.0);
return true;
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 49ca73beac0f..eeb528267b0f 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -554,7 +554,7 @@ SkBitmap SkiaSalBitmap::GetAsSkBitmap() const
SkConvertRGBToRGBA(dest, mBuffer.get(), mPixelsSize.Height() * mPixelsSize.Width());
else
{
- for (long y = 0; y < mPixelsSize.Height(); ++y)
+ for (tools::Long y = 0; y < mPixelsSize.Height(); ++y)
{
const sal_uInt8* src = mBuffer.get() + mScanlineSize * y;
SkConvertRGBToRGBA(dest, src, mPixelsSize.Width());
@@ -583,7 +583,7 @@ SkBitmap SkiaSalBitmap::GetAsSkBitmap() const
mPixelsSize.Height() * mPixelsSize.Width());
else
{
- for (long y = 0; y < mPixelsSize.Height(); ++y)
+ for (tools::Long y = 0; y < mPixelsSize.Height(); ++y)
{
const sal_uInt8* src = mBuffer.get() + mScanlineSize * y;
SkConvertGrayToRGBA(dest, src, mPixelsSize.Width());
@@ -648,7 +648,7 @@ bool SkiaSalBitmap::ConserveMemory() const
static bool keepBitmapBuffer = getenv("SAL_SKIA_KEEP_BITMAP_BUFFER") != nullptr;
constexpr bool is32Bit = sizeof(void*) == 4;
// 16MiB bitmap data at least (set to 0 for easy testing).
- constexpr long maxBufferSize = 2000 * 2000 * 4;
+ constexpr tools::Long maxBufferSize = 2000 * 2000 * 4;
return !keepBitmapBuffer
&& (SkiaHelper::renderMethodToUse() == SkiaHelper::RenderRaster || is32Bit)
&& mPixelsSize.Height() * mScanlineSize > maxBufferSize
@@ -898,9 +898,9 @@ void SkiaSalBitmap::PerformErase()
assert(bitmapBuffer->mnFormat & ScanlineFormat::TopDown);
// Set first scanline, copy to others.
Scanline scanline = bitmapBuffer->mpBits;
- for (long x = 0; x < bitmapBuffer->mnWidth; ++x)
+ for (tools::Long x = 0; x < bitmapBuffer->mnWidth; ++x)
setPixel(scanline, x, mEraseColor, bitmapBuffer->maColorMask);
- for (long y = 1; y < bitmapBuffer->mnHeight; ++y)
+ for (tools::Long y = 1; y < bitmapBuffer->mnHeight; ++y)
memcpy(scanline + y * bitmapBuffer->mnScanlineSize, scanline,
bitmapBuffer->mnScanlineSize);
}
@@ -967,7 +967,7 @@ void SkiaSalBitmap::EnsureBitmapData()
memcpy(mBuffer.get(), bitmap.getPixels(), mSize.Height() * mScanlineSize);
else
{
- for (long y = 0; y < mSize.Height(); ++y)
+ for (tools::Long y = 0; y < mSize.Height(); ++y)
{
const uint8_t* src = static_cast<uint8_t*>(bitmap.getAddr(0, y));
sal_uInt8* dest = mBuffer.get() + mScanlineSize * y;
@@ -1043,7 +1043,7 @@ void SkiaSalBitmap::EnsureBitmapData()
memcpy(mBuffer.get(), bitmap.getPixels(), mSize.Height() * mScanlineSize);
else
{
- for (long y = 0; y < mSize.Height(); ++y)
+ for (tools::Long y = 0; y < mSize.Height(); ++y)
{
const uint8_t* src = static_cast<uint8_t*>(bitmap.getAddr(0, y));
sal_uInt8* dest = mBuffer.get() + mScanlineSize * y;
@@ -1060,7 +1060,7 @@ void SkiaSalBitmap::EnsureBitmapData()
}
else
{
- for (long y = 0; y < mSize.Height(); ++y)
+ for (tools::Long y = 0; y < mSize.Height(); ++y)
{
const uint32_t* src = bitmap.getAddr32(0, y);
sal_uInt8* dest = mBuffer.get() + mScanlineSize * y;
@@ -1077,7 +1077,7 @@ void SkiaSalBitmap::EnsureBitmapData()
}
else
{
- for (long y = 0; y < mSize.Height(); ++y)
+ for (tools::Long y = 0; y < mSize.Height(); ++y)
{
const uint32_t* src = bitmap.getAddr32(0, y);
sal_uInt8* dest = mBuffer.get() + mScanlineSize * y;
@@ -1089,12 +1089,12 @@ void SkiaSalBitmap::EnsureBitmapData()
{
std::unique_ptr<vcl::ScanlineWriter> pWriter
= vcl::ScanlineWriter::Create(mBitCount, mPalette);
- for (long y = 0; y < mSize.Height(); ++y)
+ for (tools::Long y = 0; y < mSize.Height(); ++y)
{
const uint8_t* src = static_cast<uint8_t*>(bitmap.getAddr(0, y));
sal_uInt8* dest = mBuffer.get() + mScanlineSize * y;
pWriter->nextLine(dest);
- for (long x = 0; x < mSize.Width(); ++x)
+ for (tools::Long x = 0; x < mSize.Width(); ++x)
{
sal_uInt8 r = *src++;
sal_uInt8 g = *src++;
diff --git a/vcl/skia/x11/salvd.cxx b/vcl/skia/x11/salvd.cxx
index a4db9c75dfe3..20ba5bfd001d 100644
--- a/vcl/skia/x11/salvd.cxx
+++ b/vcl/skia/x11/salvd.cxx
@@ -32,8 +32,8 @@ void X11SalGraphics::Init(X11SkiaSalVirtualDevice* pDevice)
mxImpl->Init();
}
-X11SkiaSalVirtualDevice::X11SkiaSalVirtualDevice(SalGraphics const* pGraphics, long nDX, long nDY,
- const SystemGraphicsData* pData,
+X11SkiaSalVirtualDevice::X11SkiaSalVirtualDevice(SalGraphics const* pGraphics, tools::Long nDX,
+ tools::Long nDY, const SystemGraphicsData* pData,
std::unique_ptr<X11SalGraphics> pNewGraphics)
: mpGraphics(std::move(pNewGraphics))
, mbGraphics(false)
@@ -68,7 +68,7 @@ SalGraphics* X11SkiaSalVirtualDevice::AcquireGraphics()
void X11SkiaSalVirtualDevice::ReleaseGraphics(SalGraphics*) { mbGraphics = false; }
-bool X11SkiaSalVirtualDevice::SetSize(long nDX, long nDY)
+bool X11SkiaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY)
{
if (!nDX)
nDX = 1;
diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx
index f788c7be123f..69984bbe4566 100644
--- a/vcl/source/animate/Animation.cxx
+++ b/vcl/source/animate/Animation.cxx
@@ -160,7 +160,7 @@ BitmapChecksum Animation::GetChecksum() const
}
bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz,
- long nExtraData, OutputDevice* pFirstFrameOutDev)
+ tools::Long nExtraData, OutputDevice* pFirstFrameOutDev)
{
bool bRet = false;
@@ -215,7 +215,7 @@ bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDes
return bRet;
}
-void Animation::Stop(const OutputDevice* pOut, long nExtraData)
+void Animation::Stop(const OutputDevice* pOut, tools::Long nExtraData)
{
maViewList.erase(std::remove_if(maViewList.begin(), maViewList.end(),
[=](const std::unique_ptr<ImplAnimView>& pAnimView) -> bool {
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index acbab4bb6b85..7f16b6a0a699 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -344,7 +344,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
OUStringBuffer aBuf;
comphelper::string::padToLength(aBuf, nCharsInLine, 'x');
OUString aXXX = aBuf.makeStringAndClear();
- long nWidth = GetTextWidth( aXXX );
+ tools::Long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
tools::Rectangle aTry1( Point(), aTmpSize );
DrawTextFlags nDrawFlags = DrawTextFlags::MultiLine | DrawTextFlags::WordBreak |
@@ -583,7 +583,7 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic
{
if ( !(nStyle & QuickHelpFlags::NoAutoPos) )
{
- long nScreenHeight = aScreenRect.GetHeight();
+ tools::Long nScreenHeight = aScreenRect.GetHeight();
aPos.AdjustX( -4 );
if ( aPos.Y() > aScreenRect.Top()+nScreenHeight-(nScreenHeight/4) )
aPos.AdjustY( -(aSz.Height()+4) );
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index ae7eed0e2fba..8bf77ac25116 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -152,7 +152,7 @@ bool vcl::I18nHelper::MatchMnemonic( const OUString& rString, sal_Unicode cMnemo
return bEqual;
}
-OUString vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep, bool bTrailingZeros ) const
+OUString vcl::I18nHelper::GetNum( tools::Long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep, bool bTrailingZeros ) const
{
return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros );
}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 190e265d0ada..093d79ce018b 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3098,8 +3098,8 @@ void SalInstanceEntry::set_max_length(int nChars)
void SalInstanceEntry::select_region(int nStartPos, int nEndPos)
{
disable_notify_events();
- long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
- long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
+ tools::Long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
+ tools::Long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
m_xEntry->SetSelection(Selection(nStart, nEnd));
enable_notify_events();
}
@@ -3609,7 +3609,7 @@ public:
m_xTreeView->SetPopupMenuHdl(LINK(this, SalInstanceTreeView, PopupMenuHdl));
m_xTreeView->SetCustomRenderHdl(LINK(this, SalInstanceTreeView, CustomRenderHdl));
m_xTreeView->SetCustomMeasureHdl(LINK(this, SalInstanceTreeView, CustomMeasureHdl));
- const long aTabPositions[] = { 0 };
+ const tools::Long aTabPositions[] = { 0 };
m_xTreeView->SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions);
LclHeaderTabListBox* pHeaderBox = dynamic_cast<LclHeaderTabListBox*>(m_xTreeView.get());
@@ -5609,8 +5609,8 @@ bool SalInstanceTextView::get_selection_bounds(int& rStartPos, int& rEndPos)
void SalInstanceTextView::select_region(int nStartPos, int nEndPos)
{
disable_notify_events();
- long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
- long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
+ tools::Long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
+ tools::Long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
m_xTextView->SetSelection(Selection(nStart, nEnd));
enable_notify_events();
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index cb5efc485187..da23dcf9deb9 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -59,10 +59,10 @@ struct ImplMouseData
{
MouseSettingsOptions mnOptions = MouseSettingsOptions::NONE;
sal_uInt64 mnDoubleClkTime = 500;
- long mnDoubleClkWidth = 2;
- long mnDoubleClkHeight = 2;
- long mnStartDragWidth = 2 ;
- long mnStartDragHeight = 2;
+ tools::Long mnDoubleClkWidth = 2;
+ tools::Long mnDoubleClkHeight = 2;
+ tools::Long mnStartDragWidth = 2 ;
+ tools::Long mnStartDragHeight = 2;
sal_uLong mnButtonRepeat = 90;
sal_uLong mnMenuDelay = 150;
MouseFollowFlags mnFollow = MouseFollowFlags::Menu | MouseFollowFlags::DDList;
@@ -155,12 +155,12 @@ struct ImplStyleData
vcl::Font maIconFont;
vcl::Font maTabFont;
vcl::Font maGroupFont;
- long mnTitleHeight;
- long mnFloatTitleHeight;
- long mnScrollBarSize;
- long mnSpinSize;
- long mnCursorSize;
- long mnAntialiasedMin;
+ tools::Long mnTitleHeight;
+ tools::Long mnFloatTitleHeight;
+ tools::Long mnScrollBarSize;
+ tools::Long mnSpinSize;
+ tools::Long mnCursorSize;
+ tools::Long mnAntialiasedMin;
sal_uInt64 mnCursorBlinkTime;
DragFullOptions mnDragFullOptions;
SelectionOptions mnSelectionOptions;
@@ -179,7 +179,7 @@ struct ImplStyleData
TriState meUseImagesInMenus;
bool mnUseFlatBorders;
bool mbPreferredUseImagesInMenus;
- long mnMinThumbSize;
+ tools::Long mnMinThumbSize;
std::shared_ptr<vcl::IconThemeScanner>
mIconThemeScanner;
std::shared_ptr<vcl::IconThemeSelector>
@@ -271,52 +271,52 @@ MouseSettings::GetDoubleClickTime() const
}
void
-MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth )
+MouseSettings::SetDoubleClickWidth( tools::Long nDoubleClkWidth )
{
CopyData();
mxData->mnDoubleClkWidth = nDoubleClkWidth;
}
-long
+tools::Long
MouseSettings::GetDoubleClickWidth() const
{
return mxData->mnDoubleClkWidth;
}
void
-MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight )
+MouseSettings::SetDoubleClickHeight( tools::Long nDoubleClkHeight )
{
CopyData();
mxData->mnDoubleClkHeight = nDoubleClkHeight;
}
-long
+tools::Long
MouseSettings::GetDoubleClickHeight() const
{
return mxData->mnDoubleClkHeight;
}
void
-MouseSettings::SetStartDragWidth( long nDragWidth )
+MouseSettings::SetStartDragWidth( tools::Long nDragWidth )
{
CopyData();
mxData->mnStartDragWidth = nDragWidth;
}
-long
+tools::Long
MouseSettings::GetStartDragWidth() const
{
return mxData->mnStartDragWidth;
}
void
-MouseSettings::SetStartDragHeight( long nDragHeight )
+MouseSettings::SetStartDragHeight( tools::Long nDragHeight )
{
CopyData();
mxData->mnStartDragHeight = nDragHeight;
}
-long
+tools::Long
MouseSettings::GetStartDragHeight() const
{
return mxData->mnStartDragHeight;
@@ -1865,91 +1865,91 @@ StyleSettings::GetTabFont() const
return mxData->maTabFont;
}
-long
+tools::Long
StyleSettings::GetBorderSize()
{
return 1;
}
void
-StyleSettings::SetTitleHeight( long nSize )
+StyleSettings::SetTitleHeight( tools::Long nSize )
{
CopyData();
mxData->mnTitleHeight = nSize;
}
-long
+tools::Long
StyleSettings::GetTitleHeight() const
{
return mxData->mnTitleHeight;
}
void
-StyleSettings::SetFloatTitleHeight( long nSize )
+StyleSettings::SetFloatTitleHeight( tools::Long nSize )
{
CopyData();
mxData->mnFloatTitleHeight = nSize;
}
-long
+tools::Long
StyleSettings::GetFloatTitleHeight() const
{
return mxData->mnFloatTitleHeight;
}
void
-StyleSettings::SetScrollBarSize( long nSize )
+StyleSettings::SetScrollBarSize( tools::Long nSize )
{
CopyData();
mxData->mnScrollBarSize = nSize;
}
-long
+tools::Long
StyleSettings::GetScrollBarSize() const
{
return mxData->mnScrollBarSize;
}
void
-StyleSettings::SetMinThumbSize( long nSize )
+StyleSettings::SetMinThumbSize( tools::Long nSize )
{
CopyData();
mxData->mnMinThumbSize = nSize;
}
-long
+tools::Long
StyleSettings::GetMinThumbSize() const
{
return mxData->mnMinThumbSize;
}
void
-StyleSettings::SetSpinSize( long nSize )
+StyleSettings::SetSpinSize( tools::Long nSize )
{
CopyData();
mxData->mnSpinSize = nSize;
}
-long
+tools::Long
StyleSettings::GetSpinSize() const
{
return mxData->mnSpinSize;
}
-long
+tools::Long
StyleSettings::GetSplitSize()
{
return 3;
}
void
-StyleSettings::SetCursorSize( long nSize )
+StyleSettings::SetCursorSize( tools::Long nSize )
{
CopyData();
mxData->mnCursorSize = nSize;
}
-long
+tools::Long
StyleSettings::GetCursorSize() const
{
return mxData->mnCursorSize;
@@ -1965,7 +1965,7 @@ StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
sal_uInt64
StyleSettings::GetCursorBlinkTime() const
{
- return static_cast<long>(mxData->mnCursorBlinkTime);
+ return static_cast<tools::Long>(mxData->mnCursorBlinkTime);
}
void
@@ -2008,7 +2008,7 @@ StyleSettings::GetDisplayOptions() const
}
void
-StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel )
+StyleSettings::SetAntialiasingMinPixelHeight( tools::Long nMinPixel )
{
CopyData();
mxData->mnAntialiasedMin = nMinPixel;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 1103bf179374..7f27cf4d5601 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -639,8 +639,8 @@ void Application::SetSettings( const AllSettings& rSettings )
// Update all windows
vcl::Window* pFirstFrame = pSVData->maFrameData.mpFirstFrame;
// Reset data that needs to be re-calculated
- long nOldDPIX = 0;
- long nOldDPIY = 0;
+ tools::Long nOldDPIX = 0;
+ tools::Long nOldDPIY = 0;
if ( pFirstFrame )
{
nOldDPIX = pFirstFrame->GetDPIX();
@@ -1064,9 +1064,9 @@ vcl::Window* Application::GetNextTopLevelWindow( vcl::Window const * pWindow )
return pWindow->mpWindowImpl->mpFrameData->mpNextFrame;
}
-long Application::GetTopWindowCount()
+tools::Long Application::GetTopWindowCount()
{
- long nRet = 0;
+ tools::Long nRet = 0;
ImplSVData* pSVData = ImplGetSVData();
vcl::Window *pWin = pSVData ? pSVData->maFrameData.mpFirstFrame.get() : nullptr;
while( pWin )
@@ -1078,9 +1078,9 @@ long Application::GetTopWindowCount()
return nRet;
}
-vcl::Window* Application::GetTopWindow( long nIndex )
+vcl::Window* Application::GetTopWindow( tools::Long nIndex )
{
- long nIdx = 0;
+ tools::Long nIdx = 0;
ImplSVData* pSVData = ImplGetSVData();
vcl::Window *pWin = pSVData ? pSVData->maFrameData.mpFirstFrame.get() : nullptr;
while( pWin )
@@ -1268,8 +1268,8 @@ unsigned long calcDistSquare( const Point& i_rPoint, const tools::Rectangle& i_r
{
const Point aRectCenter( (i_rRect.Left() + i_rRect.Right())/2,
(i_rRect.Top() + i_rRect.Bottom())/ 2 );
- const long nDX = aRectCenter.X() - i_rPoint.X();
- const long nDY = aRectCenter.Y() - i_rPoint.Y();
+ const tools::Long nDX = aRectCenter.X() - i_rPoint.X();
+ const tools::Long nDY = aRectCenter.Y() - i_rPoint.Y();
return nDX*nDX + nDY*nDY;
}
}
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index d16160ac307a..4c9fbbe06f48 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -437,9 +437,9 @@ void DeInitVCL()
#if OSL_DEBUG_LEVEL > 0
OStringBuffer aBuf( 256 );
aBuf.append( "DeInitVCL: some top Windows are still alive\n" );
- long nTopWindowCount = Application::GetTopWindowCount();
- long nBadTopWindows = nTopWindowCount;
- for( long i = 0; i < nTopWindowCount; i++ )
+ tools::Long nTopWindowCount = Application::GetTopWindowCount();
+ tools::Long nBadTopWindows = nTopWindowCount;
+ for( tools::Long i = 0; i < nTopWindowCount; i++ )
{
vcl::Window* pWin = Application::GetTopWindow( i );
// default window will be destroyed further down
diff --git a/vcl/source/bitmap/BitmapAlphaClampFilter.cxx b/vcl/source/bitmap/BitmapAlphaClampFilter.cxx
index 3db6b43e2c76..9753d82666fd 100644
--- a/vcl/source/bitmap/BitmapAlphaClampFilter.cxx
+++ b/vcl/source/bitmap/BitmapAlphaClampFilter.cxx
@@ -23,11 +23,11 @@ BitmapEx BitmapAlphaClampFilter::execute(BitmapEx const& rBitmapEx) const
AlphaScopedWriteAccess pWriteAlpha(aBitmapAlpha);
const Size aSize(rBitmapEx.GetSizePixel());
- for (long nY = 0; nY < aSize.Height(); ++nY)
+ for (tools::Long nY = 0; nY < aSize.Height(); ++nY)
{
Scanline pScanAlpha = pWriteAlpha->GetScanline(nY);
- for (long nX = 0; nX < aSize.Width(); ++nX)
+ for (tools::Long nX = 0; nX < aSize.Width(); ++nX)
{
BitmapColor aBitmapAlphaValue(pWriteAlpha->GetPixelFromData(pScanAlpha, nX));
if (aBitmapAlphaValue.GetIndex() > mcThreshold)
diff --git a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
index 9ee1ad3822b4..62be25514e90 100644
--- a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
+++ b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
@@ -29,12 +29,12 @@ struct FilterSharedData
{
BitmapReadAccess* mpReadAccess;
BitmapWriteAccess* mpWriteAccess;
- long mnRadius;
+ tools::Long mnRadius;
sal_uInt8 mnOutsideVal;
Color maOutsideColor;
FilterSharedData(Bitmap::ScopedReadAccess& rReadAccess, BitmapScopedWriteAccess& rWriteAccess,
- long nRadius, sal_uInt8 nOutsideVal)
+ tools::Long nRadius, sal_uInt8 nOutsideVal)
: mpReadAccess(rReadAccess.get())
, mpWriteAccess(rWriteAccess.get())
, mnRadius(nRadius)
@@ -74,13 +74,15 @@ template <typename MorphologyOp, int nComponentWidth> struct Value
bLookOutside ? rShared.mnOutsideVal : MorphologyOp::initVal);
}
- void apply(const BitmapReadAccess* pReadAccess, long x, long y, sal_uInt8* pHint = nullptr)
+ void apply(const BitmapReadAccess* pReadAccess, tools::Long x, tools::Long y,
+ sal_uInt8* pHint = nullptr)
{
sal_uInt8* pSource = (pHint ? pHint : pReadAccess->GetScanline(y)) + nWidthBytes * x;
std::transform(pSource, pSource + nWidthBytes, aResult, aResult, MorphologyOp::apply);
}
- void copy(const BitmapWriteAccess* pWriteAccess, long x, long y, sal_uInt8* pHint = nullptr)
+ void copy(const BitmapWriteAccess* pWriteAccess, tools::Long x, tools::Long y,
+ sal_uInt8* pHint = nullptr)
{
sal_uInt8* pDest = (pHint ? pHint : pWriteAccess->GetScanline(y)) + nWidthBytes * x;
std::copy_n(aResult, nWidthBytes, pDest);
@@ -102,7 +104,8 @@ template <typename MorphologyOp> struct Value<MorphologyOp, 0>
{
}
- void apply(const BitmapReadAccess* pReadAccess, long x, long y, sal_uInt8* /*pHint*/ = nullptr)
+ void apply(const BitmapReadAccess* pReadAccess, tools::Long x, tools::Long y,
+ sal_uInt8* /*pHint*/ = nullptr)
{
const auto& rSource = pReadAccess->GetColor(y, x);
aResult = Color(MorphologyOp::apply(rSource.GetTransparency(), aResult.GetTransparency()),
@@ -111,13 +114,15 @@ template <typename MorphologyOp> struct Value<MorphologyOp, 0>
MorphologyOp::apply(rSource.GetBlue(), aResult.GetBlue()));
}
- void copy(BitmapWriteAccess* pWriteAccess, long x, long y, sal_uInt8* /*pHint*/ = nullptr)
+ void copy(BitmapWriteAccess* pWriteAccess, tools::Long x, tools::Long y,
+ sal_uInt8* /*pHint*/ = nullptr)
{
pWriteAccess->SetPixel(y, x, aResult);
}
};
-bool GetMinMax(long nCenter, long nRadius, long nMaxLimit, long& nMin, long& nMax)
+bool GetMinMax(tools::Long nCenter, tools::Long nRadius, tools::Long nMaxLimit, tools::Long& nMin,
+ tools::Long& nMax)
{
nMin = nCenter - nRadius;
nMax = nCenter + nRadius;
@@ -137,26 +142,27 @@ bool GetMinMax(long nCenter, long nRadius, long nMaxLimit, long& nMin, long& nMa
template <typename MorphologyOp, int nComponentWidth> struct pass
{
- static void Horizontal(FilterSharedData const& rShared, const long nStart, const long nEnd)
+ static void Horizontal(FilterSharedData const& rShared, const tools::Long nStart,
+ const tools::Long nEnd)
{
BitmapReadAccess* pReadAccess = rShared.mpReadAccess;
BitmapWriteAccess* pWriteAccess = rShared.mpWriteAccess;
- const long nLastIndex = pReadAccess->Width() - 1;
+ const tools::Long nLastIndex = pReadAccess->Width() - 1;
- for (long y = nStart; y <= nEnd; y++)
+ for (tools::Long y = nStart; y <= nEnd; y++)
{
// Optimization
sal_uInt8* const pSourceHint = pReadAccess->GetScanline(y);
sal_uInt8* const pDestHint = pWriteAccess->GetScanline(y);
- for (long x = 0; x <= nLastIndex; x++)
+ for (tools::Long x = 0; x <= nLastIndex; x++)
{
// This processes [nRadius * 2 + 1] pixels of source per resulting pixel
// TODO: try to optimize this to not process same pixels repeatedly
- long iMin, iMax;
+ tools::Long iMin, iMax;
const bool bLookOutside = GetMinMax(x, rShared.mnRadius, nLastIndex, iMin, iMax);
Value<MorphologyOp, nComponentWidth> aResult(rShared, bLookOutside);
- for (long i = iMin; i <= iMax; ++i)
+ for (tools::Long i = iMin; i <= iMax; ++i)
aResult.apply(pReadAccess, i, y, pSourceHint);
aResult.copy(pWriteAccess, x, y, pDestHint);
@@ -164,23 +170,24 @@ template <typename MorphologyOp, int nComponentWidth> struct pass
}
}
- static void Vertical(FilterSharedData const& rShared, const long nStart, const long nEnd)
+ static void Vertical(FilterSharedData const& rShared, const tools::Long nStart,
+ const tools::Long nEnd)
{
BitmapReadAccess* pReadAccess = rShared.mpReadAccess;
BitmapWriteAccess* pWriteAccess = rShared.mpWriteAccess;
- const long nLastIndex = pReadAccess->Height() - 1;
+ const tools::Long nLastIndex = pReadAccess->Height() - 1;
- for (long x = nStart; x <= nEnd; x++)
+ for (tools::Long x = nStart; x <= nEnd; x++)
{
- for (long y = 0; y <= nLastIndex; y++)
+ for (tools::Long y = 0; y <= nLastIndex; y++)
{
// This processes [nRadius * 2 + 1] pixels of source per resulting pixel
// TODO: try to optimize this to not process same pixels repeatedly
- long iMin, iMax;
+ tools::Long iMin, iMax;
const bool bLookOutside = GetMinMax(y, rShared.mnRadius, nLastIndex, iMin, iMax);
Value<MorphologyOp, nComponentWidth> aResult(rShared, bLookOutside);
- for (long i = iMin; i <= iMax; ++i)
+ for (tools::Long i = iMin; i <= iMax; ++i)
aResult.apply(pReadAccess, x, i);
aResult.copy(pWriteAccess, x, y);
@@ -189,18 +196,18 @@ template <typename MorphologyOp, int nComponentWidth> struct pass
}
};
-typedef void (*passFn)(FilterSharedData const& rShared, long nStart, long nEnd);
+typedef void (*passFn)(FilterSharedData const& rShared, tools::Long nStart, tools::Long nEnd);
class FilterTask : public comphelper::ThreadTask
{
passFn mpFunction;
FilterSharedData& mrShared;
- long mnStart;
- long mnEnd;
+ tools::Long mnStart;
+ tools::Long mnEnd;
public:
explicit FilterTask(const std::shared_ptr<comphelper::ThreadTaskTag>& pTag, passFn pFunction,
- FilterSharedData& rShared, long nStart, long nEnd)
+ FilterSharedData& rShared, tools::Long nStart, tools::Long nEnd)
: comphelper::ThreadTask(pTag)
, mpFunction(pFunction)
, mrShared(rShared)
@@ -212,11 +219,11 @@ public:
virtual void doWork() override { mpFunction(mrShared, mnStart, mnEnd); }
};
-constexpr long nThreadStrip = 16;
+constexpr tools::Long nThreadStrip = 16;
template <typename MorphologyOp, int nComponentWidth>
-void runFilter(Bitmap& rBitmap, const long nRadius, const bool bParallel, bool bUseValueOutside,
- sal_uInt8 nValueOutside)
+void runFilter(Bitmap& rBitmap, const tools::Long nRadius, const bool bParallel,
+ bool bUseValueOutside, sal_uInt8 nValueOutside)
{
using myPass = pass<MorphologyOp, nComponentWidth>;
const sal_uInt8 nOutsideVal = bUseValueOutside ? nValueOutside : MorphologyOp::initVal;
@@ -232,11 +239,11 @@ void runFilter(Bitmap& rBitmap, const long nRadius, const bool bParallel, bool b
BitmapScopedWriteAccess pWriteAccess(rBitmap);
FilterSharedData aSharedData(pReadAccess, pWriteAccess, nRadius, nOutsideVal);
- const long nLastIndex = pReadAccess->Height() - 1;
- long nStripStart = 0;
+ const tools::Long nLastIndex = pReadAccess->Height() - 1;
+ tools::Long nStripStart = 0;
for (; nStripStart < nLastIndex - nThreadStrip; nStripStart += nThreadStrip)
{
- long nStripEnd = nStripStart + nThreadStrip - 1;
+ tools::Long nStripEnd = nStripStart + nThreadStrip - 1;
auto pTask(std::make_unique<FilterTask>(pTag, myPass::Horizontal, aSharedData,
nStripStart, nStripEnd));
rShared.pushTask(std::move(pTask));
@@ -250,11 +257,11 @@ void runFilter(Bitmap& rBitmap, const long nRadius, const bool bParallel, bool b
BitmapScopedWriteAccess pWriteAccess(rBitmap);
FilterSharedData aSharedData(pReadAccess, pWriteAccess, nRadius, nOutsideVal);
- const long nLastIndex = pReadAccess->Width() - 1;
- long nStripStart = 0;
+ const tools::Long nLastIndex = pReadAccess->Width() - 1;
+ tools::Long nStripStart = 0;
for (; nStripStart < nLastIndex - nThreadStrip; nStripStart += nThreadStrip)
{
- long nStripEnd = nStripStart + nThreadStrip - 1;
+ tools::Long nStripEnd = nStripStart + nThreadStrip - 1;
auto pTask(std::make_unique<FilterTask>(pTag, myPass::Vertical, aSharedData,
nStripStart, nStripEnd));
rShared.pushTask(std::move(pTask));
@@ -275,16 +282,16 @@ void runFilter(Bitmap& rBitmap, const long nRadius, const bool bParallel, bool b
Bitmap::ScopedReadAccess pReadAccess(rBitmap);
BitmapScopedWriteAccess pWriteAccess(rBitmap);
FilterSharedData aSharedData(pReadAccess, pWriteAccess, nRadius, nOutsideVal);
- long nFirstIndex = 0;
- long nLastIndex = pReadAccess->Height() - 1;
+ tools::Long nFirstIndex = 0;
+ tools::Long nLastIndex = pReadAccess->Height() - 1;
myPass::Horizontal(aSharedData, nFirstIndex, nLastIndex);
}
{
Bitmap::ScopedReadAccess pReadAccess(rBitmap);
BitmapScopedWriteAccess pWriteAccess(rBitmap);
FilterSharedData aSharedData(pReadAccess, pWriteAccess, nRadius, nOutsideVal);
- long nFirstIndex = 0;
- long nLastIndex = pReadAccess->Width() - 1;
+ tools::Long nFirstIndex = 0;
+ tools::Long nLastIndex = pReadAccess->Width() - 1;
myPass::Vertical(aSharedData, nFirstIndex, nLastIndex);
}
}
diff --git a/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx b/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx
index 390319d8ad9e..40b4b803dcb0 100644
--- a/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx
+++ b/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx
@@ -53,17 +53,17 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
const sal_uInt32 nColorOffset = 256 / nColorsPerComponent;
const sal_uInt32 nTotalColors
= nColorsPerComponent * nColorsPerComponent * nColorsPerComponent;
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
+ const tools::Long nWidth = pRAcc->Width();
+ const tools::Long nHeight = pRAcc->Height();
std::unique_ptr<PopularColorCount[]> pCountTable(new PopularColorCount[nTotalColors]);
memset(pCountTable.get(), 0, nTotalColors * sizeof(PopularColorCount));
- for (long nR = 0, nIndex = 0; nR < 256; nR += nColorOffset)
+ for (tools::Long nR = 0, nIndex = 0; nR < 256; nR += nColorOffset)
{
- for (long nG = 0; nG < 256; nG += nColorOffset)
+ for (tools::Long nG = 0; nG < 256; nG += nColorOffset)
{
- for (long nB = 0; nB < 256; nB += nColorOffset)
+ for (tools::Long nB = 0; nB < 256; nB += nColorOffset)
{
pCountTable[nIndex].mnIndex = nIndex;
nIndex++;
@@ -73,10 +73,10 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
if (pRAcc->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanlineRead = pRAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
const BitmapColor& rCol
= pRAcc->GetPaletteColor(pRAcc->GetIndexFromData(pScanlineRead, nX));
@@ -91,10 +91,10 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanlineRead = pRAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
const BitmapColor aCol(pRAcc->GetPixelFromData(pScanlineRead, nX));
pCountTable[((static_cast<sal_uInt32>(aCol.GetRed()) >> nRightShiftBits)
@@ -145,11 +145,11 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
BitmapColor aDstCol(sal_uInt8(0));
std::unique_ptr<sal_uInt8[]> pIndexMap(new sal_uInt8[nTotalColors]);
- for (long nR = 0, nIndex = 0; nR < 256; nR += nColorOffset)
+ for (tools::Long nR = 0, nIndex = 0; nR < 256; nR += nColorOffset)
{
- for (long nG = 0; nG < 256; nG += nColorOffset)
+ for (tools::Long nG = 0; nG < 256; nG += nColorOffset)
{
- for (long nB = 0; nB < 256; nB += nColorOffset)
+ for (tools::Long nB = 0; nB < 256; nB += nColorOffset)
{
pIndexMap[nIndex++] = static_cast<sal_uInt8>(aNewPal.GetBestIndex(
BitmapColor(static_cast<sal_uInt8>(nR), static_cast<sal_uInt8>(nG),
@@ -160,11 +160,11 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
if (pRAcc->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWAcc->GetScanline(nY);
Scanline pScanlineRead = pRAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
const BitmapColor& rCol = pRAcc->GetPaletteColor(
pRAcc->GetIndexFromData(pScanlineRead, nX));
@@ -182,12 +182,12 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWAcc->GetScanline(nY);
Scanline pScanlineRead = pRAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
const BitmapColor aCol(pRAcc->GetPixelFromData(pScanlineRead, nX));
aDstCol.SetIndex(pIndexMap[((static_cast<sal_uInt32>(aCol.GetRed())
diff --git a/vcl/source/bitmap/BitmapColorizeFilter.cxx b/vcl/source/bitmap/BitmapColorizeFilter.cxx
index 343642b77a6f..4e063e1ef75a 100644
--- a/vcl/source/bitmap/BitmapColorizeFilter.cxx
+++ b/vcl/source/bitmap/BitmapColorizeFilter.cxx
@@ -23,13 +23,13 @@ BitmapEx BitmapColorizeFilter::execute(BitmapEx const& rBitmapEx) const
return rBitmapEx;
BitmapColor aBitmapColor;
- const long nW = pWriteAccess->Width();
- const long nH = pWriteAccess->Height();
+ const tools::Long nW = pWriteAccess->Width();
+ const tools::Long nH = pWriteAccess->Height();
std::vector<sal_uInt8> aMapR(256);
std::vector<sal_uInt8> aMapG(256);
std::vector<sal_uInt8> aMapB(256);
- long nX;
- long nY;
+ tools::Long nX;
+ tools::Long nY;
const sal_uInt8 cR = maColor.GetRed();
const sal_uInt8 cG = maColor.GetGreen();
diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
index 6237d3db97ff..1febdf3503c5 100644
--- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
+++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
@@ -22,7 +22,7 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
{
Bitmap aBitmap(rBitmapEx.GetBitmap());
- const long nDivisor = 8;
+ const tools::Long nDivisor = 8;
Bitmap::ScopedReadAccess pReadAcc(aBitmap);
bool bRet = false;
@@ -33,8 +33,8 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
- const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
- const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
+ const tools::Long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
+ const tools::Long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
std::unique_ptr<long[]> pColm(new long[nWidth2]);
std::unique_ptr<long[]> pRows(new long[nHeight2]);
std::unique_ptr<BitmapColor[]> pColRow1(new BitmapColor[nWidth2]);
@@ -44,9 +44,9 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
BitmapColor* pRowTmp2 = pColRow2.get();
BitmapColor* pRowTmp3 = pColRow3.get();
BitmapColor* pColor;
- long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
+ tools::Long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
std::array<std::array<long, 256>, 9> aKoeff;
- long* pTmp;
+ tools::Long* pTmp;
// create LUT of products of matrix value and possible color component values
for (nY = 0; nY < 9; nY++)
@@ -199,7 +199,7 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
return BitmapEx();
}
-const long g_SharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 };
+const tools::Long g_SharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 };
BitmapSharpenFilter::BitmapSharpenFilter()
: BitmapConvolutionMatrixFilter(g_SharpenMatrix)
diff --git a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx
index 5ade2451a438..1110b9c5d5a6 100644
--- a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx
+++ b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx
@@ -32,12 +32,12 @@ BitmapEx BitmapDisabledImageFilter::execute(BitmapEx const& rBitmapEx) const
Bitmap::ScopedReadAccess pRead(aReadBitmap);
if (pRead && pGrey)
{
- for (long nY = 0; nY < aSize.Height(); ++nY)
+ for (tools::Long nY = 0; nY < aSize.Height(); ++nY)
{
Scanline pGreyScan = pGrey->GetScanline(nY);
Scanline pReadScan = pRead->GetScanline(nY);
- for (long nX = 0; nX < aSize.Width(); ++nX)
+ for (tools::Long nX = 0; nX < aSize.Width(); ++nX)
{
// Get the luminance from RGB color and remap the value from 0-255 to 160-224
const BitmapColor aColor = pRead->GetPixelFromData(pReadScan, nX);
diff --git a/vcl/source/bitmap/BitmapDuoToneFilter.cxx b/vcl/source/bitmap/BitmapDuoToneFilter.cxx
index 65d4b3f41442..3bcf1035a4c7 100644
--- a/vcl/source/bitmap/BitmapDuoToneFilter.cxx
+++ b/vcl/source/bitmap/BitmapDuoToneFilter.cxx
@@ -27,8 +27,8 @@ BitmapEx BitmapDuoToneFilter::execute(BitmapEx const& rBitmapEx) const
{
Bitmap aBitmap(rBitmapEx.GetBitmap());
- const long nWidth = aBitmap.GetSizePixel().Width();
- const long nHeight = aBitmap.GetSizePixel().Height();
+ const tools::Long nWidth = aBitmap.GetSizePixel().Width();
+ const tools::Long nHeight = aBitmap.GetSizePixel().Height();
Bitmap aResultBitmap(aBitmap.GetSizePixel(), 24);
Bitmap::ScopedReadAccess pReadAcc(aBitmap);
@@ -40,9 +40,9 @@ BitmapEx BitmapDuoToneFilter::execute(BitmapEx const& rBitmapEx) const
static_cast<sal_uInt8>(mnColorTwo >> 8),
static_cast<sal_uInt8>(mnColorTwo));
- for (long x = 0; x < nWidth; x++)
+ for (tools::Long x = 0; x < nWidth; x++)
{
- for (long y = 0; y < nHeight; y++)
+ for (tools::Long y = 0; y < nHeight; y++)
{
BitmapColor aColor = pReadAcc->GetColor(y, x);
sal_uInt8 nLuminance = aColor.GetLuminance();
diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
index 4ea239b1a549..a19683ab6582 100644
--- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
@@ -40,21 +40,21 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
BitmapColor aGrey(sal_uInt8(0));
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- long nGrey11, nGrey12, nGrey13;
- long nGrey21, nGrey22, nGrey23;
- long nGrey31, nGrey32, nGrey33;
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
+ tools::Long nGrey11, nGrey12, nGrey13;
+ tools::Long nGrey21, nGrey22, nGrey23;
+ tools::Long nGrey31, nGrey32, nGrey33;
double fAzim = basegfx::deg2rad(mnAzimuthAngle100 * 0.01);
double fElev = basegfx::deg2rad(mnElevationAngle100 * 0.01);
std::unique_ptr<long[]> pHMap(new long[nWidth + 2]);
std::unique_ptr<long[]> pVMap(new long[nHeight + 2]);
- long nX, nY, nNx, nNy, nDotL;
- const long nLx = FRound(cos(fAzim) * cos(fElev) * 255.0);
- const long nLy = FRound(sin(fAzim) * cos(fElev) * 255.0);
- const long nLz = FRound(sin(fElev) * 255.0);
+ tools::Long nX, nY, nNx, nNy, nDotL;
+ const tools::Long nLx = FRound(cos(fAzim) * cos(fElev) * 255.0);
+ const tools::Long nLy = FRound(sin(fAzim) * cos(fElev) * 255.0);
+ const tools::Long nLz = FRound(sin(fElev) * 255.0);
const auto nZ2 = ((6 * 255) / 4) * ((6 * 255) / 4);
- const long nNzLz = ((6 * 255) / 4) * nLz;
+ const tools::Long nNzLz = ((6 * 255) / 4) * nLz;
const sal_uInt8 cLz = static_cast<sal_uInt8>(std::clamp(nLz, 0L, 255L));
// fill mapping tables
@@ -113,7 +113,7 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const
if (nX < (nWidth - 1))
{
- const long nNextX = pHMap[nX + 3];
+ const tools::Long nNextX = pHMap[nX + 3];
nGrey11 = nGrey12;
nGrey12 = nGrey13;
diff --git a/vcl/source/bitmap/BitmapFastScaleFilter.cxx b/vcl/source/bitmap/BitmapFastScaleFilter.cxx
index a48f9e193beb..5b9ff591c953 100644
--- a/vcl/source/bitmap/BitmapFastScaleFilter.cxx
+++ b/vcl/source/bitmap/BitmapFastScaleFilter.cxx
@@ -33,8 +33,8 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const
Bitmap aBitmap(rBitmapEx.GetBitmap());
const Size aSizePix(aBitmap.GetSizePixel());
- const long nNewWidth = FRound(aSizePix.Width() * mfScaleX);
- const long nNewHeight = FRound(aSizePix.Height() * mfScaleY);
+ const tools::Long nNewWidth = FRound(aSizePix.Width() * mfScaleX);
+ const tools::Long nNewHeight = FRound(aSizePix.Height() * mfScaleY);
bool bRet = false;
SAL_INFO("vcl.gdi", "New width: " << nNewWidth << "\nNew height: " << nNewHeight);
@@ -51,8 +51,8 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
- const long nScanlineSize = pWriteAcc->GetScanlineSize();
- const long nNewHeight1 = nNewHeight - 1;
+ const tools::Long nScanlineSize = pWriteAcc->GetScanlineSize();
+ const tools::Long nNewHeight1 = nNewHeight - 1;
if (nNewWidth && nNewHeight)
{
@@ -61,24 +61,24 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const
std::unique_ptr<long[]> pLutX(new long[nNewWidth]);
std::unique_ptr<long[]> pLutY(new long[nNewHeight]);
- for (long nX = 0; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0; nX < nNewWidth; nX++)
{
- pLutX[nX] = long(nX * nWidth / nNewWidth);
+ pLutX[nX] = tools::Long(nX * nWidth / nNewWidth);
}
- for (long nY = 0; nY < nNewHeight; nY++)
+ for (tools::Long nY = 0; nY < nNewHeight; nY++)
{
- pLutY[nY] = long(nY * nHeight / nNewHeight);
+ pLutY[nY] = tools::Long(nY * nHeight / nNewHeight);
}
- long nActY = 0;
+ tools::Long nActY = 0;
while (nActY < nNewHeight)
{
- long nMapY = pLutY[nActY];
+ tools::Long nMapY = pLutY[nActY];
Scanline pScanline = pWriteAcc->GetScanline(nActY);
Scanline pScanlineRead = pReadAcc->GetScanline(nMapY);
- for (long nX = 0; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0; nX < nNewWidth; nX++)
{
pWriteAcc->SetPixelOnData(
pScanline, nX,
diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx
index 6883808ebe4a..66645077eb0f 100644
--- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx
+++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx
@@ -52,13 +52,13 @@ struct BlurSharedData
{
BitmapReadAccess* mpReadAccess;
BitmapWriteAccess* mpWriteAccess;
- long mnRadius;
- long mnComponentWidth;
- long mnDiv;
- long mnColorChannels;
+ tools::Long mnRadius;
+ tools::Long mnComponentWidth;
+ tools::Long mnDiv;
+ tools::Long mnColorChannels;
- BlurSharedData(BitmapReadAccess* pReadAccess, BitmapWriteAccess* pWriteAccess, long aRadius,
- long nComponentWidth, long nColorChannels)
+ BlurSharedData(BitmapReadAccess* pReadAccess, BitmapWriteAccess* pWriteAccess,
+ tools::Long aRadius, tools::Long nComponentWidth, tools::Long nColorChannels)
: mpReadAccess(pReadAccess)
, mpWriteAccess(pWriteAccess)
, mnRadius(aRadius)
@@ -92,35 +92,39 @@ struct BlurArrays
{
}
- void initializeWeightAndPositions(long nLastIndex)
+ void initializeWeightAndPositions(tools::Long nLastIndex)
{
- for (long i = 0; i < maShared.mnDiv; i++)
+ for (tools::Long i = 0; i < maShared.mnDiv; i++)
{
maPositionTable[i] = std::clamp(i - maShared.mnRadius, 0L, nLastIndex);
maWeightTable[i] = maShared.mnRadius + 1 - std::abs(i - maShared.mnRadius);
}
}
- long getMultiplyValue() const
+ tools::Long getMultiplyValue() const
{
- return static_cast<long>(constMultiplyTable[maShared.mnRadius]);
+ return static_cast<tools::Long>(constMultiplyTable[maShared.mnRadius]);
}
- long getShiftValue() const { return static_cast<long>(constShiftTable[maShared.mnRadius]); }
+ tools::Long getShiftValue() const
+ {
+ return static_cast<tools::Long>(constShiftTable[maShared.mnRadius]);
+ }
};
-typedef void (*BlurRangeFn)(BlurSharedData const& rShared, long nStartY, long nEndY);
+typedef void (*BlurRangeFn)(BlurSharedData const& rShared, tools::Long nStartY, tools::Long nEndY);
class BlurTask : public comphelper::ThreadTask
{
BlurRangeFn mpBlurFunction;
BlurSharedData& mrShared;
- long mnStartY;
- long mnEndY;
+ tools::Long mnStartY;
+ tools::Long mnEndY;
public:
explicit BlurTask(const std::shared_ptr<comphelper::ThreadTaskTag>& pTag,
- BlurRangeFn pBlurFunction, BlurSharedData& rShared, long nStartY, long nEndY)
+ BlurRangeFn pBlurFunction, BlurSharedData& rShared, tools::Long nStartY,
+ tools::Long nEndY)
: comphelper::ThreadTask(pTag)
, mpBlurFunction(pBlurFunction)
, mrShared(rShared)
@@ -134,42 +138,42 @@ public:
struct SumFunction24
{
- static inline void add(long*& pValue1, long nConstant)
+ static inline void add(tools::Long*& pValue1, tools::Long nConstant)
{
pValue1[0] += nConstant;
pValue1[1] += nConstant;
pValue1[2] += nConstant;
}
- static inline void set(long*& pValue1, long nConstant)
+ static inline void set(tools::Long*& pValue1, tools::Long nConstant)
{
pValue1[0] = nConstant;
pValue1[1] = nConstant;
pValue1[2] = nConstant;
}
- static inline void add(long*& pValue1, const sal_uInt8* pValue2)
+ static inline void add(tools::Long*& pValue1, const sal_uInt8* pValue2)
{
pValue1[0] += pValue2[0];
pValue1[1] += pValue2[1];
pValue1[2] += pValue2[2];
}
- static inline void add(long*& pValue1, const long* pValue2)
+ static inline void add(tools::Long*& pValue1, const tools::Long* pValue2)
{
pValue1[0] += pValue2[0];
pValue1[1] += pValue2[1];
pValue1[2] += pValue2[2];
}
- static inline void sub(long*& pValue1, const sal_uInt8* pValue2)
+ static inline void sub(tools::Long*& pValue1, const sal_uInt8* pValue2)
{
pValue1[0] -= pValue2[0];
pValue1[1] -= pValue2[1];
pValue1[2] -= pValue2[2];
}
- static inline void sub(long*& pValue1, const long* pValue2)
+ static inline void sub(tools::Long*& pValue1, const tools::Long* pValue2)
{
pValue1[0] -= pValue2[0];
pValue1[1] -= pValue2[1];
@@ -183,8 +187,8 @@ struct SumFunction24
pValue1[2] = pValue2[2];
}
- static inline void assignMulAndShr(sal_uInt8*& result, const long* sum, long multiply,
- long shift)
+ static inline void assignMulAndShr(sal_uInt8*& result, const tools::Long* sum,
+ tools::Long multiply, tools::Long shift)
{
result[0] = (multiply * sum[0]) >> shift;
result[1] = (multiply * sum[1]) >> shift;
@@ -194,32 +198,47 @@ struct SumFunction24
struct SumFunction8
{
- static inline void add(long*& pValue1, long nConstant) { pValue1[0] += nConstant; }
+ static inline void add(tools::Long*& pValue1, tools::Long nConstant)
+ {
+ pValue1[0] += nConstant;
+ }
- static inline void set(long*& pValue1, long nConstant) { pValue1[0] = nConstant; }
+ static inline void set(tools::Long*& pValue1, tools::Long nConstant) { pValue1[0] = nConstant; }
- static inline void add(long*& pValue1, const sal_uInt8* pValue2) { pValue1[0] += pValue2[0]; }
+ static inline void add(tools::Long*& pValue1, const sal_uInt8* pValue2)
+ {
+ pValue1[0] += pValue2[0];
+ }
- static inline void add(long*& pValue1, const long* pValue2) { pValue1[0] += pValue2[0]; }
+ static inline void add(tools::Long*& pValue1, const tools::Long* pValue2)
+ {
+ pValue1[0] += pValue2[0];
+ }
- static inline void sub(long*& pValue1, const sal_uInt8* pValue2) { pValue1[0] -= pValue2[0]; }
+ static inline void sub(tools::Long*& pValue1, const sal_uInt8* pValue2)
+ {
+ pValue1[0] -= pValue2[0];
+ }
- static inline void sub(long*& pValue1, const long* pValue2) { pValue1[0] -= pValue2[0]; }
+ static inline void sub(tools::Long*& pValue1, const tools::Long* pValue2)
+ {
+ pValue1[0] -= pValue2[0];
+ }
static inline void assignPtr(sal_uInt8*& pValue1, const sal_uInt8* pValue2)
{
pValue1[0] = pValue2[0];
}
- static inline void assignMulAndShr(sal_uInt8*& result, const long* sum, long multiply,
- long shift)
+ static inline void assignMulAndShr(sal_uInt8*& result, const tools::Long* sum,
+ tools::Long multiply, tools::Long shift)
{
result[0] = (multiply * sum[0]) >> shift;
}
};
template <typename SumFunction>
-void stackBlurHorizontal(BlurSharedData const& rShared, long nStart, long nEnd)
+void stackBlurHorizontal(BlurSharedData const& rShared, tools::Long nStart, tools::Long nEnd)
{
BitmapReadAccess* pReadAccess = rShared.mpReadAccess;
BitmapWriteAccess* pWriteAccess = rShared.mpWriteAccess;
@@ -229,34 +248,34 @@ void stackBlurHorizontal(BlurSharedData const& rShared, long nStart, long nEnd)
sal_uInt8* pStack = aArrays.maStackBuffer.data();
sal_uInt8* pStackPtr;
- long nWidth = pReadAccess->Width();
- long nLastIndexX = nWidth - 1;
+ tools::Long nWidth = pReadAccess->Width();
+ tools::Long nLastIndexX = nWidth - 1;
- long nMultiplyValue = aArrays.getMultiplyValue();
- long nShiftValue = aArrays.getShiftValue();
+ tools::Long nMultiplyValue = aArrays.getMultiplyValue();
+ tools::Long nShiftValue = aArrays.getShiftValue();
- long nRadius = rShared.mnRadius;
- long nComponentWidth = rShared.mnComponentWidth;
- long nDiv = rShared.mnDiv;
+ tools::Long nRadius = rShared.mnRadius;
+ tools::Long nComponentWidth = rShared.mnComponentWidth;
+ tools::Long nDiv = rShared.mnDiv;
Scanline pSourcePointer;
Scanline pDestinationPointer;
- long nXPosition;
- long nStackIndex;
- long nStackIndexStart;
- long nWeight;
+ tools::Long nXPosition;
+ tools::Long nStackIndex;
+ tools::Long nStackIndexStart;
+ tools::Long nWeight;
aArrays.initializeWeightAndPositions(nLastIndexX);
- long* nSum = aArrays.mnSumVector.data();
- long* nInSum = aArrays.mnInSumVector.data();
- long* nOutSum = aArrays.mnOutSumVector.data();
+ tools::Long* nSum = aArrays.mnSumVector.data();
+ tools::Long* nInSum = aArrays.mnInSumVector.data();
+ tools::Long* nOutSum = aArrays.mnOutSumVector.data();
- long* pPositionPointer = aArrays.maPositionTable.data();
- long* pWeightPointer = aArrays.maWeightTable.data();
+ tools::Long* pPositionPointer = aArrays.maPositionTable.data();
+ tools::Long* pWeightPointer = aArrays.maWeightTable.data();
- for (long y = nStart; y <= nEnd; y++)
+ for (tools::Long y = nStart; y <= nEnd; y++)
{
SumFunction::set(nSum, 0L);
SumFunction::set(nInSum, 0L);
@@ -268,7 +287,7 @@ void stackBlurHorizontal(BlurSharedData const& rShared, long nStart, long nEnd)
// for the first pixel; aArrays.maWeightTable has [1,2,3,4,5,6,5,4,3,2,1]. Before looking at
// the first row pixel, we pretend to have processed fake previous pixels, as if the row was
// extended to the left with the same color as that of the first pixel.
- for (long i = 0; i < nDiv; i++)
+ for (tools::Long i = 0; i < nDiv; i++)
{
pSourcePointer = pReadAccess->GetScanline(y) + nComponentWidth * pPositionPointer[i];
@@ -295,7 +314,7 @@ void stackBlurHorizontal(BlurSharedData const& rShared, long nStart, long nEnd)
pSourcePointer = pReadAccess->GetScanline(y) + nComponentWidth * nXPosition;
- for (long x = 0; x < nWidth; x++)
+ for (tools::Long x = 0; x < nWidth; x++)
{
pDestinationPointer = pWriteAccess->GetScanline(y) + nComponentWidth * x;
@@ -339,7 +358,7 @@ void stackBlurHorizontal(BlurSharedData const& rShared, long nStart, long nEnd)
}
template <typename SumFunction>
-void stackBlurVertical(BlurSharedData const& rShared, long nStart, long nEnd)
+void stackBlurVertical(BlurSharedData const& rShared, tools::Long nStart, tools::Long nEnd)
{
BitmapReadAccess* pReadAccess = rShared.mpReadAccess;
BitmapWriteAccess* pWriteAccess = rShared.mpWriteAccess;
@@ -349,33 +368,33 @@ void stackBlurVertical(BlurSharedData const& rShared, long nStart, long nEnd)
sal_uInt8* pStack = aArrays.maStackBuffer.data();
sal_uInt8* pStackPtr;
- long nHeight = pReadAccess->Height();
- long nLastIndexY = nHeight - 1;
+ tools::Long nHeight = pReadAccess->Height();
+ tools::Long nLastIndexY = nHeight - 1;
- long nMultiplyValue = aArrays.getMultiplyValue();
- long nShiftValue = aArrays.getShiftValue();
+ tools::Long nMultiplyValue = aArrays.getMultiplyValue();
+ tools::Long nShiftValue = aArrays.getShiftValue();
- long nRadius = rShared.mnRadius;
- long nComponentWidth = rShared.mnComponentWidth;
- long nDiv = rShared.mnDiv;
+ tools::Long nRadius = rShared.mnRadius;
+ tools::Long nComponentWidth = rShared.mnComponentWidth;
+ tools::Long nDiv = rShared.mnDiv;
Scanline pSourcePointer;
Scanline pDestinationPointer;
- long nYPosition;
- long nStackIndex;
- long nStackIndexStart;
- long nWeight;
+ tools::Long nYPosition;
+ tools::Long nStackIndex;
+ tools::Long nStackIndexStart;
+ tools::Long nWeight;
aArrays.initializeWeightAndPositions(nLastIndexY);
- long* nSum = aArrays.mnSumVector.data();
- long* nInSum = aArrays.mnInSumVector.data();
- long* nOutSum = aArrays.mnOutSumVector.data();
- long* pPositionPointer = aArrays.maPositionTable.data();
- long* pWeightPointer = aArrays.maWeightTable.data();
+ tools::Long* nSum = aArrays.mnSumVector.data();
+ tools::Long* nInSum = aArrays.mnInSumVector.data();
+ tools::Long* nOutSum = aArrays.mnOutSumVector.data();
+ tools::Long* pPositionPointer = aArrays.maPositionTable.data();
+ tools::Long* pWeightPointer = aArrays.maWeightTable.data();
- for (long x = nStart; x <= nEnd; x++)
+ for (tools::Long x = nStart; x <= nEnd; x++)
{
SumFunction::set(nSum, 0L);
SumFunction::set(nInSum, 0L);
@@ -387,7 +406,7 @@ void stackBlurVertical(BlurSharedData const& rShared, long nStart, long nEnd)
// for the first pixel; aArrays.maWeightTable has [1,2,3,4,5,6,5,4,3,2,1]. Before looking at
// the first column pixels, we pretend to have processed fake previous pixels, as if the
// column was extended to the top with the same color as that of the first pixel.
- for (long i = 0; i < nDiv; i++)
+ for (tools::Long i = 0; i < nDiv; i++)
{
pSourcePointer = pReadAccess->GetScanline(pPositionPointer[i]) + nComponentWidth * x;
@@ -414,7 +433,7 @@ void stackBlurVertical(BlurSharedData const& rShared, long nStart, long nEnd)
pSourcePointer = pReadAccess->GetScanline(nYPosition) + nComponentWidth * x;
- for (long y = 0; y < nHeight; y++)
+ for (tools::Long y = 0; y < nHeight; y++)
{
pDestinationPointer = pWriteAccess->GetScanline(y) + nComponentWidth * x;
@@ -455,10 +474,10 @@ void stackBlurVertical(BlurSharedData const& rShared, long nStart, long nEnd)
}
}
-constexpr long nThreadStrip = 16;
+constexpr tools::Long nThreadStrip = 16;
-void runStackBlur(Bitmap& rBitmap, const long nRadius, const long nComponentWidth,
- const long nColorChannels, BlurRangeFn pBlurHorizontalFn,
+void runStackBlur(Bitmap& rBitmap, const tools::Long nRadius, const tools::Long nComponentWidth,
+ const tools::Long nColorChannels, BlurRangeFn pBlurHorizontalFn,
BlurRangeFn pBlurVerticalFn, const bool bParallel)
{
if (bParallel)
@@ -474,12 +493,12 @@ void runStackBlur(Bitmap& rBitmap, const long nRadius, const long nComponentWidt
BlurSharedData aSharedData(pReadAccess.get(), pWriteAccess.get(), nRadius,
nComponentWidth, nColorChannels);
- const long nFirstIndex = 0;
- const long nLastIndex = pReadAccess->Height() - 1;
+ const tools::Long nFirstIndex = 0;
+ const tools::Long nLastIndex = pReadAccess->Height() - 1;
vcl::bitmap::generateStripRanges<nThreadStrip>(
nFirstIndex, nLastIndex,
- [&](long const nStart, long const nEnd, bool const bLast) {
+ [&](tools::Long const nStart, tools::Long const nEnd, bool const bLast) {
if (!bLast)
{
auto pTask(std::make_unique<BlurTask>(pTag, pBlurHorizontalFn,
@@ -497,12 +516,12 @@ void runStackBlur(Bitmap& rBitmap, const long nRadius, const long nComponentWidt
BlurSharedData aSharedData(pReadAccess.get(), pWriteAccess.get(), nRadius,
nComponentWidth, nColorChannels);
- const long nFirstIndex = 0;
- const long nLastIndex = pReadAccess->Width() - 1;
+ const tools::Long nFirstIndex = 0;
+ const tools::Long nLastIndex = pReadAccess->Width() - 1;
vcl::bitmap::generateStripRanges<nThreadStrip>(
nFirstIndex, nLastIndex,
- [&](long const nStart, long const nEnd, bool const bLast) {
+ [&](tools::Long const nStart, tools::Long const nEnd, bool const bLast) {
if (!bLast)
{
auto pTask(std::make_unique<BlurTask>(pTag, pBlurVerticalFn,
@@ -528,8 +547,8 @@ void runStackBlur(Bitmap& rBitmap, const long nRadius, const long nComponentWidt
BitmapScopedWriteAccess pWriteAccess(rBitmap);
BlurSharedData aSharedData(pReadAccess.get(), pWriteAccess.get(), nRadius,
nComponentWidth, nColorChannels);
- long nFirstIndex = 0;
- long nLastIndex = pReadAccess->Height() - 1;
+ tools::Long nFirstIndex = 0;
+ tools::Long nLastIndex = pReadAccess->Height() - 1;
pBlurHorizontalFn(aSharedData, nFirstIndex, nLastIndex);
}
{
@@ -537,8 +556,8 @@ void runStackBlur(Bitmap& rBitmap, const long nRadius, const long nComponentWidt
BitmapScopedWriteAccess pWriteAccess(rBitmap);
BlurSharedData aSharedData(pReadAccess.get(), pWriteAccess.get(), nRadius,
nComponentWidth, nColorChannels);
- long nFirstIndex = 0;
- long nLastIndex = pReadAccess->Width() - 1;
+ tools::Long nFirstIndex = 0;
+ tools::Long nLastIndex = pReadAccess->Width() - 1;
pBlurVerticalFn(aSharedData, nFirstIndex, nLastIndex);
}
}
@@ -549,7 +568,7 @@ void stackBlur24(Bitmap& rBitmap, sal_Int32 nRadius, sal_Int32 nComponentWidth)
const bool bParallel = true;
// Limit radius
nRadius = std::clamp<sal_Int32>(nRadius, 2, 254);
- const long nColorChannels = 3; // 3 color channel
+ const tools::Long nColorChannels = 3; // 3 color channel
BlurRangeFn pBlurHorizontalFn = stackBlurHorizontal<SumFunction24>;
BlurRangeFn pBlurVerticalFn = stackBlurVertical<SumFunction24>;
@@ -563,7 +582,7 @@ void stackBlur8(Bitmap& rBitmap, sal_Int32 nRadius, sal_Int32 nComponentWidth)
const bool bParallel = true;
// Limit radius
nRadius = std::clamp<sal_Int32>(nRadius, 2, 254);
- const long nColorChannels = 1; // 1 color channel
+ const tools::Long nColorChannels = 1; // 1 color channel
BlurRangeFn pBlurHorizontalFn = stackBlurHorizontal<SumFunction8>;
BlurRangeFn pBlurVerticalFn = stackBlurVertical<SumFunction8>;
diff --git a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
index c264dcd1382a..b1837f4a5867 100644
--- a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
+++ b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
@@ -20,8 +20,8 @@ BitmapEx BitmapGaussianSeparableBlurFilter::execute(BitmapEx const& rBitmapEx) c
{
Bitmap aBitmap(rBitmapEx.GetBitmap());
- const long nWidth = aBitmap.GetSizePixel().Width();
- const long nHeight = aBitmap.GetSizePixel().Height();
+ const tools::Long nWidth = aBitmap.GetSizePixel().Width();
+ const tools::Long nHeight = aBitmap.GetSizePixel().Height();
// Prepare Blur Vector
int aNumberOfContributions;
diff --git a/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx b/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx
index 73f521480f09..1542b34a40c7 100644
--- a/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx
+++ b/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx
@@ -32,8 +32,8 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
Bitmap aBitmap(rBitmapEx.GetBitmap());
const Size aSizePix(aBitmap.GetSizePixel());
- const long nNewWidth = FRound(aSizePix.Width() * mfScaleX);
- const long nNewHeight = FRound(aSizePix.Height() * mfScaleY);
+ const tools::Long nNewWidth = FRound(aSizePix.Width() * mfScaleX);
+ const tools::Long nNewHeight = FRound(aSizePix.Height() * mfScaleY);
bool bRet = false;
if ((nNewWidth > 1) && (nNewHeight > 1))
@@ -41,29 +41,29 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
Bitmap::ScopedReadAccess pReadAcc(aBitmap);
if (pReadAcc)
{
- long nWidth = pReadAcc->Width();
- long nHeight = pReadAcc->Height();
+ tools::Long nWidth = pReadAcc->Width();
+ tools::Long nHeight = pReadAcc->Height();
Bitmap aNewBmp(Size(nNewWidth, nHeight), 24);
BitmapScopedWriteAccess pWriteAcc(aNewBmp);
if (pWriteAcc)
{
- const long nNewWidth1 = nNewWidth - 1;
- const long nWidth1 = pReadAcc->Width() - 1;
+ const tools::Long nNewWidth1 = nNewWidth - 1;
+ const tools::Long nWidth1 = pReadAcc->Width() - 1;
const double fRevScaleX = static_cast<double>(nWidth1) / nNewWidth1;
std::unique_ptr<long[]> pLutInt(new long[nNewWidth]);
std::unique_ptr<long[]> pLutFrac(new long[nNewWidth]);
- for (long nX = 0, nTemp = nWidth - 2; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0, nTemp = nWidth - 2; nX < nNewWidth; nX++)
{
double fTemp = nX * fRevScaleX;
- pLutInt[nX] = MinMax(static_cast<long>(fTemp), 0, nTemp);
+ pLutInt[nX] = MinMax(static_cast<tools::Long>(fTemp), 0, nTemp);
fTemp -= pLutInt[nX];
- pLutFrac[nX] = static_cast<long>(fTemp * 1024.);
+ pLutFrac[nX] = static_cast<tools::Long>(fTemp * 1024.);
}
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
if (1 == nWidth)
@@ -80,7 +80,7 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
}
Scanline pScanline = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0; nX < nNewWidth; nX++)
{
pWriteAcc->SetPixelOnData(pScanline, nX, aCol0);
}
@@ -88,9 +88,9 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
else
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0; nX < nNewWidth; nX++)
{
- long nTemp = pLutInt[nX];
+ tools::Long nTemp = pLutInt[nX];
BitmapColor aCol0, aCol1;
if (pReadAcc->HasPalette())
@@ -108,12 +108,12 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
nTemp = pLutFrac[nX];
- long lXR0 = aCol0.GetRed();
- long lXG0 = aCol0.GetGreen();
- long lXB0 = aCol0.GetBlue();
- long lXR1 = aCol1.GetRed() - lXR0;
- long lXG1 = aCol1.GetGreen() - lXG0;
- long lXB1 = aCol1.GetBlue() - lXB0;
+ tools::Long lXR0 = aCol0.GetRed();
+ tools::Long lXG0 = aCol0.GetGreen();
+ tools::Long lXB0 = aCol0.GetBlue();
+ tools::Long lXR1 = aCol1.GetRed() - lXR0;
+ tools::Long lXG1 = aCol1.GetGreen() - lXG0;
+ tools::Long lXB1 = aCol1.GetBlue() - lXB0;
aCol0.SetRed(
static_cast<sal_uInt8>((lXR1 * nTemp + (lXR0 << 10)) >> 10));
@@ -144,19 +144,19 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
if (pReadAcc && pWriteAcc)
{
- const long nNewHeight1 = nNewHeight - 1;
- const long nHeight1 = pReadAcc->Height() - 1;
+ const tools::Long nNewHeight1 = nNewHeight - 1;
+ const tools::Long nHeight1 = pReadAcc->Height() - 1;
const double fRevScaleY = static_cast<double>(nHeight1) / nNewHeight1;
std::unique_ptr<long[]> pLutInt(new long[nNewHeight]);
std::unique_ptr<long[]> pLutFrac(new long[nNewHeight]);
- for (long nY = 0, nTemp = nHeight - 2; nY < nNewHeight; nY++)
+ for (tools::Long nY = 0, nTemp = nHeight - 2; nY < nNewHeight; nY++)
{
double fTemp = nY * fRevScaleY;
- pLutInt[nY] = MinMax(static_cast<long>(fTemp), 0, nTemp);
+ pLutInt[nY] = MinMax(static_cast<tools::Long>(fTemp), 0, nTemp);
fTemp -= pLutInt[nY];
- pLutFrac[nY] = static_cast<long>(fTemp * 1024.);
+ pLutFrac[nY] = static_cast<tools::Long>(fTemp * 1024.);
}
// after 1st step, bitmap *is* 24bit format (see above)
@@ -164,34 +164,34 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const
"in-between format has palette, should not "
"happen (!)");
- for (long nX = 0; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0; nX < nNewWidth; nX++)
{
if (1 == nHeight)
{
BitmapColor aCol0 = pReadAcc->GetPixel(0, nX);
- for (long nY = 0; nY < nNewHeight; nY++)
+ for (tools::Long nY = 0; nY < nNewHeight; nY++)
{
pWriteAcc->SetPixel(nY, nX, aCol0);
}
}
else
{
- for (long nY = 0; nY < nNewHeight; nY++)
+ for (tools::Long nY = 0; nY < nNewHeight; nY++)
{
- long nTemp = pLutInt[nY];
+ tools::Long nTemp = pLutInt[nY];
BitmapColor aCol0 = pReadAcc->GetPixel(nTemp++, nX);
BitmapColor aCol1 = pReadAcc->GetPixel(nTemp, nX);
nTemp = pLutFrac[nY];
- long lXR0 = aCol0.GetRed();
- long lXG0 = aCol0.GetGreen();
- long lXB0 = aCol0.GetBlue();
- long lXR1 = aCol1.GetRed() - lXR0;
- long lXG1 = aCol1.GetGreen() - lXG0;
- long lXB1 = aCol1.GetBlue() - lXB0;
+ tools::Long lXR0 = aCol0.GetRed();
+ tools::Long lXG0 = aCol0.GetGreen();
+ tools::Long lXB0 = aCol0.GetBlue();
+ tools::Long lXR1 = aCol1.GetRed() - lXR0;
+ tools::Long lXG1 = aCol1.GetGreen() - lXG0;
+ tools::Long lXB1 = aCol1.GetBlue() - lXB0;
aCol0.SetRed(
static_cast<sal_uInt8>((lXR1 * nTemp + (lXR0 << 10)) >> 10));
diff --git a/vcl/source/bitmap/BitmapLightenFilter.cxx b/vcl/source/bitmap/BitmapLightenFilter.cxx
index 45013b143783..b85ac4387406 100644
--- a/vcl/source/bitmap/BitmapLightenFilter.cxx
+++ b/vcl/source/bitmap/BitmapLightenFilter.cxx
@@ -27,11 +27,11 @@ BitmapEx BitmapLightenFilter::execute(BitmapEx const& rBitmapEx) const
if (pRead && pWrite)
{
- for (long nY = 0; nY < aSize.Height(); ++nY)
+ for (tools::Long nY = 0; nY < aSize.Height(); ++nY)
{
Scanline pScanline = pWrite->GetScanline(nY);
Scanline pScanlineRead = pRead->GetScanline(nY);
- for (long nX = 0; nX < aSize.Width(); ++nX)
+ for (tools::Long nX = 0; nX < aSize.Width(); ++nX)
{
BitmapColor aBmpColor
= pRead->HasPalette()
diff --git a/vcl/source/bitmap/BitmapMedianFilter.cxx b/vcl/source/bitmap/BitmapMedianFilter.cxx
index 60edc557a9de..4f1c857c0878 100644
--- a/vcl/source/bitmap/BitmapMedianFilter.cxx
+++ b/vcl/source/bitmap/BitmapMedianFilter.cxx
@@ -17,7 +17,7 @@
#define S2(a, b) \
{ \
- long t; \
+ tools::Long t; \
if ((t = b - a) < 0) \
{ \
a += t; \
@@ -64,8 +64,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
- const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
- const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
+ const tools::Long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
+ const tools::Long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
std::unique_ptr<long[]> pColm(new long[nWidth2]);
std::unique_ptr<long[]> pRows(new long[nHeight2]);
std::unique_ptr<BitmapColor[]> pColRow1(new BitmapColor[nWidth2]);
@@ -75,10 +75,10 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
BitmapColor* pRowTmp2 = pColRow2.get();
BitmapColor* pRowTmp3 = pColRow3.get();
BitmapColor* pColor;
- long nY, nX, i;
- long nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
- long nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
- long nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
+ tools::Long nY, nX, i;
+ tools::Long nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
+ tools::Long nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
+ tools::Long nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
// create column LUT
for (i = 0; i < nWidth2; i++)
diff --git a/vcl/source/bitmap/BitmapMonochromeFilter.cxx b/vcl/source/bitmap/BitmapMonochromeFilter.cxx
index 72bacf84955a..224a66ab9558 100644
--- a/vcl/source/bitmap/BitmapMonochromeFilter.cxx
+++ b/vcl/source/bitmap/BitmapMonochromeFilter.cxx
@@ -30,16 +30,16 @@ BitmapEx BitmapMonochromeFilter::execute(BitmapEx const& aBitmapEx) const
{
const BitmapColor aBlack(pWriteAcc->GetBestMatchingColor(COL_BLACK));
const BitmapColor aWhite(pWriteAcc->GetBestMatchingColor(COL_WHITE));
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
if (pReadAcc->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
const sal_uInt8 cIndex = pReadAcc->GetIndexFromData(pScanlineRead, nX);
if (pReadAcc->GetPaletteColor(cIndex).GetLuminance() >= mcThreshold)
@@ -55,11 +55,11 @@ BitmapEx BitmapMonochromeFilter::execute(BitmapEx const& aBitmapEx) const
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
if (pReadAcc->GetPixelFromData(pScanlineRead, nX).GetLuminance()
>= mcThreshold)
diff --git a/vcl/source/bitmap/BitmapMosaicFilter.cxx b/vcl/source/bitmap/BitmapMosaicFilter.cxx
index ee0d102750dc..5afbb90d6bcb 100644
--- a/vcl/source/bitmap/BitmapMosaicFilter.cxx
+++ b/vcl/source/bitmap/BitmapMosaicFilter.cxx
@@ -39,8 +39,8 @@ BitmapEx BitmapMosaicFilter::execute(BitmapEx const& rBitmapEx) const
}
bool bConditionsMet = false;
- long nWidth(0);
- long nHeight(0);
+ tools::Long nWidth(0);
+ tools::Long nHeight(0);
if (pReadAcc && pWriteAcc)
{
nWidth = pReadAcc->Width();
@@ -51,7 +51,7 @@ BitmapEx BitmapMosaicFilter::execute(BitmapEx const& rBitmapEx) const
if (bConditionsMet)
{
BitmapColor aCol;
- long nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
+ tools::Long nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
double fArea_1;
nY1 = 0;
diff --git a/vcl/source/bitmap/BitmapPopArtFilter.cxx b/vcl/source/bitmap/BitmapPopArtFilter.cxx
index a335f04fb824..bf33a98381f4 100644
--- a/vcl/source/bitmap/BitmapPopArtFilter.cxx
+++ b/vcl/source/bitmap/BitmapPopArtFilter.cxx
@@ -28,8 +28,8 @@ BitmapEx BitmapPopArtFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
const int nEntryCount = 1 << pWriteAcc->GetBitCount();
int n = 0;
std::vector<PopArtEntry> aPopArtTable(nEntryCount);
@@ -42,10 +42,10 @@ BitmapEx BitmapPopArtFilter::execute(BitmapEx const& rBitmapEx) const
}
// get pixel count for each palette entry
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aPopArtTable[pWriteAcc->GetIndexFromData(pScanline, nX)].mnCount++;
}
diff --git a/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx b/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx
index b679e172d554..bf210fa21236 100644
--- a/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx
@@ -35,9 +35,9 @@ namespace
{
void ImplCalculateContributions(
- const long aSourceSize,
- const long aDestinationSize,
- long& aNumberOfContributions,
+ const tools::Long aSourceSize,
+ const tools::Long aDestinationSize,
+ tools::Long& aNumberOfContributions,
std::vector<sal_Int16>& rWeights,
std::vector<sal_Int32>& rPixels,
std::vector<sal_Int32>& rCounts,
@@ -48,19 +48,19 @@ void ImplCalculateContributions(
const double fScaledRadius((fScale < 1.0) ? fSamplingRadius / fScale : fSamplingRadius);
const double fFilterFactor(std::min(fScale, 1.0));
- aNumberOfContributions = (long(fabs(ceil(fScaledRadius))) * 2) + 1;
- const long nAllocSize(aDestinationSize * aNumberOfContributions);
+ aNumberOfContributions = (tools::Long(fabs(ceil(fScaledRadius))) * 2) + 1;
+ const tools::Long nAllocSize(aDestinationSize * aNumberOfContributions);
rWeights.resize(nAllocSize);
rPixels.resize(nAllocSize);
rCounts.resize(aDestinationSize);
- for(long i(0); i < aDestinationSize; i++)
+ for(tools::Long i(0); i < aDestinationSize; i++)
{
- const long aIndex(i * aNumberOfContributions);
+ const tools::Long aIndex(i * aNumberOfContributions);
const double aCenter(i / fScale);
const sal_Int32 aLeft(static_cast< sal_Int32 >(floor(aCenter - fScaledRadius)));
const sal_Int32 aRight(static_cast< sal_Int32 >(ceil(aCenter + fScaledRadius)));
- long aCurrentCount(0);
+ tools::Long aCurrentCount(0);
for(sal_Int32 j(aLeft); j <= aRight; j++)
{
@@ -73,8 +73,8 @@ void ImplCalculateContributions(
}
// Handling on edges
- const long aPixelIndex(MinMax(j, 0, aSourceSize - 1));
- const long nIndex(aIndex + aCurrentCount);
+ const tools::Long aPixelIndex(MinMax(j, 0, aSourceSize - 1));
+ const tools::Long nIndex(aIndex + aCurrentCount);
// scale the weight by 255 since we're converting from float to int
rWeights[nIndex] = aWeight * 255;
@@ -91,8 +91,8 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc
{
// Do horizontal filtering
OSL_ENSURE(rScaleX > 0.0, "Error in scaling: Mirror given in non-mirror-capable method (!)");
- const long nWidth(rSource.GetSizePixel().Width());
- const long nNewWidth(FRound(nWidth * rScaleX));
+ const tools::Long nWidth(rSource.GetSizePixel().Width());
+ const tools::Long nNewWidth(FRound(nWidth * rScaleX));
if(nWidth == nNewWidth)
{
@@ -106,9 +106,9 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc
std::vector<sal_Int16> aWeights;
std::vector<sal_Int32> aPixels;
std::vector<sal_Int32> aCounts;
- long aNumberOfContributions(0);
+ tools::Long aNumberOfContributions(0);
- const long nHeight(rSource.GetSizePixel().Height());
+ const tools::Long nHeight(rSource.GetSizePixel().Height());
ImplCalculateContributions(nWidth, nNewWidth, aNumberOfContributions, aWeights, aPixels, aCounts, aKernel);
rTarget = Bitmap(Size(nNewWidth, nHeight), 24);
BitmapScopedWriteAccess pWriteAcc(rTarget);
@@ -116,21 +116,21 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc
if(bResult)
{
- for(long y(0); y < nHeight; y++)
+ for(tools::Long y(0); y < nHeight; y++)
{
Scanline pScanline = pWriteAcc->GetScanline( y );
Scanline pScanlineRead = pReadAcc->GetScanline( y );
- for(long x(0); x < nNewWidth; x++)
+ for(tools::Long x(0); x < nNewWidth; x++)
{
- const long aBaseIndex(x * aNumberOfContributions);
+ const tools::Long aBaseIndex(x * aNumberOfContributions);
sal_Int32 aSum(0);
sal_Int32 aValueRed(0);
sal_Int32 aValueGreen(0);
sal_Int32 aValueBlue(0);
- for(long j(0); j < aCounts[x]; j++)
+ for(tools::Long j(0); j < aCounts[x]; j++)
{
- const long aIndex(aBaseIndex + j);
+ const tools::Long aIndex(aBaseIndex + j);
const sal_Int16 aWeight(aWeights[aIndex]);
BitmapColor aColor;
@@ -181,8 +181,8 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc
{
// Do vertical filtering
OSL_ENSURE(rScaleY > 0.0, "Error in scaling: Mirror given in non-mirror-capable method (!)");
- const long nHeight(rSource.GetSizePixel().Height());
- const long nNewHeight(FRound(nHeight * rScaleY));
+ const tools::Long nHeight(rSource.GetSizePixel().Height());
+ const tools::Long nNewHeight(FRound(nHeight * rScaleY));
if(nHeight == nNewHeight)
{
@@ -196,9 +196,9 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc
std::vector<sal_Int16> aWeights;
std::vector<sal_Int32> aPixels;
std::vector<sal_Int32> aCounts;
- long aNumberOfContributions(0);
+ tools::Long aNumberOfContributions(0);
- const long nWidth(rSource.GetSizePixel().Width());
+ const tools::Long nWidth(rSource.GetSizePixel().Width());
ImplCalculateContributions(nHeight, nNewHeight, aNumberOfContributions, aWeights, aPixels, aCounts, aKernel);
rTarget = Bitmap(Size(nWidth, nNewHeight), 24);
BitmapScopedWriteAccess pWriteAcc(rTarget);
@@ -207,24 +207,24 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc
if(pWriteAcc)
{
std::vector<BitmapColor> aScanline(nHeight);
- for(long x(0); x < nWidth; x++)
+ for(tools::Long x(0); x < nWidth; x++)
{
- for(long y(0); y < nHeight; y++)
+ for(tools::Long y(0); y < nHeight; y++)
if(pReadAcc->HasPalette())
aScanline[y] = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(y, x));
else
aScanline[y] = pReadAcc->GetPixel(y, x);
- for(long y(0); y < nNewHeight; y++)
+ for(tools::Long y(0); y < nNewHeight; y++)
{
- const long aBaseIndex(y * aNumberOfContributions);
+ const tools::Long aBaseIndex(y * aNumberOfContributions);
sal_Int32 aSum(0);
sal_Int32 aValueRed(0);
sal_Int32 aValueGreen(0);
sal_Int32 aValueBlue(0);
- for(long j(0); j < aCounts[y]; j++)
+ for(tools::Long j(0); j < aCounts[y]; j++)
{
- const long aIndex(aBaseIndex + j);
+ const tools::Long aIndex(aBaseIndex + j);
const sal_Int16 aWeight(aWeights[aIndex]);
aSum += aWeight;
const BitmapColor & aColor = aScanline[aPixels[aIndex]];
@@ -271,10 +271,10 @@ bool ImplScaleConvolution(Bitmap& rBitmap, const double& rScaleX, const double&
const bool bMirrorVer(rScaleY < 0.0);
const double fScaleX(bMirrorHor ? -rScaleX : rScaleX);
const double fScaleY(bMirrorVer ? -rScaleY : rScaleY);
- const long nWidth(rBitmap.GetSizePixel().Width());
- const long nHeight(rBitmap.GetSizePixel().Height());
- const long nNewWidth(FRound(nWidth * fScaleX));
- const long nNewHeight(FRound(nHeight * fScaleY));
+ const tools::Long nWidth(rBitmap.GetSizePixel().Width());
+ const tools::Long nHeight(rBitmap.GetSizePixel().Height());
+ const tools::Long nNewWidth(FRound(nWidth * fScaleX));
+ const tools::Long nNewHeight(FRound(nHeight * fScaleY));
const bool bScaleHor(nWidth != nNewWidth);
const bool bScaleVer(nHeight != nNewHeight);
const bool bMirror(bMirrorHor || bMirrorVer);
@@ -300,8 +300,8 @@ bool ImplScaleConvolution(Bitmap& rBitmap, const double& rScaleX, const double&
nMirrorFlags |= BmpMirrorFlags::Vertical;
}
- const long nStartSize(nWidth * nHeight);
- const long nEndSize(nNewWidth * nNewHeight);
+ const tools::Long nStartSize(nWidth * nHeight);
+ const tools::Long nEndSize(nNewWidth * nNewHeight);
bMirrorAfter = nStartSize > nEndSize;
@@ -315,8 +315,8 @@ bool ImplScaleConvolution(Bitmap& rBitmap, const double& rScaleX, const double&
if (bResult)
{
- const long nInBetweenSizeHorFirst(nHeight * nNewWidth);
- const long nInBetweenSizeVerFirst(nNewHeight * nWidth);
+ const tools::Long nInBetweenSizeHorFirst(nHeight * nNewWidth);
+ const tools::Long nInBetweenSizeVerFirst(nNewHeight * nWidth);
Bitmap aSource(rBitmap);
if(nInBetweenSizeHorFirst < nInBetweenSizeVerFirst)
diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index 97ceeb45ad35..3d5fe51d1c5d 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -50,7 +50,7 @@ struct ScaleContext
{
BitmapReadAccess* mpSrc;
BitmapWriteAccess* mpDest;
- long mnDestW;
+ tools::Long mnDestW;
bool mbHMirr;
bool mbVMirr;
std::vector<long> maMapIX;
@@ -60,8 +60,8 @@ struct ScaleContext
ScaleContext( BitmapReadAccess *pSrc,
BitmapWriteAccess *pDest,
- long nSrcW, long nDestW,
- long nSrcH, long nDestH,
+ tools::Long nSrcW, tools::Long nDestW,
+ tools::Long nSrcH, tools::Long nDestH,
bool bHMirr, bool bVMirr)
: mpSrc(pSrc)
, mpDest(pDest)
@@ -77,28 +77,28 @@ struct ScaleContext
generateMap(nSrcH, nDestH, bVMirr, maMapIY, maMapFY);
}
- static void generateMap(long nSourceLength, long nDestinationLength, bool bMirrored,
+ static void generateMap(tools::Long nSourceLength, tools::Long nDestinationLength, bool bMirrored,
std::vector<long> & rMapIX, std::vector<BilinearWeightType> & rMapFX)
{
const double fRevScale = (nDestinationLength > 1) ? double(nSourceLength - 1) / (nDestinationLength - 1) : 0.0;
- long nTemp = nSourceLength - 2;
- long nTempX = nSourceLength - 1;
+ tools::Long nTemp = nSourceLength - 2;
+ tools::Long nTempX = nSourceLength - 1;
- for (long i = 0; i < nDestinationLength; i++)
+ for (tools::Long i = 0; i < nDestinationLength; i++)
{
double fTemp = i * fRevScale;
if (bMirrored)
fTemp = nTempX - fTemp;
- rMapIX[i] = MinMax(long(fTemp), 0, nTemp);
+ rMapIX[i] = MinMax(tools::Long(fTemp), 0, nTemp);
rMapFX[i] = BilinearWeightType((fTemp - rMapIX[i]) * (BilinearWeightType(1) << MAP_PRECISION));
}
}
};
-constexpr long constScaleThreadStrip = 32;
+constexpr tools::Long constScaleThreadStrip = 32;
-typedef void (*ScaleRangeFn)(const ScaleContext & rContext, long nStartY, long nEndY);
+typedef void (*ScaleRangeFn)(const ScaleContext & rContext, tools::Long nStartY, tools::Long nEndY);
template <size_t nSize> struct ScaleFunc
{
@@ -165,21 +165,21 @@ template <size_t nSize> struct ScaleFunc
};
template <int nColorBits>
-void scaleDown (const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDown (const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
constexpr int nColorComponents = nColorBits / 8;
static_assert(nColorComponents * 8 == nColorBits, "nColorBits must be divisible by 8");
using ScaleFunction = ScaleFunc<nColorComponents>;
- const long nStartX = 0;
- const long nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0;
+ const tools::Long nEndX = rCtx.mnDestW - 1;
- for (long nY = nStartY; nY <= nEndY; nY++)
+ for (tools::Long nY = nStartY; nY <= nEndY; nY++)
{
- long nTop = rCtx.mbVMirr ? (nY + 1) : nY;
- long nBottom = rCtx.mbVMirr ? nY : (nY + 1);
+ tools::Long nTop = rCtx.mbVMirr ? (nY + 1) : nY;
+ tools::Long nBottom = rCtx.mbVMirr ? nY : (nY + 1);
- long nLineStart;
- long nLineRange;
+ tools::Long nLineStart;
+ tools::Long nLineRange;
if (nY == nEndY)
{
nLineStart = rCtx.maMapIY[nY];
@@ -193,13 +193,13 @@ void scaleDown (const ScaleContext &rCtx, long nStartY, long nEndY)
}
Scanline pScanDest = rCtx.mpDest->GetScanline(nY);
- for (long nX = nStartX; nX <= nEndX; nX++)
+ for (tools::Long nX = nStartX; nX <= nEndX; nX++)
{
- long nLeft = rCtx.mbHMirr ? (nX + 1) : nX;
- long nRight = rCtx.mbHMirr ? nX : (nX + 1);
+ tools::Long nLeft = rCtx.mbHMirr ? (nX + 1) : nX;
+ tools::Long nRight = rCtx.mbHMirr ? nX : (nX + 1);
- long nRowStart;
- long nRowRange;
+ tools::Long nRowStart;
+ tools::Long nRowRange;
if (nX == nEndX)
{
nRowStart = rCtx.maMapIX[nX];
@@ -215,7 +215,7 @@ void scaleDown (const ScaleContext &rCtx, long nStartY, long nEndY)
std::array<int, nColorComponents> sumNumbers{}; // zero-initialize
BilinearWeightType nTotalWeightY = 0;
- for (long i = 0; i<= nLineRange; i++)
+ for (tools::Long i = 0; i<= nLineRange; i++)
{
Scanline pTmpY = rCtx.mpSrc->GetScanline(nLineStart + i);
Scanline pTmpX = pTmpY + nColorComponents * nRowStart;
@@ -223,7 +223,7 @@ void scaleDown (const ScaleContext &rCtx, long nStartY, long nEndY)
std::array<int, nColorComponents> sumRows{}; // zero-initialize
BilinearWeightType nTotalWeightX = 0;
- for (long j = 0; j <= nRowRange; j++)
+ for (tools::Long j = 0; j <= nRowRange; j++)
{
if (nX == nEndX)
{
@@ -280,17 +280,17 @@ void scaleDown (const ScaleContext &rCtx, long nStartY, long nEndY)
}
template <int nColorBits>
-void scaleUp(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUp(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
constexpr int nColorComponents = nColorBits / 8;
static_assert(nColorComponents * 8 == nColorBits, "nColorBits must be divisible by 8");
using ScaleFunction = ScaleFunc<nColorComponents>;
- const long nStartX = 0;
- const long nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0;
+ const tools::Long nEndX = rCtx.mnDestW - 1;
- for (long nY = nStartY; nY <= nEndY; nY++)
+ for (tools::Long nY = nStartY; nY <= nEndY; nY++)
{
- long nTempY = rCtx.maMapIY[nY];
+ tools::Long nTempY = rCtx.maMapIY[nY];
BilinearWeightType nTempFY = rCtx.maMapFY[nY];
Scanline pLine0 = rCtx.mpSrc->GetScanline(nTempY+0);
@@ -303,9 +303,9 @@ void scaleUp(const ScaleContext &rCtx, long nStartY, long nEndY)
Scanline pColorPtr0;
Scanline pColorPtr1;
- for (long nX = nStartX; nX <= nEndX; nX++)
+ for (tools::Long nX = nStartX; nX <= nEndX; nX++)
{
- long nTempX = rCtx.maMapIX[nX];
+ tools::Long nTempX = rCtx.maMapIX[nX];
BilinearWeightType nTempFX = rCtx.maMapFX[nX];
pColorPtr0 = pLine0 + nTempX * nColorComponents;
@@ -326,14 +326,14 @@ class ScaleTask : public comphelper::ThreadTask
{
ScaleRangeFn mpScaleRangeFunction;
const ScaleContext& mrContext;
- long mnStartY;
- long mnEndY;
+ tools::Long mnStartY;
+ tools::Long mnEndY;
public:
explicit ScaleTask(const std::shared_ptr<comphelper::ThreadTaskTag>& pTag,
ScaleRangeFn pScaleRangeFunction,
const ScaleContext& rContext,
- long nStartY, long nEndY)
+ tools::Long nStartY, tools::Long nEndY)
: comphelper::ThreadTask(pTag)
, mpScaleRangeFunction(pScaleRangeFunction)
, mrContext(rContext)
@@ -347,21 +347,21 @@ public:
}
};
-void scaleUpPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUpPalette8bit(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0, nEndX = rCtx.mnDestW - 1;
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
- long nTempY = rCtx.maMapIY[ nY ];
+ tools::Long nTempY = rCtx.maMapIY[ nY ];
BilinearWeightType nTempFY = rCtx.maMapFY[ nY ];
Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY );
Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY );
Scanline pScanDest = rCtx.mpDest->GetScanline( nY );
- for(long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
+ for(tools::Long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
- long nTempX = rCtx.maMapIX[ nX ];
+ tools::Long nTempX = rCtx.maMapIX[ nX ];
BilinearWeightType nTempFX = rCtx.maMapFX[ nX ];
const BitmapColor& rCol0 = rCtx.mpSrc->GetPaletteColor( pLine0[ nTempX ] );
@@ -385,19 +385,19 @@ void scaleUpPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
}
}
-void scaleUpPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUpPaletteGeneral(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0, nEndX = rCtx.mnDestW - 1;
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
- long nTempY = rCtx.maMapIY[ nY ];
+ tools::Long nTempY = rCtx.maMapIY[ nY ];
BilinearWeightType nTempFY = rCtx.maMapFY[ nY ];
Scanline pScanline = rCtx.mpDest->GetScanline( nY );
- for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
- long nTempX = rCtx.maMapIX[ nX ];
+ tools::Long nTempX = rCtx.maMapIX[ nX ];
BilinearWeightType nTempFX = rCtx.maMapFX[ nX ];
BitmapColor aCol0 = rCtx.mpSrc->GetPaletteColor( rCtx.mpSrc->GetPixelIndex( nTempY, nTempX ) );
@@ -420,19 +420,19 @@ void scaleUpPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
}
}
-void scaleUpNonPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleUpNonPaletteGeneral(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0, nEndX = rCtx.mnDestW - 1;
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
- long nTempY = rCtx.maMapIY[ nY ];
+ tools::Long nTempY = rCtx.maMapIY[ nY ];
BilinearWeightType nTempFY = rCtx.maMapFY[ nY ];
Scanline pScanDest = rCtx.mpDest->GetScanline( nY );
- for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
- long nTempX = rCtx.maMapIX[ nX ];
+ tools::Long nTempX = rCtx.maMapIX[ nX ];
BilinearWeightType nTempFX = rCtx.maMapFX[ nX ];
BitmapColor aCol0 = rCtx.mpSrc->GetPixel( nTempY, nTempX );
@@ -455,16 +455,16 @@ void scaleUpNonPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY
}
}
-void scaleDownPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDownPalette8bit(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0, nEndX = rCtx.mnDestW - 1;
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
- long nTop = rCtx.mbVMirr ? ( nY + 1 ) : nY;
- long nBottom = rCtx.mbVMirr ? nY : ( nY + 1 ) ;
+ tools::Long nTop = rCtx.mbVMirr ? ( nY + 1 ) : nY;
+ tools::Long nBottom = rCtx.mbVMirr ? nY : ( nY + 1 ) ;
- long nLineStart, nLineRange;
+ tools::Long nLineStart, nLineRange;
if( nY == nEndY )
{
nLineStart = rCtx.maMapIY[ nY ];
@@ -477,13 +477,13 @@ void scaleDownPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
}
Scanline pScanDest = rCtx.mpDest->GetScanline( nY );
- for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
- long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
- long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
+ tools::Long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
+ tools::Long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
- long nRowStart;
- long nRowRange;
+ tools::Long nRowStart;
+ tools::Long nRowRange;
if( nX == nEndX )
{
nRowStart = rCtx.maMapIX[ nX ];
@@ -500,7 +500,7 @@ void scaleDownPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
int nSumB = 0;
BilinearWeightType nTotalWeightY = 0;
- for(long i = 0; i<= nLineRange; i++)
+ for(tools::Long i = 0; i<= nLineRange; i++)
{
Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i );
int nSumRowR = 0;
@@ -508,7 +508,7 @@ void scaleDownPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
int nSumRowB = 0;
BilinearWeightType nTotalWeightX = 0;
- for(long j = 0; j <= nRowRange; j++)
+ for(tools::Long j = 0; j <= nRowRange; j++)
{
const BitmapColor& rCol = rCtx.mpSrc->GetPaletteColor( pTmpY[ nRowStart + j ] );
@@ -580,16 +580,16 @@ void scaleDownPalette8bit(const ScaleContext &rCtx, long nStartY, long nEndY)
}
}
-void scaleDownPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDownPaletteGeneral(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0, nEndX = rCtx.mnDestW - 1;
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
- long nTop = rCtx.mbVMirr ? ( nY + 1 ) : nY;
- long nBottom = rCtx.mbVMirr ? nY : ( nY + 1 ) ;
+ tools::Long nTop = rCtx.mbVMirr ? ( nY + 1 ) : nY;
+ tools::Long nBottom = rCtx.mbVMirr ? nY : ( nY + 1 ) ;
- long nLineStart, nLineRange;
+ tools::Long nLineStart, nLineRange;
if( nY ==nEndY )
{
nLineStart = rCtx.maMapIY[ nY ];
@@ -602,12 +602,12 @@ void scaleDownPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
}
Scanline pScanDest = rCtx.mpDest->GetScanline( nY );
- for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
- long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
- long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
+ tools::Long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
+ tools::Long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
- long nRowStart, nRowRange;
+ tools::Long nRowStart, nRowRange;
if( nX == nEndX )
{
nRowStart = rCtx.maMapIX[ nX ];
@@ -624,7 +624,7 @@ void scaleDownPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
int nSumB = 0;
BilinearWeightType nTotalWeightY = 0;
- for(long i = 0; i<= nLineRange; i++)
+ for(tools::Long i = 0; i<= nLineRange; i++)
{
int nSumRowR = 0;
int nSumRowG = 0;
@@ -632,7 +632,7 @@ void scaleDownPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
BilinearWeightType nTotalWeightX = 0;
Scanline pScanlineSrc = rCtx.mpSrc->GetScanline( nLineStart + i );
- for(long j = 0; j <= nRowRange; j++)
+ for(tools::Long j = 0; j <= nRowRange; j++)
{
BitmapColor aCol0 = rCtx.mpSrc->GetPaletteColor ( rCtx.mpSrc->GetIndexFromData( pScanlineSrc, nRowStart + j ) );
@@ -672,7 +672,7 @@ void scaleDownPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
}
}
- long nWeightY = lclMaxWeight();
+ tools::Long nWeightY = lclMaxWeight();
if( nY == nEndY )
nWeightY = lclMaxWeight();
else if( i == 0 )
@@ -708,16 +708,16 @@ void scaleDownPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
}
}
-void scaleDownNonPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEndY)
+void scaleDownNonPaletteGeneral(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
+ const tools::Long nStartX = 0, nEndX = rCtx.mnDestW - 1;
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
- long nTop = rCtx.mbVMirr ? ( nY + 1 ) : nY;
- long nBottom = rCtx.mbVMirr ? nY : ( nY + 1 ) ;
+ tools::Long nTop = rCtx.mbVMirr ? ( nY + 1 ) : nY;
+ tools::Long nBottom = rCtx.mbVMirr ? nY : ( nY + 1 ) ;
- long nLineStart, nLineRange;
+ tools::Long nLineStart, nLineRange;
if( nY ==nEndY )
{
nLineStart = rCtx.maMapIY[ nY ];
@@ -730,12 +730,12 @@ void scaleDownNonPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEn
}
Scanline pScanDest = rCtx.mpDest->GetScanline( nY );
- for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
- long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
- long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
+ tools::Long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
+ tools::Long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
- long nRowStart, nRowRange;
+ tools::Long nRowStart, nRowRange;
if( nX == nEndX )
{
nRowStart = rCtx.maMapIX[ nX ];
@@ -752,7 +752,7 @@ void scaleDownNonPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEn
int nSumB = 0;
BilinearWeightType nTotalWeightY = 0;
- for(long i = 0; i<= nLineRange; i++)
+ for(tools::Long i = 0; i<= nLineRange; i++)
{
int nSumRowR = 0;
int nSumRowG = 0;
@@ -760,7 +760,7 @@ void scaleDownNonPaletteGeneral(const ScaleContext &rCtx, long nStartY, long nEn
BilinearWeightType nTotalWeightX = 0;
Scanline pScanlineSrc = rCtx.mpSrc->GetScanline( nLineStart + i );
- for(long j = 0; j <= nRowRange; j++)
+ for(tools::Long j = 0; j <= nRowRange; j++)
{
BitmapColor aCol0 = rCtx.mpSrc->GetPixelFromData( pScanlineSrc, nRowStart + j );
@@ -858,8 +858,8 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx const& rBitmap) const
double fScaleX = std::fabs(mrScaleX);
double fScaleY = std::fabs(mrScaleY);
- const long nDstW = FRound(aSizePix.Width() * fScaleX);
- const long nDstH = FRound(aSizePix.Height() * fScaleY);
+ const tools::Long nDstW = FRound(aSizePix.Width() * fScaleX);
+ const tools::Long nDstH = FRound(aSizePix.Height() * fScaleY);
constexpr double fScaleThresh = 0.6;
@@ -898,7 +898,7 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx const& rBitmap) const
BitmapScopedWriteAccess pWriteAccess(aOutBmp);
- const long nEndY = nDstH - 1;
+ const tools::Long nEndY = nDstH - 1;
if (pReadAccess && pWriteAccess)
{
@@ -966,7 +966,7 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx const& rBitmap) const
// A large source image.
bool bHorizontalWork = pReadAccess->Height() >= 512 && pReadAccess->Width() >= 512;
bool bUseThreads = true;
- const long nStartY = 0;
+ const tools::Long nStartY = 0;
static bool bDisableThreadedScaling = getenv ("VCL_NO_THREAD_SCALE");
if (bDisableThreadedScaling || !bHorizontalWork)
@@ -984,7 +984,7 @@ BitmapEx BitmapScaleSuperFilter::execute(BitmapEx const& rBitmap) const
std::shared_ptr<comphelper::ThreadTaskTag> pTag = comphelper::ThreadPool::createThreadTaskTag();
vcl::bitmap::generateStripRanges<constScaleThreadStrip>(nStartY, nEndY,
- [&] (long const nStart, long const nEnd, bool const bLast)
+ [&] (tools::Long const nStart, tools::Long const nEnd, bool const bLast)
{
if (!bLast)
{
diff --git a/vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx b/vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx
index 58d5e381087d..9a8b462e47a2 100644
--- a/vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx
+++ b/vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx
@@ -21,8 +21,8 @@ BitmapEx BitmapSeparableUnsharpenFilter::execute(BitmapEx const& rBitmapEx) cons
{
Bitmap aBitmap(rBitmapEx.GetBitmap());
- const long nWidth = aBitmap.GetSizePixel().Width();
- const long nHeight = aBitmap.GetSizePixel().Height();
+ const tools::Long nWidth = aBitmap.GetSizePixel().Width();
+ const tools::Long nHeight = aBitmap.GetSizePixel().Height();
Bitmap aBlur(aBitmap);
BitmapEx aBlurEx(aBlur);
@@ -42,10 +42,10 @@ BitmapEx BitmapSeparableUnsharpenFilter::execute(BitmapEx const& rBitmapEx) cons
BitmapColor aColor, aColorBlur;
// For all pixels in original image subtract pixels values from blurred image
- for (long y = 0; y < nHeight; y++)
+ for (tools::Long y = 0; y < nHeight; y++)
{
Scanline pScanline = pWriteAcc->GetScanline(y);
- for (long x = 0; x < nWidth; x++)
+ for (tools::Long x = 0; x < nWidth; x++)
{
aColorBlur = pReadAccBlur->GetColor(y, x);
aColor = pReadAcc->GetColor(y, x);
diff --git a/vcl/source/bitmap/BitmapSepiaFilter.cxx b/vcl/source/bitmap/BitmapSepiaFilter.cxx
index 5123bf13075c..cfac984b8fa3 100644
--- a/vcl/source/bitmap/BitmapSepiaFilter.cxx
+++ b/vcl/source/bitmap/BitmapSepiaFilter.cxx
@@ -27,7 +27,7 @@ BitmapEx BitmapSepiaFilter::execute(BitmapEx const& rBitmapEx) const
if (pReadAcc)
{
- const long nSepia
+ const tools::Long nSepia
= 10000 - 100 * std::clamp(mnSepiaPercent, sal_uInt16(0), sal_uInt16(100));
BitmapPalette aSepiaPal(256);
@@ -47,8 +47,8 @@ BitmapEx BitmapSepiaFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
BitmapColor aCol(sal_uInt8(0));
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
if (pReadAcc->HasPalette())
{
@@ -59,11 +59,11 @@ BitmapEx BitmapSepiaFilter::execute(BitmapEx const& rBitmapEx) const
pIndexMap[i] = pReadAcc->GetPaletteColor(i).GetLuminance();
}
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aCol.SetIndex(pIndexMap[pReadAcc->GetIndexFromData(pScanlineRead, nX)]);
pWriteAcc->SetPixelOnData(pScanline, nX, aCol);
@@ -72,11 +72,11 @@ BitmapEx BitmapSepiaFilter::execute(BitmapEx const& rBitmapEx) const
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aCol.SetIndex(pReadAcc->GetPixelFromData(pScanlineRead, nX).GetLuminance());
pWriteAcc->SetPixelOnData(pScanline, nX, aCol);
diff --git a/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx b/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx
index 1d21ed9e1279..4284db563ac3 100644
--- a/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx
+++ b/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx
@@ -50,16 +50,16 @@ BitmapEx BitmapSimpleColorQuantizationFilter::execute(BitmapEx const& aBitmapEx)
if (pWAcc)
{
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
+ const tools::Long nWidth = pRAcc->Width();
+ const tools::Long nHeight = pRAcc->Height();
if (pRAcc->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWAcc->GetScanline(nY);
Scanline pScanlineRead = pRAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
auto c = pRAcc->GetPaletteColor(
pRAcc->GetIndexFromData(pScanlineRead, nX));
@@ -71,11 +71,11 @@ BitmapEx BitmapSimpleColorQuantizationFilter::execute(BitmapEx const& aBitmapEx)
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWAcc->GetScanline(nY);
Scanline pScanlineRead = pRAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
auto c = pRAcc->GetPixelFromData(pScanlineRead, nX);
pWAcc->SetPixelOnData(
diff --git a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
index 5ce4987a26fd..e6609f77d9f4 100644
--- a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
@@ -39,20 +39,20 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
if (pWriteAcc)
{
BitmapColor aGrey(sal_uInt8(0));
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
- const long nMask211 = -2, nMask221 = 0, nMask231 = 2;
- const long nMask311 = -1, nMask321 = 0, nMask331 = 1;
- const long nMask112 = 1, nMask122 = 2, nMask132 = 1;
- const long nMask212 = 0, nMask222 = 0, nMask232 = 0;
- const long nMask312 = -1, nMask322 = -2, nMask332 = -1;
- long nGrey11, nGrey12, nGrey13;
- long nGrey21, nGrey22, nGrey23;
- long nGrey31, nGrey32, nGrey33;
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
+ const tools::Long nMask111 = -1, nMask121 = 0, nMask131 = 1;
+ const tools::Long nMask211 = -2, nMask221 = 0, nMask231 = 2;
+ const tools::Long nMask311 = -1, nMask321 = 0, nMask331 = 1;
+ const tools::Long nMask112 = 1, nMask122 = 2, nMask132 = 1;
+ const tools::Long nMask212 = 0, nMask222 = 0, nMask232 = 0;
+ const tools::Long nMask312 = -1, nMask322 = -2, nMask332 = -1;
+ tools::Long nGrey11, nGrey12, nGrey13;
+ tools::Long nGrey21, nGrey22, nGrey23;
+ tools::Long nGrey31, nGrey32, nGrey33;
std::unique_ptr<long[]> pHMap(new long[nWidth + 2]);
std::unique_ptr<long[]> pVMap(new long[nHeight + 2]);
- long nX, nY, nSum1, nSum2;
+ tools::Long nX, nY, nSum1, nSum2;
// fill mapping tables
pHMap[0] = 0;
@@ -117,7 +117,7 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
nSum1 += nMask331 * nGrey33;
nSum2 += nMask332 * nGrey33;
- nSum1 = static_cast<long>(
+ nSum1 = static_cast<tools::Long>(
sqrt(static_cast<double>(nSum1 * nSum1 + nSum2 * nSum2)));
aGrey.SetIndex(~static_cast<sal_uInt8>(std::clamp(nSum1, 0L, 255L)));
@@ -125,7 +125,7 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
if (nX < (nWidth - 1))
{
- const long nNextX = pHMap[nX + 3];
+ const tools::Long nNextX = pHMap[nX + 3];
nGrey11 = nGrey12;
nGrey12 = nGrey13;
diff --git a/vcl/source/bitmap/BitmapSolarizeFilter.cxx b/vcl/source/bitmap/BitmapSolarizeFilter.cxx
index bd7518b4cabf..c4df366a65cb 100644
--- a/vcl/source/bitmap/BitmapSolarizeFilter.cxx
+++ b/vcl/source/bitmap/BitmapSolarizeFilter.cxx
@@ -39,13 +39,13 @@ BitmapEx BitmapSolarizeFilter::execute(BitmapEx const& rBitmapEx) const
else
{
BitmapColor aCol;
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aCol = pWriteAcc->GetPixelFromData(pScanline, nX);
diff --git a/vcl/source/bitmap/BitmapSymmetryCheck.cxx b/vcl/source/bitmap/BitmapSymmetryCheck.cxx
index 9abb480864e2..ce5235132e80 100644
--- a/vcl/source/bitmap/BitmapSymmetryCheck.cxx
+++ b/vcl/source/bitmap/BitmapSymmetryCheck.cxx
@@ -24,20 +24,20 @@ bool BitmapSymmetryCheck::check(Bitmap& rBitmap)
bool BitmapSymmetryCheck::checkImpl(BitmapReadAccess const * pReadAccess)
{
- long nHeight = pReadAccess->Height();
- long nWidth = pReadAccess->Width();
+ tools::Long nHeight = pReadAccess->Height();
+ tools::Long nWidth = pReadAccess->Width();
- long nHeightHalf = nHeight / 2;
- long nWidthHalf = nWidth / 2;
+ tools::Long nHeightHalf = nHeight / 2;
+ tools::Long nWidthHalf = nWidth / 2;
bool bHeightEven = (nHeight % 2) == 0;
bool bWidthEven = (nWidth % 2) == 0;
- for (long y = 0; y < nHeightHalf; ++y)
+ for (tools::Long y = 0; y < nHeightHalf; ++y)
{
Scanline pScanlineRead = pReadAccess->GetScanline( y );
Scanline pScanlineRead2 = pReadAccess->GetScanline( nHeight - y - 1 );
- for (long x = 0; x < nWidthHalf; ++x)
+ for (tools::Long x = 0; x < nWidthHalf; ++x)
{
if (pReadAccess->GetPixelFromData(pScanlineRead, x) != pReadAccess->GetPixelFromData(pScanlineRead2, x))
{
@@ -56,7 +56,7 @@ bool BitmapSymmetryCheck::checkImpl(BitmapReadAccess const * pReadAccess)
if (bWidthEven)
{
- for (long y = 0; y < nHeightHalf; ++y)
+ for (tools::Long y = 0; y < nHeightHalf; ++y)
{
if (pReadAccess->GetPixel(y, nWidthHalf) != pReadAccess->GetPixel(nHeight - y - 1, nWidthHalf))
{
@@ -68,7 +68,7 @@ bool BitmapSymmetryCheck::checkImpl(BitmapReadAccess const * pReadAccess)
if (bHeightEven)
{
Scanline pScanlineRead = pReadAccess->GetScanline( nHeightHalf );
- for (long x = 0; x < nWidthHalf; ++x)
+ for (tools::Long x = 0; x < nWidthHalf; ++x)
{
if (pReadAccess->GetPixelFromData(pScanlineRead, x) != pReadAccess->GetPixelFromData(pScanlineRead, nWidth - x - 1))
{
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index f0c5c522b7de..d49fd7a5efb3 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -141,10 +141,10 @@ BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHe
}
if (nBitCount == 1)
{
- for( long y = 0; y < nHeight; ++y )
+ for( tools::Long y = 0; y < nHeight; ++y )
{
Scanline pScanline = pWrite->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
sal_uInt8 const *p = pData + y * nStride / 8;
int bitIndex = (y * nStride) % 8;
@@ -154,11 +154,11 @@ BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHe
}
else
{
- for( long y = 0; y < nHeight; ++y )
+ for( tools::Long y = 0; y < nHeight; ++y )
{
sal_uInt8 const *p = pData + (y * nStride);
Scanline pScanline = pWrite->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
BitmapColor col(p[0], p[1], p[2]);
pWrite->SetPixelOnData(pScanline, x, col);
@@ -168,7 +168,7 @@ BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHe
{
p = pData + (y * nStride) + 3;
Scanline pMaskScanLine = xMaskAcc->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
xMaskAcc->SetPixelOnData(pMaskScanLine, x, BitmapColor(*p));
p += 4;
@@ -206,11 +206,11 @@ BitmapEx CreateFromData( RawBitmap&& rawBitmap )
auto nHeight = rawBitmap.maSize.getHeight();
auto nWidth = rawBitmap.maSize.getWidth();
auto nStride = nWidth * nBitCount / 8;
- for( long y = 0; y < nHeight; ++y )
+ for( tools::Long y = 0; y < nHeight; ++y )
{
sal_uInt8 const *p = rawBitmap.mpData.get() + (y * nStride);
Scanline pScanline = pWrite->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
BitmapColor col(p[0], p[1], p[2]);
pWrite->SetPixelOnData(pScanline, x, col);
@@ -220,7 +220,7 @@ BitmapEx CreateFromData( RawBitmap&& rawBitmap )
{
p = rawBitmap.mpData.get() + (y * nStride) + 3;
Scanline pMaskScanLine = xMaskAcc->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
xMaskAcc->SetPixelOnData(pMaskScanLine, x, BitmapColor(*p));
p += 4;
@@ -273,10 +273,10 @@ BitmapEx* CreateFromCairoSurface(Size aSize, cairo_surface_t * pSurface)
unsigned char *pSrc = cairo_image_surface_get_data( pPixels );
unsigned int nStride = cairo_image_surface_get_stride( pPixels );
vcl::bitmap::lookup_table unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
- for( long y = 0; y < aSize.Height(); y++ )
+ for( tools::Long y = 0; y < aSize.Height(); y++ )
{
sal_uInt32 *pPix = reinterpret_cast<sal_uInt32 *>(pSrc + nStride * y);
- for( long x = 0; x < aSize.Width(); x++ )
+ for( tools::Long x = 0; x < aSize.Width(); x++ )
{
#if defined OSL_BIGENDIAN
sal_uInt8 nB = (*pPix >> 24);
@@ -407,7 +407,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap,
aTransform.invert();
// for the time being, always read as ARGB
- for( long y=0; y<aDestBmpSize.Height(); ++y )
+ for( tools::Long y=0; y<aDestBmpSize.Height(); ++y )
{
// differentiate mask and alpha channel (on-off
// vs. multi-level transparency)
@@ -416,7 +416,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap,
Scanline pScan = pWriteAccess->GetScanline( y );
Scanline pScanAlpha = pAlphaWriteAccess->GetScanline( y );
// Handling alpha and mask just the same...
- for( long x=0; x<aDestBmpSize.Width(); ++x )
+ for( tools::Long x=0; x<aDestBmpSize.Width(); ++x )
{
::basegfx::B2DPoint aPoint(x,y);
aPoint *= aTransform;
@@ -440,7 +440,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap,
{
Scanline pScan = pWriteAccess->GetScanline( y );
Scanline pScanAlpha = pAlphaWriteAccess->GetScanline( y );
- for( long x=0; x<aDestBmpSize.Width(); ++x )
+ for( tools::Long x=0; x<aDestBmpSize.Width(); ++x )
{
::basegfx::B2DPoint aPoint(x,y);
aPoint *= aTransform;
@@ -503,10 +503,10 @@ void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparen
{
const double fOpNew(1.0 - fTransparence);
- for(long y(0); y < pOld->Height(); y++)
+ for(tools::Long y(0); y < pOld->Height(); y++)
{
Scanline pScanline = pOld->GetScanline( y );
- for(long x(0); x < pOld->Width(); x++)
+ for(tools::Long x(0); x < pOld->Width(); x++)
{
const double fOpOld(1.0 - (pOld->GetIndexFromData(pScanline, x) * fFactor));
const sal_uInt8 aCol(basegfx::fround((1.0 - (fOpOld * fOpNew)) * 255.0));
@@ -524,10 +524,10 @@ void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparen
assert(pOld->Width() == pNew->Width() && pOld->Height() == pNew->Height() &&
"Alpha masks have different sizes (!)");
- for(long y(0); y < pOld->Height(); y++)
+ for(tools::Long y(0); y < pOld->Height(); y++)
{
Scanline pScanline = pOld->GetScanline( y );
- for(long x(0); x < pOld->Width(); x++)
+ for(tools::Long x(0); x < pOld->Width(); x++)
{
const double fOpOld(1.0 - (pOld->GetIndexFromData(pScanline, x) * fFactor));
const double fOpNew(1.0 - (pNew->GetIndexFromData(pScanline, x) * fFactor));
@@ -581,14 +581,14 @@ void DrawAndClipBitmap(const Point& rPos, const Size& rSize, const BitmapEx& rBi
if(pR && pW)
{
- const long nWidth(std::min(pR->Width(), pW->Width()));
- const long nHeight(std::min(pR->Height(), pW->Height()));
+ const tools::Long nWidth(std::min(pR->Width(), pW->Width()));
+ const tools::Long nHeight(std::min(pR->Height(), pW->Height()));
- for(long nY(0); nY < nHeight; nY++)
+ for(tools::Long nY(0); nY < nHeight; nY++)
{
Scanline pScanlineR = pR->GetScanline( nY );
Scanline pScanlineW = pW->GetScanline( nY );
- for(long nX(0); nX < nWidth; nX++)
+ for(tools::Long nX(0); nX < nWidth; nX++)
{
const sal_uInt8 nIndR(pR->GetIndexFromData(pScanlineR, nX));
const sal_uInt8 nIndW(pW->GetIndexFromData(pScanlineW, nX));
@@ -651,10 +651,10 @@ css::uno::Sequence< sal_Int8 > GetMaskDIB(BitmapEx const & aBmpEx)
return css::uno::Sequence< sal_Int8 >();
}
-static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, long nY, const long nWidth, unsigned char* data, long nOff )
+static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, tools::Long nY, const tools::Long nWidth, unsigned char* data, tools::Long nOff )
{
bool bIsAlpha = false;
- long nX;
+ tools::Long nX;
int nAlpha;
Scanline pReadScan;
@@ -705,15 +705,15 @@ static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, long nY, const lo
* @param data will be filled with alpha data, if xBitmap is alpha/transparent image
* @param bHasAlpha will be set to true if resulting surface has alpha
**/
-void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, long& rnWidth, long& rnHeight )
+void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight )
{
AlphaMask aAlpha = aBmpEx.GetAlpha();
::BitmapReadAccess* pBitmapReadAcc = aBitmap.AcquireReadAccess();
::BitmapReadAccess* pAlphaReadAcc = nullptr;
- const long nWidth = rnWidth = pBitmapReadAcc->Width();
- const long nHeight = rnHeight = pBitmapReadAcc->Height();
- long nX, nY;
+ const tools::Long nWidth = rnWidth = pBitmapReadAcc->Width();
+ const tools::Long nHeight = rnHeight = pBitmapReadAcc->Height();
+ tools::Long nX, nY;
bool bIsAlpha = false;
if( aBmpEx.IsTransparent() || aBmpEx.IsAlpha() )
@@ -721,7 +721,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un
data = static_cast<unsigned char*>(malloc( nWidth*nHeight*4 ));
- long nOff = 0;
+ tools::Long nOff = 0;
::Color aColor;
unsigned int nAlpha = 255;
@@ -946,14 +946,14 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un
sal_Int8* pRes = aRes.getArray();
int nCurrPos(0);
- for( long y=rect.Y1;
+ for( tools::Long y=rect.Y1;
y<aBmpSize.Height() && y<rect.Y2;
++y )
{
if( pAlphaReadAccess.get() != nullptr )
{
Scanline pScanlineReadAlpha = pAlphaReadAccess->GetScanline( y );
- for( long x=rect.X1;
+ for( tools::Long x=rect.X1;
x<aBmpSize.Width() && x<rect.X2;
++x )
{
@@ -965,7 +965,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un
}
else
{
- for( long x=rect.X1;
+ for( tools::Long x=rect.X1;
x<aBmpSize.Width() && x<rect.X2;
++x )
{
@@ -1101,14 +1101,14 @@ bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx & rResult)
Bitmap::ScopedReadAccess pReadAccess(aBitmap);
- for (long nY = 0; nY < aSize.Height(); ++nY)
+ for (tools::Long nY = 0; nY < aSize.Height(); ++nY)
{
Scanline aResultScan = pResultBitmapAccess->GetScanline(nY);
Scanline aResultScanAlpha = pResultAlphaAccess->GetScanline(nY);
Scanline aReadScan = pReadAccess->GetScanline(nY);
- for (long nX = 0; nX < aSize.Width(); ++nX)
+ for (tools::Long nX = 0; nX < aSize.Width(); ++nX)
{
const BitmapColor aColor = pReadAccess->GetPixelFromData(aReadScan, nX);
BitmapColor aResultColor(aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue());
diff --git a/vcl/source/bitmap/Octree.cxx b/vcl/source/bitmap/Octree.cxx
index b39e5a1673f2..8f813315600e 100644
--- a/vcl/source/bitmap/Octree.cxx
+++ b/vcl/source/bitmap/Octree.cxx
@@ -43,15 +43,15 @@ Octree::Octree(const BitmapReadAccess& rReadAcc, sal_uLong nColors)
if (!*pAccess)
return;
- const long nWidth = pAccess->Width();
- const long nHeight = pAccess->Height();
+ const tools::Long nWidth = pAccess->Width();
+ const tools::Long nHeight = pAccess->Height();
if (pAccess->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAccess->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
mpColor = &pAccess->GetPaletteColor(pAccess->GetIndexFromData(pScanline, nX));
mnLevel = 0;
@@ -68,10 +68,10 @@ Octree::Octree(const BitmapReadAccess& rReadAcc, sal_uLong nColors)
mpColor = &aColor;
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAccess->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aColor = pAccess->GetPixelFromData(pScanline, nX);
mnLevel = 0;
@@ -225,28 +225,28 @@ InverseColorMap::InverseColorMap(const BitmapPalette& rPal)
const unsigned long xsqr = 1 << (gnBits << 1);
const unsigned long xsqr2 = xsqr << 1;
const int nColors = rPal.GetEntryCount();
- const long x = 1 << gnBits;
- const long x2 = x >> 1;
+ const tools::Long x = 1 << gnBits;
+ const tools::Long x2 = x >> 1;
sal_uLong r, g, b;
- long rxx, gxx, bxx;
+ tools::Long rxx, gxx, bxx;
ImplCreateBuffers();
for (int nIndex = 0; nIndex < nColors; nIndex++)
{
const BitmapColor& rColor = rPal[static_cast<sal_uInt16>(nIndex)];
- const long cRed = rColor.GetRed();
- const long cGreen = rColor.GetGreen();
- const long cBlue = rColor.GetBlue();
+ const tools::Long cRed = rColor.GetRed();
+ const tools::Long cGreen = rColor.GetGreen();
+ const tools::Long cBlue = rColor.GetBlue();
- long rdist = cRed - x2;
- long gdist = cGreen - x2;
- long bdist = cBlue - x2;
+ tools::Long rdist = cRed - x2;
+ tools::Long gdist = cGreen - x2;
+ tools::Long bdist = cBlue - x2;
rdist = rdist * rdist + gdist * gdist + bdist * bdist;
- const long crinc = (xsqr - (cRed << gnBits)) << 1;
- const long cginc = (xsqr - (cGreen << gnBits)) << 1;
- const long cbinc = (xsqr - (cBlue << gnBits)) << 1;
+ const tools::Long crinc = (xsqr - (cRed << gnBits)) << 1;
+ const tools::Long cginc = (xsqr - (cGreen << gnBits)) << 1;
+ const tools::Long cbinc = (xsqr - (cBlue << gnBits)) << 1;
sal_uLong* cdp = reinterpret_cast<sal_uLong*>(mpBuffer.data());
sal_uInt8* crgbp = mpMap.data();
@@ -257,7 +257,7 @@ InverseColorMap::InverseColorMap(const BitmapPalette& rPal)
{
for (b = 0, bdist = gdist, bxx = cbinc; b < nColorMax;
bdist += bxx, b++, cdp++, crgbp++, bxx += xsqr2)
- if (!nIndex || static_cast<long>(*cdp) > bdist)
+ if (!nIndex || static_cast<tools::Long>(*cdp) > bdist)
{
*cdp = bdist;
*crgbp = static_cast<sal_uInt8>(nIndex);
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index dfa50e29e592..c7b7b9b7e70c 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -475,16 +475,16 @@ bool Bitmap::Crop( const tools::Rectangle& rRectPixel )
if( pWriteAcc )
{
- const long nOldX = aRect.Left();
- const long nOldY = aRect.Top();
- const long nNewWidth = aNewRect.GetWidth();
- const long nNewHeight = aNewRect.GetHeight();
+ const tools::Long nOldX = aRect.Left();
+ const tools::Long nOldY = aRect.Top();
+ const tools::Long nNewWidth = aNewRect.GetWidth();
+ const tools::Long nNewHeight = aNewRect.GetHeight();
- for( long nY = 0, nY2 = nOldY; nY < nNewHeight; nY++, nY2++ )
+ for( tools::Long nY = 0, nY2 = nOldY; nY < nNewHeight; nY++, nY2++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY2);
- for( long nX = 0, nX2 = nOldX; nX < nNewWidth; nX++, nX2++ )
+ for( tools::Long nX = 0, nX2 = nOldX; nX < nNewWidth; nX++, nX2++ )
pWriteAcc->SetPixelOnData( pScanline, nX, pReadAcc->GetPixelFromData( pScanlineRead, nX2 ) );
}
@@ -582,11 +582,11 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
if( pWriteAcc )
{
- const long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcEndX = aRectSrc.Left() + nWidth;
- const long nSrcEndY = aRectSrc.Top() + nHeight;
- long nDstY = aRectDst.Top();
+ const tools::Long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const tools::Long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const tools::Long nSrcEndX = aRectSrc.Left() + nWidth;
+ const tools::Long nSrcEndY = aRectSrc.Top() + nHeight;
+ tools::Long nDstY = aRectDst.Top();
if( pReadAcc->HasPalette() && pWriteAcc->HasPalette() )
{
@@ -598,30 +598,30 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
for( sal_uInt16 i = 0; i < nCount; i++ )
pMap[ i ] = static_cast<sal_uInt8>(pWriteAcc->GetBestPaletteIndex( pReadAcc->GetPaletteColor( i ) ));
- for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
+ for( tools::Long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nDstY);
Scanline pScanlineRead = pReadAcc->GetScanline(nSrcY);
- for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
+ for( tools::Long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
pWriteAcc->SetPixelOnData( pScanline, nDstX, BitmapColor( pMap[ pReadAcc->GetIndexFromData( pScanlineRead, nSrcX ) ] ));
}
}
else if( pReadAcc->HasPalette() )
{
- for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
+ for( tools::Long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nDstY);
Scanline pScanlineRead = pReadAcc->GetScanline(nSrcY);
- for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
+ for( tools::Long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
pWriteAcc->SetPixelOnData( pScanline, nDstX, pReadAcc->GetPaletteColor( pReadAcc->GetIndexFromData( pScanlineRead, nSrcX ) ) );
}
}
else
- for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
+ for( tools::Long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nDstY);
Scanline pScanlineRead = pReadAcc->GetScanline(nSrcY);
- for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
+ for( tools::Long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
pWriteAcc->SetPixelOnData( pScanline, nDstX, pReadAcc->GetPixelFromData( pScanlineRead, nSrcX ) );
}
@@ -645,54 +645,54 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
if( pWriteAcc )
{
- const long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcX = aRectSrc.Left();
- const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1;
- const long nSrcEndY1 = nSrcY + nHeight - 1;
- const long nDstX = aRectDst.Left();
- const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1;
- const long nDstEndY1 = nDstY + nHeight - 1;
+ const tools::Long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const tools::Long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const tools::Long nSrcX = aRectSrc.Left();
+ const tools::Long nSrcY = aRectSrc.Top();
+ const tools::Long nSrcEndX1 = nSrcX + nWidth - 1;
+ const tools::Long nSrcEndY1 = nSrcY + nHeight - 1;
+ const tools::Long nDstX = aRectDst.Left();
+ const tools::Long nDstY = aRectDst.Top();
+ const tools::Long nDstEndX1 = nDstX + nWidth - 1;
+ const tools::Long nDstEndY1 = nDstY + nHeight - 1;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
- for( long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
+ for( tools::Long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
+ for( tools::Long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
else if( ( nDstX <= nSrcX ) && ( nDstY >= nSrcY ) )
{
- for( long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
+ for( tools::Long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
+ for( tools::Long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
else if( ( nDstX >= nSrcX ) && ( nDstY <= nSrcY ) )
{
- for( long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
+ for( tools::Long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
+ for( tools::Long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
else
{
- for( long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
+ for( tools::Long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
+ for( tools::Long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
@@ -738,17 +738,17 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
if( pWriteAcc )
{
- const long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcEndX = aRectSrc.Left() + nWidth;
- const long nSrcEndY = aRectSrc.Top() + nHeight;
- long nDstY = aRectDst.Top();
+ const tools::Long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const tools::Long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const tools::Long nSrcEndX = aRectSrc.Left() + nWidth;
+ const tools::Long nSrcEndY = aRectSrc.Top() + nHeight;
+ tools::Long nDstY = aRectDst.Top();
- for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++)
+ for( tools::Long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nDstY);
Scanline pScanlineRead = pReadAcc->GetScanline(nSrcY);
- for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
+ for( tools::Long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
pWriteAcc->SetPixelOnData( pScanline, nDstX, pReadAcc->GetPixelFromData( pScanlineRead, nSrcX ) );
}
@@ -772,54 +772,54 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
if( pWriteAcc )
{
- const long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcX = aRectSrc.Left();
- const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1;
- const long nSrcEndY1 = nSrcY + nHeight - 1;
- const long nDstX = aRectDst.Left();
- const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1;
- const long nDstEndY1 = nDstY + nHeight - 1;
+ const tools::Long nWidth = std::min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const tools::Long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const tools::Long nSrcX = aRectSrc.Left();
+ const tools::Long nSrcY = aRectSrc.Top();
+ const tools::Long nSrcEndX1 = nSrcX + nWidth - 1;
+ const tools::Long nSrcEndY1 = nSrcY + nHeight - 1;
+ const tools::Long nDstX = aRectDst.Left();
+ const tools::Long nDstY = aRectDst.Top();
+ const tools::Long nDstEndX1 = nDstX + nWidth - 1;
+ const tools::Long nDstEndY1 = nDstY + nHeight - 1;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
- for( long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
+ for( tools::Long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
+ for( tools::Long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
else if( ( nDstX <= nSrcX ) && ( nDstY >= nSrcY ) )
{
- for( long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
+ for( tools::Long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
+ for( tools::Long nX = nSrcX, nXN = nDstX; nX <= nSrcEndX1; nX++, nXN++ )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
else if( ( nDstX >= nSrcX ) && ( nDstY <= nSrcY ) )
{
- for( long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
+ for( tools::Long nY = nSrcY, nYN = nDstY; nY <= nSrcEndY1; nY++, nYN++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
+ for( tools::Long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
else
{
- for( long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
+ for( tools::Long nY = nSrcEndY1, nYN = nDstEndY1; nY >= nSrcY; nY--, nYN-- )
{
Scanline pScanline = pWriteAcc->GetScanline(nYN);
Scanline pScanlineSrc = pWriteAcc->GetScanline(nY);
- for( long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
+ for( tools::Long nX = nSrcEndX1, nXN = nDstEndX1; nX >= nSrcX; nX--, nXN-- )
pWriteAcc->SetPixelOnData( pScanline, nXN, pWriteAcc->GetPixelFromData( pScanlineSrc, nX ) );
}
}
@@ -842,8 +842,8 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
if( nDX || nDY )
{
const Size aSizePixel( GetSizePixel() );
- const long nWidth = aSizePixel.Width();
- const long nHeight = aSizePixel.Height();
+ const tools::Long nWidth = aSizePixel.Width();
+ const tools::Long nHeight = aSizePixel.Height();
const Size aNewSize( nWidth + nDX, nHeight + nDY );
ScopedReadAccess pReadAcc(*this);
@@ -856,12 +856,12 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
if( pWriteAcc )
{
BitmapColor aColor;
- const long nNewX = nWidth;
- const long nNewY = nHeight;
- const long nNewWidth = pWriteAcc->Width();
- const long nNewHeight = pWriteAcc->Height();
- long nX;
- long nY;
+ const tools::Long nNewX = nWidth;
+ const tools::Long nNewY = nHeight;
+ const tools::Long nNewWidth = pWriteAcc->Width();
+ const tools::Long nNewHeight = pWriteAcc->Height();
+ tools::Long nX;
+ tools::Long nY;
if( pInitColor )
aColor = pWriteAcc->GetBestMatchingColor( *pInitColor );
diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx
index 0f4c929480f9..ebc7e1288ef5 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -82,13 +82,13 @@ bool Bitmap::Invert()
}
else
{
- const long nWidth = pAcc->Width();
- const long nHeight = pAcc->Height();
+ const tools::Long nWidth = pAcc->Width();
+ const tools::Long nHeight = pAcc->Height();
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
BitmapColor aBmpColor = pAcc->GetPixelFromData(pScanline, nX);
aBmpColor.Invert();
@@ -117,15 +117,15 @@ bool Bitmap::Mirror(BmpMirrorFlags nMirrorFlags)
if (pAcc)
{
- const long nWidth = pAcc->Width();
- const long nHeight = pAcc->Height();
- const long nWidth1 = nWidth - 1;
- const long nWidth_2 = nWidth >> 1;
+ const tools::Long nWidth = pAcc->Width();
+ const tools::Long nHeight = pAcc->Height();
+ const tools::Long nWidth1 = nWidth - 1;
+ const tools::Long nWidth_2 = nWidth >> 1;
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
- for (long nX = 0, nOther = nWidth1; nX < nWidth_2; nX++, nOther--)
+ for (tools::Long nX = 0, nOther = nWidth1; nX < nWidth_2; nX++, nOther--)
{
const BitmapColor aTemp(pAcc->GetPixelFromData(pScanline, nX));
@@ -144,13 +144,13 @@ bool Bitmap::Mirror(BmpMirrorFlags nMirrorFlags)
if (pAcc)
{
- const long nScanSize = pAcc->GetScanlineSize();
+ const tools::Long nScanSize = pAcc->GetScanlineSize();
std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[nScanSize]);
- const long nHeight = pAcc->Height();
- const long nHeight1 = nHeight - 1;
- const long nHeight_2 = nHeight >> 1;
+ const tools::Long nHeight = pAcc->Height();
+ const tools::Long nHeight1 = nHeight - 1;
+ const tools::Long nHeight_2 = nHeight >> 1;
- for (long nY = 0, nOther = nHeight1; nY < nHeight_2; nY++, nOther--)
+ for (tools::Long nY = 0, nOther = nHeight1; nY < nHeight_2; nY++, nOther--)
{
memcpy(pBuffer.get(), pAcc->GetScanline(nY), nScanSize);
memcpy(pAcc->GetScanline(nY), pAcc->GetScanline(nOther), nScanSize);
@@ -167,16 +167,16 @@ bool Bitmap::Mirror(BmpMirrorFlags nMirrorFlags)
if (pAcc)
{
- const long nWidth = pAcc->Width();
- const long nWidth1 = nWidth - 1;
- const long nHeight = pAcc->Height();
- long nHeight_2 = nHeight >> 1;
+ const tools::Long nWidth = pAcc->Width();
+ const tools::Long nWidth1 = nWidth - 1;
+ const tools::Long nHeight = pAcc->Height();
+ tools::Long nHeight_2 = nHeight >> 1;
- for (long nY = 0, nOtherY = nHeight - 1; nY < nHeight_2; nY++, nOtherY--)
+ for (tools::Long nY = 0, nOtherY = nHeight - 1; nY < nHeight_2; nY++, nOtherY--)
{
Scanline pScanline = pAcc->GetScanline(nY);
Scanline pScanlineOther = pAcc->GetScanline(nOtherY);
- for (long nX = 0, nOtherX = nWidth1; nX < nWidth; nX++, nOtherX--)
+ for (tools::Long nX = 0, nOtherX = nWidth1; nX < nWidth; nX++, nOtherX--)
{
const BitmapColor aTemp(pAcc->GetPixelFromData(pScanline, nX));
@@ -190,7 +190,7 @@ bool Bitmap::Mirror(BmpMirrorFlags nMirrorFlags)
if (nHeight & 1)
{
Scanline pScanline = pAcc->GetScanline(nHeight_2);
- for (long nX = 0, nOtherX = nWidth1, nWidth_2 = nWidth >> 1; nX < nWidth_2;
+ for (tools::Long nX = 0, nOtherX = nWidth1, nWidth_2 = nWidth >> 1; nX < nWidth_2;
nX++, nOtherX--)
{
const BitmapColor aTemp(pAcc->GetPixelFromData(pScanline, nX));
@@ -209,7 +209,7 @@ bool Bitmap::Mirror(BmpMirrorFlags nMirrorFlags)
return bRet;
}
-bool Bitmap::Rotate(long nAngle10, const Color& rFillColor)
+bool Bitmap::Rotate(tools::Long nAngle10, const Color& rFillColor)
{
bool bRet = false;
@@ -237,19 +237,20 @@ bool Bitmap::Rotate(long nAngle10, const Color& rFillColor)
if (pWriteAcc)
{
- const long nWidth = aSizePix.Width();
- const long nWidth1 = nWidth - 1;
- const long nHeight = aSizePix.Height();
- const long nHeight1 = nHeight - 1;
- const long nNewWidth = aNewSizePix.Width();
- const long nNewHeight = aNewSizePix.Height();
+ const tools::Long nWidth = aSizePix.Width();
+ const tools::Long nWidth1 = nWidth - 1;
+ const tools::Long nHeight = aSizePix.Height();
+ const tools::Long nHeight1 = nHeight - 1;
+ const tools::Long nNewWidth = aNewSizePix.Width();
+ const tools::Long nNewHeight = aNewSizePix.Height();
if (nAngle10 == 900)
{
- for (long nY = 0, nOtherX = nWidth1; nY < nNewHeight; nY++, nOtherX--)
+ for (tools::Long nY = 0, nOtherX = nWidth1; nY < nNewHeight;
+ nY++, nOtherX--)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
- for (long nX = 0, nOtherY = 0; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0, nOtherY = 0; nX < nNewWidth; nX++)
{
pWriteAcc->SetPixelOnData(pScanline, nX,
pReadAcc->GetPixel(nOtherY++, nOtherX));
@@ -258,10 +259,10 @@ bool Bitmap::Rotate(long nAngle10, const Color& rFillColor)
}
else if (nAngle10 == 2700)
{
- for (long nY = 0, nOtherX = 0; nY < nNewHeight; nY++, nOtherX++)
+ for (tools::Long nY = 0, nOtherX = 0; nY < nNewHeight; nY++, nOtherX++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
- for (long nX = 0, nOtherY = nHeight1; nX < nNewWidth; nX++)
+ for (tools::Long nX = 0, nOtherY = nHeight1; nX < nNewWidth; nX++)
{
pWriteAcc->SetPixelOnData(pScanline, nX,
pReadAcc->GetPixel(nOtherY--, nOtherX));
@@ -293,14 +294,14 @@ bool Bitmap::Rotate(long nAngle10, const Color& rFillColor)
const double fSinAngle = sin(nAngle10 * F_PI1800);
const double fXMin = aNewBound.Left();
const double fYMin = aNewBound.Top();
- const long nWidth = aSizePix.Width();
- const long nHeight = aSizePix.Height();
- const long nNewWidth = aNewSizePix.Width();
- const long nNewHeight = aNewSizePix.Height();
- long nX;
- long nY;
- long nRotX;
- long nRotY;
+ const tools::Long nWidth = aSizePix.Width();
+ const tools::Long nHeight = aSizePix.Height();
+ const tools::Long nNewWidth = aNewSizePix.Width();
+ const tools::Long nNewHeight = aNewSizePix.Height();
+ tools::Long nX;
+ tools::Long nY;
+ tools::Long nRotX;
+ tools::Long nRotY;
std::unique_ptr<long[]> pCosX(new long[nNewWidth]);
std::unique_ptr<long[]> pSinX(new long[nNewWidth]);
std::unique_ptr<long[]> pCosY(new long[nNewHeight]);
@@ -324,8 +325,8 @@ bool Bitmap::Rotate(long nAngle10, const Color& rFillColor)
for (nY = 0; nY < nNewHeight; nY++)
{
- long nSinY = pSinY[nY];
- long nCosY = pCosY[nY];
+ tools::Long nSinY = pSinY[nY];
+ tools::Long nCosY = pCosY[nY];
Scanline pScanline = pWriteAcc->GetScanline(nY);
for (nX = 0; nX < nNewWidth; nX++)
@@ -390,8 +391,8 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
if (pWriteAcc && pReadAcc)
{
- const long nWidth = pReadAcc->Width();
- const long nHeight = pReadAcc->Height();
+ const tools::Long nWidth = pReadAcc->Width();
+ const tools::Long nHeight = pReadAcc->Height();
const BitmapColor aBlack(pWriteAcc->GetBestMatchingColor(COL_BLACK));
const BitmapColor aWhite(pWriteAcc->GetBestMatchingColor(COL_WHITE));
@@ -405,18 +406,19 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
{
// optimized for 4Bit-MSN/LSN source palette
const sal_uInt8 cTest = aTest.GetIndex();
- const long nShiftInit
+ const tools::Long nShiftInit
= ((pReadAcc->GetScanlineFormat() == ScanlineFormat::N4BitMsnPal) ? 4 : 0);
if (pWriteAcc->GetScanlineFormat() == ScanlineFormat::N1BitMsbPal
&& aWhite.GetIndex() == 1)
{
// optimized for 1Bit-MSB destination palette
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pSrc = pReadAcc->GetScanline(nY);
Scanline pDst = pWriteAcc->GetScanline(nY);
- for (long nX = 0, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4)
+ for (tools::Long nX = 0, nShift = nShiftInit; nX < nWidth;
+ nX++, nShift ^= 4)
{
if (cTest == ((pSrc[nX >> 1] >> nShift) & 0x0f))
pDst[nX >> 3] |= 1 << (7 - (nX & 7));
@@ -427,11 +429,12 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
}
else
{
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pSrc = pReadAcc->GetScanline(nY);
Scanline pDst = pWriteAcc->GetScanline(nY);
- for (long nX = 0, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4)
+ for (tools::Long nX = 0, nShift = nShiftInit; nX < nWidth;
+ nX++, nShift ^= 4)
{
if (cTest == ((pSrc[nX >> 1] >> nShift) & 0x0f))
pWriteAcc->SetPixelOnData(pDst, nX, aWhite);
@@ -451,11 +454,11 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
&& aWhite.GetIndex() == 1)
{
// optimized for 1Bit-MSB destination palette
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pSrc = pReadAcc->GetScanline(nY);
Scanline pDst = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; ++nX)
+ for (tools::Long nX = 0; nX < nWidth; ++nX)
{
if (cTest == pSrc[nX])
pDst[nX >> 3] |= 1 << (7 - (nX & 7));
@@ -466,11 +469,11 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
}
else
{
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pSrc = pReadAcc->GetScanline(nY);
Scanline pDst = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; ++nX)
+ for (tools::Long nX = 0; nX < nWidth; ++nX)
{
if (cTest == pSrc[nX])
pWriteAcc->SetPixelOnData(pDst, nX, aWhite);
@@ -485,13 +488,13 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
&& (pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitLsbPal
|| pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitMsbPal))
{
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pSrc = pReadAcc->GetScanline(nY);
Scanline pDst = pWriteAcc->GetScanline(nY);
assert(pWriteAcc->GetScanlineSize() == pReadAcc->GetScanlineSize());
- const long nScanlineSize = pWriteAcc->GetScanlineSize();
- for (long nX = 0; nX < nScanlineSize; ++nX)
+ const tools::Long nScanlineSize = pWriteAcc->GetScanlineSize();
+ for (tools::Long nX = 0; nX < nScanlineSize; ++nX)
pDst[nX] = ~pSrc[nX];
}
}
@@ -501,11 +504,11 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
// optimized for 8Bit source palette
const sal_uInt8 cTest = aTest.GetIndex();
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pSrc = pReadAcc->GetScanline(nY);
Scanline pDst = pWriteAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; ++nX)
+ for (tools::Long nX = 0; nX < nWidth; ++nX)
{
if (cTest == pSrc[nX])
pDst[nX] = aWhite.GetIndex();
@@ -517,11 +520,11 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
else
{
// not optimized
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; ++nX)
+ for (tools::Long nX = 0; nX < nWidth; ++nX)
{
if (aTest == pReadAcc->GetPixelFromData(pScanlineRead, nX))
pWriteAcc->SetPixelOnData(pScanline, nX, aWhite);
@@ -534,21 +537,21 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
else
{
BitmapColor aCol;
- long nR, nG, nB;
- const long nMinR = MinMax<long>(rTransColor.GetRed() - nTol, 0, 255);
- const long nMaxR = MinMax<long>(rTransColor.GetRed() + nTol, 0, 255);
- const long nMinG = MinMax<long>(rTransColor.GetGreen() - nTol, 0, 255);
- const long nMaxG = MinMax<long>(rTransColor.GetGreen() + nTol, 0, 255);
- const long nMinB = MinMax<long>(rTransColor.GetBlue() - nTol, 0, 255);
- const long nMaxB = MinMax<long>(rTransColor.GetBlue() + nTol, 0, 255);
+ tools::Long nR, nG, nB;
+ const tools::Long nMinR = MinMax<long>(rTransColor.GetRed() - nTol, 0, 255);
+ const tools::Long nMaxR = MinMax<long>(rTransColor.GetRed() + nTol, 0, 255);
+ const tools::Long nMinG = MinMax<long>(rTransColor.GetGreen() - nTol, 0, 255);
+ const tools::Long nMaxG = MinMax<long>(rTransColor.GetGreen() + nTol, 0, 255);
+ const tools::Long nMinB = MinMax<long>(rTransColor.GetBlue() - nTol, 0, 255);
+ const tools::Long nMaxB = MinMax<long>(rTransColor.GetBlue() + nTol, 0, 255);
if (pReadAcc->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aCol = pReadAcc->GetPaletteColor(
pReadAcc->GetIndexFromData(pScanlineRead, nX));
@@ -570,11 +573,11 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aCol = pReadAcc->GetPixelFromData(pScanlineRead, nX);
nR = aCol.GetRed();
@@ -623,20 +626,20 @@ vcl::Region Bitmap::CreateRegion(const Color& rColor, const tools::Rectangle& rR
if (pReadAcc)
{
- const long nLeft = aRect.Left();
- const long nTop = aRect.Top();
- const long nRight = aRect.Right();
- const long nBottom = aRect.Bottom();
+ const tools::Long nLeft = aRect.Left();
+ const tools::Long nTop = aRect.Top();
+ const tools::Long nRight = aRect.Right();
+ const tools::Long nBottom = aRect.Bottom();
const BitmapColor aMatch(pReadAcc->GetBestMatchingColor(rColor));
std::vector<long> aLine;
- long nYStart(nTop);
- long nY(nTop);
+ tools::Long nYStart(nTop);
+ tools::Long nY(nTop);
for (; nY <= nBottom; nY++)
{
std::vector<long> aNewLine;
- long nX(nLeft);
+ tools::Long nX(nLeft);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
for (; nX <= nRight;)
@@ -718,8 +721,8 @@ bool Bitmap::Replace(const Bitmap& rMask, const Color& rReplaceColor)
if (pMaskAcc && pAcc)
{
- const long nWidth = std::min(pMaskAcc->Width(), pAcc->Width());
- const long nHeight = std::min(pMaskAcc->Height(), pAcc->Height());
+ const tools::Long nWidth = std::min(pMaskAcc->Width(), pAcc->Width());
+ const tools::Long nHeight = std::min(pMaskAcc->Height(), pAcc->Height());
const BitmapColor aMaskWhite(pMaskAcc->GetBestMatchingColor(COL_WHITE));
BitmapColor aReplace;
@@ -749,10 +752,10 @@ bool Bitmap::Replace(const Bitmap& rMask, const Color& rReplaceColor)
// Set all entries to false
std::fill(pFlags.get(), pFlags.get() + nMaxColors, false);
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
pFlags[pAcc->GetIndexFromData(pScanline, nX)] = true;
}
@@ -771,11 +774,11 @@ bool Bitmap::Replace(const Bitmap& rMask, const Color& rReplaceColor)
else
aReplace = rReplaceColor;
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
Scanline pScanlineMask = pMaskAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
if (pMaskAcc->GetPixelFromData(pScanlineMask, nX) == aMaskWhite)
pAcc->SetPixelOnData(pScanline, nX, aReplace);
@@ -799,14 +802,14 @@ bool Bitmap::Replace(const AlphaMask& rAlpha, const Color& rMergeColor)
if (pAcc && pAlphaAcc && pNewAcc)
{
BitmapColor aCol;
- const long nWidth = std::min(pAlphaAcc->Width(), pAcc->Width());
- const long nHeight = std::min(pAlphaAcc->Height(), pAcc->Height());
+ const tools::Long nWidth = std::min(pAlphaAcc->Width(), pAcc->Width());
+ const tools::Long nHeight = std::min(pAlphaAcc->Height(), pAcc->Height());
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pNewAcc->GetScanline(nY);
Scanline pScanlineAlpha = pAlphaAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
aCol = pAcc->GetColor(nY, nX);
aCol.Merge(rMergeColor, 255 - pAlphaAcc->GetIndexFromData(pScanlineAlpha, nX));
@@ -860,12 +863,12 @@ bool Bitmap::Replace(const Color& rSearchColor, const Color& rReplaceColor, sal_
if (pAcc)
{
- const long nMinR = MinMax<long>(rSearchColor.GetRed() - nTol, 0, 255);
- const long nMaxR = MinMax<long>(rSearchColor.GetRed() + nTol, 0, 255);
- const long nMinG = MinMax<long>(rSearchColor.GetGreen() - nTol, 0, 255);
- const long nMaxG = MinMax<long>(rSearchColor.GetGreen() + nTol, 0, 255);
- const long nMinB = MinMax<long>(rSearchColor.GetBlue() - nTol, 0, 255);
- const long nMaxB = MinMax<long>(rSearchColor.GetBlue() + nTol, 0, 255);
+ const tools::Long nMinR = MinMax<long>(rSearchColor.GetRed() - nTol, 0, 255);
+ const tools::Long nMaxR = MinMax<long>(rSearchColor.GetRed() + nTol, 0, 255);
+ const tools::Long nMinG = MinMax<long>(rSearchColor.GetGreen() - nTol, 0, 255);
+ const tools::Long nMaxG = MinMax<long>(rSearchColor.GetGreen() + nTol, 0, 255);
+ const tools::Long nMinB = MinMax<long>(rSearchColor.GetBlue() - nTol, 0, 255);
+ const tools::Long nMaxB = MinMax<long>(rSearchColor.GetBlue() + nTol, 0, 255);
if (pAcc->HasPalette())
{
@@ -886,10 +889,10 @@ bool Bitmap::Replace(const Color& rSearchColor, const Color& rReplaceColor, sal_
BitmapColor aCol;
const BitmapColor aReplace(pAcc->GetBestMatchingColor(rReplaceColor));
- for (long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++)
+ for (tools::Long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
- for (long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++)
+ for (tools::Long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++)
{
aCol = pAcc->GetPixelFromData(pScanline, nX);
@@ -987,10 +990,10 @@ bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, sa
for (sal_uLong i = 0; i < nColorCount; i++)
pReplaces[i] = pAcc->GetBestMatchingColor(pReplaceColors[i]);
- for (long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++)
+ for (tools::Long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
- for (long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++)
+ for (tools::Long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++)
{
aCol = pAcc->GetPixelFromData(pScanline, nX);
@@ -1023,8 +1026,8 @@ bool Bitmap::CombineSimple(const Bitmap& rMask, BmpCombine eCombine)
if (pMaskAcc && pAcc)
{
- const long nWidth = std::min(pMaskAcc->Width(), pAcc->Width());
- const long nHeight = std::min(pMaskAcc->Height(), pAcc->Height());
+ const tools::Long nWidth = std::min(pMaskAcc->Width(), pAcc->Width());
+ const tools::Long nHeight = std::min(pMaskAcc->Height(), pAcc->Height());
const Color aColBlack(COL_BLACK);
const BitmapColor aWhite(pAcc->GetBestMatchingColor(COL_WHITE));
const BitmapColor aBlack(pAcc->GetBestMatchingColor(aColBlack));
@@ -1034,11 +1037,11 @@ bool Bitmap::CombineSimple(const Bitmap& rMask, BmpCombine eCombine)
{
case BmpCombine::And:
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
Scanline pScanlineMask = pMaskAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
if (pMaskAcc->GetPixelFromData(pScanlineMask, nX) != aMaskBlack
&& pAcc->GetPixelFromData(pScanline, nX) != aBlack)
@@ -1056,11 +1059,11 @@ bool Bitmap::CombineSimple(const Bitmap& rMask, BmpCombine eCombine)
case BmpCombine::Or:
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pAcc->GetScanline(nY);
Scanline pScanlineMask = pMaskAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
if (pMaskAcc->GetPixelFromData(pScanlineMask, nX) != aMaskBlack
|| pAcc->GetPixelFromData(pScanline, nX) != aBlack)
@@ -1099,14 +1102,14 @@ bool Bitmap::Blend(const AlphaMask& rAlpha, const Color& rBackgroundColor)
if (pAlphaAcc && pAcc)
{
- const long nWidth = std::min(pAlphaAcc->Width(), pAcc->Width());
- const long nHeight = std::min(pAlphaAcc->Height(), pAcc->Height());
+ const tools::Long nWidth = std::min(pAlphaAcc->Width(), pAcc->Width());
+ const tools::Long nHeight = std::min(pAlphaAcc->Height(), pAcc->Height());
- for (long nY = 0; nY < nHeight; ++nY)
+ for (tools::Long nY = 0; nY < nHeight; ++nY)
{
Scanline pScanline = pAcc->GetScanline(nY);
Scanline pScanlineAlpha = pAlphaAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; ++nX)
+ for (tools::Long nX = 0; nX < nWidth; ++nX)
{
BitmapColor aBmpColor = pAcc->GetPixelFromData(pScanline, nX);
aBmpColor.Merge(rBackgroundColor,
diff --git a/vcl/source/bitmap/salbmp.cxx b/vcl/source/bitmap/salbmp.cxx
index eae8aadc5d0e..8393df96f47d 100644
--- a/vcl/source/bitmap/salbmp.cxx
+++ b/vcl/source/bitmap/salbmp.cxx
@@ -79,12 +79,12 @@ void SalBitmap::updateChecksum() const
if( pBuf->mnScanlineSize == lineBitsCount / 8 )
nCrc = vcl_get_checksum(nCrc, pBuf->mpBits, pBuf->mnScanlineSize * pBuf->mnHeight);
else // Do not include padding with undefined content in the checksum.
- for( long y = 0; y < pBuf->mnHeight; ++y )
+ for( tools::Long y = 0; y < pBuf->mnHeight; ++y )
nCrc = scanlineChecksum(nCrc, pBuf->mpBits + y * pBuf->mnScanlineSize, lineBitsCount, extraBitsMask);
}
else // Compute checksum in the order of scanlines, to make it consistent between different bitmap implementations.
{
- for( long y = pBuf->mnHeight - 1; y >= 0; --y )
+ for( tools::Long y = pBuf->mnHeight - 1; y >= 0; --y )
nCrc = scanlineChecksum(nCrc, pBuf->mpBits + y * pBuf->mnScanlineSize, lineBitsCount, extraBitsMask);
}
pThis->ReleaseBuffer(pBuf, BitmapAccessMode::Read);
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index f96f8c0a57c4..45e4876a11ae 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -75,7 +75,7 @@ public:
ImplCommonButtonData();
tools::Rectangle maFocusRect;
- long mnSeparatorX;
+ tools::Long mnSeparatorX;
DrawButtonFlags mnButtonState;
bool mbSmallSymbol;
@@ -158,12 +158,12 @@ ImageAlign Button::GetImageAlign() const
return mpButtonData->meImageAlign;
}
-long Button::ImplGetSeparatorX() const
+tools::Long Button::ImplGetSeparatorX() const
{
return mpButtonData->mnSeparatorX;
}
-void Button::ImplSetSeparatorX( long nX )
+void Button::ImplSetSeparatorX( tools::Long nX )
{
mpButtonData->mnSeparatorX = nX;
}
@@ -239,7 +239,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
Point aImagePos = rPos;
Point aTextPos = rPos;
tools::Rectangle aUnion(aImagePos, aImageSize);
- long nSymbolHeight = 0;
+ tools::Long nSymbolHeight = 0;
if (bDrawText || bHasSymbol)
{
@@ -304,7 +304,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
if (bAddImageSep && bDrawImage)
{
- long nDiff = (aImageSize.Height() - aTextSize.Height()) / 3;
+ tools::Long nDiff = (aImageSize.Height() - aTextSize.Height()) / 3;
if (nDiff > 0)
nImageSep += nDiff;
}
@@ -378,8 +378,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
// Now place the combination of text and image in the output area of the button
// according to the window style (WinBits)
- long nXOffset = 0;
- long nYOffset = 0;
+ tools::Long nXOffset = 0;
+ tools::Long nYOffset = 0;
if (nWinStyle & WB_CENTER)
{
@@ -816,11 +816,11 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice *pDev, DrawFlags nDrawFl
if ( mnDDStyle == PushButtonDropdownStyle::MenuButton ||
mnDDStyle == PushButtonDropdownStyle::SplitMenuButton )
{
- long nSeparatorX = 0;
+ tools::Long nSeparatorX = 0;
tools::Rectangle aSymbolRect = aInRect;
// calculate symbol size
- long nSymbolSize = pDev->GetTextHeight() / 2 + 1;
+ tools::Long nSymbolSize = pDev->GetTextHeight() / 2 + 1;
nSeparatorX = aInRect.Right() - 2*nSymbolSize;
aSize.AdjustWidth( -(2*nSymbolSize) );
@@ -832,7 +832,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice *pDev, DrawFlags nDrawFl
ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep,
nTextStyle, nullptr, true );
- long nDistance = (aSymbolRect.GetHeight() > 10) ? 2 : 1;
+ tools::Long nDistance = (aSymbolRect.GetHeight() > 10) ? 2 : 1;
DecorationView aDecoView( pDev );
if( bMenuBtnSep && nSeparatorX > 0 )
{
@@ -1574,7 +1574,7 @@ Size PushButton::CalcMinimumSize() const
if( mnDDStyle == PushButtonDropdownStyle::MenuButton ||
mnDDStyle == PushButtonDropdownStyle::SplitMenuButton )
{
- long nSymbolSize = GetTextHeight() / 2 + 1;
+ tools::Long nSymbolSize = GetTextHeight() / 2 + 1;
aSize.AdjustWidth(2*nSymbolSize );
}
if (!PushButton::GetText().isEmpty())
@@ -1582,7 +1582,7 @@ Size PushButton::CalcMinimumSize() const
Size textSize = GetTextRect( tools::Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( DrawFlags::NONE ) ).GetSize();
aSize.AdjustWidth(textSize.Width() );
- aSize.setHeight( std::max( aSize.Height(), long( textSize.Height() * 1.15 ) ) );
+ aSize.setHeight( std::max( aSize.Height(), tools::Long( textSize.Height() * 1.15 ) ) );
}
// cf. ImplDrawPushButton ...
@@ -1972,7 +1972,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
{
DrawTextFlags nTextStyle = Button::ImplGetTextStyle( nWinStyle, nDrawFlags );
- const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
+ const tools::Long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
Size aSize( rSize );
Point aPos( rPos );
aPos.AdjustX(rImageSize.Width() + nImageSep );
@@ -2033,8 +2033,8 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
bool bTopImage = (nWinStyle & WB_TOP) != 0;
Size aImageSize = maImage.GetSizePixel();
tools::Rectangle aImageRect( rPos, rSize );
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetCtrlTextWidth( aText );
+ tools::Long nTextHeight = pDev->GetTextHeight();
+ tools::Long nTextWidth = pDev->GetCtrlTextWidth( aText );
// calculate position and sizes
if (!aText.isEmpty())
@@ -2394,8 +2394,8 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos,
aImageSize, aStateRect, aMouseRect );
Point aCenterPos = aStateRect.Center();
- long nRadX = aImageSize.Width()/2;
- long nRadY = aImageSize.Height()/2;
+ tools::Long nRadX = aImageSize.Width()/2;
+ tools::Long nRadY = aImageSize.Height()/2;
pDev->SetLineColor();
pDev->SetFillColor( COL_BLACK );
@@ -2625,7 +2625,7 @@ void RadioButton::Check( bool bCheck )
Toggle();
}
-long RadioButton::ImplGetImageToTextDistance() const
+tools::Long RadioButton::ImplGetImageToTextDistance() const
{
// 4 pixels, but take zoom into account, so the text doesn't "jump" relative to surrounding elements,
// which might have been aligned with the text of the check box
@@ -2781,7 +2781,7 @@ void RadioButton::ImplAdjustNWFSizes()
Pop();
}
-Size RadioButton::CalcMinimumSize(long nMaxWidth) const
+Size RadioButton::CalcMinimumSize(tools::Long nMaxWidth) const
{
Size aSize;
if ( !maImage )
@@ -2987,7 +2987,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
{
DrawTextFlags nTextStyle = Button::ImplGetTextStyle( nWinStyle, nDrawFlags );
- const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
+ const tools::Long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
Size aSize( rSize );
Point aPos( rPos );
aPos.AdjustX(rImageSize.Width() + nImageSep );
@@ -3200,7 +3200,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos,
Size aImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode );
Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode );
Size aBrd2Size = pDev->LogicToPixel( Size( 30, 30 ), aResMapMode );
- long nCheckWidth = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ).Width();
+ tools::Long nCheckWidth = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ).Width();
vcl::Font aFont = GetDrawPixelFont( pDev );
tools::Rectangle aStateRect;
tools::Rectangle aMouseRect;
@@ -3263,8 +3263,8 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos,
Point aTempPos21( aPos21 );
Point aTempPos22( aPos22 );
pDev->SetLineColor( COL_BLACK );
- long nDX = 0;
- for ( long i = 0; i < nCheckWidth; i++ )
+ tools::Long nDX = 0;
+ for ( tools::Long i = 0; i < nCheckWidth; i++ )
{
if ( !(i % 2) )
{
@@ -3465,7 +3465,7 @@ void CheckBox::EnableTriState( bool bTriState )
}
}
-long CheckBox::ImplGetImageToTextDistance() const
+tools::Long CheckBox::ImplGetImageToTextDistance() const
{
// 4 pixels, but take zoom into account, so the text doesn't "jump" relative to surrounding elements,
// which might have been aligned with the text of the check box
@@ -3605,7 +3605,7 @@ void CheckBox::ImplAdjustNWFSizes()
Pop();
}
-Size CheckBox::CalcMinimumSize( long nMaxWidth ) const
+Size CheckBox::CalcMinimumSize( tools::Long nMaxWidth ) const
{
Size aSize = ImplGetCheckImageSize();
nMaxWidth -= aSize.Width();
diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx
index 3913e617a4ea..5b6ae6e7262f 100644
--- a/vcl/source/control/calendar.cxx
+++ b/vcl/source/control/calendar.cxx
@@ -201,8 +201,8 @@ void Calendar::ImplFormat()
if ( (aOutSize.Width() <= 1) || (aOutSize.Height() <= 1) )
return;
- long n99TextWidth = GetTextWidth( "99" );
- long nTextHeight = GetTextHeight();
+ tools::Long n99TextWidth = GetTextWidth( "99" );
+ tools::Long nTextHeight = GetTextHeight();
// calculate width and x-position
mnDayWidth = n99TextWidth+DAY_OFFX;
@@ -211,7 +211,7 @@ void Calendar::ImplFormat()
mnMonthPerLine = aOutSize.Width() / mnMonthWidth;
if ( !mnMonthPerLine )
mnMonthPerLine = 1;
- long nOver = (aOutSize.Width()-(mnMonthPerLine*mnMonthWidth)) / mnMonthPerLine;
+ tools::Long nOver = (aOutSize.Width()-(mnMonthPerLine*mnMonthWidth)) / mnMonthPerLine;
mnMonthWidth += nOver;
mnDaysOffX = MONTH_BORDERX;
mnDaysOffX += nOver/2;
@@ -228,7 +228,7 @@ void Calendar::ImplFormat()
mnMonthHeight += (aOutSize.Height()-(mnLines*mnMonthHeight)) / mnLines;
// calculate spinfields
- long nSpinSize = nTextHeight+TITLE_BORDERY-SPIN_OFFY;
+ tools::Long nSpinSize = nTextHeight+TITLE_BORDERY-SPIN_OFFY;
maPrevRect.SetLeft( SPIN_OFFX );
maPrevRect.SetTop( SPIN_OFFY );
maPrevRect.SetRight( maPrevRect.Left()+nSpinSize );
@@ -240,14 +240,14 @@ void Calendar::ImplFormat()
// Calculate DayOfWeekText (gets displayed in a narrow font)
maDayOfWeekText.clear();
- long nStartOffX = 0;
+ tools::Long nStartOffX = 0;
sal_Int16 nDay = maCalendarWrapper.getFirstDayOfWeek();
for ( sal_Int16 nDayOfWeek = 0; nDayOfWeek < 7; nDayOfWeek++ )
{
// Use narrow name.
OUString aDayOfWeek( maCalendarWrapper.getDisplayName(
i18n::CalendarDisplayIndex::DAY, nDay, 2));
- long nOffX = (mnDayWidth-GetTextWidth( aDayOfWeek ))/2;
+ tools::Long nOffX = (mnDayWidth-GetTextWidth( aDayOfWeek ))/2;
if ( !nDayOfWeek )
nStartOffX = nOffX;
else
@@ -335,21 +335,21 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
else if ( maNextRect.IsInside( rPos ) )
return CALENDAR_HITTEST_NEXT;
- long nY;
- long nOffX;
+ tools::Long nY;
+ tools::Long nOffX;
sal_Int32 nDay;
DayOfWeek eStartDay = ImplGetWeekStart();
rDate = GetFirstMonth();
nY = 0;
- for ( long i = 0; i < mnLines; i++ )
+ for ( tools::Long i = 0; i < mnLines; i++ )
{
if ( rPos.Y() < nY )
return 0;
- long nX = 0;
- long nYMonth = nY+mnMonthHeight;
- for ( long j = 0; j < mnMonthPerLine; j++ )
+ tools::Long nX = 0;
+ tools::Long nYMonth = nY+mnMonthHeight;
+ for ( tools::Long j = 0; j < mnMonthPerLine; j++ )
{
if ( (rPos.X() < nX) && (rPos.Y() < nYMonth) )
return 0;
@@ -364,8 +364,8 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
return CALENDAR_HITTEST_MONTHTITLE;
else
{
- long nDayX = nX+mnDaysOffX;
- long nDayY = nY+mnDaysOffY;
+ tools::Long nDayX = nX+mnDaysOffX;
+ tools::Long nDayY = nY+mnDaysOffY;
if ( rPos.Y() < nDayY )
return 0;
sal_Int32 nDayIndex = static_cast<sal_Int32>(rDate.GetDayOfWeek());
@@ -457,11 +457,11 @@ namespace
void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bPrev)
{
- long i;
- long n;
- long nLines;
- long nHeight = rRect.GetHeight();
- long nWidth = rRect.GetWidth();
+ tools::Long i;
+ tools::Long n;
+ tools::Long nLines;
+ tools::Long nHeight = rRect.GetHeight();
+ tools::Long nWidth = rRect.GetWidth();
if (nWidth < nHeight)
n = nWidth;
else
@@ -519,7 +519,7 @@ void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext )
}
void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext,
- long nX, long nY,
+ tools::Long nX, tools::Long nY,
sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear,
bool bOther, sal_Int32 nToday )
{
@@ -561,8 +561,8 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext,
}
// display text
- long nTextX = nX + (mnDayWidth - GetTextWidth(rDay)) - (DAY_OFFX / 2);
- long nTextY = nY + (mnDayHeight - GetTextHeight()) / 2;
+ tools::Long nTextX = nX + (mnDayWidth - GetTextWidth(rDay)) - (DAY_OFFX / 2);
+ tools::Long nTextY = nY + (mnDayHeight - GetTextHeight()) / 2;
if (pTextColor)
{
Color aOldColor = rRenderContext.GetTextColor();
@@ -599,13 +599,13 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
Size aOutSize(GetOutputSizePixel());
- long i;
- long j;
- long nY;
- long nDeltaX;
- long nDeltaY;
- long nDayX;
- long nDayY;
+ tools::Long i;
+ tools::Long j;
+ tools::Long nY;
+ tools::Long nDeltaX;
+ tools::Long nDeltaY;
+ tools::Long nDayX;
+ tools::Long nDayY;
sal_Int32 nToday = Date(Date::SYSTEM).GetDate();
sal_uInt16 nDay;
sal_uInt16 nMonth;
@@ -651,7 +651,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
rRenderContext.DrawLine(aSepPos1, aSepPos2);
}
- long nX = 0;
+ tools::Long nX = 0;
for (j = 0; j < mnMonthPerLine; j++)
{
nMonth = aDate.GetMonth();
@@ -663,9 +663,9 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
OUString aMonthText = maCalendarWrapper.getDisplayName(i18n::CalendarDisplayIndex::MONTH, nMonth - 1, 1)
+ " "
+ OUString::number(nYear);
- long nMonthTextWidth = rRenderContext.GetTextWidth(aMonthText);
- long nMonthOffX1 = 0;
- long nMonthOffX2 = 0;
+ tools::Long nMonthTextWidth = rRenderContext.GetTextWidth(aMonthText);
+ tools::Long nMonthOffX1 = 0;
+ tools::Long nMonthOffX2 = 0;
if (i == 0)
{
if (j == 0)
@@ -673,7 +673,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
if (j == mnMonthPerLine - 1)
nMonthOffX2 = aOutSize.Width() - maNextRect.Left() + 1;
}
- long nMaxMonthWidth = mnMonthWidth - nMonthOffX1 - nMonthOffX2 - 4;
+ tools::Long nMaxMonthWidth = mnMonthWidth - nMonthOffX1 - nMonthOffX2 - 4;
if (nMonthTextWidth > nMaxMonthWidth)
{
// Abbreviated month name.
@@ -682,7 +682,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
+ OUString::number(nYear);
nMonthTextWidth = rRenderContext.GetTextWidth(aMonthText);
}
- long nTempOff = (mnMonthWidth - nMonthTextWidth + 1) / 2;
+ tools::Long nTempOff = (mnMonthWidth - nMonthTextWidth + 1) / 2;
if (nTempOff < nMonthOffX1)
nDeltaX += nMonthOffX1 + 1;
else
@@ -1212,7 +1212,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData->GetMode() == CommandWheelMode::SCROLL )
{
- long nNotchDelta = pData->GetNotchDelta();
+ tools::Long nNotchDelta = pData->GetNotchDelta();
if ( nNotchDelta < 0 )
{
while ( nNotchDelta < 0 )
@@ -1296,7 +1296,7 @@ void Calendar::SetCurDate( const Date& rNewDate )
else if ( maCurDate > GetLastMonth() )
{
Date aTempDate = GetLastMonth();
- long nDateOff = maCurDate-aTempDate;
+ tools::Long nDateOff = maCurDate-aTempDate;
if ( nDateOff < 365 )
{
Date aFirstDate = GetFirstMonth();
@@ -1385,8 +1385,8 @@ tools::Rectangle Calendar::GetDateRect( const Date& rDate ) const
if ( mbFormat || (rDate < maFirstDate) || (rDate > (maFirstDate+mnDayCount)) )
return aRect;
- long nX;
- long nY;
+ tools::Long nX;
+ tools::Long nY;
sal_Int32 nDaysOff;
sal_uInt16 nDayIndex;
Date aDate = GetFirstMonth();
@@ -1433,10 +1433,10 @@ tools::Rectangle Calendar::GetDateRect( const Date& rDate ) const
}
nY = 0;
- for ( long i = 0; i < mnLines; i++ )
+ for ( tools::Long i = 0; i < mnLines; i++ )
{
nX = 0;
- for ( long j = 0; j < mnMonthPerLine; j++ )
+ for ( tools::Long j = 0; j < mnMonthPerLine; j++ )
{
sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth();
@@ -1444,8 +1444,8 @@ tools::Rectangle Calendar::GetDateRect( const Date& rDate ) const
if ( (aDate.GetMonth() == rDate.GetMonth()) &&
(aDate.GetYear() == rDate.GetYear()) )
{
- long nDayX = nX+mnDaysOffX;
- long nDayY = nY+mnDaysOffY;
+ tools::Long nDayX = nX+mnDaysOffX;
+ tools::Long nDayY = nY+mnDaysOffY;
nDayIndex = static_cast<sal_uInt16>(aDate.GetDayOfWeek());
nDayIndex = (nDayIndex+(7-static_cast<sal_uInt16>(ImplGetWeekStart()))) % 7;
for ( sal_uInt16 nDay = 1; nDay <= nDaysInMonth; nDay++ )
@@ -1494,8 +1494,8 @@ void Calendar::EndSelection()
Size Calendar::CalcWindowSizePixel() const
{
Size aSize;
- long n99TextWidth = GetTextWidth( "99" );
- long nTextHeight = GetTextHeight();
+ tools::Long n99TextWidth = GetTextWidth( "99" );
+ tools::Long nTextHeight = GetTextHeight();
aSize.AdjustWidth((n99TextWidth+DAY_OFFX)*7);
aSize.AdjustWidth(MONTH_BORDERX*2 );
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index b5b14d833d9d..188df87a4d9c 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -168,7 +168,7 @@ void ComboBox::ImplCalcEditHeight()
aControlValue,
aBoundRegion, aContentRegion ) )
{
- const long nNCHeight = aBoundRegion.GetHeight();
+ const tools::Long nNCHeight = aBoundRegion.GetHeight();
if (m_pImpl->m_nDDHeight < nNCHeight)
m_pImpl->m_nDDHeight = sal::static_int_cast<sal_uInt16>(nNCHeight);
}
@@ -552,7 +552,7 @@ sal_uInt16 ComboBox::GetDropDownLineCount() const
return nLines;
}
-void ComboBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight,
+void ComboBox::setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags )
{
if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) )
@@ -996,9 +996,9 @@ Size ComboBox::GetOptimalSize() const
return CalcMinimumSize();
}
-long ComboBox::getMaxWidthScrollBarAndDownButton() const
+tools::Long ComboBox::getMaxWidthScrollBarAndDownButton() const
{
- long nButtonDownWidth = 0;
+ tools::Long nButtonDownWidth = 0;
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
ImplControlValue aControlValue;
@@ -1013,7 +1013,7 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const
nButtonDownWidth = aContent.getWidth();
}
- long nScrollBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nScrollBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
return std::max(nScrollBarWidth, nButtonDownWidth);
}
@@ -1042,7 +1042,7 @@ Size ComboBox::CalcMinimumSize() const
if (m_pImpl->m_nMaxWidthChars != -1)
{
- long nMaxWidth = m_pImpl->m_nMaxWidthChars * approximate_char_width();
+ tools::Long nMaxWidth = m_pImpl->m_nMaxWidthChars * approximate_char_width();
aSz.setWidth( std::min(aSz.Width(), nMaxWidth) );
}
@@ -1067,8 +1067,8 @@ Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const
aSz.AdjustHeight( -(nTop+nBottom) );
if ( !IsDropDownBox() )
{
- long nEntryHeight = CalcBlockSize( 1, 1 ).Height();
- long nLines = aSz.Height() / nEntryHeight;
+ tools::Long nEntryHeight = CalcBlockSize( 1, 1 ).Height();
+ tools::Long nLines = aSz.Height() / nEntryHeight;
if ( nLines < 1 )
nLines = 1;
aSz.setHeight( nLines * nEntryHeight );
@@ -1124,14 +1124,14 @@ Size ComboBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
return aSz;
}
-long ComboBox::GetDropDownEntryHeight() const
+tools::Long ComboBox::GetDropDownEntryHeight() const
{
return m_pImpl->m_pImplLB->GetEntryHeight();
}
void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
- long nCharWidth = GetTextWidth(OUString(u'x'));
+ tools::Long nCharWidth = GetTextWidth(OUString(u'x'));
if ( !IsDropDownBox() )
{
Size aOutSz = m_pImpl->m_pImplLB->GetMainWindow()->GetOutputSizePixel();
@@ -1182,9 +1182,9 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags )
// contents
if ( !IsDropDownBox() )
{
- long nOnePixel = GetDrawPixel( pDev, 1 );
- long nTextHeight = pDev->GetTextHeight();
- long nEditHeight = nTextHeight + 6*nOnePixel;
+ tools::Long nOnePixel = GetDrawPixel( pDev, 1 );
+ tools::Long nTextHeight = pDev->GetTextHeight();
+ tools::Long nEditHeight = nTextHeight + 6*nOnePixel;
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
// First, draw the edit part
@@ -1404,13 +1404,13 @@ void ComboBox::SetBorderStyle( WindowBorderStyle nBorderStyle )
}
}
-long ComboBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
+tools::Long ComboBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
// check whether rPoint fits at all
- long nIndex = Control::GetIndexForPoint( rPoint );
+ tools::Long nIndex = Control::GetIndexForPoint( rPoint );
if( nIndex != -1 )
{
// point must be either in main list window
@@ -1443,8 +1443,8 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
{
ComboBoxBounds aBounds;
- long nTop = 0;
- long nBottom = rOutSz.Height();
+ tools::Long nTop = 0;
+ tools::Long nBottom = rOutSz.Height();
vcl::Window *pBorder = m_rThis.GetWindow( GetWindowType::Border );
ImplControlValue aControlValue;
@@ -1483,7 +1483,7 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
}
else
{
- long nSBWidth = m_rThis.GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nSBWidth = m_rThis.GetSettings().GetStyleSettings().GetScrollBarSize();
nSBWidth = m_rThis.CalcZoom( nSBWidth );
aBounds.aSubEditSize = Size(rOutSz.Width() - nSBWidth, rOutSz.Height());
aBounds.aButtonPos = Point(rOutSz.Width() - nSBWidth, nTop);
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index dc8f2d7a9e85..779b90927317 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -102,22 +102,22 @@ ControlLayoutData::ControlLayoutData() : m_pParent( nullptr )
{
}
-tools::Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const
+tools::Rectangle ControlLayoutData::GetCharacterBounds( tools::Long nIndex ) const
{
- return (nIndex >= 0 && nIndex < static_cast<long>(m_aUnicodeBoundRects.size())) ? m_aUnicodeBoundRects[ nIndex ] : tools::Rectangle();
+ return (nIndex >= 0 && nIndex < static_cast<tools::Long>(m_aUnicodeBoundRects.size())) ? m_aUnicodeBoundRects[ nIndex ] : tools::Rectangle();
}
-tools::Rectangle Control::GetCharacterBounds( long nIndex ) const
+tools::Rectangle Control::GetCharacterBounds( tools::Long nIndex ) const
{
if( !HasLayoutData() )
FillLayoutData();
return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : tools::Rectangle();
}
-long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const
+tools::Long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const
{
- long nIndex = -1;
- for( long i = m_aUnicodeBoundRects.size()-1; i >= 0; i-- )
+ tools::Long nIndex = -1;
+ for( tools::Long i = m_aUnicodeBoundRects.size()-1; i >= 0; i-- )
{
Point aTopLeft = m_aUnicodeBoundRects[i].TopLeft();
Point aBottomRight = m_aUnicodeBoundRects[i].BottomRight();
@@ -131,22 +131,22 @@ long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const
return nIndex;
}
-long Control::GetIndexForPoint( const Point& rPoint ) const
+tools::Long Control::GetIndexForPoint( const Point& rPoint ) const
{
if( ! HasLayoutData() )
FillLayoutData();
return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetIndexForPoint( rPoint ) : -1;
}
-long ControlLayoutData::GetLineCount() const
+tools::Long ControlLayoutData::GetLineCount() const
{
- long nLines = m_aLineIndices.size();
+ tools::Long nLines = m_aLineIndices.size();
if( nLines == 0 && !m_aDisplayText.isEmpty() )
nLines = 1;
return nLines;
}
-Pair ControlLayoutData::GetLineStartEnd( long nLine ) const
+Pair ControlLayoutData::GetLineStartEnd( tools::Long nLine ) const
{
Pair aPair( -1, -1 );
@@ -169,14 +169,14 @@ Pair ControlLayoutData::GetLineStartEnd( long nLine ) const
return aPair;
}
-Pair Control::GetLineStartEnd( long nLine ) const
+Pair Control::GetLineStartEnd( tools::Long nLine ) const
{
if( !HasLayoutData() )
FillLayoutData();
return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetLineStartEnd( nLine ) : Pair( -1, -1 );
}
-long ControlLayoutData::ToRelativeLineIndex( long nIndex ) const
+tools::Long ControlLayoutData::ToRelativeLineIndex( tools::Long nIndex ) const
{
// is the index sensible at all ?
if( nIndex >= 0 && nIndex < m_aDisplayText.getLength() )
@@ -208,7 +208,7 @@ long ControlLayoutData::ToRelativeLineIndex( long nIndex ) const
return nIndex;
}
-long Control::ToRelativeLineIndex( long nIndex ) const
+tools::Long Control::ToRelativeLineIndex( tools::Long nIndex ) const
{
if( !HasLayoutData() )
FillLayoutData();
@@ -277,7 +277,7 @@ void Control::AppendLayoutData( const Control& rSubControl ) const
if( !rSubControl.HasLayoutData() || rSubControl.mpControlData->mpLayoutData->m_aDisplayText.isEmpty() )
return;
- long nCurrentIndex = mpControlData->mpLayoutData->m_aDisplayText.getLength();
+ tools::Long nCurrentIndex = mpControlData->mpLayoutData->m_aDisplayText.getLength();
mpControlData->mpLayoutData->m_aDisplayText += rSubControl.mpControlData->mpLayoutData->m_aDisplayText;
int nLines = rSubControl.mpControlData->mpLayoutData->m_aLineIndices.size();
int n;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a2e3c497e5c7..18f4fb70ee66 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -398,21 +398,21 @@ void Edit::ApplySettings(vcl::RenderContext& rRenderContext)
}
}
-long Edit::ImplGetExtraXOffset() const
+tools::Long Edit::ImplGetExtraXOffset() const
{
// MT 09/2002: nExtraOffsetX should become a member, instead of checking every time,
// but I need an incompatible update for this...
// #94095# Use extra offset only when edit has a border
- long nExtraOffset = 0;
+ tools::Long nExtraOffset = 0;
if( ( GetStyle() & WB_BORDER ) || ( mbIsSubEdit && ( GetParent()->GetStyle() & WB_BORDER ) ) )
nExtraOffset = 2;
return nExtraOffset;
}
-long Edit::ImplGetExtraYOffset() const
+tools::Long Edit::ImplGetExtraYOffset() const
{
- long nExtraOffset = 0;
+ tools::Long nExtraOffset = 0;
ControlType eCtrlType = ImplGetNativeControlType();
if (eCtrlType != ControlType::EditboxNoBorder)
{
@@ -452,7 +452,7 @@ void Edit::ImplInvalidateOrRepaint()
Invalidate();
}
-long Edit::ImplGetTextYPosition() const
+tools::Long Edit::ImplGetTextYPosition() const
{
if ( GetStyle() & WB_TOP )
return ImplGetExtraXOffset();
@@ -471,9 +471,9 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
const OUString aText = ImplGetText();
const sal_Int32 nLen = aText.getLength();
- long nDXBuffer[256];
+ tools::Long nDXBuffer[256];
std::unique_ptr<long[]> pDXBuffer;
- long* pDX = nDXBuffer;
+ tools::Long* pDX = nDXBuffer;
if (nLen)
{
@@ -486,7 +486,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
GetCaretPositions(aText, pDX, 0, nLen);
}
- long nTH = GetTextHeight();
+ tools::Long nTH = GetTextHeight();
Point aPos(mnXOffset, ImplGetTextYPosition());
vcl::Cursor* pCursor = GetCursor();
@@ -976,7 +976,7 @@ ControlType Edit::ImplGetNativeControlType() const
return nCtrl;
}
-void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, long nXStart, long nXEnd )
+void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, tools::Long nXStart, tools::Long nXEnd )
{
/*
* note: at this point the cursor must be switched off already
@@ -1065,11 +1065,11 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
vcl::Cursor* pCursor = GetCursor();
OUString aText = ImplGetText();
- long nTextPos = 0;
+ tools::Long nTextPos = 0;
- long nDXBuffer[256];
+ tools::Long nDXBuffer[256];
std::unique_ptr<long[]> pDXBuffer;
- long* pDX = nDXBuffer;
+ tools::Long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
@@ -1087,21 +1087,21 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
nTextPos = pDX[ 2*aText.getLength()-1 ];
}
- long nCursorWidth = 0;
+ tools::Long nCursorWidth = 0;
if ( !mbInsertMode && !maSelection.Len() && (maSelection.Max() < aText.getLength()) )
nCursorWidth = GetTextWidth(aText, maSelection.Max(), 1);
- long nCursorPosX = nTextPos + mnXOffset + ImplGetExtraXOffset();
+ tools::Long nCursorPosX = nTextPos + mnXOffset + ImplGetExtraXOffset();
// cursor should land in visible area
const Size aOutSize = GetOutputSizePixel();
if ( (nCursorPosX < 0) || (nCursorPosX >= aOutSize.Width()) )
{
- long nOldXOffset = mnXOffset;
+ tools::Long nOldXOffset = mnXOffset;
if ( nCursorPosX < 0 )
{
mnXOffset = - nTextPos;
- long nMaxX = 0;
+ tools::Long nMaxX = 0;
mnXOffset += aOutSize.Width() / 5;
if ( mnXOffset > nMaxX )
mnXOffset = nMaxX;
@@ -1112,7 +1112,7 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
// Something more?
if ( (aOutSize.Width()-ImplGetExtraXOffset()) < nTextPos )
{
- long nMaxNegX = (aOutSize.Width()-ImplGetExtraXOffset()) - GetTextWidth( aText );
+ tools::Long nMaxNegX = (aOutSize.Width()-ImplGetExtraXOffset()) - GetTextWidth( aText );
mnXOffset -= aOutSize.Width() / 5;
if ( mnXOffset < nMaxNegX ) // both negative...
mnXOffset = nMaxNegX;
@@ -1127,8 +1127,8 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
ImplInvalidateOrRepaint();
}
- const long nTextHeight = GetTextHeight();
- const long nCursorPosY = ImplGetTextYPosition();
+ const tools::Long nTextHeight = GetTextHeight();
+ const tools::Long nCursorPosY = ImplGetTextYPosition();
if (pCursor)
{
pCursor->SetPos( Point( nCursorPosX, nCursorPosY ) );
@@ -1145,8 +1145,8 @@ void Edit::ImplAlign()
return;
}
- long nTextWidth = GetTextWidth( ImplGetText() );
- long nOutWidth = GetOutputSizePixel().Width();
+ tools::Long nTextWidth = GetTextWidth( ImplGetText() );
+ tools::Long nOutWidth = GetOutputSizePixel().Width();
if ( mnAlign == EDIT_ALIGN_LEFT )
{
@@ -1155,7 +1155,7 @@ void Edit::ImplAlign()
}
else if ( mnAlign == EDIT_ALIGN_RIGHT )
{
- long nMinXOffset = nOutWidth - nTextWidth - 1 - ImplGetExtraXOffset();
+ tools::Long nMinXOffset = nOutWidth - nTextWidth - 1 - ImplGetExtraXOffset();
bool bRTL = IsRTLEnabled();
if( mbIsSubEdit && GetParent() )
bRTL = GetParent()->IsRTLEnabled();
@@ -1191,9 +1191,9 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
sal_Int32 nIndex = EDIT_NOLIMIT;
OUString aText = ImplGetText();
- long nDXBuffer[256];
+ tools::Long nDXBuffer[256];
std::unique_ptr<long[]> pDXBuffer;
- long* pDX = nDXBuffer;
+ tools::Long* pDX = nDXBuffer;
if( o3tl::make_unsigned(2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
@@ -1201,7 +1201,7 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
}
GetCaretPositions( aText, pDX, 0, aText.getLength() );
- long nX = rWindowPos.X() - mnXOffset - ImplGetExtraXOffset();
+ tools::Long nX = rWindowPos.X() - mnXOffset - ImplGetExtraXOffset();
for (sal_Int32 i = 0; i < aText.getLength(); aText.iterateCodePoints(&i))
{
if( (pDX[2*i] >= nX && pDX[2*i+1] <= nX) ||
@@ -1225,7 +1225,7 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
{
nIndex = 0;
sal_Int32 nFinalIndex = 0;
- long nDiff = std::abs( pDX[0]-nX );
+ tools::Long nDiff = std::abs( pDX[0]-nX );
sal_Int32 i = 0;
if (!aText.isEmpty())
{
@@ -1233,7 +1233,7 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
}
while (i < aText.getLength())
{
- long nNewDiff = std::abs( pDX[2*i]-nX );
+ tools::Long nNewDiff = std::abs( pDX[2*i]-nX );
if( nNewDiff < nDiff )
{
@@ -1786,8 +1786,8 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags )
}
}
- const long nOnePixel = GetDrawPixel( pDev, 1 );
- const long nOffX = 3*nOnePixel;
+ const tools::Long nOnePixel = GetDrawPixel( pDev, 1 );
+ const tools::Long nOffX = 3*nOnePixel;
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
tools::Rectangle aTextRect( aPos, aSize );
@@ -1802,9 +1802,9 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags )
aTextRect.AdjustRight( -nOffX );
OUString aText = ImplGetText();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOffY = (aSize.Height() - nTextHeight) / 2;
+ tools::Long nTextHeight = pDev->GetTextHeight();
+ tools::Long nTextWidth = pDev->GetTextWidth( aText );
+ tools::Long nOffY = (aSize.Height() - nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -2130,9 +2130,9 @@ void Edit::Command( const CommandEvent& rCEvt )
if (mpIMEInfos && mpIMEInfos->nLen > 0)
{
OUString aText = ImplGetText();
- long nDXBuffer[256];
+ tools::Long nDXBuffer[256];
std::unique_ptr<long[]> pDXBuffer;
- long* pDX = nDXBuffer;
+ tools::Long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
@@ -2144,7 +2144,7 @@ void Edit::Command( const CommandEvent& rCEvt )
GetCaretPositions( aText, pDX, 0, aText.getLength() );
}
- long nTH = GetTextHeight();
+ tools::Long nTH = GetTextHeight();
Point aPos( mnXOffset, ImplGetTextYPosition() );
std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ mpIMEInfos->nLen ]);
@@ -2264,8 +2264,8 @@ void Edit::ImplShowDDCursor()
{
if (!mpDDInfo->bVisCursor)
{
- long nTextWidth = GetTextWidth( maText.toString(), 0, mpDDInfo->nDropPos );
- long nTextHeight = GetTextHeight();
+ tools::Long nTextWidth = GetTextWidth( maText.toString(), 0, mpDDInfo->nDropPos );
+ tools::Long nTextHeight = GetTextHeight();
tools::Rectangle aCursorRect( Point( nTextWidth + mnXOffset, (GetOutputSize().Height()-nTextHeight)/2 ), Size( 2, nTextHeight ) );
mpDDInfo->aCursor.SetWindow( this );
mpDDInfo->aCursor.SetPos( aCursorRect.TopLeft() );
@@ -2444,8 +2444,8 @@ void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint )
ImplShowCursor();
bool bCaret = false, bSelection = false;
- long nB=aNew.Max(), nA=aNew.Min(),oB=aTemp.Max(), oA=aTemp.Min();
- long nGap = nB-nA, oGap = oB-oA;
+ tools::Long nB=aNew.Max(), nA=aNew.Min(),oB=aTemp.Max(), oA=aTemp.Min();
+ tools::Long nGap = nB-nA, oGap = oB-oA;
if (nB != oB)
bCaret = true;
if (nGap != 0 || oGap != 0)
@@ -2777,7 +2777,7 @@ void Edit::dragDropEnd( const css::datatransfer::dnd::DragSourceDropEvent& rDSDE
{
if ( aSel.Max() > mpDDInfo->nDropPos )
{
- long nLen = aSel.Len();
+ tools::Long nLen = aSel.Len();
aSel.Min() += nLen;
aSel.Max() += nLen;
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 2f7f08f40f2c..84844174e0af 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1001,7 +1001,7 @@ mm/100 mm cm m km twip point pica inch foot mile
#undef M
#undef K
-static FieldUnit ImplMap2FieldUnit( MapUnit meUnit, long& nDecDigits )
+static FieldUnit ImplMap2FieldUnit( MapUnit meUnit, tools::Long& nDecDigits )
{
switch( meUnit )
{
@@ -1076,7 +1076,7 @@ bool checkConversionUnits(MapUnit eInUnit, FieldUnit eOutUnit)
&& eInUnit != MapUnit::MapRelative;
}
-double convertValue( double nValue, long nDigits, FieldUnit eInUnit, FieldUnit eOutUnit )
+double convertValue( double nValue, tools::Long nDigits, FieldUnit eInUnit, FieldUnit eOutUnit )
{
if ( nDigits < 0 )
{
@@ -1124,7 +1124,7 @@ namespace vcl
return nValue;
}
- long nDecDigits = nDigits;
+ tools::Long nDecDigits = nDigits;
FieldUnit eFieldUnit = ImplMap2FieldUnit( eInUnit, nDecDigits );
// Avoid sal_Int64 <-> double conversion issues if possible:
@@ -1201,7 +1201,7 @@ namespace vcl
return nValue;
}
- long nDecDigits = nDigits;
+ tools::Long nDecDigits = nDigits;
FieldUnit eFieldUnit = ImplMap2FieldUnit( eInUnit, nDecDigits );
return convertValue(nValue, nDecDigits, eFieldUnit, eOutUnit);
@@ -1226,7 +1226,7 @@ namespace vcl
return nValue;
}
- long nDecDigits = nDigits;
+ tools::Long nDecDigits = nDigits;
FieldUnit eFieldUnit = ImplMap2FieldUnit( eOutUnit, nDecDigits );
if ( nDecDigits < 0 )
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 91e001ac9bc9..51688a092564 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -46,8 +46,8 @@ constexpr auto FIXEDIMAGE_VIEW_STYLE = WB_3DLOOK |
static Point ImplCalcPos( WinBits nStyle, const Point& rPos,
const Size& rObjSize, const Size& rWinSize )
{
- long nX;
- long nY;
+ tools::Long nX;
+ tools::Long nY;
if ( nStyle & WB_LEFT )
nX = 0;
@@ -296,7 +296,7 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-Size FixedText::getTextDimensions(Control const *pControl, const OUString &rTxt, long nMaxWidth)
+Size FixedText::getTextDimensions(Control const *pControl, const OUString &rTxt, tools::Long nMaxWidth)
{
DrawTextFlags nStyle = ImplGetTextStyle( pControl->GetStyle() );
if ( !( pControl->GetStyle() & WB_NOLABEL ) )
@@ -306,7 +306,7 @@ Size FixedText::getTextDimensions(Control const *pControl, const OUString &rTxt,
rTxt, nStyle).GetSize();
}
-Size FixedText::CalcMinimumTextSize( Control const *pControl, long nMaxWidth )
+Size FixedText::CalcMinimumTextSize( Control const *pControl, tools::Long nMaxWidth )
{
Size aSize = getTextDimensions(pControl, pControl->GetText(), nMaxWidth);
@@ -322,7 +322,7 @@ Size FixedText::CalcMinimumTextSize( Control const *pControl, long nMaxWidth )
return aSize;
}
-Size FixedText::CalcMinimumSize( long nMaxWidth ) const
+Size FixedText::CalcMinimumSize( tools::Long nMaxWidth ) const
{
return CalcWindowSize( CalcMinimumTextSize ( this, nMaxWidth ) );
}
@@ -493,18 +493,18 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
{
if (nWinStyle & WB_VERT)
{
- long nX = (aOutSize.Width() - 1) / 2;
+ tools::Long nX = (aOutSize.Width() - 1) / 2;
aDecoView.DrawSeparator(Point(nX, 0), Point(nX, aOutSize.Height() - 1));
}
else
{
- long nY = (aOutSize.Height() - 1) / 2;
+ tools::Long nY = (aOutSize.Height() - 1) / 2;
aDecoView.DrawSeparator(Point(0, nY), Point(aOutSize.Width() - 1, nY), false);
}
}
else if (nWinStyle & WB_VERT)
{
- long nWidth = rRenderContext.GetTextWidth(aText);
+ tools::Long nWidth = rRenderContext.GetTextWidth(aText);
rRenderContext.Push(PushFlags::FONT);
vcl::Font aFont(rRenderContext.GetFont());
aFont.SetOrientation(900);
@@ -540,7 +540,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
aRect = DrawControlText(*this, aRect, aText, nStyle, nullptr, nullptr);
- long nTop = aRect.Top() + ((aRect.GetHeight() - 1) / 2);
+ tools::Long nTop = aRect.Top() + ((aRect.GetHeight() - 1) / 2);
aDecoView.DrawSeparator(Point(aRect.Right() + FIXEDLINE_TEXT_BORDER, nTop), Point(aOutSize.Width() - 1, nTop), false);
if (aRect.Left() > FIXEDLINE_TEXT_BORDER)
aDecoView.DrawSeparator(Point(0, nTop), Point(aRect.Left() - FIXEDLINE_TEXT_BORDER, nTop), false);
diff --git a/vcl/source/control/hyperlabel.cxx b/vcl/source/control/hyperlabel.cxx
index f42debe51ee2..d3afea1ce848 100644
--- a/vcl/source/control/hyperlabel.cxx
+++ b/vcl/source/control/hyperlabel.cxx
@@ -53,7 +53,7 @@ namespace vcl
implInit();
}
- Size const & HyperLabel::CalcMinimumSize( long nMaxWidth ) const
+ Size const & HyperLabel::CalcMinimumSize( tools::Long nMaxWidth ) const
{
m_pImpl->m_aMinSize = FixedText::CalcMinimumSize( nMaxWidth );
// the MinimumSize is used to size the FocusRectangle
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 4ecda5b1ee99..73094dfcc454 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -54,7 +54,7 @@ namespace
const double nRatioY = 1.0 * aPaintSize.Height() / _rBitmapSize.Height();
const double nRatioMin = ::std::min( nRatioX, nRatioY );
- return Size( long( _rBitmapSize.Width() * nRatioMin ), long( _rBitmapSize.Height() * nRatioMin ) );
+ return Size( tools::Long( _rBitmapSize.Width() * nRatioMin ), tools::Long( _rBitmapSize.Height() * nRatioMin ) );
}
Point lcl_centerWithin( const tools::Rectangle& _rArea, const Size& _rObjectSize )
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 5c23cee3c0d1..8e63a555b6b9 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -127,12 +127,12 @@ class SvxIconChoiceCtrl_Impl
VclPtr<SvtIconChoiceCtrl> pView;
std::unique_ptr<IcnCursor_Impl> pImpCursor;
std::unique_ptr<IcnGridMap_Impl> pGridMap;
- long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
- long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
+ tools::Long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
+ tools::Long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
std::vector< SvxIconChoiceCtrlEntry* > maZOrderList;
std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns;
WinBits nWinBits;
- long nMaxBoundHeight; // height of highest BoundRects
+ tools::Long nMaxBoundHeight; // height of highest BoundRects
IconChoiceFlags nFlags;
DrawTextFlags nCurTextDrawFlags;
ImplSVEvent * nUserEventAdjustScrBars;
@@ -168,12 +168,12 @@ class SvxIconChoiceCtrl_Impl
DECL_LINK( CallSelectHdlHdl, Timer*, void );
void AdjustScrollBars();
- void PositionScrollBars( long nRealWidth, long nRealHeight );
- static long GetScrollBarPageSize( long nVisibleRange )
+ void PositionScrollBars( tools::Long nRealWidth, tools::Long nRealHeight );
+ static tools::Long GetScrollBarPageSize( tools::Long nVisibleRange )
{
return ((nVisibleRange*75)/100);
}
- long GetScrollBarLineSize() const
+ tools::Long GetScrollBarLineSize() const
{
return nMaxBoundHeight / 2;
}
@@ -244,10 +244,10 @@ class SvxIconChoiceCtrl_Impl
public:
- long nGridDX;
- long nGridDY;
- long nHorSBarHeight;
- long nVerSBarWidth;
+ tools::Long nGridDX;
+ tools::Long nGridDY;
+ tools::Long nHorSBarHeight;
+ tools::Long nVerSBarWidth;
SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
~SvxIconChoiceCtrl_Impl();
@@ -301,8 +301,8 @@ public:
void Arrange(
bool bKeepPredecessors,
- long nSetMaxVirtWidth,
- long nSetMaxVirtHeight
+ tools::Long nSetMaxVirtWidth,
+ tools::Long nSetMaxVirtHeight
);
tools::Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* );
@@ -313,8 +313,8 @@ public:
const OUString* pStr = nullptr
);
- long CalcBoundingWidth() const;
- long CalcBoundingHeight() const;
+ tools::Long CalcBoundingWidth() const;
+ tools::Long CalcBoundingHeight() const;
Size CalcBoundingSize() const;
void FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry );
void SetBoundingRect_Impl(
@@ -346,7 +346,7 @@ public:
sal_Int32 GetSelectionCount() const;
void SetGrid( const Size& );
Size GetMinGrid() const;
- void Scroll( long nDeltaX, long nDeltaY );
+ void Scroll( tools::Long nDeltaX, tools::Long nDeltaY );
const Size& GetItemSize( IcnViewFieldType ) const;
void HideDDIcon();
@@ -417,8 +417,8 @@ class IcnCursor_Impl
SvxIconChoiceCtrl_Impl* pView;
std::unique_ptr<IconChoiceMap> xColumns;
std::unique_ptr<IconChoiceMap> xRows;
- long nCols;
- long nRows;
+ tools::Long nCols;
+ tools::Long nRows;
short nDeltaWidth;
short nDeltaHeight;
SvxIconChoiceCtrlEntry* pCurEntry;
@@ -428,7 +428,7 @@ class IcnCursor_Impl
sal_uInt16 GetSortListPos(
SvxIconChoiceCtrlEntryPtrVec& rList,
- long nValue,
+ tools::Long nValue,
bool bVertical);
SvxIconChoiceCtrlEntry* SearchCol(
sal_uInt16 nCol,
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 4410d7241378..bcef44294468 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -366,8 +366,8 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const tools::Rectangle& rRect )
{
- long nHeightOffs = 0;
- long nWidthOffs = 0;
+ tools::Long nHeightOffs = 0;
+ tools::Long nWidthOffs = 0;
if( aVirtOutputSize.Width() < (rRect.Right()+LROFFS_WINBORDER) )
nWidthOffs = (rRect.Right()+LROFFS_WINBORDER) - aVirtOutputSize.Width();
@@ -434,7 +434,7 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
}
}
-void SvxIconChoiceCtrl_Impl::Arrange( bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
+void SvxIconChoiceCtrl_Impl::Arrange( bool bKeepPredecessors, tools::Long nSetMaxVirtWidth, tools::Long nSetMaxVirtHeight )
{
if ( nSetMaxVirtWidth != 0 )
nMaxVirtWidth = nSetMaxVirtWidth;
@@ -1043,7 +1043,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
}
// recalculate TopLeft of scrollbars (but not their sizes!)
-void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeight )
+void SvxIconChoiceCtrl_Impl::PositionScrollBars( tools::Long nRealWidth, tools::Long nRealHeight )
{
// horizontal scrollbar
Point aPos( 0, nRealHeight );
@@ -1064,25 +1064,25 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig
void SvxIconChoiceCtrl_Impl::AdjustScrollBars()
{
- long nVirtHeight = aVirtOutputSize.Height();
- long nVirtWidth = aVirtOutputSize.Width();
+ tools::Long nVirtHeight = aVirtOutputSize.Height();
+ tools::Long nVirtWidth = aVirtOutputSize.Width();
Size aOSize( pView->Control::GetOutputSizePixel() );
- long nRealHeight = aOSize.Height();
- long nRealWidth = aOSize.Width();
+ tools::Long nRealHeight = aOSize.Height();
+ tools::Long nRealWidth = aOSize.Width();
PositionScrollBars( nRealWidth, nRealHeight );
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
- long nVisibleWidth;
+ tools::Long nVisibleWidth;
if( nRealWidth > nVirtWidth )
nVisibleWidth = nVirtWidth + aOrigin.X();
else
nVisibleWidth = nRealWidth;
- long nVisibleHeight;
+ tools::Long nVisibleHeight;
if( nRealHeight > nVirtHeight )
nVisibleHeight = nVirtHeight + aOrigin.Y();
else
@@ -1134,7 +1134,7 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars()
}
// size vertical scrollbar
- long nThumb = aVerSBar->GetThumbPos();
+ tools::Long nThumb = aVerSBar->GetThumbPos();
Size aSize( nVerSBarWidth, nRealHeight );
aSize.AdjustHeight(2 );
if( aSize != aVerSBar->GetSizePixel() )
@@ -1219,13 +1219,13 @@ bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_HSCROLL) && !aOrigin.X() )
{
- long nWidth = aOutputSize.Width();
+ tools::Long nWidth = aOutputSize.Width();
const size_t nCount = maZOrderList.size();
- long nMostRight = 0;
+ tools::Long nMostRight = 0;
for( size_t nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = maZOrderList[ nCur ];
- long nRight = GetEntryBoundRect(pEntry).Right();
+ tools::Long nRight = GetEntryBoundRect(pEntry).Right();
if( nRight > nWidth )
return false;
if( nRight > nMostRight )
@@ -1257,13 +1257,13 @@ bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_VSCROLL) && !aOrigin.Y() )
{
- long nDeepest = 0;
- long nHeight = aOutputSize.Height();
+ tools::Long nDeepest = 0;
+ tools::Long nHeight = aOutputSize.Height();
const size_t nCount = maZOrderList.size();
for( size_t nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = maZOrderList[ nCur ];
- long nBottom = GetEntryBoundRect(pEntry).Bottom();
+ tools::Long nBottom = GetEntryBoundRect(pEntry).Bottom();
if( nBottom > nHeight )
return false;
if( nBottom > nDeepest )
@@ -1620,8 +1620,8 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* p
Size aTextSize( aTextRect.GetSize() );
Point aPos( aBound.TopLeft() );
- long nBoundWidth = aBound.GetWidth();
- long nBoundHeight = aBound.GetHeight();
+ tools::Long nBoundWidth = aBound.GetWidth();
+ tools::Long nBoundHeight = aBound.GetHeight();
switch( nWinBits & VIEWMODE_MASK )
{
@@ -1642,10 +1642,10 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* p
}
-long SvxIconChoiceCtrl_Impl::CalcBoundingWidth() const
+tools::Long SvxIconChoiceCtrl_Impl::CalcBoundingWidth() const
{
- long nStringWidth = GetItemSize( IcnViewFieldType::Text ).Width();
- long nWidth = 0;
+ tools::Long nStringWidth = GetItemSize( IcnViewFieldType::Text ).Width();
+ tools::Long nWidth = 0;
switch( nWinBits & VIEWMODE_MASK )
{
@@ -1663,10 +1663,10 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingWidth() const
return nWidth;
}
-long SvxIconChoiceCtrl_Impl::CalcBoundingHeight() const
+tools::Long SvxIconChoiceCtrl_Impl::CalcBoundingHeight() const
{
- long nStringHeight = GetItemSize(IcnViewFieldType::Text).Height();
- long nHeight = 0;
+ tools::Long nStringHeight = GetItemSize(IcnViewFieldType::Text).Height();
+ tools::Long nHeight = 0;
switch( nWinBits & VIEWMODE_MASK )
{
@@ -1823,7 +1823,7 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
bool bHor = aDocSize.Width() > aVisSize.Width();
bool bVer = aDocSize.Height() > aVisSize.Height();
- long nScrollDX = 0, nScrollDY = 0;
+ tools::Long nScrollDX = 0, nScrollDY = 0;
switch( rCmd.GetCommand() )
{
@@ -1857,7 +1857,7 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
}
else
{
- nScrollDY = pData->GetNotchDelta() * static_cast<long>(nScrollLines);
+ nScrollDY = pData->GetNotchDelta() * static_cast<tools::Long>(nScrollLines);
nScrollDY *= GetScrollBarLineSize();
}
}
@@ -1943,7 +1943,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const tools::Rectangle& rRect, bool bS
if( aOutputArea.IsInside( aVirtRect ) )
return; // is already visible
- long nDy;
+ tools::Long nDy;
if( aVirtRect.Top() < aOutputArea.Top() )
{
// scroll up (nDy < 0)
@@ -1957,7 +1957,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const tools::Rectangle& rRect, bool bS
else
nDy = 0;
- long nDx;
+ tools::Long nDx;
if( aVirtRect.Left() < aOutputArea.Left() )
{
// scroll to the left (nDx < 0)
@@ -2133,7 +2133,7 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtr
aBoundRect.AdjustRight( -(LROFFS_BOUND) );
if( aBoundRect.Left() > aBoundRect.Right() )
aBoundRect.SetLeft( aBoundRect.Right() );
- long nHeight = aBoundRect.GetSize().Height();
+ tools::Long nHeight = aBoundRect.GetSize().Height();
nHeight = nHeight - aDefaultTextSize.Height();
nHeight /= 2;
aBoundRect.AdjustTop(nHeight );
@@ -2144,20 +2144,20 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtr
void SvxIconChoiceCtrl_Impl::SetDefaultTextSize()
{
- long nDY = nGridDY;
+ tools::Long nDY = nGridDY;
nDY -= aImageSize.Height();
nDY -= VER_DIST_BMP_STRING;
nDY -= 2 * TBOFFS_BOUND;
if (nDY <= 0)
nDY = 2;
- long nDX = nGridDX;
+ tools::Long nDX = nGridDX;
nDX -= 2 * LROFFS_BOUND;
nDX -= 2;
if (nDX <= 0)
nDX = 2;
- long nHeight = pView->GetTextHeight();
+ tools::Long nHeight = pView->GetTextHeight();
if (nDY < nHeight)
nDY = nHeight;
if(pView->GetDPIScaleFactor() > 1)
@@ -2175,7 +2175,7 @@ void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const
if( nWinBits & WB_ICON )
{
// center horizontally
- long nBorder = pEntry->aGridRect.GetWidth() - aSize.Width();
+ tools::Long nBorder = pEntry->aGridRect.GetWidth() - aSize.Width();
pEntry->aRect.AdjustLeft(nBorder / 2 );
pEntry->aRect.AdjustRight( -(nBorder / 2) );
}
@@ -2187,7 +2187,7 @@ void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const
// The deltas are the offsets by which the view is moved on the document.
// left, up: offsets < 0
// right, down: offsets > 0
-void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY )
+void SvxIconChoiceCtrl_Impl::Scroll( tools::Long nDeltaX, tools::Long nDeltaY )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -2222,7 +2222,7 @@ static tools::Rectangle GetHotSpot( const tools::Rectangle& rRect )
tools::Rectangle aResult( rRect );
aResult.Justify();
Size aSize( rRect.GetSize() );
- long nDelta = aSize.Width() / 4;
+ tools::Long nDelta = aSize.Width() / 4;
aResult.AdjustLeft(nDelta );
aResult.AdjustRight( -nDelta );
nDelta = aSize.Height() / 4;
@@ -2621,7 +2621,7 @@ void SvxIconChoiceCtrl_Impl::InitSettings()
pView->SetBackground( rStyleSettings.GetFieldColor());
- long nScrBarSize = rStyleSettings.GetScrollBarSize();
+ tools::Long nScrBarSize = rStyleSettings.GetScrollBarSize();
if( nScrBarSize == nHorSBarHeight && nScrBarSize == nVerSBarWidth )
return;
@@ -2751,16 +2751,16 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
Point aPos( rPos );
aPos.AdjustX( -(LROFFS_WINBORDER) );
aPos.AdjustY( -(TBOFFS_WINBORDER) );
- long nMaxCol = aVirtOutputSize.Width() / nGridDX;
+ tools::Long nMaxCol = aVirtOutputSize.Width() / nGridDX;
if( nMaxCol )
nMaxCol--;
- long nGridX = aPos.X() / nGridDX;
+ tools::Long nGridX = aPos.X() / nGridDX;
if( nGridX > nMaxCol )
nGridX = nMaxCol;
- long nGridY = aPos.Y() / nGridDY;
- long nGridsX = aOutputSize.Width() / nGridDX;
+ tools::Long nGridY = aPos.Y() / nGridDY;
+ tools::Long nGridsX = aOutputSize.Width() / nGridDX;
sal_uLong nGrid = (nGridY * nGridsX) + nGridX;
- long nMiddle = (nGridX * nGridDX) + (nGridDX / 2);
+ tools::Long nMiddle = (nGridX * nGridDX) + (nGridDX / 2);
if( rPos.X() < nMiddle )
{
if( !nGrid )
@@ -2845,7 +2845,7 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16
void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect)
{
tools::Rectangle aBmpRect(rBmpRect);
- long nBorder = 2;
+ tools::Long nBorder = 2;
if (aImageSize.Width() < 32)
nBorder = 1;
aBmpRect.AdjustRight(nBorder );
diff --git a/vcl/source/control/imivctl2.cxx b/vcl/source/control/imivctl2.cxx
index 284921f8f62e..5b0d2d8adb49 100644
--- a/vcl/source/control/imivctl2.cxx
+++ b/vcl/source/control/imivctl2.cxx
@@ -34,7 +34,7 @@ IcnCursor_Impl::~IcnCursor_Impl()
{
}
-sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, long nValue,
+sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, tools::Long nValue,
bool bVertical )
{
sal_uInt16 nCount = rList.size();
@@ -42,11 +42,11 @@ sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList,
return 0;
sal_uInt16 nCurPos = 0;
- long nPrevValue = LONG_MIN;
+ tools::Long nPrevValue = LONG_MIN;
while( nCount )
{
const tools::Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] );
- long nCurValue;
+ tools::Long nCurValue;
if( bVertical )
nCurValue = rRect.Top();
else
@@ -162,7 +162,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT
if( nTop > nBottom )
std::swap(nTop, nBottom);
- long nMinDistance = LONG_MAX;
+ tools::Long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = nullptr;
for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
@@ -173,7 +173,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT
if( nY >= nTop && nY <= nBottom )
{
const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
- long nDistance = rRect.Top() - rRefRect.Top();
+ tools::Long nDistance = rRect.Top() - rRefRect.Top();
if( nDistance < 0 )
nDistance *= -1;
if( nDistance && nDistance < nMinDistance )
@@ -238,7 +238,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL
if( nRight < nLeft )
std::swap(nRight, nLeft);
- long nMinDistance = LONG_MAX;
+ tools::Long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = nullptr;
for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
@@ -249,7 +249,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL
if( nX >= nLeft && nX <= nRight )
{
const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
- long nDistance = rRect.Left() - rRefRect.Left();
+ tools::Long nDistance = rRect.Left() - rRefRect.Left();
if( nDistance < 0 )
nDistance *= -1;
if( nDistance && nDistance < nMinDistance )
@@ -299,9 +299,9 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
if( pResult )
return pResult;
- long nCurCol = nX;
+ tools::Long nCurCol = nX;
- long nColOffs, nLastCol;
+ tools::Long nColOffs, nLastCol;
if( bRight )
{
nColOffs = 1;
@@ -333,15 +333,15 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
- const long nPos = static_cast<long>(pView->GetEntryListPos( pStart ));
- long nEntriesInView = pView->aOutputSize.Height() / pView->nGridDY;
+ const tools::Long nPos = static_cast<tools::Long>(pView->GetEntryListPos( pStart ));
+ tools::Long nEntriesInView = pView->aOutputSize.Height() / pView->nGridDY;
nEntriesInView *=
((pView->aOutputSize.Width()+(pView->nGridDX/2)) / pView->nGridDX );
- long nNewPos = nPos;
+ tools::Long nNewPos = nPos;
if( bDown )
{
nNewPos += nEntriesInView;
- if( nNewPos >= static_cast<long>(pView->maEntries.size()) )
+ if( nNewPos >= static_cast<tools::Long>(pView->maEntries.size()) )
nNewPos = pView->maEntries.size() - 1;
}
else
@@ -354,7 +354,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
return pView->maEntries[ static_cast<size_t>(nNewPos) ].get();
return nullptr;
}
- long nOpt = pView->GetEntryBoundRect( pStart ).Top();
+ tools::Long nOpt = pView->GetEntryBoundRect( pStart ).Top();
if( bDown )
{
nOpt += pView->aOutputSize.Height();
@@ -368,14 +368,14 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
if( nOpt < 0 )
nOpt = 0;
- long nPrevErr = LONG_MAX;
+ tools::Long nPrevErr = LONG_MAX;
SvxIconChoiceCtrlEntry* pPrev = pStart;
SvxIconChoiceCtrlEntry* pNext = GoUpDown( pStart, bDown );
while( pNext )
{
- long nCur = pView->GetEntryBoundRect( pNext ).Top();
- long nErr = nOpt - nCur;
+ tools::Long nCur = pView->GetEntryBoundRect( pNext ).Top();
+ tools::Long nErr = nOpt - nCur;
if( nErr < 0 )
nErr *= -1;
if( nErr > nPrevErr )
@@ -418,9 +418,9 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
if( pResult )
return pResult;
- long nCurRow = nY;
+ tools::Long nCurRow = nY;
- long nRowOffs, nLastRow;
+ tools::Long nRowOffs, nLastRow;
if( bDown )
{
nRowOffs = 1;
@@ -529,7 +529,7 @@ void IcnGridMap_Impl::Create_Impl()
void IcnGridMap_Impl::GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const
{
- long nX, nY;
+ tools::Long nX, nY;
if( _pView->nWinBits & WB_ALIGN_TOP )
{
// The view grows in vertical direction. Its max. width is _pView->nMaxVirtWidth
@@ -557,8 +557,8 @@ void IcnGridMap_Impl::GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const
if( !nY )
nY = DEFAULT_MAX_VIRT_HEIGHT;
- long nDX = nX / _pView->nGridDX;
- long nDY = nY / _pView->nGridDY;
+ tools::Long nDX = nX / _pView->nGridDX;
+ tools::Long nDY = nY / _pView->nGridDY;
if( !nDX )
nDX++;
@@ -582,8 +582,8 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos )
{
Create();
- long nX = rDocPos.X();
- long nY = rDocPos.Y();
+ tools::Long nX = rDocPos.X();
+ tools::Long nY = rDocPos.Y();
nX -= LROFFS_WINBORDER;
nY -= TBOFFS_WINBORDER;
nX /= _pView->nGridDX;
@@ -606,8 +606,8 @@ tools::Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
Create();
sal_uInt16 nGridX, nGridY;
GetGridCoord( nId, nGridX, nGridY );
- const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER;
- const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER;
+ const tools::Long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER;
+ const tools::Long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER;
return tools::Rectangle(
nLeft, nTop,
nLeft + _pView->nGridDX,
@@ -663,9 +663,9 @@ void IcnGridMap_Impl::Clear()
sal_uLong IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, sal_uInt16 nDX, sal_uInt16 nDY)
{
- long ndx = (rSizePixel.Width() - LROFFS_WINBORDER) / nDX;
+ tools::Long ndx = (rSizePixel.Width() - LROFFS_WINBORDER) / nDX;
if( ndx < 0 ) ndx *= -1;
- long ndy = (rSizePixel.Height() - TBOFFS_WINBORDER) / nDY;
+ tools::Long ndy = (rSizePixel.Height() - TBOFFS_WINBORDER) / nDY;
if( ndy < 0 ) ndy *= -1;
return static_cast<sal_uLong>(ndx * ndy);
}
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 22d26a3ef076..f9ba50513178 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -47,7 +47,7 @@
using namespace ::com::sun::star;
-constexpr long gnBorder = 1;
+constexpr tools::Long gnBorder = 1;
void ImplInitDropDownButton( PushButton* pButton )
{
@@ -276,9 +276,9 @@ sal_Int32 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_Int32 nSta
return nPos;
}
-long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginIndex ) const
+tools::Long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginIndex ) const
{
- long nHeight = 0;
+ tools::Long nHeight = 0;
sal_Int32 nStart = std::min(i_nEndIndex, i_nBeginIndex);
sal_Int32 nStop = std::max(i_nEndIndex, i_nBeginIndex);
sal_Int32 nEntryCount = GetEntryCount();
@@ -295,7 +295,7 @@ long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginInd
sal_Int32 nIndex = nStart;
while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
{
- long nPosHeight = GetEntryPtr( nIndex )->getHeightWithMargin();
+ tools::Long nPosHeight = GetEntryPtr( nIndex )->getHeightWithMargin();
if (nHeight > ::std::numeric_limits<long>::max() - nPosHeight)
{
SAL_WARN( "vcl", "ImplEntryList::GetAddedHeight: truncated");
@@ -310,7 +310,7 @@ long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginInd
return i_nEndIndex > i_nBeginIndex ? nHeight : -nHeight;
}
-long ImplEntryList::GetEntryHeight( sal_Int32 nPos ) const
+tools::Long ImplEntryList::GetEntryHeight( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? pImplEntry->getHeightWithMargin() : 0;
@@ -567,16 +567,16 @@ struct ImplEntryMetrics
{
bool bText;
bool bImage;
- long nEntryWidth;
- long nEntryHeight;
- long nTextWidth;
- long nImgWidth;
- long nImgHeight;
+ tools::Long nEntryWidth;
+ tools::Long nEntryHeight;
+ tools::Long nTextWidth;
+ tools::Long nImgWidth;
+ tools::Long nImgHeight;
};
}
-long ImplEntryType::getHeightWithMargin() const
+tools::Long ImplEntryType::getHeightWithMargin() const
{
return mnHeight + ImplGetSVData()->maNWFData.mnListBoxEntryMargin;
}
@@ -780,13 +780,13 @@ void ImplListBoxWindow::ImplHideFocusRect()
sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
{
- long nY = gnBorder;
+ tools::Long nY = gnBorder;
sal_Int32 nSelect = mnTop;
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
while (pEntry)
{
- long nEntryHeight = pEntry->getHeightWithMargin();
+ tools::Long nEntryHeight = pEntry->getHeightWithMargin();
if (rPoint.Y() <= nEntryHeight + nY)
break;
nY += nEntryHeight;
@@ -814,18 +814,18 @@ bool ImplListBoxWindow::IsVisible( sal_Int32 i_nEntry ) const
return bRet;
}
-long ImplListBoxWindow::GetEntryHeightWithMargin() const
+tools::Long ImplListBoxWindow::GetEntryHeightWithMargin() const
{
- long nMargin = ImplGetSVData()->maNWFData.mnListBoxEntryMargin;
+ tools::Long nMargin = ImplGetSVData()->maNWFData.mnListBoxEntryMargin;
return mnMaxHeight + nMargin;
}
sal_Int32 ImplListBoxWindow::GetLastVisibleEntry() const
{
sal_Int32 nPos = mnTop;
- long nWindowHeight = GetSizePixel().Height();
+ tools::Long nWindowHeight = GetSizePixel().Height();
sal_Int32 nCount = mpEntryList->GetEntryCount();
- long nDiff;
+ tools::Long nDiff;
for( nDiff = 0; nDiff < nWindowHeight && nPos < nCount; nDiff = mpEntryList->GetAddedHeight( nPos, mnTop ) )
nPos++;
@@ -1104,7 +1104,7 @@ bool ImplListBoxWindow::SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bo
if( bFocusChanged )
{
- long nHeightDiff = mpEntryList->GetAddedHeight( nSelect, mnTop );
+ tools::Long nHeightDiff = mpEntryList->GetAddedHeight( nSelect, mnTop );
maFocusRect.SetPos( Point( 0, nHeightDiff ) );
Size aSz( maFocusRect.GetWidth(),
mpEntryList->GetEntryHeight( nSelect ) );
@@ -1143,7 +1143,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
mbTrackingSelect = false;
if ( mnTrackingSaveSelection != LISTBOX_ENTRY_NOTFOUND )
{
- long nHeightDiff = mpEntryList->GetAddedHeight( mnCurrentPos, mnTop );
+ tools::Long nHeightDiff = mpEntryList->GetAddedHeight( mnCurrentPos, mnTop );
maFocusRect.SetPos( Point( 0, nHeightDiff ) );
Size aSz( maFocusRect.GetWidth(),
mpEntryList->GetEntryHeight( mnCurrentPos ) );
@@ -1231,7 +1231,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- long nHeightDiff = mpEntryList->GetAddedHeight( mnCurrentPos, mnTop );
+ tools::Long nHeightDiff = mpEntryList->GetAddedHeight( mnCurrentPos, mnTop );
maFocusRect.SetPos( Point( 0, nHeightDiff ) );
Size aSz( maFocusRect.GetWidth(), mpEntryList->GetEntryHeight( mnCurrentPos ) );
maFocusRect.SetSize( aSz );
@@ -1369,8 +1369,8 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
nTmp += mnTop - 1;
if( mnCurrentPos == nTmp && mnCurrentPos != nCount - 1 )
{
- long nTmp2 = std::min( static_cast<long>(nCount-nCurVis), static_cast<long>(static_cast<long>(mnTop)+static_cast<long>(nCurVis)-1) );
- nTmp2 = std::max( long(0) , nTmp2 );
+ tools::Long nTmp2 = std::min( static_cast<tools::Long>(nCount-nCurVis), static_cast<tools::Long>(static_cast<tools::Long>(mnTop)+static_cast<tools::Long>(nCurVis)-1) );
+ nTmp2 = std::max( tools::Long(0) , nTmp2 );
nTmp = static_cast<sal_Int32>(nTmp2+(nCurVis-1) );
SetTopEntry( static_cast<sal_Int32>(nTmp2) );
}
@@ -1609,8 +1609,8 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
if (!pEntry)
return;
- long nWidth = GetOutputSizePixel().Width();
- long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
+ tools::Long nWidth = GetOutputSizePixel().Width();
+ tools::Long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
tools::Rectangle aRect(Point(0, nY), Size(nWidth, pEntry->getHeightWithMargin()));
bool bSelected = mpEntryList->IsEntryPosSelected(nPos);
@@ -1654,14 +1654,14 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if (!pEntry)
return;
- long nEntryHeight = pEntry->getHeightWithMargin();
+ tools::Long nEntryHeight = pEntry->getHeightWithMargin();
// when changing this function don't forget to adjust ImplWin::DrawEntry()
if (mbInUserDraw)
nPos = mnUserDrawEntry; // real entry, not the matching entry from MRU
- long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
+ tools::Long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
if (bDrawImage && mpEntryList->HasImages())
{
@@ -1705,7 +1705,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
OUString aStr(mpEntryList->GetEntryText(nPos));
if (!aStr.isEmpty())
{
- long nMaxWidth = std::max(mnMaxWidth, GetOutputSizePixel().Width() - 2 * gnBorder);
+ tools::Long nMaxWidth = std::max(mnMaxWidth, GetOutputSizePixel().Width() - 2 * gnBorder);
// a multiline entry should only be as wide as the window
if (pEntry->mnFlags & ListBoxEntryFlags::MultiLine)
nMaxWidth = GetOutputSizePixel().Width() - 2 * gnBorder;
@@ -1715,7 +1715,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if (mpEntryList->HasEntryImage(nPos) || IsUserDrawEnabled())
{
- long nImageWidth = std::max(mnMaxImgWidth, maUserItemSize.Width());
+ tools::Long nImageWidth = std::max(mnMaxImgWidth, maUserItemSize.Width());
aTextRect.AdjustLeft(nImageWidth + IMG_TXT_DISTANCE );
}
@@ -1757,13 +1757,13 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const to
if (mbHasFocusRect)
ImplHideFocusRect();
- long nY = 0; // + gnBorder;
- long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + gnBorder;
+ tools::Long nY = 0; // + gnBorder;
+ tools::Long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + gnBorder;
for (sal_Int32 i = mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++)
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr(i);
- long nEntryHeight = pEntry->getHeightWithMargin();
+ tools::Long nEntryHeight = pEntry->getHeightWithMargin();
if (nY + nEntryHeight >= rRect.Top() &&
nY <= rRect.Bottom() + mnMaxHeight)
{
@@ -1772,7 +1772,7 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const to
nY += nEntryHeight;
}
- long nHeightDiff = mpEntryList->GetAddedHeight(mnCurrentPos, mnTop);
+ tools::Long nHeightDiff = mpEntryList->GetAddedHeight(mnCurrentPos, mnTop);
maFocusRect.SetPos(Point(0, nHeightDiff));
Size aSz(maFocusRect.GetWidth(), mpEntryList->GetEntryHeight(mnCurrentPos));
maFocusRect.SetSize(aSz);
@@ -1797,7 +1797,7 @@ sal_uInt16 ImplListBoxWindow::GetDisplayLineCount() const
// FIXME: ListBoxEntryFlags::MultiLine
const sal_Int32 nCount = mpEntryList->GetEntryCount()-mnTop;
- long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + gnBorder;
+ tools::Long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + gnBorder;
sal_uInt16 nEntries = static_cast< sal_uInt16 >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
if( nEntries > nCount )
nEntries = static_cast<sal_uInt16>(nCount);
@@ -1830,7 +1830,7 @@ void ImplListBoxWindow::GetFocus()
sal_Int32 nPos = mnCurrentPos;
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
- long nHeightDiff = mpEntryList->GetAddedHeight( nPos, mnTop );
+ tools::Long nHeightDiff = mpEntryList->GetAddedHeight( nPos, mnTop );
maFocusRect.SetPos( Point( 0, nHeightDiff ) );
Size aSz( maFocusRect.GetWidth(), mpEntryList->GetEntryHeight( nPos ) );
maFocusRect.SetSize( aSz );
@@ -1849,7 +1849,7 @@ void ImplListBoxWindow::SetTopEntry( sal_Int32 nTop )
if( mpEntryList->GetEntryCount() == 0 )
return;
- long nWHeight = PixelToLogic( GetSizePixel() ).Height();
+ tools::Long nWHeight = PixelToLogic( GetSizePixel() ).Height();
sal_Int32 nLastEntry = mpEntryList->GetEntryCount()-1;
if( nTop > nLastEntry )
@@ -1862,7 +1862,7 @@ void ImplListBoxWindow::SetTopEntry( sal_Int32 nTop )
return;
ImplClearLayoutData();
- long nDiff = mpEntryList->GetAddedHeight( mnTop, nTop );
+ tools::Long nDiff = mpEntryList->GetAddedHeight( mnTop, nTop );
PaintImmediately();
ImplHideFocusRect();
mnTop = nTop;
@@ -1878,17 +1878,17 @@ void ImplListBoxWindow::ShowProminentEntry( sal_Int32 nEntryPos )
SetTopEntry( nEntryPos );
}
-void ImplListBoxWindow::SetLeftIndent( long n )
+void ImplListBoxWindow::SetLeftIndent( tools::Long n )
{
ScrollHorz( n - mnLeft );
}
-void ImplListBoxWindow::ScrollHorz( long n )
+void ImplListBoxWindow::ScrollHorz( tools::Long n )
{
- long nDiff = 0;
+ tools::Long nDiff = 0;
if ( n > 0 )
{
- long nWidth = GetOutputSizePixel().Width();
+ tools::Long nWidth = GetOutputSizePixel().Width();
if( ( mnMaxWidth - mnLeft + n ) > nWidth )
nDiff = n;
}
@@ -1896,7 +1896,7 @@ void ImplListBoxWindow::ScrollHorz( long n )
{
if( mnLeft )
{
- long nAbs = -n;
+ tools::Long nAbs = -n;
nDiff = - std::min( mnLeft, nAbs );
}
}
@@ -1952,7 +1952,7 @@ tools::Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_Int32 nItem ) cons
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem );
Size aSz( GetSizePixel().Width(), pEntry ? pEntry->getHeightWithMargin() : GetEntryHeightWithMargin() );
- long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeightWithMargin();
+ tools::Long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeightWithMargin();
tools::Rectangle aRect( Point( 0, nY ), aSz );
return aRect;
}
@@ -2140,7 +2140,7 @@ IMPL_LINK_NOARG(ImplListBox, MRUChanged, LinkParamNone*, void)
IMPL_LINK_NOARG(ImplListBox, LBWindowScrolled, ImplListBoxWindow*, void)
{
- long nSet = GetTopEntry();
+ tools::Long nSet = GetTopEntry();
if( nSet > mpVScrollBar->GetRangeMax() )
mpVScrollBar->SetRangeMax( GetEntryList()->GetEntryCount() );
mpVScrollBar->SetThumbPos( GetTopEntry() );
@@ -2194,11 +2194,11 @@ void ImplListBox::ImplCheckScrollBars()
// horizontal ScrollBar
if( mbAutoHScroll )
{
- long nWidth = static_cast<sal_uInt16>(aOutSz.Width());
+ tools::Long nWidth = static_cast<sal_uInt16>(aOutSz.Width());
if ( mbVScroll )
nWidth -= mpVScrollBar->GetSizePixel().Width();
- long nMaxWidth = GetMaxEntryWidth();
+ tools::Long nMaxWidth = GetMaxEntryWidth();
if( nWidth < nMaxWidth )
{
if( !mbHScroll )
@@ -2270,7 +2270,7 @@ void ImplListBox::ImplResizeControls()
// visible is already determined in ImplCheckScrollBars
Size aOutSz = GetOutputSizePixel();
- long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
nSBWidth = CalcZoom( nSBWidth );
Size aInnerSz( aOutSz );
@@ -2653,7 +2653,7 @@ void ImplWin::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&
void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bLayout)
{
- long nBorder = 1;
+ tools::Long nBorder = 1;
Size aOutSz(GetOutputSizePixel());
bool bImage = !!maImage;
@@ -2834,7 +2834,7 @@ bool ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
return FloatingWindow::PreNotify( rNEvt );
}
-void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags )
+void ImplListBoxFloatingWindow::setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags )
{
FloatingWindow::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
@@ -2886,7 +2886,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
nLines = mnDDLineCount;
Size aSz = mpImplLB->CalcSize( nLines );
- long nMaxHeight = aSz.Height() + nTop + nBottom;
+ tools::Long nMaxHeight = aSz.Height() + nTop + nBottom;
if ( mnDDLineCount )
aFloatSz.setHeight( nMaxHeight );
@@ -2901,11 +2901,11 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
if ( ( aFloatSz.Height() < nMaxHeight ) || ( mnDDLineCount && ( mnDDLineCount < mpImplLB->GetEntryList()->GetEntryCount() ) ) )
{
// then we also need the vertical Scrollbar
- long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
aFloatSz.AdjustWidth(nSBWidth );
}
- long nDesktopWidth = GetDesktopRectPixel().getWidth();
+ tools::Long nDesktopWidth = GetDesktopRectPixel().getWidth();
if (aFloatSz.Width() > nDesktopWidth)
// Don't exceed the desktop width.
aFloatSz.setWidth( nDesktopWidth );
@@ -2925,8 +2925,8 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
aFloatSz.setWidth( aParentSz.Width() );
// align height to entries...
- long nInnerHeight = aFloatSz.Height() - nTop - nBottom;
- long nEntryHeight = mpImplLB->GetEntryHeightWithMargin();
+ tools::Long nInnerHeight = aFloatSz.Height() - nTop - nBottom;
+ tools::Long nEntryHeight = mpImplLB->GetEntryHeightWithMargin();
if ( nInnerHeight % nEntryHeight )
{
nInnerHeight /= nEntryHeight;
@@ -2939,7 +2939,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
{
// The max width of list box entries exceeds the window width.
// Account for the scroll bar height.
- long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
aFloatSz.AdjustHeight(nSBWidth );
}
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index a82e4ce0fb11..bf4b71412514 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -365,8 +365,8 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags )
}
}
- const long nOnePixel = GetDrawPixel( pDev, 1 );
- const long nOffX = 3*nOnePixel;
+ const tools::Long nOnePixel = GetDrawPixel( pDev, 1 );
+ const tools::Long nOffX = 3*nOnePixel;
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
tools::Rectangle aTextRect( aPos, aSize );
@@ -383,9 +383,9 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags )
if ( IsDropDownBox() )
{
OUString aText = GetSelectedEntry();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOffY = (aSize.Height()-nTextHeight) / 2;
+ tools::Long nTextHeight = pDev->GetTextHeight();
+ tools::Long nTextWidth = pDev->GetTextWidth( aText );
+ tools::Long nOffY = (aSize.Height()-nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -402,7 +402,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags )
}
else
{
- long nTextHeight = pDev->GetTextHeight();
+ tools::Long nTextHeight = pDev->GetTextHeight();
sal_uInt16 nLines = ( nTextHeight > 0 ) ? static_cast<sal_uInt16>(aSize.Height() / nTextHeight) : 1;
tools::Rectangle aClip( aPos, aSize );
@@ -535,7 +535,7 @@ sal_uInt16 ListBox::GetDropDownLineCount() const
return mnLineCount;
}
-void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags )
+void ListBox::setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags )
{
if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) )
{
@@ -559,8 +559,8 @@ void ListBox::Resize()
if( IsDropDownBox() )
{
// Initialize the dropdown button size with the standard scrollbar width
- long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- long nBottom = aOutSz.Height();
+ tools::Long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nBottom = aOutSz.Height();
// Note: in case of no border, pBorder will actually be this
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
@@ -597,7 +597,7 @@ void ListBox::Resize()
// let's do the best we can and center vertically, so it doesn't look
// completely wrong.
Size aSz( GetOutputSizePixel() );
- long nDiff = aContent.Top() - (aSz.Height() - aContent.GetHeight())/2;
+ tools::Long nDiff = aContent.Top() - (aSz.Height() - aContent.GetHeight())/2;
aContent.AdjustTop( -nDiff );
aContent.AdjustBottom( -nDiff );
}
@@ -647,13 +647,13 @@ void ListBox::FillLayoutData() const
}
}
-long ListBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
+tools::Long ListBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
// Check whether rPoint fits at all
- long nIndex = Control::GetIndexForPoint( rPoint );
+ tools::Long nIndex = Control::GetIndexForPoint( rPoint );
if( nIndex != -1 )
{
// Point must be either in main list window
@@ -1214,7 +1214,7 @@ Size ListBox::CalcSubEditSize() const
if (m_nMaxWidthChars != -1)
{
- long nMaxWidth = m_nMaxWidthChars * approximate_char_width();
+ tools::Long nMaxWidth = m_nMaxWidthChars * approximate_char_width();
aSz.setWidth( std::min(aSz.Width(), nMaxWidth) );
}
@@ -1239,8 +1239,8 @@ Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const
aSz.AdjustHeight( -(nTop+nBottom) );
if ( !IsDropDownBox() )
{
- long nEntryHeight = CalcBlockSize( 1, 1 ).Height();
- long nLines = aSz.Height() / nEntryHeight;
+ tools::Long nEntryHeight = CalcBlockSize( 1, 1 ).Height();
+ tools::Long nLines = aSz.Height() / nEntryHeight;
if ( nLines < 1 )
nLines = 1;
aSz.setHeight( nLines * nEntryHeight );
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 920fb48fe04c..5025c1d68ef0 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -52,8 +52,8 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt
{
SAL_WARN_IF( nDigits >= 10, "vcl", "LongCurrency may only have 9 decimal places" );
- if ( rNumber.IsZero() || static_cast<long>(rNumber) )
- return rLocaleDataWrapper.getCurr( static_cast<long>(rNumber), nDigits, rCurrSymbol, bShowThousandSep );
+ if ( rNumber.IsZero() || static_cast<tools::Long>(rNumber) )
+ return rLocaleDataWrapper.getCurr( static_cast<tools::Long>(rNumber), nDigits, rCurrSymbol, bShowThousandSep );
BigInt aTmp( ImplPower10( nDigits ) );
BigInt aInteger( rNumber );
@@ -70,7 +70,7 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt
if ( rNumber.IsNeg() )
aFraction *= -1;
- OUStringBuffer aTemplate = rLocaleDataWrapper.getCurr( static_cast<long>(aFraction), nDigits, rCurrSymbol, bShowThousandSep );
+ OUStringBuffer aTemplate = rLocaleDataWrapper.getCurr( static_cast<tools::Long>(aFraction), nDigits, rCurrSymbol, bShowThousandSep );
while( !aInteger.IsZero() )
{
aFraction = aInteger;
@@ -79,7 +79,7 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt
if( !aInteger.IsZero() )
aFraction += aTmp;
- OUString aFractionStr = rLocaleDataWrapper.getNum( static_cast<long>(aFraction), 0 );
+ OUString aFractionStr = rLocaleDataWrapper.getNum( static_cast<tools::Long>(aFraction), 0 );
sal_Int32 nSPos = aTemplate.indexOf( '1' );
if (nSPos == -1)
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index c6bbe576c05d..64686e1729b5 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -157,7 +157,7 @@ Size NotebookBar::GetOptimalSize() const
return Control::GetOptimalSize();
}
-void NotebookBar::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
+void NotebookBar::setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
{
bool bCanHandleSmallerWidth = false;
bool bCanHandleSmallerHeight = false;
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index 0f61ea90b496..e861d66bcb03 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -123,7 +123,7 @@ void ProgressBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt1
mnPrgsHeight = aSize.Height() - (PROGRESSBAR_WIN_OFFSET * 2);
mnPrgsWidth = (mnPrgsHeight * 2) / 3;
maPos.setY( PROGRESSBAR_WIN_OFFSET );
- long nMaxWidth = aSize.Width() - (PROGRESSBAR_WIN_OFFSET * 2) + PROGRESSBAR_OFFSET;
+ tools::Long nMaxWidth = aSize.Width() - (PROGRESSBAR_WIN_OFFSET * 2) + PROGRESSBAR_OFFSET;
sal_uInt16 nMaxCount = static_cast<sal_uInt16>(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET));
if (nMaxCount <= 1)
{
diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx
index 9f7e6a0e12ef..f1df11cff5bb 100644
--- a/vcl/source/control/roadmap.cxx
+++ b/vcl/source/control/roadmap.cxx
@@ -26,10 +26,10 @@
#include <tools/color.hxx>
#include <rtl/ustring.hxx>
-constexpr long LABELBASEMAPHEIGHT = 8;
-constexpr long ROADMAP_INDENT_X = 4;
-constexpr long ROADMAP_INDENT_Y = 27;
-constexpr long ROADMAP_ITEM_DISTANCE_Y = 6;
+constexpr tools::Long LABELBASEMAPHEIGHT = 8;
+constexpr tools::Long ROADMAP_INDENT_X = 4;
+constexpr tools::Long ROADMAP_INDENT_Y = 27;
+constexpr tools::Long ROADMAP_ITEM_DISTANCE_Y = 6;
namespace vcl
{
@@ -775,8 +775,8 @@ void RoadmapItem::ToggleBackgroundColor(const Color& _rGBColor)
void RoadmapItem::ImplUpdatePosSize()
{
// calculate widths
- long nIDWidth = mpID->GetTextWidth( mpID->GetText() );
- long nMaxIDWidth = mpID->GetTextWidth( "100." );
+ tools::Long nIDWidth = mpID->GetTextWidth( mpID->GetText() );
+ tools::Long nMaxIDWidth = mpID->GetTextWidth( "100." );
nIDWidth = ::std::min( nIDWidth, nMaxIDWidth );
// check how many space the description would need
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 01b645c1b80c..848260b4b9b5 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -89,7 +89,7 @@ void ScrollBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, nullptr );
- long nScrollSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nScrollSize = GetSettings().GetStyleSettings().GetScrollBarSize();
SetSizePixel( Size( nScrollSize, nScrollSize ) );
}
@@ -162,7 +162,7 @@ void ScrollBar::ImplUpdateRects( bool bUpdate )
{
if ( GetStyle() & WB_HORZ )
{
- const long nSpace = maTrackRect.Right() - maTrackRect.Left();
+ const tools::Long nSpace = maTrackRect.Right() - maTrackRect.Left();
if ( nSpace > 0 )
{
maPage1Rect.SetLeft( maTrackRect.Left() );
@@ -173,7 +173,7 @@ void ScrollBar::ImplUpdateRects( bool bUpdate )
}
else
{
- const long nSpace = maTrackRect.Bottom() - maTrackRect.Top();
+ const tools::Long nSpace = maTrackRect.Bottom() - maTrackRect.Top();
if ( nSpace > 0 )
{
maPage1Rect.SetTop( maTrackRect.Top() );
@@ -200,19 +200,19 @@ void ScrollBar::ImplUpdateRects( bool bUpdate )
}
}
-long ScrollBar::ImplCalcThumbPos( long nPixPos )
+tools::Long ScrollBar::ImplCalcThumbPos( tools::Long nPixPos )
{
// Calculate position
- long nCalcThumbPos;
+ tools::Long nCalcThumbPos;
nCalcThumbPos = ImplMulDiv( nPixPos, mnMaxRange-mnVisibleSize-mnMinRange,
mnThumbPixRange-mnThumbPixSize );
nCalcThumbPos += mnMinRange;
return nCalcThumbPos;
}
-long ScrollBar::ImplCalcThumbPosPix( long nPos )
+tools::Long ScrollBar::ImplCalcThumbPosPix( tools::Long nPos )
{
- long nCalcThumbPos;
+ tools::Long nCalcThumbPos;
// Calculate position
nCalcThumbPos = ImplMulDiv( nPos-mnMinRange, mnThumbPixRange-mnThumbPixSize,
@@ -232,7 +232,7 @@ long ScrollBar::ImplCalcThumbPosPix( long nPos )
void ScrollBar::ImplCalc( bool bUpdate )
{
const Size aSize = GetOutputSizePixel();
- const long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();
+ const tools::Long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();
if ( mbCalcSize )
{
@@ -671,11 +671,11 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext)
}
}
-long ScrollBar::ImplScroll( long nNewPos, bool bCallEndScroll )
+tools::Long ScrollBar::ImplScroll( tools::Long nNewPos, bool bCallEndScroll )
{
- long nOldPos = mnThumbPos;
+ tools::Long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
- long nDelta = mnThumbPos-nOldPos;
+ tools::Long nDelta = mnThumbPos-nOldPos;
if ( nDelta )
{
mnDelta = nDelta;
@@ -687,9 +687,9 @@ long ScrollBar::ImplScroll( long nNewPos, bool bCallEndScroll )
return nDelta;
}
-long ScrollBar::ImplDoAction( bool bCallEndScroll )
+tools::Long ScrollBar::ImplDoAction( bool bCallEndScroll )
{
- long nDelta = 0;
+ tools::Long nDelta = 0;
switch ( meScrollType )
{
@@ -792,7 +792,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
void ScrollBar::ImplDragThumb( const Point& rMousePos )
{
- long nMovePix;
+ tools::Long nMovePix;
if ( GetStyle() & WB_HORZ )
nMovePix = rMousePos.X()-(maThumbRect.Left()+mnMouseOff);
else
@@ -807,7 +807,7 @@ void ScrollBar::ImplDragThumb( const Point& rMousePos )
mnThumbPixPos = 0;
if ( mnThumbPixPos > (mnThumbPixRange-mnThumbPixSize) )
mnThumbPixPos = mnThumbPixRange-mnThumbPixSize;
- long nOldPos = mnThumbPos;
+ tools::Long nOldPos = mnThumbPos;
mnThumbPos = ImplCalcThumbPos( mnThumbPixPos );
ImplUpdateRects();
if ( !(mbFullDrag && (nOldPos != mnThumbPos)) )
@@ -982,7 +982,7 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
// Restore the old ThumbPosition when canceled
if ( rTEvt.IsTrackingCanceled() )
{
- long nOldPos = mnThumbPos;
+ tools::Long nOldPos = mnThumbPos;
SetThumbPos( mnStartPos );
mnDelta = mnThumbPos-nOldPos;
Scroll();
@@ -1300,19 +1300,19 @@ void ScrollBar::EndScroll()
ImplCallEventListenersAndHandler( VclEventId::ScrollbarEndScroll, [this] () { maEndScrollHdl.Call(this); } );
}
-long ScrollBar::DoScroll( long nNewPos )
+tools::Long ScrollBar::DoScroll( tools::Long nNewPos )
{
if ( meScrollType != ScrollType::DontKnow )
return 0;
SAL_INFO("vcl.scrollbar", "DoScroll(" << nNewPos << ")");
meScrollType = ScrollType::Drag;
- long nDelta = ImplScroll( nNewPos, true );
+ tools::Long nDelta = ImplScroll( nNewPos, true );
meScrollType = ScrollType::DontKnow;
return nDelta;
}
-long ScrollBar::DoScrollAction( ScrollType eScrollType )
+tools::Long ScrollBar::DoScrollAction( ScrollType eScrollType )
{
if ( (meScrollType != ScrollType::DontKnow) ||
(eScrollType == ScrollType::DontKnow) ||
@@ -1320,17 +1320,17 @@ long ScrollBar::DoScrollAction( ScrollType eScrollType )
return 0;
meScrollType = eScrollType;
- long nDelta = ImplDoAction( true );
+ tools::Long nDelta = ImplDoAction( true );
meScrollType = ScrollType::DontKnow;
return nDelta;
}
-void ScrollBar::SetRangeMin( long nNewRange )
+void ScrollBar::SetRangeMin( tools::Long nNewRange )
{
SetRange( Range( nNewRange, GetRangeMax() ) );
}
-void ScrollBar::SetRangeMax( long nNewRange )
+void ScrollBar::SetRangeMax( tools::Long nNewRange )
{
SetRange( Range( GetRangeMin(), nNewRange ) );
}
@@ -1340,8 +1340,8 @@ void ScrollBar::SetRange( const Range& rRange )
// Adapt Range
Range aRange = rRange;
aRange.Justify();
- long nNewMinRange = aRange.Min();
- long nNewMaxRange = aRange.Max();
+ tools::Long nNewMinRange = aRange.Min();
+ tools::Long nNewMaxRange = aRange.Max();
// If Range differs, set a new one
if ( (mnMinRange == nNewMinRange) && (mnMaxRange == nNewMaxRange))
@@ -1359,7 +1359,7 @@ void ScrollBar::SetRange( const Range& rRange )
CompatStateChanged( StateChangedType::Data );
}
-void ScrollBar::SetThumbPos( long nNewThumbPos )
+void ScrollBar::SetThumbPos( tools::Long nNewThumbPos )
{
if ( nNewThumbPos > mnMaxRange-mnVisibleSize )
nNewThumbPos = mnMaxRange-mnVisibleSize;
@@ -1373,7 +1373,7 @@ void ScrollBar::SetThumbPos( long nNewThumbPos )
}
}
-void ScrollBar::SetVisibleSize( long nNewSize )
+void ScrollBar::SetVisibleSize( tools::Long nNewSize )
{
if ( mnVisibleSize != nNewSize )
{
@@ -1395,7 +1395,7 @@ Size ScrollBar::GetOptimalSize() const
Size aRet = getCurrentCalcSize();
- const long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();
+ const tools::Long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();
if (GetStyle() & WB_HORZ)
{
@@ -1425,7 +1425,7 @@ void ScrollBarBox::ImplInit(vcl::Window* pParent, WinBits nStyle)
Window::ImplInit( pParent, nStyle, nullptr );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- long nScrollSize = rStyleSettings.GetScrollBarSize();
+ tools::Long nScrollSize = rStyleSettings.GetScrollBarSize();
SetSizePixel(Size(nScrollSize, nScrollSize));
}
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index f25cd384d68c..af259cd184e7 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -202,19 +202,19 @@ void Slider::ImplUpdateRects( bool bUpdate )
}
}
-long Slider::ImplCalcThumbPos( long nPixPos )
+tools::Long Slider::ImplCalcThumbPos( tools::Long nPixPos )
{
// calculate position
- long nCalcThumbPos;
+ tools::Long nCalcThumbPos;
nCalcThumbPos = ImplMulDiv( nPixPos-mnThumbPixOffset, mnMaxRange-mnMinRange, mnThumbPixRange-1 );
nCalcThumbPos += mnMinRange;
return nCalcThumbPos;
}
-long Slider::ImplCalcThumbPosPix( long nPos )
+tools::Long Slider::ImplCalcThumbPosPix( tools::Long nPos )
{
// calculate position
- long nCalcThumbPos;
+ tools::Long nCalcThumbPos;
nCalcThumbPos = ImplMulDiv( nPos-mnMinRange, mnThumbPixRange-1, mnMaxRange-mnMinRange );
// at the beginning and end we try to display Slider correctly
if ( !nCalcThumbPos && (mnThumbPos > mnMinRange) )
@@ -263,11 +263,11 @@ void Slider::ImplCalc( bool bUpdate )
}
}
- long nOldChannelPixRange = mnChannelPixRange;
- long nOldChannelPixTop = mnChannelPixTop;
- long nOldChannelPixBottom = mnChannelPixBottom;
- long nCalcWidth;
- long nCalcHeight;
+ tools::Long nOldChannelPixRange = mnChannelPixRange;
+ tools::Long nOldChannelPixTop = mnChannelPixTop;
+ tools::Long nOldChannelPixBottom = mnChannelPixBottom;
+ tools::Long nCalcWidth;
+ tools::Long nCalcHeight;
maChannel1Rect.SetEmpty();
maChannel2Rect.SetEmpty();
@@ -360,7 +360,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
if (!maChannel1Rect.IsEmpty())
{
- long nRectSize;
+ tools::Long nRectSize;
tools::Rectangle aRect = maChannel1Rect;
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
if (GetStyle() & WB_HORZ)
@@ -404,7 +404,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
if (!maChannel2Rect.IsEmpty())
{
- long nRectSize;
+ tools::Long nRectSize;
tools::Rectangle aRect = maChannel2Rect;
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
if (GetStyle() & WB_HORZ)
@@ -495,11 +495,11 @@ bool Slider::ImplIsPageDown( const Point& rPos )
return aRect.IsInside( rPos );
}
-long Slider::ImplSlide( long nNewPos )
+tools::Long Slider::ImplSlide( tools::Long nNewPos )
{
- long nOldPos = mnThumbPos;
+ tools::Long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
- long nDelta = mnThumbPos-nOldPos;
+ tools::Long nDelta = mnThumbPos-nOldPos;
if ( nDelta )
{
Slide();
@@ -507,9 +507,9 @@ long Slider::ImplSlide( long nNewPos )
return nDelta;
}
-long Slider::ImplDoAction()
+tools::Long Slider::ImplDoAction()
{
- long nDelta = 0;
+ tools::Long nDelta = 0;
switch ( meScrollType )
{
@@ -579,7 +579,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
}
}
-void Slider::ImplDoSlide( long nNewPos )
+void Slider::ImplDoSlide( tools::Long nNewPos )
{
if ( meScrollType != ScrollType::DontKnow )
return;
@@ -683,7 +683,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
// special handling for dragging
if ( meScrollType == ScrollType::Drag )
{
- long nMovePix;
+ tools::Long nMovePix;
Point aCenterPos = maThumbRect.Center();
if ( GetStyle() & WB_HORZ )
nMovePix = rMousePos.X()-(aCenterPos.X()+mnMouseOff);
@@ -697,7 +697,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
mnThumbPixPos = mnThumbPixOffset;
if ( mnThumbPixPos > (mnThumbPixOffset+mnThumbPixRange-1) )
mnThumbPixPos = mnThumbPixOffset+mnThumbPixRange-1;
- long nOldPos = mnThumbPos;
+ tools::Long nOldPos = mnThumbPos;
mnThumbPos = ImplCalcThumbPos( mnThumbPixPos );
if ( nOldPos != mnThumbPos )
{
@@ -836,12 +836,12 @@ void Slider::Slide()
maSlideHdl.Call( this );
}
-void Slider::SetRangeMin(long nNewRange)
+void Slider::SetRangeMin(tools::Long nNewRange)
{
SetRange(Range(nNewRange, GetRangeMax()));
}
-void Slider::SetRangeMax(long nNewRange)
+void Slider::SetRangeMax(tools::Long nNewRange)
{
SetRange(Range(GetRangeMin(), nNewRange));
}
@@ -851,8 +851,8 @@ void Slider::SetRange( const Range& rRange )
// adjust Range
Range aRange = rRange;
aRange.Justify();
- long nNewMinRange = aRange.Min();
- long nNewMaxRange = aRange.Max();
+ tools::Long nNewMinRange = aRange.Min();
+ tools::Long nNewMaxRange = aRange.Max();
// reset Range if different
if ( (mnMinRange != nNewMinRange) ||
@@ -870,7 +870,7 @@ void Slider::SetRange( const Range& rRange )
}
}
-void Slider::SetThumbPos( long nNewThumbPos )
+void Slider::SetThumbPos( tools::Long nNewThumbPos )
{
if ( nNewThumbPos < mnMinRange )
nNewThumbPos = mnMinRange;
@@ -886,8 +886,8 @@ void Slider::SetThumbPos( long nNewThumbPos )
Size Slider::CalcWindowSizePixel()
{
- long nWidth = mnMaxRange - mnMinRange + mnThumbSize + 1;
- long nHeight = SLIDER_HEIGHT;
+ tools::Long nWidth = mnMaxRange - mnMinRange + mnThumbSize + 1;
+ tools::Long nHeight = SLIDER_HEIGHT;
Size aSize;
if ( GetStyle() & WB_HORZ )
{
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 531c90222233..db8ca2b13e8f 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -334,12 +334,12 @@ void SpinButton::StateChanged( StateChangedType nType )
Control::StateChanged( nType );
}
-void SpinButton::SetRangeMin( long nNewRange )
+void SpinButton::SetRangeMin( tools::Long nNewRange )
{
SetRange( Range( nNewRange, GetRangeMax() ) );
}
-void SpinButton::SetRangeMax( long nNewRange )
+void SpinButton::SetRangeMax( tools::Long nNewRange )
{
SetRange( Range( GetRangeMin(), nNewRange ) );
}
@@ -349,8 +349,8 @@ void SpinButton::SetRange( const Range& rRange )
// adjust rage
Range aRange = rRange;
aRange.Justify();
- long nNewMinRange = aRange.Min();
- long nNewMaxRange = aRange.Max();
+ tools::Long nNewMinRange = aRange.Min();
+ tools::Long nNewMaxRange = aRange.Max();
// do something only if old and new range differ
if ( (mnMinRange == nNewMinRange) && (mnMaxRange == nNewMaxRange))
@@ -368,7 +368,7 @@ void SpinButton::SetRange( const Range& rRange )
CompatStateChanged( StateChangedType::Data );
}
-void SpinButton::SetValue( long nValue )
+void SpinButton::SetValue( tools::Long nValue )
{
// adjust, if necessary
if ( nValue > mnMaxRange )
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index f63c037d6e9d..090579322fbe 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -257,8 +257,8 @@ void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext,
}
// calculate Symbol size
- long nTempSize1 = aUpRect.GetWidth();
- long nTempSize2 = aLowRect.GetWidth();
+ tools::Long nTempSize1 = aUpRect.GetWidth();
+ tools::Long nTempSize2 = aLowRect.GetWidth();
if (std::abs( nTempSize1-nTempSize2 ) == 1)
{
if (nTempSize1 > nTempSize2)
@@ -614,7 +614,7 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tool
if (GetStyle() & WB_DROPDOWN)
{
- long nW = rStyleSettings.GetScrollBarSize();
+ tools::Long nW = rStyleSettings.GetScrollBarSize();
nW = GetDrawPixel( pDev, nW );
aDropDownSize = Size( CalcZoom( nW ), aSize.Height() );
aSize.AdjustWidth( -(aDropDownSize.Width()) );
@@ -627,9 +627,9 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tool
// calculate sizes according to the height
if (GetStyle() & WB_SPIN)
{
- long nBottom1 = aSize.Height()/2;
- long nBottom2 = aSize.Height()-1;
- long nTop2 = nBottom1;
+ tools::Long nBottom1 = aSize.Height()/2;
+ tools::Long nBottom2 = aSize.Height()-1;
+ tools::Long nTop2 = nBottom1;
if ( !(aSize.Height() & 0x01) )
nBottom1--;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index c3c894cb451d..04e1e909f5b3 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -224,7 +224,7 @@ ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const
return nullptr;
}
-Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
+Size TabControl::ImplGetItemSize( ImplTabItem* pItem, tools::Long nMaxWidth )
{
pItem->maFormatText = pItem->maText;
Size aSize( GetCtrlTextWidth( pItem->maFormatText ), GetTextHeight() );
@@ -368,7 +368,7 @@ namespace MinimumRaggednessWrap
}
};
-static void lcl_AdjustSingleLineTabs(long nMaxWidth, ImplTabCtrlData *pTabCtrlData)
+static void lcl_AdjustSingleLineTabs(tools::Long nMaxWidth, ImplTabCtrlData *pTabCtrlData)
{
if (!ImplGetSVData()->maNWFData.mbCenteredTabs)
return;
@@ -391,17 +391,17 @@ static void lcl_AdjustSingleLineTabs(long nMaxWidth, ImplTabCtrlData *pTabCtrlDa
}
}
-bool TabControl::ImplPlaceTabs( long nWidth )
+bool TabControl::ImplPlaceTabs( tools::Long nWidth )
{
if ( nWidth <= 0 )
return false;
if ( mpTabCtrlData->maItemList.empty() )
return false;
- long nMaxWidth = nWidth;
+ tools::Long nMaxWidth = nWidth;
- const long nOffsetX = 2 + GetItemsOffset().X();
- const long nOffsetY = 2 + GetItemsOffset().Y();
+ const tools::Long nOffsetX = 2 + GetItemsOffset().X();
+ const tools::Long nOffsetY = 2 + GetItemsOffset().Y();
//fdo#66435 throw Knuth/Tex minimum raggedness algorithm at the problem
//of ugly bare tabs on lines of their own
@@ -420,13 +420,13 @@ bool TabControl::ImplPlaceTabs( long nWidth )
nMaxWidth -= GetItemsOffset().X();
- long nX = nOffsetX;
- long nY = nOffsetY;
+ tools::Long nX = nOffsetX;
+ tools::Long nY = nOffsetY;
sal_uInt16 nLines = 0;
sal_uInt16 nCurLine = 0;
- long nLineWidthAry[100];
+ tools::Long nLineWidthAry[100];
sal_uInt16 nLinePosAry[101];
nLineWidthAry[0] = 0;
nLinePosAry[0] = 0;
@@ -477,8 +477,8 @@ bool TabControl::ImplPlaceTabs( long nWidth )
if (nLines) // two or more lines
{
- long nLineHeightAry[100];
- long nIH = 0;
+ tools::Long nLineHeightAry[100];
+ tools::Long nIH = 0;
for (const auto& item : mpTabCtrlData->maItemList)
{
if (!item.m_bVisible)
@@ -497,9 +497,9 @@ bool TabControl::ImplPlaceTabs( long nWidth )
nLinePosAry[nLines+1] = static_cast<sal_uInt16>(mpTabCtrlData->maItemList.size());
- long nDX = 0;
- long nModDX = 0;
- long nIDX = 0;
+ tools::Long nDX = 0;
+ tools::Long nModDX = 0;
+ tools::Long nIDX = 0;
sal_uInt16 i = 0;
sal_uInt16 n = 0;
@@ -551,7 +551,7 @@ bool TabControl::ImplPlaceTabs( long nWidth )
return true;
}
-tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight )
+tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, tools::Long nWidth, tools::Long nHeight )
{
Size aWinSize = Control::GetOutputSizePixel();
if ( nWidth < 0 )
@@ -561,8 +561,8 @@ tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, l
if ( mpTabCtrlData->maItemList.empty() )
{
- long nW = nWidth-TAB_OFFSET*2;
- long nH = nHeight-TAB_OFFSET*2;
+ tools::Long nW = nWidth-TAB_OFFSET*2;
+ tools::Long nH = nHeight-TAB_OFFSET*2;
return (nW > 0 && nH > 0)
? tools::Rectangle(Point(TAB_OFFSET, TAB_OFFSET), Size(nW, nH))
: tools::Rectangle();
@@ -580,8 +580,8 @@ tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, l
if (aRect.IsEmpty())
return aRect;
- long nW = nWidth-TAB_OFFSET*2;
- long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2;
+ tools::Long nW = nWidth-TAB_OFFSET*2;
+ tools::Long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2;
return (nW > 0 && nH > 0)
? tools::Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) )
: tools::Rectangle();
@@ -592,7 +592,7 @@ tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, l
return ImplGetTabRect(pItem, nWidth, nHeight);
}
-tools::Rectangle TabControl::ImplGetTabRect(const ImplTabItem* pItem, long nWidth, long nHeight)
+tools::Rectangle TabControl::ImplGetTabRect(const ImplTabItem* pItem, tools::Long nWidth, tools::Long nHeight)
{
if ((nWidth <= 1) || (nHeight <= 0) || !pItem || !pItem->m_bVisible)
return tools::Rectangle();
@@ -758,8 +758,8 @@ void TabControl::ImplShowFocus()
const ImplTabItem& rItem = mpTabCtrlData->maItemList[ nCurPos ];
Size aTabSize = aRect.GetSize();
Size aImageSize( 0, 0 );
- long nTextHeight = GetTextHeight();
- long nTextWidth = GetCtrlTextWidth( rItem.maFormatText );
+ tools::Long nTextHeight = GetTextHeight();
+ tools::Long nTextWidth = GetCtrlTextWidth( rItem.maFormatText );
sal_uInt16 nOff;
if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::Mono) )
@@ -785,8 +785,8 @@ void TabControl::ImplShowFocus()
else
{
// show focus around image
- long nXPos = aRect.Left()+((aTabSize.Width()-nTextWidth-aImageSize.Width())/2)-nOff-1;
- long nYPos = aRect.Top();
+ tools::Long nXPos = aRect.Left()+((aTabSize.Width()-nTextWidth-aImageSize.Width())/2)-nOff-1;
+ tools::Long nYPos = aRect.Top();
if( aImageSize.Height() < aRect.GetHeight() )
nYPos += (aRect.GetHeight() - aImageSize.Height())/2;
@@ -806,8 +806,8 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem co
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
tools::Rectangle aRect = pItem->maRect;
- long nLeftBottom = aRect.Bottom();
- long nRightBottom = aRect.Bottom();
+ tools::Long nLeftBottom = aRect.Bottom();
+ tools::Long nRightBottom = aRect.Bottom();
bool bLeftBorder = true;
bool bRightBorder = true;
sal_uInt16 nOff;
@@ -948,16 +948,16 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem co
Size aTabSize = aRect.GetSize();
Size aImageSize(0, 0);
- long nTextHeight = rRenderContext.GetTextHeight();
- long nTextWidth = rRenderContext.GetCtrlTextWidth(pItem->maFormatText);
+ tools::Long nTextHeight = rRenderContext.GetTextHeight();
+ tools::Long nTextWidth = rRenderContext.GetCtrlTextWidth(pItem->maFormatText);
if (!!pItem->maTabImage)
{
aImageSize = pItem->maTabImage.GetSizePixel();
if (!pItem->maFormatText.isEmpty())
aImageSize.AdjustWidth(GetTextHeight() / 4 );
}
- long nXPos = aRect.Left() + ((aTabSize.Width() - nTextWidth - aImageSize.Width()) / 2) - nOff - nOff3;
- long nYPos = aRect.Top() + ((aTabSize.Height() - nTextHeight) / 2) - nOff3;
+ tools::Long nXPos = aRect.Left() + ((aTabSize.Width() - nTextWidth - aImageSize.Width()) / 2) - nOff - nOff3;
+ tools::Long nYPos = aRect.Top() + ((aTabSize.Height() - nTextHeight) / 2) - nOff3;
if (!pItem->maFormatText.isEmpty())
{
DrawTextFlags nStyle = DrawTextFlags::Mnemonic;
@@ -1133,7 +1133,7 @@ void TabControl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectang
aRect.SetTop(0);
if (mpTabCtrlData->maItemList.size())
{
- long nRight = 0;
+ tools::Long nRight = 0;
for (const auto &item : mpTabCtrlData->maItemList)
if (item.m_bVisible)
nRight = item.maRect.Right();
@@ -1160,7 +1160,7 @@ void TabControl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectang
}
else
{
- long nTopOff = 1;
+ tools::Long nTopOff = 1;
if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
else
@@ -1265,7 +1265,7 @@ void TabControl::setAllocation(const Size &rAllocation)
{
// get the listbox' preferred size
Size aTabCtrlSize( GetSizePixel() );
- long nPrefWidth = mpTabCtrlData->mpListBox->get_preferred_size().Width();
+ tools::Long nPrefWidth = mpTabCtrlData->mpListBox->get_preferred_size().Width();
if( nPrefWidth > aTabCtrlSize.Width() )
nPrefWidth = aTabCtrlSize.Width();
Size aNewSize( nPrefWidth, LogicToPixel( Size( 12, 12 ), MapMode( MapUnit::MapAppFont ) ).Height() );
@@ -1280,7 +1280,7 @@ void TabControl::setAllocation(const Size &rAllocation)
// check what needs to be invalidated
Size aNewSize = rAllocation;
- long nNewWidth = aNewSize.Width();
+ tools::Long nNewWidth = aNewSize.Width();
for (auto const& item : mpTabCtrlData->maItemList)
{
if (!item.m_bVisible)
@@ -2013,7 +2013,7 @@ void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage )
}
}
-tools::Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const
+tools::Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, tools::Long nIndex ) const
{
tools::Rectangle aRet;
@@ -2034,9 +2034,9 @@ tools::Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex
return aRet;
}
-long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const
+tools::Long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const
{
- long nRet = -1;
+ tools::Long nRet = -1;
if( !HasLayoutData() || mpTabCtrlData->maLayoutPageIdToLine.empty() )
FillLayoutData();
@@ -2136,7 +2136,7 @@ Size TabControl::ImplCalculateRequisition(sal_uInt16& nHeaderHeight) const
pThis->ActivatePage();
}
- long nTabLabelsBottom = 0, nTabLabelsRight = 0;
+ tools::Long nTabLabelsBottom = 0, nTabLabelsRight = 0;
for (sal_uInt16 nPos(0), sizeList(static_cast <sal_uInt16> (mpTabCtrlData->maItemList.size()));
nPos < sizeList; ++nPos)
{
@@ -2324,7 +2324,7 @@ sal_uInt16 NotebookbarTabControlBase::GetHeaderHeight()
return m_nHeaderHeight;
}
-bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
+bool NotebookbarTabControlBase::ImplPlaceTabs( tools::Long nWidth )
{
if ( nWidth <= 0 )
return false;
@@ -2333,20 +2333,20 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
if (!m_pOpenMenu || m_pOpenMenu->isDisposed())
return false;
- const long nHamburgerWidth = m_pOpenMenu->GetSizePixel().Width();
- long nMaxWidth = nWidth - nHamburgerWidth;
- long nShortcutsWidth = m_pShortcuts != nullptr ? m_pShortcuts->GetSizePixel().getWidth() + 1 : 0;
- long nFullWidth = nShortcutsWidth;
+ const tools::Long nHamburgerWidth = m_pOpenMenu->GetSizePixel().Width();
+ tools::Long nMaxWidth = nWidth - nHamburgerWidth;
+ tools::Long nShortcutsWidth = m_pShortcuts != nullptr ? m_pShortcuts->GetSizePixel().getWidth() + 1 : 0;
+ tools::Long nFullWidth = nShortcutsWidth;
- const long nOffsetX = 2 + GetItemsOffset().X() + nShortcutsWidth;
- const long nOffsetY = 2 + GetItemsOffset().Y();
+ const tools::Long nOffsetX = 2 + GetItemsOffset().X() + nShortcutsWidth;
+ const tools::Long nOffsetY = 2 + GetItemsOffset().Y();
//fdo#66435 throw Knuth/Tex minimum raggedness algorithm at the problem
//of ugly bare tabs on lines of their own
for (auto & item : mpTabCtrlData->maItemList)
{
- long nTabWidth = 0;
+ tools::Long nTabWidth = 0;
if (item.m_bVisible)
{
nTabWidth = ImplGetItemSize(&item, nMaxWidth).getWidth();
@@ -2358,10 +2358,10 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
nMaxWidth -= GetItemsOffset().X();
- long nX = nOffsetX;
- long nY = nOffsetY;
+ tools::Long nX = nOffsetX;
+ tools::Long nY = nOffsetY;
- long nLineWidthAry[100];
+ tools::Long nLineWidthAry[100];
nLineWidthAry[0] = 0;
for (auto & item : mpTabCtrlData->maItemList)
@@ -2396,11 +2396,11 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
// position the shortcutbox
if (m_pShortcuts)
{
- long nPosY = (m_nHeaderHeight - m_pShortcuts->GetSizePixel().getHeight()) / 2;
+ tools::Long nPosY = (m_nHeaderHeight - m_pShortcuts->GetSizePixel().getHeight()) / 2;
m_pShortcuts->SetPosPixel(Point(0, nPosY));
}
- long nPosY = (m_nHeaderHeight - m_pOpenMenu->GetSizePixel().getHeight()) / 2;
+ tools::Long nPosY = (m_nHeaderHeight - m_pOpenMenu->GetSizePixel().getHeight()) / 2;
// position the menu
m_pOpenMenu->SetPosPixel(Point(nWidth - nHamburgerWidth, nPosY));
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 850edf27bc40..4f79ab9fcca4 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -108,7 +108,7 @@ void Throbber::initImages()
size_t nPreferredSet = 0;
if ( aImageSets.size() > 1 )
{
- long nMinimalDistance = ::std::numeric_limits< long >::max();
+ tools::Long nMinimalDistance = ::std::numeric_limits< long >::max();
for ( ::std::vector< ::std::vector< Image > >::const_iterator check = aImageSets.begin();
check != aImageSets.end();
++check
diff --git a/vcl/source/control/thumbpos.hxx b/vcl/source/control/thumbpos.hxx
index 1992bd853745..13e24fe6044e 100644
--- a/vcl/source/control/thumbpos.hxx
+++ b/vcl/source/control/thumbpos.hxx
@@ -10,12 +10,12 @@
#ifndef INCLUDED_VCL_SOURCE_CONTROL_THUMBPOS_HXX
#define INCLUDED_VCL_SOURCE_CONTROL_THUMBPOS_HXX
-inline long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
+inline tools::Long ImplMulDiv( tools::Long nNumber, tools::Long nNumerator, tools::Long nDenominator )
{
if (!nDenominator)
return 0;
double n = (static_cast<double>(nNumber) * static_cast<double>(nNumerator)) / static_cast<double>(nDenominator);
- return static_cast<long>(n);
+ return static_cast<tools::Long>(n);
}
#endif // INCLUDED_VCL_SOURCE_CONTROL_THUMBPOS_HXX
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 6272e0073f75..919b54bbdc00 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -83,8 +83,8 @@ namespace vcl
void RoadmapWizard::ImplCalcSize( Size& rSize )
{
// calculate ButtonBar height and width
- long nMaxHeight = 0;
- long nBarWidth = WIZARDDIALOG_BUTTON_DLGOFFSET_X * 2 + LogicalCoordinateToPixel(6);
+ tools::Long nMaxHeight = 0;
+ tools::Long nBarWidth = WIZARDDIALOG_BUTTON_DLGOFFSET_X * 2 + LogicalCoordinateToPixel(6);
ImplWizButtonData* pBtnData = mpFirstBtn;
while (pBtnData)
{
@@ -133,9 +133,9 @@ namespace vcl
void RoadmapWizard::ImplPosCtrls()
{
Size aDlgSize = GetOutputSizePixel();
- long nBtnWidth = 0;
- long nMaxHeight = 0;
- long nOffY = aDlgSize.Height();
+ tools::Long nBtnWidth = 0;
+ tools::Long nMaxHeight = 0;
+ tools::Long nOffY = aDlgSize.Height();
ImplWizButtonData* pBtnData = mpFirstBtn;
int j = 0;
@@ -144,7 +144,7 @@ namespace vcl
if (j >= mnLeftAlignCount)
{
Size aBtnSize = pBtnData->mpButton->GetSizePixel();
- long nBtnHeight = aBtnSize.Height();
+ tools::Long nBtnHeight = aBtnSize.Height();
if ( nBtnHeight > nMaxHeight )
nMaxHeight = nBtnHeight;
nBtnWidth += aBtnSize.Width();
@@ -156,8 +156,8 @@ namespace vcl
if ( nMaxHeight )
{
- long nOffX = aDlgSize.Width()-nBtnWidth-WIZARDDIALOG_BUTTON_DLGOFFSET_X;
- long nOffLeftAlignX = LogicalCoordinateToPixel(6);
+ tools::Long nOffX = aDlgSize.Width()-nBtnWidth-WIZARDDIALOG_BUTTON_DLGOFFSET_X;
+ tools::Long nOffLeftAlignX = LogicalCoordinateToPixel(6);
nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y+nMaxHeight;
pBtnData = mpFirstBtn;
@@ -190,11 +190,11 @@ namespace vcl
if ( !(mpViewWindow && mpViewWindow->IsVisible()) )
return;
- long nViewOffX = 0;
- long nViewOffY = 0;
- long nViewWidth = 0;
- long nViewHeight = 0;
- long nDlgHeight = nOffY;
+ tools::Long nViewOffX = 0;
+ tools::Long nViewOffY = 0;
+ tools::Long nViewWidth = 0;
+ tools::Long nViewHeight = 0;
+ tools::Long nDlgHeight = nOffY;
PosSizeFlags nViewPosFlags = PosSizeFlags::Pos;
// align left
{
@@ -217,7 +217,7 @@ namespace vcl
nViewPosFlags );
}
- long RoadmapWizard::LogicalCoordinateToPixel(int iCoordinate){
+ tools::Long RoadmapWizard::LogicalCoordinateToPixel(int iCoordinate){
Size aLocSize = LogicToPixel(Size(iCoordinate, 0), MapMode(MapUnit::MapAppFont));
int iPixelCoordinate = aLocSize.Width();
return iPixelCoordinate;
@@ -237,11 +237,11 @@ namespace vcl
}
// calculate height of ButtonBar
- long nMaxHeight = 0;
+ tools::Long nMaxHeight = 0;
ImplWizButtonData* pBtnData = mpFirstBtn;
while ( pBtnData )
{
- long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height();
+ tools::Long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height();
if ( nBtnHeight > nMaxHeight )
nMaxHeight = nBtnHeight;
pBtnData = pBtnData->mpNext;
@@ -252,13 +252,13 @@ namespace vcl
// position TabPage
Size aDlgSize = GetOutputSizePixel();
aDlgSize.AdjustHeight( -nMaxHeight );
- long nOffX = 0;
- long nOffY = 0;
+ tools::Long nOffX = 0;
+ tools::Long nOffY = 0;
if ( mpViewWindow && mpViewWindow->IsVisible() )
{
Size aViewSize = mpViewWindow->GetSizePixel();
// align left
- long nViewOffset = mbEmptyViewMargin ? 0 : WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ tools::Long nViewOffset = mbEmptyViewMargin ? 0 : WIZARDDIALOG_VIEW_DLGOFFSET_X;
nOffX += aViewSize.Width() + nViewOffset;
aDlgSize.AdjustWidth( -nOffX );
}
@@ -527,7 +527,7 @@ namespace vcl
return true;
}
- bool RoadmapWizard::Finish( long nResult )
+ bool RoadmapWizard::Finish( tools::Long nResult )
{
if ( IsInExecute() )
EndDialog( nResult );
@@ -614,7 +614,7 @@ namespace vcl
return nullptr;
}
- void RoadmapWizard::AddButton( Button* pButton, long nOffset )
+ void RoadmapWizard::AddButton( Button* pButton, tools::Long nOffset )
{
ImplWizButtonData* pNewBtnData = new ImplWizButtonData;
pNewBtnData->mpNext = nullptr;
diff --git a/vcl/source/control/wizimpldata.hxx b/vcl/source/control/wizimpldata.hxx
index fdac4baef076..f943c0473aec 100644
--- a/vcl/source/control/wizimpldata.hxx
+++ b/vcl/source/control/wizimpldata.hxx
@@ -32,7 +32,7 @@ struct ImplWizButtonData
{
ImplWizButtonData* mpNext;
VclPtr<Button> mpButton;
- long mnOffset;
+ tools::Long mnOffset;
};
namespace vcl
diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx
index b5f2fc1de84f..c92ce1974e40 100644
--- a/vcl/source/edit/textdat2.hxx
+++ b/vcl/source/edit/textdat2.hxx
@@ -50,7 +50,7 @@ class TETextPortion
{
private:
sal_Int32 nLen;
- long nWidth;
+ tools::Long nWidth;
sal_uInt8 nKind;
bool bRightToLeft;
@@ -63,7 +63,7 @@ public:
{}
sal_Int32& GetLen() { return nLen; }
- long& GetWidth() { return nWidth; }
+ tools::Long& GetWidth() { return nWidth; }
sal_uInt8& GetKind() { return nKind; }
void SetRightToLeft(bool b) { bRightToLeft = b; }
bool IsRightToLeft() const { return bRightToLeft; }
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 907c7cfcd238..d05aeb892df3 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -213,7 +213,7 @@ void TextEngine::SetMaxTextLen( sal_Int32 nLen )
mnMaxTextLen = nLen>=0 ? nLen : EDIT_NOLIMIT;
}
-void TextEngine::SetMaxTextWidth( long nMaxWidth )
+void TextEngine::SetMaxTextWidth( tools::Long nMaxWidth )
{
if ( nMaxWidth>=0 && nMaxWidth != mnMaxTextWidth )
{
@@ -832,7 +832,7 @@ tools::Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial
SAL_WARN_IF( !GetUpdateMode(), "vcl", "PaMtoEditCursor: GetUpdateMode()" );
tools::Rectangle aEditCursor;
- long nY = 0;
+ tools::Long nY = 0;
if ( !mbHasMultiLineParas )
{
@@ -869,7 +869,7 @@ tools::Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial,
*/
- long nY = 0;
+ tools::Long nY = 0;
sal_Int32 nCurIndex = 0;
TextLine* pLine = nullptr;
for (TextLine & rTmpLine : pPortion->GetLines())
@@ -899,13 +899,13 @@ tools::Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial,
aEditCursor.SetBottom( nY-1 );
// search within the line
- long nX = ImpGetXPos( rPaM.GetPara(), pLine, rPaM.GetIndex(), bPreferPortionStart );
+ tools::Long nX = ImpGetXPos( rPaM.GetPara(), pLine, rPaM.GetIndex(), bPreferPortionStart );
aEditCursor.SetLeft(nX);
aEditCursor.SetRight(nX);
return aEditCursor;
}
-long TextEngine::ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart )
+tools::Long TextEngine::ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart )
{
SAL_WARN_IF( ( nIndex < pLine->GetStart() ) || ( nIndex > pLine->GetEnd() ) , "vcl", "ImpGetXPos: Bad parameters!" );
@@ -925,9 +925,9 @@ long TextEngine::ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex
TETextPortion* pPortion = pParaPortion->GetTextPortions()[ nTextPortion ];
- long nX = ImpGetPortionXOffset( nPara, pLine, nTextPortion );
+ tools::Long nX = ImpGetPortionXOffset( nPara, pLine, nTextPortion );
- long nPortionTextWidth = pPortion->GetWidth();
+ tools::Long nPortionTextWidth = pPortion->GetWidth();
if ( nTextPortionStart != nIndex )
{
@@ -957,7 +957,7 @@ long TextEngine::ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex
{
SAL_WARN_IF( nIndex == pLine->GetStart(), "vcl", "ImpGetXPos: Strange behavior" );
- long nPosInPortion = CalcTextWidth( nPara, nTextPortionStart, nIndex-nTextPortionStart );
+ tools::Long nPosInPortion = CalcTextWidth( nPara, nTextPortionStart, nIndex-nTextPortionStart );
if (IsRightToLeft() == pPortion->IsRightToLeft())
{
@@ -1002,11 +1002,11 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos )
{
SAL_WARN_IF( !GetUpdateMode(), "vcl", "GetPaM: GetUpdateMode()" );
- long nY = 0;
+ tools::Long nY = 0;
for ( sal_uInt32 nPortion = 0; nPortion < mpTEParaPortions->Count(); ++nPortion )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
- long nTmpHeight = pPortion->GetLines().size() * mnCharHeight;
+ tools::Long nTmpHeight = pPortion->GetLines().size() * mnCharHeight;
nY += nTmpHeight;
if ( nY > rDocPos.Y() )
{
@@ -1033,7 +1033,7 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara
sal_Int32 nCurIndex = 0;
- long nY = 0;
+ tools::Long nY = 0;
TextLine* pLine = nullptr;
std::vector<TextLine>::size_type nLine;
for ( nLine = 0; nLine < pPortion->GetLines().size(); nLine++ )
@@ -1061,7 +1061,7 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara
return nCurIndex;
}
-sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector<TextLine>::size_type nLine, long nXPos )
+sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector<TextLine>::size_type nLine, tools::Long nXPos )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
@@ -1069,7 +1069,7 @@ sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector<TextLine>::si
sal_Int32 nCurIndex = rLine.GetStart();
- long nTmpX = rLine.GetStartX();
+ tools::Long nTmpX = rLine.GetStartX();
if ( nXPos <= nTmpX )
return nCurIndex;
@@ -1087,7 +1087,7 @@ sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector<TextLine>::si
vcl::Font aFont;
SeekCursor( nPortion, nCurIndex+1, aFont, nullptr );
mpRefDev->SetFont( aFont);
- long nPosInPortion = nXPos-nTmpX;
+ tools::Long nPosInPortion = nXPos-nTmpX;
if ( IsRightToLeft() != pTextPortion->IsRightToLeft() )
nPosInPortion = pTextPortion->GetWidth() - nPosInPortion;
nCurIndex = mpRefDev->GetTextBreak( pPortion->GetNode()->GetText(), nPosInPortion, nCurIndex );
@@ -1100,7 +1100,7 @@ sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector<TextLine>::si
return nCurIndex;
}
-long TextEngine::GetTextHeight() const
+tools::Long TextEngine::GetTextHeight() const
{
SAL_WARN_IF( !GetUpdateMode(), "vcl", "GetTextHeight: GetUpdateMode()" );
@@ -1110,7 +1110,7 @@ long TextEngine::GetTextHeight() const
return mnCurTextHeight;
}
-long TextEngine::GetTextHeight( sal_uInt32 nParagraph ) const
+tools::Long TextEngine::GetTextHeight( sal_uInt32 nParagraph ) const
{
SAL_WARN_IF( !GetUpdateMode(), "vcl", "GetTextHeight: GetUpdateMode()" );
@@ -1120,13 +1120,13 @@ long TextEngine::GetTextHeight( sal_uInt32 nParagraph ) const
return CalcParaHeight( nParagraph );
}
-long TextEngine::CalcTextWidth( sal_uInt32 nPara )
+tools::Long TextEngine::CalcTextWidth( sal_uInt32 nPara )
{
- long nParaWidth = 0;
+ tools::Long nParaWidth = 0;
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
for ( auto nLine = pPortion->GetLines().size(); nLine; )
{
- long nLineWidth = 0;
+ tools::Long nLineWidth = 0;
TextLine& rLine = pPortion->GetLines()[ --nLine ];
for ( std::size_t nTP = rLine.GetStartPortion(); nTP <= rLine.GetEndPortion(); nTP++ )
{
@@ -1139,7 +1139,7 @@ long TextEngine::CalcTextWidth( sal_uInt32 nPara )
return nParaWidth;
}
-long TextEngine::CalcTextWidth()
+tools::Long TextEngine::CalcTextWidth()
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -1149,7 +1149,7 @@ long TextEngine::CalcTextWidth()
mnCurTextWidth = 0;
for ( sal_uInt32 nPara = mpTEParaPortions->Count(); nPara; )
{
- const long nParaWidth = CalcTextWidth( --nPara );
+ const tools::Long nParaWidth = CalcTextWidth( --nPara );
if ( nParaWidth > mnCurTextWidth )
mnCurTextWidth = nParaWidth;
}
@@ -1157,17 +1157,17 @@ long TextEngine::CalcTextWidth()
return mnCurTextWidth+1;// wider by 1, as CreateLines breaks at >=
}
-long TextEngine::CalcTextHeight()
+tools::Long TextEngine::CalcTextHeight()
{
SAL_WARN_IF( !GetUpdateMode(), "vcl", "CalcTextHeight: GetUpdateMode()" );
- long nY = 0;
+ tools::Long nY = 0;
for ( auto nPortion = mpTEParaPortions->Count(); nPortion; )
nY += CalcParaHeight( --nPortion );
return nY;
}
-long TextEngine::CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nLen )
+tools::Long TextEngine::CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nLen )
{
#ifdef DBG_UTIL
// within the text there must not be a Portion change (attribute/tab)!
@@ -1179,7 +1179,7 @@ long TextEngine::CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_I
SeekCursor( nPara, nPortionStart+1, aFont, nullptr );
mpRefDev->SetFont( aFont );
TextNode* pNode = mpDoc->GetNodes()[ nPara ].get();
- long nWidth = mpRefDev->GetTextWidth( pNode->GetText(), nPortionStart, nLen );
+ tools::Long nWidth = mpRefDev->GetTextWidth( pNode->GetText(), nPortionStart, nLen );
return nWidth;
}
@@ -1227,9 +1227,9 @@ sal_Int32 TextEngine::GetLineLen( sal_uInt32 nParagraph, sal_uInt16 nLine ) cons
return 0;
}
-long TextEngine::CalcParaHeight( sal_uInt32 nParagraph ) const
+tools::Long TextEngine::CalcParaHeight( sal_uInt32 nParagraph ) const
{
- long nHeight = 0;
+ tools::Long nHeight = 0;
TEParaPortion* pPPortion = mpTEParaPortions->GetObject( nParagraph );
SAL_WARN_IF( !pPPortion, "vcl", "GetParaHeight: paragraph not found" );
@@ -1497,7 +1497,7 @@ void TextEngine::FormatDoc()
mbIsFormatting = true;
mbHasMultiLineParas = false;
- long nY = 0;
+ tools::Long nY = 0;
bool bGrow = false;
maInvalidRect = tools::Rectangle(); // clear
@@ -1506,7 +1506,7 @@ void TextEngine::FormatDoc()
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
if ( pTEParaPortion->IsInvalid() )
{
- const long nOldParaWidth = mnCurTextWidth >= 0 ? CalcTextWidth( nPara ) : -1;
+ const tools::Long nOldParaWidth = mnCurTextWidth >= 0 ? CalcTextWidth( nPara ) : -1;
Broadcast( TextHint( SfxHintId::TextFormatPara, nPara ) );
@@ -1517,7 +1517,7 @@ void TextEngine::FormatDoc()
if ( maInvalidRect.IsEmpty() )
{
// otherwise remains Empty() for Paperwidth 0 (AutoPageSize)
- const long nWidth = mnMaxTextWidth
+ const tools::Long nWidth = mnMaxTextWidth
? mnMaxTextWidth
: std::numeric_limits<long>::max();
const Range aInvRange( GetInvalidYOffsets( nPara ) );
@@ -1531,7 +1531,7 @@ void TextEngine::FormatDoc()
if ( mnCurTextWidth >= 0 )
{
- const long nNewParaWidth = CalcTextWidth( nPara );
+ const tools::Long nNewParaWidth = CalcTextWidth( nPara );
if ( nNewParaWidth >= mnCurTextWidth )
mnCurTextWidth = nNewParaWidth;
else if ( nOldParaWidth >= mnCurTextWidth )
@@ -1549,8 +1549,8 @@ void TextEngine::FormatDoc()
if ( !maInvalidRect.IsEmpty() )
{
- const long nNewHeight = CalcTextHeight();
- const long nDiff = nNewHeight - mnCurTextHeight;
+ const tools::Long nNewHeight = CalcTextHeight();
+ const tools::Long nDiff = nNewHeight - mnCurTextHeight;
if ( nNewHeight < mnCurTextHeight )
{
maInvalidRect.SetBottom( std::max( nNewHeight, mnCurTextHeight ) );
@@ -1609,7 +1609,7 @@ void TextEngine::CreateAndInsertEmptyLine( sal_uInt32 nPara )
pTEParaPortion->GetLines().push_back( aTmpLine );
}
-void TextEngine::ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, long nRemainingWidth )
+void TextEngine::ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, tools::Long nRemainingWidth )
{
TextNode* pNode = mpDoc->GetNodes()[ nPara ].get();
@@ -1882,7 +1882,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, tools:
vcl::Window* const pOutWin = dynamic_cast<vcl::Window*>(pOutDev);
const bool bTransparent = (pOutWin && pOutWin->IsPaintTransparent());
- long nY = rStartPos.Y();
+ tools::Long nY = rStartPos.Y();
TextPaM const* pSelStart = nullptr;
TextPaM const* pSelEnd = nullptr;
@@ -1903,7 +1903,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, tools:
if ( pPortion->IsInvalid() )
return;
- const long nParaHeight = CalcParaHeight( nPara );
+ const tools::Long nParaHeight = CalcParaHeight( nPara );
if ( !pPaintArea || ( ( nY + nParaHeight ) > pPaintArea->Top() ) )
{
// for all lines of the paragraph
@@ -1925,7 +1925,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, tools:
ImpInitLayoutMode( pOutDev /*, pTextPortion->IsRightToLeft() */);
- const long nTxtWidth = pTextPortion->GetWidth();
+ const tools::Long nTxtWidth = pTextPortion->GetWidth();
aTmpPos.setX( rStartPos.X() + ImpGetOutputOffset( nPara, &rLine, nIndex, nIndex ) );
// only print if starting in the visible region
@@ -2143,9 +2143,9 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
sal_Int32 nTmpPos = nIndex;
std::size_t nTmpPortion = pLine->GetStartPortion();
- long nTmpWidth = mpDoc->GetLeftMargin();
+ tools::Long nTmpWidth = mpDoc->GetLeftMargin();
// do not subtract margin; it is included in TmpWidth
- long nXWidth = std::max(
+ tools::Long nXWidth = std::max(
mnMaxTextWidth ? mnMaxTextWidth : std::numeric_limits<long>::max(), nTmpWidth);
// search for Portion that does not fit anymore into line
@@ -2159,7 +2159,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
SAL_WARN_IF( !pPortion->GetLen(), "vcl", "CreateLines: Empty Portion!" );
if ( pNode->GetText()[ nTmpPos ] == '\t' )
{
- long nCurPos = nTmpWidth-mpDoc->GetLeftMargin();
+ tools::Long nCurPos = nTmpWidth-mpDoc->GetLeftMargin();
nTmpWidth = ((nCurPos/mnDefTab)+1)*mnDefTab+mpDoc->GetLeftMargin();
pPortion->GetWidth() = nTmpWidth - nCurPos - mpDoc->GetLeftMargin();
// infinite loop, if this is the first token of the line and nTmpWidth > aPaperSize.Width !!!
@@ -2227,20 +2227,20 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
else if ( !bEOL )
{
SAL_WARN_IF( (nPortionEnd-nPortionStart) != pPortion->GetLen(), "vcl", "CreateLines: There is a Portion after all?!" );
- const long nRemainingWidth = mnMaxTextWidth - nTmpWidth;
+ const tools::Long nRemainingWidth = mnMaxTextWidth - nTmpWidth;
ImpBreakLine( nPara, pLine, nPortionStart, nRemainingWidth );
}
if ( ( ImpGetAlign() == TxtAlign::Center ) || ( ImpGetAlign() == TxtAlign::Right ) )
{
// adjust
- long nTextWidth = 0;
+ tools::Long nTextWidth = 0;
for ( std::size_t nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
{
TETextPortion* pTextPortion = pTEParaPortion->GetTextPortions()[ nTP ];
nTextWidth += pTextPortion->GetWidth();
}
- const long nSpace = mnMaxTextWidth - nTextWidth;
+ const tools::Long nSpace = mnMaxTextWidth - nTextWidth;
if ( nSpace > 0 )
{
if ( ImpGetAlign() == TxtAlign::Center )
@@ -2712,13 +2712,13 @@ void TextEngine::ImpInitWritingDirections( sal_uInt32 nPara )
ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError );
nError = U_ZERO_ERROR;
- long nCount = ubidi_countRuns( pBidi, &nError );
+ tools::Long nCount = ubidi_countRuns( pBidi, &nError );
int32_t nStart = 0;
int32_t nEnd;
UBiDiLevel nCurrDir;
- for ( long nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( tools::Long nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
// bit 0 of nCurrDir indicates direction
@@ -2759,9 +2759,9 @@ bool TextEngine::ImpGetRightToLeft( sal_uInt32 nPara, sal_Int32 nPos )
return bRightToLeft;
}
-long TextEngine::ImpGetPortionXOffset( sal_uInt32 nPara, TextLine const * pLine, std::size_t nTextPortion )
+tools::Long TextEngine::ImpGetPortionXOffset( sal_uInt32 nPara, TextLine const * pLine, std::size_t nTextPortion )
{
- long nX = pLine->GetStartX();
+ tools::Long nX = pLine->GetStartX();
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
@@ -2851,7 +2851,7 @@ TxtAlign TextEngine::ImpGetAlign() const
return eAlign;
}
-long TextEngine::ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 )
+tools::Long TextEngine::ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
@@ -2860,7 +2860,7 @@ long TextEngine::ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int3
TETextPortion* pTextPortion = pPortion->GetTextPortions()[ nPortion ];
- long nX;
+ tools::Long nX;
if ( ( nIndex == nPortionStart ) && ( nIndex == nIndex2 ) )
{
@@ -2877,7 +2877,7 @@ long TextEngine::ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int3
nX = ImpGetXPos( nPara, pLine, nIndex, nIndex == nPortionStart );
if ( nIndex2 != nIndex )
{
- const long nX2 = ImpGetXPos( nPara, pLine, nIndex2 );
+ const tools::Long nX2 = ImpGetXPos( nPara, pLine, nIndex2 );
if ( ( !IsRightToLeft() && ( nX2 < nX ) ) ||
( IsRightToLeft() && ( nX2 > nX ) ) )
{
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 0d3cec607b20..998bd68952bb 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -312,12 +312,12 @@ void TextView::ImpHighlight( const TextSelection& rSel )
SAL_WARN_IF( mpImpl->mpTextEngine->mpIdleFormatter->IsActive(), "vcl", "ImpHighlight: Not formatted!" );
tools::Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() );
- long nY = 0;
+ tools::Long nY = 0;
const sal_uInt32 nStartPara = aSel.GetStart().GetPara();
const sal_uInt32 nEndPara = aSel.GetEnd().GetPara();
for ( sal_uInt32 nPara = 0; nPara <= nEndPara; ++nPara )
{
- const long nParaHeight = mpImpl->mpTextEngine->CalcParaHeight( nPara );
+ const tools::Long nParaHeight = mpImpl->mpTextEngine->CalcParaHeight( nPara );
if ( ( nPara >= nStartPara ) && ( ( nY + nParaHeight ) > aVisArea.Top() ) )
{
TEParaPortion* pTEParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( nPara );
@@ -879,7 +879,7 @@ void TextView::Command( const CommandEvent& rCEvt )
nInputEnd = rLine.GetEnd();
tools::Rectangle aR2 = mpImpl->mpTextEngine->PaMtoEditCursor( TextPaM( aPaM.GetPara(), nInputEnd ) );
- long nWidth = aR2.Left()-aR1.Right();
+ tools::Long nWidth = aR2.Left()-aR1.Right();
aR1.Move( -GetStartDocPos().X(), -GetStartDocPos().Y() );
GetWindow()->SetCursorRect( &aR1, nWidth );
}
@@ -907,7 +907,7 @@ void TextView::HideCursor()
mpImpl->mpCursor->Hide();
}
-void TextView::Scroll( long ndX, long ndY )
+void TextView::Scroll( tools::Long ndX, tools::Long ndY )
{
SAL_WARN_IF( !mpImpl->mpTextEngine->IsFormatted(), "vcl", "Scroll: Not formatted!" );
@@ -926,8 +926,8 @@ void TextView::Scroll( long ndX, long ndY )
if ( aNewStartPos.X() < 0 )
aNewStartPos.setX( 0 );
- long nDiffX = mpImpl->maStartDocPos.X() - aNewStartPos.X();
- long nDiffY = mpImpl->maStartDocPos.Y() - aNewStartPos.Y();
+ tools::Long nDiffX = mpImpl->maStartDocPos.X() - aNewStartPos.X();
+ tools::Long nDiffY = mpImpl->maStartDocPos.Y() - aNewStartPos.Y();
if ( nDiffX || nDiffY )
{
@@ -1360,7 +1360,7 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM )
{
TextPaM aPaM( rPaM );
- long nX;
+ tools::Long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, false ).Left();
@@ -1396,7 +1396,7 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
{
TextPaM aPaM( rPaM );
- long nX;
+ tools::Long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, false ).Left();
@@ -1512,7 +1512,7 @@ TextPaM TextView::PageDown( const TextPaM& rPaM )
Point aBottomRight = aRect.BottomRight();
aBottomRight.AdjustY(mpImpl->mpWindow->GetOutputSizePixel().Height() * 9/10 );
aBottomRight.AdjustX(1 );
- long nHeight = mpImpl->mpTextEngine->GetTextHeight();
+ tools::Long nHeight = mpImpl->mpTextEngine->GetTextHeight();
if ( aBottomRight.Y() > nHeight )
aBottomRight.setY( nHeight-1 );
@@ -1582,11 +1582,11 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
&& aOutSz.Width() && aOutSz.Height()
)
{
- long nVisStartY = mpImpl->maStartDocPos.Y();
- long nVisEndY = mpImpl->maStartDocPos.Y() + aOutSz.Height();
- long nVisStartX = mpImpl->maStartDocPos.X();
- long nVisEndX = mpImpl->maStartDocPos.X() + aOutSz.Width();
- long nMoreX = aOutSz.Width() / 4;
+ tools::Long nVisStartY = mpImpl->maStartDocPos.Y();
+ tools::Long nVisEndY = mpImpl->maStartDocPos.Y() + aOutSz.Height();
+ tools::Long nVisStartX = mpImpl->maStartDocPos.X();
+ tools::Long nVisEndX = mpImpl->maStartDocPos.X() + aOutSz.Width();
+ tools::Long nMoreX = aOutSz.Width() / 4;
Point aNewStartPos( mpImpl->maStartDocPos );
@@ -1619,7 +1619,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
// if ( !nMaxTextWidth || ( nMaxTextWidth > 0x7FFFFFFF ) )
// nMaxTextWidth = 0x7FFFFFFF;
// long nMaxX = (long)nMaxTextWidth - aOutSz.Width();
- long nMaxX = mpImpl->mpTextEngine->CalcTextWidth() - aOutSz.Width();
+ tools::Long nMaxX = mpImpl->mpTextEngine->CalcTextWidth() - aOutSz.Width();
if ( nMaxX < 0 )
nMaxX = 0;
@@ -1629,7 +1629,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
aNewStartPos.setX( nMaxX );
// Y should not be further down than needed
- long nYMax = mpImpl->mpTextEngine->GetTextHeight() - aOutSz.Height();
+ tools::Long nYMax = mpImpl->mpTextEngine->GetTextHeight() - aOutSz.Height();
if ( nYMax < 0 )
nYMax = 0;
if ( aNewStartPos.Y() > nYMax )
@@ -1641,7 +1641,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
if ( aEditCursor.Right() < aEditCursor.Left() )
{
- long n = aEditCursor.Left();
+ tools::Long n = aEditCursor.Left();
aEditCursor.SetLeft( aEditCursor.Right() );
aEditCursor.SetRight( n );
}
@@ -2125,8 +2125,8 @@ void TextView::CenterPaM( const TextPaM& rPaM )
{
// Get textview size and the corresponding y-coordinates
Size aOutSz = mpImpl->mpWindow->GetOutputSizePixel();
- long nVisStartY = mpImpl->maStartDocPos.Y();
- long nVisEndY = mpImpl->maStartDocPos.Y() + aOutSz.Height();
+ tools::Long nVisStartY = mpImpl->maStartDocPos.Y();
+ tools::Long nVisEndY = mpImpl->maStartDocPos.Y() + aOutSz.Height();
// Retrieve the coordinates of the PaM
tools::Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor(rPaM);
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 7a4bfce0f04e..785871f8cf32 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -50,7 +50,7 @@ private:
VclPtr<ScrollBar> mpVScrollBar;
VclPtr<ScrollBarBox> mpScrollBox;
- long mnTextWidth;
+ tools::Long mnTextWidth;
mutable Selection maSelection;
protected:
@@ -73,7 +73,7 @@ public:
void SetMaxTextLen(sal_Int32 nLen);
sal_Int32 GetMaxTextLen() const;
- void SetMaxTextWidth(long nMaxWidth);
+ void SetMaxTextWidth(tools::Long nMaxWidth);
void InsertText( const OUString& rStr );
OUString GetSelected() const;
@@ -139,7 +139,7 @@ void ImpVclMEdit::ImpUpdateScrollBarVis( WinBits nWinStyle )
if ( !bNeedVScroll && bAutoVScroll )
{
TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
- long nOverallTextHeight(0);
+ tools::Long nOverallTextHeight(0);
for ( sal_uInt32 i=0; i<rEngine.GetParagraphCount(); ++i )
nOverallTextHeight += rEngine.GetTextHeight( i );
if ( nOverallTextHeight > mpTextWindow->GetOutputSizePixel().Height() )
@@ -214,7 +214,7 @@ ImpVclMEdit::~ImpVclMEdit()
void ImpVclMEdit::ImpSetScrollBarRanges()
{
- const long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
+ const tools::Long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
mpVScrollBar->SetRange( Range( 0, nTextHeight-1 ) );
mpHScrollBar->SetRange( Range( 0, mnTextWidth-1 ) );
@@ -244,7 +244,7 @@ void ImpVclMEdit::ImpInitScrollBars()
void ImpVclMEdit::ImpSetHScrollBarThumbPos()
{
- long nX = mpTextWindow->GetTextView()->GetStartDocPos().X();
+ tools::Long nX = mpTextWindow->GetTextView()->GetStartDocPos().X();
if ( !mpTextWindow->GetTextEngine()->IsRightToLeft() )
mpHScrollBar->SetThumbPos( nX );
else
@@ -254,7 +254,7 @@ void ImpVclMEdit::ImpSetHScrollBarThumbPos()
IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar, void )
{
- long nDiffX = 0, nDiffY = 0;
+ tools::Long nDiffX = 0, nDiffY = 0;
if ( pCurScrollBar == mpVScrollBar )
nDiffY = mpTextWindow->GetTextView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos();
@@ -319,7 +319,7 @@ OUString ImpVclMEdit::GetSelected( LineEnd aSeparator ) const
return mpTextWindow->GetTextView()->GetSelected( aSeparator );
}
-void ImpVclMEdit::SetMaxTextWidth(long nMaxWidth)
+void ImpVclMEdit::SetMaxTextWidth(tools::Long nMaxWidth)
{
mpTextWindow->GetTextEngine()->SetMaxTextWidth(nMaxWidth);
}
@@ -335,7 +335,7 @@ void ImpVclMEdit::Resize()
Size aSz = pVclMultiLineEdit->GetOutputSizePixel();
Size aEditSize = aSz;
- long nSBWidth = pVclMultiLineEdit->GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nSBWidth = pVclMultiLineEdit->GetSettings().GetStyleSettings().GetScrollBarSize();
nSBWidth = pVclMultiLineEdit->CalcZoom( nSBWidth );
if (mpHScrollBar->IsVisible())
@@ -453,8 +453,8 @@ void ImpVclMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
case SfxHintId::TextHeightChanged:
if ( mpTextWindow->GetTextView()->GetStartDocPos().Y() )
{
- long nOutHeight = mpTextWindow->GetOutputSizePixel().Height();
- long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
+ tools::Long nOutHeight = mpTextWindow->GetOutputSizePixel().Height();
+ tools::Long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
if ( nTextHeight < nOutHeight )
mpTextWindow->GetTextView()->Scroll( 0, mpTextWindow->GetTextView()->GetStartDocPos().Y() );
}
@@ -464,7 +464,7 @@ void ImpVclMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
case SfxHintId::TextFormatted:
if (mpHScrollBar->IsVisible())
{
- const long nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
+ const tools::Long nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
if ( nWidth != mnTextWidth )
{
mnTextWidth = nWidth;
@@ -505,11 +505,11 @@ void ImpVclMEdit::SetSelection( const Selection& rSelection )
else if ( aNewSelection.Max() > aText.getLength() )
aNewSelection.Max() = aText.getLength();
- long nEnd = std::max( aNewSelection.Min(), aNewSelection.Max() );
+ tools::Long nEnd = std::max( aNewSelection.Min(), aNewSelection.Max() );
TextSelection aTextSel;
sal_uInt32 nPara = 0;
sal_Int32 nChar = 0;
- long x = 0;
+ tools::Long x = 0;
while ( x <= nEnd )
{
if ( x == aNewSelection.Min() )
@@ -1055,7 +1055,7 @@ void VclMultiLineEdit::SetMaxTextLen(sal_Int32 nMaxLen)
pImpVclMEdit->SetMaxTextLen(nMaxLen);
}
-void VclMultiLineEdit::SetMaxTextWidth(long nMaxWidth)
+void VclMultiLineEdit::SetMaxTextWidth(tools::Long nMaxWidth)
{
pImpVclMEdit->SetMaxTextWidth(nMaxWidth );
}
@@ -1163,9 +1163,9 @@ Size VclMultiLineEdit::CalcAdjustedSize( const Size& rPrefSize ) const
// center vertically for whole lines
- long nHeight = aSz.Height() - nTop - nBottom;
- long nLineHeight = pImpVclMEdit->CalcBlockSize( 1, 1 ).Height();
- long nLines = nHeight / nLineHeight;
+ tools::Long nHeight = aSz.Height() - nTop - nBottom;
+ tools::Long nLineHeight = pImpVclMEdit->CalcBlockSize( 1, 1 ).Height();
+ tools::Long nLines = nHeight / nLineHeight;
if ( nLines < 1 )
nLines = 1;
@@ -1315,9 +1315,9 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nF
if ( !nLines )
nLines = 1;
aTextSz.setHeight( nLines*aTextSz.Height() );
- long nOnePixel = GetDrawPixel( pDev, 1 );
- long nOffX = 3*nOnePixel;
- long nOffY = 2*nOnePixel;
+ tools::Long nOnePixel = GetDrawPixel( pDev, 1 );
+ tools::Long nOffX = 3*nOnePixel;
+ tools::Long nOffY = 2*nOnePixel;
// Clipping?
if ( ( nOffY < 0 ) || ( (nOffY+aTextSz.Height()) > aSize.Height() ) || ( (nOffX+aTextSz.Width()) > aSize.Width() ) )
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index ba38ec00964e..dd6c556b9a19 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1259,7 +1259,7 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
{
SvMemoryStream aMemStream;
ZCodec aCodec;
- long nMemoryLength;
+ tools::Long nMemoryLength;
aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true);
nMemoryLength = aCodec.Decompress(rIStream, aMemStream);
@@ -1588,7 +1588,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
{
SvMemoryStream aMemStream;
ZCodec aCodec;
- long nMemoryLength;
+ tools::Long nMemoryLength;
aCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true);
nMemoryLength = aCodec.Decompress(rIStream, aMemStream);
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 07f29e9d384c..7751cc359f85 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -70,8 +70,8 @@ class GIFReader : public GraphicReader
std::unique_ptr<GIFLZWDecompressor> pDecomp;
BitmapScopedWriteAccess pAcc8;
BitmapScopedWriteAccess pAcc1;
- long nYAcc;
- long nLastPos;
+ tools::Long nYAcc;
+ tools::Long nLastPos;
sal_uInt64 nMaxStreamData;
sal_uInt32 nLogWidth100;
sal_uInt32 nLogHeight100;
@@ -102,7 +102,7 @@ class GIFReader : public GraphicReader
void ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount );
void ClearImageExtensions();
- void CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, bool bWatchForBackgroundColor );
+ void CreateBitmaps( tools::Long nWidth, tools::Long nHeight, BitmapPalette* pPal, bool bWatchForBackgroundColor );
bool ReadGlobalHeader();
bool ReadExtension();
bool ReadLocalHeader();
@@ -168,7 +168,7 @@ void GIFReader::ClearImageExtensions()
nTimer = 0;
}
-void GIFReader::CreateBitmaps(long nWidth, long nHeight, BitmapPalette* pPal,
+void GIFReader::CreateBitmaps(tools::Long nWidth, tools::Long nHeight, BitmapPalette* pPal,
bool bWatchForBackgroundColor)
{
const Size aSize(nWidth, nHeight);
@@ -556,13 +556,13 @@ void GIFReader::FillImages( const sal_uInt8* pBytes, sal_uLong nCount )
{
if( bInterlaced )
{
- long nT1;
+ tools::Long nT1;
// lines will be copied if interlaced
if( nLastInterCount )
{
- long nMinY = std::min( static_cast<long>(nLastImageY) + 1, static_cast<long>(nImageHeight) - 1 );
- long nMaxY = std::min( static_cast<long>(nLastImageY) + nLastInterCount, static_cast<long>(nImageHeight) - 1 );
+ tools::Long nMinY = std::min( static_cast<tools::Long>(nLastImageY) + 1, static_cast<tools::Long>(nImageHeight) - 1 );
+ tools::Long nMaxY = std::min( static_cast<tools::Long>(nLastImageY) + nLastInterCount, static_cast<tools::Long>(nImageHeight) - 1 );
// copy last line read, if lines do not coincide
// ( happens at the end of the image )
@@ -579,7 +579,7 @@ void GIFReader::FillImages( const sal_uInt8* pBytes, sal_uLong nCount )
nSize1 = pAcc1->GetScanlineSize();
}
- for( long j = nMinY; j <= nMaxY; j++ )
+ for( tools::Long j = nMinY; j <= nMaxY; j++ )
{
memcpy( pAcc8->GetScanline( j ), pScanline8, nSize8 );
@@ -594,7 +594,7 @@ void GIFReader::FillImages( const sal_uInt8* pBytes, sal_uLong nCount )
if( nT1 >= nImageHeight )
{
- long nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 );
+ tools::Long nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 );
nT1 = ( nT2 << 3 ) + 4;
nLastInterCount = 3;
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index db6c9d1bdd31..43cb80d50cee 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -462,8 +462,8 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vector<PDFGraphicResult>& rG
// 1 pt = 20 twips
constexpr double pointToTwipconversionRatio = 20;
- long nPageWidth = convertTwipToMm100(aPageSize.getX() * pointToTwipconversionRatio);
- long nPageHeight = convertTwipToMm100(aPageSize.getY() * pointToTwipconversionRatio);
+ tools::Long nPageWidth = convertTwipToMm100(aPageSize.getX() * pointToTwipconversionRatio);
+ tools::Long nPageHeight = convertTwipToMm100(aPageSize.getY() * pointToTwipconversionRatio);
auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(
aPdfDataArray, OUString(), VectorGraphicDataType::Pdf, nPageIndex);
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index 76d41bf22d6d..0d1269ac5586 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -51,9 +51,9 @@ class XBMReader : public GraphicReader
pHexTable;
BitmapColor aWhite;
BitmapColor aBlack;
- long nLastPos;
- long nWidth;
- long nHeight;
+ tools::Long nLastPos;
+ tools::Long nWidth;
+ tools::Long nHeight;
bool bStatus;
void InitTable();
@@ -193,10 +193,10 @@ int XBMReader::ParseDefine( const char* pDefine )
void XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat )
{
OString aLine;
- long nRow = 0;
- long nCol = 0;
- long nBits = ( eFormat == XBM10 ) ? 16 : 8;
- long nBit;
+ tools::Long nRow = 0;
+ tools::Long nCol = 0;
+ tools::Long nBits = ( eFormat == XBM10 ) ? 16 : 8;
+ tools::Long nBit;
sal_uInt16 nValue;
sal_uInt16 nDigits;
bool bFirstLine = true;
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 1e47bfe9d765..ef6b7082818e 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -68,7 +68,7 @@ private:
BitmapScopedWriteAccess mpAcc;
Bitmap maMaskBmp;
BitmapScopedWriteAccess mpMaskAcc;
- long mnLastPos;
+ tools::Long mnLastPos;
sal_uLong mnWidth;
sal_uLong mnHeight;
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 0ea4ef493886..3b3b75204f81 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -52,15 +52,15 @@ static void init_source (j_decompress_ptr cinfo)
}
-static long StreamRead( SvStream* pStream, void* pBuffer, long nBufferSize )
+static tools::Long StreamRead( SvStream* pStream, void* pBuffer, tools::Long nBufferSize )
{
- long nRead = 0;
+ tools::Long nRead = 0;
if( pStream->GetError() != ERRCODE_IO_PENDING )
{
- long nInitialPosition = pStream->Tell();
+ tools::Long nInitialPosition = pStream->Tell();
- nRead = static_cast<long>(pStream->ReadBytes(pBuffer, nBufferSize));
+ nRead = static_cast<tools::Long>(pStream->ReadBytes(pBuffer, nBufferSize));
if( pStream->GetError() == ERRCODE_IO_PENDING )
{
@@ -105,7 +105,7 @@ static boolean fill_input_buffer (j_decompress_ptr cinfo)
return TRUE;
}
-static void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes)
+static void skip_input_data (j_decompress_ptr cinfo, tools::Long numberOfBytes)
{
SourceManagerStruct * source = reinterpret_cast<SourceManagerStruct *>(cinfo->src);
@@ -116,9 +116,9 @@ static void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes)
if (numberOfBytes <= 0)
return;
- while (numberOfBytes > static_cast<long>(source->pub.bytes_in_buffer))
+ while (numberOfBytes > static_cast<tools::Long>(source->pub.bytes_in_buffer))
{
- numberOfBytes -= static_cast<long>(source->pub.bytes_in_buffer);
+ numberOfBytes -= static_cast<tools::Long>(source->pub.bytes_in_buffer);
(void) fill_input_buffer(cinfo);
/* note we assume that fill_input_buffer will never return false,
@@ -242,7 +242,7 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam const & rParam)
return true;
}
-Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
+Graphic JPEGReader::CreateIntermediateGraphic(tools::Long nLines)
{
Graphic aGraphic;
const Size aSizePixel(mpBitmap->GetSizePixel());
@@ -255,7 +255,7 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
if (nLines && (nLines < aSizePixel.Height()))
{
- const long nNewLines = nLines - mnLastLines;
+ const tools::Long nNewLines = nLines - mnLastLines;
if (nNewLines > 0)
{
@@ -291,7 +291,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic, GraphicFilterImportFlags nImportF
mrStream.Seek( mnLastPos );
// read the (partial) image
- long nLines;
+ tools::Long nLines;
ReadJPEG( this, &mrStream, &nLines, nImportFlags, ppAccess );
auto bUseExistingBitmap = static_cast<bool>(nImportFlags & GraphicFilterImportFlags::UseExistingBitmap);
diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx
index c6a8ef9275af..3dc78ce50e32 100644
--- a/vcl/source/filter/jpeg/JpegReader.hxx
+++ b/vcl/source/filter/jpeg/JpegReader.hxx
@@ -51,11 +51,11 @@ class JPEGReader : public GraphicReader
std::unique_ptr<Bitmap> mpBitmap;
std::unique_ptr<Bitmap> mpIncompleteAlpha;
- long mnLastPos;
- long mnLastLines;
+ tools::Long mnLastPos;
+ tools::Long mnLastLines;
bool mbSetLogSize;
- Graphic CreateIntermediateGraphic(long nLines);
+ Graphic CreateIntermediateGraphic(tools::Long nLines);
public:
JPEGReader( SvStream& rStream, GraphicFilterImportFlags nImportFlags );
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index da0774667545..9df9c9129ff4 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -136,7 +136,7 @@ JPEGWriter::JPEGWriter( SvStream& rStream, const css::uno::Sequence< css::beans:
}
}
-void* JPEGWriter::GetScanline( long nY )
+void* JPEGWriter::GetScanline( tools::Long nY )
{
void* pScanline = nullptr;
@@ -149,13 +149,13 @@ void* JPEGWriter::GetScanline( long nY )
else if( mpBuffer )
{
BitmapColor aColor;
- long nWidth = mpReadAccess->Width();
+ tools::Long nWidth = mpReadAccess->Width();
sal_uInt8* pTmp = mpBuffer;
if( mpReadAccess->HasPalette() )
{
Scanline pScanlineRead = mpReadAccess->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
aColor = mpReadAccess->GetPaletteColor( mpReadAccess->GetIndexFromData( pScanlineRead, nX ) );
*pTmp++ = aColor.GetRed();
@@ -169,7 +169,7 @@ void* JPEGWriter::GetScanline( long nY )
else
{
Scanline pScanlineRead = mpReadAccess->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
aColor = mpReadAccess->GetPixelFromData( pScanlineRead, nX );
*pTmp++ = aColor.GetRed();
@@ -219,12 +219,12 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
{ // check if source is greyscale only
bool bIsGrey = true;
- long nWidth = mpReadAccess->Width();
- for ( long nY = 0; bIsGrey && ( nY < mpReadAccess->Height() ); nY++ )
+ tools::Long nWidth = mpReadAccess->Width();
+ for ( tools::Long nY = 0; bIsGrey && ( nY < mpReadAccess->Height() ); nY++ )
{
BitmapColor aColor;
Scanline pScanlineRead = mpReadAccess->GetScanline( nY );
- for( long nX = 0; bIsGrey && ( nX < nWidth ); nX++ )
+ for( tools::Long nX = 0; bIsGrey && ( nX < nWidth ); nX++ )
{
aColor = mpReadAccess->HasPalette() ? mpReadAccess->GetPaletteColor( mpReadAccess->GetIndexFromData( pScanlineRead, nX ) )
: mpReadAccess->GetPixelFromData( pScanlineRead, nX );
diff --git a/vcl/source/filter/jpeg/JpegWriter.hxx b/vcl/source/filter/jpeg/JpegWriter.hxx
index a8e7f25664e3..4c96fe34361b 100644
--- a/vcl/source/filter/jpeg/JpegWriter.hxx
+++ b/vcl/source/filter/jpeg/JpegWriter.hxx
@@ -46,7 +46,7 @@ public:
const css::uno::Sequence< css::beans::PropertyValue >* pFilterData,
bool* pExportWasGrey );
- void* GetScanline( long nY );
+ void* GetScanline( tools::Long nY );
bool Write( const Graphic& rGraphic );
};
diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h
index 2f951e065934..908eee030d88 100644
--- a/vcl/source/filter/jpeg/jpeg.h
+++ b/vcl/source/filter/jpeg/jpeg.h
@@ -42,15 +42,15 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile);
void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile);
bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
- long nWidth, long nHeight, basegfx::B2DSize const & aPPI, bool bGreyScale,
- long nQualityPercent, long aChromaSubsampling,
+ tools::Long nWidth, tools::Long nHeight, basegfx::B2DSize const & aPPI, bool bGreyScale,
+ tools::Long nQualityPercent, tools::Long aChromaSubsampling,
css::uno::Reference<css::task::XStatusIndicator> const & status);
-void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
+void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, tools::Long* pLines,
GraphicFilterImportFlags nImportFlags,
BitmapScopedWriteAccess* ppAccess );
-void Transform(void* pInputStream, void* pOutputStream, long nAngle);
+void Transform(void* pInputStream, void* pOutputStream, tools::Long nAngle);
/* Expanded data source object for stdio input */
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 0270cc448e82..804278ec8300 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -154,7 +154,7 @@ struct JpegStuff
}
-static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
+static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream, tools::Long* pLines,
GraphicFilterImportFlags nImportFlags,
BitmapScopedWriteAccess* ppAccess)
{
@@ -182,10 +182,10 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
jpeg_calc_output_dimensions(&rContext.cinfo);
- long nWidth = rContext.cinfo.output_width;
- long nHeight = rContext.cinfo.output_height;
+ tools::Long nWidth = rContext.cinfo.output_width;
+ tools::Long nHeight = rContext.cinfo.output_height;
- long nResult = 0;
+ tools::Long nResult = 0;
if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nWidth, nHeight, nResult) || nResult > 4000000))
return;
@@ -284,7 +284,7 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
{
// convert CMYK to RGB
Scanline pScanline = pAccess->GetScanline(yIndex);
- for (long cmyk = 0, x = 0; cmyk < nWidth * 4; cmyk += 4, ++x)
+ for (tools::Long cmyk = 0, x = 0; cmyk < nWidth * 4; cmyk += 4, ++x)
{
int color_C = 255 - rContext.pCYMKBuffer[cmyk + 0];
int color_M = 255 - rContext.pCYMKBuffer[cmyk + 1];
@@ -324,7 +324,7 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
}
}
-void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
+void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, tools::Long* pLines,
GraphicFilterImportFlags nImportFlags,
BitmapScopedWriteAccess* ppAccess )
{
@@ -333,14 +333,14 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
}
bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
- long nWidth, long nHeight, basegfx::B2DSize const & rPPI, bool bGreys,
- long nQualityPercent, long aChromaSubsampling,
+ tools::Long nWidth, tools::Long nHeight, basegfx::B2DSize const & rPPI, bool bGreys,
+ tools::Long nQualityPercent, tools::Long aChromaSubsampling,
css::uno::Reference<css::task::XStatusIndicator> const & status )
{
jpeg_compress_struct cinfo;
ErrorManagerStruct jerr;
void* pScanline;
- long nY;
+ tools::Long nY;
JpegCompressOwner aOwner;
@@ -425,7 +425,7 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
return true;
}
-void Transform(void* pInputStream, void* pOutputStream, long nAngle)
+void Transform(void* pInputStream, void* pOutputStream, tools::Long nAngle)
{
jpeg_transform_info aTransformOption;
JCOPY_OPTION aCopyOption = JCOPYOPT_ALL;
diff --git a/vcl/source/filter/png/pngread.cxx b/vcl/source/filter/png/pngread.cxx
index 923588ad7e32..8ab3cc216a8d 100644
--- a/vcl/source/filter/png/pngread.cxx
+++ b/vcl/source/filter/png/pngread.cxx
@@ -964,7 +964,7 @@ bool PNGReaderImpl::ImplPreparePass()
// in Interlace mode the size of scanline is not constant
// so first we calculate the number of entries
- long nScanWidth = (maOrigSize.Width() - mnXStart + mnXAdd - 1) / mnXAdd;
+ tools::Long nScanWidth = (maOrigSize.Width() - mnXStart + mnXAdd - 1) / mnXAdd;
mnScansize = nScanWidth;
if( mbRGBTriple )
@@ -1148,7 +1148,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mbTransparent )
{
- for ( long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
+ for ( tools::Long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
{
sal_uInt8 nCol;
nShift = (nShift - 1) & 7;
@@ -1163,7 +1163,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{ // ScanlineFormat::N1BitMsbPal
- for ( long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
+ for ( tools::Long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
{
nShift = (nShift - 1) & 7;
@@ -1186,7 +1186,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mnPngDepth == 4 ) // check if source has a two bit pixel format
{
- for ( long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, ++nXIndex )
+ for ( tools::Long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, ++nXIndex )
{
if( nXIndex & 1 )
{
@@ -1201,7 +1201,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else // if ( mnPngDepth == 2 )
{
- for ( long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
+ for ( tools::Long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
sal_uInt8 nCol;
switch( nXIndex & 3 )
@@ -1235,7 +1235,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mnPngDepth == 4 ) // maybe the source is a two bitmap graphic
{ // ScanlineFormat::N4BitLsnPal
- for ( long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
+ for ( tools::Long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
if( nXIndex & 1 )
ImplSetPixel( nY, nX, *pTmp++ & 0x0f );
@@ -1245,7 +1245,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else // if ( mnPngDepth == 2 )
{
- for ( long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
+ for ( tools::Long nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
switch( nXIndex & 3 )
{
@@ -1277,13 +1277,13 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
ImplSetAlphaPixel( nY, nX, pTmp[ 0 ], pTmp[ 1 ] );
}
else
{
assert(mnPngDepth == 16);
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 4 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 4 )
ImplSetAlphaPixel( nY, nX, pTmp[ 0 ], pTmp[ 2 ] );
}
}
@@ -1291,12 +1291,12 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp++ )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp++ )
ImplSetAlphaPixel( nY, nX, *pTmp, mpTransTab[ *pTmp ] );
}
else if (mnPngDepth == 1 )
{
- for ( long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
+ for ( tools::Long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
{
nShift = (nShift - 1) & 7;
@@ -1312,7 +1312,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
ImplSetAlphaPixel( nY, nX, *pTmp, mpTransTab[ *pTmp ] );
}
}
@@ -1329,13 +1329,13 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd )
ImplSetPixel( nY, nX, *pTmp++ );
}
}
else if (mnPngDepth == 1 )
{
- for ( long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
+ for ( tools::Long nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
{
nShift = (nShift - 1) & 7;
@@ -1351,7 +1351,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
ImplSetPixel( nY, nX, *pTmp );
}
}
@@ -1407,7 +1407,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
sal_uInt8* pScanline(mpScanline.get());
sal_uInt8* pScanlineAlpha(mpScanlineAlpha.get());
- for (long nX(0); nX < maOrigSize.Width(); nX++, pTmp += 4)
+ for (tools::Long nX(0); nX < maOrigSize.Width(); nX++, pTmp += 4)
{
// prepare content line as BGR by reordering when copying
// do not forget to invert alpha (source is alpha, target is opacity)
@@ -1434,7 +1434,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 4 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 4 )
{
if(bCustomColorTable)
{
@@ -1464,7 +1464,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
else
{
// BMP_FORMAT_64BIT_TC_RGBA
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 8 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 8 )
{
ImplSetAlphaPixel(
nY,
@@ -1483,7 +1483,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
// no support currently for DirectScanline, found no real usages in current PNGs, may be added on demand
if ( mnPngDepth == 8 ) // maybe the source has 16 bit per sample
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 3 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 3 )
{
sal_uInt8 nRed = pTmp[ 0 ];
sal_uInt8 nGreen = pTmp[ 1 ];
@@ -1500,7 +1500,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
else
{
// BMP_FORMAT_48BIT_TC_RGB
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 6 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 6 )
{
sal_uInt8 nRed = pTmp[ 0 ];
sal_uInt8 nGreen = pTmp[ 2 ];
@@ -1542,7 +1542,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
#endif
sal_uInt8* pScanline(mpScanline.get());
- for (long nX(0); nX < maOrigSize.Width(); nX++, pTmp += 3)
+ for (tools::Long nX(0); nX < maOrigSize.Width(); nX++, pTmp += 3)
{
// prepare content line as BGR by reordering when copying
if(bCustomColorTable)
@@ -1565,7 +1565,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 3 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 3 )
{
if(bCustomColorTable)
{
@@ -1594,7 +1594,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
// BMP_FORMAT_48BIT_TC_RGB
// no support currently for DirectScanline, found no real usages in current PNGs, may be added on demand
- for ( long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 6 )
+ for ( tools::Long nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 6 )
{
ImplSetPixel(
nY,
diff --git a/vcl/source/filter/png/pngwrite.cxx b/vcl/source/filter/png/pngwrite.cxx
index 720a5d10f3cb..740f84830614 100644
--- a/vcl/source/filter/png/pngwrite.cxx
+++ b/vcl/source/filter/png/pngwrite.cxx
@@ -624,10 +624,10 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
na = nc = 0;
}
- long np = na + nb - nc;
- long npa = np - na;
- long npb = np - nb;
- long npc = np - nc;
+ tools::Long np = na + nb - nc;
+ tools::Long npa = np - na;
+ tools::Long npb = np - nb;
+ tools::Long npc = np - nc;
if (npa < 0)
npa =-npa;
@@ -646,7 +646,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
p4++;
p2++;
}
- for (long i = 0; i < static_cast<long>(mnDeflateInSize - 1); i++)
+ for (tools::Long i = 0; i < static_cast<tools::Long>(mnDeflateInSize - 1); i++)
{
mpPreviousScan[i] = mpCurrentScan[i + 1];
}
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index e02fa107d233..754f1d46386c 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -586,7 +586,7 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
ImplEndRecord();
}
-void EMFWriter::ImplWriteExtent( long nExtent )
+void EMFWriter::ImplWriteExtent( tools::Long nExtent )
{
nExtent = OutputDevice::LogicToLogic( Size( nExtent, 0 ), maVDev->GetMapMode(), maDestMapMode ).Width();
m_rStm.WriteInt32( nExtent );
@@ -838,7 +838,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
}
-void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth )
+void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, const tools::Long* pDXArray, sal_uInt32 nWidth )
{
sal_Int32 nLen = rText.getLength(), i;
@@ -847,7 +847,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c
sal_uInt32 nNormWidth;
std::unique_ptr<long[]> pOwnArray;
- long* pDX;
+ tools::Long* pDX;
// get text sizes
if( pDXArray )
@@ -1184,7 +1184,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const Size aDestSize( pA->GetSize() );
const double fScaleX = aSrcSize.Width() ? static_cast<double>(aDestSize.Width()) / aSrcSize.Width() : 1.0;
const double fScaleY = aSrcSize.Height() ? static_cast<double>(aDestSize.Height()) / aSrcSize.Height() : 1.0;
- long nMoveX, nMoveY;
+ tools::Long nMoveX, nMoveY;
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index e227010ac925..31149b976db1 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -67,7 +67,7 @@ private:
void ImplWriteColor( const Color& rColor );
void ImplWriteRasterOp( RasterOp eRop );
- void ImplWriteExtent( long nExtent );
+ void ImplWriteExtent( tools::Long nExtent );
void ImplWritePoint( const Point& rPoint );
void ImplWriteSize( const Size& rSize);
void ImplWriteRect( const tools::Rectangle& rRect );
@@ -75,7 +75,7 @@ private:
void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose );
void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly );
void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP );
- void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth );
+ void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const tools::Long* pDXArray, sal_uInt32 nWidth );
void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
void ImplWrite( const GDIMetaFile& rMtf );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 3e0d048c925a..0ecbbc9be36e 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -441,7 +441,7 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In
/* if return value is true, then a complete unicode string and also a polygon replacement has been written,
so there is no more action necessary
*/
-bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rUniStr, const long* pDXAry )
+bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rUniStr, const tools::Long* pDXAry )
{
bool bEscapeUsed = false;
@@ -546,7 +546,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& r
void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
const OUString& rString,
- const long* pDXAry )
+ const tools::Long* pDXAry )
{
sal_Int32 nOriginalTextLen = rString.getLength();
@@ -561,7 +561,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
}
void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString,
- const OString& rByteString, const long* pDXAry )
+ const OString& rByteString, const tools::Long* pDXAry )
{
WriteRecordHeader( 0, W_META_EXTTEXTOUT );
WritePointYX( rPoint );
@@ -683,7 +683,7 @@ void WMFWriter::WMFRecord_RestoreDC()
pWMF->WriteInt16( -1 );
}
-void WMFWriter::WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound)
+void WMFWriter::WMFRecord_RoundRect(const tools::Rectangle & rRect, tools::Long nHorzRound, tools::Long nVertRound)
{
WriteRecordHeader(0x00000009,W_META_ROUNDRECT);
WriteHeightWidth(Size(nHorzRound,nVertRound));
@@ -1412,7 +1412,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
else
aX += BigInt( aScaleX.GetNumerator()/2 );
aX /= BigInt( aScaleX.GetNumerator() );
- aOrigin.setX( static_cast<long>(aX) + aMM.GetOrigin().X() );
+ aOrigin.setX( static_cast<tools::Long>(aX) + aMM.GetOrigin().X() );
BigInt aY( aOrigin.Y() );
aY *= BigInt( aScaleY.GetDenominator() );
if( aOrigin.Y() >= 0 )
@@ -1426,7 +1426,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
else
aY += BigInt( aScaleY.GetNumerator()/2 );
aY /= BigInt( aScaleY.GetNumerator() );
- aOrigin.setY( static_cast<long>(aY) + aMM.GetOrigin().Y() );
+ aOrigin.setY( static_cast<tools::Long>(aY) + aMM.GetOrigin().Y() );
aSrcMapMode.SetOrigin( aOrigin );
aScaleX *= aSrcMapMode.GetScaleX();
@@ -1564,7 +1564,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
const Size aDestSize( pA->GetSize() );
const double fScaleX = aSrcSize.Width() ? static_cast<double>(aDestSize.Width()) / aSrcSize.Width() : 1.0;
const double fScaleY = aSrcSize.Height() ? static_cast<double>(aDestSize.Height()) / aSrcSize.Height() : 1.0;
- long nMoveX, nMoveY;
+ tools::Long nMoveX, nMoveY;
aSrcLineInfo = LineInfo();
SetAllAttr();
@@ -1713,7 +1713,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
{
aTargetMapMode = MapMode( MapUnit::MapInch );
- const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width();
+ const tools::Long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width();
const Fraction aFrac( 1, nUnit );
aTargetMapMode.SetScaleX( aFrac );
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 49fef35322b0..ac0e0db66237 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -142,11 +142,11 @@ private:
void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
void WMFRecord_Ellipse(const tools::Rectangle& rRect);
void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData );
- bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const long* pDXAry );
- void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, const long* pDXAry);
+ bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const tools::Long* pDXAry );
+ void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, const tools::Long* pDXAry);
void TrueExtTextOut(const Point& rPoint, const OUString& rString,
- const OString& rByteString, const long* pDXAry);
+ const OString& rByteString, const tools::Long* pDXAry);
void TrueTextOut(const Point& rPoint, const OString& rString);
void WMFRecord_LineTo(const Point & rPoint);
void WMFRecord_MoveTo(const Point & rPoint);
@@ -156,7 +156,7 @@ private:
void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly);
void WMFRecord_Rectangle(const tools::Rectangle & rRect);
void WMFRecord_RestoreDC();
- void WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound);
+ void WMFRecord_RoundRect(const tools::Rectangle & rRect, tools::Long nHorzRound, tools::Long nVertRound);
void WMFRecord_SaveDC();
void WMFRecord_SelectObject(sal_uInt16 nObjectHandle);
void WMFRecord_SetBkMode(bool bTransparent);
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 20465f3a6ec2..8ea23f0b8659 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -408,7 +408,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamilyByAttributes( ImplFont
ImplInitMatchData();
PhysicalFontFamily* pFoundData = nullptr;
- long nBestMatch = 40000;
+ tools::Long nBestMatch = 40000;
ImplFontAttrs nBestType = ImplFontAttrs::None;
for (auto const& family : maPhysicalFontFamilies)
@@ -433,7 +433,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamilyByAttributes( ImplFont
// Otherstyle, +Special, +Decorative,
// 1000 Typewriter, Rounded, Gothic, Schollbook
// 100
- long nTestMatch = 0;
+ tools::Long nTestMatch = 0;
// test CJK script attributes
if ( nSearchType & ImplFontAttrs::CJK )
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 18f1aa0cd939..f9ca44f061f9 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -671,10 +671,10 @@ const OUString& Font::GetFamilyName() const { return mpImplFont->GetFamilyName()
const OUString& Font::GetStyleName() const { return mpImplFont->maStyleName; }
const Size& Font::GetFontSize() const { return mpImplFont->GetFontSize(); }
-void Font::SetFontHeight( long nHeight ) { SetFontSize( Size( mpImplFont->GetFontSize().Width(), nHeight ) ); }
-long Font::GetFontHeight() const { return mpImplFont->GetFontSize().Height(); }
-void Font::SetAverageFontWidth( long nWidth ) { SetFontSize( Size( nWidth, mpImplFont->GetFontSize().Height() ) ); }
-long Font::GetAverageFontWidth() const { return mpImplFont->GetFontSize().Width(); }
+void Font::SetFontHeight( tools::Long nHeight ) { SetFontSize( Size( mpImplFont->GetFontSize().Width(), nHeight ) ); }
+tools::Long Font::GetFontHeight() const { return mpImplFont->GetFontSize().Height(); }
+void Font::SetAverageFontWidth( tools::Long nWidth ) { SetFontSize( Size( nWidth, mpImplFont->GetFontSize().Height() ) ); }
+tools::Long Font::GetAverageFontWidth() const { return mpImplFont->GetFontSize().Width(); }
rtl_TextEncoding Font::GetCharSet() const { return mpImplFont->GetCharSet(); }
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index f1427dfadb98..90873445bca1 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -125,7 +125,7 @@ ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData )
void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
{
- long nDescent = mnDescent;
+ tools::Long nDescent = mnDescent;
if ( nDescent <= 0 )
{
nDescent = mnAscent / 10;
@@ -139,38 +139,38 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
if( 3*nDescent > mnAscent )
nDescent = mnAscent / 3;
- long nLineHeight = ((nDescent*25)+50) / 100;
+ tools::Long nLineHeight = ((nDescent*25)+50) / 100;
if ( !nLineHeight )
nLineHeight = 1;
- long nLineHeight2 = nLineHeight / 2;
+ tools::Long nLineHeight2 = nLineHeight / 2;
if ( !nLineHeight2 )
nLineHeight2 = 1;
- long nBLineHeight = ((nDescent*50)+50) / 100;
+ tools::Long nBLineHeight = ((nDescent*50)+50) / 100;
if ( nBLineHeight == nLineHeight )
nBLineHeight++;
- long nBLineHeight2 = nBLineHeight/2;
+ tools::Long nBLineHeight2 = nBLineHeight/2;
if ( !nBLineHeight2 )
nBLineHeight2 = 1;
- long n2LineHeight = ((nDescent*16)+50) / 100;
+ tools::Long n2LineHeight = ((nDescent*16)+50) / 100;
if ( !n2LineHeight )
n2LineHeight = 1;
- long n2LineDY = n2LineHeight;
+ tools::Long n2LineDY = n2LineHeight;
/* #117909#
* add some pixels to minimum double line distance on higher resolution devices
*/
- long nMin2LineDY = 1 + pDev->GetDPIY()/150;
+ tools::Long nMin2LineDY = 1 + pDev->GetDPIY()/150;
if ( n2LineDY < nMin2LineDY )
n2LineDY = nMin2LineDY;
- long n2LineDY2 = n2LineDY/2;
+ tools::Long n2LineDY2 = n2LineDY/2;
if ( !n2LineDY2 )
n2LineDY2 = 1;
const vcl::Font& rFont ( pDev->GetFont() );
bool bCJKVertical = MsLangId::isCJK(rFont.GetLanguage()) && rFont.IsVertical();
- long nUnderlineOffset = bCJKVertical ? mnDescent : (mnDescent/2 + 1);
- long nStrikeoutOffset = -((mnAscent - mnIntLeading) / 3);
+ tools::Long nUnderlineOffset = bCJKVertical ? mnDescent : (mnDescent/2 + 1);
+ tools::Long nStrikeoutOffset = -((mnAscent - mnIntLeading) / 3);
mnUnderlineSize = nLineHeight;
mnUnderlineOffset = nUnderlineOffset - nLineHeight2;
@@ -182,7 +182,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
mnDUnderlineOffset1 = nUnderlineOffset - n2LineDY2 - n2LineHeight;
mnDUnderlineOffset2 = mnDUnderlineOffset1 + n2LineDY + n2LineHeight;
- long nWCalcSize = mnDescent;
+ tools::Long nWCalcSize = mnDescent;
if ( nWCalcSize < 6 )
{
if ( (nWCalcSize == 1) || (nWCalcSize == 2) )
@@ -215,7 +215,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
void ImplFontMetricData::ImplInitAboveTextLineSize()
{
- long nIntLeading = mnIntLeading;
+ tools::Long nIntLeading = mnIntLeading;
// TODO: assess usage of nLeading below (changed in extleading CWS)
// if no leading is available, we assume 15% of the ascent
if ( nIntLeading <= 0 )
@@ -225,19 +225,19 @@ void ImplFontMetricData::ImplInitAboveTextLineSize()
nIntLeading = 1;
}
- long nLineHeight = ((nIntLeading*25)+50) / 100;
+ tools::Long nLineHeight = ((nIntLeading*25)+50) / 100;
if ( !nLineHeight )
nLineHeight = 1;
- long nBLineHeight = ((nIntLeading*50)+50) / 100;
+ tools::Long nBLineHeight = ((nIntLeading*50)+50) / 100;
if ( nBLineHeight == nLineHeight )
nBLineHeight++;
- long n2LineHeight = ((nIntLeading*16)+50) / 100;
+ tools::Long n2LineHeight = ((nIntLeading*16)+50) / 100;
if ( !n2LineHeight )
n2LineHeight = 1;
- long nCeiling = -mnAscent;
+ tools::Long nCeiling = -mnAscent;
mnAboveUnderlineSize = nLineHeight;
mnAboveUnderlineOffset = nCeiling + (nIntLeading - nLineHeight + 1) / 2;
@@ -249,7 +249,7 @@ void ImplFontMetricData::ImplInitAboveTextLineSize()
mnAboveDUnderlineOffset1 = nCeiling + (nIntLeading - 3*n2LineHeight + 1) / 2;
mnAboveDUnderlineOffset2 = nCeiling + (nIntLeading + n2LineHeight + 1) / 2;
- long nWCalcSize = nIntLeading;
+ tools::Long nWCalcSize = nIntLeading;
if ( nWCalcSize < 6 )
{
if ( (nWCalcSize == 1) || (nWCalcSize == 2) )
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 6dfe0cc6b8ee..7d418ef2694c 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1646,7 +1646,7 @@ void Type1Emitter::updateLen( int nTellPos, size_t nLength)
cData[1] = static_cast<U8>(nLength >> 8);
cData[2] = static_cast<U8>(nLength >> 16);
cData[3] = static_cast<U8>(nLength >> 24);
- const long nCurrPos = ftell(mpFileOut);
+ const tools::Long nCurrPos = ftell(mpFileOut);
if (nCurrPos < 0)
return;
if (fseek( mpFileOut, nTellPos, SEEK_SET) != 0)
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 539b4f65aff4..0144a458e8ce 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -208,8 +208,8 @@ bool FileDefinitionWidgetDraw::hitTestNativeControl(
namespace
{
-void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics, long nX, long nY,
- long nWidth, long nHeight)
+void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics, tools::Long nX,
+ tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
basegfx::B2DRectangle aSVGRect = rDrawRoot.maRectangle;
@@ -359,7 +359,8 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
}
void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDrawActions,
- SalGraphics& rGraphics, long nX, long nY, long nWidth, long nHeight)
+ SalGraphics& rGraphics, tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
for (std::shared_ptr<WidgetDrawAction> const& pDrawAction : rDrawActions)
{
@@ -440,8 +441,8 @@ void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDr
aBitmap = aIterator->second;
}
- long nImageWidth = aBitmap.GetSizePixel().Width();
- long nImageHeight = aBitmap.GetSizePixel().Height();
+ tools::Long nImageWidth = aBitmap.GetSizePixel().Width();
+ tools::Long nImageHeight = aBitmap.GetSizePixel().Height();
SalTwoRect aTR(0, 0, nImageWidth, nImageHeight, nX, nY, nImageWidth / nScaleFactor,
nImageHeight / nScaleFactor);
if (!!aBitmap)
@@ -514,8 +515,9 @@ void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDr
bool FileDefinitionWidgetDraw::resolveDefinition(ControlType eType, ControlPart ePart,
ControlState eState,
- const ImplControlValue& rValue, long nX, long nY,
- long nWidth, long nHeight)
+ const ImplControlValue& rValue, tools::Long nX,
+ tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
bool bOK = false;
auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ePart);
@@ -546,10 +548,10 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
bool bOldAA = m_rGraphics.getAntiAlias();
m_rGraphics.setAntiAlias(true);
- long nWidth = rControlRegion.GetWidth() - 1;
- long nHeight = rControlRegion.GetHeight() - 1;
- long nX = rControlRegion.Left();
- long nY = rControlRegion.Top();
+ tools::Long nWidth = rControlRegion.GetWidth() - 1;
+ tools::Long nHeight = rControlRegion.GetHeight() - 1;
+ tools::Long nX = rControlRegion.Left();
+ tools::Long nY = rControlRegion.Top();
bool bOK = false;
@@ -602,10 +604,10 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
ControlPart eUpButtonPart = pSpinVal->mnUpperPart;
ControlState eUpButtonState = pSpinVal->mnUpperState;
- long nUpperX = pSpinVal->maUpperRect.Left();
- long nUpperY = pSpinVal->maUpperRect.Top();
- long nUpperWidth = pSpinVal->maUpperRect.GetWidth() - 1;
- long nUpperHeight = pSpinVal->maUpperRect.GetHeight() - 1;
+ tools::Long nUpperX = pSpinVal->maUpperRect.Left();
+ tools::Long nUpperY = pSpinVal->maUpperRect.Top();
+ tools::Long nUpperWidth = pSpinVal->maUpperRect.GetWidth() - 1;
+ tools::Long nUpperHeight = pSpinVal->maUpperRect.GetHeight() - 1;
bOK = resolveDefinition(eType, eUpButtonPart, eUpButtonState,
ImplControlValue(), nUpperX, nUpperY, nUpperWidth,
@@ -617,10 +619,10 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
ControlPart eDownButtonPart = pSpinVal->mnLowerPart;
ControlState eDownButtonState = pSpinVal->mnLowerState;
- long nLowerX = pSpinVal->maLowerRect.Left();
- long nLowerY = pSpinVal->maLowerRect.Top();
- long nLowerWidth = pSpinVal->maLowerRect.GetWidth() - 1;
- long nLowerHeight = pSpinVal->maLowerRect.GetHeight() - 1;
+ tools::Long nLowerX = pSpinVal->maLowerRect.Left();
+ tools::Long nLowerY = pSpinVal->maLowerRect.Top();
+ tools::Long nLowerWidth = pSpinVal->maLowerRect.GetWidth() - 1;
+ tools::Long nLowerHeight = pSpinVal->maLowerRect.GetHeight() - 1;
bOK = resolveDefinition(eType, eDownButtonPart, eDownButtonState,
ImplControlValue(), nLowerX, nLowerY, nLowerWidth,
@@ -651,14 +653,14 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
case ControlType::Slider:
{
const SliderValue* pSliderValue = static_cast<const SliderValue*>(&rValue);
- long nThumbX = pSliderValue->maThumbRect.Left();
- long nThumbY = pSliderValue->maThumbRect.Top();
- long nThumbWidth = pSliderValue->maThumbRect.GetWidth() - 1;
- long nThumbHeight = pSliderValue->maThumbRect.GetHeight() - 1;
+ tools::Long nThumbX = pSliderValue->maThumbRect.Left();
+ tools::Long nThumbY = pSliderValue->maThumbRect.Top();
+ tools::Long nThumbWidth = pSliderValue->maThumbRect.GetWidth() - 1;
+ tools::Long nThumbHeight = pSliderValue->maThumbRect.GetHeight() - 1;
if (ePart == ControlPart::TrackHorzArea)
{
- long nCenterX = nThumbX + nThumbWidth / 2;
+ tools::Long nCenterX = nThumbX + nThumbWidth / 2;
bOK = resolveDefinition(eType, ControlPart::TrackHorzLeft, eState, rValue, nX, nY,
nCenterX - nX, nHeight);
@@ -668,7 +670,7 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
}
else if (ePart == ControlPart::TrackVertArea)
{
- long nCenterY = nThumbY + nThumbHeight / 2;
+ tools::Long nCenterY = nThumbY + nThumbHeight / 2;
bOK = resolveDefinition(eType, ControlPart::TrackVertUpper, eState, rValue, nX, nY,
nWidth, nCenterY - nY);
@@ -869,10 +871,11 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
if (!pPart)
return false;
- long nWidth = std::max(rBoundingControlRegion.GetWidth() + pPart->mnMarginWidth,
- long(pPart->mnWidth));
- long nHeight = std::max(rBoundingControlRegion.GetHeight() + pPart->mnMarginHeight,
- long(pPart->mnHeight));
+ tools::Long nWidth = std::max(rBoundingControlRegion.GetWidth() + pPart->mnMarginWidth,
+ tools::Long(pPart->mnWidth));
+ tools::Long nHeight
+ = std::max(rBoundingControlRegion.GetHeight() + pPart->mnMarginHeight,
+ tools::Long(pPart->mnHeight));
rNativeBoundingRegion = tools::Rectangle(aLocation, Size(nWidth, nHeight));
rNativeContentRegion = rNativeBoundingRegion;
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 284314e28f98..a8042aeaed6f 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -89,15 +89,15 @@ void AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
return;
const BitmapColor aReplace( cReplaceTransparency );
- const long nWidth = std::min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() );
+ const tools::Long nWidth = std::min( pMaskAcc->Width(), pAcc->Width() );
+ const tools::Long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() );
const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( COL_WHITE ) );
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScanline = pAcc->GetScanline(nY);
Scanline pScanlineMask = pMaskAcc->GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
if( pMaskAcc->GetPixelFromData( pScanlineMask, nX ) == aMaskWhite )
pAcc->SetPixelOnData( pScanline, nX, aReplace );
}
@@ -110,15 +110,15 @@ void AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp
if( !(pAcc && pAcc->GetBitCount() == 8) )
return;
- const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
+ const tools::Long nWidth = pAcc->Width(), nHeight = pAcc->Height();
if( pAcc->GetScanlineFormat() == ScanlineFormat::N8BitPal )
{
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScan = pAcc->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++, pScan++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++, pScan++ )
{
if( *pScan == cSearchTransparency )
*pScan = cReplaceTransparency;
@@ -129,10 +129,10 @@ void AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp
{
BitmapColor aReplace( cReplaceTransparency );
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScanline = pAcc->GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
if( pAcc->GetIndexFromData( pScanline, nX ) == cSearchTransparency )
pAcc->SetPixelOnData( pScanline, nX, aReplace );
@@ -155,13 +155,13 @@ void AlphaMask::BlendWith(const Bitmap& rOther)
if (!(pOtherAcc && pAcc && pOtherAcc->GetBitCount() == 8 && pAcc->GetBitCount() == 8))
return;
- const long nHeight = std::min(pOtherAcc->Height(), pAcc->Height());
- const long nWidth = std::min(pOtherAcc->Width(), pAcc->Width());
- for (long y = 0; y < nHeight; ++y)
+ const tools::Long nHeight = std::min(pOtherAcc->Height(), pAcc->Height());
+ const tools::Long nWidth = std::min(pOtherAcc->Width(), pAcc->Width());
+ for (tools::Long y = 0; y < nHeight; ++y)
{
Scanline scanline = pAcc->GetScanline( y );
ConstScanline otherScanline = pOtherAcc->GetScanline( y );
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
// Use sal_uInt16 for following multiplication
const sal_uInt16 nGrey1 = *scanline;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 3e9972569a16..78ac64e7961f 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -148,7 +148,7 @@ const extern sal_uLong nVCLLut[ 256 ] =
318928,320214,321500,322786,324072,325358,326644,327930
};
-const long FloydMap[256] =
+const tools::Long FloydMap[256] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
@@ -168,7 +168,7 @@ const long FloydMap[256] =
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
};
-const long FloydError1[61] =
+const tools::Long FloydError1[61] =
{
-7680, -7424, -7168, -6912, -6656, -6400, -6144,
-5888, -5632, -5376, -5120, -4864, -4608, -4352,
@@ -180,7 +180,7 @@ const long FloydError1[61] =
5888, 6144, 6400, 6656, 6912, 7168, 7424, 7680
};
-const long FloydError3[61] =
+const tools::Long FloydError3[61] =
{
-23040, -22272, -21504, -20736, -19968, -19200,
-18432, -17664, -16896, -16128, -15360, -14592,
@@ -193,7 +193,7 @@ const long FloydError3[61] =
19200, 19968, 20736, 21504, 22272, 23040
};
-const long FloydError5[61] =
+const tools::Long FloydError5[61] =
{
-38400, -37120, -35840, -34560, -33280, -32000,
-30720, -29440, -28160, -26880, -25600, -24320,
@@ -207,7 +207,7 @@ const long FloydError5[61] =
38400
};
-const long FloydError7[61] =
+const tools::Long FloydError7[61] =
{
-53760, -51968, -50176, -48384, -46592, -44800,
-43008, -41216, -39424, -37632, -35840, -34048,
@@ -221,7 +221,7 @@ const long FloydError7[61] =
53760
};
-const long FloydIndexMap[6] =
+const tools::Long FloydIndexMap[6] =
{
-30, 21, 72, 123, 174, 225
};
@@ -359,16 +359,16 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
const sal_uInt8 cIndex = pReadAcc->GetIndexFromData( pScanlineRead, nX );
pWriteAcc->SetPixelOnData( pScanline, nX,
@@ -381,12 +381,12 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
{
nShift += 8;
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pReadScan = pReadAcc->GetScanline( nY );
Scanline pWriteScan = pWriteAcc->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
const sal_uLong nB = *pReadScan++;
const sal_uLong nG = *pReadScan++;
@@ -401,12 +401,12 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
{
nShift += 8;
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pReadScan = pReadAcc->GetScanline( nY );
Scanline pWriteScan = pWriteAcc->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
const sal_uLong nR = *pReadScan++;
const sal_uLong nG = *pReadScan++;
@@ -418,11 +418,11 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
}
else
{
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
pWriteAcc->SetPixelOnData( pScanline, nX, BitmapColor(pReadAcc->GetPixelFromData( pScanlineRead, nX ).GetLuminance() >> nShift) );
}
}
@@ -469,8 +469,8 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color const * pExtColor)
if (pWriteAcc)
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nHeight = pWriteAcc->Height();
if (pWriteAcc->HasPalette())
{
@@ -488,11 +488,11 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color const * pExtColor)
pWriteAcc->SetPalette(aPalette);
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
pWriteAcc->SetPixelOnData(pScanline, nX, pReadAcc->GetPixelFromData(pScanlineRead, nX));
}
@@ -502,11 +502,11 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color const * pExtColor)
{
if (pReadAcc->HasPalette())
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
pWriteAcc->SetPixelOnData(pScanline, nX, pReadAcc->GetPaletteColor(pReadAcc->GetIndexFromData(pScanlineRead, nX)));
}
@@ -514,11 +514,11 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color const * pExtColor)
}
else
{
- for (long nY = 0; nY < nHeight; nY++)
+ for (tools::Long nY = 0; nY < nHeight; nY++)
{
Scanline pScanline = pWriteAcc->GetScanline(nY);
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
pWriteAcc->SetPixelOnData(pScanline, nX, pReadAcc->GetPixelFromData(pScanlineRead, nX));
}
@@ -559,9 +559,9 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor)
if (pWriteAcc)
{
const sal_uInt16 nCount = 1 << nBitCount;
- const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1;
- const long nHeight = pWriteAcc->Height();
+ const tools::Long nWidth = pWriteAcc->Width();
+ const tools::Long nWidth1 = nWidth - 1;
+ const tools::Long nHeight = pWriteAcc->Height();
Octree aOctree(*pReadAcc, pExtColor ? (nCount - 1) : nCount);
aPalette = aOctree.GetPalette();
InverseColorMap aColorMap(aPalette);
@@ -571,7 +571,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor)
std::vector<ImpErrorQuad> aErrQuad2(nWidth);
ImpErrorQuad* pQLine1 = aErrQuad1.data();
ImpErrorQuad* pQLine2 = nullptr;
- long nYTmp = 0;
+ tools::Long nYTmp = 0;
sal_uInt8 cIndex;
bool bQ1 = true;
@@ -591,11 +591,11 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor)
pWriteAcc->SetPalette(aPalette);
- for (long nY = 0; nY < std::min(nHeight, 2L); nY++, nYTmp++)
+ for (tools::Long nY = 0; nY < std::min(nHeight, 2L); nY++, nYTmp++)
{
pQLine2 = !nY ? aErrQuad1.data() : aErrQuad2.data();
Scanline pScanlineRead = pReadAcc->GetScanline(nYTmp);
- for (long nX = 0; nX < nWidth; nX++)
+ for (tools::Long nX = 0; nX < nWidth; nX++)
{
if (pReadAcc->HasPalette())
pQLine2[nX] = pReadAcc->GetPaletteColor(pReadAcc->GetIndexFromData(pScanlineRead, nX));
@@ -606,14 +606,14 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor)
assert(pQLine2 || nHeight == 0);
- for (long nY = 0; nY < nHeight; nY++, nYTmp++)
+ for (tools::Long nY = 0; nY < nHeight; nY++, nYTmp++)
{
// first pixel in the line
cIndex = static_cast<sal_uInt8>(aColorMap.GetBestPaletteIndex(pQLine1[0].ImplGetColor()));
Scanline pScanline = pWriteAcc->GetScanline(nY);
pWriteAcc->SetPixelOnData(pScanline, 0, BitmapColor(cIndex));
- long nX;
+ tools::Long nX;
for (nX = 1; nX < nWidth1; nX++)
{
aColor = pQLine1[nX].ImplGetColor();
@@ -864,19 +864,19 @@ bool Bitmap::Dither()
if( pReadAcc && pWriteAcc )
{
BitmapColor aColor;
- long nWidth = pReadAcc->Width();
- long nWidth1 = nWidth - 1;
- long nHeight = pReadAcc->Height();
- long nX;
- long nW = nWidth * 3;
- long nW2 = nW - 3;
- long nRErr, nGErr, nBErr;
- long nRC, nGC, nBC;
+ tools::Long nWidth = pReadAcc->Width();
+ tools::Long nWidth1 = nWidth - 1;
+ tools::Long nHeight = pReadAcc->Height();
+ tools::Long nX;
+ tools::Long nW = nWidth * 3;
+ tools::Long nW2 = nW - 3;
+ tools::Long nRErr, nGErr, nBErr;
+ tools::Long nRC, nGC, nBC;
std::unique_ptr<long[]> p1(new long[ nW ]);
std::unique_ptr<long[]> p2(new long[ nW ]);
- long* p1T = p1.get();
- long* p2T = p2.get();
- long* pTmp;
+ tools::Long* p1T = p1.get();
+ tools::Long* p2T = p2.get();
+ tools::Long* pTmp;
bool bPal = pReadAcc->HasPalette();
pTmp = p2T;
@@ -884,29 +884,29 @@ bool Bitmap::Dither()
if( bPal )
{
Scanline pScanlineRead = pReadAcc->GetScanline(0);
- for( long nZ = 0; nZ < nWidth; nZ++ )
+ for( tools::Long nZ = 0; nZ < nWidth; nZ++ )
{
aColor = pReadAcc->GetPaletteColor( pReadAcc->GetIndexFromData( pScanlineRead, nZ ) );
- *pTmp++ = static_cast<long>(aColor.GetBlue()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetGreen()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetRed()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetBlue()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetGreen()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetRed()) << 12;
}
}
else
{
Scanline pScanlineRead = pReadAcc->GetScanline(0);
- for( long nZ = 0; nZ < nWidth; nZ++ )
+ for( tools::Long nZ = 0; nZ < nWidth; nZ++ )
{
aColor = pReadAcc->GetPixelFromData( pScanlineRead, nZ );
- *pTmp++ = static_cast<long>(aColor.GetBlue()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetGreen()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetRed()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetBlue()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetGreen()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetRed()) << 12;
}
}
- for( long nY = 1, nYAcc = 0; nY <= nHeight; nY++, nYAcc++ )
+ for( tools::Long nY = 1, nYAcc = 0; nY <= nHeight; nY++, nYAcc++ )
{
pTmp = p1T;
p1T = p2T;
@@ -917,32 +917,32 @@ bool Bitmap::Dither()
if( bPal )
{
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for( long nZ = 0; nZ < nWidth; nZ++ )
+ for( tools::Long nZ = 0; nZ < nWidth; nZ++ )
{
aColor = pReadAcc->GetPaletteColor( pReadAcc->GetIndexFromData( pScanlineRead, nZ ) );
- *pTmp++ = static_cast<long>(aColor.GetBlue()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetGreen()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetRed()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetBlue()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetGreen()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetRed()) << 12;
}
}
else
{
Scanline pScanlineRead = pReadAcc->GetScanline(nY);
- for( long nZ = 0; nZ < nWidth; nZ++ )
+ for( tools::Long nZ = 0; nZ < nWidth; nZ++ )
{
aColor = pReadAcc->GetPixelFromData( pScanlineRead, nZ );
- *pTmp++ = static_cast<long>(aColor.GetBlue()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetGreen()) << 12;
- *pTmp++ = static_cast<long>(aColor.GetRed()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetBlue()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetGreen()) << 12;
+ *pTmp++ = static_cast<tools::Long>(aColor.GetRed()) << 12;
}
}
}
// Examine first Pixel separately
nX = 0;
- long nTemp;
+ tools::Long nTemp;
CALC_ERRORS;
CALC_TABLES7;
nX -= 5;
@@ -951,7 +951,7 @@ bool Bitmap::Dither()
pWriteAcc->SetPixelOnData( pScanline, 0, BitmapColor(static_cast<sal_uInt8>(nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ])) );
// Get middle Pixels using a loop
- long nXAcc;
+ tools::Long nXAcc;
for ( nX = 3, nXAcc = 1; nX < nW2; nXAcc++ )
{
CALC_ERRORS;
@@ -1016,8 +1016,8 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
if( pAcc )
{
BitmapColor aCol;
- const long nW = pAcc->Width();
- const long nH = pAcc->Height();
+ const tools::Long nW = pAcc->Width();
+ const tools::Long nH = pAcc->Height();
std::unique_ptr<sal_uInt8[]> cMapR(new sal_uInt8[ 256 ]);
std::unique_ptr<sal_uInt8[]> cMapG(new sal_uInt8[ 256 ]);
std::unique_ptr<sal_uInt8[]> cMapB(new sal_uInt8[ 256 ]);
@@ -1045,7 +1045,7 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
const bool bGamma = ( fGamma != 1.0 );
// create mapping table
- for( long nX = 0; nX < 256; nX++ )
+ for( tools::Long nX = 0; nX < 256; nX++ )
{
if(!msoBrightness)
{
@@ -1093,11 +1093,11 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
}
else if( pAcc->GetScanlineFormat() == ScanlineFormat::N24BitTcBgr )
{
- for( long nY = 0; nY < nH; nY++ )
+ for( tools::Long nY = 0; nY < nH; nY++ )
{
Scanline pScan = pAcc->GetScanline( nY );
- for( long nX = 0; nX < nW; nX++ )
+ for( tools::Long nX = 0; nX < nW; nX++ )
{
*pScan = cMapB[ *pScan ]; pScan++;
*pScan = cMapG[ *pScan ]; pScan++;
@@ -1107,11 +1107,11 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
}
else if( pAcc->GetScanlineFormat() == ScanlineFormat::N24BitTcRgb )
{
- for( long nY = 0; nY < nH; nY++ )
+ for( tools::Long nY = 0; nY < nH; nY++ )
{
Scanline pScan = pAcc->GetScanline( nY );
- for( long nX = 0; nX < nW; nX++ )
+ for( tools::Long nX = 0; nX < nW; nX++ )
{
*pScan = cMapR[ *pScan ]; pScan++;
*pScan = cMapG[ *pScan ]; pScan++;
@@ -1121,10 +1121,10 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
}
else
{
- for( long nY = 0; nY < nH; nY++ )
+ for( tools::Long nY = 0; nY < nH; nY++ )
{
Scanline pScanline = pAcc->GetScanline(nY);
- for( long nX = 0; nX < nW; nX++ )
+ for( tools::Long nX = 0; nX < nW; nX++ )
{
aCol = pAcc->GetPixelFromData( pScanline, nX );
aCol.SetRed( cMapR[ aCol.GetRed() ] );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 2ec48738f2a1..9e411aa02029 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -383,7 +383,7 @@ bool BitmapEx::Scale( const Size& rNewSize, BmpScaleFlag nScaleFlag )
return bRet;
}
-bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
+bool BitmapEx::Rotate( tools::Long nAngle10, const Color& rFillColor )
{
bool bRet = false;
@@ -621,7 +621,7 @@ void BitmapEx::Draw( OutputDevice* pOutDev,
pOutDev->DrawBitmapEx( rDestPt, rDestSize, *this );
}
-BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx const & aBitmap, const long aStandardSize)
+BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx const & aBitmap, const tools::Long aStandardSize)
{
Point aEmptyPoint(0,0);
double imgposX = 0;
@@ -669,7 +669,7 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx const & aBitmap, const long aStanda
// Draw a rect into virDevice
aVirDevice->DrawRect( aRect );
- Point aPointPixel( static_cast<long>(imgposX), static_cast<long>(imgposY) );
+ Point aPointPixel( static_cast<tools::Long>(imgposX), static_cast<tools::Long>(imgposY) );
aVirDevice->DrawBitmapEx( aPointPixel, aRet );
aRet = aVirDevice->GetBitmapEx( aEmptyPoint, aStdSize );
@@ -826,10 +826,10 @@ namespace
const Size aDestinationSizePixel(aDestination.GetSizePixel());
const BitmapColor aOutside(BitmapColor(0xff, 0xff, 0xff));
- for(long y(0); y < aDestinationSizePixel.getHeight(); y++)
+ for(tools::Long y(0); y < aDestinationSizePixel.getHeight(); y++)
{
Scanline pScanline = xWrite->GetScanline( y );
- for(long x(0); x < aDestinationSizePixel.getWidth(); x++)
+ for(tools::Long x(0); x < aDestinationSizePixel.getWidth(); x++)
{
const basegfx::B2DPoint aSourceCoor(rTransform * basegfx::B2DPoint(x, y));
@@ -1080,11 +1080,11 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else if(ScanlineFormat::N24BitTcBgr == xContent->GetScanlineFormat())
{
- for(long y(0); y < xContent->Height(); y++)
+ for(tools::Long y(0); y < xContent->Height(); y++)
{
Scanline pScan = xContent->GetScanline(y);
- for(long x(0); x < xContent->Width(); x++)
+ for(tools::Long x(0); x < xContent->Width(); x++)
{
const basegfx::BColor aBSource(
*(pScan + 2)* fConvertColor,
@@ -1099,11 +1099,11 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else if(ScanlineFormat::N24BitTcRgb == xContent->GetScanlineFormat())
{
- for(long y(0); y < xContent->Height(); y++)
+ for(tools::Long y(0); y < xContent->Height(); y++)
{
Scanline pScan = xContent->GetScanline(y);
- for(long x(0); x < xContent->Width(); x++)
+ for(tools::Long x(0); x < xContent->Width(); x++)
{
const basegfx::BColor aBSource(
*pScan * fConvertColor,
@@ -1118,10 +1118,10 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else
{
- for(long y(0); y < xContent->Height(); y++)
+ for(tools::Long y(0); y < xContent->Height(); y++)
{
Scanline pScanline = xContent->GetScanline( y );
- for(long x(0); x < xContent->Width(); x++)
+ for(tools::Long x(0); x < xContent->Width(); x++)
{
const BitmapColor aBMCol(xContent->GetColor(y, x));
const basegfx::BColor aBSource(
@@ -1214,8 +1214,8 @@ BitmapEx createBlendFrame(
pBlendFrameCache->m_aLastColorBottomLeft = aColorBottomLeft;
pBlendFrameCache->m_aLastResult.Clear();
- const long nW(rSize.Width());
- const long nH(rSize.Height());
+ const tools::Long nW(rSize.Width());
+ const tools::Long nH(rSize.Height());
if(nW > 1 && nH > 1)
{
@@ -1230,8 +1230,8 @@ BitmapEx createBlendFrame(
if(pContent && pAlpha)
{
- long x(0);
- long y(0);
+ tools::Long x(0);
+ tools::Long y(0);
Scanline pScanContent = pContent->GetScanline( 0 );
Scanline pScanAlpha = pContent->GetScanline( 0 );
@@ -1363,14 +1363,14 @@ static Bitmap DetectEdges( const Bitmap& rBmp )
if( pReadAcc )
{
- const long nWidth = aSize.Width();
- const long nWidth2 = nWidth - 2;
- const long nHeight = aSize.Height();
- const long nHeight2 = nHeight - 2;
- const long lThres2 = static_cast<long>(cEdgeDetectThreshold) * cEdgeDetectThreshold;
- long nSum1;
- long nSum2;
- long lGray;
+ const tools::Long nWidth = aSize.Width();
+ const tools::Long nWidth2 = nWidth - 2;
+ const tools::Long nHeight = aSize.Height();
+ const tools::Long nHeight2 = nHeight - 2;
+ const tools::Long lThres2 = static_cast<tools::Long>(cEdgeDetectThreshold) * cEdgeDetectThreshold;
+ tools::Long nSum1;
+ tools::Long nSum2;
+ tools::Long lGray;
// initialize border with white pixels
pVirDev->SetLineColor( COL_WHITE );
@@ -1379,31 +1379,31 @@ static Bitmap DetectEdges( const Bitmap& rBmp )
pVirDev->DrawLine( Point( nWidth - 1, nHeight - 1 ), Point( 0L, nHeight - 1 ) );
pVirDev->DrawLine( Point( 0, nHeight - 1 ), Point() );
- for( long nY = 0, nY1 = 1, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ )
+ for( tools::Long nY = 0, nY1 = 1, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ )
{
Scanline pScanlineRead = pReadAcc->GetScanline( nY );
Scanline pScanlineRead1 = pReadAcc->GetScanline( nY1 );
Scanline pScanlineRead2 = pReadAcc->GetScanline( nY2 );
- for( long nX = 0, nXDst = 1, nXTmp; nX < nWidth2; nX++, nXDst++ )
+ for( tools::Long nX = 0, nXDst = 1, nXTmp; nX < nWidth2; nX++, nXDst++ )
{
nXTmp = nX;
nSum2 = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ );
nSum1 = -nSum2;
- nSum2 += static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ )) << 1;
+ nSum2 += static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ )) << 1;
lGray = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp );
nSum1 += lGray;
nSum2 += lGray;
- nSum1 += static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1;
+ nSum1 += static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1;
nXTmp -= 2;
- nSum1 -= static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1;
+ nSum1 -= static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1;
- lGray = -static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ ));
+ lGray = -static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ ));
nSum1 += lGray;
nSum2 += lGray;
- nSum2 -= static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ )) << 1;
- lGray = static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp ));
+ nSum2 -= static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ )) << 1;
+ lGray = static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp ));
nSum1 += lGray;
nSum2 -= lGray;
@@ -1458,22 +1458,22 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect,
BitmapReadAccess* pAcc = aWorkBmp.AcquireReadAccess();
- const long nWidth = pAcc ? pAcc->Width() : 0;
- const long nHeight = pAcc ? pAcc->Height() : 0;
+ const tools::Long nWidth = pAcc ? pAcc->Width() : 0;
+ const tools::Long nHeight = pAcc ? pAcc->Height() : 0;
if (pAcc && nWidth && nHeight)
{
const Size& rPrefSize = aWorkBmp.GetPrefSize();
const double fFactorX = static_cast<double>(rPrefSize.Width()) / nWidth;
const double fFactorY = static_cast<double>(rPrefSize.Height()) / nHeight;
- const long nStartX1 = aWorkRect.Left() + 1;
- const long nEndX1 = aWorkRect.Right();
- const long nStartX2 = nEndX1 - 1;
- const long nStartY1 = aWorkRect.Top() + 1;
- const long nEndY1 = aWorkRect.Bottom();
+ const tools::Long nStartX1 = aWorkRect.Left() + 1;
+ const tools::Long nEndX1 = aWorkRect.Right();
+ const tools::Long nStartX2 = nEndX1 - 1;
+ const tools::Long nStartY1 = aWorkRect.Top() + 1;
+ const tools::Long nEndY1 = aWorkRect.Bottom();
std::unique_ptr<Point[]> pPoints1;
std::unique_ptr<Point[]> pPoints2;
- long nX, nY;
+ tools::Long nX, nY;
sal_uInt16 nPolyPos = 0;
const BitmapColor aBlack = pAcc->GetBestMatchingColor( COL_BLACK );
@@ -1541,11 +1541,11 @@ void BitmapEx::setAlphaFrom( sal_uInt8 cIndexFrom, sal_Int8 nAlphaTo )
if ( !(pReadAccess.get() && pWriteAccess.get()) )
return;
- for ( long nY = 0; nY < pReadAccess->Height(); nY++ )
+ for ( tools::Long nY = 0; nY < pReadAccess->Height(); nY++ )
{
Scanline pScanline = pWriteAccess->GetScanline( nY );
Scanline pScanlineRead = pReadAccess->GetScanline( nY );
- for ( long nX = 0; nX < pReadAccess->Width(); nX++ )
+ for ( tools::Long nX = 0; nX < pReadAccess->Width(); nX++ )
{
const sal_uInt8 cIndex = pReadAccess->GetPixelFromData( pScanlineRead, nX ).GetIndex();
if ( cIndex == cIndexFrom )
@@ -1577,15 +1577,15 @@ void BitmapEx::AdjustTransparency(sal_uInt8 cTrans)
return;
sal_uLong nTrans = cTrans, nNewTrans;
- const long nWidth = pA->Width(), nHeight = pA->Height();
+ const tools::Long nWidth = pA->Width(), nHeight = pA->Height();
if( pA->GetScanlineFormat() == ScanlineFormat::N8BitPal )
{
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pAScan = pA->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
nNewTrans = nTrans + *pAScan;
*pAScan++ = static_cast<sal_uInt8>( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans );
@@ -1596,10 +1596,10 @@ void BitmapEx::AdjustTransparency(sal_uInt8 cTrans)
{
BitmapColor aAlphaValue( 0 );
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScanline = pA->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
nNewTrans = nTrans + pA->GetIndexFromData( pScanline, nX );
aAlphaValue.SetIndex( static_cast<sal_uInt8>( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) );
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 3994f9c1889a..b4883c983303 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -332,7 +332,7 @@ BitmapWriteAccess::~BitmapWriteAccess()
{
}
-void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc )
+void BitmapWriteAccess::CopyScanline( tools::Long nY, const BitmapReadAccess& rReadAcc )
{
assert(nY >= 0 && nY < mpBuffer->mnHeight && "y-coordinate in destination out of range!");
SAL_WARN_IF( nY >= rReadAcc.Height(), "vcl", "y-coordinate in source out of range!" );
@@ -345,18 +345,18 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
}
else
{
- long nWidth = std::min( mpBuffer->mnWidth, rReadAcc.Width() );
+ tools::Long nWidth = std::min( mpBuffer->mnWidth, rReadAcc.Width() );
if(!ImplFastCopyScanline( nY, *ImplGetBitmapBuffer(), *rReadAcc.ImplGetBitmapBuffer()))
{
Scanline pScanline = GetScanline( nY );
Scanline pScanlineRead = rReadAcc.GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
SetPixelOnData( pScanline, nX, rReadAcc.GetPixelFromData( pScanlineRead, nX ) );
}
}
}
-void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
+void BitmapWriteAccess::CopyScanline( tools::Long nY, ConstScanline aSrcScanline,
ScanlineFormat nSrcScanlineFormat, sal_uInt32 nSrcScanlineSize )
{
const ScanlineFormat nFormat = RemoveScanline( nSrcScanlineFormat );
@@ -430,7 +430,7 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
{
const ColorMask aDummyMask;
Scanline pScanline = GetScanline(nY);
- for (long nX = 0, nWidth = mpBuffer->mnWidth; nX < nWidth; ++nX)
+ for (tools::Long nX = 0, nWidth = mpBuffer->mnWidth; nX < nWidth; ++nX)
SetPixelOnData(pScanline, nX, pFncGetPixel(aSrcScanline, nX, aDummyMask));
}
}
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 9210d5222751..f4ee4e34b278 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -20,12 +20,12 @@
#include <vcl/bitmapaccess.hxx>
#include <vcl/BitmapTools.hxx>
-BitmapColor BitmapReadAccess::GetPixelForN1BitMsbPal(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN1BitMsbPal(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
return BitmapColor( pScanline[ nX >> 3 ] & ( 1 << ( 7 - ( nX & 7 ) ) ) ? 1 : 0 );
}
-void BitmapReadAccess::SetPixelForN1BitMsbPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN1BitMsbPal(const Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
@@ -35,12 +35,12 @@ void BitmapReadAccess::SetPixelForN1BitMsbPal(const Scanline pScanline, long nX,
rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) );
}
-BitmapColor BitmapReadAccess::GetPixelForN1BitLsbPal(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN1BitLsbPal(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
return BitmapColor( pScanline[ nX >> 3 ] & ( 1 << ( nX & 7 ) ) ? 1 : 0 );
}
-void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
@@ -50,12 +50,12 @@ void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, long nX,
rByte &= ~( 1 << ( nX & 7 ) );
}
-BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
return BitmapColor( ( pScanline[ nX >> 1 ] >> ( nX & 1 ? 0 : 4 ) ) & 0x0f );
}
-void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
@@ -71,12 +71,12 @@ void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, long nX,
}
}
-BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
return BitmapColor( ( pScanline[ nX >> 1 ] >> ( nX & 1 ? 4 : 0 ) ) & 0x0f );
}
-void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
@@ -92,30 +92,30 @@ void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, long nX,
}
}
-BitmapColor BitmapReadAccess::GetPixelForN8BitPal(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN8BitPal(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
return BitmapColor( pScanline[ nX ] );
}
-void BitmapReadAccess::SetPixelForN8BitPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN8BitPal(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline[ nX ] = rBitmapColor.GetIndex();
}
-BitmapColor BitmapReadAccess::GetPixelForN8BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
+BitmapColor BitmapReadAccess::GetPixelForN8BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask)
{
BitmapColor aColor;
rMask.GetColorFor8Bit( aColor, pScanline + nX );
return aColor;
}
-void BitmapReadAccess::SetPixelForN8BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
+void BitmapReadAccess::SetPixelForN8BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
{
rMask.SetColorFor8Bit( rBitmapColor, pScanline + nX );
}
-BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
BitmapColor aBitmapColor;
@@ -127,7 +127,7 @@ BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr(ConstScanline pScanline, lo
return aBitmapColor;
}
-void BitmapReadAccess::SetPixelForN24BitTcBgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN24BitTcBgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + nX * 3;
*pScanline++ = rBitmapColor.GetBlue();
@@ -135,7 +135,7 @@ void BitmapReadAccess::SetPixelForN24BitTcBgr(Scanline pScanline, long nX, const
*pScanline = rBitmapColor.GetRed();
}
-BitmapColor BitmapReadAccess::GetPixelForN24BitTcRgb(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN24BitTcRgb(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
BitmapColor aBitmapColor;
@@ -147,7 +147,7 @@ BitmapColor BitmapReadAccess::GetPixelForN24BitTcRgb(ConstScanline pScanline, lo
return aBitmapColor;
}
-void BitmapReadAccess::SetPixelForN24BitTcRgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN24BitTcRgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + nX * 3;
*pScanline++ = rBitmapColor.GetRed();
@@ -155,7 +155,7 @@ void BitmapReadAccess::SetPixelForN24BitTcRgb(Scanline pScanline, long nX, const
*pScanline = rBitmapColor.GetBlue();
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcAbgr(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcAbgr(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -171,7 +171,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcAbgr(ConstScanline pScanline, l
0xFF - a);
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcXbgr(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcXbgr(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
BitmapColor aBitmapColor;
@@ -183,7 +183,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcXbgr(ConstScanline pScanline, l
return aBitmapColor;
}
-void BitmapReadAccess::SetPixelForN32BitTcAbgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcAbgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -194,7 +194,7 @@ void BitmapReadAccess::SetPixelForN32BitTcAbgr(Scanline pScanline, long nX, cons
*pScanline = vcl::bitmap::premultiply(rBitmapColor.GetRed(), alpha);
}
-void BitmapReadAccess::SetPixelForN32BitTcXbgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcXbgr(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + ( nX << 2 );
*pScanline++ = 0xFF;
@@ -203,7 +203,7 @@ void BitmapReadAccess::SetPixelForN32BitTcXbgr(Scanline pScanline, long nX, cons
*pScanline = rBitmapColor.GetRed();
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcArgb(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcArgb(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -219,7 +219,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcArgb(ConstScanline pScanline, l
0xFF - a);
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcXrgb(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcXrgb(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
BitmapColor aBitmapColor;
@@ -231,7 +231,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcXrgb(ConstScanline pScanline, l
return aBitmapColor;
}
-void BitmapReadAccess::SetPixelForN32BitTcArgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcArgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -242,7 +242,7 @@ void BitmapReadAccess::SetPixelForN32BitTcArgb(Scanline pScanline, long nX, cons
*pScanline = vcl::bitmap::premultiply(rBitmapColor.GetBlue(), alpha);
}
-void BitmapReadAccess::SetPixelForN32BitTcXrgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcXrgb(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + ( nX << 2 );
*pScanline++ = 0xFF;
@@ -251,7 +251,7 @@ void BitmapReadAccess::SetPixelForN32BitTcXrgb(Scanline pScanline, long nX, cons
*pScanline = rBitmapColor.GetBlue();
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgra(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgra(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -267,7 +267,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgra(ConstScanline pScanline, l
0xFF - a);
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgrx(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgrx(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
BitmapColor aBitmapColor;
@@ -279,7 +279,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgrx(ConstScanline pScanline, l
return aBitmapColor;
}
-void BitmapReadAccess::SetPixelForN32BitTcBgra(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcBgra(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -290,7 +290,7 @@ void BitmapReadAccess::SetPixelForN32BitTcBgra(Scanline pScanline, long nX, cons
*pScanline = alpha;
}
-void BitmapReadAccess::SetPixelForN32BitTcBgrx(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcBgrx(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + ( nX << 2 );
*pScanline++ = rBitmapColor.GetBlue();
@@ -299,7 +299,7 @@ void BitmapReadAccess::SetPixelForN32BitTcBgrx(Scanline pScanline, long nX, cons
*pScanline = 0xFF;
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgba(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgba(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -315,7 +315,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgba(ConstScanline pScanline, l
0xFF - a);
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgbx(ConstScanline pScanline, long nX, const ColorMask&)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgbx(ConstScanline pScanline, tools::Long nX, const ColorMask&)
{
BitmapColor aBitmapColor;
@@ -327,7 +327,7 @@ BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgbx(ConstScanline pScanline, l
return aBitmapColor;
}
-void BitmapReadAccess::SetPixelForN32BitTcRgba(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcRgba(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + nX * 4;
@@ -338,7 +338,7 @@ void BitmapReadAccess::SetPixelForN32BitTcRgba(Scanline pScanline, long nX, cons
*pScanline = alpha;
}
-void BitmapReadAccess::SetPixelForN32BitTcRgbx(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&)
+void BitmapReadAccess::SetPixelForN32BitTcRgbx(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask&)
{
pScanline = pScanline + ( nX << 2 );
*pScanline++ = rBitmapColor.GetRed();
@@ -347,14 +347,14 @@ void BitmapReadAccess::SetPixelForN32BitTcRgbx(Scanline pScanline, long nX, cons
*pScanline = 0xFF;
}
-BitmapColor BitmapReadAccess::GetPixelForN32BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
+BitmapColor BitmapReadAccess::GetPixelForN32BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask& rMask)
{
BitmapColor aColor;
rMask.GetColorFor32Bit( aColor, pScanline + ( nX << 2 ) );
return aColor;
}
-void BitmapReadAccess::SetPixelForN32BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
+void BitmapReadAccess::SetPixelForN32BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
{
rMask.SetColorFor32Bit( rBitmapColor, pScanline + ( nX << 2 ) );
}
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 7e107d248c89..bfc9a46ba291 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -85,12 +85,12 @@ void BitmapWriteAccess::Erase( const Color& rColor )
// clear the bitmap by filling the first line pixel by pixel,
// then dup the first line over each other line
Scanline pFirstScanline = GetScanline(0);
- const long nEndX = aRect.Right();
- for (long nX = 0; nX <= nEndX; ++nX)
+ const tools::Long nEndX = aRect.Right();
+ for (tools::Long nX = 0; nX <= nEndX; ++nX)
SetPixelOnData(pFirstScanline, nX, rColor);
const auto nScanlineSize = GetScanlineSize();
- const long nEndY = aRect.Bottom();
- for (long nY = 1; nY <= nEndY; nY++)
+ const tools::Long nEndY = aRect.Bottom();
+ for (tools::Long nY = 1; nY <= nEndY; nY++)
{
Scanline pDestScanline = GetScanline(nY);
memcpy(pDestScanline, pFirstScanline, nScanlineSize);
@@ -103,12 +103,12 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
return;
const BitmapColor& rLineColor = *mpLineColor;
- long nX, nY;
+ tools::Long nX, nY;
if (rStart.X() == rEnd.X())
{
// Vertical Line
- const long nEndY = rEnd.Y();
+ const tools::Long nEndY = rEnd.Y();
nX = rStart.X();
nY = rStart.Y();
@@ -127,7 +127,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
else if (rStart.Y() == rEnd.Y())
{
// Horizontal Line
- const long nEndX = rEnd.X();
+ const tools::Long nEndX = rEnd.X();
nX = rStart.X();
nY = rStart.Y();
@@ -145,12 +145,12 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
else
{
- const long nDX = labs( rEnd.X() - rStart.X() );
- const long nDY = labs( rEnd.Y() - rStart.Y() );
- long nX1;
- long nY1;
- long nX2;
- long nY2;
+ const tools::Long nDX = labs( rEnd.X() - rStart.X() );
+ const tools::Long nDY = labs( rEnd.Y() - rStart.Y() );
+ tools::Long nX1;
+ tools::Long nY1;
+ tools::Long nX2;
+ tools::Long nY2;
if (nDX >= nDY)
{
@@ -169,9 +169,9 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nY2 = rStart.Y();
}
- const long nDYX = (nDY - nDX) << 1;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
+ const tools::Long nDYX = (nDY - nDX) << 1;
+ const tools::Long nDY2 = nDY << 1;
+ tools::Long nD = nDY2 - nDX;
bool bPos = nY1 < nY2;
for (nX = nX1, nY = nY1; nX <= nX2; nX++)
@@ -208,9 +208,9 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nY2 = rStart.Y();
}
- const long nDYX = (nDX - nDY) << 1;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
+ const tools::Long nDYX = (nDX - nDY) << 1;
+ const tools::Long nDY2 = nDX << 1;
+ tools::Long nD = nDY2 - nDY;
bool bPos = nX1 < nX2;
for (nX = nX1, nY = nY1; nY <= nY2; nY++)
@@ -246,15 +246,15 @@ void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect )
if (aRect.IsEmpty())
return;
- const long nStartX = rRect.Left();
- const long nStartY = rRect.Top();
- const long nEndX = rRect.Right();
- const long nEndY = rRect.Bottom();
+ const tools::Long nStartX = rRect.Left();
+ const tools::Long nStartY = rRect.Top();
+ const tools::Long nEndX = rRect.Right();
+ const tools::Long nEndY = rRect.Bottom();
- for (long nY = nStartY; nY <= nEndY; nY++)
+ for (tools::Long nY = nStartY; nY <= nEndY; nY++)
{
Scanline pScanline = GetScanline( nY );
- for (long nX = nStartX; nX <= nEndX; nX++)
+ for (tools::Long nX = nStartX; nX <= nEndX; nX++)
{
SetPixelOnData(pScanline, nX, rFillColor);
}
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 5528d9fcf455..e28f4de0c60a 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -463,7 +463,7 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
return false;
}
-static inline ConstScanline ImplGetScanline( const BitmapBuffer& rBuf, long nY )
+static inline ConstScanline ImplGetScanline( const BitmapBuffer& rBuf, tools::Long nY )
{
if( rBuf.mnFormat & ScanlineFormat::TopDown )
return rBuf.mpBits + nY * rBuf.mnScanlineSize;
@@ -471,13 +471,13 @@ static inline ConstScanline ImplGetScanline( const BitmapBuffer& rBuf, long nY )
return rBuf.mpBits + (rBuf.mnHeight - 1 - nY) * rBuf.mnScanlineSize;
}
-static inline Scanline ImplGetScanline( BitmapBuffer& rBuf, long nY )
+static inline Scanline ImplGetScanline( BitmapBuffer& rBuf, tools::Long nY )
{
return const_cast<Scanline>(ImplGetScanline( const_cast<const BitmapBuffer&>(rBuf), nY ));
}
template <ScanlineFormat DSTFMT, ScanlineFormat SRCFMT>
-static bool ImplCopyToScanline( long nY, BitmapBuffer& rDst, TrueColorPixelPtr<SRCFMT>& rSrcLine, long nSrcWidth )
+static bool ImplCopyToScanline( tools::Long nY, BitmapBuffer& rDst, TrueColorPixelPtr<SRCFMT>& rSrcLine, tools::Long nSrcWidth )
{
TrueColorPixelPtr<DSTFMT> aDstType;
aDstType.SetRawPtr( ImplGetScanline( rDst, nY ));
@@ -486,7 +486,7 @@ static bool ImplCopyToScanline( long nY, BitmapBuffer& rDst, TrueColorPixelPtr<S
}
template <ScanlineFormat SRCFMT>
-static bool ImplCopyFromScanline( long nY, BitmapBuffer& rDst, ConstScanline aSrcScanline, long nSrcWidth )
+static bool ImplCopyFromScanline( tools::Long nY, BitmapBuffer& rDst, ConstScanline aSrcScanline, tools::Long nSrcWidth )
{
TrueColorPixelPtr<SRCFMT> aSrcType;
aSrcType.SetRawPtr( const_cast<Scanline>( aSrcScanline ));
@@ -513,7 +513,7 @@ static bool ImplCopyFromScanline( long nY, BitmapBuffer& rDst, ConstScanline aSr
}
-bool ImplFastCopyScanline( long nY, BitmapBuffer& rDst, ConstScanline aSrcScanline,
+bool ImplFastCopyScanline( tools::Long nY, BitmapBuffer& rDst, ConstScanline aSrcScanline,
ScanlineFormat nSrcScanlineFormat, sal_uInt32 nSrcScanlineSize)
{
if( rDst.mnHeight <= nY )
@@ -551,7 +551,7 @@ bool ImplFastCopyScanline( long nY, BitmapBuffer& rDst, ConstScanline aSrcScanli
return false;
}
-bool ImplFastCopyScanline( long nY, BitmapBuffer& rDst, const BitmapBuffer& rSrc)
+bool ImplFastCopyScanline( tools::Long nY, BitmapBuffer& rDst, const BitmapBuffer& rSrc)
{
if( nY >= rDst.mnHeight )
return false;
@@ -822,7 +822,7 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
if( bByteFill )
{
- long nByteCount = rDst.mnHeight * rDst.mnScanlineSize;
+ tools::Long nByteCount = rDst.mnHeight * rDst.mnScanlineSize;
memset( rDst.mpBits, nFillByte, nByteCount );
return true;
}
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index df91ad1659e5..39203304e2dd 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -356,7 +356,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
{
Scanline pRLE = pBuffer;
Scanline pEndRLE = pBuffer + rHeader.nSizeImage;
- long nY = rHeader.nHeight - 1;
+ tools::Long nY = rHeader.nHeight - 1;
const sal_uLong nWidth = rAcc.Width();
sal_uLong nCountByte;
sal_uLong nRunByte;
@@ -543,9 +543,9 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
rIStm.ReadUInt32( nBMask );
}
- const long nWidth(rHeader.nWidth);
- const long nHeight(rHeader.nHeight);
- long nResult = 0;
+ const tools::Long nWidth(rHeader.nWidth);
+ const tools::Long nHeight(rHeader.nHeight);
+ tools::Long nResult = 0;
if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nWidth, nHeight, nResult) || nResult > 4000000))
return false;
@@ -576,9 +576,9 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
std::vector<sal_uInt8> aBuf(nAlignedWidth);
- const long nI(bTopDown ? 1 : -1);
- long nY(bTopDown ? 0 : nHeight - 1);
- long nCount(nHeight);
+ const tools::Long nI(bTopDown ? 1 : -1);
+ tools::Long nY(bTopDown ? 0 : nHeight - 1);
+ tools::Long nCount(nHeight);
switch(rHeader.nBitCount)
{
@@ -594,7 +594,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
sal_uInt8 cTmp = *pTmp++;
Scanline pScanline = rAcc.GetScanline(nY);
- for( long nX = 0, nShift = 8; nX < nWidth; nX++ )
+ for( tools::Long nX = 0, nShift = 8; nX < nWidth; nX++ )
{
if( !nShift )
{
@@ -621,7 +621,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
sal_uInt8 cTmp = *pTmp++;
Scanline pScanline = rAcc.GetScanline(nY);
- for( long nX = 0, nShift = 2; nX < nWidth; nX++ )
+ for( tools::Long nX = 0, nShift = 2; nX < nWidth; nX++ )
{
if( !nShift )
{
@@ -648,7 +648,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
Scanline pScanline = rAcc.GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
auto nIndex = *pTmp++;
rAcc.SetPixelOnData(pScanline, nX, SanitizePaletteIndex(nIndex, rPalette, bForceToMonoWhileReading));
@@ -682,7 +682,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
Scanline pScanline = rAcc.GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
aMask.GetColorFor16BitLSB( aColor, reinterpret_cast<sal_uInt8*>(pTmp16++) );
rAcc.SetPixelOnData(pScanline, nX, SanitizeColor(aColor, bForceToMonoWhileReading));
@@ -705,7 +705,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
Scanline pScanline = rAcc.GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
aPixelColor.SetBlue( *pTmp++ );
aPixelColor.SetGreen( *pTmp++ );
@@ -747,7 +747,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
Scanline pScanline = rAcc.GetScanline(nY);
Scanline pAlphaScanline = pAccAlpha->GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
aMask.GetColorAndAlphaFor32Bit( aColor, aAlpha, reinterpret_cast<sal_uInt8*>(pTmp32++) );
rAcc.SetPixelOnData(pScanline, nX, SanitizeColor(aColor, bForceToMonoWhileReading));
@@ -768,7 +768,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
Scanline pScanline = rAcc.GetScanline(nY);
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
aMask.GetColorFor32Bit( aColor, reinterpret_cast<sal_uInt8*>(pTmp32++) );
rAcc.SetPixelOnData(pScanline, nX, SanitizeColor(aColor, bForceToMonoWhileReading));
@@ -859,7 +859,7 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL
const size_t nToRead(std::min<size_t>(nUncodedSize - nDataPos, aData.size() - nDataPos));
assert(nToRead > 0);
assert(!aData.empty());
- const long nRead = aCodec.Read(*pMemStm, aData.data() + nDataPos, sal_uInt32(nToRead));
+ const tools::Long nRead = aCodec.Read(*pMemStm, aData.data() + nDataPos, sal_uInt32(nToRead));
if (nRead > 0)
{
nDataPos += static_cast<unsigned long>(nRead);
@@ -1138,7 +1138,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess const & rAcc, bool bRLE4 )
sal_uInt8 cLast;
bool bFound;
- for ( long nY = nHeight - 1; nY >= 0; nY-- )
+ for ( tools::Long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = aBuf.data();
nX = nBufCount = 0;
@@ -1263,7 +1263,7 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
rOStm.WriteBytes(rAcc.GetBuffer(), rAcc.Height() * rAcc.GetScanlineSize());
else
{
- for( long nY = rAcc.Height() - 1, nScanlineSize = rAcc.GetScanlineSize(); nY >= 0; nY-- )
+ for( tools::Long nY = rAcc.Height() - 1, nScanlineSize = rAcc.GetScanlineSize(); nY >= 0; nY-- )
rOStm.WriteBytes( rAcc.GetScanline(nY), nScanlineSize );
}
}
@@ -1315,8 +1315,8 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
}
else
{
- const long nWidth(rAcc.Width());
- const long nHeight(rAcc.Height());
+ const tools::Long nWidth(rAcc.Width());
+ const tools::Long nHeight(rAcc.Height());
std::vector<sal_uInt8> aBuf(nAlignedWidth);
switch( nBitCount )
{
@@ -1326,13 +1326,13 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
size_t nUnusedBytes = nAlignedWidth - ((nWidth+7) / 8);
memset(aBuf.data() + nAlignedWidth - nUnusedBytes, 0, nUnusedBytes);
- for( long nY = nHeight - 1; nY >= 0; nY-- )
+ for( tools::Long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = aBuf.data();
sal_uInt8 cTmp = 0;
Scanline pScanline = rAcc.GetScanline( nY );
- for( long nX = 0, nShift = 8; nX < nWidth; nX++ )
+ for( tools::Long nX = 0, nShift = 8; nX < nWidth; nX++ )
{
if( !nShift )
{
@@ -1356,13 +1356,13 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
size_t nUnusedBytes = nAlignedWidth - ((nWidth+1) / 2);
memset(aBuf.data() + nAlignedWidth - nUnusedBytes, 0, nUnusedBytes);
- for( long nY = nHeight - 1; nY >= 0; nY-- )
+ for( tools::Long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = aBuf.data();
sal_uInt8 cTmp = 0;
Scanline pScanline = rAcc.GetScanline( nY );
- for( long nX = 0, nShift = 2; nX < nWidth; nX++ )
+ for( tools::Long nX = 0, nShift = 2; nX < nWidth; nX++ )
{
if( !nShift )
{
@@ -1381,12 +1381,12 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
case 8:
{
- for( long nY = nHeight - 1; nY >= 0; nY-- )
+ for( tools::Long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = aBuf.data();
Scanline pScanline = rAcc.GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
*pTmp++ = rAcc.GetIndexFromData( pScanline, nX );
rOStm.WriteBytes(aBuf.data(), nAlignedWidth);
@@ -1407,12 +1407,12 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess const & rAcc, BitmapRead
BitmapColor aPixelColor;
const bool bWriteAlpha(32 == nBitCount && pAccAlpha);
- for( long nY = nHeight - 1; nY >= 0; nY-- )
+ for( tools::Long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = aBuf.data();
Scanline pScanlineAlpha = bWriteAlpha ? pAccAlpha->GetScanline( nY ) : nullptr;
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
{
// when alpha is used, this may be non-24bit main bitmap, so use GetColor
// instead of GetPixel to ensure RGB value
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index c5ab8914eb17..03f4092d5ed6 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -187,7 +187,7 @@ void EmbeddedFontsHelper::activateFont( const OUString& fontName, const OUString
// to have a different meaning (guessing from code, IsSubsettable() might
// possibly mean it's ttf, while IsEmbeddable() might mean it's type1).
// So just try to open the data as ttf and see.
-bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, long size, FontRights rights )
+bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, tools::Long size, FontRights rights )
{
TrueTypeFont* font;
if( OpenTTFontBuffer( data, size, 0 /*TODO*/, &font ) == SFErrCodes::Ok )
@@ -263,7 +263,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
}
if( selected != nullptr )
{
- long size;
+ tools::Long size;
if (const void* data = graphics->GetEmbedFontData(selected, &size))
{
if( sufficientTTFRights( data, size, rights ))
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index 6a74c4d69871..f16b3684d081 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -352,8 +352,8 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::MOVECLIPREGION :
{
const MetaMoveClipRegionAction* pA = static_cast< const MetaMoveClipRegionAction* >(pAction);
- const long aHorMove(pA->GetHorzMove());
- const long aVerMove(pA->GetVertMove());
+ const tools::Long aHorMove(pA->GetHorzMove());
+ const tools::Long aVerMove(pA->GetVertMove());
if((aHorMove || aVerMove) && !aClips.empty() && aClips.back().count())
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 257eee5f3f26..18a45ea92dad 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -598,7 +598,7 @@ void GDIMetaFile::push_back(const rtl::Reference<MetaAction>& pAction)
void GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags )
{
const Size aOldPrefSize( GetPrefSize() );
- long nMoveX, nMoveY;
+ tools::Long nMoveX, nMoveY;
double fScaleX, fScaleY;
if( nMirrorFlags & BmpMirrorFlags::Horizontal )
@@ -631,7 +631,7 @@ void GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags )
}
}
-void GDIMetaFile::Move( long nX, long nY )
+void GDIMetaFile::Move( tools::Long nX, tools::Long nY )
{
const Size aBaseOffset( nX, nY );
Size aOffset( aBaseOffset );
@@ -665,7 +665,7 @@ void GDIMetaFile::Move( long nX, long nY )
}
}
-void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
+void GDIMetaFile::Move( tools::Long nX, tools::Long nY, tools::Long nDPIX, tools::Long nDPIY )
{
const Size aBaseOffset( nX, nY );
Size aOffset( aBaseOffset );
@@ -697,8 +697,8 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
{
aOffset = aMapVDev->LogicToPixel( aBaseOffset, GetPrefMapMode() );
MapMode aMap( aMapVDev->GetMapMode() );
- aOffset.setWidth( static_cast<long>(aOffset.Width() * static_cast<double>(aMap.GetScaleX())) );
- aOffset.setHeight( static_cast<long>(aOffset.Height() * static_cast<double>(aMap.GetScaleY())) );
+ aOffset.setWidth( static_cast<tools::Long>(aOffset.Width() * static_cast<double>(aMap.GetScaleX())) );
+ aOffset.setHeight( static_cast<tools::Long>(aOffset.Height() * static_cast<double>(aMap.GetScaleY())) );
}
else
aOffset = OutputDevice::LogicToLogic( aBaseOffset, GetPrefMapMode(), aMapVDev->GetMapMode() );
@@ -768,8 +768,8 @@ void GDIMetaFile::Clip( const tools::Rectangle& i_rClipRect )
Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos )
{
- const long nX = rPt.X() - rRotatePt.X();
- const long nY = rPt.Y() - rRotatePt.Y();
+ const tools::Long nX = rPt.X() - rRotatePt.X();
+ const tools::Long nY = rPt.Y() - rRotatePt.Y();
return Point( FRound( fCos * nX + fSin * nY ) + rRotatePt.X() + rOffset.Width(),
-FRound( fSin * nX - fCos * nY ) + rRotatePt.Y() + rOffset.Height() );
@@ -819,7 +819,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
}
}
-void GDIMetaFile::Rotate( long nAngle10 )
+void GDIMetaFile::Rotate( tools::Long nAngle10 )
{
nAngle10 %= 3600;
nAngle10 = ( nAngle10 < 0 ) ? ( 3599 + nAngle10 ) : nAngle10;
@@ -2112,7 +2112,7 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
const bool bGamma = ( fGamma != 1.0 );
// create mapping table
- for( long nX = 0; nX < 256; nX++ )
+ for( tools::Long nX = 0; nX < 256; nX++ )
{
if(!msoBrightness)
{
@@ -2178,7 +2178,7 @@ void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pRepla
for( sal_uLong i = 0; i < nColorCount; i++ )
{
- long nVal;
+ tools::Long nVal;
nVal = pSearchColors[ i ].GetRed();
aColParam.pMinR[ i ] = static_cast<sal_uLong>(std::max( nVal, 0L ));
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 2973f2d82719..ac826f985cdd 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -211,10 +211,10 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB
fWidth * fabs( sin( fAngle ) );
fDX = (fDX - fWidth) * 0.5 + 0.5;
fDY = (fDY - fHeight) * 0.5 + 0.5;
- aRect.AdjustLeft( -static_cast<long>(fDX) );
- aRect.AdjustRight(static_cast<long>(fDX) );
- aRect.AdjustTop( -static_cast<long>(fDY) );
- aRect.AdjustBottom(static_cast<long>(fDY) );
+ aRect.AdjustLeft( -static_cast<tools::Long>(fDX) );
+ aRect.AdjustRight(static_cast<tools::Long>(fDX) );
+ aRect.AdjustTop( -static_cast<tools::Long>(fDY) );
+ aRect.AdjustBottom(static_cast<tools::Long>(fDY) );
rBoundRect = aRect;
rCenter = rRect.Center();
@@ -232,10 +232,10 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB
fDX = ( fDX - fWidth ) * 0.5 + 0.5;
fDY = ( fDY - fHeight ) * 0.5 + 0.5;
- aRect.AdjustLeft( -static_cast<long>(fDX) );
- aRect.AdjustRight(static_cast<long>(fDX) );
- aRect.AdjustTop( -static_cast<long>(fDY) );
- aRect.AdjustBottom(static_cast<long>(fDY) );
+ aRect.AdjustLeft( -static_cast<tools::Long>(fDX) );
+ aRect.AdjustRight(static_cast<tools::Long>(fDX) );
+ aRect.AdjustTop( -static_cast<tools::Long>(fDY) );
+ aRect.AdjustBottom(static_cast<tools::Long>(fDY) );
}
Size aSize( aRect.GetSize() );
@@ -243,21 +243,21 @@ void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rB
if( GetStyle() == GradientStyle::Radial )
{
// Calculation of radii for circle
- aSize.setWidth( static_cast<long>(0.5 + sqrt(static_cast<double>(aSize.Width())*static_cast<double>(aSize.Width()) + static_cast<double>(aSize.Height())*static_cast<double>(aSize.Height()))) );
+ aSize.setWidth( static_cast<tools::Long>(0.5 + sqrt(static_cast<double>(aSize.Width())*static_cast<double>(aSize.Width()) + static_cast<double>(aSize.Height())*static_cast<double>(aSize.Height()))) );
aSize.setHeight( aSize.Width() );
}
else if( GetStyle() == GradientStyle::Elliptical )
{
// Calculation of radii for ellipse
- aSize.setWidth( static_cast<long>( 0.5 + static_cast<double>(aSize.Width()) * 1.4142 ) );
- aSize.setHeight( static_cast<long>( 0.5 + static_cast<double>(aSize.Height()) * 1.4142 ) );
+ aSize.setWidth( static_cast<tools::Long>( 0.5 + static_cast<double>(aSize.Width()) * 1.4142 ) );
+ aSize.setHeight( static_cast<tools::Long>( 0.5 + static_cast<double>(aSize.Height()) * 1.4142 ) );
}
// Calculate new centers
- long nZWidth = aRect.GetWidth() * static_cast<long>(GetOfsX()) / 100;
- long nZHeight = aRect.GetHeight() * static_cast<long>(GetOfsY()) / 100;
- long nBorderX = static_cast<long>(GetBorder()) * aSize.Width() / 100;
- long nBorderY = static_cast<long>(GetBorder()) * aSize.Height() / 100;
+ tools::Long nZWidth = aRect.GetWidth() * static_cast<tools::Long>(GetOfsX()) / 100;
+ tools::Long nZHeight = aRect.GetHeight() * static_cast<tools::Long>(GetOfsY()) / 100;
+ tools::Long nBorderX = static_cast<tools::Long>(GetBorder()) * aSize.Width() / 100;
+ tools::Long nBorderY = static_cast<tools::Long>(GetBorder()) * aSize.Height() / 100;
rCenter = Point( aRect.Left() + nZWidth, aRect.Top() + nZHeight );
// Respect borders
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 1fe6dac8cc10..61f0dc3de354 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -73,8 +73,8 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
{
MapMode aMapMode( MapUnit::MapPoint );
Size aSz = pOutDev->LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr );
- long nThreshold = aSz.Height() / 2;
- long nStep = nThreshold / 3;
+ tools::Long nThreshold = aSz.Height() / 2;
+ tools::Long nStep = nThreshold / 3;
if ( !nStep )
nStep = aSz.Height() - nThreshold;
@@ -84,14 +84,14 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
pFont->SetFontSize( aSz );
pOutDev->SetFont( *pFont );
- long nTextHeight = pOutDev->GetTextHeight();
- long nTextWidth = pOutDev->GetTextWidth( *pText );
+ tools::Long nTextHeight = pOutDev->GetTextHeight();
+ tools::Long nTextWidth = pOutDev->GetTextWidth( *pText );
if ( nTextHeight )
{
// The approximation does not respect imprecisions caused
// by word wraps
- long nLines = aSize.Height() / nTextHeight;
- long nWidth = aSize.Width() * nLines; // Approximation!!!
+ tools::Long nLines = aSize.Height() / nTextHeight;
+ tools::Long nWidth = aSize.Width() * nLines; // Approximation!!!
if ( nTextWidth <= nWidth || aSz.Height() <= nThreshold )
{
@@ -441,14 +441,14 @@ void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText,
}
void Graphic::StartAnimation( OutputDevice* pOutDev, const Point& rDestPt,
- const Size& rDestSz, long nExtraData,
+ const Size& rDestSz, tools::Long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
ImplTestRefCount();
mxImpGraphic->ImplStartAnimation( pOutDev, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev );
}
-void Graphic::StopAnimation( const OutputDevice* pOutDev, long nExtraData )
+void Graphic::StopAnimation( const OutputDevice* pOutDev, tools::Long nExtraData )
{
ImplTestRefCount();
mxImpGraphic->ImplStopAnimation( pOutDev, nExtraData );
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index 06b15f1bbf6d..5d139b0a079e 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -43,7 +43,7 @@ Hatch::Hatch() = default;
Hatch::Hatch( const Hatch& ) = default;
Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
- long nDistance, sal_uInt16 nAngle10 ) : mpImplHatch()
+ tools::Long nDistance, sal_uInt16 nAngle10 ) : mpImplHatch()
{
mpImplHatch->maColor = rColor;
mpImplHatch->meStyle = eStyle;
@@ -66,7 +66,7 @@ void Hatch::SetColor( const Color& rColor )
mpImplHatch->maColor = rColor;
}
-void Hatch::SetDistance( long nDistance )
+void Hatch::SetDistance( tools::Long nDistance )
{
mpImplHatch->mnDistance = nDistance;
}
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index cf55483692cc..be89b6247858 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -96,7 +96,7 @@ ImplAnimView::~ImplAnimView()
Animation::ImplDecAnimCount();
}
-bool ImplAnimView::matches(const OutputDevice* pOut, long nExtraData) const
+bool ImplAnimView::matches(const OutputDevice* pOut, tools::Long nExtraData) const
{
return (!pOut || pOut == mpRenderContext) && (nExtraData == 0 || nExtraData == mnExtraData);
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 39f797a69245..6bb3489c2562 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1082,7 +1082,7 @@ void ImpGraphic::ImplDraw( OutputDevice* pOutDev,
}
void ImpGraphic::ImplStartAnimation( OutputDevice* pOutDev, const Point& rDestPt,
- const Size& rDestSize, long nExtraData,
+ const Size& rDestSize, tools::Long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
ensureAvailable();
@@ -1091,7 +1091,7 @@ void ImpGraphic::ImplStartAnimation( OutputDevice* pOutDev, const Point& rDestPt
mpAnimation->Start( pOutDev, rDestPt, rDestSize, nExtraData, pFirstFrameOutDev );
}
-void ImpGraphic::ImplStopAnimation( const OutputDevice* pOutDev, long nExtraData )
+void ImpGraphic::ImplStopAnimation( const OutputDevice* pOutDev, tools::Long nExtraData )
{
ensureAvailable();
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index d442cfca49b7..621a3592661a 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -40,16 +40,16 @@
#define VECT_POLY_OUTLINE_INNER 4UL
#define VECT_POLY_OUTLINE_OUTER 8UL
-static void VECT_MAP( const std::unique_ptr<long []> & pMapIn, const std::unique_ptr<long []>& pMapOut, long nVal )
+static void VECT_MAP( const std::unique_ptr<long []> & pMapIn, const std::unique_ptr<long []>& pMapOut, tools::Long nVal )
{
pMapIn[nVal] = (nVal * 4) + 1;
pMapOut[nVal] = pMapIn[nVal] + 5;
}
-static constexpr long BACK_MAP( long _def_nVal )
+static constexpr tools::Long BACK_MAP( tools::Long _def_nVal )
{
return ((_def_nVal + 2) >> 2) - 1;
}
-static void VECT_PROGRESS( const Link<long, void>* pProgress, long _def_nVal )
+static void VECT_PROGRESS( const Link<long, void>* pProgress, tools::Long _def_nVal )
{
if(pProgress)
pProgress->Call(_def_nVal);
@@ -67,13 +67,13 @@ namespace ImplVectorizer
static ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
static void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce );
static bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- static bool ImplIsUp( ImplVectMap const * pMap, long nY, long nX );
+ static bool ImplIsUp( ImplVectMap const * pMap, tools::Long nY, tools::Long nX );
static void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly );
}
namespace {
-struct ChainMove { long nDX; long nDY; };
+struct ChainMove { tools::Long nDX; tools::Long nDY; };
}
@@ -198,38 +198,38 @@ private:
Scanline mpBuf;
Scanline* mpScan;
- long mnWidth;
- long mnHeight;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
public:
- ImplVectMap( long nWidth, long nHeight );
+ ImplVectMap( tools::Long nWidth, tools::Long nHeight );
~ImplVectMap();
- long Width() const { return mnWidth; }
- long Height() const { return mnHeight; }
+ tools::Long Width() const { return mnWidth; }
+ tools::Long Height() const { return mnHeight; }
- inline void Set( long nY, long nX, sal_uInt8 cVal );
- inline sal_uInt8 Get( long nY, long nX ) const;
+ inline void Set( tools::Long nY, tools::Long nX, sal_uInt8 cVal );
+ inline sal_uInt8 Get( tools::Long nY, tools::Long nX ) const;
- inline bool IsFree( long nY, long nX ) const;
- inline bool IsCont( long nY, long nX ) const;
- inline bool IsDone( long nY, long nX ) const;
+ inline bool IsFree( tools::Long nY, tools::Long nX ) const;
+ inline bool IsCont( tools::Long nY, tools::Long nX ) const;
+ inline bool IsDone( tools::Long nY, tools::Long nX ) const;
};
}
-ImplVectMap::ImplVectMap( long nWidth, long nHeight ) :
+ImplVectMap::ImplVectMap( tools::Long nWidth, tools::Long nHeight ) :
mpBuf ( static_cast<Scanline>(rtl_allocateZeroMemory(nWidth * nHeight)) ),
mpScan ( static_cast<Scanline*>(std::malloc(nHeight * sizeof(Scanline))) ),
mnWidth ( nWidth ),
mnHeight( nHeight )
{
- const long nWidthAl = ( nWidth >> 2 ) + 1;
+ const tools::Long nWidthAl = ( nWidth >> 2 ) + 1;
Scanline pTmp = mpBuf;
- for( long nY = 0; nY < nHeight; pTmp += nWidthAl )
+ for( tools::Long nY = 0; nY < nHeight; pTmp += nWidthAl )
mpScan[ nY++ ] = pTmp;
}
@@ -239,29 +239,29 @@ ImplVectMap::~ImplVectMap()
std::free( mpScan );
}
-inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal )
+inline void ImplVectMap::Set( tools::Long nY, tools::Long nX, sal_uInt8 cVal )
{
const sal_uInt8 cShift = sal::static_int_cast<sal_uInt8>(6 - ( ( nX & 3 ) << 1 ));
auto & rPixel = mpScan[ nY ][ nX >> 2 ];
rPixel = (rPixel & ~( 3 << cShift ) ) | ( cVal << cShift );
}
-inline sal_uInt8 ImplVectMap::Get( long nY, long nX ) const
+inline sal_uInt8 ImplVectMap::Get( tools::Long nY, tools::Long nX ) const
{
return sal::static_int_cast<sal_uInt8>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
}
-inline bool ImplVectMap::IsFree( long nY, long nX ) const
+inline bool ImplVectMap::IsFree( tools::Long nY, tools::Long nX ) const
{
return( VECT_FREE_INDEX == Get( nY, nX ) );
}
-inline bool ImplVectMap::IsCont( long nY, long nX ) const
+inline bool ImplVectMap::IsCont( tools::Long nY, tools::Long nX ) const
{
return( VECT_CONT_INDEX == Get( nY, nX ) );
}
-inline bool ImplVectMap::IsDone( long nY, long nX ) const
+inline bool ImplVectMap::IsDone( tools::Long nY, tools::Long nX ) const
{
return( VECT_DONE_INDEX == Get( nY, nX ) );
}
@@ -340,8 +340,8 @@ void ImplChain::ImplEndAdd( sal_uLong nFlag )
if( nFlag & VECT_POLY_INLINE_INNER )
{
- long nFirstX, nFirstY;
- long nLastX, nLastY;
+ tools::Long nFirstX, nFirstY;
+ tools::Long nLastX, nLastY;
nFirstX = nLastX = maStartPt.X();
nFirstY = nLastY = maStartPt.Y();
@@ -448,8 +448,8 @@ void ImplChain::ImplEndAdd( sal_uLong nFlag )
}
else if( nFlag & VECT_POLY_INLINE_OUTER )
{
- long nFirstX, nFirstY;
- long nLastX, nLastY;
+ tools::Long nFirstX, nFirstY;
+ tools::Long nLastX, nLastY;
nFirstX = nLastX = maStartPt.X();
nFirstY = nLastY = maStartPt.Y();
@@ -556,7 +556,7 @@ void ImplChain::ImplEndAdd( sal_uLong nFlag )
}
else
{
- long nLastX = maStartPt.X(), nLastY = maStartPt.Y();
+ tools::Long nLastX = maStartPt.X(), nLastY = maStartPt.Y();
aArr.ImplSetSize( mnCount + 1 );
aArr[ 0 ] = Point( nLastX, nLastY );
@@ -597,8 +597,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
for( n = nNewPos = 1; n < nCount; )
{
const Point& rPt = rArr[ n++ ];
- const long nX = BACK_MAP( rPt.X() );
- const long nY = BACK_MAP( rPt.Y() );
+ const tools::Long nX = BACK_MAP( rPt.X() );
+ const tools::Long nY = BACK_MAP( rPt.Y() );
if( nX != pLast->X() || nY != pLast->Y() )
{
@@ -656,8 +656,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
tools::PolyPolygon aPolyPoly;
double fPercent = 0.0;
double fPercentStep_2 = 0.0;
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
+ const tools::Long nWidth = pRAcc->Width();
+ const tools::Long nHeight = pRAcc->Height();
const sal_uInt16 nColorCount = pRAcc->GetPaletteEntryCount();
sal_uInt16 n;
std::array<ImplColorSet, 256> aColorSet;
@@ -671,10 +671,10 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
aColorSet[ n ].maColor = pRAcc->GetPaletteColor( n );
}
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
Scanline pScanlineRead = pRAcc->GetScanline( nY );
- for( long nX = 0; nX < nWidth; nX++ )
+ for( tools::Long nX = 0; nX < nWidth; nX++ )
aColorSet[ pRAcc->GetIndexFromData( pScanlineRead, nX ) ].mbSet = true;
}
@@ -751,7 +751,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
return;
tools::PolyPolygon aNewPolyPoly;
- long nReduce = 0;
+ tools::Long nReduce = 0;
sal_uInt16 nNewCount;
do
@@ -783,14 +783,14 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
- const long nOldWidth = pRAcc->Width();
- const long nOldHeight = pRAcc->Height();
- const long nNewWidth = ( nOldWidth << 2 ) + 4;
- const long nNewHeight = ( nOldHeight << 2 ) + 4;
+ const tools::Long nOldWidth = pRAcc->Width();
+ const tools::Long nOldHeight = pRAcc->Height();
+ const tools::Long nNewWidth = ( nOldWidth << 2 ) + 4;
+ const tools::Long nNewHeight = ( nOldHeight << 2 ) + 4;
const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
std::unique_ptr<long[]> pMapIn(new long[ std::max( nOldWidth, nOldHeight ) ]);
std::unique_ptr<long[]> pMapOut(new long[ std::max( nOldWidth, nOldHeight ) ]);
- long nX, nY, nTmpX, nTmpY;
+ tools::Long nX, nY, nTmpX, nTmpY;
pMap = new ImplVectMap( nNewWidth, nNewHeight );
@@ -867,11 +867,11 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce )
{
- const long nWidth = pMap->Width(), nHeight= pMap->Height();
+ const tools::Long nWidth = pMap->Width(), nHeight= pMap->Height();
- for( long nY = 0; nY < nHeight; nY++ )
+ for( tools::Long nY = 0; nY < nHeight; nY++ )
{
- long nX = 0;
+ tools::Long nX = 0;
bool bInner = true;
while( nX < nWidth )
@@ -917,7 +917,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
else
{
// process done segment
- const long nStartSegX = nX++;
+ const tools::Long nStartSegX = nX++;
while( pMap->IsDone( nY, nX ) )
nX++;
@@ -931,8 +931,8 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
{
- long nActX = rStartPt.X();
- long nActY = rStartPt.Y();
+ tools::Long nActX = rStartPt.X();
+ tools::Long nActY = rStartPt.Y();
sal_uLong nFound;
sal_uLong nLastDir = 0;
sal_uLong nDir;
@@ -942,8 +942,8 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
nFound = 0;
// first try last direction
- long nTryX = nActX + aImplMove[ nLastDir ].nDX;
- long nTryY = nActY + aImplMove[ nLastDir ].nDY;
+ tools::Long nTryX = nActX + aImplMove[ nLastDir ].nDX;
+ tools::Long nTryY = nActY + aImplMove[ nLastDir ].nDY;
if( pMap->IsCont( nTryY, nTryX ) )
{
@@ -983,7 +983,7 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
return true;
}
-bool ImplIsUp( ImplVectMap const * pMap, long nY, long nX )
+bool ImplIsUp( ImplVectMap const * pMap, tools::Long nY, tools::Long nX )
{
if( pMap->IsDone( nY - 1, nX ) )
return true;
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index efe5f4972985..a382dc6a062d 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -132,12 +132,12 @@ void ImplJobSetup::SetPaperFormat(Paper ePaperFormat)
mePaperFormat = ePaperFormat;
}
-void ImplJobSetup::SetPaperWidth(long nPaperWidth)
+void ImplJobSetup::SetPaperWidth(tools::Long nPaperWidth)
{
mnPaperWidth = nPaperWidth;
}
-void ImplJobSetup::SetPaperHeight(long nPaperHeight)
+void ImplJobSetup::SetPaperHeight(tools::Long nPaperHeight)
{
mnPaperHeight = nPaperHeight;
}
@@ -281,8 +281,8 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
SAL_WARN("vcl", "Parsing error: " << nPaperFormat <<
" paper format, but legal max is " << NUM_PAPER_ENTRIES);
}
- rJobData.SetPaperWidth( static_cast<long>(SVBT32ToUInt32( pOldJobData->nPaperWidth )) );
- rJobData.SetPaperHeight( static_cast<long>(SVBT32ToUInt32( pOldJobData->nPaperHeight )) );
+ rJobData.SetPaperWidth( static_cast<tools::Long>(SVBT32ToUInt32( pOldJobData->nPaperWidth )) );
+ rJobData.SetPaperHeight( static_cast<tools::Long>(SVBT32ToUInt32( pOldJobData->nPaperHeight )) );
if ( rJobData.GetDriverDataLen() )
{
const char* pDriverData = reinterpret_cast<const char*>(pOldJobData) + nOldJobDataSize;
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index b84af258ebc9..ac70349d4647 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -174,7 +174,7 @@ rtl::Reference<MetaAction> MetaAction::Clone()
return new MetaAction;
}
-void MetaAction::Move( long, long )
+void MetaAction::Move( tools::Long, tools::Long )
{
}
@@ -294,7 +294,7 @@ rtl::Reference<MetaAction> MetaPixelAction::Clone()
return new MetaPixelAction( *this );
}
-void MetaPixelAction::Move( long nHorzMove, long nVertMove )
+void MetaPixelAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -343,7 +343,7 @@ rtl::Reference<MetaAction> MetaPointAction::Clone()
return new MetaPointAction( *this );
}
-void MetaPointAction::Move( long nHorzMove, long nVertMove )
+void MetaPointAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -402,7 +402,7 @@ rtl::Reference<MetaAction> MetaLineAction::Clone()
return new MetaLineAction( *this );
}
-void MetaLineAction::Move( long nHorzMove, long nVertMove )
+void MetaLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maStartPt.Move( nHorzMove, nVertMove );
maEndPt.Move( nHorzMove, nVertMove );
@@ -466,7 +466,7 @@ rtl::Reference<MetaAction> MetaRectAction::Clone()
return new MetaRectAction( *this );
}
-void MetaRectAction::Move( long nHorzMove, long nVertMove )
+void MetaRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -518,7 +518,7 @@ rtl::Reference<MetaAction> MetaRoundRectAction::Clone()
return new MetaRoundRectAction( *this );
}
-void MetaRoundRectAction::Move( long nHorzMove, long nVertMove )
+void MetaRoundRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -569,7 +569,7 @@ rtl::Reference<MetaAction> MetaEllipseAction::Clone()
return new MetaEllipseAction( *this );
}
-void MetaEllipseAction::Move( long nHorzMove, long nVertMove )
+void MetaEllipseAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -619,7 +619,7 @@ rtl::Reference<MetaAction> MetaArcAction::Clone()
return new MetaArcAction( *this );
}
-void MetaArcAction::Move( long nHorzMove, long nVertMove )
+void MetaArcAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
maStartPt.Move( nHorzMove, nVertMove );
@@ -677,7 +677,7 @@ rtl::Reference<MetaAction> MetaPieAction::Clone()
return new MetaPieAction( *this );
}
-void MetaPieAction::Move( long nHorzMove, long nVertMove )
+void MetaPieAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
maStartPt.Move( nHorzMove, nVertMove );
@@ -735,7 +735,7 @@ rtl::Reference<MetaAction> MetaChordAction::Clone()
return new MetaChordAction( *this );
}
-void MetaChordAction::Move( long nHorzMove, long nVertMove )
+void MetaChordAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
maStartPt.Move( nHorzMove, nVertMove );
@@ -799,7 +799,7 @@ rtl::Reference<MetaAction> MetaPolyLineAction::Clone()
return new MetaPolyLineAction( *this );
}
-void MetaPolyLineAction::Move( long nHorzMove, long nVertMove )
+void MetaPolyLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPoly.Move( nHorzMove, nVertMove );
}
@@ -868,7 +868,7 @@ rtl::Reference<MetaAction> MetaPolygonAction::Clone()
return new MetaPolygonAction( *this );
}
-void MetaPolygonAction::Move( long nHorzMove, long nVertMove )
+void MetaPolygonAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPoly.Move( nHorzMove, nVertMove );
}
@@ -930,7 +930,7 @@ rtl::Reference<MetaAction> MetaPolyPolygonAction::Clone()
return new MetaPolyPolygonAction( *this );
}
-void MetaPolyPolygonAction::Move( long nHorzMove, long nVertMove )
+void MetaPolyPolygonAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPolyPoly.Move( nHorzMove, nVertMove );
}
@@ -1036,7 +1036,7 @@ rtl::Reference<MetaAction> MetaTextAction::Clone()
return new MetaTextAction( *this );
}
-void MetaTextAction::Move( long nHorzMove, long nVertMove )
+void MetaTextAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1098,7 +1098,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const OUString& rStr,
- const long* pDXAry,
+ const tools::Long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen ) :
MetaAction ( MetaActionType::TEXTARRAY ),
@@ -1130,7 +1130,7 @@ rtl::Reference<MetaAction> MetaTextArrayAction::Clone()
return new MetaTextArrayAction( *this );
}
-void MetaTextArrayAction::Move( long nHorzMove, long nVertMove )
+void MetaTextArrayAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maStartPt.Move( nHorzMove, nVertMove );
}
@@ -1261,7 +1261,7 @@ rtl::Reference<MetaAction> MetaStretchTextAction::Clone()
return new MetaStretchTextAction( *this );
}
-void MetaStretchTextAction::Move( long nHorzMove, long nVertMove )
+void MetaStretchTextAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1330,7 +1330,7 @@ rtl::Reference<MetaAction> MetaTextRectAction::Clone()
return new MetaTextRectAction( *this );
}
-void MetaTextRectAction::Move( long nHorzMove, long nVertMove )
+void MetaTextRectAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -1377,7 +1377,7 @@ MetaTextLineAction::MetaTextLineAction() :
MetaTextLineAction::~MetaTextLineAction()
{}
-MetaTextLineAction::MetaTextLineAction( const Point& rPos, long nWidth,
+MetaTextLineAction::MetaTextLineAction( const Point& rPos, tools::Long nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline ) :
@@ -1399,7 +1399,7 @@ rtl::Reference<MetaAction> MetaTextLineAction::Clone()
return new MetaTextLineAction( *this );
}
-void MetaTextLineAction::Move( long nHorzMove, long nVertMove )
+void MetaTextLineAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPos.Move( nHorzMove, nVertMove );
}
@@ -1474,7 +1474,7 @@ rtl::Reference<MetaAction> MetaBmpAction::Clone()
return new MetaBmpAction( *this );
}
-void MetaBmpAction::Move( long nHorzMove, long nVertMove )
+void MetaBmpAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1529,7 +1529,7 @@ rtl::Reference<MetaAction> MetaBmpScaleAction::Clone()
return new MetaBmpScaleAction( *this );
}
-void MetaBmpScaleAction::Move( long nHorzMove, long nVertMove )
+void MetaBmpScaleAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1593,7 +1593,7 @@ rtl::Reference<MetaAction> MetaBmpScalePartAction::Clone()
return new MetaBmpScalePartAction( *this );
}
-void MetaBmpScalePartAction::Move( long nHorzMove, long nVertMove )
+void MetaBmpScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maDstPt.Move( nHorzMove, nVertMove );
}
@@ -1656,7 +1656,7 @@ rtl::Reference<MetaAction> MetaBmpExAction::Clone()
return new MetaBmpExAction( *this );
}
-void MetaBmpExAction::Move( long nHorzMove, long nVertMove )
+void MetaBmpExAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1711,7 +1711,7 @@ rtl::Reference<MetaAction> MetaBmpExScaleAction::Clone()
return new MetaBmpExScaleAction( *this );
}
-void MetaBmpExScaleAction::Move( long nHorzMove, long nVertMove )
+void MetaBmpExScaleAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1774,7 +1774,7 @@ rtl::Reference<MetaAction> MetaBmpExScalePartAction::Clone()
return new MetaBmpExScalePartAction( *this );
}
-void MetaBmpExScalePartAction::Move( long nHorzMove, long nVertMove )
+void MetaBmpExScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maDstPt.Move( nHorzMove, nVertMove );
}
@@ -1839,7 +1839,7 @@ rtl::Reference<MetaAction> MetaMaskAction::Clone()
return new MetaMaskAction( *this );
}
-void MetaMaskAction::Move( long nHorzMove, long nVertMove )
+void MetaMaskAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1896,7 +1896,7 @@ rtl::Reference<MetaAction> MetaMaskScaleAction::Clone()
return new MetaMaskScaleAction( *this );
}
-void MetaMaskScaleAction::Move( long nHorzMove, long nVertMove )
+void MetaMaskScaleAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPt.Move( nHorzMove, nVertMove );
}
@@ -1961,7 +1961,7 @@ rtl::Reference<MetaAction> MetaMaskScalePartAction::Clone()
return new MetaMaskScalePartAction( *this );
}
-void MetaMaskScalePartAction::Move( long nHorzMove, long nVertMove )
+void MetaMaskScalePartAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maDstPt.Move( nHorzMove, nVertMove );
}
@@ -2025,7 +2025,7 @@ rtl::Reference<MetaAction> MetaGradientAction::Clone()
return new MetaGradientAction( *this );
}
-void MetaGradientAction::Move( long nHorzMove, long nVertMove )
+void MetaGradientAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -2078,7 +2078,7 @@ rtl::Reference<MetaAction> MetaGradientExAction::Clone()
return new MetaGradientExAction( *this );
}
-void MetaGradientExAction::Move( long nHorzMove, long nVertMove )
+void MetaGradientExAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPolyPoly.Move( nHorzMove, nVertMove );
}
@@ -2134,7 +2134,7 @@ rtl::Reference<MetaAction> MetaHatchAction::Clone()
return new MetaHatchAction( *this );
}
-void MetaHatchAction::Move( long nHorzMove, long nVertMove )
+void MetaHatchAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPolyPoly.Move( nHorzMove, nVertMove );
}
@@ -2189,7 +2189,7 @@ rtl::Reference<MetaAction> MetaWallpaperAction::Clone()
return new MetaWallpaperAction( *this );
}
-void MetaWallpaperAction::Move( long nHorzMove, long nVertMove )
+void MetaWallpaperAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -2240,7 +2240,7 @@ rtl::Reference<MetaAction> MetaClipRegionAction::Clone()
return new MetaClipRegionAction( *this );
}
-void MetaClipRegionAction::Move( long nHorzMove, long nVertMove )
+void MetaClipRegionAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRegion.Move( nHorzMove, nVertMove );
}
@@ -2288,7 +2288,7 @@ rtl::Reference<MetaAction> MetaISectRectClipRegionAction::Clone()
return new MetaISectRectClipRegionAction( *this );
}
-void MetaISectRectClipRegionAction::Move( long nHorzMove, long nVertMove )
+void MetaISectRectClipRegionAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRect.Move( nHorzMove, nVertMove );
}
@@ -2336,7 +2336,7 @@ rtl::Reference<MetaAction> MetaISectRegionClipRegionAction::Clone()
return new MetaISectRegionClipRegionAction( *this );
}
-void MetaISectRegionClipRegionAction::Move( long nHorzMove, long nVertMove )
+void MetaISectRegionClipRegionAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maRegion.Move( nHorzMove, nVertMove );
}
@@ -2368,7 +2368,7 @@ MetaMoveClipRegionAction::MetaMoveClipRegionAction() :
MetaMoveClipRegionAction::~MetaMoveClipRegionAction()
{}
-MetaMoveClipRegionAction::MetaMoveClipRegionAction( long nHorzMove, long nVertMove ) :
+MetaMoveClipRegionAction::MetaMoveClipRegionAction( tools::Long nHorzMove, tools::Long nVertMove ) :
MetaAction ( MetaActionType::MOVECLIPREGION ),
mnHorzMove ( nHorzMove ),
mnVertMove ( nVertMove )
@@ -2920,7 +2920,7 @@ rtl::Reference<MetaAction> MetaTransparentAction::Clone()
return new MetaTransparentAction( *this );
}
-void MetaTransparentAction::Move( long nHorzMove, long nVertMove )
+void MetaTransparentAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPolyPoly.Move( nHorzMove, nVertMove );
}
@@ -2985,7 +2985,7 @@ rtl::Reference<MetaAction> MetaFloatTransparentAction::Clone()
return new MetaFloatTransparentAction( *this );
}
-void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove )
+void MetaFloatTransparentAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPoint.Move( nHorzMove, nVertMove );
}
@@ -3046,7 +3046,7 @@ rtl::Reference<MetaAction> MetaEPSAction::Clone()
return new MetaEPSAction( *this );
}
-void MetaEPSAction::Move( long nHorzMove, long nVertMove )
+void MetaEPSAction::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
maPoint.Move( nHorzMove, nVertMove );
}
@@ -3181,7 +3181,7 @@ rtl::Reference<MetaAction> MetaCommentAction::Clone()
return new MetaCommentAction( *this );
}
-void MetaCommentAction::Move( long nXMove, long nYMove )
+void MetaCommentAction::Move( tools::Long nXMove, tools::Long nYMove )
{
if ( !(nXMove || nYMove) )
return;
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 9a418917cf26..ab7a03cb205c 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -69,7 +69,7 @@ void PDFWriter::DrawText( const Point& rPos, const OUString& rText )
void PDFWriter::DrawTextLine(
const Point& rPos,
- long nWidth,
+ tools::Long nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline )
@@ -80,7 +80,7 @@ void PDFWriter::DrawTextLine(
void PDFWriter::DrawTextArray(
const Point& rStartPt,
const OUString& rStr,
- const long* pDXAry,
+ const tools::Long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen )
{
@@ -258,7 +258,7 @@ void PDFWriter::SetClipRegion( const basegfx::B2DPolyPolygon& rRegion )
xImplementation->setClipRegion( rRegion );
}
-void PDFWriter::MoveClipRegion( long nHorzMove, long nVertMove )
+void PDFWriter::MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove )
{
xImplementation->moveClipRegion( nHorzMove, nVertMove );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b21c9ad14407..a3390cca44f7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1198,7 +1198,7 @@ void PDFPage::appendMatrix3(Matrix3 const & rMatrix, OStringBuffer& rBuffer)
rBuffer.append(' ');
appendDouble(rMatrix.get(3), rBuffer);
rBuffer.append(' ');
- appendPoint(Point(long(rMatrix.get(4)), long(rMatrix.get(5))), rBuffer);
+ appendPoint(Point(tools::Long(rMatrix.get(4)), tools::Long(rMatrix.get(5))), rBuffer);
}
double PDFPage::getHeight() const
@@ -5521,8 +5521,8 @@ void PDFWriterImpl::sortWidgets()
SAL_WARN( "vcl.pdfwriter", "wrong number of sorted annotations" );
SAL_INFO("vcl.pdfwriter", "PDFWriterImpl::sortWidgets(): wrong number of sorted assertions "
"on page nr " << item.first << ", " <<
- static_cast<long int>(item.second.aSortedAnnots.size()) << " sorted and " <<
- static_cast<long int>(nAnnots) << " unsorted");
+ static_cast<tools::Long>(item.second.aSortedAnnots.size()) << " sorted and " <<
+ static_cast<tools::Long>(nAnnots) << " unsorted");
}
}
@@ -5776,7 +5776,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool
setTextLineColor( aReliefColor );
setOverlineColor( aReliefColor );
setFont( aSetFont );
- long nOff = 1 + GetDPIX()/300;
+ tools::Long nOff = 1 + GetDPIX()/300;
if( eRelief == FontRelief::Engraved )
nOff = -nOff;
@@ -5814,7 +5814,7 @@ void PDFWriterImpl::drawShadow( SalLayout& rLayout, const OUString& rText, bool
setOverlineColor( rFont.GetColor() );
updateGraphicsState();
- long nOff = 1 + ((GetFontInstance()->mnLineHeight-24)/24);
+ tools::Long nOff = 1 + ((GetFontInstance()->mnLineHeight-24)/24);
if( rFont.IsOutline() )
nOff++;
rLayout.DrawBase() += Point( nOff, nOff );
@@ -5837,7 +5837,7 @@ void PDFWriterImpl::drawVerticalGlyphs(
double fSkew,
sal_Int32 nFontHeight )
{
- long nXOffset = 0;
+ tools::Long nXOffset = 0;
Point aCurPos( rGlyphs[0].m_aPos );
aCurPos = PixelToLogic( aCurPos );
aCurPos += rAlignOffset;
@@ -5865,8 +5865,8 @@ void PDFWriterImpl::drawVerticalGlyphs(
if( i < rGlyphs.size()-1 )
// #i120627# the text on the Y axis is reversed when export ppt file to PDF format
{
- long nOffsetX = rGlyphs[i+1].m_aPos.X() - rGlyphs[i].m_aPos.X();
- long nOffsetY = rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
+ tools::Long nOffsetX = rGlyphs[i+1].m_aPos.X() - rGlyphs[i].m_aPos.X();
+ tools::Long nOffsetY = rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
nXOffset += static_cast<int>(sqrt(double(nOffsetX*nOffsetX + nOffsetY*nOffsetY)));
}
if (!rGlyphs[i].m_pGlyph->glyphId())
@@ -6386,9 +6386,9 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
tools::PolyPolygon aEmphPoly;
tools::Rectangle aEmphRect1;
tools::Rectangle aEmphRect2;
- long nEmphYOff;
- long nEmphWidth;
- long nEmphHeight;
+ tools::Long nEmphYOff;
+ tools::Long nEmphWidth;
+ tools::Long nEmphHeight;
bool bEmphPolyLine;
FontEmphasisMark nEmphMark;
@@ -6429,8 +6429,8 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
else
aOffset.AdjustY( -(GetFontInstance()->mxFontMetric->GetAscent() + nEmphYOff) );
- long nEmphWidth2 = nEmphWidth / 2;
- long nEmphHeight2 = nEmphHeight / 2;
+ tools::Long nEmphWidth2 = nEmphWidth / 2;
+ tools::Long nEmphHeight2 = nEmphHeight / 2;
aOffset += Point( nEmphWidth2, nEmphHeight2 );
if ( eAlign == ALIGN_BOTTOM )
@@ -6462,7 +6462,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
}
-void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
+void PDFWriterImpl::drawEmphasisMark( tools::Long nX, tools::Long nY,
const tools::PolyPolygon& rPolyPoly, bool bPolyLine,
const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 )
{
@@ -6516,7 +6516,7 @@ void PDFWriterImpl::drawText( const Point& rPos, const OUString& rText, sal_Int3
}
}
-void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen )
+void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const tools::Long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen )
{
MARK( "drawText with array" );
@@ -6548,8 +6548,8 @@ void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const
void PDFWriterImpl::drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle )
{
- long nWidth = rRect.GetWidth();
- long nHeight = rRect.GetHeight();
+ tools::Long nWidth = rRect.GetWidth();
+ tools::Long nHeight = rRect.GetHeight();
if ( nWidth <= 0 || nHeight <= 0 )
return;
@@ -6569,7 +6569,7 @@ void PDFWriterImpl::drawText( const tools::Rectangle& rRect, const OUString& rOr
Point aPos = rRect.TopLeft();
- long nTextHeight = GetTextHeight();
+ tools::Long nTextHeight = GetTextHeight();
sal_Int32 nMnemonicPos = -1;
OUString aStr = rOrigStr;
@@ -6640,7 +6640,7 @@ void PDFWriterImpl::drawText( const tools::Rectangle& rRect, const OUString& rOr
}
else
{
- long nTextWidth = GetTextWidth( aStr );
+ tools::Long nTextWidth = GetTextWidth( aStr );
// Evt. Text kuerzen
if ( nTextWidth > nWidth )
@@ -6733,12 +6733,12 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin
#define HCONV( x ) ImplDevicePixelToLogicHeight( x )
-void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove )
+void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove )
{
// note: units in pFontInstance are ref device pixel
const LogicalFontInstance* pFontInstance = GetFontInstance();
- long nLineHeight = 0;
- long nLinePos = 0;
+ tools::Long nLineHeight = 0;
+ tools::Long nLinePos = 0;
appendStrokingColor( aColor, aLine );
aLine.append( "\n" );
@@ -6760,7 +6760,7 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLin
if ( (eTextLine == LINESTYLE_SMALLWAVE) && (nLineHeight > 3) )
nLineHeight = 3;
- long nLineWidth = GetDPIX()/450;
+ tools::Long nLineWidth = GetDPIX()/450;
if ( ! nLineWidth )
nLineWidth = 1;
@@ -6772,7 +6772,7 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLin
if ( eTextLine == LINESTYLE_DOUBLEWAVE )
{
- long nOrgLineHeight = nLineHeight;
+ tools::Long nOrgLineHeight = nLineHeight;
nLineHeight /= 3;
if ( nLineHeight < 2 )
{
@@ -6781,10 +6781,10 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLin
else
nLineHeight = 1;
}
- long nLineDY = nOrgLineHeight-(nLineHeight*2);
+ tools::Long nLineDY = nOrgLineHeight-(nLineHeight*2);
if ( nLineDY < nLineWidth )
nLineDY = nLineWidth;
- long nLineDY2 = nLineDY/2;
+ tools::Long nLineDY2 = nLineDY/2;
if ( !nLineDY2 )
nLineDY2 = 1;
@@ -6803,13 +6803,13 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLin
}
}
-void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove )
+void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove )
{
// note: units in pFontInstance are ref device pixel
const LogicalFontInstance* pFontInstance = GetFontInstance();
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ tools::Long nLineHeight = 0;
+ tools::Long nLinePos = 0;
+ tools::Long nLinePos2 = 0;
if ( eTextLine > LINESTYLE_BOLDWAVE )
eTextLine = LINESTYLE_SINGLE;
@@ -6994,13 +6994,13 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon
}
-void PDFWriterImpl::drawStrikeoutLine( OStringBuffer& aLine, long nWidth, FontStrikeout eStrikeout, Color aColor )
+void PDFWriterImpl::drawStrikeoutLine( OStringBuffer& aLine, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor )
{
// note: units in pFontInstance are ref device pixel
const LogicalFontInstance* pFontInstance = GetFontInstance();
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ tools::Long nLineHeight = 0;
+ tools::Long nLinePos = 0;
+ tools::Long nLinePos2 = 0;
if ( eStrikeout > STRIKEOUT_X )
eStrikeout = STRIKEOUT_SINGLE;
@@ -7059,7 +7059,7 @@ void PDFWriterImpl::drawStrikeoutLine( OStringBuffer& aLine, long nWidth, FontSt
}
-void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrikeout eStrikeout )
+void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, tools::Long nWidth, FontStrikeout eStrikeout )
{
//See qadevOOo/testdocs/StrikeThrough.odt for examples if you need
//to tweak this
@@ -7117,7 +7117,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
}
}
-void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove )
+void PDFWriterImpl::drawTextLine( const Point& rPos, tools::Long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove )
{
if ( !nWidth ||
( ((eStrikeout == STRIKEOUT_NONE)||(eStrikeout == STRIKEOUT_DONTKNOW)) &&
@@ -7371,7 +7371,7 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const tools::Rectangle& rT
this,
rTargetRect );
Point aDelta = m_aOutputStreams.front().m_aTargetRect.BottomLeft();
- long nPageHeight = pointToPixel(m_aPages[m_nCurrentPage].getHeight());
+ tools::Long nPageHeight = pointToPixel(m_aPages[m_nCurrentPage].getHeight());
aDelta.setY( -(nPageHeight - m_aOutputStreams.front().m_aTargetRect.Bottom()) );
m_aMapMode.SetOrigin( m_aMapMode.GetOrigin() + aDelta );
}
@@ -8245,7 +8245,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject )
default:
for( int y = aSize.Height()-1; y >= 0; y-- )
{
- for( long x = 0; x < aSize.Width(); x++ )
+ for( tools::Long x = 0; x < aSize.Width(); x++ )
{
BitmapColor aColor = pAccess->GetColor( y, x );
aCol[0] = aColor.GetRed();
@@ -8516,8 +8516,8 @@ void PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
aLine.append("<< /Type /XObject");
aLine.append(" /Subtype /Form");
- long nWidth = aSize.Width();
- long nHeight = aSize.Height();
+ tools::Long nWidth = aSize.Width();
+ tools::Long nHeight = aSize.Height();
if (auto pRotate = dynamic_cast<filter::PDFNumberElement*>(pPage->Lookup("Rotate")))
{
// The original page was rotated, then construct a transformation matrix which does the
@@ -8674,7 +8674,7 @@ namespace
Bitmap aNewBmp(rBitmap);
BitmapScopedWriteAccess xWriteAcc(aNewBmp);
const int nScanLineBytes = (pAccess->Width() + 7U) / 8U;
- for (long nY = 0L; nY < xWriteAcc->Height(); ++nY)
+ for (tools::Long nY = 0L; nY < xWriteAcc->Height(); ++nY)
{
Scanline pBitSwap = xWriteAcc->GetScanline(nY);
for (int x = 0; x < nScanLineBytes; ++x)
@@ -8945,7 +8945,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
//With PDF bitmaps, each row is padded to a BYTE boundary (multiple of 8 bits).
const int nScanLineBytes = ((pAccess->GetBitCount() * pAccess->Width()) + 7U) / 8U;
- for( long i = 0; i < pAccess->Height(); i++ )
+ for( tools::Long i = 0; i < pAccess->Height(); i++ )
{
CHECK_RETURN( writeBuffer( pAccess->GetScanline( i ), nScanLineBytes ) );
}
@@ -8954,9 +8954,9 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
{
const int nScanLineBytes = pAccess->Width()*3;
std::unique_ptr<sal_uInt8[]> xCol(new sal_uInt8[nScanLineBytes]);
- for( long y = 0; y < pAccess->Height(); y++ )
+ for( tools::Long y = 0; y < pAccess->Height(); y++ )
{
- for( long x = 0; x < pAccess->Width(); x++ )
+ for( tools::Long x = 0; x < pAccess->Width(); x++ )
{
BitmapColor aColor = pAccess->GetColor( y, x );
xCol[3*x+0] = aColor.GetRed();
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index e4ef7177b9c3..f89cfd2e94f6 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -983,7 +983,7 @@ i12626
bool checkEmitStructure();
/* draws an emphasis mark */
- void drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
+ void drawEmphasisMark( tools::Long nX, tools::Long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
/* true if PDF/A-1a or PDF/A-1b is output */
bool m_bIsPDF_A1;
@@ -1038,7 +1038,7 @@ i12626
// helpers for CCITT 1bit bitmap stream
void putG4Bits( sal_uInt32 i_nLength, sal_uInt32 i_nCode, BitStreamState& io_rState );
- void putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState );
+ void putG4Span( tools::Long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState );
void writeG4Stream( BitmapReadAccess const * i_pBitmap );
// color helper functions
@@ -1168,15 +1168,15 @@ public:
/* actual drawing functions */
void drawText( const Point& rPos, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true );
- void drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen );
+ void drawTextArray( const Point& rPos, const OUString& rText, const tools::Long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen );
void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText,
sal_Int32 nIndex, sal_Int32 nLen );
void drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle );
- void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove );
- void drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
- void drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
- void drawStrikeoutLine( OStringBuffer& aLine, long nWidth, FontStrikeout eStrikeout, Color aColor );
- void drawStrikeoutChar( const Point& rPos, long nWidth, FontStrikeout eStrikeout );
+ void drawTextLine( const Point& rPos, tools::Long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove );
+ void drawWaveTextLine( OStringBuffer& aLine, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
+ void drawStraightTextLine( OStringBuffer& aLine, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
+ void drawStrikeoutLine( OStringBuffer& aLine, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
+ void drawStrikeoutChar( const Point& rPos, tools::Long nWidth, FontStrikeout eStrikeout );
void drawLine( const Point& rStart, const Point& rStop );
void drawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 177a8772c304..a95c9500934f 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1444,7 +1444,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
/* end i12626 methods */
-const long unsetRun[256] =
+const tools::Long unsetRun[256] =
{
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */
@@ -1464,7 +1464,7 @@ const long unsetRun[256] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */
};
-const long setRun[256] =
+const tools::Long setRun[256] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 - 0x0f */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */
@@ -1484,21 +1484,21 @@ const long setRun[256] =
4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */
};
-static bool isSet( const Scanline i_pLine, long i_nIndex )
+static bool isSet( const Scanline i_pLine, tools::Long i_nIndex )
{
return (i_pLine[ i_nIndex/8 ] & (0x80 >> (i_nIndex&7))) != 0;
}
-static long findBitRunImpl( const Scanline i_pLine, long i_nStartIndex, long i_nW, bool i_bSet )
+static tools::Long findBitRunImpl( const Scanline i_pLine, tools::Long i_nStartIndex, tools::Long i_nW, bool i_bSet )
{
- long nIndex = i_nStartIndex;
+ tools::Long nIndex = i_nStartIndex;
if( nIndex < i_nW )
{
const sal_uInt8 * pByte = i_pLine + (nIndex/8);
sal_uInt8 nByte = *pByte;
// run up to byte boundary
- long nBitInByte = (nIndex & 7);
+ tools::Long nBitInByte = (nIndex & 7);
if( nBitInByte )
{
sal_uInt8 nMask = 0x80 >> nBitInByte;
@@ -1518,7 +1518,7 @@ static long findBitRunImpl( const Scanline i_pLine, long i_nStartIndex, long i_n
}
sal_uInt8 nRunByte;
- const long* pRunTable;
+ const tools::Long* pRunTable;
if( i_bSet )
{
nRunByte = 0xff;
@@ -1552,7 +1552,7 @@ static long findBitRunImpl( const Scanline i_pLine, long i_nStartIndex, long i_n
return std::min(nIndex, i_nW);
}
-static long findBitRun(const Scanline i_pLine, long i_nStartIndex, long i_nW, bool i_bSet)
+static tools::Long findBitRun(const Scanline i_pLine, tools::Long i_nStartIndex, tools::Long i_nW, bool i_bSet)
{
if (i_nStartIndex < 0)
return i_nW;
@@ -1560,7 +1560,7 @@ static long findBitRun(const Scanline i_pLine, long i_nStartIndex, long i_nW, bo
return findBitRunImpl(i_pLine, i_nStartIndex, i_nW, i_bSet);
}
-static long findBitRun(const Scanline i_pLine, long i_nStartIndex, long i_nW)
+static tools::Long findBitRun(const Scanline i_pLine, tools::Long i_nStartIndex, tools::Long i_nW)
{
if (i_nStartIndex < 0)
return i_nW;
@@ -1832,7 +1832,7 @@ const PixelCode BlackPixelCodes[] =
{ 2560, 12, 0x1F } // 0000 0001 1111
};
-void PDFWriterImpl::putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState )
+void PDFWriterImpl::putG4Span( tools::Long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState )
{
const PixelCode* pTable = i_bWhitePixel ? WhitePixelCodes : BlackPixelCodes;
// maximum encoded span is 2560 consecutive pixels
@@ -1855,8 +1855,8 @@ void PDFWriterImpl::putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState&
void PDFWriterImpl::writeG4Stream( BitmapReadAccess const * i_pBitmap )
{
- long nW = i_pBitmap->Width();
- long nH = i_pBitmap->Height();
+ tools::Long nW = i_pBitmap->Width();
+ tools::Long nH = i_pBitmap->Height();
if( nW <= 0 || nH <= 0 )
return;
if( i_pBitmap->GetBitCount() != 1 )
@@ -1868,20 +1868,20 @@ void PDFWriterImpl::writeG4Stream( BitmapReadAccess const * i_pBitmap )
std::unique_ptr<sal_uInt8[]> pFirstRefLine(new sal_uInt8[nW/8 + 1]);
memset(pFirstRefLine.get(), 0, nW/8 + 1);
Scanline pRefLine = pFirstRefLine.get();
- for( long nY = 0; nY < nH; nY++ )
+ for( tools::Long nY = 0; nY < nH; nY++ )
{
const Scanline pCurLine = i_pBitmap->GetScanline( nY );
- long nLineIndex = 0;
+ tools::Long nLineIndex = 0;
bool bRunSet = (*pCurLine & 0x80) != 0;
bool bRefSet = (*pRefLine & 0x80) != 0;
- long nRunIndex1 = bRunSet ? 0 : findBitRun( pCurLine, 0, nW, bRunSet );
- long nRefIndex1 = bRefSet ? 0 : findBitRun( pRefLine, 0, nW, bRefSet );
+ tools::Long nRunIndex1 = bRunSet ? 0 : findBitRun( pCurLine, 0, nW, bRunSet );
+ tools::Long nRefIndex1 = bRefSet ? 0 : findBitRun( pRefLine, 0, nW, bRefSet );
for( ; nLineIndex < nW; )
{
- long nRefIndex2 = findBitRun( pRefLine, nRefIndex1, nW );
+ tools::Long nRefIndex2 = findBitRun( pRefLine, nRefIndex1, nW );
if( nRefIndex2 >= nRunIndex1 )
{
- long nDiff = nRefIndex1 - nRunIndex1;
+ tools::Long nDiff = nRefIndex1 - nRunIndex1;
if( -3 <= nDiff && nDiff <= 3 )
{ // vertical coding
static const struct
@@ -1908,7 +1908,7 @@ void PDFWriterImpl::writeG4Stream( BitmapReadAccess const * i_pBitmap )
{ // difference too large, horizontal coding
// emit horz code 001
putG4Bits( 3, 0x1, aBitState );
- long nRunIndex2 = findBitRun( pCurLine, nRunIndex1, nW );
+ tools::Long nRunIndex2 = findBitRun( pCurLine, nRunIndex1, nW );
bool bWhiteFirst = ( nLineIndex + nRunIndex1 == 0 || ! isSet( pCurLine, nLineIndex ) );
putG4Span( nRunIndex1 - nLineIndex, bWhiteFirst, aBitState );
putG4Span( nRunIndex2 - nRunIndex1, ! bWhiteFirst, aBitState );
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 36ba66d3fbe1..16db9ad61bd4 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -52,7 +52,7 @@ int nImplSysDialog = 0;
namespace
{
- Paper ImplGetPaperFormat( long nWidth100thMM, long nHeight100thMM )
+ Paper ImplGetPaperFormat( tools::Long nWidth100thMM, tools::Long nHeight100thMM )
{
PaperInfo aInfo(nWidth100thMM, nHeight100thMM);
aInfo.doSloppyFit();
@@ -240,8 +240,8 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
tools::Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
const Size aDPISize( LogicToPixel(Size(1, 1), MapMode(MapUnit::MapInch)) );
- const long nBaseExtent = std::max( FRound( aDPISize.Width() / 300. ), 1L );
- long nMove;
+ const tools::Long nBaseExtent = std::max( FRound( aDPISize.Width() / 300. ), 1L );
+ tools::Long nMove;
const sal_uInt16 nTrans = ( nTransparencePercent < 13 ) ? 0 :
( nTransparencePercent < 38 ) ? 25 :
( nTransparencePercent < 63 ) ? 50 :
@@ -726,8 +726,8 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
aMask.Mirror( nMirrFlags );
// do painting
- const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
- long nX, nY; //, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
+ const tools::Long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
+ tools::Long nX, nY; //, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
std::unique_ptr<long[]> pMapX( new long[ nSrcWidth + 1 ] );
std::unique_ptr<long[]> pMapY( new long[ nSrcHeight + 1 ] );
GDIMetaFile* pOldMetaFile = mpMetaFile;
@@ -830,10 +830,10 @@ void Printer::ImplUpdateFontList()
ImplUpdateFontData();
}
-long Printer::GetGradientStepCount( long nMinRect )
+tools::Long Printer::GetGradientStepCount( tools::Long nMinRect )
{
// use display-equivalent step size calculation
- long nInc = (nMinRect < 800) ? 10 : 20;
+ tools::Long nInc = (nMinRect < 800) ? 10 : 20;
return nInc;
}
@@ -1257,8 +1257,8 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
HasSupport( PrinterSupport::SetOrientation )))
return;
- const long nRotatedWidth = rData.GetPaperHeight();
- const long nRotatedHeight = rData.GetPaperWidth();
+ const tools::Long nRotatedWidth = rData.GetPaperHeight();
+ const tools::Long nRotatedHeight = rData.GetPaperWidth();
PaperInfo aRotatedInfo(nRotatedWidth, nRotatedHeight);
for ( int i = 0; i < nPaperCount; i++ )
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 89fec06ff466..6094417d940d 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -386,10 +386,10 @@ tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
const MetaLineAction& rMetaLineAction = static_cast<const MetaLineAction&>(rAct);
aActionBounds = tools::Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() );
aActionBounds.Justify();
- const long nLineWidth(rMetaLineAction.GetLineInfo().GetWidth());
+ const tools::Long nLineWidth(rMetaLineAction.GetLineInfo().GetWidth());
if(nLineWidth)
{
- const long nHalfLineWidth((nLineWidth + 1) / 2);
+ const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
aActionBounds.AdjustLeft( -nHalfLineWidth );
aActionBounds.AdjustTop( -nHalfLineWidth );
aActionBounds.AdjustRight(nHalfLineWidth );
@@ -439,10 +439,10 @@ tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
{
const MetaPolyLineAction& rMetaPolyLineAction = static_cast<const MetaPolyLineAction&>(rAct);
aActionBounds = rMetaPolyLineAction.GetPolygon().GetBoundRect();
- const long nLineWidth(rMetaPolyLineAction.GetLineInfo().GetWidth());
+ const tools::Long nLineWidth(rMetaPolyLineAction.GetLineInfo().GetWidth());
if(nLineWidth)
{
- const long nHalfLineWidth((nLineWidth + 1) / 2);
+ const tools::Long nHalfLineWidth((nLineWidth + 1) / 2);
aActionBounds.AdjustLeft( -nHalfLineWidth );
aActionBounds.AdjustTop( -nHalfLineWidth );
aActionBounds.AdjustRight(nHalfLineWidth );
@@ -625,7 +625,7 @@ tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
} // end anon namespace
bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
- long nMaxBmpDPIX, long nMaxBmpDPIY,
+ tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY,
bool bReduceTransparency, bool bTransparencyAutoMode,
bool bDownsampleBitmaps,
const Color& rBackground
@@ -1292,12 +1292,12 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
{
const Color& rStartColor = rGradient.GetStartColor();
const Color& rEndColor = rGradient.GetEndColor();
- const long nR = ( ( static_cast<long>(rStartColor.GetRed()) * rGradient.GetStartIntensity() ) / 100 +
- ( static_cast<long>(rEndColor.GetRed()) * rGradient.GetEndIntensity() ) / 100 ) >> 1;
- const long nG = ( ( static_cast<long>(rStartColor.GetGreen()) * rGradient.GetStartIntensity() ) / 100 +
- ( static_cast<long>(rEndColor.GetGreen()) * rGradient.GetEndIntensity() ) / 100 ) >> 1;
- const long nB = ( ( static_cast<long>(rStartColor.GetBlue()) * rGradient.GetStartIntensity() ) / 100 +
- ( static_cast<long>(rEndColor.GetBlue()) * rGradient.GetEndIntensity() ) / 100 ) >> 1;
+ const tools::Long nR = ( ( static_cast<tools::Long>(rStartColor.GetRed()) * rGradient.GetStartIntensity() ) / 100 +
+ ( static_cast<tools::Long>(rEndColor.GetRed()) * rGradient.GetEndIntensity() ) / 100 ) >> 1;
+ const tools::Long nG = ( ( static_cast<tools::Long>(rStartColor.GetGreen()) * rGradient.GetStartIntensity() ) / 100 +
+ ( static_cast<tools::Long>(rEndColor.GetGreen()) * rGradient.GetEndIntensity() ) / 100 ) >> 1;
+ const tools::Long nB = ( ( static_cast<tools::Long>(rStartColor.GetBlue()) * rGradient.GetStartIntensity() ) / 100 +
+ ( static_cast<tools::Long>(rEndColor.GetBlue()) * rGradient.GetEndIntensity() ) / 100 ) >> 1;
const Color aColor( static_cast<sal_uInt8>(nR), static_cast<sal_uInt8>(nG), static_cast<sal_uInt8>(nB) );
pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 3291b00d5ed1..04ac1f5a92e6 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1125,8 +1125,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
{
// user overridden page size, center Metafile
o_rMtf.WindStart();
- long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
- long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
+ tools::Long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
+ tools::Long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
o_rMtf.Move( nDX, nDY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() );
o_rMtf.WindStart();
o_rMtf.SetPrefSize( aPaperSize );
@@ -1151,8 +1151,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
aMPArea.AdjustHeight(rMPS.nVerticalSpacing );
// determine offsets
- long nAdvX = aMPArea.Width() / rMPS.nColumns;
- long nAdvY = aMPArea.Height() / rMPS.nRows;
+ tools::Long nAdvX = aMPArea.Width() / rMPS.nColumns;
+ tools::Long nAdvY = aMPArea.Height() / rMPS.nRows;
// determine size of a "cell" subpage, leave a little space around pages
Size aSubPageSize( nAdvX - rMPS.nHorizontalSpacing, nAdvY - rMPS.nVerticalSpacing );
@@ -1182,7 +1182,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
PrinterController::PageSize aPageSize = getPageFile( nPage, aPageFile, i_bMayUseCache );
if( aPageSize.aSize.Width() && aPageSize.aSize.Height() )
{
- long nCellX = 0, nCellY = 0;
+ tools::Long nCellX = 0, nCellY = 0;
switch( rMPS.nOrder )
{
case NupOrderType::LRTB:
@@ -1210,16 +1210,16 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
aPageFile.WindStart();
// move the subpage so it is centered in its "cell"
- long nOffX = (aSubPageSize.Width() - long(double(aPageSize.aSize.Width()) * fScale)) / 2;
- long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2;
- long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
- long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
+ tools::Long nOffX = (aSubPageSize.Width() - tools::Long(double(aPageSize.aSize.Width()) * fScale)) / 2;
+ tools::Long nOffY = (aSubPageSize.Height() - tools::Long(double(aPageSize.aSize.Height()) * fScale)) / 2;
+ tools::Long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
+ tools::Long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
aPageFile.Move( nX, nY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() );
aPageFile.WindStart();
// calculate border rectangle
tools::Rectangle aSubPageRect( Point( nX, nY ),
- Size( long(double(aPageSize.aSize.Width())*fScale),
- long(double(aPageSize.aSize.Height())*fScale) ) );
+ Size( tools::Long(double(aPageSize.aSize.Width())*fScale),
+ tools::Long(double(aPageSize.aSize.Height())*fScale) ) );
// append subpage to page
appendSubPage( o_rMtf, aSubPageRect, aPageFile, rMPS.bDrawBorder );
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index 26013ecf0d19..64637dfd4e7c 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -37,7 +37,7 @@
// points in a list). After registration of these points they are
// converted to rectangles and the points in the list are deleted.
-ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
+ImplRegionBand::ImplRegionBand( tools::Long nTop, tools::Long nBottom )
{
// save boundaries
mnYTop = nTop;
@@ -189,7 +189,7 @@ void ImplRegionBand::ProcessPoints()
// generate separations from lines and process union with existing
// separations
-bool ImplRegionBand::InsertPoint( long nX, long nLineId,
+bool ImplRegionBand::InsertPoint( tools::Long nX, tools::Long nLineId,
bool bEndPoint, LineType eLineType )
{
if ( !mpFirstBandPoint )
@@ -297,7 +297,7 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
return true;
}
-void ImplRegionBand::MoveX( long nHorzMove )
+void ImplRegionBand::MoveX( tools::Long nHorzMove )
{
// move all x-separations
ImplRegionBandSep* pSep = mpFirstSep;
@@ -361,7 +361,7 @@ void ImplRegionBand::OptimizeBand()
}
}
-void ImplRegionBand::Union( long nXLeft, long nXRight )
+void ImplRegionBand::Union( tools::Long nXLeft, tools::Long nXRight )
{
SAL_WARN_IF( nXLeft > nXRight, "vcl", "ImplRegionBand::Union(): nxLeft > nXRight" );
@@ -433,7 +433,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
OptimizeBand();
}
-void ImplRegionBand::Intersect( long nXLeft, long nXRight )
+void ImplRegionBand::Intersect( tools::Long nXLeft, tools::Long nXRight )
{
SAL_WARN_IF( nXLeft > nXRight, "vcl", "ImplRegionBand::Intersect(): nxLeft > nXRight" );
@@ -478,7 +478,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight )
OptimizeBand();
}
-void ImplRegionBand::Exclude( long nXLeft, long nXRight )
+void ImplRegionBand::Exclude( tools::Long nXLeft, tools::Long nXRight )
{
SAL_WARN_IF( nXLeft > nXRight, "vcl", "ImplRegionBand::Exclude(): nxLeft > nXRight" );
@@ -556,7 +556,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
OptimizeBand();
}
-void ImplRegionBand::XOr( long nXLeft, long nXRight )
+void ImplRegionBand::XOr( tools::Long nXLeft, tools::Long nXRight )
{
SAL_WARN_IF( nXLeft > nXRight, "vcl", "ImplRegionBand::XOr(): nxLeft > nXRight" );
@@ -622,8 +622,8 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
while ( pSep )
{
- long nOldLeft( pSep->mnXLeft );
- long nOldRight( pSep->mnXRight );
+ tools::Long nOldLeft( pSep->mnXLeft );
+ tools::Long nOldRight( pSep->mnXRight );
// did the current segment actually touch the new rect? If
// not, skip all comparisons, go on, loop and try to find
@@ -799,7 +799,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
OptimizeBand();
}
-bool ImplRegionBand::IsInside( long nX )
+bool ImplRegionBand::IsInside( tools::Long nX )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
@@ -813,14 +813,14 @@ bool ImplRegionBand::IsInside( long nX )
return false;
}
-long ImplRegionBand::GetXLeftBoundary() const
+tools::Long ImplRegionBand::GetXLeftBoundary() const
{
assert(mpFirstSep && "ImplRegionBand::XLeftBoundary -> no separation in band!");
return mpFirstSep->mnXLeft;
}
-long ImplRegionBand::GetXRightBoundary() const
+tools::Long ImplRegionBand::GetXRightBoundary() const
{
SAL_WARN_IF( mpFirstSep == nullptr, "vcl", "ImplRegionBand::XRightBoundary -> no separation in band!" );
@@ -838,13 +838,13 @@ bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
while ( pOwnRectBandSep && pSecondRectBandSep )
{
// get boundaries of current rectangle
- long nOwnXLeft = pOwnRectBandSep->mnXLeft;
- long nSecondXLeft = pSecondRectBandSep->mnXLeft;
+ tools::Long nOwnXLeft = pOwnRectBandSep->mnXLeft;
+ tools::Long nSecondXLeft = pSecondRectBandSep->mnXLeft;
if ( nOwnXLeft != nSecondXLeft )
return false;
- long nOwnXRight = pOwnRectBandSep->mnXRight;
- long nSecondXRight = pSecondRectBandSep->mnXRight;
+ tools::Long nOwnXRight = pOwnRectBandSep->mnXRight;
+ tools::Long nSecondXRight = pSecondRectBandSep->mnXRight;
if ( nOwnXRight != nSecondXRight )
return false;
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index ac4bd8a75863..c1d9060d4590 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -90,7 +90,7 @@ namespace
// Create a new RegionBand object as container of the bands.
std::shared_ptr<RegionBand> pRegionBand( std::make_shared<RegionBand>() );
- long nLineId = 0;
+ tools::Long nLineId = 0;
// Iterate over all polygons.
const sal_uInt16 nPolyCount = rPolyPoly.Count();
@@ -123,8 +123,8 @@ namespace
// Sort y-coordinates to simplify the algorithm and store the
// direction separately. The direction is calculated as it is
// in other places (but seems to be the wrong way.)
- const long nTop (::std::min(aStart.Y(), aEnd.Y()));
- const long nBottom (::std::max(aStart.Y(), aEnd.Y()));
+ const tools::Long nTop (::std::min(aStart.Y(), aEnd.Y()));
+ const tools::Long nBottom (::std::max(aStart.Y(), aEnd.Y()));
const LineType eLineType (aStart.Y() > aEnd.Y() ? LineType::Descending : LineType::Ascending);
// Make sure that the current line is covered by bands.
@@ -184,7 +184,7 @@ namespace
*/
std::shared_ptr<RegionBand> ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const tools::Rectangle& rPolygonBoundingBox)
{
- long nLineID = 0;
+ tools::Long nLineID = 0;
// initialisation and creation of Bands
std::shared_ptr<RegionBand> pRegionBand( std::make_shared<RegionBand>() );
@@ -411,7 +411,7 @@ void vcl::Region::ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPoly
}
}
-void vcl::Region::Move( long nHorzMove, long nVertMove )
+void vcl::Region::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
if(IsNull() || IsEmpty())
{
@@ -561,10 +561,10 @@ void vcl::Region::Union( const tools::Rectangle& rRect )
std::shared_ptr<RegionBand> pNew = std::make_shared<RegionBand>(*pCurrent);
// get justified rectangle
- const long nLeft(std::min(rRect.Left(), rRect.Right()));
- const long nTop(std::min(rRect.Top(), rRect.Bottom()));
- const long nRight(std::max(rRect.Left(), rRect.Right()));
- const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
+ const tools::Long nLeft(std::min(rRect.Left(), rRect.Right()));
+ const tools::Long nTop(std::min(rRect.Top(), rRect.Bottom()));
+ const tools::Long nRight(std::max(rRect.Left(), rRect.Right()));
+ const tools::Long nBottom(std::max(rRect.Top(), rRect.Bottom()));
// insert bands if the boundaries are not already in the list
pNew->InsertBands(nTop, nBottom);
@@ -652,10 +652,10 @@ void vcl::Region::Intersect( const tools::Rectangle& rRect )
std::shared_ptr<RegionBand> pNew( std::make_shared<RegionBand>(*pCurrent));
// get justified rectangle
- const long nLeft(std::min(rRect.Left(), rRect.Right()));
- const long nTop(std::min(rRect.Top(), rRect.Bottom()));
- const long nRight(std::max(rRect.Left(), rRect.Right()));
- const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
+ const tools::Long nLeft(std::min(rRect.Left(), rRect.Right()));
+ const tools::Long nTop(std::min(rRect.Top(), rRect.Bottom()));
+ const tools::Long nRight(std::max(rRect.Left(), rRect.Right()));
+ const tools::Long nBottom(std::max(rRect.Top(), rRect.Bottom()));
// insert bands if the boundaries are not already in the list
pNew->InsertBands(nTop, nBottom);
@@ -731,10 +731,10 @@ void vcl::Region::Exclude( const tools::Rectangle& rRect )
std::shared_ptr<RegionBand> pNew( std::make_shared<RegionBand>(*pCurrent));
// get justified rectangle
- const long nLeft(std::min(rRect.Left(), rRect.Right()));
- const long nTop(std::min(rRect.Top(), rRect.Bottom()));
- const long nRight(std::max(rRect.Left(), rRect.Right()));
- const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
+ const tools::Long nLeft(std::min(rRect.Left(), rRect.Right()));
+ const tools::Long nTop(std::min(rRect.Top(), rRect.Bottom()));
+ const tools::Long nRight(std::max(rRect.Left(), rRect.Right()));
+ const tools::Long nBottom(std::max(rRect.Top(), rRect.Bottom()));
// insert bands if the boundaries are not already in the list
pNew->InsertBands(nTop, nBottom);
@@ -814,10 +814,10 @@ void vcl::Region::XOr( const tools::Rectangle& rRect )
std::shared_ptr<RegionBand> pNew( std::make_shared<RegionBand>(*getRegionBand()));
// get justified rectangle
- const long nLeft(std::min(rRect.Left(), rRect.Right()));
- const long nTop(std::min(rRect.Top(), rRect.Bottom()));
- const long nRight(std::max(rRect.Left(), rRect.Right()));
- const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
+ const tools::Long nLeft(std::min(rRect.Left(), rRect.Right()));
+ const tools::Long nTop(std::min(rRect.Top(), rRect.Bottom()));
+ const tools::Long nRight(std::max(rRect.Left(), rRect.Right()));
+ const tools::Long nBottom(std::max(rRect.Top(), rRect.Bottom()));
// insert bands if the boundaries are not already in the list
pNew->InsertBands(nTop, nBottom);
@@ -1678,7 +1678,7 @@ static bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle*
if( nPoints == 4 || (nPoints == 5 && pPoints[0] == pPoints[4]) )
{
- long nX1 = pPoints[0].X(), nX2 = pPoints[2].X(), nY1 = pPoints[0].Y(), nY2 = pPoints[2].Y();
+ tools::Long nX1 = pPoints[0].X(), nX2 = pPoints[2].X(), nY1 = pPoints[0].Y(), nY2 = pPoints[2].Y();
if( ( (pPoints[1].X() == nX1 && pPoints[3].X() == nX2) && (pPoints[1].Y() == nY2 && pPoints[3].Y() == nY1) )
|| ( (pPoints[1].X() == nX2 && pPoints[3].X() == nX1) && (pPoints[1].Y() == nY1 && pPoints[3].Y() == nY2) ) )
@@ -1687,7 +1687,7 @@ static bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle*
if( pRectOut )
{
- long nSwap;
+ tools::Long nSwap;
if( nX2 < nX1 )
{
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 8478ebb1ff68..ed309b140edc 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -67,10 +67,10 @@ RegionBand::RegionBand(const tools::Rectangle& rRect)
: mpFirstBand(nullptr),
mpLastCheckedBand(nullptr)
{
- const long nTop(std::min(rRect.Top(), rRect.Bottom()));
- const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
- const long nLeft(std::min(rRect.Left(), rRect.Right()));
- const long nRight(std::max(rRect.Left(), rRect.Right()));
+ const tools::Long nTop(std::min(rRect.Top(), rRect.Bottom()));
+ const tools::Long nBottom(std::max(rRect.Top(), rRect.Bottom()));
+ const tools::Long nLeft(std::min(rRect.Left(), rRect.Right()));
+ const tools::Long nRight(std::max(rRect.Left(), rRect.Right()));
// add band with boundaries of the rectangle
mpFirstBand = new ImplRegionBand(nTop, nBottom);
@@ -112,32 +112,32 @@ bool RegionBand::operator==( const RegionBand& rRegionBand ) const
while ( pOwnRectBandSep && pSecondRectBandSep )
{
// get boundaries of current rectangle
- long nOwnXLeft = pOwnRectBandSep->mnXLeft;
- long nSecondXLeft = pSecondRectBandSep->mnXLeft;
+ tools::Long nOwnXLeft = pOwnRectBandSep->mnXLeft;
+ tools::Long nSecondXLeft = pSecondRectBandSep->mnXLeft;
if ( nOwnXLeft != nSecondXLeft )
{
return false;
}
- long nOwnYTop = pOwnRectBand->mnYTop;
- long nSecondYTop = pSecondRectBand->mnYTop;
+ tools::Long nOwnYTop = pOwnRectBand->mnYTop;
+ tools::Long nSecondYTop = pSecondRectBand->mnYTop;
if ( nOwnYTop != nSecondYTop )
{
return false;
}
- long nOwnXRight = pOwnRectBandSep->mnXRight;
- long nSecondXRight = pSecondRectBandSep->mnXRight;
+ tools::Long nOwnXRight = pOwnRectBandSep->mnXRight;
+ tools::Long nSecondXRight = pSecondRectBandSep->mnXRight;
if ( nOwnXRight != nSecondXRight )
{
return false;
}
- long nOwnYBottom = pOwnRectBand->mnYBottom;
- long nSecondYBottom = pSecondRectBand->mnYBottom;
+ tools::Long nOwnYBottom = pOwnRectBand->mnYBottom;
+ tools::Long nSecondYBottom = pSecondRectBand->mnYBottom;
if ( nOwnYBottom != nSecondYBottom )
{
@@ -369,13 +369,13 @@ void RegionBand::processPoints()
It creates a minimal set of missing bands so that the entire vertical
interval from nTop to nBottom is covered by bands.
*/
-void RegionBand::ImplAddMissingBands(const long nTop, const long nBottom)
+void RegionBand::ImplAddMissingBands(const tools::Long nTop, const tools::Long nBottom)
{
// Iterate over already existing bands and add missing bands atop the
// first and between two bands.
ImplRegionBand* pPreviousBand = nullptr;
ImplRegionBand* pBand = ImplGetFirstRegionBand();
- long nCurrentTop (nTop);
+ tools::Long nCurrentTop (nTop);
while (pBand != nullptr && nCurrentTop<nBottom)
{
@@ -413,7 +413,7 @@ void RegionBand::ImplAddMissingBands(const long nTop, const long nBottom)
}
-void RegionBand::CreateBandRange(long nYTop, long nYBottom)
+void RegionBand::CreateBandRange(tools::Long nYTop, tools::Long nYBottom)
{
// add top band
mpFirstBand = new ImplRegionBand( nYTop-1, nYTop-1 );
@@ -422,7 +422,7 @@ void RegionBand::CreateBandRange(long nYTop, long nYBottom)
mpLastCheckedBand = mpFirstBand;
ImplRegionBand* pBand = mpFirstBand;
- for ( long i = nYTop; i <= nYBottom+1; i++ )
+ for ( tools::Long i = nYTop; i <= nYBottom+1; i++ )
{
// create new band
ImplRegionBand* pNewBand = new ImplRegionBand( i, i );
@@ -438,9 +438,9 @@ void RegionBand::CreateBandRange(long nYTop, long nYBottom)
}
-void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLineId)
+void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, tools::Long nLineId)
{
- long nX, nY;
+ tools::Long nX, nY;
// lines consisting of a single point do not interest here
if ( rStartPt == rEndPt )
@@ -452,7 +452,7 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
if ( rStartPt.X() == rEndPt.X() )
{
// vertical line
- const long nEndY = rEndPt.Y();
+ const tools::Long nEndY = rEndPt.Y();
nX = rStartPt.X();
nY = rStartPt.Y();
@@ -480,20 +480,20 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
}
else if ( rStartPt.Y() != rEndPt.Y() )
{
- const long nDX = labs( rEndPt.X() - rStartPt.X() );
- const long nDY = labs( rEndPt.Y() - rStartPt.Y() );
- const long nStartX = rStartPt.X();
- const long nStartY = rStartPt.Y();
- const long nEndX = rEndPt.X();
- const long nEndY = rEndPt.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1 : -1;
- const long nYInc = ( nStartY < nEndY ) ? 1 : -1;
+ const tools::Long nDX = labs( rEndPt.X() - rStartPt.X() );
+ const tools::Long nDY = labs( rEndPt.Y() - rStartPt.Y() );
+ const tools::Long nStartX = rStartPt.X();
+ const tools::Long nStartY = rStartPt.Y();
+ const tools::Long nEndX = rEndPt.X();
+ const tools::Long nEndY = rEndPt.Y();
+ const tools::Long nXInc = ( nStartX < nEndX ) ? 1 : -1;
+ const tools::Long nYInc = ( nStartY < nEndY ) ? 1 : -1;
if ( nDX >= nDY )
{
- const long nDYX = ( nDY - nDX ) * 2;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
+ const tools::Long nDYX = ( nDY - nDX ) * 2;
+ const tools::Long nDY2 = nDY << 1;
+ tools::Long nD = nDY2 - nDX;
for ( nX = nStartX, nY = nStartY; nX != nEndX; nX += nXInc )
{
@@ -510,9 +510,9 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
}
else
{
- const long nDYX = ( nDX - nDY ) * 2;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
+ const tools::Long nDYX = ( nDX - nDY ) * 2;
+ const tools::Long nDY2 = nDX << 1;
+ tools::Long nD = nDY2 - nDY;
for ( nX = nStartX, nY = nStartY; nY != nEndY; nY += nYInc )
{
@@ -533,7 +533,7 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
}
}
-void RegionBand::InsertPoint(const Point &rPoint, long nLineID, bool bEndPoint, LineType eLineType)
+void RegionBand::InsertPoint(const Point &rPoint, tools::Long nLineID, bool bEndPoint, LineType eLineType)
{
SAL_WARN_IF( mpFirstBand == nullptr, "vcl", "RegionBand::InsertPoint - no bands available!" );
@@ -663,7 +663,7 @@ bool RegionBand::OptimizeBandList()
return (nullptr != mpFirstBand);
}
-void RegionBand::Move(long nHorzMove, long nVertMove)
+void RegionBand::Move(tools::Long nHorzMove, tools::Long nVertMove)
{
ImplRegionBand* pBand = mpFirstBand;
@@ -711,7 +711,7 @@ void RegionBand::Scale(double fScaleX, double fScaleY)
}
-void RegionBand::InsertBands(long nTop, long nBottom)
+void RegionBand::InsertBands(tools::Long nTop, tools::Long nBottom)
{
// region empty? -> set rectangle as first entry!
if ( !mpFirstBand )
@@ -792,7 +792,7 @@ void RegionBand::InsertBands(long nTop, long nBottom)
}
-bool RegionBand::InsertSingleBand(ImplRegionBand* pBand, long nYBandPosition)
+bool RegionBand::InsertSingleBand(ImplRegionBand* pBand, tools::Long nYBandPosition)
{
// boundary already included in band with height 1? -> nothing to do!
if ( (pBand->mnYTop == pBand->mnYBottom) && (nYBandPosition == pBand->mnYTop) )
@@ -874,7 +874,7 @@ bool RegionBand::InsertSingleBand(ImplRegionBand* pBand, long nYBandPosition)
return false;
}
-void RegionBand::Union(long nLeft, long nTop, long nRight, long nBottom)
+void RegionBand::Union(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom)
{
SAL_WARN_IF( nLeft > nRight, "vcl", "RegionBand::Union() - nLeft > nRight" );
SAL_WARN_IF( nTop > nBottom, "vcl", "RegionBand::Union() - nTop > nBottom" );
@@ -890,7 +890,7 @@ void RegionBand::Union(long nLeft, long nTop, long nRight, long nBottom)
else
{
#ifdef DBG_UTIL
- long nCurY = pBand->mnYBottom;
+ tools::Long nCurY = pBand->mnYBottom;
pBand = pBand->mpNextBand;
while ( pBand )
{
@@ -910,7 +910,7 @@ void RegionBand::Union(long nLeft, long nTop, long nRight, long nBottom)
}
-void RegionBand::Intersect(long nLeft, long nTop, long nRight, long nBottom)
+void RegionBand::Intersect(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom)
{
// process intersections
ImplRegionBand* pPrevBand = nullptr;
@@ -970,7 +970,7 @@ void RegionBand::Union(const RegionBand& rSource)
}
-void RegionBand::Exclude(long nLeft, long nTop, long nRight, long nBottom)
+void RegionBand::Exclude(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom)
{
SAL_WARN_IF( nLeft > nRight, "vcl", "RegionBand::Exclude() - nLeft > nRight" );
SAL_WARN_IF( nTop > nBottom, "vcl", "RegionBand::Exclude() - nTop > nBottom" );
@@ -989,7 +989,7 @@ void RegionBand::Exclude(long nLeft, long nTop, long nRight, long nBottom)
else
{
#ifdef DBG_UTIL
- long nCurY = pBand->mnYBottom;
+ tools::Long nCurY = pBand->mnYBottom;
pBand = pBand->mpNextBand;
while(pBand)
@@ -1011,7 +1011,7 @@ void RegionBand::Exclude(long nLeft, long nTop, long nRight, long nBottom)
}
-void RegionBand::XOr(long nLeft, long nTop, long nRight, long nBottom)
+void RegionBand::XOr(tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom)
{
SAL_WARN_IF( nLeft > nRight, "vcl", "RegionBand::Exclude() - nLeft > nRight" );
SAL_WARN_IF( nTop > nBottom, "vcl", "RegionBand::Exclude() - nTop > nBottom" );
@@ -1030,7 +1030,7 @@ void RegionBand::XOr(long nLeft, long nTop, long nRight, long nBottom)
else
{
#ifdef DBG_UTIL
- long nCurY = pBand->mnYBottom;
+ tools::Long nCurY = pBand->mnYBottom;
pBand = pBand->mpNextBand;
while(pBand)
@@ -1183,10 +1183,10 @@ tools::Rectangle RegionBand::GetBoundRect() const
{
// get the boundaries of the first band
- long nYTop(mpFirstBand->mnYTop);
- long nYBottom(mpFirstBand->mnYBottom);
- long nXLeft(mpFirstBand->GetXLeftBoundary());
- long nXRight(mpFirstBand->GetXRightBoundary());
+ tools::Long nYTop(mpFirstBand->mnYTop);
+ tools::Long nYBottom(mpFirstBand->mnYBottom);
+ tools::Long nXLeft(mpFirstBand->GetXLeftBoundary());
+ tools::Long nXRight(mpFirstBand->GetXRightBoundary());
// look in the band list (don't test first band again!)
ImplRegionBand* pBand = mpFirstBand->mpNextBand;
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 5fb6cd6359e1..4b6891dc6936 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -134,21 +134,21 @@ bool SalGraphics::drawTransformedBitmap(
return false;
}
-long SalGraphics::mirror2( long x, const OutputDevice *pOutDev ) const
+tools::Long SalGraphics::mirror2( tools::Long x, const OutputDevice *pOutDev ) const
{
mirror(x, pOutDev);
return x;
}
-inline long SalGraphics::GetDeviceWidth(const OutputDevice* pOutDev) const
+inline tools::Long SalGraphics::GetDeviceWidth(const OutputDevice* pOutDev) const
{
return (pOutDev && pOutDev->IsVirtual())
? pOutDev->GetOutputWidthPixel() : GetGraphicsWidth();
}
-void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const
+void SalGraphics::mirror( tools::Long& x, const OutputDevice *pOutDev ) const
{
- const long w = GetDeviceWidth(pOutDev);
+ const tools::Long w = GetDeviceWidth(pOutDev);
if( !w )
return;
@@ -158,12 +158,12 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const
// mirror this window back
if( m_nLayout & SalLayoutFlags::BiDiRtl )
{
- long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ tools::Long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
x = devX + (x - pOutDevRef->GetOutOffXPixel());
}
else
{
- long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ tools::Long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
x = pOutDevRef->GetOutputWidthPixel() - (x - devX) + pOutDevRef->GetOutOffXPixel() - 1;
}
}
@@ -171,9 +171,9 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const
x = w-1-x;
}
-void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, bool bBack ) const
+void SalGraphics::mirror( tools::Long& x, tools::Long nWidth, const OutputDevice *pOutDev, bool bBack ) const
{
- const long w = GetDeviceWidth(pOutDev);
+ const tools::Long w = GetDeviceWidth(pOutDev);
if( !w )
return;
@@ -183,7 +183,7 @@ void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, boo
// mirror this window back
if( m_nLayout & SalLayoutFlags::BiDiRtl )
{
- long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ tools::Long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
if( bBack )
x = x - devX + pOutDevRef->GetOutOffXPixel();
else
@@ -191,7 +191,7 @@ void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, boo
}
else
{
- long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ tools::Long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
if( bBack )
x = devX + (pOutDevRef->GetOutputWidthPixel() + devX) - (x + nWidth);
else
@@ -204,7 +204,7 @@ void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, boo
bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const
{
- const long w = GetDeviceWidth(pOutDev);
+ const tools::Long w = GetDeviceWidth(pOutDev);
if( w )
{
sal_uInt32 i, j;
@@ -215,7 +215,7 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *
// mirror this window back
if( m_nLayout & SalLayoutFlags::BiDiRtl )
{
- long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ tools::Long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
for( i=0, j=nPoints-1; i<nPoints; i++,j-- )
{
pPtAry2[j].mnX = devX + (pPtAry[i].mnX - pOutDevRef->GetOutOffXPixel());
@@ -224,7 +224,7 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *
}
else
{
- long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ tools::Long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
for( i=0, j=nPoints-1; i<nPoints; i++,j-- )
{
pPtAry2[j].mnX = pOutDevRef->GetOutputWidthPixel() - (pPtAry[i].mnX - devX) + pOutDevRef->GetOutOffXPixel() - 1;
@@ -285,9 +285,9 @@ void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const
void SalGraphics::mirror( tools::Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const
{
- long nWidth = rRect.GetWidth();
- long x = rRect.Left();
- long x_org = x;
+ tools::Long nWidth = rRect.GetWidth();
+ tools::Long x = rRect.Left();
+ tools::Long x_org = x;
mirror( x, nWidth, pOutDev, bBack );
rRect.Move( x - x_org, 0 );
@@ -313,7 +313,7 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
const basegfx::B2DHomMatrix& SalGraphics::getMirror( const OutputDevice* i_pOutDev ) const
{
// get mirroring transformation
- const long w = GetDeviceWidth(i_pOutDev);
+ const tools::Long w = GetDeviceWidth(i_pOutDev);
SAL_WARN_IF( !w, "vcl", "missing graphics width" );
if(w != m_aLastMirrorW)
@@ -369,21 +369,21 @@ bool SalGraphics::SetClipRegion( const vcl::Region& i_rClip, const OutputDevice
return setClipRegion( i_rClip );
}
-void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( tools::Long nX, tools::Long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY );
}
-void SalGraphics::DrawPixel( long nX, long nY, Color nColor, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( tools::Long nX, tools::Long nY, Color nColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY, nColor );
}
-void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
+void SalGraphics::DrawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -393,7 +393,7 @@ void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const Output
drawLine( nX1, nY1, nX2, nY2 );
}
-void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+void SalGraphics::DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -598,9 +598,9 @@ bool SalGraphics::DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, Sal
return implDrawGradient(rPolyPolygon, rSalGradient);
}
-void SalGraphics::CopyArea( long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+void SalGraphics::CopyArea( tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
@@ -669,21 +669,21 @@ void SalGraphics::DrawMask( const SalTwoRect& rPosAry,
drawMask( rPosAry, rSalBitmap, nMaskColor );
}
-std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return getBitmap( nX, nY, nWidth, nHeight );
}
-Color SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
+Color SalGraphics::GetPixel( tools::Long nX, tools::Long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
return getPixel( nX, nY );
}
-void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -702,7 +702,7 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert
invert( nPoints, pPtAry, nFlags );
}
-bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize, const OutputDevice *pOutDev )
+bool SalGraphics::DrawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -881,7 +881,7 @@ bool SalGraphics::DrawTransformedBitmap(
return drawTransformedBitmap(rNull, rX, rY, rSourceBitmap, pAlphaBitmap);
}
-bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
+bool SalGraphics::DrawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 2bc324ff3ed8..95cf5d891521 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -579,8 +579,8 @@ Point SalLayout::GetDrawPosition( const Point& rRelative ) const
double fX = aOfs.X();
double fY = aOfs.Y();
- long nX = static_cast<long>( +fCos * fX + fSin * fY );
- long nY = static_cast<long>( +fCos * fY - fSin * fX );
+ tools::Long nX = static_cast<tools::Long>( +fCos * fX + fSin * fY );
+ tools::Long nY = static_cast<tools::Long>( +fCos * fY - fSin * fX );
aPos += Point( nX, nY );
}
@@ -802,7 +802,7 @@ static bool lcl_CanApplyAsianKerning(sal_Unicode cp)
void GenericSalLayout::ApplyAsianKerning(const OUString& rStr)
{
const int nLength = rStr.getLength();
- long nOffset = 0;
+ tools::Long nOffset = 0;
for (std::vector<GlyphItem>::iterator pGlyphIter = m_GlyphItems.Impl()->begin(),
pGlyphIterEnd = m_GlyphItems.Impl()->end();
@@ -844,7 +844,7 @@ void GenericSalLayout::ApplyAsianKerning(const OUString& rStr)
}
}
-void GenericSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
+void GenericSalLayout::GetCaretPositions( int nMaxIndex, tools::Long* pCaretXArray ) const
{
// initialize result array
for (int i = 0; i < nMaxIndex; ++i)
@@ -853,8 +853,8 @@ void GenericSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) co
// calculate caret positions using glyph array
for (auto const& aGlyphItem : *m_GlyphItems.Impl())
{
- long nXPos = aGlyphItem.m_aLinearPos.getX();
- long nXRight = nXPos + aGlyphItem.origWidth();
+ tools::Long nXPos = aGlyphItem.m_aLinearPos.getX();
+ tools::Long nXRight = nXPos + aGlyphItem.origWidth();
int n = aGlyphItem.charPos();
int nCurrIdx = 2 * (n - mnMinCharPos);
// tdf#86399 if this is not the start of a cluster, don't overwrite the caret bounds of the cluster start
@@ -930,7 +930,7 @@ bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph,
return true;
}
-void GenericSalLayout::MoveGlyph( int nStart, long nNewXPos )
+void GenericSalLayout::MoveGlyph( int nStart, tools::Long nNewXPos )
{
if( nStart >= static_cast<int>(m_GlyphItems.Impl()->size()) )
return;
@@ -944,7 +944,7 @@ void GenericSalLayout::MoveGlyph( int nStart, long nNewXPos )
if( pGlyphIter->IsRTLGlyph() )
nNewXPos += pGlyphIter->m_nNewWidth - pGlyphIter->origWidth();
// calculate the x-offset to the old position
- long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.getX();
+ tools::Long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.getX();
// adjust all following glyph positions if needed
if( nXDelta != 0 )
{
@@ -1162,7 +1162,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
mnLevel = nLevel;
// prepare merge the fallback levels
- long nXPos = 0;
+ tools::Long nXPos = 0;
double fUnitMul = 1.0;
for( n = 0; n < nLevel; ++n )
maFallbackRuns[n].ResetPos();
@@ -1200,7 +1200,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
// use base(n==0) or fallback(n>=1) level
fUnitMul = mnUnitsPerPixel;
fUnitMul /= mpLayouts[n]->GetUnitsPerPixel();
- long nNewPos = static_cast<long>(nXPos/fUnitMul + 0.5);
+ tools::Long nNewPos = static_cast<tools::Long>(nXPos/fUnitMul + 0.5);
mpLayouts[n]->MoveGlyph( nStartOld[n], nNewPos );
}
else
@@ -1338,7 +1338,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
// the measured width is still in fallback font units
// => convert it to base level font units
if( n > 0 ) // optimization: because (fUnitMul==1.0) for (n==0)
- nRunAdvance = static_cast<long>(nRunAdvance*fUnitMul + 0.5);
+ nRunAdvance = static_cast<tools::Long>(nRunAdvance*fUnitMul + 0.5);
}
// calculate new x position (in base level units)
@@ -1478,7 +1478,7 @@ DeviceCoordinate MultiSalLayout::FillDXArray( DeviceCoordinate* pCharWidths ) co
return nMaxWidth;
}
-void MultiSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
+void MultiSalLayout::GetCaretPositions( int nMaxIndex, tools::Long* pCaretXArray ) const
{
SalLayout& rLayout = *mpLayouts[ 0 ];
rLayout.GetCaretPositions( nMaxIndex, pCaretXArray );
@@ -1495,8 +1495,8 @@ void MultiSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) cons
for( int i = 0; i < nMaxIndex; ++i )
if( pTempPos[i] >= 0 )
{
- long w = pTempPos[i];
- w = static_cast<long>(w*fUnitMul + 0.5);
+ tools::Long w = pTempPos[i];
+ w = static_cast<tools::Long>(w*fUnitMul + 0.5);
pCaretXArray[i] = w;
}
}
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 6f790f727ca6..434e94865aa3 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -43,13 +43,13 @@ while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) )
#define TC_TO_PAL_COLORS 4096
-static long ImplIndexFromColor( const BitmapColor& rCol )
+static tools::Long ImplIndexFromColor( const BitmapColor& rCol )
{
#if TC_TO_PAL_COLORS == 4096
- return( ( ( static_cast<long>(rCol.GetBlue()) >> 4) << 8 ) |
- ( ( static_cast<long>(rCol.GetGreen()) >> 4 ) << 4 ) |
- ( static_cast<long>(rCol.GetRed()) >> 4 ) );
+ return( ( ( static_cast<tools::Long>(rCol.GetBlue()) >> 4) << 8 ) |
+ ( ( static_cast<tools::Long>(rCol.GetGreen()) >> 4 ) << 4 ) |
+ ( static_cast<tools::Long>(rCol.GetRed()) >> 4 ) );
#elif TC_TO_PAL_COLORS == 32768
@@ -62,9 +62,9 @@ static long ImplIndexFromColor( const BitmapColor& rCol )
static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, tools::Long const * pMapX, const tools::Long* pMapY )
{
- const long nHeight1 = rDstBuffer.mnHeight - 1;
+ const tools::Long nHeight1 = rDstBuffer.mnHeight - 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
@@ -81,12 +81,12 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
pColMapBuf[ i ] = aIndex;
}
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pColMapBuf[ pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ).GetIndex() ], rDstMask );
DOUBLE_SCANLINES();
@@ -95,9 +95,9 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, tools::Long const * pMapX, const tools::Long* pMapY )
{
- const long nHeight1 = rDstBuffer.mnHeight - 1;
+ const tools::Long nHeight1 = rDstBuffer.mnHeight - 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
const BitmapColor* pColBuf = rSrcBuffer.maPalette.ImplGetColorBuffer();
@@ -106,14 +106,14 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
{
const BitmapColor aCol0( pColBuf[ 0 ] );
const BitmapColor aCol1( pColBuf[ 1 ] );
- long nMapX;
+ tools::Long nMapX;
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth;)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth;)
{
nMapX = pMapX[ nX ];
pFncSetPixel( pDstScan, nX++,
@@ -126,14 +126,14 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
}
else if( RemoveScanline( rSrcBuffer.mnFormat ) == ScanlineFormat::N4BitMsnPal )
{
- long nMapX;
+ tools::Long nMapX;
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth;)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth;)
{
nMapX = pMapX[ nX ];
pFncSetPixel( pDstScan, nX++,
@@ -146,12 +146,12 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
}
else if( RemoveScanline( rSrcBuffer.mnFormat ) == ScanlineFormat::N8BitPal )
{
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pColBuf[ pSrcScan[ pMapX[ nX ] ] ], rDstMask );
DOUBLE_SCANLINES();
@@ -159,12 +159,12 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
}
else
{
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pColBuf[ pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ).GetIndex() ], rDstMask );
DOUBLE_SCANLINES();
@@ -174,9 +174,9 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, tools::Long const * pMapX, const tools::Long* pMapY )
{
- const long nHeight1 = rDstBuffer.mnHeight - 1;
+ const tools::Long nHeight1 = rDstBuffer.mnHeight - 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
@@ -185,12 +185,12 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDs
BitmapColor aCol;
sal_uInt8* pPixel = nullptr;
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
{
pPixel = pSrcScan + pMapX[ nX ] * 3;
aCol.SetBlue( *pPixel++ );
@@ -204,12 +204,12 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDs
}
else
{
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ), rDstMask );
DOUBLE_SCANLINES();
@@ -219,19 +219,19 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDs
static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, tools::Long const * pMapX, const tools::Long* pMapY )
{
- const long nHeight1 = rDstBuffer.mnHeight- 1;
+ const tools::Long nHeight1 = rDstBuffer.mnHeight- 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
std::unique_ptr<sal_uInt8[]> pColToPalMap(new sal_uInt8[ TC_TO_PAL_COLORS ]);
BitmapColor aIndex( 0 );
- for( long nR = 0; nR < 16; nR++ )
+ for( tools::Long nR = 0; nR < 16; nR++ )
{
- for( long nG = 0; nG < 16; nG++ )
+ for( tools::Long nG = 0; nG < 16; nG++ )
{
- for( long nB = 0; nB < 16; nB++ )
+ for( tools::Long nB = 0; nB < 16; nB++ )
{
BitmapColor aCol( sal::static_int_cast<sal_uInt8>(nR << 4),
sal::static_int_cast<sal_uInt8>(nG << 4),
@@ -241,12 +241,12 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rD
}
}
- for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
+ for (tools::Long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
- long nMapY = pMapY[nActY];
+ tools::Long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
+ for (tools::Long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
{
aIndex.SetIndex( pColToPalMap[ ImplIndexFromColor( pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ) ) ] );
pFncSetPixel( pDstScan, nX, aIndex, rDstMask );
@@ -307,7 +307,7 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
pDstBuffer->mnFormat = nDstBitmapFormat;
pDstBuffer->mnWidth = rTwoRect.mnDestWidth;
pDstBuffer->mnHeight = rTwoRect.mnDestHeight;
- long nScanlineBase;
+ tools::Long nScanlineBase;
bool bFail = o3tl::checked_multiply<long>(pDstBuffer->mnBitCount, pDstBuffer->mnWidth, nScanlineBase);
if (bFail)
{
@@ -388,12 +388,12 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
{
const double fFactorX = static_cast<double>(rTwoRect.mnSrcWidth) / pDstBuffer->mnWidth;
- for (long i = 0; i < pDstBuffer->mnWidth; ++i)
+ for (tools::Long i = 0; i < pDstBuffer->mnWidth; ++i)
pMapX[ i ] = rTwoRect.mnSrcX + static_cast<int>( i * fFactorX );
}
else
{
- for (long i = 0, nTmp = rTwoRect.mnSrcX ; i < pDstBuffer->mnWidth; ++i)
+ for (tools::Long i = 0, nTmp = rTwoRect.mnSrcX ; i < pDstBuffer->mnWidth; ++i)
pMapX[ i ] = nTmp++;
}
@@ -402,18 +402,18 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
{
const double fFactorY = static_cast<double>(rTwoRect.mnSrcHeight) / pDstBuffer->mnHeight;
- for (long i = 0; i < pDstBuffer->mnHeight; ++i)
+ for (tools::Long i = 0; i < pDstBuffer->mnHeight; ++i)
pMapY[ i ] = rTwoRect.mnSrcY + static_cast<int>( i * fFactorY );
}
else
{
- for (long i = 0, nTmp = rTwoRect.mnSrcY; i < pDstBuffer->mnHeight; ++i)
+ for (tools::Long i = 0, nTmp = rTwoRect.mnSrcY; i < pDstBuffer->mnHeight; ++i)
pMapY[ i ] = nTmp++;
}
// source scanline buffer
Scanline pTmpScan;
- long nOffset;
+ tools::Long nOffset;
if( rSrcBuffer.mnFormat & ScanlineFormat::TopDown )
{
pTmpScan = rSrcBuffer.mpBits;
@@ -425,7 +425,7 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
nOffset = -rSrcBuffer.mnScanlineSize;
}
- for (long i = 0; i < rSrcBuffer.mnHeight; i++, pTmpScan += nOffset)
+ for (tools::Long i = 0; i < rSrcBuffer.mnHeight; i++, pTmpScan += nOffset)
pSrcScan[ i ] = pTmpScan;
// destination scanline buffer
@@ -440,7 +440,7 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
nOffset = -pDstBuffer->mnScanlineSize;
}
- for (long i = 0; i < pDstBuffer->mnHeight; i++, pTmpScan += nOffset)
+ for (tools::Long i = 0; i < pDstBuffer->mnHeight; i++, pTmpScan += nOffset)
pDstScan[ i ] = pTmpScan;
// do buffer scaling and conversion
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index a7c30186633b..988c5bfa578f 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -40,7 +40,7 @@ namespace vcl
{
}
- long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ tools::Long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return m_rTargetDevice.GetTextWidth( _rText, _nStartIndex, _nLength );
}
@@ -51,13 +51,13 @@ namespace vcl
m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
}
- void DefaultTextLayout::GetCaretPositions( const OUString& _rText, long* _pCaretXArray,
+ void DefaultTextLayout::GetCaretPositions( const OUString& _rText, tools::Long* _pCaretXArray,
sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
m_rTargetDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
}
- sal_Int32 DefaultTextLayout::GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ sal_Int32 DefaultTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return m_rTargetDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
}
@@ -74,10 +74,10 @@ namespace vcl
virtual ~ReferenceDeviceTextLayout();
// ITextLayout
- virtual long GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) const override;
+ virtual tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) const override;
virtual void DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText ) override;
- virtual void GetCaretPositions( const OUString& _rText, long* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const override;
- virtual sal_Int32 GetTextBreak(const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override;
+ virtual void GetCaretPositions( const OUString& _rText, tools::Long* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const override;
+ virtual sal_Int32 GetTextBreak(const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override;
virtual bool DecomposeTextRectAction() const override;
public:
@@ -86,7 +86,7 @@ namespace vcl
tools::Rectangle GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
private:
- long GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
+ tools::Long GetTextArray( const OUString& _rText, tools::Long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
OutputDevice& m_rTargetDevice;
OutputDevice& m_rReferenceDevice;
@@ -159,13 +159,13 @@ namespace vcl
}
}
- long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ tools::Long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, tools::Long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
return 0;
// retrieve the character widths from the reference device
- long nTextWidth = m_rReferenceDevice.GetTextArray( _rText, _pDXAry, _nStartIndex, _nLength );
+ tools::Long nTextWidth = m_rReferenceDevice.GetTextArray( _rText, _pDXAry, _nStartIndex, _nLength );
#if OSL_DEBUG_LEVEL > 1
if ( _pDXAry )
{
@@ -188,7 +188,7 @@ namespace vcl
return nTextWidth;
}
- long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ tools::Long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return GetTextArray( _rText, nullptr, _nStartIndex, _nLength );
}
@@ -208,14 +208,14 @@ namespace vcl
}
std::unique_ptr<long[]> pCharWidths(new long[ _nLength ]);
- long nTextWidth = GetTextArray( _rText, pCharWidths.get(), _nStartIndex, _nLength );
+ tools::Long nTextWidth = GetTextArray( _rText, pCharWidths.get(), _nStartIndex, _nLength );
m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, pCharWidths.get(), _nStartIndex, _nLength );
pCharWidths.reset();
m_aCompleteTextRect.Union( tools::Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
}
- void ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, long* _pCaretXArray,
+ void ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, tools::Long* _pCaretXArray,
sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -225,7 +225,7 @@ namespace vcl
m_rReferenceDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
}
- sal_Int32 ReferenceDeviceTextLayout::GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ sal_Int32 ReferenceDeviceTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
return 0;
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index fbedbfba7aea..b6e0787b8b60 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -109,7 +109,7 @@ void VirtualDevice::ReleaseGraphics( bool bRelease )
}
void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
- long nDX, long nDY, const SystemGraphicsData *pData )
+ tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData )
{
SAL_INFO( "vcl.virdev", "ImplInitVirDev(" << nDX << "," << nDY << ")" );
@@ -263,7 +263,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra
}
bool bRet;
- long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height();
+ tools::Long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height();
if ( nNewWidth < 1 )
nNewWidth = 1;
@@ -300,8 +300,8 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra
SalGraphics* pGraphics = pNewVirDev->AcquireGraphics();
if ( pGraphics )
{
- long nWidth;
- long nHeight;
+ tools::Long nWidth;
+ tools::Long nHeight;
if ( mnOutWidth < nNewWidth )
nWidth = mnOutWidth;
else
@@ -496,7 +496,7 @@ void VirtualDevice::Compat_ZeroExtleadBug()
mbForceZeroExtleadBug = true;
}
-long VirtualDevice::GetFontExtLeading() const
+tools::Long VirtualDevice::GetFontExtLeading() const
{
#ifdef UNX
// backwards compatible line metrics after fixing #i60945#
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index d44a4bdafe78..415e42e3313a 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -357,7 +357,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si
const Point aOldOrigin( rPt );
const MapMode aMap100( MapUnit::Map100thMM );
Size aSize100;
- long nTotalWidth, nTotalHeight;
+ tools::Long nTotalWidth, nTotalHeight;
if( nRot10 )
{
@@ -383,16 +383,16 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si
if( !aSize100.IsEmpty() && nTotalWidth > 0 && nTotalHeight > 0 )
{
double fScale = static_cast<double>(aSize100.Width()) / nTotalWidth;
- const long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
- const long nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1;
+ const tools::Long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
+ const tools::Long nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1;
fScale = static_cast<double>(rSz.Width()) / aSize100.Width();
rPt.AdjustX(FRound( nNewLeft * fScale ) );
rSz.setWidth( FRound( ( nNewRight - nNewLeft + 1 ) * fScale ) );
fScale = static_cast<double>(aSize100.Height()) / nTotalHeight;
- const long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
- const long nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1;
+ const tools::Long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale );
+ const tools::Long nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1;
fScale = static_cast<double>(rSz.Height()) / aSize100.Height();
rPt.AdjustY(FRound( nNewTop * fScale ) );
@@ -540,7 +540,7 @@ void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea
}
bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- long nExtraData,
+ tools::Long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
bool bRet = false;
@@ -591,7 +591,7 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
return bRet;
}
-void GraphicObject::StopAnimation( const OutputDevice* pOut, long nExtraData )
+void GraphicObject::StopAnimation( const OutputDevice* pOut, tools::Long nExtraData )
{
if (mxSimpleCache)
mxSimpleCache->maGraphic.StopAnimation(pOut, nExtraData);
@@ -676,13 +676,13 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
// #104115# Adapt the pref size by hand (scale changes it
// proportionally, but we want it to be smaller than the
// former size, to crop the excess out)
- aMtf.SetPrefSize( Size( static_cast<long>(static_cast<double>(rDestSize.Width()) * (1.0 + (aCropLeftTop.Width() + aCropRightBottom.Width()) / aSrcSize.Width()) + .5),
- static_cast<long>(static_cast<double>(rDestSize.Height()) * (1.0 + (aCropLeftTop.Height() + aCropRightBottom.Height()) / aSrcSize.Height()) + .5) ) );
+ aMtf.SetPrefSize( Size( static_cast<tools::Long>(static_cast<double>(rDestSize.Width()) * (1.0 + (aCropLeftTop.Width() + aCropRightBottom.Width()) / aSrcSize.Width()) + .5),
+ static_cast<tools::Long>(static_cast<double>(rDestSize.Height()) * (1.0 + (aCropLeftTop.Height() + aCropRightBottom.Height()) / aSrcSize.Height()) + .5) ) );
// #104115# Adapt the origin of the new mapmode, such that it
// is shifted to the place where the cropped output starts
- Point aNewOrigin( static_cast<long>(static_cast<double>(aMtfMapMode.GetOrigin().X()) + rDestSize.Width() * aCropLeftTop.Width() / (aSrcSize.Width() - aCropLeftTop.Width() - aCropRightBottom.Width()) + .5),
- static_cast<long>(static_cast<double>(aMtfMapMode.GetOrigin().Y()) + rDestSize.Height() * aCropLeftTop.Height() / (aSrcSize.Height() - aCropLeftTop.Height() - aCropRightBottom.Height()) + .5) );
+ Point aNewOrigin( static_cast<tools::Long>(static_cast<double>(aMtfMapMode.GetOrigin().X()) + rDestSize.Width() * aCropLeftTop.Width() / (aSrcSize.Width() - aCropLeftTop.Width() - aCropRightBottom.Width()) + .5),
+ static_cast<tools::Long>(static_cast<double>(aMtfMapMode.GetOrigin().Y()) + rDestSize.Height() * aCropLeftTop.Height() / (aSrcSize.Height() - aCropLeftTop.Height() - aCropRightBottom.Height()) + .5) );
MapMode aNewMap( rDestMap );
aNewMap.SetOrigin( OutputDevice::LogicToLogic(aNewOrigin, aMtfMapMode, rDestMap) );
aMtf.SetPrefMapMode( aNewMap );
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 1747c09d5cf4..8ca8ffc638d1 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -471,7 +471,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
OSL_ENSURE(m_pBmpAcc,"Invalid bmp read access");
// can return bitmap data as-is
- for( long y=aRequestedBytes.Top(); y<aRequestedBytes.Bottom(); ++y )
+ for( tools::Long y=aRequestedBytes.Top(); y<aRequestedBytes.Bottom(); ++y )
{
Scanline pScan = m_pBmpAcc->GetScanline(y);
memcpy(pOutBuf, pScan+aRequestedBytes.Left(), aRequestedBytes.getWidth());
@@ -488,14 +488,14 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
OSL_ENSURE((m_nBitsPerOutputPixel & 0x07) == 0,
"Transparent bitmap bitcount not integer multiple of 8" );
- for( long y=aRequestedArea.Top(); y<aRequestedArea.Bottom(); ++y )
+ for( tools::Long y=aRequestedArea.Top(); y<aRequestedArea.Bottom(); ++y )
{
sal_Int8* pOutScan = pOutBuf;
if( m_nBitsPerInputPixel < 8 )
{
// input less than a byte - copy via GetPixel()
- for( long x=aRequestedArea.Left(); x<aRequestedArea.Right(); ++x )
+ for( tools::Long x=aRequestedArea.Left(); x<aRequestedArea.Right(); ++x )
{
*pOutScan++ = m_pBmpAcc->GetPixelIndex(y,x);
*pOutScan++ = m_pAlphaAcc->GetPixelIndex(y,x);
@@ -503,15 +503,15 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
}
else
{
- const long nNonAlphaBytes( m_nBitsPerInputPixel/8 );
- const long nScanlineOffsetLeft(aRequestedArea.Left()*nNonAlphaBytes);
+ const tools::Long nNonAlphaBytes( m_nBitsPerInputPixel/8 );
+ const tools::Long nScanlineOffsetLeft(aRequestedArea.Left()*nNonAlphaBytes);
Scanline pScan = m_pBmpAcc->GetScanline(y) + nScanlineOffsetLeft;
Scanline pScanlineAlpha = m_pAlphaAcc->GetScanline( y );
// input integer multiple of byte - copy directly
- for( long x=aRequestedArea.Left(); x<aRequestedArea.Right(); ++x )
+ for( tools::Long x=aRequestedArea.Left(); x<aRequestedArea.Right(); ++x )
{
- for( long i=0; i<nNonAlphaBytes; ++i )
+ for( tools::Long i=0; i<nNonAlphaBytes; ++i )
*pOutScan++ = *pScan++;
*pOutScan++ = m_pAlphaAcc->GetIndexFromData( pScanlineAlpha, x );
}
@@ -551,7 +551,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
bitmapLayout.ScanLineBytes =
bitmapLayout.ScanLineStride= aRet.getLength();
- const long nScanlineLeftOffset( pos.X*m_nBitsPerInputPixel/8 );
+ const tools::Long nScanlineLeftOffset( pos.X*m_nBitsPerInputPixel/8 );
if( !m_aBmpEx.IsTransparent() )
{
assert(m_pBmpAcc && "Invalid bmp read access");
@@ -578,7 +578,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
}
else
{
- const long nNonAlphaBytes( m_nBitsPerInputPixel/8 );
+ const tools::Long nNonAlphaBytes( m_nBitsPerInputPixel/8 );
Scanline pScan = m_pBmpAcc->GetScanline(pos.Y);
// input integer multiple of byte - copy directly
@@ -1160,7 +1160,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR
if( m_aBmpEx.IsTransparent() )
{
- const long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
+ const tools::Long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
const sal_Int32 nBytesPerPixel((m_nBitsPerOutputPixel+7)/8);
const sal_uInt8 nAlphaFactor( m_aBmpEx.IsAlpha() ? 1 : 255 );
for( std::size_t i=0; i<nLen; i+=nBytesPerPixel )
@@ -1215,7 +1215,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA
if( m_aBmpEx.IsTransparent() )
{
- const long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
+ const tools::Long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
const sal_Int32 nBytesPerPixel((m_nBitsPerOutputPixel+7)/8);
const sal_uInt8 nAlphaFactor( m_aBmpEx.IsAlpha() ? 1 : 255 );
for( std::size_t i=0; i<nLen; i+=nBytesPerPixel )
@@ -1267,7 +1267,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
if( m_aBmpEx.IsTransparent() )
{
- const long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
+ const tools::Long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
for( std::size_t i=0; i<nLen; ++i )
{
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
@@ -1316,7 +1316,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
if( m_aBmpEx.IsTransparent() )
{
- const long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
+ const tools::Long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
for( std::size_t i=0; i<nLen; ++i )
{
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
@@ -1365,7 +1365,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
if( m_aBmpEx.IsTransparent() )
{
- const long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
+ const tools::Long nNonAlphaBytes( (m_nBitsPerInputPixel+7)/8 );
for( std::size_t i=0; i<nLen; ++i )
{
const double nAlpha( rgbColor[i].Alpha );
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 18f923d50016..5621e4994fa5 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -315,8 +315,8 @@ namespace vcl::unotools
Size sizeFromRealSize2D( const geometry::RealSize2D& rSize )
{
- return Size( static_cast<long>(rSize.Width + .5),
- static_cast<long>(rSize.Height + .5) );
+ return Size( static_cast<tools::Long>(rSize.Width + .5),
+ static_cast<tools::Long>(rSize.Height + .5) );
}
::Size sizeFromB2DSize( const basegfx::B2DVector& rVec )
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index fc5cc3703b7a..ef7729914f0d 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -531,7 +531,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
return LoadShaders(rVertexShaderName, rFragmentShaderName, OUString(), "", "");
}
-void OpenGLHelper::renderToFile(long nWidth, long nHeight, const OUString& rFileName)
+void OpenGLHelper::renderToFile(tools::Long nWidth, tools::Long nHeight, const OUString& rFileName)
{
OpenGLZone aZone;
@@ -559,7 +559,7 @@ GLenum OpenGLHelper::OptimalBufferFormat()
#endif
}
-BitmapEx OpenGLHelper::ConvertBufferToBitmapEx(const sal_uInt8* const pBuffer, long nWidth, long nHeight)
+BitmapEx OpenGLHelper::ConvertBufferToBitmapEx(const sal_uInt8* const pBuffer, tools::Long nWidth, tools::Long nHeight)
{
assert(pBuffer);
Bitmap aBitmap( Size(nWidth, nHeight), 24 );
@@ -580,7 +580,7 @@ BitmapEx OpenGLHelper::ConvertBufferToBitmapEx(const sal_uInt8* const pBuffer, l
assert(pAlphaWriteAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal);
size_t nCurPos = 0;
- for( long y = 0; y < nHeight; ++y)
+ for( tools::Long y = 0; y < nHeight; ++y)
{
#ifdef _WIN32
Scanline pScan = pWriteAccess->GetScanline(y);
@@ -589,7 +589,7 @@ BitmapEx OpenGLHelper::ConvertBufferToBitmapEx(const sal_uInt8* const pBuffer, l
Scanline pScan = pWriteAccess->GetScanline(nHeight-1-y);
Scanline pAlphaScan = pAlphaWriteAccess->GetScanline(nHeight-1-y);
#endif
- for( long x = 0; x < nWidth; ++x )
+ for( tools::Long x = 0; x < nWidth; ++x )
{
*pScan++ = pBuffer[nCurPos];
*pScan++ = pBuffer[nCurPos+1];
@@ -663,7 +663,7 @@ std::ostream& operator<<(std::ostream& rStrm, const glm::mat4& rMatrix)
return rStrm;
}
-void OpenGLHelper::createFramebuffer(long nWidth, long nHeight, GLuint& nFramebufferId,
+void OpenGLHelper::createFramebuffer(tools::Long nWidth, tools::Long nHeight, GLuint& nFramebufferId,
GLuint& nRenderbufferDepthId, GLuint& nRenderbufferColorId)
{
OpenGLZone aZone;
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index c584a1d82848..10c7f0d164d2 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -179,7 +179,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
- const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY )
+ const Bitmap& rBmp, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY )
{
Bitmap aBmp( rBmp );
@@ -382,10 +382,10 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
Bitmap aBmp;
- long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
- long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() );
- long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() );
+ tools::Long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ tools::Long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ tools::Long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() );
+ tools::Long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() );
if ( mpGraphics || AcquireGraphics() )
{
@@ -733,15 +733,15 @@ struct LinearScaleContext
std::unique_ptr<long[]> mpMapYOffset;
LinearScaleContext(tools::Rectangle const & aDstRect, tools::Rectangle const & aBitmapRect,
- Size const & aOutSize, long nOffX, long nOffY)
+ Size const & aOutSize, tools::Long nOffX, tools::Long nOffY)
: mpMapX(new long[aDstRect.GetWidth()])
, mpMapY(new long[aDstRect.GetHeight()])
, mpMapXOffset(new long[aDstRect.GetWidth()])
, mpMapYOffset(new long[aDstRect.GetHeight()])
{
- const long nSrcWidth = aBitmapRect.GetWidth();
- const long nSrcHeight = aBitmapRect.GetHeight();
+ const tools::Long nSrcWidth = aBitmapRect.GetWidth();
+ const tools::Long nSrcHeight = aBitmapRect.GetHeight();
generateSimpleMap(
nSrcWidth, aDstRect.GetWidth(), aBitmapRect.Left(),
@@ -754,20 +754,20 @@ struct LinearScaleContext
private:
- static void generateSimpleMap(long nSrcDimension, long nDstDimension, long nDstLocation,
- long nOutDimension, long nOffset, long* pMap, long* pMapOffset)
+ static void generateSimpleMap(tools::Long nSrcDimension, tools::Long nDstDimension, tools::Long nDstLocation,
+ tools::Long nOutDimension, tools::Long nOffset, tools::Long* pMap, tools::Long* pMapOffset)
{
const double fReverseScale = (std::abs(nOutDimension) > 1) ? (nSrcDimension - 1) / double(std::abs(nOutDimension) - 1) : 0.0;
- long nSampleRange = std::max(0L, nSrcDimension - 2);
+ tools::Long nSampleRange = std::max(0L, nSrcDimension - 2);
- for (long i = 0; i < nDstDimension; i++)
+ for (tools::Long i = 0; i < nDstDimension; i++)
{
double fTemp = std::abs((nOffset + i) * fReverseScale);
- pMap[i] = MinMax(nDstLocation + long(fTemp), 0, nSampleRange);
- pMapOffset[i] = static_cast<long>((fTemp - pMap[i]) * 128.0);
+ pMap[i] = MinMax(nDstLocation + tools::Long(fTemp), 0, nSampleRange);
+ pMapOffset[i] = static_cast<tools::Long>((fTemp - pMap[i]) * 128.0);
}
}
@@ -776,8 +776,8 @@ public:
const BitmapWriteAccess* pDestination,
const BitmapReadAccess* pSource,
const BitmapReadAccess* pSourceAlpha,
- const long nDstWidth,
- const long nDstHeight)
+ const tools::Long nDstWidth,
+ const tools::Long nDstHeight)
{
if (pSource && pSourceAlpha && pDestination)
{
@@ -807,24 +807,24 @@ public:
const BitmapWriteAccess* pDestination,
const BitmapReadAccess* pSource,
const BitmapReadAccess* pSourceAlpha,
- const long nDstWidth,
- const long nDstHeight)
+ const tools::Long nDstWidth,
+ const tools::Long nDstHeight)
{
Scanline pLine0, pLine1;
Scanline pLineAlpha0, pLineAlpha1;
Scanline pColorSample1, pColorSample2;
Scanline pDestScanline;
- long nColor1Line1, nColor2Line1, nColor3Line1;
- long nColor1Line2, nColor2Line2, nColor3Line2;
- long nAlphaLine1, nAlphaLine2;
+ tools::Long nColor1Line1, nColor2Line1, nColor3Line1;
+ tools::Long nColor1Line2, nColor2Line2, nColor3Line2;
+ tools::Long nAlphaLine1, nAlphaLine2;
sal_uInt8 nColor1, nColor2, nColor3, nAlpha;
- for (long nY = 0; nY < nDstHeight; nY++)
+ for (tools::Long nY = 0; nY < nDstHeight; nY++)
{
- const long nMapY = mpMapY[nY];
- const long nMapFY = mpMapYOffset[nY];
+ const tools::Long nMapY = mpMapY[nY];
+ const tools::Long nMapFY = mpMapYOffset[nY];
pLine0 = pSource->GetScanline(nMapY);
// tdf#95481 guard nMapY + 1 to be within bounds
@@ -836,42 +836,42 @@ public:
pDestScanline = pDestination->GetScanline(nY);
- for (long nX = 0; nX < nDstWidth; nX++)
+ for (tools::Long nX = 0; nX < nDstWidth; nX++)
{
- const long nMapX = mpMapX[nX];
- const long nMapFX = mpMapXOffset[nX];
+ const tools::Long nMapX = mpMapX[nX];
+ const tools::Long nMapFX = mpMapXOffset[nX];
pColorSample1 = pLine0 + 3 * nMapX;
pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1;
- nColor1Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nColor1Line1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1++;
pColorSample2++;
- nColor2Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nColor2Line1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1++;
pColorSample2++;
- nColor3Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nColor3Line1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1 = pLine1 + 3 * nMapX;
pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1;
- nColor1Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nColor1Line2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1++;
pColorSample2++;
- nColor2Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nColor2Line2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1++;
pColorSample2++;
- nColor3Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nColor3Line2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1 = pLineAlpha0 + nMapX;
pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1;
- nAlphaLine1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nAlphaLine1 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
pColorSample1 = pLineAlpha1 + nMapX;
pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1;
- nAlphaLine2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
+ nAlphaLine2 = (static_cast<tools::Long>(*pColorSample1) << 7) + nMapFX * (static_cast<tools::Long>(*pColorSample2) - *pColorSample1);
nColor1 = (nColor1Line1 + nMapFY * ((nColor1Line2 >> 7) - (nColor1Line1 >> 7))) >> 7;
nColor2 = (nColor2Line1 + nMapFY * ((nColor2Line2 >> 7) - (nColor2Line1 >> 7))) >> 7;
@@ -897,13 +897,13 @@ struct TradScaleContext
std::unique_ptr<long[]> mpMapY;
TradScaleContext(tools::Rectangle const & aDstRect, tools::Rectangle const & aBitmapRect,
- Size const & aOutSize, long nOffX, long nOffY)
+ Size const & aOutSize, tools::Long nOffX, tools::Long nOffY)
: mpMapX(new long[aDstRect.GetWidth()])
, mpMapY(new long[aDstRect.GetHeight()])
{
- const long nSrcWidth = aBitmapRect.GetWidth();
- const long nSrcHeight = aBitmapRect.GetHeight();
+ const tools::Long nSrcWidth = aBitmapRect.GetWidth();
+ const tools::Long nSrcHeight = aBitmapRect.GetHeight();
const bool bHMirr = aOutSize.Width() < 0;
const bool bVMirr = aOutSize.Height() < 0;
@@ -919,15 +919,15 @@ struct TradScaleContext
private:
- static void generateSimpleMap(long nSrcDimension, long nDstDimension, long nDstLocation,
- long nOutDimension, long nOffset, bool bMirror, long* pMap)
+ static void generateSimpleMap(tools::Long nSrcDimension, tools::Long nDstDimension, tools::Long nDstLocation,
+ tools::Long nOutDimension, tools::Long nOffset, bool bMirror, tools::Long* pMap)
{
- long nMirrorOffset = 0;
+ tools::Long nMirrorOffset = 0;
if (bMirror)
nMirrorOffset = (nDstLocation << 1) + nSrcDimension - 1;
- for (long i = 0; i < nDstDimension; ++i, ++nOffset)
+ for (tools::Long i = 0; i < nDstDimension; ++i, ++nOffset)
{
pMap[i] = nDstLocation + nOffset * nSrcDimension / nOutDimension;
if (bMirror)
@@ -970,19 +970,19 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap,
aDstRect.SetSize(aBmp.GetSizePixel());
}
- const long nDstWidth = aDstRect.GetWidth();
- const long nDstHeight = aDstRect.GetHeight();
+ const tools::Long nDstWidth = aDstRect.GetWidth();
+ const tools::Long nDstHeight = aDstRect.GetHeight();
// calculate offset in original bitmap
// in RTL case this is a little more complicated since the contents of the
// bitmap is not mirrored (it never is), however the paint region and bmp region
// are in mirrored coordinates, so the intersection of (aOutPt,aOutSz) with these
// is content wise somewhere else and needs to take mirroring into account
- const long nOffX = IsRTLEnabled()
+ const tools::Long nOffX = IsRTLEnabled()
? aOutSize.Width() - aDstRect.GetWidth() - (aDstRect.Left() - aOutPoint.X())
: aDstRect.Left() - aOutPoint.X();
- const long nOffY = aDstRect.Top() - aOutPoint.Y();
+ const tools::Long nOffY = aDstRect.Top() - aOutPoint.Y();
TradScaleContext aTradContext(aDstRect, aBmpRect, aOutSize, nOffX, nOffY);
@@ -1434,7 +1434,7 @@ void OutputDevice::DrawTransformedBitmapEx(
{
fFullRotate += F_2PI;
}
- long nAngle10 = basegfx::fround(basegfx::rad2deg(fFullRotate) * 10);
+ tools::Long nAngle10 = basegfx::fround(basegfx::rad2deg(fFullRotate) * 10);
aTransformed.Rotate(nAngle10, COL_TRANSPARENT);
}
basegfx::B2DRange aTargetRange(0.0, 0.0, 1.0, 1.0);
@@ -1467,9 +1467,9 @@ void OutputDevice::DrawShadowBitmapEx(
if(!pReadAccess)
return;
- for(long y(0); y < pReadAccess->Height(); y++)
+ for(tools::Long y(0); y < pReadAccess->Height(); y++)
{
- for(long x(0); x < pReadAccess->Width(); x++)
+ for(tools::Long x(0); x < pReadAccess->Width(); x++)
{
const BitmapColor aColor = pReadAccess->GetColor(y, x);
sal_uInt16 nLuminance(static_cast<sal_uInt16>(aColor.GetLuminance()) + 1);
@@ -1519,8 +1519,8 @@ namespace
}
BitmapColor AlphaBlend( int nX, int nY,
- const long nMapX,
- const long nMapY,
+ const tools::Long nMapX,
+ const tools::Long nMapY,
BitmapReadAccess const * pP,
BitmapReadAccess const * pA,
BitmapReadAccess const * pB,
@@ -1565,8 +1565,8 @@ Bitmap OutputDevice::BlendBitmapWithAlpha(
const sal_Int32 nDstHeight,
const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
- const long* pMapX,
- const long* pMapY )
+ const tools::Long* pMapX,
+ const tools::Long* pMapY )
{
BitmapColor aDstCol;
@@ -1595,15 +1595,15 @@ Bitmap OutputDevice::BlendBitmapWithAlpha(
for( nY = 0, nOutY = nOffY; nY < nDstHeight; nY++, nOutY++ )
{
- const long nMapY = pMapY[ nY ];
- const long nModY = ( nOutY & 0x0FL ) << 4;
+ const tools::Long nMapY = pMapY[ nY ];
+ const tools::Long nModY = ( nOutY & 0x0FL ) << 4;
int nOutX;
Scanline pScanline = pW->GetScanline(nY);
Scanline pScanlineAlpha = pAlphaW->GetScanline(nY);
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
- const long nMapX = pMapX[ nX ];
+ const tools::Long nMapX = pMapX[ nX ];
const sal_uLong nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aDstCol = AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB.get(), pAlphaW.get(), nResAlpha );
@@ -1631,13 +1631,13 @@ Bitmap OutputDevice::BlendBitmapWithAlpha(
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
+ const tools::Long nMapY = pMapY[ nY ];
Scanline pScanlineB = pB->GetScanline(nY);
Scanline pScanlineAlpha = pAlphaW->GetScanline(nY);
for( nX = 0; nX < nDstWidth; nX++ )
{
- const long nMapX = pMapX[ nX ];
+ const tools::Long nMapX = pMapX[ nX ];
aDstCol = AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB.get(), pAlphaW.get(), nResAlpha );
pB->SetPixelOnData(pScanlineB, nX, pB->GetBestMatchingColor(aDstCol));
@@ -1668,8 +1668,8 @@ Bitmap OutputDevice::BlendBitmap(
const Size& aOutSz,
const bool bHMirr,
const bool bVMirr,
- const long* pMapX,
- const long* pMapY )
+ const tools::Long* pMapX,
+ const tools::Long* pMapY )
{
BitmapColor aDstCol;
Bitmap res;
@@ -1688,19 +1688,19 @@ Bitmap OutputDevice::BlendBitmap(
for( nY = 0, nOutY = nOffY; nY < nDstHeight; nY++, nOutY++ )
{
- long nMapY = pMapY[ nY ];
+ tools::Long nMapY = pMapY[ nY ];
if (bVMirr)
{
nMapY = aBmpRect.Bottom() - nMapY;
}
- const long nModY = ( nOutY & 0x0FL ) << 4;
+ const tools::Long nModY = ( nOutY & 0x0FL ) << 4;
int nOutX;
Scanline pScanline = pW->GetScanline(nY);
Scanline pScanlineAlpha = pA->GetScanline(nMapY);
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
- long nMapX = pMapX[ nX ];
+ tools::Long nMapX = pMapX[ nX ];
if (bHMirr)
{
nMapX = aBmpRect.Right() - nMapX;
@@ -1742,7 +1742,7 @@ Bitmap OutputDevice::BlendBitmap(
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- long nMapY = pMapY[ nY ];
+ tools::Long nMapY = pMapY[ nY ];
if ( bVMirr )
{
nMapY = aBmpRect.Bottom() - nMapY;
@@ -1753,7 +1753,7 @@ Bitmap OutputDevice::BlendBitmap(
for( nX = 0; nX < nDstWidth; nX++ )
{
- long nMapX = pMapX[ nX ];
+ tools::Long nMapX = pMapX[ nX ];
if ( bHMirr )
{
@@ -1772,7 +1772,7 @@ Bitmap OutputDevice::BlendBitmap(
for( nY = 0; nY < nDstHeight; nY++ )
{
- long nMapY = pMapY[ nY ];
+ tools::Long nMapY = pMapY[ nY ];
if ( bVMirr )
{
@@ -1782,7 +1782,7 @@ Bitmap OutputDevice::BlendBitmap(
Scanline pBScan = pB->GetScanline(nY);
for( nX = 0; nX < nDstWidth; nX++ )
{
- long nMapX = pMapX[ nX ];
+ tools::Long nMapX = pMapX[ nX ];
if ( bHMirr )
{
diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index 1c6e4551c102..3823d2505fa5 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -88,7 +88,7 @@ bool OutputDevice::SelectClipRegion( const vcl::Region& rRegion, SalGraphics* pG
return bClipRegion;
}
-void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
+void OutputDevice::MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove )
{
if ( mbClipRegion )
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index f7b172c4665d..9d4883ccea8d 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -121,7 +121,7 @@ Size OutputDevice::GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) cons
aSize = PixelToLogic( aSize, aMap );
aSize.AdjustHeight(5 );
aSize.setHeight( aSize.Height() / 10 );
- long nRound = aSize.Height() % 5;
+ tools::Long nRound = aSize.Height() % 5;
if ( nRound >= 3 )
aSize.AdjustHeight(5-nRound);
else
@@ -280,9 +280,9 @@ bool OutputDevice::GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities
void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine,
tools::Rectangle& rRect1, tools::Rectangle& rRect2,
- long& rYOff, long& rWidth,
+ tools::Long& rYOff, tools::Long& rWidth,
FontEmphasisMark eEmphasis,
- long nHeight )
+ tools::Long nHeight )
{
static const PolyFlags aAccentPolyFlags[24] =
{
@@ -296,7 +296,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control
};
- static const long aAccentPos[48] =
+ static const tools::Long aAccentPos[48] =
{
78, 0,
348, 79,
@@ -332,7 +332,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
return;
FontEmphasisMark nEmphasisStyle = eEmphasis & FontEmphasisMark::Style;
- long nDotSize = 0;
+ tools::Long nDotSize = 0;
switch ( nEmphasisStyle )
{
case FontEmphasisMark::Dot:
@@ -344,7 +344,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
else
{
- long nRad = nDotSize/2;
+ tools::Long nRad = nDotSize/2;
tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
}
@@ -361,11 +361,11 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
else
{
- long nRad = nDotSize/2;
+ tools::Long nRad = nDotSize/2;
tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
// BorderWidth is 15%
- long nBorder = (nDotSize*150)/1000;
+ tools::Long nBorder = (nDotSize*150)/1000;
if ( nBorder <= 1 )
rPolyLine = true;
else
@@ -387,7 +387,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
else
{
- long nRad = nDotSize/2;
+ tools::Long nRad = nDotSize/2;
tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
}
@@ -431,8 +431,8 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
}
// calculate position
- long nOffY = 1+(mnDPIY/300); // one visible pixel space
- long nSpaceY = nHeight-nDotSize;
+ tools::Long nOffY = 1+(mnDPIY/300); // one visible pixel space
+ tools::Long nSpaceY = nHeight-nDotSize;
if ( nSpaceY >= nOffY*2 )
rYOff += nOffY;
if ( !(eEmphasis & FontEmphasisMark::PosBelow) )
@@ -465,7 +465,7 @@ FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const vcl::Font& rFont
return nEmphasisMark;
}
-long OutputDevice::GetFontExtLeading() const
+tools::Long OutputDevice::GetFontExtLeading() const
{
return mpFontInstance->mxFontMetric->GetExternalLeading();
}
@@ -1051,7 +1051,7 @@ bool OutputDevice::ImplNewFont() const
if ( maFont.GetEmphasisMark() & FontEmphasisMark::Style )
{
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
- long nEmphasisHeight = (pFontInstance->mnLineHeight*250)/1000;
+ tools::Long nEmphasisHeight = (pFontInstance->mnLineHeight*250)/1000;
if ( nEmphasisHeight < 1 )
nEmphasisHeight = 1;
if ( nEmphasisMark & FontEmphasisMark::PosBelow )
@@ -1132,7 +1132,7 @@ void OutputDevice::SetFontOrientation( LogicalFontInstance* const pFontInstance
}
}
-void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
+void OutputDevice::ImplDrawEmphasisMark( tools::Long nBaseX, tools::Long nX, tools::Long nY,
const tools::PolyPolygon& rPolyPoly, bool bPolyLine,
const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 )
{
@@ -1187,9 +1187,9 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
tools::PolyPolygon aPolyPoly;
tools::Rectangle aRect1;
tools::Rectangle aRect2;
- long nEmphasisYOff;
- long nEmphasisWidth;
- long nEmphasisHeight;
+ tools::Long nEmphasisYOff;
+ tools::Long nEmphasisWidth;
+ tools::Long nEmphasisHeight;
bool bPolyLine;
if ( nEmphasisMark & FontEmphasisMark::PosBelow )
@@ -1221,8 +1221,8 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
else
aOffset.AdjustY( -(mpFontInstance->mxFontMetric->GetAscent() + nEmphasisYOff) );
- long nEmphasisWidth2 = nEmphasisWidth / 2;
- long nEmphasisHeight2 = nEmphasisHeight / 2;
+ tools::Long nEmphasisWidth2 = nEmphasisWidth / 2;
+ tools::Long nEmphasisHeight2 = nEmphasisHeight / 2;
aOffset += Point( nEmphasisWidth2, nEmphasisHeight2 );
Point aOutPoint;
@@ -1365,7 +1365,7 @@ std::unique_ptr<SalLayout> OutputDevice::ImplGlyphFallbackLayout( std::unique_pt
return pSalLayout;
}
-long OutputDevice::GetMinKashida() const
+tools::Long OutputDevice::GetMinKashida() const
{
if (!ImplNewFont())
return 0;
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 8919c474ba65..0acd89dfdb18 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -244,7 +244,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
namespace
{
- sal_uInt8 GetGradientColorValue( long nValue )
+ sal_uInt8 GetGradientColorValue( tools::Long nValue )
{
if ( nValue < 0 )
return 0;
@@ -282,15 +282,15 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
}
// colour-intensities of start- and finish; change if needed
- long nFactor;
+ tools::Long nFactor;
Color aStartCol = rGradient.GetStartColor();
Color aEndCol = rGradient.GetEndColor();
- long nStartRed = aStartCol.GetRed();
- long nStartGreen = aStartCol.GetGreen();
- long nStartBlue = aStartCol.GetBlue();
- long nEndRed = aEndCol.GetRed();
- long nEndGreen = aEndCol.GetGreen();
- long nEndBlue = aEndCol.GetBlue();
+ tools::Long nStartRed = aStartCol.GetRed();
+ tools::Long nStartGreen = aStartCol.GetGreen();
+ tools::Long nStartBlue = aStartCol.GetBlue();
+ tools::Long nEndRed = aEndCol.GetRed();
+ tools::Long nEndGreen = aEndCol.GetGreen();
+ tools::Long nEndBlue = aEndCol.GetBlue();
nFactor = rGradient.GetStartIntensity();
nStartRed = (nStartRed * nFactor) / 100;
nStartGreen = (nStartGreen * nFactor) / 100;
@@ -303,7 +303,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
// gradient style axial has exchanged start and end colors
if ( !bLinear)
{
- long nTempColor = nStartRed;
+ tools::Long nTempColor = nStartRed;
nStartRed = nEndRed;
nEndRed = nTempColor;
nTempColor = nStartGreen;
@@ -329,7 +329,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
- aBorderRect.SetBottom( static_cast<long>( aBorderRect.Top() + fBorder ) );
+ aBorderRect.SetBottom( static_cast<tools::Long>( aBorderRect.Top() + fBorder ) );
aRect.SetTop( aBorderRect.Bottom() );
aPoly[0] = aBorderRect.TopLeft();
aPoly[1] = aBorderRect.TopRight();
@@ -342,7 +342,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
if ( !bLinear)
{
aBorderRect = aMirrorRect;
- aBorderRect.SetTop( static_cast<long>( aBorderRect.Bottom() - fBorder ) );
+ aBorderRect.SetTop( static_cast<tools::Long>( aBorderRect.Bottom() - fBorder ) );
aMirrorRect.SetBottom( aBorderRect.Top() );
aPoly[0] = aBorderRect.TopLeft();
aPoly[1] = aBorderRect.TopRight();
@@ -355,15 +355,15 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
}
// calculate step count
- long nStepCount = GetGradientSteps( rGradient, aRect, false/*bMtf*/ );
+ tools::Long nStepCount = GetGradientSteps( rGradient, aRect, false/*bMtf*/ );
// minimal three steps and maximal as max color steps
- long nAbsRedSteps = std::abs( nEndRed - nStartRed );
- long nAbsGreenSteps = std::abs( nEndGreen - nStartGreen );
- long nAbsBlueSteps = std::abs( nEndBlue - nStartBlue );
- long nMaxColorSteps = std::max( nAbsRedSteps , nAbsGreenSteps );
+ tools::Long nAbsRedSteps = std::abs( nEndRed - nStartRed );
+ tools::Long nAbsGreenSteps = std::abs( nEndGreen - nStartGreen );
+ tools::Long nAbsBlueSteps = std::abs( nEndBlue - nStartBlue );
+ tools::Long nMaxColorSteps = std::max( nAbsRedSteps , nAbsGreenSteps );
nMaxColorSteps = std::max( nMaxColorSteps, nAbsBlueSteps );
- long nSteps = std::min( nStepCount, nMaxColorSteps );
+ tools::Long nSteps = std::min( nStepCount, nMaxColorSteps );
if ( nSteps < 3)
{
nSteps = 3;
@@ -378,22 +378,22 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
{
nSteps -= 1; // draw middle polygons as one polygon after loop to avoid gap
}
- for ( long i = 0; i < nSteps; i++ )
+ for ( tools::Long i = 0; i < nSteps; i++ )
{
// linear interpolation of color
const double fAlpha = static_cast<double>(i) / fStepsMinus1;
double fTempColor = static_cast<double>(nStartRed) * (1.0-fAlpha) + static_cast<double>(nEndRed) * fAlpha;
- nRed = GetGradientColorValue(static_cast<long>(fTempColor));
+ nRed = GetGradientColorValue(static_cast<tools::Long>(fTempColor));
fTempColor = static_cast<double>(nStartGreen) * (1.0-fAlpha) + static_cast<double>(nEndGreen) * fAlpha;
- nGreen = GetGradientColorValue(static_cast<long>(fTempColor));
+ nGreen = GetGradientColorValue(static_cast<tools::Long>(fTempColor));
fTempColor = static_cast<double>(nStartBlue) * (1.0-fAlpha) + static_cast<double>(nEndBlue) * fAlpha;
- nBlue = GetGradientColorValue(static_cast<long>(fTempColor));
+ nBlue = GetGradientColorValue(static_cast<tools::Long>(fTempColor));
mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
// Polygon for this color step
- aRect.SetTop( static_cast<long>( fGradientLine + static_cast<double>(i) * fScanInc ) );
- aRect.SetBottom( static_cast<long>( fGradientLine + ( static_cast<double>(i) + 1.0 ) * fScanInc ) );
+ aRect.SetTop( static_cast<tools::Long>( fGradientLine + static_cast<double>(i) * fScanInc ) );
+ aRect.SetBottom( static_cast<tools::Long>( fGradientLine + ( static_cast<double>(i) + 1.0 ) * fScanInc ) );
aPoly[0] = aRect.TopLeft();
aPoly[1] = aRect.TopRight();
aPoly[2] = aRect.BottomRight();
@@ -404,8 +404,8 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
if ( !bLinear )
{
- aMirrorRect.SetBottom( static_cast<long>( fMirrorGradientLine - static_cast<double>(i) * fScanInc ) );
- aMirrorRect.SetTop( static_cast<long>( fMirrorGradientLine - (static_cast<double>(i) + 1.0)* fScanInc ) );
+ aMirrorRect.SetBottom( static_cast<tools::Long>( fMirrorGradientLine - static_cast<double>(i) * fScanInc ) );
+ aMirrorRect.SetTop( static_cast<tools::Long>( fMirrorGradientLine - (static_cast<double>(i) + 1.0)* fScanInc ) );
aPoly[0] = aMirrorRect.TopLeft();
aPoly[1] = aMirrorRect.TopRight();
aPoly[2] = aMirrorRect.BottomRight();
@@ -425,8 +425,8 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
- aRect.SetTop( static_cast<long>( fGradientLine + static_cast<double>(nSteps) * fScanInc ) );
- aRect.SetBottom( static_cast<long>( fMirrorGradientLine - static_cast<double>(nSteps) * fScanInc ) );
+ aRect.SetTop( static_cast<tools::Long>( fGradientLine + static_cast<double>(nSteps) * fScanInc ) );
+ aRect.SetBottom( static_cast<tools::Long>( fMirrorGradientLine - static_cast<double>(nSteps) * fScanInc ) );
aPoly[0] = aRect.TopLeft();
aPoly[1] = aRect.TopRight();
aPoly[2] = aRect.BottomRight();
@@ -460,15 +460,15 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
Point aCenter;
Color aStartCol( rGradient.GetStartColor() );
Color aEndCol( rGradient.GetEndColor() );
- long nStartRed = ( static_cast<long>(aStartCol.GetRed()) * rGradient.GetStartIntensity() ) / 100;
- long nStartGreen = ( static_cast<long>(aStartCol.GetGreen()) * rGradient.GetStartIntensity() ) / 100;
- long nStartBlue = ( static_cast<long>(aStartCol.GetBlue()) * rGradient.GetStartIntensity() ) / 100;
- long nEndRed = ( static_cast<long>(aEndCol.GetRed()) * rGradient.GetEndIntensity() ) / 100;
- long nEndGreen = ( static_cast<long>(aEndCol.GetGreen()) * rGradient.GetEndIntensity() ) / 100;
- long nEndBlue = ( static_cast<long>(aEndCol.GetBlue()) * rGradient.GetEndIntensity() ) / 100;
- long nRedSteps = nEndRed - nStartRed;
- long nGreenSteps = nEndGreen - nStartGreen;
- long nBlueSteps = nEndBlue - nStartBlue;
+ tools::Long nStartRed = ( static_cast<tools::Long>(aStartCol.GetRed()) * rGradient.GetStartIntensity() ) / 100;
+ tools::Long nStartGreen = ( static_cast<tools::Long>(aStartCol.GetGreen()) * rGradient.GetStartIntensity() ) / 100;
+ tools::Long nStartBlue = ( static_cast<tools::Long>(aStartCol.GetBlue()) * rGradient.GetStartIntensity() ) / 100;
+ tools::Long nEndRed = ( static_cast<tools::Long>(aEndCol.GetRed()) * rGradient.GetEndIntensity() ) / 100;
+ tools::Long nEndGreen = ( static_cast<tools::Long>(aEndCol.GetGreen()) * rGradient.GetEndIntensity() ) / 100;
+ tools::Long nEndBlue = ( static_cast<tools::Long>(aEndCol.GetBlue()) * rGradient.GetEndIntensity() ) / 100;
+ tools::Long nRedSteps = nEndRed - nStartRed;
+ tools::Long nGreenSteps = nEndGreen - nStartGreen;
+ tools::Long nBlueSteps = nEndBlue - nStartBlue;
sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -476,12 +476,12 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
if ( UsePolyPolygonForComplexGradient() )
xPolyPoly.reset(new tools::PolyPolygon( 2 ));
- long nStepCount = GetGradientSteps( rGradient, rRect, false/*bMtf*/, true/*bComplex*/ );
+ tools::Long nStepCount = GetGradientSteps( rGradient, rRect, false/*bMtf*/, true/*bComplex*/ );
// at least three steps and at most the number of colour differences
- long nSteps = std::max( nStepCount, 2L );
- long nCalcSteps = std::abs( nRedSteps );
- long nTempSteps = std::abs( nGreenSteps );
+ tools::Long nSteps = std::max( nStepCount, 2L );
+ tools::Long nCalcSteps = std::abs( nRedSteps );
+ tools::Long nTempSteps = std::abs( nGreenSteps );
if ( nTempSteps > nCalcSteps )
nCalcSteps = nTempSteps;
nTempSteps = std::abs( nBlueSteps );
@@ -535,17 +535,17 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
}
// loop to output Polygon/PolyPolygon sequentially
- for( long i = 1; i < nSteps; i++ )
+ for( tools::Long i = 1; i < nSteps; i++ )
{
// calculate new Polygon
fScanLeft += fScanIncX;
- aRect.SetLeft( static_cast<long>( fScanLeft ) );
+ aRect.SetLeft( static_cast<tools::Long>( fScanLeft ) );
fScanTop += fScanIncY;
- aRect.SetTop( static_cast<long>( fScanTop ) );
+ aRect.SetTop( static_cast<tools::Long>( fScanTop ) );
fScanRight -= fScanIncX;
- aRect.SetRight( static_cast<long>( fScanRight ) );
+ aRect.SetRight( static_cast<tools::Long>( fScanRight ) );
fScanBottom -= fScanIncY;
- aRect.SetBottom( static_cast<long>( fScanBottom ) );
+ aRect.SetBottom( static_cast<tools::Long>( fScanBottom ) );
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
@@ -558,7 +558,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
aPoly.Rotate( aCenter, nAngle );
// adapt colour accordingly
- const long nStepIndex = ( xPolyPoly ? i : ( i + 1 ) );
+ const tools::Long nStepIndex = ( xPolyPoly ? i : ( i + 1 ) );
nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) );
nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) );
nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) );
@@ -640,15 +640,15 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
}
// colour-intensities of start- and finish; change if needed
- long nFactor;
+ tools::Long nFactor;
Color aStartCol = rGradient.GetStartColor();
Color aEndCol = rGradient.GetEndColor();
- long nStartRed = aStartCol.GetRed();
- long nStartGreen = aStartCol.GetGreen();
- long nStartBlue = aStartCol.GetBlue();
- long nEndRed = aEndCol.GetRed();
- long nEndGreen = aEndCol.GetGreen();
- long nEndBlue = aEndCol.GetBlue();
+ tools::Long nStartRed = aStartCol.GetRed();
+ tools::Long nStartGreen = aStartCol.GetGreen();
+ tools::Long nStartBlue = aStartCol.GetBlue();
+ tools::Long nEndRed = aEndCol.GetRed();
+ tools::Long nEndGreen = aEndCol.GetGreen();
+ tools::Long nEndBlue = aEndCol.GetBlue();
nFactor = rGradient.GetStartIntensity();
nStartRed = (nStartRed * nFactor) / 100;
nStartGreen = (nStartGreen * nFactor) / 100;
@@ -661,7 +661,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
// gradient style axial has exchanged start and end colors
if ( !bLinear)
{
- long nTempColor = nStartRed;
+ tools::Long nTempColor = nStartRed;
nStartRed = nEndRed;
nEndRed = nTempColor;
nTempColor = nStartGreen;
@@ -687,7 +687,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
- aBorderRect.SetBottom( static_cast<long>( aBorderRect.Top() + fBorder ) );
+ aBorderRect.SetBottom( static_cast<tools::Long>( aBorderRect.Top() + fBorder ) );
aRect.SetTop( aBorderRect.Bottom() );
aPoly[0] = aBorderRect.TopLeft();
aPoly[1] = aBorderRect.TopRight();
@@ -700,7 +700,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
if ( !bLinear)
{
aBorderRect = aMirrorRect;
- aBorderRect.SetTop( static_cast<long>( aBorderRect.Bottom() - fBorder ) );
+ aBorderRect.SetTop( static_cast<tools::Long>( aBorderRect.Bottom() - fBorder ) );
aMirrorRect.SetBottom( aBorderRect.Top() );
aPoly[0] = aBorderRect.TopLeft();
aPoly[1] = aBorderRect.TopRight();
@@ -712,15 +712,15 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
}
}
- long nStepCount = GetGradientSteps( rGradient, aRect, true/*bMtf*/ );
+ tools::Long nStepCount = GetGradientSteps( rGradient, aRect, true/*bMtf*/ );
// minimal three steps and maximal as max color steps
- long nAbsRedSteps = std::abs( nEndRed - nStartRed );
- long nAbsGreenSteps = std::abs( nEndGreen - nStartGreen );
- long nAbsBlueSteps = std::abs( nEndBlue - nStartBlue );
- long nMaxColorSteps = std::max( nAbsRedSteps , nAbsGreenSteps );
+ tools::Long nAbsRedSteps = std::abs( nEndRed - nStartRed );
+ tools::Long nAbsGreenSteps = std::abs( nEndGreen - nStartGreen );
+ tools::Long nAbsBlueSteps = std::abs( nEndBlue - nStartBlue );
+ tools::Long nMaxColorSteps = std::max( nAbsRedSteps , nAbsGreenSteps );
nMaxColorSteps = std::max( nMaxColorSteps, nAbsBlueSteps );
- long nSteps = std::min( nStepCount, nMaxColorSteps );
+ tools::Long nSteps = std::min( nStepCount, nMaxColorSteps );
if ( nSteps < 3)
{
nSteps = 3;
@@ -735,22 +735,22 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
{
nSteps -= 1; // draw middle polygons as one polygon after loop to avoid gap
}
- for ( long i = 0; i < nSteps; i++ )
+ for ( tools::Long i = 0; i < nSteps; i++ )
{
// linear interpolation of color
double fAlpha = static_cast<double>(i) / fStepsMinus1;
double fTempColor = static_cast<double>(nStartRed) * (1.0-fAlpha) + static_cast<double>(nEndRed) * fAlpha;
- nRed = GetGradientColorValue(static_cast<long>(fTempColor));
+ nRed = GetGradientColorValue(static_cast<tools::Long>(fTempColor));
fTempColor = static_cast<double>(nStartGreen) * (1.0-fAlpha) + static_cast<double>(nEndGreen) * fAlpha;
- nGreen = GetGradientColorValue(static_cast<long>(fTempColor));
+ nGreen = GetGradientColorValue(static_cast<tools::Long>(fTempColor));
fTempColor = static_cast<double>(nStartBlue) * (1.0-fAlpha) + static_cast<double>(nEndBlue) * fAlpha;
- nBlue = GetGradientColorValue(static_cast<long>(fTempColor));
+ nBlue = GetGradientColorValue(static_cast<tools::Long>(fTempColor));
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
// Polygon for this color step
- aRect.SetTop( static_cast<long>( fGradientLine + static_cast<double>(i) * fScanInc ) );
- aRect.SetBottom( static_cast<long>( fGradientLine + ( static_cast<double>(i) + 1.0 ) * fScanInc ) );
+ aRect.SetTop( static_cast<tools::Long>( fGradientLine + static_cast<double>(i) * fScanInc ) );
+ aRect.SetBottom( static_cast<tools::Long>( fGradientLine + ( static_cast<double>(i) + 1.0 ) * fScanInc ) );
aPoly[0] = aRect.TopLeft();
aPoly[1] = aRect.TopRight();
aPoly[2] = aRect.BottomRight();
@@ -761,8 +761,8 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
if ( !bLinear )
{
- aMirrorRect.SetBottom( static_cast<long>( fMirrorGradientLine - static_cast<double>(i) * fScanInc ) );
- aMirrorRect.SetTop( static_cast<long>( fMirrorGradientLine - (static_cast<double>(i) + 1.0)* fScanInc ) );
+ aMirrorRect.SetBottom( static_cast<tools::Long>( fMirrorGradientLine - static_cast<double>(i) * fScanInc ) );
+ aMirrorRect.SetTop( static_cast<tools::Long>( fMirrorGradientLine - (static_cast<double>(i) + 1.0)* fScanInc ) );
aPoly[0] = aMirrorRect.TopLeft();
aPoly[1] = aMirrorRect.TopRight();
aPoly[2] = aMirrorRect.BottomRight();
@@ -782,8 +782,8 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
- aRect.SetTop( static_cast<long>( fGradientLine + static_cast<double>(nSteps) * fScanInc ) );
- aRect.SetBottom( static_cast<long>( fMirrorGradientLine - static_cast<double>(nSteps) * fScanInc ) );
+ aRect.SetTop( static_cast<tools::Long>( fGradientLine + static_cast<double>(nSteps) * fScanInc ) );
+ aRect.SetBottom( static_cast<tools::Long>( fMirrorGradientLine - static_cast<double>(nSteps) * fScanInc ) );
aPoly[0] = aRect.TopLeft();
aPoly[1] = aRect.TopRight();
aPoly[2] = aRect.BottomRight();
@@ -810,15 +810,15 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
Point aCenter;
Color aStartCol( rGradient.GetStartColor() );
Color aEndCol( rGradient.GetEndColor() );
- long nStartRed = ( static_cast<long>(aStartCol.GetRed()) * rGradient.GetStartIntensity() ) / 100;
- long nStartGreen = ( static_cast<long>(aStartCol.GetGreen()) * rGradient.GetStartIntensity() ) / 100;
- long nStartBlue = ( static_cast<long>(aStartCol.GetBlue()) * rGradient.GetStartIntensity() ) / 100;
- long nEndRed = ( static_cast<long>(aEndCol.GetRed()) * rGradient.GetEndIntensity() ) / 100;
- long nEndGreen = ( static_cast<long>(aEndCol.GetGreen()) * rGradient.GetEndIntensity() ) / 100;
- long nEndBlue = ( static_cast<long>(aEndCol.GetBlue()) * rGradient.GetEndIntensity() ) / 100;
- long nRedSteps = nEndRed - nStartRed;
- long nGreenSteps = nEndGreen - nStartGreen;
- long nBlueSteps = nEndBlue - nStartBlue;
+ tools::Long nStartRed = ( static_cast<tools::Long>(aStartCol.GetRed()) * rGradient.GetStartIntensity() ) / 100;
+ tools::Long nStartGreen = ( static_cast<tools::Long>(aStartCol.GetGreen()) * rGradient.GetStartIntensity() ) / 100;
+ tools::Long nStartBlue = ( static_cast<tools::Long>(aStartCol.GetBlue()) * rGradient.GetStartIntensity() ) / 100;
+ tools::Long nEndRed = ( static_cast<tools::Long>(aEndCol.GetRed()) * rGradient.GetEndIntensity() ) / 100;
+ tools::Long nEndGreen = ( static_cast<tools::Long>(aEndCol.GetGreen()) * rGradient.GetEndIntensity() ) / 100;
+ tools::Long nEndBlue = ( static_cast<tools::Long>(aEndCol.GetBlue()) * rGradient.GetEndIntensity() ) / 100;
+ tools::Long nRedSteps = nEndRed - nStartRed;
+ tools::Long nGreenSteps = nEndGreen - nStartGreen;
+ tools::Long nBlueSteps = nEndBlue - nStartBlue;
sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -826,12 +826,12 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
xPolyPoly.reset(new tools::PolyPolygon( 2 ));
// last parameter - true if complex gradient, false if linear
- long nStepCount = GetGradientSteps( rGradient, rRect, true, true );
+ tools::Long nStepCount = GetGradientSteps( rGradient, rRect, true, true );
// at least three steps and at most the number of colour differences
- long nSteps = std::max( nStepCount, 2L );
- long nCalcSteps = std::abs( nRedSteps );
- long nTempSteps = std::abs( nGreenSteps );
+ tools::Long nSteps = std::max( nStepCount, 2L );
+ tools::Long nCalcSteps = std::abs( nRedSteps );
+ tools::Long nTempSteps = std::abs( nGreenSteps );
if ( nTempSteps > nCalcSteps )
nCalcSteps = nTempSteps;
nTempSteps = std::abs( nBlueSteps );
@@ -869,17 +869,17 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
xPolyPoly->Insert( aPoly );
// loop to output Polygon/PolyPolygon sequentially
- for( long i = 1; i < nSteps; i++ )
+ for( tools::Long i = 1; i < nSteps; i++ )
{
// calculate new Polygon
fScanLeft += fScanIncX;
- aRect.SetLeft( static_cast<long>( fScanLeft ) );
+ aRect.SetLeft( static_cast<tools::Long>( fScanLeft ) );
fScanTop += fScanIncY;
- aRect.SetTop( static_cast<long>( fScanTop ) );
+ aRect.SetTop( static_cast<tools::Long>( fScanTop ) );
fScanRight -= fScanIncX;
- aRect.SetRight( static_cast<long>( fScanRight ) );
+ aRect.SetRight( static_cast<tools::Long>( fScanRight ) );
fScanBottom -= fScanIncY;
- aRect.SetBottom( static_cast<long>( fScanBottom ) );
+ aRect.SetBottom( static_cast<tools::Long>( fScanBottom ) );
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
@@ -892,7 +892,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
aPoly.Rotate( aCenter, nAngle );
// adapt colour accordingly
- const long nStepIndex = ( xPolyPoly ? i : ( i + 1 ) );
+ const tools::Long nStepIndex = ( xPolyPoly ? i : ( i + 1 ) );
nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) );
nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) );
nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) );
@@ -933,18 +933,18 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) );
}
-long OutputDevice::GetGradientStepCount( long nMinRect )
+tools::Long OutputDevice::GetGradientStepCount( tools::Long nMinRect )
{
- long nInc = (nMinRect < 50) ? 2 : 4;
+ tools::Long nInc = (nMinRect < 50) ? 2 : 4;
return nInc;
}
-long OutputDevice::GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex )
+tools::Long OutputDevice::GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex )
{
// calculate step count
- long nStepCount = rGradient.GetSteps();
- long nMinRect;
+ tools::Long nStepCount = rGradient.GetSteps();
+ tools::Long nMinRect;
// generate nStepCount, if not passed
if (bComplex)
@@ -954,7 +954,7 @@ long OutputDevice::GetGradientSteps( const Gradient& rGradient, const tools::Rec
if ( !nStepCount )
{
- long nInc;
+ tools::Long nInc;
nInc = GetGradientStepCount (nMinRect);
if ( !nInc || bMtf )
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 5f9396394a27..4ee38bff1aa2 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -39,10 +39,10 @@ extern "C" {
static int HatchCmpFnc( const void* p1, const void* p2 )
{
- const long nX1 = static_cast<Point const *>(p1)->X();
- const long nX2 = static_cast<Point const *>(p2)->X();
- const long nY1 = static_cast<Point const *>(p1)->Y();
- const long nY2 = static_cast<Point const *>(p2)->Y();
+ const tools::Long nX1 = static_cast<Point const *>(p1)->X();
+ const tools::Long nX2 = static_cast<Point const *>(p2)->X();
+ const tools::Long nY1 = static_cast<Point const *>(p1)->Y();
+ const tools::Long nY2 = static_cast<Point const *>(p2)->Y();
return ( nX1 > nX2 ? 1 : nX1 == nX2 ? nY1 > nY2 ? 1: nY1 == nY2 ? 0 : -1 : -1 );
}
@@ -166,8 +166,8 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
else
{
tools::Rectangle aRect( rPolyPoly.GetBoundRect() );
- const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
- const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
+ const tools::Long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
+ const tools::Long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
std::unique_ptr<Point[]> pPtBuffer(new Point[ HATCH_MAXPOINTS ]);
Point aPt1, aPt2, aEndPt1;
Size aInc;
@@ -211,12 +211,12 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
}
}
-void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10,
+void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long nDist, sal_uInt16 nAngle10,
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
Point aRef;
- long nAngle = nAngle10 % 1800;
- long nOffset = 0;
+ tools::Long nAngle = nAngle10 % 1800;
+ tools::Long nOffset = 0;
if( nAngle > 900 )
nAngle -= 1800;
@@ -257,8 +257,8 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, long nDist, s
{
const double fAngle = F_PI1800 * labs( nAngle );
const double fTan = tan( fAngle );
- const long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
- long nPY;
+ const tools::Long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
+ tools::Long nPY;
nDist = FRound( nDist / cos( fAngle ) );
rInc = Size( 0, nDist );
@@ -290,8 +290,8 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, long nDist, s
{
const double fAngle = F_PI1800 * labs( nAngle );
const double fTan = tan( fAngle );
- const long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
- long nPX;
+ const tools::Long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
+ tools::Long nPX;
nDist = FRound( nDist / sin( fAngle ) );
rInc = Size( nDist, 0 );
@@ -327,9 +327,9 @@ void OutputDevice::DrawHatchLine( const tools::Line& rLine, const tools::PolyPol
assert(!is_double_buffered_window());
double fX, fY;
- long nAdd, nPCounter = 0;
+ tools::Long nAdd, nPCounter = 0;
- for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
+ for( tools::Long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
const tools::Polygon& rPoly = rPolyPoly[ static_cast<sal_uInt16>(nPoly) ];
@@ -337,7 +337,7 @@ void OutputDevice::DrawHatchLine( const tools::Line& rLine, const tools::PolyPol
{
tools::Line aCurSegment( rPoly[ 0 ], Point() );
- for( long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ )
+ for( tools::Long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ )
{
aCurSegment.SetEnd( rPoly[ static_cast<sal_uInt16>( i % nCount ) ] );
nAdd = 0;
@@ -390,12 +390,12 @@ void OutputDevice::DrawHatchLine( const tools::Line& rLine, const tools::PolyPol
if( bMtf )
{
- for( long i = 0; i < nPCounter; i += 2 )
+ for( tools::Long i = 0; i < nPCounter; i += 2 )
mpMetaFile->AddAction( new MetaLineAction( pPtBuffer[ i ], pPtBuffer[ i + 1 ] ) );
}
else
{
- for( long i = 0; i < nPCounter; i += 2 )
+ for( tools::Long i = 0; i < nPCounter; i += 2 )
DrawHatchLine_DrawLine(pPtBuffer[i], pPtBuffer[i+1]);
}
}
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index e6f7d485979b..3a581c050a05 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -47,7 +47,7 @@ Reduces accuracy until it is a fraction (should become
ctor fraction once); we could also do this with BigInts
*/
-static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
+static Fraction ImplMakeFraction( tools::Long nN1, tools::Long nN2, tools::Long nD1, tools::Long nD2 )
{
if( nD1 == 0 || nD2 == 0 ) //under these bad circumstances the following while loop will be endless
{
@@ -55,7 +55,7 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
return Fraction( 1, 1 );
}
- long i = 1;
+ tools::Long i = 1;
if ( nN1 < 0 ) { i = -i; nN1 = -nN1; }
if ( nN2 < 0 ) { i = -i; nN2 = -nN2; }
@@ -88,7 +88,7 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
// rMapRes.nMapScNum?
// rMapRes.nMapScDenom? > 0
-static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
+static void ImplCalcBigIntThreshold( tools::Long nDPIX, tools::Long nDPIY,
const ImplMapRes& rMapRes,
ImplThresholdRes& rThresRes )
{
@@ -100,9 +100,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
else
{
// calculate thresholds for BigInt arithmetic
- long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
+ tools::Long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
sal_uLong nDenomX = rMapRes.mnMapScDenomX;
- long nProductX = nDPIX * rMapRes.mnMapScNumX;
+ tools::Long nProductX = nDPIX * rMapRes.mnMapScNumX;
if ( !nProductX )
rThresRes.mnThresLogToPixX = LONG_MAX;
@@ -112,9 +112,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
if ( !nDenomX )
rThresRes.mnThresPixToLogX = LONG_MAX;
else if ( nProductX >= 0 )
- rThresRes.mnThresPixToLogX = static_cast<long>((sal_uLong(LONG_MAX) - static_cast<sal_uLong>( nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = static_cast<tools::Long>((sal_uLong(LONG_MAX) - static_cast<sal_uLong>( nProductX/2)) / nDenomX);
else
- rThresRes.mnThresPixToLogX = static_cast<long>((sal_uLong(LONG_MAX) + static_cast<sal_uLong>(-nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = static_cast<tools::Long>((sal_uLong(LONG_MAX) + static_cast<sal_uLong>(-nProductX/2)) / nDenomX);
}
if ( nDPIY && (LONG_MAX / nDPIY < std::abs( rMapRes.mnMapScNumY ) ) ) // #111139# avoid div by zero
@@ -125,9 +125,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
else
{
// calculate thresholds for BigInt arithmetic
- long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
+ tools::Long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
sal_uLong nDenomY = rMapRes.mnMapScDenomY;
- long nProductY = nDPIY * rMapRes.mnMapScNumY;
+ tools::Long nProductY = nDPIY * rMapRes.mnMapScNumY;
if ( !nProductY )
rThresRes.mnThresLogToPixY = LONG_MAX;
@@ -137,9 +137,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
if ( !nDenomY )
rThresRes.mnThresPixToLogY = LONG_MAX;
else if ( nProductY >= 0 )
- rThresRes.mnThresPixToLogY = static_cast<long>((sal_uLong(LONG_MAX) - static_cast<sal_uLong>( nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = static_cast<tools::Long>((sal_uLong(LONG_MAX) - static_cast<sal_uLong>( nProductY/2)) / nDenomY);
else
- rThresRes.mnThresPixToLogY = static_cast<long>((sal_uLong(LONG_MAX) + static_cast<sal_uLong>(-nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = static_cast<tools::Long>((sal_uLong(LONG_MAX) + static_cast<sal_uLong>(-nProductY/2)) / nDenomY);
}
rThresRes.mnThresLogToPixX /= 2;
@@ -149,7 +149,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
}
static void ImplCalcMapResolution( const MapMode& rMapMode,
- long nDPIX, long nDPIY, ImplMapRes& rMapRes )
+ tools::Long nDPIX, tools::Long nDPIY, ImplMapRes& rMapRes )
{
switch ( rMapMode.GetMapUnit() )
{
@@ -279,7 +279,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode,
aX += BigInt(nXNumerator / 2);
}
aX /= BigInt(nXNumerator);
- rMapRes.mnMapOfsX = static_cast<long>(aX) + aOrigin.X();
+ rMapRes.mnMapOfsX = static_cast<tools::Long>(aX) + aOrigin.X();
BigInt aY( rMapRes.mnMapOfsY );
aY *= BigInt( aScaleY.GetDenominator() );
if( rMapRes.mnMapOfsY >= 0 )
@@ -297,7 +297,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode,
aY += BigInt(nYNumerator / 2);
}
aY /= BigInt(nYNumerator);
- rMapRes.mnMapOfsY = static_cast<long>(aY) + aOrigin.Y();
+ rMapRes.mnMapOfsY = static_cast<tools::Long>(aY) + aOrigin.Y();
}
// calculate scaling factor according to MapMode
@@ -317,7 +317,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode,
}
static void ImplCalcMapResolution( const MapMode& rMapMode,
- long nDPIX, long nDPIY,
+ tools::Long nDPIX, tools::Long nDPIY,
ImplMapRes& rMapRes,
ImplThresholdRes& rThresRes )
{
@@ -344,8 +344,8 @@ void OutputDevice::ImplInvalidateViewTransform()
}
}
-static long ImplLogicToPixel( long n, long nDPI, long nMapNum, long nMapDenom,
- long nThres )
+static tools::Long ImplLogicToPixel( tools::Long n, tools::Long nDPI, tools::Long nMapNum, tools::Long nMapDenom,
+ tools::Long nThres )
{
assert(nDPI > 0);
#if (SAL_TYPES_SIZEOFLONG < 8)
@@ -370,10 +370,10 @@ static long ImplLogicToPixel( long n, long nDPI, long nMapNum, long nMapDenom,
n64 *= nMapNum;
n64 *= nDPI;
if( nMapDenom == 1 )
- n = static_cast<long>(n64);
+ n = static_cast<tools::Long>(n64);
else
{
- n = static_cast<long>(2 * n64 / nMapDenom);
+ n = static_cast<tools::Long>(2 * n64 / nMapDenom);
if( n < 0 ) --n; else ++n;
n /= 2;
}
@@ -381,11 +381,11 @@ static long ImplLogicToPixel( long n, long nDPI, long nMapNum, long nMapDenom,
return n;
}
-static long ImplPixelToLogic( long n, long nDPI, long nMapNum, long nMapDenom,
- long nThres )
+static tools::Long ImplPixelToLogic( tools::Long n, tools::Long nDPI, tools::Long nMapNum, tools::Long nMapDenom,
+ tools::Long nThres )
{
assert(nDPI > 0);
- long nDenom = nDPI * nMapNum;
+ tools::Long nDenom = nDPI * nMapNum;
if (nDenom == 0)
{
return 0;
@@ -401,13 +401,13 @@ static long ImplPixelToLogic( long n, long nDPI, long nMapNum, long nMapDenom,
{
sal_Int64 n64 = n;
n64 *= nMapDenom;
- n = static_cast<long>(2 * n64 / nDenom);
+ n = static_cast<tools::Long>(2 * n64 / nDenom);
}
if( n < 0 ) --n; else ++n;
return (n / 2);
}
-long OutputDevice::ImplLogicXToDevicePixel( long nX ) const
+tools::Long OutputDevice::ImplLogicXToDevicePixel( tools::Long nX ) const
{
if ( !mbMap )
return nX+mnOutOffX;
@@ -417,7 +417,7 @@ long OutputDevice::ImplLogicXToDevicePixel( long nX ) const
maThresRes.mnThresLogToPixX )+mnOutOffX+mnOutOffOrigX;
}
-long OutputDevice::ImplLogicYToDevicePixel( long nY ) const
+tools::Long OutputDevice::ImplLogicYToDevicePixel( tools::Long nY ) const
{
if ( !mbMap )
return nY+mnOutOffY;
@@ -427,7 +427,7 @@ long OutputDevice::ImplLogicYToDevicePixel( long nY ) const
maThresRes.mnThresLogToPixY )+mnOutOffY+mnOutOffOrigY;
}
-long OutputDevice::ImplLogicWidthToDevicePixel( long nWidth ) const
+tools::Long OutputDevice::ImplLogicWidthToDevicePixel( tools::Long nWidth ) const
{
if ( !mbMap )
return nWidth;
@@ -437,7 +437,7 @@ long OutputDevice::ImplLogicWidthToDevicePixel( long nWidth ) const
maThresRes.mnThresLogToPixX );
}
-long OutputDevice::ImplLogicHeightToDevicePixel( long nHeight ) const
+tools::Long OutputDevice::ImplLogicHeightToDevicePixel( tools::Long nHeight ) const
{
if ( !mbMap )
return nHeight;
@@ -455,7 +455,7 @@ float OutputDevice::ImplFloatLogicHeightToDevicePixel( float fLogicHeight) const
return fPixelHeight;
}
-long OutputDevice::ImplDevicePixelToLogicWidth( long nWidth ) const
+tools::Long OutputDevice::ImplDevicePixelToLogicWidth( tools::Long nWidth ) const
{
if ( !mbMap )
return nWidth;
@@ -465,7 +465,7 @@ long OutputDevice::ImplDevicePixelToLogicWidth( long nWidth ) const
maThresRes.mnThresPixToLogX );
}
-long OutputDevice::ImplDevicePixelToLogicHeight( long nHeight ) const
+tools::Long OutputDevice::ImplDevicePixelToLogicHeight( tools::Long nHeight ) const
{
if ( !mbMap )
return nHeight;
@@ -1490,8 +1490,8 @@ static void verifyUnitSourceDest( MapUnit eUnitSource, MapUnit eUnitDest )
}
#define ENTER3( eUnitSource, eUnitDest ) \
- long nNumerator = 1; \
- long nDenominator = 1; \
+ tools::Long nNumerator = 1; \
+ tools::Long nDenominator = 1; \
SAL_WARN_IF( eUnitSource > s_MaxValidUnit, "vcl.gdi", "Invalid source map unit"); \
SAL_WARN_IF( eUnitDest > s_MaxValidUnit, "vcl.gdi", "Invalid destination map unit"); \
if( (eUnitSource <= s_MaxValidUnit) && (eUnitDest <= s_MaxValidUnit) ) \
@@ -1520,11 +1520,11 @@ static void verifyUnitSourceDest( MapUnit eUnitSource, MapUnit eUnitDest )
ImplCalcMapResolution( rMapModeDest, 72, 72, aMapResDest )
// return (n1 * n2 * n3) / (n4 * n5)
-static long fn5( const long n1,
- const long n2,
- const long n3,
- const long n4,
- const long n5 )
+static tools::Long fn5( const tools::Long n1,
+ const tools::Long n2,
+ const tools::Long n3,
+ const tools::Long n4,
+ const tools::Long n5 )
{
if ( n1 == 0 || n2 == 0 || n3 == 0 || n4 == 0 || n5 == 0 )
return 0;
@@ -1551,7 +1551,7 @@ static long fn5( const long n1,
} // of if
else
{
- long n8 = n4 * n5;
+ tools::Long n8 = n4 * n5;
if ( a7.IsNeg() )
a7 -= n8 / 2;
@@ -1560,11 +1560,11 @@ static long fn5( const long n1,
a7 /= n8;
} // of else
- return static_cast<long>(a7);
+ return static_cast<tools::Long>(a7);
} // of if
else
{
- long n6 = n2 * n3;
+ tools::Long n6 = n2 * n3;
if ( LONG_MAX / std::abs(n1) < std::abs(n6) )
{
@@ -1587,7 +1587,7 @@ static long fn5( const long n1,
} // of if
else
{
- long n8 = n4 * n5;
+ tools::Long n8 = n4 * n5;
if ( a7.IsNeg() )
a7 -= n8 / 2;
@@ -1596,11 +1596,11 @@ static long fn5( const long n1,
a7 /= n8;
} // of else
- return static_cast<long>(a7);
+ return static_cast<tools::Long>(a7);
} // of if
else
{
- long n7 = n1 * n6;
+ tools::Long n7 = n1 * n6;
if ( LONG_MAX / std::abs(n4) < std::abs(n5) )
{
@@ -1616,12 +1616,12 @@ static long fn5( const long n1,
a7 += a9;
a7 /= a8;
- return static_cast<long>(a7);
+ return static_cast<tools::Long>(a7);
} // of if
else
{
- const long n8 = n4 * n5;
- const long n8_2 = n8 / 2;
+ const tools::Long n8 = n4 * n5;
+ const tools::Long n8_2 = n8 / 2;
if( n7 < 0 )
{
@@ -1638,7 +1638,7 @@ static long fn5( const long n1,
}
// return (n1 * n2) / n3
-static long fn3( const long n1, const long n2, const long n3 )
+static tools::Long fn3( const tools::Long n1, const tools::Long n2, const tools::Long n3 )
{
if ( n1 == 0 || n2 == 0 || n3 == 0 )
return 0;
@@ -1653,12 +1653,12 @@ static long fn3( const long n1, const long n2, const long n3 )
a4 += n3 / 2;
a4 /= n3;
- return static_cast<long>(a4);
+ return static_cast<tools::Long>(a4);
} // of if
else
{
- long n4 = n1 * n2;
- const long n3_2 = n3 / 2;
+ tools::Long n4 = n1 * n2;
+ const tools::Long n3_2 = n3 / 2;
if( n4 < 0 )
{
@@ -1896,7 +1896,7 @@ tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource
}
}
-long OutputDevice::LogicToLogic( long nLongSource,
+tools::Long OutputDevice::LogicToLogic( tools::Long nLongSource,
MapUnit eUnitSource, MapUnit eUnitDest )
{
if ( eUnitSource == eUnitDest )
@@ -1925,7 +1925,7 @@ void OutputDevice::SetPixelOffset( const Size& rOffset )
}
-DeviceCoordinate OutputDevice::LogicWidthToDeviceCoordinate( long nWidth ) const
+DeviceCoordinate OutputDevice::LogicWidthToDeviceCoordinate( tools::Long nWidth ) const
{
if ( !mbMap )
return static_cast<DeviceCoordinate>(nWidth);
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 020a57a6a40c..59ba709d9429 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -311,12 +311,12 @@ sal_uInt16 OutputDevice::GetBitCount() const
return mpGraphics->GetBitCount();
}
-void OutputDevice::SetOutOffXPixel(long nOutOffX)
+void OutputDevice::SetOutOffXPixel(tools::Long nOutOffX)
{
mnOutOffX = nOutOffX;
}
-void OutputDevice::SetOutOffYPixel(long nOutOffY)
+void OutputDevice::SetOutOffYPixel(tools::Long nOutOffY)
{
mnOutOffY = nOutOffY;
}
@@ -375,10 +375,10 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
if ( mbOutputClipped )
return;
- long nSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
- long nSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
- long nDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
- long nDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
+ tools::Long nSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ tools::Long nSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
+ tools::Long nDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
+ tools::Long nDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
if (nSrcWidth && nSrcHeight && nDestWidth && nDestHeight)
{
@@ -485,8 +485,8 @@ void OutputDevice::CopyArea( const Point& rDestPt,
if ( mbOutputClipped )
return;
- long nSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
- long nSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
+ tools::Long nSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ tools::Long nSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
if (nSrcWidth && nSrcHeight)
{
SalTwoRect aPosAry(ImplLogicXToDevicePixel(rSrcPt.X()), ImplLogicYToDevicePixel(rSrcPt.Y()),
@@ -607,7 +607,7 @@ void OutputDevice::ReMirror( Point &rPoint ) const
}
void OutputDevice::ReMirror( tools::Rectangle &rRect ) const
{
- long nWidth = rRect.Right() - rRect.Left();
+ tools::Long nWidth = rRect.Right() - rRect.Left();
//long lc_x = rRect.nLeft - mnOutOffX; // normalize
//lc_x = mnOutWidth - nWidth - 1 - lc_x; // mirror
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index 0a80a8f1ef92..09a6ffb93a57 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -37,8 +37,8 @@ Color OutputDevice::GetPixel(const Point& rPoint) const
if (!mbOutputClipped)
{
- const long nX = ImplLogicXToDevicePixel(rPoint.X());
- const long nY = ImplLogicYToDevicePixel(rPoint.Y());
+ const tools::Long nX = ImplLogicXToDevicePixel(rPoint.X());
+ const tools::Long nY = ImplLogicYToDevicePixel(rPoint.Y());
aColor = mpGraphics->GetPixel(nX, nY, this);
if (mpAlphaVDev)
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index e52e42cc8ce6..d0900c10da33 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -146,7 +146,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
{
LineInfo aLineInfo;
if( fLineWidth != 0.0 )
- aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
+ aLineInfo.SetWidth( static_cast<tools::Long>(fLineWidth+0.5) );
const tools::Polygon aToolsPolygon( rB2DPolygon );
mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
@@ -233,7 +233,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
const tools::Polygon aToolsPolygon( rB2DPolygon );
LineInfo aLineInfo;
if( fLineWidth != 0.0 )
- aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
+ aLineInfo.SetWidth( static_cast<tools::Long>(fLineWidth+0.5) );
drawPolyLine( aToolsPolygon, aLineInfo );
}
@@ -307,7 +307,7 @@ bool OutputDevice::DrawPolyLineDirect(
{
LineInfo aLineInfo;
if( fLineWidth != 0.0 )
- aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
+ aLineInfo.SetWidth( static_cast<tools::Long>(fLineWidth+0.5) );
// Transport known information, might be needed
aLineInfo.SetLineJoin(eLineJoin);
aLineInfo.SetLineCap(eLineCap);
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index a9bc729c002b..252cbc308daf 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -251,18 +251,18 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( mbOutputClipped )
return;
- const long nDistX = std::max( rDist.Width(), 1L );
- const long nDistY = std::max( rDist.Height(), 1L );
- long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
- long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
- const long nRight = aDstRect.Right();
- const long nBottom = aDstRect.Bottom();
- const long nStartX = ImplLogicXToDevicePixel( nX );
- const long nEndX = ImplLogicXToDevicePixel( nRight );
- const long nStartY = ImplLogicYToDevicePixel( nY );
- const long nEndY = ImplLogicYToDevicePixel( nBottom );
- long nHorzCount = 0;
- long nVertCount = 0;
+ const tools::Long nDistX = std::max( rDist.Width(), 1L );
+ const tools::Long nDistY = std::max( rDist.Height(), 1L );
+ tools::Long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
+ tools::Long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
+ const tools::Long nRight = aDstRect.Right();
+ const tools::Long nBottom = aDstRect.Bottom();
+ const tools::Long nStartX = ImplLogicXToDevicePixel( nX );
+ const tools::Long nEndX = ImplLogicXToDevicePixel( nRight );
+ const tools::Long nStartY = ImplLogicYToDevicePixel( nY );
+ const tools::Long nEndY = ImplLogicYToDevicePixel( nBottom );
+ tools::Long nHorzCount = 0;
+ tools::Long nVertCount = 0;
std::vector< sal_Int32 > aVertBuf;
std::vector< sal_Int32 > aHorzBuf;
@@ -298,9 +298,9 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( nFlags & DrawGridFlags::Dots )
{
- for( long i = 0; i < nVertCount; i++ )
+ for( tools::Long i = 0; i < nVertCount; i++ )
{
- for( long j = 0, Y = aVertBuf[ i ]; j < nHorzCount; j++ )
+ for( tools::Long j = 0, Y = aVertBuf[ i ]; j < nHorzCount; j++ )
{
mpGraphics->DrawPixel( aHorzBuf[ j ], Y, this );
}
@@ -310,7 +310,7 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
{
if( nFlags & DrawGridFlags::HorzLines )
{
- for( long i = 0; i < nVertCount; i++ )
+ for( tools::Long i = 0; i < nVertCount; i++ )
{
nY = aVertBuf[ i ];
mpGraphics->DrawLine( nStartX, nY, nEndX, nY, this );
@@ -319,7 +319,7 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( nFlags & DrawGridFlags::VertLines )
{
- for( long i = 0; i < nHorzCount; i++ )
+ for( tools::Long i = 0; i < nHorzCount; i++ )
{
nX = aHorzBuf[ i ];
mpGraphics->DrawLine( nX, nStartY, nX, nEndY, this );
@@ -373,10 +373,10 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
const double fFactorX = ( rTwoRect.mnSrcWidth > 1 ) ? static_cast<double>( rTwoRect.mnDestWidth - 1 ) / ( rTwoRect.mnSrcWidth - 1 ) : 0.0;
const double fFactorY = ( rTwoRect.mnSrcHeight > 1 ) ? static_cast<double>( rTwoRect.mnDestHeight - 1 ) / ( rTwoRect.mnSrcHeight - 1 ) : 0.0;
- const long nDstX1 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Left() - rTwoRect.mnSrcX ) );
- const long nDstY1 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Top() - rTwoRect.mnSrcY ) );
- const long nDstX2 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Right() - rTwoRect.mnSrcX ) );
- const long nDstY2 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Bottom() - rTwoRect.mnSrcY ) );
+ const tools::Long nDstX1 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Left() - rTwoRect.mnSrcX ) );
+ const tools::Long nDstY1 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Top() - rTwoRect.mnSrcY ) );
+ const tools::Long nDstX2 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Right() - rTwoRect.mnSrcX ) );
+ const tools::Long nDstY2 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Bottom() - rTwoRect.mnSrcY ) );
rTwoRect.mnSrcX = aCropRect.Left();
rTwoRect.mnSrcY = aCropRect.Top();
@@ -415,10 +415,10 @@ void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect
const double fFactorX = ( rTwoRect.mnSrcWidth > 1 ) ? static_cast<double>( rTwoRect.mnDestWidth - 1 ) / ( rTwoRect.mnSrcWidth - 1 ) : 0.0;
const double fFactorY = ( rTwoRect.mnSrcHeight > 1 ) ? static_cast<double>( rTwoRect.mnDestHeight - 1 ) / ( rTwoRect.mnSrcHeight - 1 ) : 0.0;
- const long nDstX1 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Left() - rTwoRect.mnSrcX ) );
- const long nDstY1 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Top() - rTwoRect.mnSrcY ) );
- const long nDstX2 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Right() - rTwoRect.mnSrcX ) );
- const long nDstY2 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Bottom() - rTwoRect.mnSrcY ) );
+ const tools::Long nDstX1 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Left() - rTwoRect.mnSrcX ) );
+ const tools::Long nDstY1 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Top() - rTwoRect.mnSrcY ) );
+ const tools::Long nDstX2 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Right() - rTwoRect.mnSrcX ) );
+ const tools::Long nDstY2 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Bottom() - rTwoRect.mnSrcY ) );
rTwoRect.mnSrcX = aCropRect.Left();
rTwoRect.mnSrcY = aCropRect.Top();
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 1123aa39bb77..5c4b355c2536 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -83,11 +83,11 @@ void OutputDevice::ImplInitTextColor()
}
}
-void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
- long nDistX, long nDistY, long nWidth, long nHeight )
+void OutputDevice::ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY,
+ tools::Long nDistX, tools::Long nDistY, tools::Long nWidth, tools::Long nHeight )
{
- long nX = nDistX;
- long nY = nDistY;
+ tools::Long nX = nDistX;
+ tools::Long nY = nDistY;
short nOrientation = mpFontInstance->mnOrientation;
if ( nOrientation )
@@ -97,7 +97,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
{
if ( nOrientation == 900 )
{
- long nTemp = nX;
+ tools::Long nTemp = nX;
nX = nY;
nY = -nTemp;
nTemp = nWidth;
@@ -114,7 +114,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
}
else /* ( nOrientation == 2700 ) */
{
- long nTemp = nX;
+ tools::Long nTemp = nX;
nX = -nY;
nY = nTemp;
nTemp = nWidth;
@@ -144,10 +144,10 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
{
- const long nWidth = rSalLayout.GetTextWidth() / rSalLayout.GetUnitsPerPixel();
+ const tools::Long nWidth = rSalLayout.GetTextWidth() / rSalLayout.GetUnitsPerPixel();
const Point aBase = rSalLayout.DrawBase();
- const long nX = aBase.X();
- const long nY = aBase.Y();
+ const tools::Long nX = aBase.X();
+ const tools::Long nY = aBase.Y();
if ( mbLineColor || mbInitLineColor )
{
@@ -165,21 +165,21 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
{
Point aPoint = rSalLayout.GetDrawPosition();
- long nX = aPoint.X();
- long nY = aPoint.Y();
+ tools::Long nX = aPoint.X();
+ tools::Long nY = aPoint.Y();
- long nWidth = rSalLayout.GetTextWidth();
- long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
+ tools::Long nWidth = rSalLayout.GetTextWidth();
+ tools::Long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
nY -= mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent;
if ( mpFontInstance->mnOrientation )
{
- long nBaseX = nX, nBaseY = nY;
+ tools::Long nBaseX = nX, nBaseY = nY;
if ( !(mpFontInstance->mnOrientation % 900) )
{
- long nX2 = nX+nWidth;
- long nY2 = nY+nHeight;
+ tools::Long nX2 = nX+nWidth;
+ tools::Long nY2 = nY+nHeight;
Point aBasePt( nBaseX, nBaseY );
aBasePt.RotateAround( nX, nY, mpFontInstance->mnOrientation );
@@ -202,8 +202,8 @@ tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout
bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
{
- long nX = rSalLayout.DrawBase().X();
- long nY = rSalLayout.DrawBase().Y();
+ tools::Long nX = rSalLayout.DrawBase().X();
+ tools::Long nY = rSalLayout.DrawBase().Y();
tools::Rectangle aBoundRect;
rSalLayout.DrawBase() = Point( 0, 0 );
@@ -211,9 +211,9 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
if (!rSalLayout.GetBoundRect(aBoundRect))
{
// guess vertical text extents if GetBoundRect failed
- long nRight = rSalLayout.GetTextWidth();
- long nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent;
- long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
+ tools::Long nRight = rSalLayout.GetTextWidth();
+ tools::Long nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent;
+ tools::Long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
aBoundRect = tools::Rectangle( 0, -nTop, nRight, nHeight - nTop );
}
@@ -253,8 +253,8 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
// mask output with text colored bitmap
GDIMetaFile* pOldMetaFile = mpMetaFile;
- long nOldOffX = mnOutOffX;
- long nOldOffY = mnOutOffY;
+ tools::Long nOldOffX = mnOutOffX;
+ tools::Long nOldOffY = mnOutOffY;
bool bOldMap = mbMap;
mnOutOffX = 0;
@@ -279,17 +279,17 @@ void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
if( ImplDrawRotateText( rSalLayout ) )
return;
- long nOldX = rSalLayout.DrawBase().X();
+ tools::Long nOldX = rSalLayout.DrawBase().X();
if( HasMirroredGraphics() )
{
- long w = IsVirtual() ? mnOutWidth : mpGraphics->GetGraphicsWidth();
- long x = rSalLayout.DrawBase().X();
+ tools::Long w = IsVirtual() ? mnOutWidth : mpGraphics->GetGraphicsWidth();
+ tools::Long x = rSalLayout.DrawBase().X();
rSalLayout.DrawBase().setX( w - 1 - x );
if( !IsRTLEnabled() )
{
OutputDevice *pOutDevRef = this;
// mirror this window back
- long devX = w-pOutDevRef->mnOutWidth-pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX
+ tools::Long devX = w-pOutDevRef->mnOutWidth-pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX
rSalLayout.DrawBase().setX( devX + ( pOutDevRef->mnOutWidth - 1 - (rSalLayout.DrawBase().X() - devX) ) ) ;
}
}
@@ -298,7 +298,7 @@ void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout,
OutputDevice *pOutDevRef = this;
// mirror this window back
- long devX = pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX
+ tools::Long devX = pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX
rSalLayout.DrawBase().setX( pOutDevRef->mnOutWidth - 1 - (rSalLayout.DrawBase().X() - devX) + devX );
}
@@ -351,7 +351,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
// calculate offset - for high resolution printers the offset
// should be greater so that the effect is visible
- long nOff = 1;
+ tools::Long nOff = 1;
nOff += mnDPIX/300;
if ( eRelief == FontRelief::Engraved )
@@ -379,7 +379,7 @@ void OutputDevice::ImplDrawSpecialText( SalLayout& rSalLayout )
{
if ( maFont.IsShadow() )
{
- long nOff = 1 + ((mpFontInstance->mnLineHeight-24)/24);
+ tools::Long nOff = 1 + ((mpFontInstance->mnLineHeight-24)/24);
if ( maFont.IsOutline() )
nOff++;
SetTextLineColor();
@@ -456,8 +456,8 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
ImplDrawTextDirect( rSalLayout, mbTextLines );
}
-long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
- long nWidth, const OUString& rStr,
+tools::Long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
+ tools::Long nWidth, const OUString& rStr,
DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout )
{
SAL_WARN_IF( nWidth <= 0, "vcl", "ImplGetTextLines: nWidth <= 0!" );
@@ -465,7 +465,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
if ( nWidth <= 0 )
nWidth = 1;
- long nMaxLineWidth = 0;
+ tools::Long nMaxLineWidth = 0;
rLineInfo.Clear();
if (!rStr.isEmpty())
{
@@ -489,7 +489,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
while ( ( nBreakPos < nLen ) && ( rStr[ nBreakPos ] != '\r' ) && ( rStr[ nBreakPos ] != '\n' ) )
nBreakPos++;
- long nLineWidth = _rLayout.GetTextWidth( rStr, nPos, nBreakPos-nPos );
+ tools::Long nLineWidth = _rLayout.GetTextWidth( rStr, nPos, nBreakPos-nPos );
if ( ( nLineWidth > nWidth ) && ( nStyle & DrawTextFlags::WordBreak ) )
{
if ( !xBI.is() )
@@ -610,7 +610,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
{
// fallback to something really simple
sal_Int32 nSpacePos = rStr.getLength();
- long nW = 0;
+ tools::Long nW = 0;
do
{
nSpacePos = rStr.lastIndexOf( ' ', nSpacePos );
@@ -889,23 +889,23 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
mpAlphaVDev->DrawText( rStartPt, rStr, nIndex, nLen, pVector, pDisplayText );
}
-long OutputDevice::GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen,
+tools::Long OutputDevice::GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen,
vcl::TextLayoutCache const*const pLayoutCache,
SalLayoutGlyphs const*const pSalLayoutCache) const
{
- long nWidth = GetTextArray( rStr, nullptr, nIndex,
+ tools::Long nWidth = GetTextArray( rStr, nullptr, nIndex,
nLen, pLayoutCache, pSalLayoutCache );
return nWidth;
}
-long OutputDevice::GetTextHeight() const
+tools::Long OutputDevice::GetTextHeight() const
{
if (!InitFont())
return 0;
- long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
+ tools::Long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
if ( mbMap )
nHeight = ImplDevicePixelToLogicHeight( nHeight );
@@ -927,7 +927,7 @@ float OutputDevice::approximate_digit_width() const
}
void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const long* pDXAry,
+ const tools::Long* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags,
const SalLayoutGlyphs* pSalLayoutCache )
{
@@ -959,7 +959,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen, flags );
}
-long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry,
+tools::Long OutputDevice::GetTextArray( const OUString& rStr, tools::Long* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen,
vcl::TextLayoutCache const*const pLayoutCache,
SalLayoutGlyphs const*const pSalLayoutCache) const
@@ -1040,7 +1040,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry,
#else /* ! VCL_FLOAT_DEVICE_PIXEL */
- long nWidth = pSalLayout->FillDXArray( pDXAry );
+ tools::Long nWidth = pSalLayout->FillDXArray( pDXAry );
int nWidthFactor = pSalLayout->GetUnitsPerPixel();
// convert virtual char widths to virtual absolute positions
@@ -1068,7 +1068,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry,
#endif /* VCL_FLOAT_DEVICE_PIXEL */
}
-void OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray,
+void OutputDevice::GetCaretPositions( const OUString& rStr, tools::Long* pCaretXArray,
sal_Int32 nIndex, sal_Int32 nLen,
const SalLayoutGlyphs* pGlyphs ) const
{
@@ -1086,14 +1086,14 @@ void OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray,
int nWidthFactor = pSalLayout->GetUnitsPerPixel();
pSalLayout->GetCaretPositions( 2*nLen, pCaretXArray );
- long nWidth = pSalLayout->GetTextWidth();
+ tools::Long nWidth = pSalLayout->GetTextWidth();
// fixup unknown caret positions
int i;
for( i = 0; i < 2 * nLen; ++i )
if( pCaretXArray[ i ] >= 0 )
break;
- long nXPos = pCaretXArray[ i ];
+ tools::Long nXPos = pCaretXArray[ i ];
for( i = 0; i < 2 * nLen; ++i )
{
if( pCaretXArray[ i ] >= 0 )
@@ -1252,8 +1252,8 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
sal_Int32 nMinIndex, sal_Int32 nLen,
- const Point& rLogicalPos, long nLogicalWidth,
- const long* pDXArray, SalLayoutFlags flags,
+ const Point& rLogicalPos, tools::Long nLogicalWidth,
+ const tools::Long* pDXArray, SalLayoutFlags flags,
vcl::TextLayoutCache const* pLayoutCache,
const SalLayoutGlyphs* pGlyphs) const
{
@@ -1383,9 +1383,9 @@ bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_
return (nCharPos != nIndex);
}
-sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
+sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
sal_Int32 nIndex, sal_Int32 nLen,
- long nCharExtra,
+ tools::Long nCharExtra,
vcl::TextLayoutCache const*const pLayoutCache,
const SalLayoutGlyphs* pGlyphs) const
{
@@ -1398,8 +1398,8 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
// NOTE: be very careful to avoid rounding errors for nCharExtra case
// problem with rounding errors especially for small nCharExtras
// TODO: remove when layout units have subpixel granularity
- long nWidthFactor = pSalLayout->GetUnitsPerPixel();
- long nSubPixelFactor = (nWidthFactor < 64 ) ? 64 : 1;
+ tools::Long nWidthFactor = pSalLayout->GetUnitsPerPixel();
+ tools::Long nSubPixelFactor = (nWidthFactor < 64 ) ? 64 : 1;
nTextWidth *= nWidthFactor * nSubPixelFactor;
DeviceCoordinate nTextPixelWidth = LogicWidthToDeviceCoordinate( nTextWidth );
DeviceCoordinate nExtraPixelWidth = 0;
@@ -1414,10 +1414,10 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
return nRetVal;
}
-sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
+sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
sal_Unicode nHyphenChar, sal_Int32& rHyphenPos,
sal_Int32 nIndex, sal_Int32 nLen,
- long nCharExtra,
+ tools::Long nCharExtra,
vcl::TextLayoutCache const*const pLayoutCache) const
{
rHyphenPos = -1;
@@ -1431,8 +1431,8 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
// NOTE: be very careful to avoid rounding errors for nCharExtra case
// problem with rounding errors especially for small nCharExtras
// TODO: remove when layout units have subpixel granularity
- long nWidthFactor = pSalLayout->GetUnitsPerPixel();
- long nSubPixelFactor = (nWidthFactor < 64 ) ? 64 : 1;
+ tools::Long nWidthFactor = pSalLayout->GetUnitsPerPixel();
+ tools::Long nSubPixelFactor = (nWidthFactor < 64 ) ? 64 : 1;
nTextWidth *= nWidthFactor * nSubPixelFactor;
DeviceCoordinate nTextPixelWidth = LogicWidthToDeviceCoordinate( nTextWidth );
@@ -1452,7 +1452,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
if( pHyphenLayout )
{
// calculate subpixel width of hyphenation character
- long nHyphenPixelWidth = pHyphenLayout->GetTextWidth() * nSubPixelFactor;
+ tools::Long nHyphenPixelWidth = pHyphenLayout->GetTextWidth() * nSubPixelFactor;
// calculate hyphenated break position
nTextPixelWidth -= nHyphenPixelWidth;
@@ -1516,15 +1516,15 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
}
}
- long nWidth = rRect.GetWidth();
- long nHeight = rRect.GetHeight();
+ tools::Long nWidth = rRect.GetWidth();
+ tools::Long nHeight = rRect.GetHeight();
if ( ((nWidth <= 0) || (nHeight <= 0)) && (nStyle & DrawTextFlags::Clip) )
return;
Point aPos = rRect.TopLeft();
- long nTextHeight = rTargetDevice.GetTextHeight();
+ tools::Long nTextHeight = rTargetDevice.GetTextHeight();
TextAlign eAlign = rTargetDevice.GetTextAlign();
sal_Int32 nMnemonicPos = -1;
@@ -1545,7 +1545,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
if ( nTextHeight )
{
- long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
+ tools::Long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
sal_Int32 nLines = static_cast<sal_Int32>(nHeight/nTextHeight);
OUString aLastLine;
nFormatLines = aMultiLineInfo.Count();
@@ -1618,15 +1618,15 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
{
if ( (nMnemonicPos >= nIndex) && (nMnemonicPos < nIndex+nLineLen) )
{
- long nMnemonicX;
- long nMnemonicY;
+ tools::Long nMnemonicX;
+ tools::Long nMnemonicY;
DeviceCoordinate nMnemonicWidth;
std::unique_ptr<long[]> const pCaretXArray(new long[2 * nLineLen]);
/*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(),
nIndex, nLineLen );
- long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)];
- long lc_x2 = pCaretXArray[2*(nMnemonicPos - nIndex)+1];
+ tools::Long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)];
+ tools::Long lc_x2 = pCaretXArray[2*(nMnemonicPos - nIndex)+1];
nMnemonicWidth = rTargetDevice.LogicWidthToDeviceCoordinate( std::abs(lc_x1 - lc_x2) );
Point aTempPos = rTargetDevice.LogicToPixel( aPos );
@@ -1650,7 +1650,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
}
else
{
- long nTextWidth = _rLayout.GetTextWidth( aStr, 0, -1 );
+ tools::Long nTextWidth = _rLayout.GetTextWidth( aStr, 0, -1 );
// Clip text if needed
if ( nTextWidth > nWidth )
@@ -1686,15 +1686,15 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
else if ( nStyle & DrawTextFlags::VCenter )
aPos.AdjustY((nHeight-nTextHeight)/2 );
- long nMnemonicX = 0;
- long nMnemonicY = 0;
+ tools::Long nMnemonicX = 0;
+ tools::Long nMnemonicY = 0;
DeviceCoordinate nMnemonicWidth = 0;
if ( nMnemonicPos != -1 )
{
std::unique_ptr<long[]> const pCaretXArray(new long[2 * aStr.getLength()]);
/*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(), 0, aStr.getLength() );
- long lc_x1 = pCaretXArray[2*nMnemonicPos];
- long lc_x2 = pCaretXArray[2*nMnemonicPos+1];
+ tools::Long lc_x1 = pCaretXArray[2*nMnemonicPos];
+ tools::Long lc_x2 = pCaretXArray[2*nMnemonicPos+1];
nMnemonicWidth = rTargetDevice.LogicWidthToDeviceCoordinate( std::abs(lc_x1 - lc_x2) );
Point aTempPos = rTargetDevice.LogicToPixel( aPos );
@@ -1813,9 +1813,9 @@ tools::Rectangle OutputDevice::GetTextRect( const tools::Rectangle& rRect,
tools::Rectangle aRect = rRect;
sal_Int32 nLines;
- long nWidth = rRect.GetWidth();
- long nMaxWidth;
- long nTextHeight = GetTextHeight();
+ tools::Long nWidth = rRect.GetWidth();
+ tools::Long nMaxWidth;
+ tools::Long nTextHeight = GetTextHeight();
OUString aStr = rStr;
if ( nStyle & DrawTextFlags::Mnemonic )
@@ -1934,14 +1934,14 @@ static bool ImplIsCharIn( sal_Unicode c, const char* pStr )
return false;
}
-OUString OutputDevice::GetEllipsisString( const OUString& rOrigStr, long nMaxWidth,
+OUString OutputDevice::GetEllipsisString( const OUString& rOrigStr, tools::Long nMaxWidth,
DrawTextFlags nStyle ) const
{
vcl::DefaultTextLayout aTextLayout( *const_cast< OutputDevice* >( this ) );
return ImplGetEllipsisString( *this, rOrigStr, nMaxWidth, nStyle, aTextLayout );
}
-OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rOrigStr, long nMaxWidth,
+OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rOrigStr, tools::Long nMaxWidth,
DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout )
{
OUString aStr = rOrigStr;
@@ -2100,9 +2100,9 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
OUString aStr = rStr;
sal_Int32 nMnemonicPos = -1;
- long nMnemonicX = 0;
- long nMnemonicY = 0;
- long nMnemonicWidth = 0;
+ tools::Long nMnemonicX = 0;
+ tools::Long nMnemonicY = 0;
+ tools::Long nMnemonicWidth = 0;
if ( (nStyle & DrawTextFlags::Mnemonic) && nLen > 1 )
{
aStr = GetNonMnemonicString( aStr, nMnemonicPos );
@@ -2131,8 +2131,8 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
std::unique_ptr<long[]> const pCaretXArray(new long[2 * nLen]);
/*sal_Bool bRet =*/ GetCaretPositions( aStr, pCaretXArray.get(), nIndex, nLen, pGlyphs );
- long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ];
- long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ];
+ tools::Long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ];
+ tools::Long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ];
nMnemonicWidth = ::abs(static_cast<int>(lc_x1 - lc_x2));
Point aTempPos( std::min(lc_x1,lc_x2), GetFontMetric().GetAscent() );
@@ -2209,7 +2209,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
mpAlphaVDev->DrawCtrlText( rPos, rStr, nIndex, nLen, nStyle, pVector, pDisplayText );
}
-long OutputDevice::GetCtrlTextWidth( const OUString& rStr, const SalLayoutGlyphs* pGlyphs ) const
+tools::Long OutputDevice::GetCtrlTextWidth( const OUString& rStr, const SalLayoutGlyphs* pGlyphs ) const
{
sal_Int32 nLen = rStr.getLength();
sal_Int32 nIndex = 0;
@@ -2264,7 +2264,7 @@ OUString OutputDevice::GetNonMnemonicString( const OUString& rStr, sal_Int32& rM
bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen,
- sal_uLong nLayoutWidth, const long* pDXAry,
+ sal_uLong nLayoutWidth, const tools::Long* pDXAry,
const SalLayoutGlyphs* pGlyphs ) const
{
bool bRet = false;
@@ -2273,7 +2273,7 @@ bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
std::unique_ptr<SalLayout> pSalLayout;
const Point aPoint;
// calculate offset when nBase!=nIndex
- long nXOffset = 0;
+ tools::Long nXOffset = 0;
if( nBase != nIndex )
{
sal_Int32 nStart = std::min( nBase, nIndex );
@@ -2304,13 +2304,13 @@ bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
{
double fFactor = 1.0 / nWidthFactor;
aPixelRect.SetLeft(
- static_cast< long >(aPixelRect.Left() * fFactor) );
+ static_cast< tools::Long >(aPixelRect.Left() * fFactor) );
aPixelRect.SetRight(
- static_cast< long >(aPixelRect.Right() * fFactor) );
+ static_cast< tools::Long >(aPixelRect.Right() * fFactor) );
aPixelRect.SetTop(
- static_cast< long >(aPixelRect.Top() * fFactor) );
+ static_cast< tools::Long >(aPixelRect.Top() * fFactor) );
aPixelRect.SetBottom(
- static_cast< long >(aPixelRect.Bottom() * fFactor) );
+ static_cast< tools::Long >(aPixelRect.Bottom() * fFactor) );
}
Point aRotatedOfs( mnTextOffX, mnTextOffY );
@@ -2328,7 +2328,7 @@ bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen,
- sal_uLong nLayoutWidth, const long* pDXArray ) const
+ sal_uLong nLayoutWidth, const tools::Long* pDXArray ) const
{
if (!InitFont())
return false;
@@ -2353,7 +2353,7 @@ bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
std::unique_ptr<SalLayout> pSalLayout;
// calculate offset when nBase!=nIndex
- long nXOffset = 0;
+ tools::Long nXOffset = 0;
if( nBase != nIndex )
{
sal_Int32 nStart = std::min( nBase, nIndex );
@@ -2415,7 +2415,7 @@ bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen,
- sal_uLong nLayoutWidth, const long* pDXArray ) const
+ sal_uLong nLayoutWidth, const tools::Long* pDXArray ) const
{
rResultVector.clear();
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 26866aaaeedb..eb716ebdb49f 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -47,13 +47,13 @@ void OutputDevice::ImplInitAboveTextLineSize()
mpFontInstance->mxFontMetric->ImplInitAboveTextLineSize();
}
-void OutputDevice::ImplDrawWavePixel( long nOriginX, long nOriginY,
- long nCurX, long nCurY,
+void OutputDevice::ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY,
+ tools::Long nCurX, tools::Long nCurY,
short nOrientation,
SalGraphics* pGraphics,
OutputDevice const * pOutDev,
bool bDrawPixAsRect,
- long nPixWidth, long nPixHeight )
+ tools::Long nPixWidth, tools::Long nPixHeight )
{
if ( nOrientation )
{
@@ -72,17 +72,17 @@ void OutputDevice::ImplDrawWavePixel( long nOriginX, long nOriginY,
}
}
-void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
- long nDistX, long nDistY,
- long nWidth, long nHeight,
- long nLineWidth, short nOrientation,
+void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY,
+ tools::Long nDistX, tools::Long nDistY,
+ tools::Long nWidth, tools::Long nHeight,
+ tools::Long nLineWidth, short nOrientation,
const Color& rColor )
{
if ( !nHeight )
return;
- long nStartX = nBaseX + nDistX;
- long nStartY = nBaseY + nDistY;
+ tools::Long nStartX = nBaseX + nDistX;
+ tools::Long nStartY = nBaseY + nDistY;
// If the height is 1 pixel, it's enough output a line
if ( (nLineWidth == 1) && (nHeight == 1) )
@@ -90,8 +90,8 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
mpGraphics->SetLineColor( rColor );
mbInitLineColor = true;
- long nEndX = nStartX+nWidth;
- long nEndY = nStartY;
+ tools::Long nEndX = nStartX+nWidth;
+ tools::Long nEndY = nStartY;
if ( nOrientation )
{
Point aOriginPt( nBaseX, nBaseY );
@@ -102,14 +102,14 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
}
else
{
- long nCurX = nStartX;
- long nCurY = nStartY;
- long nDiffX = 2;
- long nDiffY = nHeight-1;
- long nCount = nWidth;
- long nOffY = -1;
- long nPixWidth;
- long nPixHeight;
+ tools::Long nCurX = nStartX;
+ tools::Long nCurY = nStartY;
+ tools::Long nDiffX = 2;
+ tools::Long nDiffY = nHeight-1;
+ tools::Long nCount = nWidth;
+ tools::Long nOffY = -1;
+ tools::Long nPixWidth;
+ tools::Long nPixHeight;
bool bDrawPixAsRect;
// On printers that output pixel via DrawRect()
if ( (GetOutDevType() == OUTDEV_PRINTER) || (nLineWidth > 1) )
@@ -148,10 +148,10 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
else
{
nCurY += nDiffY;
- long nFreq = nCount / (nDiffX+nDiffY);
+ tools::Long nFreq = nCount / (nDiffX+nDiffY);
while ( nFreq-- )
{
- for( long i = nDiffY; i; --i )
+ for( tools::Long i = nDiffY; i; --i )
{
ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation,
mpGraphics, this,
@@ -159,7 +159,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
nCurX++;
nCurY += nOffY;
}
- for( long i = nDiffX; i; --i )
+ for( tools::Long i = nDiffX; i; --i )
{
ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation,
mpGraphics, this,
@@ -171,7 +171,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
nFreq = nCount % (nDiffX+nDiffY);
if ( nFreq )
{
- for( long i = nDiffY; i && nFreq; --i, --nFreq )
+ for( tools::Long i = nDiffY; i && nFreq; --i, --nFreq )
{
ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation,
mpGraphics, this,
@@ -180,7 +180,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
nCurY += nOffY;
}
- for( long i = nDiffX; i && nFreq; --i, --nFreq )
+ for( tools::Long i = nDiffX; i && nFreq; --i, --nFreq )
{
ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation,
mpGraphics, this,
@@ -192,15 +192,15 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
}
}
-void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
- long nDistX, long nDistY, long nWidth,
+void OutputDevice::ImplDrawWaveTextLine( tools::Long nBaseX, tools::Long nBaseY,
+ tools::Long nDistX, tools::Long nDistY, tools::Long nWidth,
FontLineStyle eTextLine,
Color aColor,
bool bIsAbove )
{
LogicalFontInstance* pFontInstance = mpFontInstance.get();
- long nLineHeight;
- long nLinePos;
+ tools::Long nLineHeight;
+ tools::Long nLinePos;
if ( bIsAbove )
{
@@ -215,7 +215,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
if ( (eTextLine == LINESTYLE_SMALLWAVE) && (nLineHeight > 3) )
nLineHeight = 3;
- long nLineWidth = mnDPIX / 300;
+ tools::Long nLineWidth = mnDPIX / 300;
if ( !nLineWidth )
nLineWidth = 1;
@@ -224,10 +224,10 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
nLinePos += nDistY - (nLineHeight / 2);
- long nLineWidthHeight = ((nLineWidth * mnDPIX) + (mnDPIY / 2)) / mnDPIY;
+ tools::Long nLineWidthHeight = ((nLineWidth * mnDPIX) + (mnDPIY / 2)) / mnDPIY;
if ( eTextLine == LINESTYLE_DOUBLEWAVE )
{
- long nOrgLineHeight = nLineHeight;
+ tools::Long nOrgLineHeight = nLineHeight;
nLineHeight /= 3;
if ( nLineHeight < 2 )
{
@@ -237,11 +237,11 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
nLineHeight = 1;
}
- long nLineDY = nOrgLineHeight-(nLineHeight*2);
+ tools::Long nLineDY = nOrgLineHeight-(nLineHeight*2);
if ( nLineDY < nLineWidthHeight )
nLineDY = nLineWidthHeight;
- long nLineDY2 = nLineDY/2;
+ tools::Long nLineDY2 = nLineDY/2;
if ( !nLineDY2 )
nLineDY2 = 1;
@@ -260,18 +260,18 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
}
}
-void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
- long nDistX, long nDistY, long nWidth,
+void OutputDevice::ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBaseY,
+ tools::Long nDistX, tools::Long nDistY, tools::Long nWidth,
FontLineStyle eTextLine,
Color aColor,
bool bIsAbove )
{
LogicalFontInstance* pFontInstance = mpFontInstance.get();
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ tools::Long nLineHeight = 0;
+ tools::Long nLinePos = 0;
+ tools::Long nLinePos2 = 0;
- const long nY = nDistY;
+ const tools::Long nY = nDistY;
if ( eTextLine > UNDERLINE_LAST )
eTextLine = LINESTYLE_SINGLE;
@@ -341,7 +341,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
mpGraphics->SetFillColor( aColor );
mbInitFillColor = true;
- long nLeft = nDistX;
+ tools::Long nLeft = nDistX;
switch ( eTextLine )
{
@@ -356,12 +356,12 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
case LINESTYLE_DOTTED:
case LINESTYLE_BOLDDOTTED:
{
- long nDotWidth = nLineHeight*mnDPIY;
+ tools::Long nDotWidth = nLineHeight*mnDPIY;
nDotWidth += mnDPIY/2;
nDotWidth /= mnDPIY;
- long nTempWidth = nDotWidth;
- long nEnd = nLeft+nWidth;
+ tools::Long nTempWidth = nDotWidth;
+ tools::Long nEnd = nLeft+nWidth;
while ( nLeft < nEnd )
{
if ( nLeft+nTempWidth > nEnd )
@@ -377,14 +377,14 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
case LINESTYLE_BOLDDASH:
case LINESTYLE_BOLDLONGDASH:
{
- long nDotWidth = nLineHeight*mnDPIY;
+ tools::Long nDotWidth = nLineHeight*mnDPIY;
nDotWidth += mnDPIY/2;
nDotWidth /= mnDPIY;
- long nMinDashWidth;
- long nMinSpaceWidth;
- long nSpaceWidth;
- long nDashWidth;
+ tools::Long nMinDashWidth;
+ tools::Long nMinSpaceWidth;
+ tools::Long nSpaceWidth;
+ tools::Long nDashWidth;
if ( (eTextLine == LINESTYLE_LONGDASH) ||
(eTextLine == LINESTYLE_BOLDLONGDASH) )
{
@@ -409,8 +409,8 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
if ( nSpaceWidth < nMinSpaceWidth )
nSpaceWidth = nMinSpaceWidth;
- long nTempWidth = nDashWidth;
- long nEnd = nLeft+nWidth;
+ tools::Long nTempWidth = nDashWidth;
+ tools::Long nEnd = nLeft+nWidth;
while ( nLeft < nEnd )
{
if ( nLeft+nTempWidth > nEnd )
@@ -423,20 +423,20 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
case LINESTYLE_DASHDOT:
case LINESTYLE_BOLDDASHDOT:
{
- long nDotWidth = nLineHeight*mnDPIY;
+ tools::Long nDotWidth = nLineHeight*mnDPIY;
nDotWidth += mnDPIY/2;
nDotWidth /= mnDPIY;
- long nDashWidth = ((100*mnDPIX)+1270)/2540;
- long nMinDashWidth = nDotWidth*4;
+ tools::Long nDashWidth = ((100*mnDPIX)+1270)/2540;
+ tools::Long nMinDashWidth = nDotWidth*4;
// DashWidth will be increased if the line is getting too thick
// in proportion to the line's length
if ( nDashWidth < nMinDashWidth )
nDashWidth = nMinDashWidth;
- long nTempDotWidth = nDotWidth;
- long nTempDashWidth = nDashWidth;
- long nEnd = nLeft+nWidth;
+ tools::Long nTempDotWidth = nDotWidth;
+ tools::Long nTempDashWidth = nDashWidth;
+ tools::Long nEnd = nLeft+nWidth;
while ( nLeft < nEnd )
{
if ( nLeft+nTempDotWidth > nEnd )
@@ -458,20 +458,20 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
case LINESTYLE_DASHDOTDOT:
case LINESTYLE_BOLDDASHDOTDOT:
{
- long nDotWidth = nLineHeight*mnDPIY;
+ tools::Long nDotWidth = nLineHeight*mnDPIY;
nDotWidth += mnDPIY/2;
nDotWidth /= mnDPIY;
- long nDashWidth = ((100*mnDPIX)+1270)/2540;
- long nMinDashWidth = nDotWidth*4;
+ tools::Long nDashWidth = ((100*mnDPIX)+1270)/2540;
+ tools::Long nMinDashWidth = nDotWidth*4;
// DashWidth will be increased if the line is getting too thick
// in proportion to the line's length
if ( nDashWidth < nMinDashWidth )
nDashWidth = nMinDashWidth;
- long nTempDotWidth = nDotWidth;
- long nTempDashWidth = nDashWidth;
- long nEnd = nLeft+nWidth;
+ tools::Long nTempDotWidth = nDotWidth;
+ tools::Long nTempDashWidth = nDashWidth;
+ tools::Long nEnd = nLeft+nWidth;
while ( nLeft < nEnd )
{
if ( nLeft+nTempDotWidth > nEnd )
@@ -503,17 +503,17 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
}
}
-void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
- long nDistX, long nDistY, long nWidth,
+void OutputDevice::ImplDrawStrikeoutLine( tools::Long nBaseX, tools::Long nBaseY,
+ tools::Long nDistX, tools::Long nDistY, tools::Long nWidth,
FontStrikeout eStrikeout,
Color aColor )
{
LogicalFontInstance* pFontInstance = mpFontInstance.get();
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ tools::Long nLineHeight = 0;
+ tools::Long nLinePos = 0;
+ tools::Long nLinePos2 = 0;
- long nY = nDistY;
+ tools::Long nY = nDistY;
if ( eStrikeout > STRIKEOUT_LAST )
eStrikeout = STRIKEOUT_SINGLE;
@@ -548,7 +548,7 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
mpGraphics->SetFillColor( aColor );
mbInitFillColor = true;
- const long& nLeft = nDistX;
+ const tools::Long& nLeft = nDistX;
switch ( eStrikeout )
{
@@ -565,8 +565,8 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
}
}
-void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
- long nDistX, long nDistY, long nWidth,
+void OutputDevice::ImplDrawStrikeoutChar( tools::Long nBaseX, tools::Long nBaseY,
+ tools::Long nDistX, tools::Long nDistY, tools::Long nWidth,
FontStrikeout eStrikeout,
Color aColor )
{
@@ -587,7 +587,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
const OUString aStrikeoutTest(aChars, nTestStrLen);
// calculate approximation of strikeout atom size
- long nStrikeoutWidth = 0;
+ tools::Long nStrikeoutWidth = 0;
std::unique_ptr<SalLayout> pLayout = ImplLayout( aStrikeoutTest, 0, nTestStrLen );
if( pLayout )
{
@@ -657,8 +657,8 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
ImplInitTextColor();
}
-void OutputDevice::ImplDrawTextLine( long nX, long nY,
- long nDistX, DeviceCoordinate nWidth,
+void OutputDevice::ImplDrawTextLine( tools::Long nX, tools::Long nY,
+ tools::Long nDistX, DeviceCoordinate nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline,
@@ -676,7 +676,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
if ( IsRTLEnabled() )
{
- long nXAdd = nWidth - nDistX;
+ tools::Long nXAdd = nWidth - nDistX;
if( mpFontInstance->mnOrientation )
nXAdd = FRound( nXAdd * cos( mpFontInstance->mnOrientation * F_PI1800 ) );
@@ -749,7 +749,7 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
nDist = aPos.X() - aStartPt.X();
if( mpFontInstance->mnOrientation )
{
- const long nDY = aPos.Y() - aStartPt.Y();
+ const tools::Long nDY = aPos.Y() - aStartPt.Y();
const double fRad = mpFontInstance->mnOrientation * F_PI1800;
nDist = FRound( nDist*cos(fRad) - nDY*sin(fRad) );
}
@@ -783,9 +783,9 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
}
}
-void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth )
+void OutputDevice::ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools::Long nWidth )
{
- long nBaseX = nX;
+ tools::Long nBaseX = nX;
if( /*HasMirroredGraphics() &&*/ IsRTLEnabled() )
{
// add some strange offset
@@ -895,7 +895,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
mpAlphaVDev->SetOverlineColor( COL_BLACK );
}
-void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
+void OutputDevice::DrawTextLine( const Point& rPos, tools::Long nWidth,
FontStrikeout eStrikeout,
FontLineStyle eUnderline,
FontLineStyle eOverline,
@@ -936,7 +936,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
-void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, long nLineWidth)
+void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth)
{
assert(!is_double_buffered_window());
@@ -959,23 +959,23 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, lo
Point aStartPt = ImplLogicToDevicePixel(rStartPos);
Point aEndPt = ImplLogicToDevicePixel(rEndPos);
- long nStartX = aStartPt.X();
- long nStartY = aStartPt.Y();
- long nEndX = aEndPt.X();
- long nEndY = aEndPt.Y();
+ tools::Long nStartX = aStartPt.X();
+ tools::Long nStartY = aStartPt.Y();
+ tools::Long nEndX = aEndPt.X();
+ tools::Long nEndY = aEndPt.Y();
double fOrientation = 0.0;
// handle rotation
if (nStartY != nEndY || nStartX > nEndX)
{
- long nLengthX = nEndX - nStartX;
+ tools::Long nLengthX = nEndX - nStartX;
fOrientation = std::atan2(nStartY - nEndY, (nLengthX == 0 ? 0.000000001 : nLengthX));
fOrientation /= F_PI180;
// un-rotate the end point
aStartPt.RotateAround(nEndX, nEndY, -fOrientation * 10.0);
}
- long nWaveHeight = 3;
+ tools::Long nWaveHeight = 3;
// Handle HiDPI
float fScaleFactor = GetDPIScaleFactor();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index b2496a726086..283cf70dd021 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -166,8 +166,8 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
}
// do painting
- const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
- long nX, nY; // , nWorkX, nWorkY, nWorkWidth, nWorkHeight;
+ const tools::Long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
+ tools::Long nX, nY; // , nWorkX, nWorkY, nWorkWidth, nWorkHeight;
std::unique_ptr<long[]> pMapX(new long[ nSrcWidth + 1 ]);
std::unique_ptr<long[]> pMapY(new long[ nSrcHeight + 1 ]);
const bool bOldMap = mbMap;
@@ -511,12 +511,12 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
BitmapColor aPixCol;
const BitmapColor aFillCol( GetFillColor() );
const BitmapColor aBlack( pR->GetBestMatchingColor( COL_BLACK ) );
- const long nWidth = pW->Width();
- const long nHeight = pW->Height();
- const long nR = aFillCol.GetRed();
- const long nG = aFillCol.GetGreen();
- const long nB = aFillCol.GetBlue();
- long nX, nY;
+ const tools::Long nWidth = pW->Width();
+ const tools::Long nHeight = pW->Height();
+ const tools::Long nR = aFillCol.GetRed();
+ const tools::Long nG = aFillCol.GetGreen();
+ const tools::Long nB = aFillCol.GetBlue();
+ tools::Long nX, nY;
if( aPaint.GetBitCount() <= 8 )
{
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 594fdbe05c9b..34d5d0c81e11 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -66,8 +66,8 @@ void OutputDevice::DrawWallpaper( const tools::Rectangle& rRect,
mpAlphaVDev->DrawWallpaper( rRect, rWallpaper );
}
-void OutputDevice::DrawWallpaper( long nX, long nY,
- long nWidth, long nHeight,
+void OutputDevice::DrawWallpaper( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
const Wallpaper& rWallpaper )
{
assert(!is_double_buffered_window());
@@ -80,8 +80,8 @@ void OutputDevice::DrawWallpaper( long nX, long nY,
DrawColorWallpaper( nX, nY, nWidth, nHeight, rWallpaper );
}
-void OutputDevice::DrawColorWallpaper( long nX, long nY,
- long nWidth, long nHeight,
+void OutputDevice::DrawColorWallpaper( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
const Wallpaper& rWallpaper )
{
assert(!is_double_buffered_window());
@@ -132,8 +132,8 @@ void OutputDevice::Erase(const tools::Rectangle& rRect)
mpAlphaVDev->Erase(rRect);
}
-void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
- long nWidth, long nHeight,
+void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
const Wallpaper& rWallpaper )
{
assert(!is_double_buffered_window());
@@ -154,8 +154,8 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
else
aBmpEx = rWallpaper.GetBitmap();
- const long nBmpWidth = aBmpEx.GetSizePixel().Width();
- const long nBmpHeight = aBmpEx.GetSizePixel().Height();
+ const tools::Long nBmpWidth = aBmpEx.GetSizePixel().Width();
+ const tools::Long nBmpHeight = aBmpEx.GetSizePixel().Height();
const bool bTransparent = aBmpEx.IsTransparent();
// draw background
@@ -267,10 +267,10 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
default:
{
- const long nRight = nX + nWidth - 1;
- const long nBottom = nY + nHeight - 1;
- long nFirstX;
- long nFirstY;
+ const tools::Long nRight = nX + nWidth - 1;
+ const tools::Long nBottom = nY + nHeight - 1;
+ tools::Long nFirstX;
+ tools::Long nFirstY;
if( eStyle == WallpaperStyle::Tile )
{
@@ -283,10 +283,10 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
nFirstY = aPos.Y() + ( ( aSize.Height() - nBmpHeight ) >> 1 );
}
- const long nOffX = ( nFirstX - nX ) % nBmpWidth;
- const long nOffY = ( nFirstY - nY ) % nBmpHeight;
- long nStartX = nX + nOffX;
- long nStartY = nY + nOffY;
+ const tools::Long nOffX = ( nFirstX - nX ) % nBmpWidth;
+ const tools::Long nOffY = ( nFirstY - nY ) % nBmpHeight;
+ tools::Long nStartX = nX + nOffX;
+ tools::Long nStartY = nY + nOffY;
if( nOffX > 0 )
nStartX -= nBmpWidth;
@@ -294,9 +294,9 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
if( nOffY > 0 )
nStartY -= nBmpHeight;
- for( long nBmpY = nStartY; nBmpY <= nBottom; nBmpY += nBmpHeight )
+ for( tools::Long nBmpY = nStartY; nBmpY <= nBottom; nBmpY += nBmpHeight )
{
- for( long nBmpX = nStartX; nBmpX <= nRight; nBmpX += nBmpWidth )
+ for( tools::Long nBmpX = nStartX; nBmpX <= nRight; nBmpX += nBmpWidth )
{
DrawBitmapEx( Point( nBmpX, nBmpY ), aBmpEx );
}
@@ -369,8 +369,8 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
mpMetaFile = pOldMetaFile;
}
-void OutputDevice::DrawGradientWallpaper( long nX, long nY,
- long nWidth, long nHeight,
+void OutputDevice::DrawGradientWallpaper( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
const Wallpaper& rWallpaper )
{
assert(!is_double_buffered_window());
diff --git a/vcl/source/toolkit/group.cxx b/vcl/source/toolkit/group.cxx
index a1178eca2b32..391ea0a97687 100644
--- a/vcl/source/toolkit/group.cxx
+++ b/vcl/source/toolkit/group.cxx
@@ -92,8 +92,8 @@ GroupBox::GroupBox( vcl::Window* pParent, WinBits nStyle ) :
void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout )
{
- long nTop;
- long nTextOff;
+ tools::Long nTop;
+ tools::Long nTextOff;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
OUString aText( GetText() );
tools::Rectangle aRect( rPos, rSize );
diff --git a/vcl/source/toolkit/morebtn.cxx b/vcl/source/toolkit/morebtn.cxx
index 1a3ca8eaf777..9c0f6c505a49 100644
--- a/vcl/source/toolkit/morebtn.cxx
+++ b/vcl/source/toolkit/morebtn.cxx
@@ -84,7 +84,7 @@ void MoreButton::Click()
{
vcl::Window* pParent = GetParent();
Size aSize( pParent->GetSizePixel() );
- long nDeltaPixel = LogicToPixel(Size(0, 0), MapMode(MapUnit::MapPixel)).Height();
+ tools::Long nDeltaPixel = LogicToPixel(Size(0, 0), MapMode(MapUnit::MapPixel)).Height();
// Change status
mbState = !mbState;
diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx
index 7020c616bb69..2f75257f5625 100644
--- a/vcl/source/treelist/headbar.cxx
+++ b/vcl/source/treelist/headbar.cxx
@@ -37,7 +37,7 @@ class ImplHeadItem
public:
sal_uInt16 mnId;
HeaderBarItemBits mnBits;
- long mnSize;
+ tools::Long mnSize;
OString maHelpId;
Image maImage;
OUString maOutText;
@@ -142,9 +142,9 @@ void HeaderBar::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
ApplyControlBackground(*this, rStyleSettings.GetFaceColor());
}
-long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const
+tools::Long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const
{
- long nX = -mnOffset;
+ tools::Long nX = -mnOffset;
for ( size_t i = 0; i < nPos; i++ )
nX += mvItemList[ i ]->mnSize;
return nX;
@@ -161,11 +161,11 @@ tools::Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const
}
sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos,
- long& nMouseOff, sal_uInt16& nPos ) const
+ tools::Long& nMouseOff, sal_uInt16& nPos ) const
{
size_t nCount = static_cast<sal_uInt16>(mvItemList.size());
bool bLastFixed = true;
- long nX = -mnOffset;
+ tools::Long nX = -mnOffset;
for ( size_t i = 0; i < nCount; i++ )
{
@@ -354,12 +354,12 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
Size aTxtSize(rRenderContext.GetTextWidth(pItem->maOutText), 0);
if (!pItem->maOutText.isEmpty())
aTxtSize.setHeight( rRenderContext.GetTextHeight() );
- long nArrowWidth = 0;
+ tools::Long nArrowWidth = 0;
if (nBits & (HeaderBarItemBits::UPARROW | HeaderBarItemBits::DOWNARROW))
nArrowWidth = HEAD_ARROWSIZE2 + HEADERBAR_ARROWOFF;
// do not draw if there is not enough space for the image
- long nTestHeight = aImageSize.Height();
+ tools::Long nTestHeight = aImageSize.Height();
if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE)))
nTestHeight += aTxtSize.Height();
if ((aImageSize.Width() > aRect.GetWidth()) || (nTestHeight > aRect.GetHeight()))
@@ -370,10 +370,10 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
// cut text to correct length
bool bLeftText = false;
- long nMaxTxtWidth = aRect.GetWidth() - (HEADERBAR_TEXTOFF * 2) - nArrowWidth;
+ tools::Long nMaxTxtWidth = aRect.GetWidth() - (HEADERBAR_TEXTOFF * 2) - nArrowWidth;
if (nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))
nMaxTxtWidth -= aImageSize.Width();
- long nTxtWidth = aTxtSize.Width();
+ tools::Long nTxtWidth = aTxtSize.Width();
if (nTxtWidth > nMaxTxtWidth)
{
bLeftText = true;
@@ -394,7 +394,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
}
// calculate text/imageposition
- long nTxtPos;
+ tools::Long nTxtPos;
if (!bLeftText && (nBits & HeaderBarItemBits::RIGHT))
{
nTxtPos = aRect.Right() - nTxtWidth - HEADERBAR_TEXTOFF;
@@ -403,7 +403,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
}
else if (!bLeftText && (nBits & HeaderBarItemBits::CENTER))
{
- long nTempWidth = nTxtWidth;
+ tools::Long nTempWidth = nTxtWidth;
if (nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))
nTempWidth += aImageSize.Width();
nTxtPos = aRect.Left() + (aRect.GetWidth() - nTempWidth) / 2;
@@ -429,10 +429,10 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
}
// calculate text/imageposition
- long nTxtPosY = 0;
+ tools::Long nTxtPosY = 0;
if (!pItem->maOutText.isEmpty() || (nArrowWidth && aTxtSize.Height()))
{
- long nTempHeight = aTxtSize.Height();
+ tools::Long nTempHeight = aTxtSize.Height();
nTempHeight += aImageSize.Height();
nTxtPosY = aRect.Top()+((aRect.GetHeight()-nTempHeight)/2);
if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE)))
@@ -456,10 +456,10 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
}
// calculate the position and draw image if it is available
- long nImagePosY = 0;
+ tools::Long nImagePosY = 0;
if (aImageSize.Width() && aImageSize.Height())
{
- long nImagePos = nTxtPos;
+ tools::Long nImagePos = nTxtPos;
if (nBits & HeaderBarItemBits::LEFTIMAGE)
{
nImagePos -= aImageSize.Width();
@@ -482,7 +482,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
nImagePos = aRect.Left() + HEADERBAR_TEXTOFF;
}
- long nTempHeight = aImageSize.Height();
+ tools::Long nTempHeight = aImageSize.Height();
if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE)))
nTempHeight += aTxtSize.Height();
nImagePosY = aRect.Top() + ((aRect.GetHeight() - nTempHeight) / 2);
@@ -499,7 +499,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
if (!(nBits & (HeaderBarItemBits::UPARROW | HeaderBarItemBits::DOWNARROW)))
return;
- long nArrowX = nTxtPos;
+ tools::Long nArrowX = nTxtPos;
if (nBits & HeaderBarItemBits::RIGHT)
nArrowX -= nArrowWidth;
else
@@ -535,7 +535,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
}
else
{
- long nArrowY;
+ tools::Long nArrowY;
if (aTxtSize.Height())
nArrowY = nTxtPosY + (aTxtSize.Height() / 2);
else if (aImageSize.Width() && aImageSize.Height())
@@ -779,7 +779,7 @@ void HeaderBar::ImplEndDrag( bool bCancel )
}
else
{
- long nDelta = mnDragPos - mnStartPos;
+ tools::Long nDelta = mnDragPos - mnStartPos;
if ( nDelta )
{
auto& pItem = mvItemList[ nPos ];
@@ -805,7 +805,7 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() == 2 )
{
- long nTemp;
+ tools::Long nTemp;
sal_uInt16 nPos;
sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
if ( nHitTest )
@@ -827,7 +827,7 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
void HeaderBar::MouseMove( const MouseEvent& rMEvt )
{
- long nTemp1;
+ tools::Long nTemp1;
sal_uInt16 nTemp2;
PointerStyle eStyle = PointerStyle::Arrow;
sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
@@ -1042,7 +1042,7 @@ void HeaderBar::DoubleClick()
}
void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText,
- long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
+ tools::Long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1108,7 +1108,7 @@ void HeaderBar::Clear()
ImplUpdate( 0, true );
}
-void HeaderBar::SetOffset( long nNewOffset )
+void HeaderBar::SetOffset( tools::Long nNewOffset )
{
// tdf#129856 (see also #i40393#) invalidate old left and right border area if WB_BORDER was set in ImplInit()
if (mnBorderOff1 && mnBorderOff2)
@@ -1119,7 +1119,7 @@ void HeaderBar::SetOffset( long nNewOffset )
// move area
tools::Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2 );
- long nDelta = mnOffset-nNewOffset;
+ tools::Long nDelta = mnOffset-nNewOffset;
mnOffset = nNewOffset;
Scroll( nDelta, 0, aRect );
}
@@ -1167,7 +1167,7 @@ tools::Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const
return aRect;
}
-void HeaderBar::SetItemSize( sal_uInt16 nItemId, long nNewSize )
+void HeaderBar::SetItemSize( sal_uInt16 nItemId, tools::Long nNewSize )
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
@@ -1181,7 +1181,7 @@ void HeaderBar::SetItemSize( sal_uInt16 nItemId, long nNewSize )
}
}
-long HeaderBar::GetItemSize( sal_uInt16 nItemId ) const
+tools::Long HeaderBar::GetItemSize( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
@@ -1252,13 +1252,13 @@ OUString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
Size HeaderBar::CalcWindowSizePixel() const
{
- long nMaxImageSize = 0;
+ tools::Long nMaxImageSize = 0;
Size aSize( 0, GetTextHeight() );
for (auto& pItem : mvItemList)
{
// take image size into account
- long nImageHeight = pItem->maImage.GetSizePixel().Height();
+ tools::Long nImageHeight = pItem->maImage.GetSizePixel().Height();
if ( !(pItem->mnBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE)) && !pItem->maText.isEmpty() )
nImageHeight += aSize.Height();
if ( nImageHeight > nMaxImageSize )
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index 5041500bc89c..c462cc4ef70a 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -47,7 +47,7 @@ void IconView::Resize()
SvTreeListBox::Resize();
}
-tools::Rectangle IconView::GetFocusRect(const SvTreeListEntry*, long nEntryPos)
+tools::Rectangle IconView::GetFocusRect(const SvTreeListEntry*, tools::Long nEntryPos)
{
Size aSize;
aSize.setHeight( nEntryHeight );
@@ -73,7 +73,7 @@ tools::Rectangle IconView::GetFocusRect(const SvTreeListEntry*, long nEntryPos)
return aRect;
}
-void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY,
+void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long nY,
vcl::RenderContext& rRenderContext)
{
diff --git a/vcl/source/treelist/iconviewimpl.cxx b/vcl/source/treelist/iconviewimpl.cxx
index 024ee93fca65..3b2b370ab53d 100644
--- a/vcl/source/treelist/iconviewimpl.cxx
+++ b/vcl/source/treelist/iconviewimpl.cxx
@@ -41,7 +41,7 @@ void IconViewImpl::CursorUp()
return;
m_nFlags &= ~LBoxFlags::Filling;
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
ShowCursor( false );
m_pView->PaintImmediately();
m_pStartEntry = pPrevFirstToDraw;
@@ -103,7 +103,7 @@ void IconViewImpl::PageDown( sal_uInt16 nDelta )
else
{
tools::Rectangle aArea( GetVisibleArea() );
- long nScroll = m_pView->GetEntryHeight() * static_cast<long>(nRealDelta);
+ tools::Long nScroll = m_pView->GetEntryHeight() * static_cast<tools::Long>(nRealDelta);
nScroll = -nScroll;
m_pView->PaintImmediately();
m_pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
@@ -137,7 +137,7 @@ void IconViewImpl::PageUp( sal_uInt16 nDelta )
}
else
{
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
tools::Rectangle aArea( GetVisibleArea() );
m_pView->PaintImmediately();
m_pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
@@ -153,13 +153,13 @@ void IconViewImpl::KeyDown( bool bPageDown )
if( !m_aVerSBar->IsVisible() )
return;
- long nDelta;
+ tools::Long nDelta;
if( bPageDown )
nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = m_aVerSBar->GetThumbPos();
+ tools::Long nThumbPos = m_aVerSBar->GetThumbPos();
if( nDelta <= 0 )
return;
@@ -178,13 +178,13 @@ void IconViewImpl::KeyUp( bool bPageUp )
if( !m_aVerSBar->IsVisible() )
return;
- long nDelta;
+ tools::Long nDelta;
if( bPageUp )
nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = m_aVerSBar->GetThumbPos();
+ tools::Long nThumbPos = m_aVerSBar->GetThumbPos();
if( nThumbPos < nDelta )
nDelta = nThumbPos;
@@ -201,13 +201,13 @@ void IconViewImpl::KeyUp( bool bPageUp )
CursorUp();
}
-long IconViewImpl::GetEntryLine(const SvTreeListEntry* pEntry) const
+tools::Long IconViewImpl::GetEntryLine(const SvTreeListEntry* pEntry) const
{
if(!m_pStartEntry )
return -1; // invisible position
- long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
- long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
+ tools::Long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
+ tools::Long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
nFirstVisPos = nEntryVisPos - nFirstVisPos;
return nFirstVisPos;
@@ -244,21 +244,21 @@ bool IconViewImpl::IsEntryInView( SvTreeListEntry* pEntry ) const
if( !m_pView->IsEntryVisible(pEntry) )
return false;
- long nY = GetEntryLine( pEntry ) / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
+ tools::Long nY = GetEntryLine( pEntry ) / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
if( nY < 0 )
return false;
- long nMax = m_nVisibleCount / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
+ tools::Long nMax = m_nVisibleCount / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
if( nY >= nMax )
return false;
- long nStart = GetEntryLine( pEntry ) - GetEntryLine( m_pStartEntry );
+ tools::Long nStart = GetEntryLine( pEntry ) - GetEntryLine( m_pStartEntry );
return nStart >= 0;
}
void IconViewImpl::AdjustScrollBars( Size& rSize )
{
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
if( !nEntryHeight )
return;
@@ -275,7 +275,7 @@ void IconViewImpl::AdjustScrollBars( Size& rSize )
// number of entries visible within the view
m_nVisibleCount = aOSize.Height() / nEntryHeight * m_pView->GetColumnsCount();
- long nRows = ( nTotalCount / m_pView->GetColumnsCount() ) + 1;
+ tools::Long nRows = ( nTotalCount / m_pView->GetColumnsCount() ) + 1;
// do we need a vertical scrollbar?
if( bVerSBar || nTotalCount > m_nVisibleCount )
@@ -332,7 +332,7 @@ void IconViewImpl::SyncVerThumb()
{
if( m_pStartEntry )
{
- long nEntryPos = m_pView->GetVisiblePos( m_pStartEntry );
+ tools::Long nEntryPos = m_pView->GetVisiblePos( m_pStartEntry );
m_aVerSBar->SetThumbPos( nEntryPos );
}
else
@@ -383,18 +383,18 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
m_pStartEntry = m_pView->First();
}
- long nRectHeight = rRect.GetHeight();
- long nRectWidth = rRect.GetWidth();
- long nEntryHeight = m_pView->GetEntryHeight();
- long nEntryWidth = m_pView->GetEntryWidth();
+ tools::Long nRectHeight = rRect.GetHeight();
+ tools::Long nRectWidth = rRect.GetWidth();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryWidth = m_pView->GetEntryWidth();
// calculate area for the entries we want to draw
sal_uInt16 nStartId = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight * m_pView->GetColumnsCount() + (rRect.Left() / nEntryWidth));
sal_uInt16 nCount = static_cast<sal_uInt16>(( nRectHeight / nEntryHeight + 1 ) * nRectWidth / nEntryWidth);
nCount += 2; // don't miss an entry
- long nY = nStartId / m_pView->GetColumnsCount() * nEntryHeight;
- long nX = 0;
+ tools::Long nY = nStartId / m_pView->GetColumnsCount() * nEntryHeight;
+ tools::Long nX = 0;
SvTreeListEntry* pEntry = m_pStartEntry;
while (nStartId && pEntry)
{
@@ -427,13 +427,13 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
m_nFlags &= ~LBoxFlags::InPaint;
}
-void IconViewImpl::InvalidateEntry( long nId ) const
+void IconViewImpl::InvalidateEntry( tools::Long nId ) const
{
if( m_nFlags & LBoxFlags::InPaint )
return;
tools::Rectangle aRect( GetVisibleArea() );
- long nMaxBottom = aRect.Bottom();
+ tools::Long nMaxBottom = aRect.Bottom();
aRect.SetTop( nId / m_pView->GetColumnsCount() * m_pView->GetEntryHeight() );
aRect.SetBottom( aRect.Top() ); aRect.AdjustBottom(m_pView->GetEntryHeight() );
@@ -467,8 +467,8 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
bool bHandled = true;
- long i;
- long nColumns = m_pView->GetColumnsCount();
+ tools::Long i;
+ tools::Long nColumns = m_pView->GetColumnsCount();
switch( aCode )
{
diff --git a/vcl/source/treelist/iconviewimpl.hxx b/vcl/source/treelist/iconviewimpl.hxx
index efc58795084f..70ec7eece285 100644
--- a/vcl/source/treelist/iconviewimpl.hxx
+++ b/vcl/source/treelist/iconviewimpl.hxx
@@ -49,10 +49,10 @@ public:
bool KeyInput( const KeyEvent& ) override;
- void InvalidateEntry( long nId ) const override;
+ void InvalidateEntry( tools::Long nId ) const override;
protected:
- long GetEntryLine(const SvTreeListEntry* pEntry) const override;
+ tools::Long GetEntryLine(const SvTreeListEntry* pEntry) const override;
void CursorUp() override;
void CursorDown() override;
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 474b8be723a4..afcc6a8f5a49 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -38,8 +38,8 @@
#include <sal/log.hxx>
-#define SCALEPOINT(aPT,aFracX,aFracY) (aPT).setX(long((aPT).X()*aFracX)); \
- (aPT).setY(long((aPT).Y()*aFracY));
+#define SCALEPOINT(aPT,aFracX,aFracY) (aPT).setX(tools::Long((aPT).X()*aFracX)); \
+ (aPT).setY(tools::Long((aPT).Y()*aFracY));
/******************************************************************************/
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index c9d0bef53ce7..c5e46004fb72 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -275,7 +275,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine )
else if ( ( aToken == "circle" ) || ( aToken == "circ" ) )
{
const Point aCenter( ImpReadCERNCoords( &pStr ) );
- const long nRadius = ImpReadCERNRadius( &pStr );
+ const tools::Long nRadius = ImpReadCERNRadius( &pStr );
const OUString aURL( ImpReadCERNURL( &pStr ) );
maList.emplace_back( new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() ) );
@@ -334,7 +334,7 @@ Point ImageMap::ImpReadCERNCoords( const char** ppStr )
return aPt;
}
-long ImageMap::ImpReadCERNRadius( const char** ppStr )
+tools::Long ImageMap::ImpReadCERNRadius( const char** ppStr )
{
OUStringBuffer aStr;
char cChar = *(*ppStr)++;
@@ -412,7 +412,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
const OUString aURL( ImpReadNCSAURL( &pStr ) );
const Point aCenter( ImpReadNCSACoords( &pStr ) );
const Point aDX( aCenter - ImpReadNCSACoords( &pStr ) );
- long nRadius = static_cast<long>(sqrt( static_cast<double>(aDX.X()) * aDX.X() +
+ tools::Long nRadius = static_cast<tools::Long>(sqrt( static_cast<double>(aDX.X()) * aDX.X() +
static_cast<double>(aDX.Y()) * aDX.Y() ));
maList.emplace_back( new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() ) );
@@ -498,7 +498,7 @@ IMapFormat ImageMap::ImpDetectFormat( SvStream& rIStm )
// we check the format
if ( memcmp( cMagic, IMAPMAGIC, sizeof( cMagic ) ) )
{
- long nCount = 128;
+ tools::Long nCount = 128;
rIStm.Seek( nPos );
OString aStr;
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 689bce430dab..9b021d6b2828 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -287,7 +287,7 @@ IMPL_LINK_NOARG(SvImpLBox, EndScrollHdl, ScrollBar*, void)
IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void )
{
DBG_ASSERT(!m_bInVScrollHdl,"Scroll handler out-paces itself!");
- long nDelta = pScrollBar->GetDelta();
+ tools::Long nDelta = pScrollBar->GetDelta();
if( !nDelta )
return;
@@ -350,7 +350,7 @@ void SvImpLBox::CursorUp()
return;
m_nFlags &= ~LBoxFlags::Filling;
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
ShowCursor( false );
m_pView->PaintImmediately();
m_pStartEntry = pPrevFirstToDraw;
@@ -389,7 +389,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta )
else
{
tools::Rectangle aArea( GetVisibleArea() );
- long nScroll = m_pView->GetEntryHeight() * static_cast<long>(nRealDelta);
+ tools::Long nScroll = m_pView->GetEntryHeight() * static_cast<tools::Long>(nRealDelta);
nScroll = -nScroll;
m_pView->PaintImmediately();
m_pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
@@ -424,7 +424,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta )
}
else
{
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
tools::Rectangle aArea( GetVisibleArea() );
m_pView->PaintImmediately();
m_pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
@@ -440,13 +440,13 @@ void SvImpLBox::KeyUp( bool bPageUp )
if( !m_aVerSBar->IsVisible() )
return;
- long nDelta;
+ tools::Long nDelta;
if( bPageUp )
nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = m_aVerSBar->GetThumbPos();
+ tools::Long nThumbPos = m_aVerSBar->GetThumbPos();
if( nThumbPos < nDelta )
nDelta = nThumbPos;
@@ -469,17 +469,17 @@ void SvImpLBox::KeyDown( bool bPageDown )
if( !m_aVerSBar->IsVisible() )
return;
- long nDelta;
+ tools::Long nDelta;
if( bPageDown )
nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = m_aVerSBar->GetThumbPos();
- long nVisibleSize = m_aVerSBar->GetVisibleSize();
- long nRange = m_aVerSBar->GetRange().Len();
+ tools::Long nThumbPos = m_aVerSBar->GetThumbPos();
+ tools::Long nVisibleSize = m_aVerSBar->GetVisibleSize();
+ tools::Long nRange = m_aVerSBar->GetRange().Len();
- long nTmp = nThumbPos+nVisibleSize;
+ tools::Long nTmp = nThumbPos+nVisibleSize;
while( (nDelta > 0) && (nTmp+nDelta) >= nRange )
nDelta--;
@@ -496,7 +496,7 @@ void SvImpLBox::KeyDown( bool bPageDown )
}
-void SvImpLBox::InvalidateEntriesFrom( long nY ) const
+void SvImpLBox::InvalidateEntriesFrom( tools::Long nY ) const
{
if( !(m_nFlags & LBoxFlags::InPaint ))
{
@@ -506,13 +506,13 @@ void SvImpLBox::InvalidateEntriesFrom( long nY ) const
}
}
-void SvImpLBox::InvalidateEntry( long nY ) const
+void SvImpLBox::InvalidateEntry( tools::Long nY ) const
{
if( m_nFlags & LBoxFlags::InPaint )
return;
tools::Rectangle aRect( GetVisibleArea() );
- long nMaxBottom = aRect.Bottom();
+ tools::Long nMaxBottom = aRect.Bottom();
aRect.SetTop( nY );
aRect.SetBottom( nY ); aRect.AdjustBottom(m_pView->GetEntryHeight() );
if( aRect.Top() > nMaxBottom )
@@ -530,7 +530,7 @@ void SvImpLBox::InvalidateEntry( SvTreeListEntry* pEntry )
{
if( GetUpdateMode() )
{
- long nPrev = m_nMostRight;
+ tools::Long nPrev = m_nMostRight;
SetMostRight( pEntry );
if( nPrev < m_nMostRight )
ShowVerSBar();
@@ -555,7 +555,7 @@ void SvImpLBox::RecalcFocusRect()
if( m_pView->HasFocus() && m_pCursor )
{
m_pView->HideFocus();
- long nY = GetEntryLine( m_pCursor );
+ tools::Long nY = GetEntryLine( m_pCursor );
tools::Rectangle aRect = m_pView->GetFocusRect( m_pCursor, nY );
vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
@@ -648,7 +648,7 @@ void SvImpLBox::ShowCursor( bool bShow )
}
else
{
- long nY = GetEntryLine( m_pCursor );
+ tools::Long nY = GetEntryLine( m_pCursor );
tools::Rectangle aRect = m_pView->GetFocusRect( m_pCursor, nY );
vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
@@ -677,7 +677,7 @@ void SvImpLBox::UpdateAll( bool bInvalidateCompleteView )
IMPL_LINK( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar, void )
{
- long nDelta = pScrollBar->GetDelta();
+ tools::Long nDelta = pScrollBar->GetDelta();
if( nDelta )
{
if( m_pView->IsEditingActive() )
@@ -690,7 +690,7 @@ IMPL_LINK( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar, void )
}
}
-void SvImpLBox::KeyLeftRight( long nDelta )
+void SvImpLBox::KeyLeftRight( tools::Long nDelta )
{
if( !(m_nFlags & LBoxFlags::InResize) )
m_pView->PaintImmediately();
@@ -698,7 +698,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
ShowCursor( false );
// calculate new origin
- long nPos = m_aHorSBar->GetThumbPos();
+ tools::Long nPos = m_aHorSBar->GetThumbPos();
Point aOrigin( -nPos, 0 );
MapMode aMapMode( m_pView->GetMapMode() );
@@ -741,7 +741,7 @@ SvTreeListEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
// checks if the entry was hit "the right way"
// (Focusrect+ ContextBitmap at TreeListBox)
-bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel, long nLine)
+bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel, tools::Long nLine)
{
bool bRet;
// we are not too exact when it comes to "special" entries
@@ -784,9 +784,9 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint)
{
if( !m_pCursor )
return nullptr;
- long nY = rPoint.Y();
+ tools::Long nY = rPoint.Y();
SvTreeListEntry* pEntry = nullptr;
- long nMax = m_aOutputSize.Height();
+ tools::Long nMax = m_aOutputSize.Height();
if( nY < 0 || nY >= nMax ) // aOutputSize.Height() )
{
if( nY < 0 )
@@ -863,15 +863,15 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
if (m_nNodeBmpTabDistance == NODE_BMP_TABDIST_NOTVALID)
SetNodeBmpTabDistance();
- long nRectHeight = rRect.GetHeight();
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nRectHeight = rRect.GetHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
// calculate area for the entries we want to draw
sal_uInt16 nStartLine = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight);
sal_uInt16 nCount = static_cast<sal_uInt16>(nRectHeight / nEntryHeight);
nCount += 2; // don't miss a row
- long nY = nStartLine * nEntryHeight;
+ tools::Long nY = nStartLine * nEntryHeight;
SvTreeListEntry* pEntry = m_pStartEntry;
while (nStartLine && pEntry)
{
@@ -943,16 +943,16 @@ void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop )
m_pStartEntry = pEntry;
ShowCursor( false );
FillView();
- m_aVerSBar->SetThumbPos( static_cast<long>(m_pView->GetVisiblePos( m_pStartEntry )) );
+ m_aVerSBar->SetThumbPos( static_cast<tools::Long>(m_pView->GetVisiblePos( m_pStartEntry )) );
ShowCursor( true );
m_pView->Invalidate();
}
-void SvImpLBox::ScrollToAbsPos( long nPos )
+void SvImpLBox::ScrollToAbsPos( tools::Long nPos )
{
if( m_pView->GetVisibleCount() == 0 )
return;
- long nLastEntryPos = m_pView->GetAbsPos( m_pView->Last() );
+ tools::Long nLastEntryPos = m_pView->GetAbsPos( m_pView->Last() );
if( nPos < 0 )
nPos = 0;
@@ -997,8 +997,8 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
}
}
- long nEntryHeight = m_pView->GetEntryHeight();
- long nEntryHeightDIV2 = nEntryHeight / 2;
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeightDIV2 = nEntryHeight / 2;
if( nEntryHeightDIV2 && !(nEntryHeight & 0x0001))
nEntryHeightDIV2--;
@@ -1011,7 +1011,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
pEntry = m_pView->GetParent(pEntry);
}
sal_uInt16 nOffs = static_cast<sal_uInt16>(m_pView->GetVisiblePos(m_pStartEntry) - m_pView->GetVisiblePos(pEntry));
- long nY = 0;
+ tools::Long nY = 0;
nY -= (nOffs * nEntryHeight);
DBG_ASSERT(pFirstDynamicTab,"No Tree!");
@@ -1096,7 +1096,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
{
- long nOverlap = 0;
+ tools::Long nOverlap = 0;
Size aVerSize( m_nVerSBarWidth, rSize.Height() );
Size aHorSize( rSize.Width(), m_nHorSBarHeight );
@@ -1128,7 +1128,7 @@ void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
void SvImpLBox::AdjustScrollBars( Size& rSize )
{
- long nEntryHeight = m_pView->GetEntryHeight();
+ tools::Long nEntryHeight = m_pView->GetEntryHeight();
if( !nEntryHeight )
return;
@@ -1139,11 +1139,11 @@ void SvImpLBox::AdjustScrollBars( Size& rSize )
const WinBits nWindowStyle = m_pView->GetStyle();
bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
bool bHorBar = false;
- long nMaxRight = aOSize.Width(); //GetOutputSize().Width();
+ tools::Long nMaxRight = aOSize.Width(); //GetOutputSize().Width();
Point aOrigin( m_pView->GetMapMode().GetOrigin() );
aOrigin.setX( aOrigin.X() * -1 );
nMaxRight += aOrigin.X() - 1;
- long nVis = m_nMostRight - aOrigin.X();
+ tools::Long nVis = m_nMostRight - aOrigin.X();
if( (nWindowStyle & (WB_AUTOHSCROLL|WB_HSCROLL)) &&
(nVis < m_nMostRight || nMaxRight < m_nMostRight) )
{
@@ -1194,7 +1194,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize )
m_aSelEng.SetVisibleArea( aRect );
// vertical scrollbar
- long nTemp = static_cast<long>(m_nVisibleCount);
+ tools::Long nTemp = static_cast<tools::Long>(m_nVisibleCount);
nTemp--;
if( nTemp != m_aVerSBar->GetVisibleSize() )
{
@@ -1213,7 +1213,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize )
// horizontal scrollbar
nTemp = m_aHorSBar->GetThumbPos();
m_aHorSBar->SetVisibleSize( aOSize.Width() );
- long nNewThumbPos = m_aHorSBar->GetThumbPos();
+ tools::Long nNewThumbPos = m_aHorSBar->GetThumbPos();
Range aRange( m_aHorSBar->GetRange() );
if( aRange.Max() < m_nMostRight+25 )
{
@@ -1281,7 +1281,7 @@ void SvImpLBox::FillView()
if( !m_pStartEntry )
{
sal_uLong nVisibleViewCount = m_pView->GetVisibleCount();
- long nTempThumb = m_aVerSBar->GetThumbPos();
+ tools::Long nTempThumb = m_aVerSBar->GetThumbPos();
if( nTempThumb < 0 )
nTempThumb = 0;
else if( o3tl::make_unsigned(nTempThumb) >= nVisibleViewCount )
@@ -1346,7 +1346,7 @@ void SvImpLBox::ShowVerSBar()
}
}
- long nMaxRight = GetOutputSize().Width();
+ tools::Long nMaxRight = GetOutputSize().Width();
Point aPos( m_pView->GetMapMode().GetOrigin() );
aPos.setX( aPos.X() * -1 ); // convert document coordinates
nMaxRight = nMaxRight + aPos.X() - 1;
@@ -1389,7 +1389,7 @@ void SvImpLBox::SyncVerThumb()
{
if( m_pStartEntry )
{
- long nEntryPos = m_pView->GetVisiblePos( m_pStartEntry );
+ tools::Long nEntryPos = m_pView->GetVisiblePos( m_pStartEntry );
m_aVerSBar->SetThumbPos( nEntryPos );
}
else
@@ -1401,21 +1401,21 @@ bool SvImpLBox::IsEntryInView( SvTreeListEntry* pEntry ) const
// parent collapsed
if( !m_pView->IsEntryVisible(pEntry) )
return false;
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
if( nY < 0 )
return false;
- long nMax = m_nVisibleCount * m_pView->GetEntryHeight();
+ tools::Long nMax = m_nVisibleCount * m_pView->GetEntryHeight();
return nY < nMax;
}
-long SvImpLBox::GetEntryLine(const SvTreeListEntry* pEntry) const
+tools::Long SvImpLBox::GetEntryLine(const SvTreeListEntry* pEntry) const
{
if(!m_pStartEntry )
return -1; // invisible position
- long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
- long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
+ tools::Long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
+ tools::Long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
nFirstVisPos = nEntryVisPos - nFirstVisPos;
nFirstVisPos *= m_pView->GetEntryHeight();
return nFirstVisPos;
@@ -1450,7 +1450,7 @@ void SvImpLBox::EntryExpanded( SvTreeListEntry* pEntry )
return;
ShowCursor( false );
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
if( IsLineVisible(nY) )
{
InvalidateEntriesFrom( nY );
@@ -1478,10 +1478,10 @@ void SvImpLBox::EntryCollapsed( SvTreeListEntry* pEntry )
if( m_pStartEntry )
{
- long nOldThumbPos = m_aVerSBar->GetThumbPos();
+ tools::Long nOldThumbPos = m_aVerSBar->GetThumbPos();
sal_uLong nVisList = m_pView->GetVisibleCount();
m_aVerSBar->SetRange( Range(0, nVisList-1) );
- long nNewThumbPos = m_aVerSBar->GetThumbPos();
+ tools::Long nNewThumbPos = m_aVerSBar->GetThumbPos();
if( nNewThumbPos != nOldThumbPos )
{
m_pStartEntry = m_pView->First();
@@ -1513,7 +1513,7 @@ void SvImpLBox::CollapsingEntry( SvTreeListEntry* pEntry )
SelAllDestrAnch( false ); // deselect all
// is the collapsed cursor visible?
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
if( IsLineVisible(nY) )
{
if( GetUpdateMode() )
@@ -1567,7 +1567,7 @@ void SvImpLBox::EntrySelected( SvTreeListEntry* pEntry, bool bSelect )
if( GetUpdateMode() && m_pView->IsEntryVisible(pEntry) )
{
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
if( IsLineVisible( nY ) )
{
ShowCursor(false);
@@ -1781,7 +1781,7 @@ void SvImpLBox::EntryInserted( SvTreeListEntry* pEntry )
DestroyAnchor();
// nFlags &= (~LBoxFlags::DeselectAll);
// ShowCursor( false ); // if cursor is moved lower
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
bool bEntryVisible = IsLineVisible( nY );
if( bEntryVisible )
{
@@ -1847,7 +1847,7 @@ bool SvImpLBox::MouseMoveCheckCtrl(const MouseEvent& rMEvt, SvTreeListEntry cons
{
if( m_pActiveButton )
{
- long nMouseX = rMEvt.GetPosPixel().X();
+ tools::Long nMouseX = rMEvt.GetPosPixel().X();
if( pEntry == m_pActiveEntry &&
m_pView->GetItem(m_pActiveEntry, nMouseX) == m_pActiveButton )
{
@@ -1877,7 +1877,7 @@ bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
m_pView->ReleaseMouse();
SvTreeListEntry* pEntry = GetClickedEntry( rMEvt.GetPosPixel() );
m_pActiveButton->SetStateHilighted( false );
- long nMouseX = rMEvt.GetPosPixel().X();
+ tools::Long nMouseX = rMEvt.GetPosPixel().X();
if (pEntry == m_pActiveEntry && m_pView->GetItem(m_pActiveEntry, nMouseX) == m_pActiveButton)
m_pActiveButton->ClickHdl(m_pActiveEntry);
InvalidateEntry(m_pActiveEntry);
@@ -1903,12 +1903,12 @@ bool SvImpLBox::IsNodeButton( const Point& rPosPixel, const SvTreeListEntry* pEn
if( !pFirstDynamicTab )
return false;
- long nMouseX = rPosPixel.X();
+ tools::Long nMouseX = rPosPixel.X();
// convert to document coordinates
Point aOrigin( m_pView->GetMapMode().GetOrigin() );
nMouseX -= aOrigin.X();
- long nX = m_pView->GetTabPos( pEntry, pFirstDynamicTab);
+ tools::Long nX = m_pView->GetTabPos( pEntry, pFirstDynamicTab);
nX += m_nNodeBmpTabDistance;
if( nMouseX < nX )
return false;
@@ -1963,7 +1963,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
if( !pEntry || !m_pView->GetViewData( pEntry ))
return;
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
// Node-Button?
if( ButtonDownCheckExpand( rMEvt, pEntry ) )
return;
@@ -2210,9 +2210,9 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
else if (m_aHorSBar->IsVisible())
{
- long nThumb = m_aHorSBar->GetThumbPos();
+ tools::Long nThumb = m_aHorSBar->GetThumbPos();
nThumb += m_aHorSBar->GetLineSize();
- long nOldThumb = m_aHorSBar->GetThumbPos();
+ tools::Long nOldThumb = m_aHorSBar->GetThumbPos();
m_aHorSBar->SetThumbPos( nThumb );
nThumb = nOldThumb;
nThumb -= m_aHorSBar->GetThumbPos();
@@ -2231,9 +2231,9 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{
if (m_aHorSBar->IsVisible())
{
- long nThumb = m_aHorSBar->GetThumbPos();
+ tools::Long nThumb = m_aHorSBar->GetThumbPos();
nThumb -= m_aHorSBar->GetLineSize();
- long nOldThumb = m_aHorSBar->GetThumbPos();
+ tools::Long nOldThumb = m_aHorSBar->GetThumbPos();
m_aHorSBar->SetThumbPos( nThumb );
nThumb = nOldThumb;
nThumb -= m_aHorSBar->GetThumbPos();
@@ -2772,7 +2772,7 @@ void SvImpLBox::SelAllDestrAnch(
{
if( bUpdate && m_pView->IsEntryVisible(pEntry) )
{
- long nY = GetEntryLine( pEntry );
+ tools::Long nY = GetEntryLine( pEntry );
if( IsLineVisible( nY ) )
InvalidateEntry(pEntry);
}
@@ -3009,19 +3009,19 @@ bool SvImpLBox::SetMostRight( SvTreeListEntry* pEntry )
SvLBoxTab* pTab = m_pView->aTabs[ nLastTab ].get();
SvLBoxItem& rItem = pEntry->GetItem( nLastTab );
- long nTabPos = m_pView->GetTabPos( pEntry, pTab );
+ tools::Long nTabPos = m_pView->GetTabPos( pEntry, pTab );
- long nMaxRight = GetOutputSize().Width();
+ tools::Long nMaxRight = GetOutputSize().Width();
Point aPos( m_pView->GetMapMode().GetOrigin() );
aPos.setX( aPos.X() * -1 ); // conversion document coordinates
nMaxRight = nMaxRight + aPos.X() - 1;
- long nNextTab = nTabPos < nMaxRight ? nMaxRight : nMaxRight + 50;
- long nTabWidth = nNextTab - nTabPos + 1;
+ tools::Long nNextTab = nTabPos < nMaxRight ? nMaxRight : nMaxRight + 50;
+ tools::Long nTabWidth = nNextTab - nTabPos + 1;
auto nItemSize = rItem.GetWidth(m_pView,pEntry);
- long nOffset = pTab->CalcOffset( nItemSize, nTabWidth );
+ tools::Long nOffset = pTab->CalcOffset( nItemSize, nTabWidth );
- long nRight = nTabPos + nOffset + nItemSize;
+ tools::Long nRight = nTabPos + nOffset + nItemSize;
if( nRight > m_nMostRight )
{
m_nMostRight = nRight;
diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx
index a98814bb5de9..aaf9124765aa 100644
--- a/vcl/source/treelist/svlbitm.cxx
+++ b/vcl/source/treelist/svlbitm.cxx
@@ -535,14 +535,14 @@ std::unique_ptr<SvLBoxItem> SvLBoxContextBmp::Clone(SvLBoxItem const * pSource)
return std::unique_ptr<SvLBoxItem>(pNew.release());
}
-long SvLBoxButtonData::Width()
+tools::Long SvLBoxButtonData::Width()
{
if ( !bDataOk )
SetWidthAndHeight();
return nWidth;
}
-long SvLBoxButtonData::Height()
+tools::Long SvLBoxButtonData::Height()
{
if ( !bDataOk )
SetWidthAndHeight();
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 2f866dc0c377..ae05b541bc40 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -109,7 +109,7 @@ void SvTabListBox::dispose()
SvTreeListBox::dispose();
}
-void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit eMapUnit)
+void SvTabListBox::SetTabs(sal_uInt16 nTabs, tools::Long const pTabPositions[], MapUnit eMapUnit)
{
mvTabList.resize(nTabs);
@@ -120,7 +120,7 @@ void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit
{
Size aSize( *pTabPositions, 0 );
aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
- long nNewTab = aSize.Width();
+ tools::Long nNewTab = aSize.Width();
mvTabList[nIdx].SetPos( nNewTab );
mvTabList[nIdx].nFlags &= MYTABMASK;
}
@@ -389,7 +389,7 @@ void SvTabListBox::SetTabEditable(sal_uInt16 nTab, bool bEditable)
rTab.nFlags &= ~SvLBoxTabFlags::EDITABLE;
}
-long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
+tools::Long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
if( SvTreeListBox::nTreeFlags & SvTreeFlags::RECALCTABS )
SetTabs();
@@ -533,7 +533,7 @@ void SvHeaderTabListBox::RecalculateAccessibleChildren()
}
}
-bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriState& _rState )
+bool SvHeaderTabListBox::IsCellCheckBox( tools::Long _nRow, sal_uInt16 _nColumn, TriState& _rState )
{
bool bRet = false;
SvTreeListEntry* pEntry = GetEntry( _nRow );
@@ -557,7 +557,7 @@ bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriSta
}
return bRet;
}
-long SvHeaderTabListBox::GetRowCount() const
+tools::Long SvHeaderTabListBox::GetRowCount() const
{
return GetEntryCount();
}
@@ -622,7 +622,7 @@ void SvHeaderTabListBox::SelectAll()
SvTreeListBox::SelectAll(true);
}
-void SvHeaderTabListBox::SelectRow( long _nRow, bool _bSelect, bool )
+void SvHeaderTabListBox::SelectRow( tools::Long _nRow, bool _bSelect, bool )
{
Select( GetEntry( _nRow ), _bSelect );
}
@@ -641,13 +641,13 @@ sal_Int32 SvHeaderTabListBox::GetSelectedColumnCount() const
return 0;
}
-bool SvHeaderTabListBox::IsRowSelected( long _nRow ) const
+bool SvHeaderTabListBox::IsRowSelected( tools::Long _nRow ) const
{
SvTreeListEntry* pEntry = GetEntry( _nRow );
return ( pEntry && IsSelected( pEntry ) );
}
-bool SvHeaderTabListBox::IsColumnSelected( long ) const
+bool SvHeaderTabListBox::IsColumnSelected( tools::Long ) const
{
return false;
}
@@ -665,7 +665,7 @@ bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
return true;
}
-OUString SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const
+OUString SvHeaderTabListBox::GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const
{
return GetTabEntryText(_nRow, _nColumnPos);
}
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index dc0d99009fda..e314329c10b8 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -1437,9 +1437,9 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry const * pEntry, SvTreeListEntr
if (rChildList.empty())
return;
- long i = 0;
- long j = rChildList.size()-1;
- long k;
+ tools::Long i = 0;
+ tools::Long j = rChildList.size()-1;
+ tools::Long k;
sal_Int32 nCompare = 1;
do
@@ -1462,7 +1462,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry const * pEntry, SvTreeListEntr
if( nCompare != 0 )
{
- if (i > static_cast<long>(rChildList.size()-1)) // not found, end of list
+ if (i > static_cast<tools::Long>(rChildList.size()-1)) // not found, end of list
rPos = TREELIST_ENTRY_NOTFOUND;
else
rPos = i; // not found, middle of list
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 52243ccf95e6..7240215049b9 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -276,7 +276,7 @@ SvLBoxTab::SvLBoxTab()
nFlags = SvLBoxTabFlags::NONE;
}
-SvLBoxTab::SvLBoxTab( long nPosition, SvLBoxTabFlags nTabFlags )
+SvLBoxTab::SvLBoxTab( tools::Long nPosition, SvLBoxTabFlags nTabFlags )
{
nPos = nPosition;
nFlags = nTabFlags;
@@ -293,9 +293,9 @@ SvLBoxTab::~SvLBoxTab()
}
-long SvLBoxTab::CalcOffset( long nItemWidth, long nTabWidth )
+tools::Long SvLBoxTab::CalcOffset( tools::Long nItemWidth, tools::Long nTabWidth )
{
- long nOffset = 0;
+ tools::Long nOffset = 0;
if ( nFlags & SvLBoxTabFlags::ADJUST_RIGHT )
{
nOffset = nTabWidth - nItemWidth;
@@ -1407,18 +1407,18 @@ void SvTreeListBox::SetTabs()
bool bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
bool bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
- long nStartPos = TAB_STARTPOS;
- long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
+ tools::Long nStartPos = TAB_STARTPOS;
+ tools::Long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
// pCheckButtonData->Width() knows nothing about the native checkbox width,
// so we have mnCheckboxItemWidth which becomes valid when something is added.
- long nCheckWidth = 0;
+ tools::Long nCheckWidth = 0;
if( nTreeFlags & SvTreeFlags::CHKBTN )
nCheckWidth = mnCheckboxItemWidth;
- long nCheckWidthDIV2 = nCheckWidth / 2;
+ tools::Long nCheckWidthDIV2 = nCheckWidth / 2;
- long nContextWidth = nContextBmpWidthMax;
- long nContextWidthDIV2 = nContextWidth / 2;
+ tools::Long nContextWidth = nContextBmpWidthMax;
+ tools::Long nContextWidthDIV2 = nContextWidth / 2;
ClearTabList();
@@ -1960,15 +1960,15 @@ void SvTreeListBox::ScrollOutputArea( short nDeltaEntries )
if( !nDeltaEntries || !pImpl->m_aVerSBar->IsVisible() )
return;
- long nThumb = pImpl->m_aVerSBar->GetThumbPos();
- long nMax = pImpl->m_aVerSBar->GetRange().Max();
+ tools::Long nThumb = pImpl->m_aVerSBar->GetThumbPos();
+ tools::Long nMax = pImpl->m_aVerSBar->GetRange().Max();
if( nDeltaEntries < 0 )
{
// move window up
nDeltaEntries *= -1;
- long nVis = pImpl->m_aVerSBar->GetVisibleSize();
- long nTemp = nThumb + nVis;
+ tools::Long nVis = pImpl->m_aVerSBar->GetVisibleSize();
+ tools::Long nTemp = nThumb + nVis;
if( nDeltaEntries > (nMax - nTemp) )
nDeltaEntries = static_cast<short>(nMax - nTemp);
pImpl->PageDown( static_cast<sal_uInt16>(nDeltaEntries) );
@@ -1982,7 +1982,7 @@ void SvTreeListBox::ScrollOutputArea( short nDeltaEntries )
pImpl->SyncVerThumb();
}
-void SvTreeListBox::ScrollToAbsPos( long nPos )
+void SvTreeListBox::ScrollToAbsPos( tools::Long nPos )
{
pImpl->ScrollToAbsPos( nPos );
}
@@ -2271,7 +2271,7 @@ void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
if (HasFocus())
{
- long nHeight = rRenderContext.GetTextHeight();
+ tools::Long nHeight = rRenderContext.GetTextHeight();
tools::Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight));
ShowFocus(aRect);
}
@@ -2398,7 +2398,7 @@ void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, SvLBoxString* pItem, c
Point aPos = GetEntryPosition( pEntry );
aPos.AdjustY(( nEntryHeight - nItemHeight ) / 2 );
aPos.setX( GetTabPos( pEntry, pTab ) );
- long nOutputWidth = pImpl->GetOutputSize().Width();
+ tools::Long nOutputWidth = pImpl->GetOutputSize().Width();
Size aSize( nOutputWidth - aPos.X(), nItemHeight );
sal_uInt16 nPos = std::find_if( aTabs.begin(), aTabs.end(),
[pTab](const std::unique_ptr<SvLBoxTab>& p) { return p.get() == pTab; })
@@ -2406,7 +2406,7 @@ void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, SvLBoxString* pItem, c
if( nPos+1 < static_cast<sal_uInt16>(aTabs.size()) )
{
SvLBoxTab* pRightTab = aTabs[ nPos + 1 ].get();
- long nRight = GetTabPos( pEntry, pRightTab );
+ tools::Long nRight = GetTabPos( pEntry, pRightTab );
if( nRight <= nOutputWidth )
aSize.setWidth( nRight - aPos.X() );
}
@@ -2432,12 +2432,12 @@ void SvTreeListBox::ImplEditEntry( SvTreeListEntry* pEntry )
if( !pEntry )
return;
- long nClickX = pImpl->m_aEditClickPos.X();
+ tools::Long nClickX = pImpl->m_aEditClickPos.X();
bool bIsMouseTriggered = nClickX >= 0;
SvLBoxString* pItem = nullptr;
sal_uInt16 nCount = pEntry->ItemCount();
- long nTabPos, nNextTabPos = 0;
+ tools::Long nTabPos, nNextTabPos = 0;
for( sal_uInt16 i = 0 ; i < nCount ; i++ )
{
SvLBoxItem& rTmpItem = pEntry->GetItem( i );
@@ -2525,7 +2525,7 @@ SvTreeListEntry* SvTreeListBox::GetEntry( const Point& rPos, bool bHit ) const
SvTreeListEntry* pEntry = pImpl->GetEntry( rPos );
if( pEntry && bHit )
{
- long nLine = pImpl->GetEntryLine( pEntry );
+ tools::Long nLine = pImpl->GetEntryLine( pEntry );
if( !(pImpl->EntryReallyHit( pEntry, rPos, nLine)) )
return nullptr;
}
@@ -2566,7 +2566,7 @@ void SvTreeListBox::InvalidateEntry(SvTreeListEntry* pEntry)
}
}
-void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::RenderContext& rRenderContext)
+void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl::RenderContext& rRenderContext)
{
tools::Rectangle aRect; // multi purpose
@@ -2578,7 +2578,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
SetTabs();
short nTempEntryHeight = GetEntryHeight();
- long nWidth = pImpl->GetOutputSize().Width();
+ tools::Long nWidth = pImpl->GetOutputSize().Width();
// Did we turn on the scrollbar within PreparePaints? If yes, we have to set
// the ClipRegion anew.
@@ -2587,7 +2587,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
Point aEntryPos(rRenderContext.GetMapMode().GetOrigin());
aEntryPos.setX( aEntryPos.X() * -1 ); // conversion document coordinates
- long nMaxRight = nWidth + aEntryPos.X() - 1;
+ tools::Long nMaxRight = nWidth + aEntryPos.X() - 1;
Color aBackupTextColor(rRenderContext.GetTextColor());
vcl::Font aBackupFont(rRenderContext.GetFont());
@@ -2622,9 +2622,9 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
SvLBoxTabFlags nFlags = pTab->nFlags;
Size aSize(rItem.GetWidth(this, pViewDataEntry, nCurItem),
SvLBoxItem::GetHeight(pViewDataEntry, nCurItem));
- long nTabPos = GetTabPos(&rEntry, pTab);
+ tools::Long nTabPos = GetTabPos(&rEntry, pTab);
- long nNextTabPos;
+ tools::Long nNextTabPos;
if (pNextTab)
nNextTabPos = GetTabPos(&rEntry, pNextTab);
else
@@ -2634,7 +2634,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
nNextTabPos += 50;
}
- long nX;
+ tools::Long nX;
if( pTab->nFlags & SvLBoxTabFlags::ADJUST_RIGHT )
// avoid cutting the right edge off the tab separation
nX = nTabPos + pTab->CalcOffset(aSize.Width(), (nNextTabPos - SV_TAB_BORDER - 1) - nTabPos);
@@ -2707,7 +2707,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
aRect.SetBottom( nLine + nTempEntryHeight - 1 );
if (pNextTab)
{
- long nRight;
+ tools::Long nRight;
nRight = GetTabPos(&rEntry, pNextTab) - 1;
if (nRight > nMaxRight)
nRight = nMaxRight;
@@ -2770,7 +2770,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render
sal_uInt16 nFirstDynTabPos(0);
SvLBoxTab* pFirstDynamicTab = GetFirstDynamicTab(nFirstDynTabPos);
- long nDynTabPos = GetTabPos(&rEntry, pFirstDynamicTab);
+ tools::Long nDynTabPos = GetTabPos(&rEntry, pFirstDynamicTab);
nDynTabPos += pImpl->m_nNodeBmpTabDistance;
nDynTabPos += pImpl->m_nNodeBmpWidth / 2;
nDynTabPos += 4; // 4 pixels of buffer, so the node bitmap is not too close
@@ -2868,7 +2868,7 @@ Size SvTreeListBox::MeasureCustomEntry(vcl::RenderContext& rRenderContext, const
return aCustomMeasureHdl.Call(std::pair<vcl::RenderContext&, const SvTreeListEntry&>(rRenderContext, rEntry));
}
-tools::Rectangle SvTreeListBox::GetFocusRect(const SvTreeListEntry* pEntry, long nLine )
+tools::Rectangle SvTreeListBox::GetFocusRect(const SvTreeListEntry* pEntry, tools::Long nLine )
{
pImpl->UpdateContextBmpWidthMax( pEntry );
@@ -2877,15 +2877,15 @@ tools::Rectangle SvTreeListBox::GetFocusRect(const SvTreeListEntry* pEntry, long
aRect.SetTop( nLine );
aSize.setHeight( GetEntryHeight() );
- long nRealWidth = pImpl->GetOutputSize().Width();
+ tools::Long nRealWidth = pImpl->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
sal_uInt16 nCurTab;
SvLBoxTab* pTab = GetFirstTab( SvLBoxTabFlags::SHOW_SELECTION, nCurTab );
- long nTabPos = 0;
+ tools::Long nTabPos = 0;
if( pTab )
nTabPos = GetTabPos( pEntry, pTab );
- long nNextTabPos;
+ tools::Long nNextTabPos;
if( pTab && nCurTab < aTabs.size() - 1 )
{
SvLBoxTab* pNextTab = aTabs[ nCurTab + 1 ].get();
@@ -2907,7 +2907,7 @@ tools::Rectangle SvTreeListBox::GetFocusRect(const SvTreeListEntry* pEntry, long
aSize.setWidth(rItem.GetWidth(this, pEntry));
if( !aSize.Width() )
aSize.setWidth( 15 );
- long nX = nTabPos; //GetTabPos( pEntry, pTab );
+ tools::Long nX = nTabPos; //GetTabPos( pEntry, pTab );
// alignment
nX += pTab->CalcOffset( aSize.Width(), nNextTabPos - nTabPos );
aRect.SetLeft( nX );
@@ -2977,7 +2977,7 @@ sal_IntPtr SvTreeListBox::GetTabPos(const SvTreeListEntry* pEntry, const SvLBoxT
return nPos + (pEntry->GetExtraIndent() * nIndent);
}
-SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX,
+SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, tools::Long nX,
SvLBoxTab** ppTab )
{
SvLBoxItem* pItemClicked = nullptr;
@@ -2987,15 +2987,15 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX,
SvLBoxItem* pItem = &pEntry->GetItem(0);
sal_uInt16 nNextItem = 1;
nX -= GetMapMode().GetOrigin().X();
- long nRealWidth = pImpl->GetOutputSize().Width();
+ tools::Long nRealWidth = pImpl->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
while( true )
{
SvLBoxTab* pNextTab=nNextItem<nTabCount ? aTabs[nNextItem].get() : nullptr;
- long nStart = GetTabPos( pEntry, pTab );
+ tools::Long nStart = GetTabPos( pEntry, pTab );
- long nNextTabPos;
+ tools::Long nNextTabPos;
if( pNextTab )
nNextTabPos = GetTabPos( pEntry, pNextTab );
else
@@ -3010,7 +3010,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX,
auto nLen = nItemWidth;
if( pNextTab )
{
- long nTabWidth = GetTabPos( pEntry, pNextTab ) - nStart;
+ tools::Long nTabWidth = GetTabPos( pEntry, pNextTab ) - nStart;
if( nTabWidth < nLen )
nLen = nTabWidth;
}
@@ -3033,9 +3033,9 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX,
return pItemClicked;
}
-long SvTreeListBox::getPreferredDimensions(std::vector<long> &rWidths) const
+tools::Long SvTreeListBox::getPreferredDimensions(std::vector<long> &rWidths) const
{
- long nHeight = 0;
+ tools::Long nHeight = 0;
rWidths.clear();
SvTreeListEntry* pEntry = First();
while (pEntry)
@@ -3066,14 +3066,14 @@ Size SvTreeListBox::GetOptimalSize() const
{
std::vector<long> aWidths;
Size aRet(0, getPreferredDimensions(aWidths));
- for (long aWidth : aWidths)
+ for (tools::Long aWidth : aWidths)
aRet.AdjustWidth(aWidth );
if (GetStyle() & WB_BORDER)
{
aRet.AdjustWidth(StyleSettings::GetBorderSize() * 2 );
aRet.AdjustHeight(StyleSettings::GetBorderSize() * 2 );
}
- long nMinWidth = nMinWidthInChars * approximate_char_width();
+ tools::Long nMinWidth = nMinWidthInChars * approximate_char_width();
aRet.setWidth( std::max(aRet.Width(), nMinWidth) );
if (GetStyle() & WB_VSCROLL)
@@ -3121,18 +3121,18 @@ void SvTreeListBox::SetForceMakeVisible( bool bEnable )
pImpl->SetForceMakeVisible(bEnable);
}
-SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX,SvLBoxTab** ppTab)
+SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,tools::Long nX,SvLBoxTab** ppTab)
{
return GetItem_Impl( pEntry, nX, ppTab );
}
-SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX )
+SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,tools::Long nX )
{
SvLBoxTab* pDummyTab;
return GetItem_Impl( pEntry, nX, &pDummyTab );
}
-void SvTreeListBox::AddTab(long nTabPos, SvLBoxTabFlags nFlags )
+void SvTreeListBox::AddTab(tools::Long nTabPos, SvLBoxTabFlags nFlags )
{
nFocusWidth = -1;
SvLBoxTab* pTab = new SvLBoxTab( nTabPos, nFlags );
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 66211612adc0..83c4727218d0 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -748,8 +748,8 @@ void EditUIObject::execute(const OUString& rAction,
if (rParameters.find("FROM") != rParameters.end() &&
rParameters.find("TO") != rParameters.end())
{
- long nMin = rParameters.find("FROM")->second.toInt32();
- long nMax = rParameters.find("TO")->second.toInt32();
+ tools::Long nMin = rParameters.find("FROM")->second.toInt32();
+ tools::Long nMax = rParameters.find("TO")->second.toInt32();
Selection aSelection(nMin, nMax);
mxEdit->SetSelection(aSelection);
}
@@ -784,8 +784,8 @@ OUString EditUIObject::get_action(VclEventId nEvent) const
if (nEvent == VclEventId::EditSelectionChanged)
{
const Selection& rSelection = mxEdit->GetSelection();
- long nMin = rSelection.Min();
- long nMax = rSelection.Max();
+ tools::Long nMin = rSelection.Min();
+ tools::Long nMax = rSelection.Max();
if(get_top_parent(mxEdit)->get_id().isEmpty()){
//This part because if we don't have parent
return "Select in '" +
@@ -841,8 +841,8 @@ void MultiLineEditUIObject::execute(const OUString& rAction,
if (rParameters.find("FROM") != rParameters.end() &&
rParameters.find("TO") != rParameters.end())
{
- long nMin = rParameters.find("FROM")->second.toInt32();
- long nMax = rParameters.find("TO")->second.toInt32();
+ tools::Long nMin = rParameters.find("FROM")->second.toInt32();
+ tools::Long nMax = rParameters.find("TO")->second.toInt32();
Selection aSelection(nMin, nMax);
mxEdit->SetSelection(aSelection);
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index a6af6748ff50..66c63af65370 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -51,8 +51,8 @@ void Window::ImplCalcSymbolRect( tools::Rectangle& rRect )
rRect.AdjustBottom( 1 );
// we leave 5% room between the symbol and the button border
- long nExtraWidth = ((rRect.GetWidth()*50)+500)/1000;
- long nExtraHeight = ((rRect.GetHeight()*50)+500)/1000;
+ tools::Long nExtraWidth = ((rRect.GetWidth()*50)+500)/1000;
+ tools::Long nExtraHeight = ((rRect.GetHeight()*50)+500)/1000;
rRect.AdjustLeft(nExtraWidth );
rRect.AdjustRight( -nExtraWidth );
rRect.AdjustTop(nExtraHeight );
@@ -164,7 +164,7 @@ void ImplBorderWindowView::ImplInitTitle(ImplBorderFrameData* pData)
pBorderWindow->SetPointFont(*pBorderWindow, rStyleSettings.GetTitleFont());
pData->mnTitleHeight = rStyleSettings.GetTitleHeight();
}
- long nTextHeight = pBorderWindow->GetTextHeight();
+ tools::Long nTextHeight = pBorderWindow->GetTextHeight();
if (nTextHeight > pData->mnTitleHeight)
pData->mnTitleHeight = nTextHeight;
}
@@ -196,7 +196,7 @@ BorderWindowHitTest ImplBorderWindowView::ImplHitTest( ImplBorderFrameData const
if ( (pBorderWindow->GetStyle() & WB_SIZEABLE) &&
!pBorderWindow->mbRollUp )
{
- long nSizeWidth = pData->mnNoTitleTop+pData->mnTitleHeight;
+ tools::Long nSizeWidth = pData->mnNoTitleTop+pData->mnTitleHeight;
if ( nSizeWidth < 16 )
nSizeWidth = 16;
@@ -345,14 +345,14 @@ OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData const * pDat
return aHelpStr;
}
-long ImplBorderWindowView::ImplCalcTitleWidth( const ImplBorderFrameData* pData )
+tools::Long ImplBorderWindowView::ImplCalcTitleWidth( const ImplBorderFrameData* pData )
{
// title is not visible therefore no width
if ( !pData->mnTitleHeight )
return 0;
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
- long nTitleWidth = pBorderWindow->GetTextWidth( pBorderWindow->GetText() )+6;
+ tools::Long nTitleWidth = pBorderWindow->GetTextWidth( pBorderWindow->GetText() )+6;
nTitleWidth += pData->maCloseRect.GetWidth();
nTitleWidth += pData->maRollRect.GetWidth();
nTitleWidth += pData->maDockRect.GetWidth();
@@ -368,7 +368,7 @@ ImplNoBorderWindowView::ImplNoBorderWindowView()
{
}
-void ImplNoBorderWindowView::Init( OutputDevice*, long, long )
+void ImplNoBorderWindowView::Init( OutputDevice*, tools::Long, tools::Long )
{
}
@@ -381,7 +381,7 @@ void ImplNoBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopB
rBottomBorder = 0;
}
-long ImplNoBorderWindowView::CalcTitleWidth() const
+tools::Long ImplNoBorderWindowView::CalcTitleWidth() const
{
return 0;
}
@@ -403,7 +403,7 @@ ImplSmallBorderWindowView::ImplSmallBorderWindowView( ImplBorderWindow* pBorderW
{
}
-void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeight )
+void ImplSmallBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, tools::Long nHeight )
{
mpOutDev = pDev;
mnWidth = nWidth;
@@ -417,10 +417,10 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
if (pWin)
pCtrl = mpBorderWindow->GetWindow(GetWindowType::Client);
- long nOrigLeftBorder = mnLeftBorder;
- long nOrigTopBorder = mnTopBorder;
- long nOrigRightBorder = mnRightBorder;
- long nOrigBottomBorder = mnBottomBorder;
+ tools::Long nOrigLeftBorder = mnLeftBorder;
+ tools::Long nOrigTopBorder = mnTopBorder;
+ tools::Long nOrigRightBorder = mnRightBorder;
+ tools::Long nOrigBottomBorder = mnBottomBorder;
WindowBorderStyle nBorderStyle = mpBorderWindow->GetBorderStyle();
if ( nBorderStyle & WindowBorderStyle::NOBORDER )
@@ -575,7 +575,7 @@ void ImplSmallBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rT
rBottomBorder = mnBottomBorder;
}
-long ImplSmallBorderWindowView::CalcTitleWidth() const
+tools::Long ImplSmallBorderWindowView::CalcTitleWidth() const
{
return 0;
}
@@ -1145,15 +1145,15 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
Point aOldPos = pBorderWindow->GetPosPixel();
Size aSize = pBorderWindow->GetSizePixel();
tools::Rectangle aNewRect( aOldPos, aSize );
- long nOldWidth = aSize.Width();
- long nOldHeight = aSize.Height();
- long nBorderWidth = maFrameData.mnLeftBorder+maFrameData.mnRightBorder;
- long nBorderHeight = maFrameData.mnTopBorder+maFrameData.mnBottomBorder;
- long nMinWidth = pBorderWindow->mnMinWidth+nBorderWidth;
- long nMinHeight = pBorderWindow->mnMinHeight+nBorderHeight;
- long nMinWidth2 = nBorderWidth;
- long nMaxWidth = pBorderWindow->mnMaxWidth+nBorderWidth;
- long nMaxHeight = pBorderWindow->mnMaxHeight+nBorderHeight;
+ tools::Long nOldWidth = aSize.Width();
+ tools::Long nOldHeight = aSize.Height();
+ tools::Long nBorderWidth = maFrameData.mnLeftBorder+maFrameData.mnRightBorder;
+ tools::Long nBorderHeight = maFrameData.mnTopBorder+maFrameData.mnBottomBorder;
+ tools::Long nMinWidth = pBorderWindow->mnMinWidth+nBorderWidth;
+ tools::Long nMinHeight = pBorderWindow->mnMinHeight+nBorderHeight;
+ tools::Long nMinWidth2 = nBorderWidth;
+ tools::Long nMaxWidth = pBorderWindow->mnMaxWidth+nBorderWidth;
+ tools::Long nMaxHeight = pBorderWindow->mnMaxHeight+nBorderHeight;
if ( maFrameData.mnTitleHeight )
{
@@ -1267,7 +1267,7 @@ tools::Rectangle ImplStdBorderWindowView::GetMenuRect() const
return maFrameData.maMenuRect;
}
-void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeight )
+void ImplStdBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, tools::Long nHeight )
{
ImplBorderFrameData* pData = &maFrameData;
ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
@@ -1317,12 +1317,12 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
if ( pData->mnTitleType & (BorderWindowTitleType::Normal | BorderWindowTitleType::Small) )
{
- long nRight = pData->maTitleRect.Right() - 3;
- long const nItemTop = pData->maTitleRect.Top() + 2;
- long const nItemBottom = pData->maTitleRect.Bottom() - 2;
+ tools::Long nRight = pData->maTitleRect.Right() - 3;
+ tools::Long const nItemTop = pData->maTitleRect.Top() + 2;
+ tools::Long const nItemBottom = pData->maTitleRect.Bottom() - 2;
auto addSquareOnRight = [&nRight, nItemTop, nItemBottom](
- tools::Rectangle & rect, long gap)
+ tools::Rectangle & rect, tools::Long gap)
{
rect.SetTop( nItemTop );
rect.SetBottom( nItemBottom );
@@ -1389,7 +1389,7 @@ void ImplStdBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTop
rBottomBorder = maFrameData.mnBottomBorder;
}
-long ImplStdBorderWindowView::CalcTitleWidth() const
+tools::Long ImplStdBorderWindowView::CalcTitleWidth() const
{
return ImplCalcTitleWidth( &maFrameData );
}
@@ -1441,7 +1441,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
// Draw Border
rRenderContext.SetLineColor();
- long nBorderSize = pData->mnBorderSize;
+ tools::Long nBorderSize = pData->mnBorderSize;
if (nBorderSize)
{
rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
@@ -1750,7 +1750,7 @@ void ImplBorderWindow::Resize()
if (mpMenuBarWindow)
{
- long nMenuHeight = mpMenuBarWindow->GetSizePixel().Height();
+ tools::Long nMenuHeight = mpMenuBarWindow->GetSizePixel().Height();
if ( mbMenuHide )
{
if ( nMenuHeight )
@@ -1773,7 +1773,7 @@ void ImplBorderWindow::Resize()
if (mpNotebookBar)
{
- long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height();
+ tools::Long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height();
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
@@ -2042,7 +2042,7 @@ void ImplBorderWindow::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
rTopBorder += mpNotebookBar->GetSizePixel().Height();
}
-long ImplBorderWindow::CalcTitleWidth() const
+tools::Long ImplBorderWindow::CalcTitleWidth() const
{
return mpBorderView->CalcTitleWidth();
}
diff --git a/vcl/source/window/commandevent.cxx b/vcl/source/window/commandevent.cxx
index 06e974c9fc6a..812409ca1307 100644
--- a/vcl/source/window/commandevent.cxx
+++ b/vcl/source/window/commandevent.cxx
@@ -66,7 +66,7 @@ CommandWheelData::CommandWheelData()
mbDeltaIsPixel = false;
}
-CommandWheelData::CommandWheelData( long nWheelDelta, long nWheelNotchDelta,
+CommandWheelData::CommandWheelData( tools::Long nWheelDelta, tools::Long nWheelNotchDelta,
double nScrollLines,
CommandWheelMode nWheelMode, sal_uInt16 nKeyModifier,
bool bHorz, bool bDeltaIsPixel )
@@ -80,7 +80,7 @@ CommandWheelData::CommandWheelData( long nWheelDelta, long nWheelNotchDelta,
mbDeltaIsPixel = bDeltaIsPixel;
}
-CommandScrollData::CommandScrollData( long nDeltaX, long nDeltaY )
+CommandScrollData::CommandScrollData( tools::Long nDeltaX, tools::Long nDeltaY )
{
mnDeltaX = nDeltaX;
mnDeltaY = nDeltaY;
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index a0d05ff12c2e..e80ba8d42b52 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -251,8 +251,8 @@ void vcl::Cursor::LOKNotify( vcl::Window* pWindow, const OUString& rAction )
aItems.emplace_back("visible", mpData->mbCurVisible ? "true" : "false");
else if (rAction == "cursor_invalidate")
{
- const long nX = pWindow->GetOutOffXPixel() + pWindow->LogicToPixel(GetPos()).X() - pParent->GetOutOffXPixel();
- const long nY = pWindow->GetOutOffYPixel() + pWindow->LogicToPixel(GetPos()).Y() - pParent->GetOutOffYPixel();
+ const tools::Long nX = pWindow->GetOutOffXPixel() + pWindow->LogicToPixel(GetPos()).X() - pParent->GetOutOffXPixel();
+ const tools::Long nY = pWindow->GetOutOffYPixel() + pWindow->LogicToPixel(GetPos()).Y() - pParent->GetOutOffYPixel();
Size aSize = pWindow->LogicToPixel(GetSize());
if (!aSize.Width())
aSize.setWidth( pWindow->GetSettings().GetStyleSettings().GetCursorSize() );
@@ -410,7 +410,7 @@ void vcl::Cursor::SetSize( const Size& rSize )
}
}
-void vcl::Cursor::SetWidth( long nNewWidth )
+void vcl::Cursor::SetWidth( tools::Long nNewWidth )
{
if ( maSize.Width() != nNewWidth )
{
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index c28cd84f8d2f..94238967164b 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -43,7 +43,7 @@ vcl::Window *DebugEventInjector::ChooseWindow()
!(pParent = Application::GetActiveTopWindow()))
{
// select a top window at random
- long nIdx = Application::GetTopWindowCount() * getRandom();
+ tools::Long nIdx = Application::GetTopWindowCount() * getRandom();
pParent = Application::GetTopWindow( nIdx );
}
assert (pParent != nullptr);
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index b99335dd4804..3d9044b1890f 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -32,11 +32,11 @@ using namespace std;
namespace {
-long AdjustRectToSquare( tools::Rectangle &rRect )
+tools::Long AdjustRectToSquare( tools::Rectangle &rRect )
{
- const long nWidth = rRect.GetWidth();
- const long nHeight = rRect.GetHeight();
- long nSide = std::min( nWidth, nHeight );
+ const tools::Long nWidth = rRect.GetWidth();
+ const tools::Long nHeight = rRect.GetHeight();
+ tools::Long nSide = std::min( nWidth, nHeight );
if ( nSide && !(nSide & 1) )
{
@@ -55,7 +55,7 @@ long AdjustRectToSquare( tools::Rectangle &rRect )
void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolType eType )
{
- const long nSide = AdjustRectToSquare( nRect );
+ const tools::Long nSide = AdjustRectToSquare( nRect );
if ( !nSide ) return;
if ( nSide==1 )
@@ -65,17 +65,17 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
}
// Precalculate some values
- const long n2 = nSide/2;
- const long n4 = (n2+1)/2;
- const long n8 = (n4+1)/2;
- const long n16 = (n8+1)/2;
+ const tools::Long n2 = nSide/2;
+ const tools::Long n4 = (n2+1)/2;
+ const tools::Long n8 = (n4+1)/2;
+ const tools::Long n16 = (n8+1)/2;
const Point aCenter = nRect.Center();
switch ( eType )
{
case SymbolType::ARROW_UP:
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
- for ( long i=1; i <= n2; ++i )
+ for ( tools::Long i=1; i <= n2; ++i )
{
nRect.AdjustTop( 1 );
pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
@@ -89,7 +89,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::ARROW_DOWN:
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
- for ( long i=1; i <= n2; ++i )
+ for ( tools::Long i=1; i <= n2; ++i )
{
nRect.AdjustBottom( -1 );
pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
@@ -103,7 +103,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::ARROW_LEFT:
pDev->DrawPixel( Point( nRect.Left(), aCenter.Y() ) );
- for ( long i=1; i <= n2; ++i )
+ for ( tools::Long i=1; i <= n2; ++i )
{
nRect.AdjustLeft( 1 );
pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ),
@@ -117,7 +117,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::ARROW_RIGHT:
pDev->DrawPixel( Point( nRect.Right(), aCenter.Y() ) );
- for ( long i=1; i <= n2; ++i )
+ for ( tools::Long i=1; i <= n2; ++i )
{
nRect.AdjustRight( -1 );
pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ),
@@ -132,7 +132,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::SPIN_UP:
nRect.AdjustTop(n4 );
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
- for ( long i=1; i <= n2; ++i )
+ for ( tools::Long i=1; i <= n2; ++i )
{
nRect.AdjustTop( 1 );
pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
@@ -145,7 +145,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::SPIN_DOWN:
nRect.AdjustBottom( -n4 );
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
- for ( long i=1; i <= n2; ++i )
+ for ( tools::Long i=1; i <= n2; ++i )
{
nRect.AdjustBottom( -1 );
pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
@@ -208,7 +208,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::PAGEUP:
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
pDev->DrawPixel( Point( aCenter.X(), nRect.Top()+n2 ) );
- for ( long i=1; i < n2; ++i )
+ for ( tools::Long i=1; i < n2; ++i )
{
nRect.AdjustTop( 1 );
pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
@@ -225,7 +225,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::PAGEDOWN:
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom()-n2 ) );
- for ( long i=1; i < n2; ++i )
+ for ( tools::Long i=1; i < n2; ++i )
{
nRect.AdjustBottom( -1 );
pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
@@ -242,9 +242,9 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::RADIOCHECKMARK:
{
// Midpoint circle algorithm
- long x = 0;
- long y = n2;
- long p = 1 - n2;
+ tools::Long x = 0;
+ tools::Long y = n2;
+ tools::Long p = 1 - n2;
// Draw central line
pDev->DrawLine( Point( aCenter.X(), aCenter.Y()-y ),
Point( aCenter.X(), aCenter.Y()+y ) );
@@ -280,7 +280,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
Point( nRect.Right(), nRect.Bottom() ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ),
Point( nRect.Right(), nRect.Top() ) );
- for ( long i=1; i<n8; ++i )
+ for ( tools::Long i=1; i<n8; ++i )
{
pDev->DrawLine( Point( nRect.Left()+i, nRect.Top() ),
Point( nRect.Right(), nRect.Bottom()-i ) );
@@ -308,7 +308,7 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
case SymbolType::CHECKMARK:
{
- long n3 = nSide/3;
+ tools::Long n3 = nSide/3;
nRect.AdjustTop( -(n3/2) );
nRect.AdjustBottom( -(n3/2) );
// #106953# never mirror checkmarks
@@ -399,8 +399,8 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp
void ImplDrawDPILineRect( OutputDevice *const pDev, tools::Rectangle& rRect,
const Color *const pColor, const bool bRound = false )
{
- long nLineWidth = pDev->GetDPIX()/300;
- long nLineHeight = pDev->GetDPIY()/300;
+ tools::Long nLineWidth = pDev->GetDPIX()/300;
+ tools::Long nLineHeight = pDev->GetDPIY()/300;
if ( !nLineWidth )
nLineWidth = 1;
if ( !nLineHeight )
@@ -426,8 +426,8 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, tools::Rectangle& rRect,
}
else
{
- const long nWidth = rRect.GetWidth();
- const long nHeight = rRect.GetHeight();
+ const tools::Long nWidth = rRect.GetWidth();
+ const tools::Long nHeight = rRect.GetHeight();
pDev->SetLineColor();
pDev->SetFillColor( *pColor );
pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) );
@@ -609,9 +609,9 @@ void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
if( nStyle != DrawFrameStyle::NWF &&
pWin && pWin->IsNativeControlSupported(ControlType::Frame, ControlPart::Border) )
{
- long nControlFlags = static_cast<long>(nStyle);
- nControlFlags |= static_cast<long>(nFlags);
- nControlFlags |= static_cast<long>(pWin->GetType() == WindowType::BORDERWINDOW ?
+ tools::Long nControlFlags = static_cast<tools::Long>(nStyle);
+ nControlFlags |= static_cast<tools::Long>(nFlags);
+ nControlFlags |= static_cast<tools::Long>(pWin->GetType() == WindowType::BORDERWINDOW ?
DrawFrameFlags::BorderWindowBorder : DrawFrameFlags::NONE);
ImplControlValue aControlValue( nControlFlags );
@@ -1058,15 +1058,15 @@ void DecorationView::DrawHandle(const tools::Rectangle& rRect)
const sal_Int32 nNumberOfPoints = 3;
- long nHalfWidth = aOutputSize.Width() / 2.0f;
+ tools::Long nHalfWidth = aOutputSize.Width() / 2.0f;
float fDistance = aOutputSize.Height();
fDistance /= (nNumberOfPoints + 1);
- long nRadius = aOutputSize.Width();
+ tools::Long nRadius = aOutputSize.Width();
nRadius /= (nNumberOfPoints + 2);
- for (long i = 1; i <= nNumberOfPoints; i++)
+ for (tools::Long i = 1; i <= nNumberOfPoints; i++)
{
tools::Rectangle aLocation(nHalfWidth - nRadius,
round(fDistance * i) - nRadius,
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 746d7a03595d..ed6e18a8cba1 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -350,7 +350,7 @@ struct DialogImpl
{
std::vector<VclPtr<PushButton>> maOwnedButtons;
std::map<VclPtr<vcl::Window>, short> maResponses;
- long mnResult;
+ tools::Long mnResult;
bool mbStartedModal;
VclAbstractDialog::AsyncContext maEndCtx;
Link<const CommandEvent&, bool> m_aPopupMenuHdl;
@@ -692,7 +692,7 @@ bool Dialog::EventNotify( NotifyEvent& rNEvt )
Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
{
#ifndef IOS
- long w = rScreenSize.Width();
+ tools::Long w = rScreenSize.Width();
if (w <= 800)
w -= 15;
else if (w <= 1024)
@@ -700,7 +700,7 @@ Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
else
w -= 115;
- long h = rScreenSize.Height();
+ tools::Long h = rScreenSize.Height();
if (h <= 768)
h -= 50;
else
@@ -1040,7 +1040,7 @@ short Dialog::Execute()
OSL_FAIL( "Dialog::Execute() - Dialog destroyed in Execute()" );
}
- long nRet = mpDialogImpl->mnResult;
+ tools::Long nRet = mpDialogImpl->mnResult;
mpDialogImpl->mnResult = -1;
return static_cast<short>(nRet);
@@ -1077,7 +1077,7 @@ void Dialog::RemoveFromDlgList()
rExecuteDialogs.erase(std::remove_if(rExecuteDialogs.begin(), rExecuteDialogs.end(), [this](VclPtr<Dialog>& dialog){ return dialog.get() == this; }), rExecuteDialogs.end());
}
-void Dialog::EndDialog( long nResult )
+void Dialog::EndDialog( tools::Long nResult )
{
if (!mbInExecute || IsDisposed())
return;
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index f3bb625d2bd5..1307ffa9234d 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -394,8 +394,8 @@ void DockingManager::RemoveWindow( const vcl::Window *pWindow )
}
}
-void DockingManager::SetPosSizePixel( vcl::Window const *pWindow, long nX, long nY,
- long nWidth, long nHeight,
+void DockingManager::SetPosSizePixel( vcl::Window const *pWindow, tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
@@ -994,8 +994,8 @@ void ImplDockingWindowWrapper::SetFloatStyle( WinBits nStyle )
}
-void ImplDockingWindowWrapper::setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight,
+void ImplDockingWindowWrapper::setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags )
{
if ( mpFloatWin )
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index bae44f7bdaac..42a42889a6c6 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -821,8 +821,8 @@ WinBits DockingWindow::GetFloatStyle() const
return mnFloatBits;
}
-void DockingWindow::setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight,
+void DockingWindow::setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
PosSizeFlags nFlags )
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d5379faba384..36ebf51a74ff 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -209,12 +209,12 @@ void VclContainer::Command(const CommandEvent& rCEvt)
void VclBox::accumulateMaxes(const Size &rChildSize, Size &rSize) const
{
- long nSecondaryChildDimension = getSecondaryDimension(rChildSize);
- long nSecondaryBoxDimension = getSecondaryDimension(rSize);
+ tools::Long nSecondaryChildDimension = getSecondaryDimension(rChildSize);
+ tools::Long nSecondaryBoxDimension = getSecondaryDimension(rSize);
setSecondaryDimension(rSize, std::max(nSecondaryChildDimension, nSecondaryBoxDimension));
- long nPrimaryChildDimension = getPrimaryDimension(rChildSize);
- long nPrimaryBoxDimension = getPrimaryDimension(rSize);
+ tools::Long nPrimaryChildDimension = getPrimaryDimension(rChildSize);
+ tools::Long nPrimaryBoxDimension = getPrimaryDimension(rSize);
if (m_bHomogeneous)
setPrimaryDimension(rSize, std::max(nPrimaryBoxDimension, nPrimaryChildDimension));
else
@@ -233,7 +233,7 @@ Size VclBox::calculateRequisition() const
++nVisibleChildren;
Size aChildSize = getLayoutRequisition(*pChild);
- long nPrimaryDimension = getPrimaryDimension(aChildSize);
+ tools::Long nPrimaryDimension = getPrimaryDimension(aChildSize);
nPrimaryDimension += pChild->get_padding() * 2;
setPrimaryDimension(aChildSize, nPrimaryDimension);
@@ -259,9 +259,9 @@ void VclBox::setAllocation(const Size &rAllocation)
if (!nVisibleChildren)
return;
- long nAllocPrimaryDimension = getPrimaryDimension(rAllocation);
+ tools::Long nAllocPrimaryDimension = getPrimaryDimension(rAllocation);
- long nHomogeneousDimension = 0, nExtraSpace = 0;
+ tools::Long nHomogeneousDimension = 0, nExtraSpace = 0;
if (m_bHomogeneous)
{
nHomogeneousDimension = (nAllocPrimaryDimension -
@@ -294,7 +294,7 @@ void VclBox::setAllocation(const Size &rAllocation)
Point aPos(0, 0);
if (ePackType == VclPackType::End)
{
- long nPrimaryCoordinate = getPrimaryCoordinate(aPos);
+ tools::Long nPrimaryCoordinate = getPrimaryCoordinate(aPos);
setPrimaryCoordinate(aPos, nPrimaryCoordinate + nAllocPrimaryDimension);
}
@@ -302,7 +302,7 @@ void VclBox::setAllocation(const Size &rAllocation)
{
vcl::Window *pChild = window;
- long nPadding = pChild->get_padding();
+ tools::Long nPadding = pChild->get_padding();
Size aBoxSize;
if (m_bHomogeneous)
@@ -310,7 +310,7 @@ void VclBox::setAllocation(const Size &rAllocation)
else
{
aBoxSize = getLayoutRequisition(*pChild);
- long nPrimaryDimension = getPrimaryDimension(aBoxSize);
+ tools::Long nPrimaryDimension = getPrimaryDimension(aBoxSize);
nPrimaryDimension += nPadding * 2;
if (getPrimaryDimensionChildExpand(*pChild))
nPrimaryDimension += nExtraSpace;
@@ -320,12 +320,12 @@ void VclBox::setAllocation(const Size &rAllocation)
Point aChildPos(aPos);
Size aChildSize(aBoxSize);
- long nPrimaryCoordinate = getPrimaryCoordinate(aPos);
+ tools::Long nPrimaryCoordinate = getPrimaryCoordinate(aPos);
bool bFill = pChild->get_fill();
if (bFill)
{
- setPrimaryDimension(aChildSize, std::max(static_cast<long>(1),
+ setPrimaryDimension(aChildSize, std::max(static_cast<tools::Long>(1),
getPrimaryDimension(aBoxSize) - nPadding * 2));
setPrimaryCoordinate(aChildPos, nPrimaryCoordinate + nPadding);
@@ -339,7 +339,7 @@ void VclBox::setAllocation(const Size &rAllocation)
(getPrimaryDimension(aBoxSize) - getPrimaryDimension(aChildSize)) / 2);
}
- long nDiff = getPrimaryDimension(aBoxSize) + m_nSpacing;
+ tools::Long nDiff = getPrimaryDimension(aBoxSize) + m_nSpacing;
if (ePackType == VclPackType::Start)
setPrimaryCoordinate(aPos, nPrimaryCoordinate + nDiff);
else
@@ -391,7 +391,7 @@ Size VclBox::finalizeMaxes(const Size &rSize, sal_uInt16 nVisibleChildren) const
if (nVisibleChildren)
{
- long nPrimaryDimension = getPrimaryDimension(rSize);
+ tools::Long nPrimaryDimension = getPrimaryDimension(rSize);
if (m_bHomogeneous)
nPrimaryDimension *= nVisibleChildren;
setPrimaryDimension(aRet, nPrimaryDimension + m_nSpacing * (nVisibleChildren-1));
@@ -405,8 +405,8 @@ Size VclButtonBox::addReqGroups(const VclButtonBox::Requisition &rReq) const
{
Size aRet;
- long nMainGroupDimension = getPrimaryDimension(rReq.m_aMainGroupSize);
- long nSubGroupDimension = getPrimaryDimension(rReq.m_aSubGroupSize);
+ tools::Long nMainGroupDimension = getPrimaryDimension(rReq.m_aMainGroupSize);
+ tools::Long nSubGroupDimension = getPrimaryDimension(rReq.m_aSubGroupSize);
setPrimaryDimension(aRet, nMainGroupDimension + nSubGroupDimension);
@@ -417,9 +417,9 @@ Size VclButtonBox::addReqGroups(const VclButtonBox::Requisition &rReq) const
return aRet;
}
-static long getMaxNonOutlier(const std::vector<long> &rG, long nAvgDimension)
+static tools::Long getMaxNonOutlier(const std::vector<long> &rG, tools::Long nAvgDimension)
{
- long nMaxDimensionNonOutlier = 0;
+ tools::Long nMaxDimensionNonOutlier = 0;
for (auto const& nPrimaryChildDimension : rG)
{
if (nPrimaryChildDimension < nAvgDimension * 1.5)
@@ -433,7 +433,7 @@ static long getMaxNonOutlier(const std::vector<long> &rG, long nAvgDimension)
static std::vector<long> setButtonSizes(const std::vector<long> &rG,
const std::vector<bool> &rNonHomogeneous,
- long nAvgDimension, long nMaxNonOutlier, long nMinWidth)
+ tools::Long nAvgDimension, tools::Long nMaxNonOutlier, tools::Long nMinWidth)
{
std::vector<long> aVec;
//set everything < 1.5 times the average to the same width, leave the
@@ -463,10 +463,10 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions()
Size aMainGroupSize(DEFAULT_CHILD_MIN_WIDTH, DEFAULT_CHILD_MIN_HEIGHT); //to-do, pull from theme
Size aSubGroupSize(DEFAULT_CHILD_MIN_WIDTH, DEFAULT_CHILD_MIN_HEIGHT); //to-do, pull from theme
- long nMinMainGroupPrimary = getPrimaryDimension(aMainGroupSize);
- long nMinSubGroupPrimary = getPrimaryDimension(aSubGroupSize);
- long nMainGroupSecondary = getSecondaryDimension(aMainGroupSize);
- long nSubGroupSecondary = getSecondaryDimension(aSubGroupSize);
+ tools::Long nMinMainGroupPrimary = getPrimaryDimension(aMainGroupSize);
+ tools::Long nMinSubGroupPrimary = getPrimaryDimension(aSubGroupSize);
+ tools::Long nMainGroupSecondary = getSecondaryDimension(aMainGroupSize);
+ tools::Long nSubGroupSecondary = getSecondaryDimension(aSubGroupSize);
bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VclButtonBoxStyle::Spread || m_eLayoutStyle == VclButtonBoxStyle::Center);
@@ -498,13 +498,13 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions()
if (m_bHomogeneous)
{
- long nMaxMainDimension = aMainGroupSizes.empty() ? 0 :
+ tools::Long nMaxMainDimension = aMainGroupSizes.empty() ? 0 :
*std::max_element(aMainGroupSizes.begin(), aMainGroupSizes.end());
nMaxMainDimension = std::max(nMaxMainDimension, nMinMainGroupPrimary);
- long nMaxSubDimension = aSubGroupSizes.empty() ? 0 :
+ tools::Long nMaxSubDimension = aSubGroupSizes.empty() ? 0 :
*std::max_element(aSubGroupSizes.begin(), aSubGroupSizes.end());
nMaxSubDimension = std::max(nMaxSubDimension, nMinSubGroupPrimary);
- long nMaxDimension = std::max(nMaxMainDimension, nMaxSubDimension);
+ tools::Long nMaxDimension = std::max(nMaxMainDimension, nMaxSubDimension);
aReq.m_aMainGroupDimensions.resize(aMainGroupSizes.size(), nMaxDimension);
aReq.m_aSubGroupDimensions.resize(aSubGroupSizes.size(), nMaxDimension);
}
@@ -514,20 +514,20 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions()
//that are way wider than the average and leave them
//at their natural size and set the remainder to share the
//max size of the remaining members of the buttonbox
- long nAccDimension = std::accumulate(aMainGroupSizes.begin(),
+ tools::Long nAccDimension = std::accumulate(aMainGroupSizes.begin(),
aMainGroupSizes.end(), 0);
nAccDimension = std::accumulate(aSubGroupSizes.begin(),
aSubGroupSizes.end(), nAccDimension);
size_t nTotalSize = aMainGroupSizes.size() + aSubGroupSizes.size();
- long nAvgDimension = nTotalSize ? nAccDimension / nTotalSize : 0;
+ tools::Long nAvgDimension = nTotalSize ? nAccDimension / nTotalSize : 0;
- long nMaxMainNonOutlier = getMaxNonOutlier(aMainGroupSizes,
+ tools::Long nMaxMainNonOutlier = getMaxNonOutlier(aMainGroupSizes,
nAvgDimension);
- long nMaxSubNonOutlier = getMaxNonOutlier(aSubGroupSizes,
+ tools::Long nMaxSubNonOutlier = getMaxNonOutlier(aSubGroupSizes,
nAvgDimension);
- long nMaxNonOutlier = std::max(nMaxMainNonOutlier, nMaxSubNonOutlier);
+ tools::Long nMaxNonOutlier = std::max(nMaxMainNonOutlier, nMaxSubNonOutlier);
aReq.m_aMainGroupDimensions = setButtonSizes(aMainGroupSizes,
aMainGroupNonHomogeneous,
@@ -561,7 +561,7 @@ Size VclButtonBox::addSpacing(const Size &rSize, sal_uInt16 nVisibleChildren) co
if (nVisibleChildren)
{
- long nPrimaryDimension = getPrimaryDimension(rSize);
+ tools::Long nPrimaryDimension = getPrimaryDimension(rSize);
setPrimaryDimension(aRet,
nPrimaryDimension + m_nSpacing * (nVisibleChildren-1));
setSecondaryDimension(aRet, getSecondaryDimension(rSize));
@@ -611,7 +611,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
if (aReq.m_aMainGroupDimensions.empty() && aReq.m_aSubGroupDimensions.empty())
return;
- long nAllocPrimaryDimension = getPrimaryDimension(rAllocation);
+ tools::Long nAllocPrimaryDimension = getPrimaryDimension(rAllocation);
Point aMainGroupPos, aOtherGroupPos;
int nSpacing = m_nSpacing;
@@ -622,7 +622,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
case VclButtonBoxStyle::Start:
if (!aReq.m_aSubGroupDimensions.empty())
{
- long nOtherPrimaryDimension = getPrimaryDimension(
+ tools::Long nOtherPrimaryDimension = getPrimaryDimension(
addSpacing(aReq.m_aSubGroupSize, aReq.m_aSubGroupDimensions.size()));
setPrimaryCoordinate(aOtherGroupPos,
nAllocPrimaryDimension - nOtherPrimaryDimension);
@@ -631,9 +631,9 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
case VclButtonBoxStyle::Spread:
if (!aReq.m_aMainGroupDimensions.empty())
{
- long nMainPrimaryDimension = getPrimaryDimension(
+ tools::Long nMainPrimaryDimension = getPrimaryDimension(
addSpacing(aReq.m_aMainGroupSize, aReq.m_aMainGroupDimensions.size()));
- long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
+ tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
nExtraSpace += (aReq.m_aMainGroupDimensions.size()-1) * nSpacing;
nSpacing = nExtraSpace/(aReq.m_aMainGroupDimensions.size()+1);
setPrimaryCoordinate(aMainGroupPos, nSpacing);
@@ -642,9 +642,9 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
case VclButtonBoxStyle::Center:
if (!aReq.m_aMainGroupDimensions.empty())
{
- long nMainPrimaryDimension = getPrimaryDimension(
+ tools::Long nMainPrimaryDimension = getPrimaryDimension(
addSpacing(aReq.m_aMainGroupSize, aReq.m_aMainGroupDimensions.size()));
- long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
+ tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
setPrimaryCoordinate(aMainGroupPos, nExtraSpace/2);
}
break;
@@ -655,7 +655,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
case VclButtonBoxStyle::End:
if (!aReq.m_aMainGroupDimensions.empty())
{
- long nMainPrimaryDimension = getPrimaryDimension(
+ tools::Long nMainPrimaryDimension = getPrimaryDimension(
addSpacing(aReq.m_aMainGroupSize, aReq.m_aMainGroupDimensions.size()));
setPrimaryCoordinate(aMainGroupPos,
nAllocPrimaryDimension - nMainPrimaryDimension);
@@ -676,18 +676,18 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
if (bIgnoreSecondaryPacking || !pChild->get_secondary())
{
- long nMainGroupPrimaryDimension = *aPrimaryI++;
+ tools::Long nMainGroupPrimaryDimension = *aPrimaryI++;
setPrimaryDimension(aChildSize, nMainGroupPrimaryDimension);
setLayoutAllocation(*pChild, aMainGroupPos, aChildSize);
- long nPrimaryCoordinate = getPrimaryCoordinate(aMainGroupPos);
+ tools::Long nPrimaryCoordinate = getPrimaryCoordinate(aMainGroupPos);
setPrimaryCoordinate(aMainGroupPos, nPrimaryCoordinate + nMainGroupPrimaryDimension + nSpacing);
}
else
{
- long nSubGroupPrimaryDimension = *aSecondaryI++;
+ tools::Long nSubGroupPrimaryDimension = *aSecondaryI++;
setPrimaryDimension(aChildSize, nSubGroupPrimaryDimension);
setLayoutAllocation(*pChild, aOtherGroupPos, aChildSize);
- long nPrimaryCoordinate = getPrimaryCoordinate(aOtherGroupPos);
+ tools::Long nPrimaryCoordinate = getPrimaryCoordinate(aOtherGroupPos);
setPrimaryCoordinate(aOtherGroupPos, nPrimaryCoordinate + nSubGroupPrimaryDimension + nSpacing);
}
}
@@ -1145,7 +1145,7 @@ Size VclGrid::calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 n
std::vector<Value> aHeights;
calcMaxs(A, aWidths, aHeights);
- long nTotalWidth = 0;
+ tools::Long nTotalWidth = 0;
if (get_column_homogeneous())
{
nTotalWidth = std::max_element(aWidths.begin(), aWidths.end(), compareValues)->m_nValue;
@@ -1158,7 +1158,7 @@ Size VclGrid::calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 n
nTotalWidth += nColSpacing * (aWidths.size()-1);
- long nTotalHeight = 0;
+ tools::Long nTotalHeight = 0;
if (get_row_homogeneous())
{
nTotalHeight = std::max_element(aHeights.begin(), aHeights.end(), compareValues)->m_nValue;
@@ -1196,7 +1196,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
sal_Int32 nColSpacing(get_column_spacing());
sal_Int32 nRowSpacing(get_row_spacing());
- long nAvailableWidth = rAllocation.Width();
+ tools::Long nAvailableWidth = rAllocation.Width();
if (nMaxX)
nAvailableWidth -= nColSpacing * (nMaxX - 1);
if (get_column_homogeneous())
@@ -1210,7 +1210,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
for (sal_Int32 x = 0; x < nMaxX; ++x)
if (aWidths[x].m_bExpand)
++nExpandables;
- long nExtraWidthForExpanders = nExpandables ? (rAllocation.Width() - aRequisition.Width()) / nExpandables : 0;
+ tools::Long nExtraWidthForExpanders = nExpandables ? (rAllocation.Width() - aRequisition.Width()) / nExpandables : 0;
//We don't fit and there is no volunteer to be shrunk
if (!nExpandables && rAllocation.Width() < aRequisition.Width())
@@ -1225,7 +1225,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
}
//share out the remaining pain to everyone
- long nExtraWidth = (rAllocation.Width() - aRequisition.Width()) / nMaxX;
+ tools::Long nExtraWidth = (rAllocation.Width() - aRequisition.Width()) / nMaxX;
for (sal_Int32 x = 0; x < nMaxX; ++x)
aWidths[x].m_nValue += nExtraWidth;
@@ -1239,7 +1239,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
}
}
- long nAvailableHeight = rAllocation.Height();
+ tools::Long nAvailableHeight = rAllocation.Height();
if (nMaxY)
nAvailableHeight -= nRowSpacing * (nMaxY - 1);
if (get_row_homogeneous())
@@ -1253,7 +1253,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
for (sal_Int32 y = 0; y < nMaxY; ++y)
if (aHeights[y].m_bExpand)
++nExpandables;
- long nExtraHeightForExpanders = nExpandables ? (rAllocation.Height() - aRequisition.Height()) / nExpandables : 0;
+ tools::Long nExtraHeightForExpanders = nExpandables ? (rAllocation.Height() - aRequisition.Height()) / nExpandables : 0;
//We don't fit and there is no volunteer to be shrunk
if (!nExpandables && rAllocation.Height() < aRequisition.Height())
@@ -1268,7 +1268,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
}
//share out the remaining pain to everyone
- long nExtraHeight = (rAllocation.Height() - aRequisition.Height()) / nMaxY;
+ tools::Long nExtraHeight = (rAllocation.Height() - aRequisition.Height()) / nMaxY;
for (sal_Int32 y = 0; y < nMaxY; ++y)
aHeights[y].m_nValue += nExtraHeight;
@@ -1724,7 +1724,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
aButtonSize.setHeight( std::min(aButtonSize.Height(), aExpanderSize.Height()) );
aButtonSize.setWidth( std::min(aButtonSize.Width(), aExpanderSize.Width()) );
- long nExtraExpanderHeight = aExpanderSize.Height() - aButtonSize.Height();
+ tools::Long nExtraExpanderHeight = aExpanderSize.Height() - aButtonSize.Height();
Point aButtonPos(aChildPos.X(), aChildPos.Y() + nExtraExpanderHeight/2);
setLayoutAllocation(*m_pDisclosureButton, aButtonPos, aButtonSize);
@@ -1734,7 +1734,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
aLabelSize.setWidth( std::min(aLabelSize.Width(),
aExpanderSize.Width() - aButtonSize.Width()) );
- long nExtraLabelHeight = aExpanderSize.Height() - aLabelSize.Height();
+ tools::Long nExtraLabelHeight = aExpanderSize.Height() - aLabelSize.Height();
Point aLabelPos(aChildPos.X() + aButtonSize.Width(), aChildPos.Y() + nExtraLabelHeight/2);
setLayoutAllocation(*pLabel, aLabelPos, aLabelSize);
}
@@ -1894,8 +1894,8 @@ void VclScrolledWindow::doSetAllocation(const Size &rAllocation, bool bRetryOnFa
if (pChild && pChild->IsVisible())
aChildReq = getLayoutRequisition(*pChild);
- long nAvailHeight = rAllocation.Height() - 2;
- long nAvailWidth = rAllocation.Width() - 2;
+ tools::Long nAvailHeight = rAllocation.Height() - 2;
+ tools::Long nAvailWidth = rAllocation.Width() - 2;
// vert. ScrollBar
if (GetStyle() & WB_AUTOVSCROLL)
{
@@ -2546,13 +2546,13 @@ VclVPaned::VclVPaned(vcl::Window *pParent)
IMPL_LINK(VclVPaned, SplitHdl, Splitter*, pSplitter, void)
{
- long nSize = pSplitter->GetSplitPosPixel();
+ tools::Long nSize = pSplitter->GetSplitPosPixel();
Size aSplitterSize(m_pSplitter->GetSizePixel());
Size aAllocation(GetSizePixel());
arrange(aAllocation, nSize, aAllocation.Height() - nSize - aSplitterSize.Height());
}
-void VclVPaned::arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight)
+void VclVPaned::arrange(const Size& rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight)
{
Size aSplitterSize(rAllocation.Width(), getLayoutRequisition(*m_pSplitter).Height());
Size aFirstChildSize(rAllocation.Width(), nFirstHeight);
@@ -2583,7 +2583,7 @@ void VclVPaned::arrange(const Size& rAllocation, long nFirstHeight, long nSecond
}
}
-void VclVPaned::set_position(long nPosition)
+void VclVPaned::set_position(tools::Long nPosition)
{
VclPaned::set_position(nPosition);
@@ -2600,10 +2600,10 @@ void VclVPaned::setAllocation(const Size& rAllocation)
//supporting "shrink" could be done by adjusting the allowed drag rectangle
m_pSplitter->SetDragRectPixel(tools::Rectangle(Point(0, 0), rAllocation));
Size aSplitterSize(rAllocation.Width(), getLayoutRequisition(*m_pSplitter).Height());
- const long nHeight = rAllocation.Height() - aSplitterSize.Height();
+ const tools::Long nHeight = rAllocation.Height() - aSplitterSize.Height();
- long nFirstHeight = 0;
- long nSecondHeight = 0;
+ tools::Long nFirstHeight = 0;
+ tools::Long nSecondHeight = 0;
bool bFirstCanResize = true;
bool bSecondCanResize = true;
const bool bInitialAllocation = get_position() < 0;
@@ -2631,8 +2631,8 @@ void VclVPaned::setAllocation(const Size& rAllocation)
}
++nElement;
}
- long nHeightRequest = nFirstHeight + nSecondHeight;
- long nHeightDiff = nHeight - nHeightRequest;
+ tools::Long nHeightRequest = nFirstHeight + nSecondHeight;
+ tools::Long nHeightDiff = nHeight - nHeightRequest;
if (bFirstCanResize == bSecondCanResize)
nFirstHeight += nHeightDiff/2;
else if (bFirstCanResize)
@@ -2665,13 +2665,13 @@ VclHPaned::VclHPaned(vcl::Window *pParent)
IMPL_LINK(VclHPaned, SplitHdl, Splitter*, pSplitter, void)
{
- long nSize = pSplitter->GetSplitPosPixel();
+ tools::Long nSize = pSplitter->GetSplitPosPixel();
Size aSplitterSize(m_pSplitter->GetSizePixel());
Size aAllocation(GetSizePixel());
arrange(aAllocation, nSize, aAllocation.Width() - nSize - aSplitterSize.Width());
}
-void VclHPaned::arrange(const Size& rAllocation, long nFirstWidth, long nSecondWidth)
+void VclHPaned::arrange(const Size& rAllocation, tools::Long nFirstWidth, tools::Long nSecondWidth)
{
Size aSplitterSize(getLayoutRequisition(*m_pSplitter).Width(), rAllocation.Height());
Size aFirstChildSize(nFirstWidth, rAllocation.Height());
@@ -2702,7 +2702,7 @@ void VclHPaned::arrange(const Size& rAllocation, long nFirstWidth, long nSecondW
}
}
-void VclHPaned::set_position(long nPosition)
+void VclHPaned::set_position(tools::Long nPosition)
{
VclPaned::set_position(nPosition);
@@ -2719,10 +2719,10 @@ void VclHPaned::setAllocation(const Size& rAllocation)
//supporting "shrink" could be done by adjusting the allowed drag rectangle
m_pSplitter->SetDragRectPixel(tools::Rectangle(Point(0, 0), rAllocation));
Size aSplitterSize(getLayoutRequisition(*m_pSplitter).Width(), rAllocation.Height());
- const long nWidth = rAllocation.Width() - aSplitterSize.Width();
+ const tools::Long nWidth = rAllocation.Width() - aSplitterSize.Width();
- long nFirstWidth = 0;
- long nSecondWidth = 0;
+ tools::Long nFirstWidth = 0;
+ tools::Long nSecondWidth = 0;
bool bFirstCanResize = true;
bool bSecondCanResize = true;
const bool bInitialAllocation = get_position() < 0;
@@ -2750,8 +2750,8 @@ void VclHPaned::setAllocation(const Size& rAllocation)
}
++nElement;
}
- long nWidthRequest = nFirstWidth + nSecondWidth;
- long nWidthDiff = nWidth - nWidthRequest;
+ tools::Long nWidthRequest = nFirstWidth + nSecondWidth;
+ tools::Long nWidthDiff = nWidth - nWidthRequest;
if (bFirstCanResize == bSecondCanResize)
nFirstWidth += nWidthDiff/2;
else if (bFirstCanResize)
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ba478d86151a..800b869f0676 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -127,17 +127,17 @@ void lclDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Recta
int linewidth = 1 * fScaleFactor;
int space = 4 * fScaleFactor;
- long width = 8 * fScaleFactor;
- long height = 5 * fScaleFactor;
+ tools::Long width = 8 * fScaleFactor;
+ tools::Long height = 5 * fScaleFactor;
//Keep odd b/c drawing code works better
if ( height % 2 == 0 )
height--;
- long heightOrig = height;
+ tools::Long heightOrig = height;
- long x = rRect.Left() + (rRect.getWidth() - width)/2 + 1;
- long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1;
+ tools::Long x = rRect.Left() + (rRect.getWidth() - width)/2 + 1;
+ tools::Long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1;
while( height >= 1)
{
rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) );
@@ -916,7 +916,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable )
if ( pWin && pWin->IsVisible() )
{
SAL_WARN_IF(!IsMenuBar(), "vcl", "Menu::EnableItem - Popup visible!" );
- long nX = 0;
+ tools::Long nX = 0;
size_t nCount = pItemList->size();
for ( size_t n = 0; n < nCount; n++ )
{
@@ -1320,9 +1320,9 @@ void Menu::SetAccessible(const css::uno::Reference<css::accessibility::XAccessib
mxAccessible = rxAccessible;
}
-Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext const & rRenderContext, long& rCheckHeight, long& rRadioHeight ) const
+Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext const & rRenderContext, tools::Long& rCheckHeight, tools::Long& rRadioHeight ) const
{
- long nCheckWidth = 0, nRadioWidth = 0;
+ tools::Long nCheckWidth = 0, nRadioWidth = 0;
rCheckHeight = rRadioHeight = 0;
if (!IsMenuBar())
@@ -1356,7 +1356,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext const & rRenderCont
return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight));
}
-bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext const & rRenderContext, Size& rArrowSize, long& rArrowSpacing)
+bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext const & rRenderContext, Size& rArrowSize, tools::Long& rArrowSpacing)
{
ImplControlValue aVal;
tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15)));
@@ -1412,11 +1412,11 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
// | Check/Radio/Image| Text| Accel/Popup|
// for symbols: nFontHeight x nFontHeight
- long nFontHeight = pWin->GetTextHeight();
- long nExtra = nFontHeight/4;
+ tools::Long nFontHeight = pWin->GetTextHeight();
+ tools::Long nExtra = nFontHeight/4;
- long nMinMenuItemHeight = nFontHeight;
- long nCheckHeight = 0, nRadioHeight = 0;
+ tools::Long nMinMenuItemHeight = nFontHeight;
+ tools::Long nCheckHeight = 0, nRadioHeight = 0;
Size aMaxSize = ImplGetNativeCheckAndRadioSize(*pWin, nCheckHeight, nRadioHeight); // FIXME
if( aMaxSize.Height() > nMinMenuItemHeight )
nMinMenuItemHeight = aMaxSize.Height();
@@ -1448,8 +1448,8 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
}
Size aSz;
- long nCheckWidth = 0;
- long nMaxWidth = 0;
+ tools::Long nCheckWidth = 0;
+ tools::Long nMaxWidth = 0;
for ( size_t n = pItemList->size(); n; )
{
@@ -1460,7 +1460,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
if ( ImplIsVisible( n ) )
{
- long nWidth = 0;
+ tools::Long nWidth = 0;
// Separator
if (!IsMenuBar()&& (pData->eType == MenuItemType::SEPARATOR))
@@ -1496,8 +1496,8 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
if ( (pData->eType == MenuItemType::STRING) || (pData->eType == MenuItemType::STRINGIMAGE) )
{
const SalLayoutGlyphs* pGlyphs = pData->GetTextGlyphs(pWin);
- long nTextWidth = pWin->GetCtrlTextWidth(pData->aText, pGlyphs);
- long nTextHeight = pWin->GetTextHeight();
+ tools::Long nTextWidth = pWin->GetCtrlTextWidth(pData->aText, pGlyphs);
+ tools::Long nTextHeight = pWin->GetTextHeight();
if (IsMenuBar())
{
@@ -1517,7 +1517,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
if (!IsMenuBar()&& pData->aAccelKey.GetCode() && !ImplAccelDisabled())
{
OUString aName = pData->aAccelKey.GetName();
- long nAccWidth = pWin->GetTextWidth( aName );
+ tools::Long nAccWidth = pWin->GetTextWidth( aName );
nAccWidth += nExtra;
nWidth += nAccWidth;
}
@@ -1559,7 +1559,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
nTitleHeight = aTextBoundRect.GetSize().Height() + 4 * SPACE_AROUND_TITLE ;
aSz.AdjustHeight(nTitleHeight );
- long nWidth = aTextBoundRect.GetSize().Width() + 4 * SPACE_AROUND_TITLE;
+ tools::Long nWidth = aTextBoundRect.GetSize().Width() + 4 * SPACE_AROUND_TITLE;
pWin->Pop();
if ( nWidth > nMaxWidth )
nMaxWidth = nWidth;
@@ -1573,13 +1573,13 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
// currently we rely on internal privileges
unsigned int nDisplayScreen = pWin->ImplGetWindowImpl()->mpFrame->maGeometry.nDisplayScreenNumber;
tools::Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) );
- long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800;
+ tools::Long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800;
if( nMaxWidth > nScreenWidth/2 )
nMaxWidth = nScreenWidth/2;
sal_uInt16 gfxExtra = static_cast<sal_uInt16>(std::max( nExtra, 7L )); // #107710# increase space between checkmarks/images/text
nImgOrChkPos = static_cast<sal_uInt16>(nExtra);
- long nImgOrChkWidth = 0;
+ tools::Long nImgOrChkWidth = 0;
if( aMaxSize.Height() > 0 ) // NWF case
nImgOrChkWidth = aMaxSize.Height() + nExtra;
else // non NWF case
@@ -1624,7 +1624,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
// account for the size of the close button, which actually is a toolbox
// due to NWF this is variable
- long nCloseButtonHeight = static_cast<MenuBarWindow*>(pWindow.get())->MinCloseButtonSize().Height();
+ tools::Long nCloseButtonHeight = static_cast<MenuBarWindow*>(pWindow.get())->MinCloseButtonSize().Height();
if (aSz.Height() < nCloseButtonHeight)
aSz.setHeight( nCloseButtonHeight );
}
@@ -1655,7 +1655,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext & rRenderContext, vcl::W
}
}
-static OUString getShortenedString( const OUString& i_rLong, vcl::RenderContext const & rRenderContext, long i_nMaxWidth )
+static OUString getShortenedString( const OUString& i_rLong, vcl::RenderContext const & rRenderContext, tools::Long i_nMaxWidth )
{
sal_Int32 nPos = -1;
OUString aNonMnem(OutputDevice::GetNonMnemonicString(i_rLong, nPos));
@@ -1712,14 +1712,14 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const tools::R
}
void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
- sal_uInt16 nBorder, long nStartY, MenuItemData const * pThisItemOnly,
+ sal_uInt16 nBorder, tools::Long nStartY, MenuItemData const * pThisItemOnly,
bool bHighlighted, bool bLayout, bool bRollover) const
{
// for symbols: nFontHeight x nFontHeight
- long nFontHeight = rRenderContext.GetTextHeight();
- long nExtra = nFontHeight / 4;
+ tools::Long nFontHeight = rRenderContext.GetTextHeight();
+ tools::Long nExtra = nFontHeight / 4;
- long nCheckHeight = 0, nRadioHeight = 0;
+ tools::Long nCheckHeight = 0, nRadioHeight = 0;
ImplGetNativeCheckAndRadioSize(rRenderContext, nCheckHeight, nRadioHeight);
DecorationView aDecoView(&rRenderContext);
@@ -1784,7 +1784,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
if (aPos.Y() >= 0)
{
- long nTextOffsetY = (pData->aSz.Height() - nFontHeight) / 2;
+ tools::Long nTextOffsetY = (pData->aSz.Height() - nFontHeight) / 2;
if (IsMenuBar())
nTextOffsetY += (aOutSz.Height()-pData->aSz.Height()) / 2;
DrawTextFlags nTextStyle = DrawTextFlags::NONE;
@@ -1871,7 +1871,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
if (bHighlighted)
nState |= ControlState::SELECTED;
- long nCtrlHeight = (pData->nBits & MenuItemBits::RADIOCHECK) ? nCheckHeight : nRadioHeight;
+ tools::Long nCtrlHeight = (pData->nBits & MenuItemBits::RADIOCHECK) ? nCheckHeight : nRadioHeight;
aTmpPos.setX( aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight) / 2 );
aTmpPos.setY( aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight) / 2 );
@@ -1959,7 +1959,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
rRenderContext.SetBackground(Wallpaper(aBg));
}
// how much space is there for the text?
- long nMaxItemTextWidth = aOutSz.Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
+ tools::Long nMaxItemTextWidth = aOutSz.Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
if (!IsMenuBar() && pData->aAccelKey.GetCode() && !ImplAccelDisabled())
{
OUString aAccText = pData->aAccelKey.GetName();
@@ -2020,7 +2020,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
{
ControlState nState = ControlState::NONE;
Size aTmpSz(0, 0);
- long aSpacing = 0;
+ tools::Long aSpacing = 0;
if (!ImplGetNativeSubmenuArrowSize(rRenderContext, aTmpSz, aSpacing))
{
@@ -2231,9 +2231,9 @@ void Menu::ImplFillLayoutData() const
}
}
-tools::Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
+tools::Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, tools::Long nIndex ) const
{
- long nItemIndex = -1;
+ tools::Long nItemIndex = -1;
if( ! mpLayoutData )
ImplFillLayoutData();
if( mpLayoutData )
@@ -2250,9 +2250,9 @@ tools::Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) con
return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle();
}
-long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
+tools::Long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
{
- long nIndex = -1;
+ tools::Long nIndex = -1;
rItemID = 0;
if( ! mpLayoutData )
ImplFillLayoutData();
@@ -2475,7 +2475,7 @@ VclPtr<vcl::Window> MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWind
pMenu->pStartedFrom = nullptr;
pMenu->pWindow = pWindow;
pMenuBarWindow->SetMenu(pMenu);
- long nHeight = pWindow ? pMenu->ImplCalcSize(pWindow).Height() : 0;
+ tools::Long nHeight = pWindow ? pMenu->ImplCalcSize(pWindow).Height() : 0;
// depending on the native implementation or the displayable flag
// the menubar windows is suppressed (ie, height=0)
@@ -2943,7 +2943,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
Application::GetBestScreen( tools::Rectangle( aDesktopTL, aRect.GetSize() ) ));
}
- long nMaxHeight = aDesktopRect.GetHeight();
+ tools::Long nMaxHeight = aDesktopRect.GetHeight();
//rhbz#1021915. If a menu won't fit in the desired location the default
//mode is to place it somewhere it will fit. e.g. above, left, right. For
@@ -2958,8 +2958,8 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
tools::Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ),
pRef->OutputToAbsoluteScreenPixel( aRect.BottomRight() ) );
- long nHeightAbove = devRect.Top() - aDesktopRect.Top();
- long nHeightBelow = aDesktopRect.Bottom() - devRect.Bottom();
+ tools::Long nHeightAbove = devRect.Top() - aDesktopRect.Top();
+ tools::Long nHeightBelow = aDesktopRect.Bottom() - devRect.Bottom();
nMaxHeight = std::min(nMaxHeight, std::max(nHeightAbove, nHeightBelow));
}
@@ -3065,11 +3065,11 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
return bRealExecute ? nSelectedId : 0;
}
-sal_uInt16 PopupMenu::ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible ) const
+sal_uInt16 PopupMenu::ImplCalcVisEntries( tools::Long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible ) const
{
nMaxHeight -= 2 * ImplGetFloatingWindow()->GetScrollerHeight();
- long nHeight = 0;
+ tools::Long nHeight = 0;
size_t nEntries = pItemList->size();
sal_uInt16 nVisEntries = 0;
@@ -3093,9 +3093,9 @@ sal_uInt16 PopupMenu::ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntr
return nVisEntries;
}
-long PopupMenu::ImplCalcHeight( sal_uInt16 nEntries ) const
+tools::Long PopupMenu::ImplCalcHeight( sal_uInt16 nEntries ) const
{
- long nHeight = 0;
+ tools::Long nHeight = 0;
sal_uInt16 nFound = 0;
for ( size_t n = 0; ( nFound < nEntries ) && ( n < pItemList->size() ); n++ )
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 52913815f2c4..863f4c9dbb09 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -78,9 +78,9 @@ void DecoToolBox::calcMinSize()
aTbx.disposeAndClear();
}
-void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
+void DecoToolBox::SetImages( tools::Long nMaxHeight, bool bForce )
{
- long border = getMinSize().Height() - maImage.GetSizePixel().Height();
+ tools::Long border = getMinSize().Height() - maImage.GetSizePixel().Height();
if( !nMaxHeight && lastSize != -1 )
nMaxHeight = lastSize + border; // don't change anything if called with 0
@@ -195,7 +195,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen )
}
}
-void MenuBarWindow::SetHeight(long nHeight)
+void MenuBarWindow::SetHeight(tools::Long nHeight)
{
setPosSizePixel(0, 0, 0, nHeight, PosSizeFlags::Height);
}
@@ -290,7 +290,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
return;
m_pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu.get());
- long nX = 0;
+ tools::Long nX = 0;
MenuItemData* pData = nullptr;
for ( sal_uLong n = 0; n < m_nHighlightedItem; n++ )
{
@@ -615,7 +615,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
if (!m_pMenu)
return;
- long nX = 0;
+ tools::Long nX = 0;
size_t nCount = m_pMenu->pItemList->size();
Size aOutputSize = GetOutputSizePixel();
@@ -695,7 +695,7 @@ tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
tools::Rectangle aRect;
if( m_pMenu )
{
- long nX = 0;
+ tools::Long nX = 0;
size_t nCount = m_pMenu->pItemList->size();
for ( size_t n = 0; n < nCount; n++ )
{
@@ -947,9 +947,9 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
void MenuBarWindow::Resize()
{
Size aOutSz = GetOutputSizePixel();
- long n = aOutSz.Height()-4;
- long nX = aOutSz.Width()-3;
- long nY = 2;
+ tools::Long n = aOutSz.Height()-4;
+ tools::Long nX = aOutSz.Width()-3;
+ tools::Long nY = 2;
if ( m_aCloseBtn->IsVisible() )
{
@@ -957,7 +957,7 @@ void MenuBarWindow::Resize()
m_aCloseBtn->SetImages(n);
Size aTbxSize( m_aCloseBtn->CalcWindowSizePixel() );
nX -= aTbxSize.Width();
- long nTbxY = (aOutSz.Height() - aTbxSize.Height())/2;
+ tools::Long nTbxY = (aOutSz.Height() - aTbxSize.Height())/2;
m_aCloseBtn->setPosSizePixel(nX, nTbxY, aTbxSize.Width(), aTbxSize.Height());
nX -= 3;
m_aCloseBtn->Show();
@@ -983,7 +983,7 @@ sal_uInt16 MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const
{
if( m_pMenu )
{
- long nX = 0;
+ tools::Long nX = 0;
size_t nCount = m_pMenu->pItemList->size();
for ( size_t n = 0; n < nCount; n++ )
{
@@ -1038,7 +1038,7 @@ void MenuBarWindow::LayoutChanged()
ApplySettings(*this);
// if the font was changed.
- long nHeight = m_pMenu->ImplCalcSize(this).Height();
+ tools::Long nHeight = m_pMenu->ImplCalcSize(this).Height();
// depending on the native implementation or the displayable flag
// the menubar windows is suppressed (ie, height=0)
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 487746c09c80..bd7753bec9ac 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -36,7 +36,7 @@ inserts here the button that leads to the download of the update.
*/
class DecoToolBox : public ToolBox
{
- long lastSize;
+ tools::Long lastSize;
Size maMinSize;
public:
@@ -44,7 +44,7 @@ public:
void DataChanged( const DataChangedEvent& rDCEvt ) override;
- void SetImages( long nMaxHeight, bool bForce = false );
+ void SetImages( tools::Long nMaxHeight, bool bForce = false );
void calcMinSize();
const Size& getMinSize() const { return maMinSize;}
@@ -121,7 +121,7 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
void SetMenu(MenuBar* pMenu);
- void SetHeight(long nHeight);
+ void SetHeight(tools::Long nHeight);
void KillActivePopup();
void PopupClosed(Menu const * pMenu);
sal_uInt16 GetHighlightedItem() const { return m_nHighlightedItem; }
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 28ffca8d1526..cfcb58b8f63e 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -168,9 +168,9 @@ void MenuFloatingWindow::ApplySettings(vcl::RenderContext& rRenderContext)
}
/// Get a negative pixel offset for an offset menu
-long MenuFloatingWindow::ImplGetStartY() const
+tools::Long MenuFloatingWindow::ImplGetStartY() const
{
- long nY = 0;
+ tools::Long nY = 0;
if( pMenu )
{
// avoid crash if somehow menu got disposed, and MenuItemList is empty (workaround for tdf#104686)
@@ -215,8 +215,8 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
if( ! pMenu )
return;
- long nY = GetInitialItemY();
- long nMouseY = rMEvt.GetPosPixel().Y();
+ tools::Long nY = GetInitialItemY();
+ tools::Long nMouseY = rMEvt.GetPosPixel().Y();
Size aOutSz = GetOutputSizePixel();
if ( ( nMouseY >= nY ) && ( nMouseY < aOutSz.Height() ) )
{
@@ -227,7 +227,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
if ( pMenu->ImplIsVisible( n ) )
{
MenuItemData* pItemData = pMenu->pItemList->GetDataFromPos( n );
- long nOldY = nY;
+ tools::Long nOldY = nY;
nY += pItemData->aSz.Height();
if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) && pMenu->ImplIsSelectable( n ) )
{
@@ -236,7 +236,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
{
// only when clicked over the arrow...
Size aSz = GetOutputSizePixel();
- long nFontHeight = GetTextHeight();
+ tools::Long nFontHeight = GetTextHeight();
bPopupArea = ( rMEvt.GetPosPixel().X() >= ( aSz.Width() - nFontHeight - nFontHeight/4 ) );
}
@@ -338,7 +338,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void )
return;
pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu.get());
- long nY = nScrollerHeight+ImplGetStartY();
+ tools::Long nY = nScrollerHeight+ImplGetStartY();
MenuItemData* pData = nullptr;
for ( sal_uLong n = 0; n < nHighlightedItem; n++ )
{
@@ -587,7 +587,7 @@ void MenuFloatingWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
// not when clicked over the arrow...
Size aSz = GetOutputSizePixel();
- long nFontHeight = GetTextHeight();
+ tools::Long nFontHeight = GetTextHeight();
if ( rMEvt.GetPosPixel().X() < ( aSz.Width() - nFontHeight - nFontHeight/4 ) )
EndExecute();
}
@@ -644,7 +644,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
const auto pItemData = pMenu->GetItemList()->GetDataFromPos( nFirstEntry );
if ( pItemData )
{
- long nScrollEntryHeight = pItemData->aSz.Height();
+ tools::Long nScrollEntryHeight = pItemData->aSz.Height();
if ( !bScrollDown )
{
@@ -667,7 +667,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
const auto pItemData = pMenu->GetItemList()->GetDataFromPos( nFirstEntry );
if ( pItemData )
{
- long nScrollEntryHeight = pItemData->aSz.Height();
+ tools::Long nScrollEntryHeight = pItemData->aSz.Height();
nFirstEntry = pMenu->ImplGetNextVisible( nFirstEntry );
SAL_WARN_IF( nFirstEntry == ITEMPOS_INVALID, "vcl", "Scroll?!" );
@@ -678,7 +678,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
Invalidate();
}
- long nHeight = GetOutputSizePixel().Height();
+ tools::Long nHeight = GetOutputSizePixel().Height();
sal_uInt16 nLastVisible;
static_cast<PopupMenu*>(pMenu.get())->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible );
if ( pMenu->ImplGetNextVisible( nLastVisible ) == ITEMPOS_INVALID )
@@ -698,9 +698,9 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos )
{
Size aOutSz = GetOutputSizePixel();
- long nY = nScrollerHeight;
- long nMouseY = rMousePos.Y();
- long nDelta = 0;
+ tools::Long nY = nScrollerHeight;
+ tools::Long nMouseY = rMousePos.Y();
+ tools::Long nDelta = 0;
if ( bScrollUp && ( nMouseY < nY ) )
{
@@ -717,7 +717,7 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos )
return;
aScrollTimer.Stop(); // if scrolled through MouseMove.
- long nTimeout;
+ tools::Long nTimeout;
if ( nDelta < 3 )
nTimeout = 200;
else if ( nDelta < 5 )
@@ -798,9 +798,9 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTime
/// Calculate the initial vertical pixel offset of the first item.
/// May be negative for scrolled windows.
-long MenuFloatingWindow::GetInitialItemY(long *pStartY) const
+tools::Long MenuFloatingWindow::GetInitialItemY(tools::Long *pStartY) const
{
- long nStartY = ImplGetStartY();
+ tools::Long nStartY = ImplGetStartY();
if (pStartY)
*pStartY = nStartY;
return nScrollerHeight + nStartY +
@@ -813,12 +813,12 @@ void MenuFloatingWindow::InvalidateItem(sal_uInt16 nPos)
if (!pMenu)
return;
- long nY = GetInitialItemY();
+ tools::Long nY = GetInitialItemY();
size_t nCount = pMenu->pItemList->size();
for (size_t n = 0; n < nCount; n++)
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
- long nHeight = pData->aSz.Height();
+ tools::Long nHeight = pData->aSz.Height();
if (n == nPos)
{
Size aWidth( GetSizePixel() );
@@ -836,9 +836,9 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
Size aSz(GetOutputSizePixel());
- long nX = 0;
- long nStartY;
- long nY = GetInitialItemY(&nStartY);
+ tools::Long nX = 0;
+ tools::Long nStartY;
+ tools::Long nY = GetInitialItemY(&nStartY);
int nOuterSpaceX = ImplGetSVData()->maNWFData.mnMenuFormatBorderX;
@@ -858,7 +858,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
tools::Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height()));
if (pData->nBits & MenuItemBits::POPUPSELECT)
{
- long nFontHeight = GetTextHeight();
+ tools::Long nFontHeight = GetTextHeight();
aItemRect.AdjustRight( -(nFontHeight + nFontHeight / 4) );
}
@@ -919,8 +919,8 @@ tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
tools::Rectangle aRect;
Size aSz = GetOutputSizePixel();
- long nStartY = ImplGetStartY();
- long nY = nScrollerHeight+nStartY;
+ tools::Long nStartY = ImplGetStartY();
+ tools::Long nY = nScrollerHeight+nStartY;
size_t nCount = pMenu->pItemList->size();
for ( size_t n = 0; n < nCount; n++ )
@@ -934,7 +934,7 @@ tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
aRect = tools::Rectangle( Point( 0, nY ), Size( aSz.Width(), pData->aSz.Height() ) );
if ( pData->nBits & MenuItemBits::POPUPSELECT )
{
- long nFontHeight = GetTextHeight();
+ tools::Long nFontHeight = GetTextHeight();
aRect.AdjustRight( -(nFontHeight + nFontHeight/4) );
}
}
@@ -1216,7 +1216,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire))
{
pBuffer->SetClipRegion();
- long nX = 0;
+ tools::Long nX = 0;
Size aPxSize(GetOutputSizePixel());
aPxSize.AdjustWidth( -nX );
ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER);
@@ -1247,8 +1247,8 @@ void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bo
rRenderContext.SetClipRegion();
Size aOutSz(GetOutputSizePixel());
- long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight);
- long nX = 0;
+ tools::Long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight);
+ tools::Long nX = 0;
tools::Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight));
DecorationView aDecoView(&rRenderContext);
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index c091b46add4f..c9f73c4563d2 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -77,10 +77,10 @@ protected:
void ImplScroll( bool bUp );
void ImplCursorUpDown( bool bUp, bool bHomeEnd = false );
void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown );
- long ImplGetStartY() const;
+ tools::Long ImplGetStartY() const;
tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos );
- long GetInitialItemY( long *pOptStartY = nullptr ) const;
+ tools::Long GetInitialItemY( tools::Long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
public:
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 0fc8bb6d02f8..fbe81aed7499 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -138,8 +138,8 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged )
return;
sal_uInt64 nTime = tools::Time::GetSystemTicks();
- long nX = mpWindowImpl->mpFrameData->mnLastMouseX;
- long nY = mpWindowImpl->mpFrameData->mnLastMouseY;
+ tools::Long nX = mpWindowImpl->mpFrameData->mnLastMouseX;
+ tools::Long nY = mpWindowImpl->mpFrameData->mnLastMouseY;
sal_uInt16 nCode = nMouseCode;
MouseEventModifiers nMode = mpWindowImpl->mpFrameData->mnMouseMode;
bool bLeave;
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 80b2f85b2349..476105a5044f 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -323,7 +323,7 @@ namespace vcl
void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vcl::Window const & rWindow,
const tools::Rectangle& rRect, sal_uInt16 nHighlight,
bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly,
- Color* pSelectionTextColor, long nCornerRadius, Color const * pPaintColor)
+ Color* pSelectionTextColor, tools::Long nCornerRadius, Color const * pPaintColor)
{
if (rRect.IsEmpty())
return;
@@ -854,7 +854,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
}
void Window::ImplMoveInvalidateRegion( const tools::Rectangle& rRect,
- long nHorzScroll, long nVertScroll,
+ tools::Long nHorzScroll, tools::Long nVertScroll,
bool bChildren )
{
if ( (mpWindowImpl->mnPaintFlags & (ImplPaintFlags::Paint | ImplPaintFlags::PaintAll)) == ImplPaintFlags::Paint )
@@ -877,7 +877,7 @@ void Window::ImplMoveInvalidateRegion( const tools::Rectangle& rRect,
}
void Window::ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect,
- long nHorzScroll, long nVertScroll,
+ tools::Long nHorzScroll, tools::Long nVertScroll,
bool bChildren )
{
// also shift Paint-Region when paints need processing
@@ -1425,8 +1425,8 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
{
if( pChild->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame && pChild->IsVisible() )
{
- long nDeltaX = pChild->mnOutOffX - mnOutOffX;
- long nDeltaY = pChild->mnOutOffY - mnOutOffY;
+ tools::Long nDeltaX = pChild->mnOutOffX - mnOutOffX;
+ tools::Long nDeltaY = pChild->mnOutOffY - mnOutOffY;
Point aPos( i_rPos );
aPos += Point(nDeltaX, nDeltaY);
@@ -1444,8 +1444,8 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
mbDevOutput = true;
const OutputDevice *pOutDev = GetOutDev();
- long nOldDPIX = pOutDev->GetDPIX();
- long nOldDPIY = pOutDev->GetDPIY();
+ tools::Long nOldDPIX = pOutDev->GetDPIX();
+ tools::Long nOldDPIY = pOutDev->GetDPIY();
mnDPIX = i_pTargetOutDev->GetDPIX();
mnDPIY = i_pTargetOutDev->GetDPIY();
bool bOutput = IsOutputEnabled();
@@ -1542,11 +1542,11 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
{
if( pChild->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame && pChild->IsVisible() )
{
- long nDeltaX = pChild->mnOutOffX - mnOutOffX;
+ tools::Long nDeltaX = pChild->mnOutOffX - mnOutOffX;
if( pOutDev->HasMirroredGraphics() )
nDeltaX = mnOutWidth - nDeltaX - pChild->mnOutWidth;
- long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel();
+ tools::Long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel();
Point aPos( i_rPos );
Point aDelta( nDeltaX, nDeltaY );
aPos += aDelta;
@@ -1636,7 +1636,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
}
void Window::ImplScroll( const tools::Rectangle& rRect,
- long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
+ tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags )
{
if ( !IsDeviceOutputNecessary() )
return;
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d68b4decc335..0212f7da0e5f 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -113,7 +113,7 @@ PrintDialog::PrintPreviewWindow::~PrintPreviewWindow()
void PrintDialog::PrintPreviewWindow::Resize()
{
Size aNewSize(GetOutputSizePixel());
- long nTextHeight = GetDrawingArea()->get_text_height();
+ tools::Long nTextHeight = GetDrawingArea()->get_text_height();
// leave small space for decoration
aNewSize.AdjustWidth( -(nTextHeight + 2) );
aNewSize.AdjustHeight( -(nTextHeight + 2) );
@@ -138,8 +138,8 @@ void PrintDialog::PrintPreviewWindow::Resize()
if( aScaledSize.Width() > aNewSize.Width() )
fScale = double(aNewSize.Width())/double(aScaledSize.Width());
}
- aScaledSize.setWidth( long(aScaledSize.Width()*fScale) );
- aScaledSize.setHeight( long(aScaledSize.Height()*fScale) );
+ aScaledSize.setWidth( tools::Long(aScaledSize.Width()*fScale) );
+ aScaledSize.setHeight( tools::Long(aScaledSize.Height()*fScale) );
maPreviewSize = aScaledSize;
@@ -463,12 +463,12 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
double fX = double(aSubSize.Width()) / double(aSampleTextSize.Width());
double fY = double(aSubSize.Height()) / double(aSampleTextSize.Height());
double fScale = (fX < fY) ? fX : fY;
- long nFontHeight = long(24.0 * fScale) - 3;
+ tools::Long nFontHeight = tools::Long(24.0 * fScale) - 3;
if (nFontHeight < 5)
nFontHeight = 5;
aFont.SetFontSize(Size( 0, nFontHeight));
rRenderContext.SetFont(aFont);
- long nTextHeight = rRenderContext.GetTextHeight();
+ tools::Long nTextHeight = rRenderContext.GetTextHeight();
for (int i = 0; i < nPages; i++)
{
OUString aPageText(OUString::number(i + 1));
@@ -1109,8 +1109,8 @@ void PrintDialog::updateNup( bool i_bMayUseCache )
{
int nRows = mxNupRowsEdt->get_value();
int nCols = mxNupColEdt->get_value();
- long nPageMargin = mxPageMarginEdt->denormalize(mxPageMarginEdt->get_value( FieldUnit::MM_100TH ));
- long nSheetMargin = mxSheetMarginEdt->denormalize(mxSheetMarginEdt->get_value( FieldUnit::MM_100TH ));
+ tools::Long nPageMargin = mxPageMarginEdt->denormalize(mxPageMarginEdt->get_value( FieldUnit::MM_100TH ));
+ tools::Long nSheetMargin = mxSheetMarginEdt->denormalize(mxSheetMarginEdt->get_value( FieldUnit::MM_100TH ));
PrinterController::MultiPageSetup aMPS;
aMPS.nRows = nRows;
@@ -1166,8 +1166,8 @@ void PrintDialog::updateNupFromPages( bool i_bMayUseCache )
int nPages = mxNupPagesBox->get_active_id().toInt32();
int nRows = mxNupRowsEdt->get_value();
int nCols = mxNupColEdt->get_value();
- long nPageMargin = mxPageMarginEdt->denormalize(mxPageMarginEdt->get_value( FieldUnit::MM_100TH ));
- long nSheetMargin = mxSheetMarginEdt->denormalize(mxSheetMarginEdt->get_value( FieldUnit::MM_100TH ));
+ tools::Long nPageMargin = mxPageMarginEdt->denormalize(mxPageMarginEdt->get_value( FieldUnit::MM_100TH ));
+ tools::Long nSheetMargin = mxSheetMarginEdt->denormalize(mxSheetMarginEdt->get_value( FieldUnit::MM_100TH ));
bool bCustom = false;
if( nPages == 1 )
@@ -1224,8 +1224,8 @@ void PrintDialog::updateNupFromPages( bool i_bMayUseCache )
Size aSize( getJobPageSize() );
// maximum sheet distance: 1/2 sheet
- long nHorzMax = aSize.Width()/2;
- long nVertMax = aSize.Height()/2;
+ tools::Long nHorzMax = aSize.Width()/2;
+ tools::Long nVertMax = aSize.Height()/2;
if( nSheetMargin > nHorzMax )
nSheetMargin = nHorzMax;
if( nSheetMargin > nVertMax )
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 51838b82da7a..3fd68cf09351 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -222,19 +222,19 @@ void ImplWheelWindow::ImplRecalcScrollValues()
else if( !o3tl::convertsToAtLeast(fValX, LONG_MIN) )
mnActDeltaX = LONG_MIN;
else
- mnActDeltaX = static_cast<long>(fValX);
+ mnActDeltaX = static_cast<tools::Long>(fValX);
if( !o3tl::convertsToAtMost(fValY, LONG_MAX) )
mnActDeltaY = LONG_MAX;
else if( !o3tl::convertsToAtLeast(fValY, LONG_MIN) )
mnActDeltaY = LONG_MIN;
else
- mnActDeltaY = static_cast<long>(fValY);
+ mnActDeltaY = static_cast<tools::Long>(fValY);
}
}
}
-PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
+PointerStyle ImplWheelWindow::ImplGetMousePointer( tools::Long nDistX, tools::Long nDistY )
{
PointerStyle eStyle;
const StartAutoScrollFlags nFlags = ImplGetSVData()->mpWinData->mnAutoScrollFlags;
@@ -310,8 +310,8 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt )
FloatingWindow::MouseMove( rMEvt );
const Point aMousePos( OutputToScreenPixel( rMEvt.GetPosPixel() ) );
- const long nDistX = aMousePos.X() - maCenter.X();
- const long nDistY = aMousePos.Y() - maCenter.Y();
+ const tools::Long nDistX = aMousePos.X() - maCenter.X();
+ const tools::Long nDistY = aMousePos.Y() - maCenter.Y();
mnActDist = static_cast<sal_uLong>(hypot( static_cast<double>(nDistX), nDistY ));
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index ffa6f7bbe173..394fec0f34c2 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -169,7 +169,7 @@ void Splitter::SetHorizontal(bool bNew)
}
}
-void Splitter::SetKeyboardStepSize( long nStepSize )
+void Splitter::SetKeyboardStepSize( tools::Long nStepSize )
{
mnKeyboardStepSize = nStepSize;
}
@@ -198,8 +198,8 @@ bool Splitter::ImplSplitterActive()
bool bActive = true;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
- long nA = rSettings.GetScrollBarSize();
- long nB = StyleSettings::GetSplitSize();
+ tools::Long nA = rSettings.GetScrollBarSize();
+ tools::Long nB = StyleSettings::GetSplitSize();
Size aSize = GetOutputSize();
if ( mbHorzSplit )
@@ -228,7 +228,7 @@ void Splitter::MouseButtonDown( const MouseEvent& rMEvt )
else
aPos.setY( mnLastSplitPos );
ImplSplitMousePos( aPos );
- long nTemp = mnSplitPos;
+ tools::Long nTemp = mnSplitPos;
if ( mbHorzSplit )
SetSplitPosPixel( aPos.X() );
else
@@ -251,7 +251,7 @@ void Splitter::Tracking( const TrackingEvent& rTEvt )
if ( !rTEvt.IsTrackingCanceled() )
{
- long nNewPos;
+ tools::Long nNewPos;
if ( mbHorzSplit )
nNewPos = maDragPos.X();
else
@@ -291,7 +291,7 @@ void Splitter::Tracking( const TrackingEvent& rTEvt )
if ( mbDragFull )
{
maDragPos = aNewPos;
- long nNewPos;
+ tools::Long nNewPos;
if ( mbHorzSplit )
nNewPos = maDragPos.X();
else
@@ -326,7 +326,7 @@ void Splitter::ImplKbdTracking( vcl::KeyCode aKeyCode )
if ( nCode != KEY_ESCAPE )
{
- long nNewPos;
+ tools::Long nNewPos;
if ( mbHorzSplit )
nNewPos = maDragPos.X();
else
@@ -411,7 +411,7 @@ void Splitter::ImplKbdTracking( vcl::KeyCode aKeyCode )
}
maDragPos = aNewPos;
- long nNewPos;
+ tools::Long nNewPos;
if ( mbHorzSplit )
nNewPos = maDragPos.X();
else
@@ -451,7 +451,7 @@ void Splitter::SetDragRectPixel( const tools::Rectangle& rDragRect, vcl::Window*
mpRefWin = _pRefWin;
}
-void Splitter::SetSplitPosPixel( long nNewPos )
+void Splitter::SetSplitPosPixel( tools::Long nNewPos )
{
mnSplitPos = nNewPos;
}
@@ -521,7 +521,7 @@ void Splitter::ImplRestoreSplitter()
}
ImplSplitMousePos( aPos );
- long nTemp = mnSplitPos;
+ tools::Long nTemp = mnSplitPos;
if ( mbHorzSplit )
SetSplitPosPixel( aPos.X() );
else
@@ -611,7 +611,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt )
else
aPos.setY( 0 );
ImplSplitMousePos( aPos );
- long nTemp = mnSplitPos;
+ tools::Long nTemp = mnSplitPos;
if ( mbHorzSplit )
SetSplitPosPixel( aPos.X() );
else
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index e4b1f53d036f..2d26fcff10e8 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -51,18 +51,18 @@ class ImplSplitItem
public:
ImplSplitItem();
- long mnSize;
- long mnPixSize;
- long mnLeft;
- long mnTop;
- long mnWidth;
- long mnHeight;
- long mnSplitPos;
- long mnSplitSize;
- long mnOldSplitPos;
- long mnOldSplitSize;
- long mnOldWidth;
- long mnOldHeight;
+ tools::Long mnSize;
+ tools::Long mnPixSize;
+ tools::Long mnLeft;
+ tools::Long mnTop;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
+ tools::Long mnSplitPos;
+ tools::Long mnSplitSize;
+ tools::Long mnOldSplitPos;
+ tools::Long mnOldSplitSize;
+ tools::Long mnOldWidth;
+ tools::Long mnOldHeight;
std::unique_ptr<ImplSplitSet> mpSet;
VclPtr<vcl::Window> mpWindow;
VclPtr<vcl::Window> mpOrgParent;
@@ -71,9 +71,9 @@ public:
bool mbFixed;
bool mbSubSize;
/// Minimal width or height of the item. -1 means no restriction.
- long mnMinSize;
+ tools::Long mnMinSize;
/// Maximal width or height of the item. -1 means no restriction.
- long mnMaxSize;
+ tools::Long mnMaxSize;
};
}
@@ -84,8 +84,8 @@ public:
ImplSplitSet();
std::vector< ImplSplitItem > mvItems;
- long mnLastSize;
- long mnSplitSize;
+ tools::Long mnLastSize;
+ tools::Long mnSplitSize;
sal_uInt16 mnId;
bool mbCalcPix;
};
@@ -128,7 +128,7 @@ ImplSplitSet::ImplSplitSet() :
size has not lower or upper bound.
*/
namespace {
- long ValidateSize (const long nSize, const ImplSplitItem & rItem)
+ tools::Long ValidateSize (const tools::Long nSize, const ImplSplitItem & rItem)
{
if (rItem.mnMinSize>=0 && nSize<rItem.mnMinSize)
return rItem.mnMinSize;
@@ -140,8 +140,8 @@ namespace {
}
static void ImplCalcBorder( WindowAlign eAlign,
- long& rLeft, long& rTop,
- long& rRight, long& rBottom )
+ tools::Long& rLeft, tools::Long& rTop,
+ tools::Long& rRight, tools::Long& rBottom )
{
switch ( eAlign )
{
@@ -175,8 +175,8 @@ static void ImplCalcBorder( WindowAlign eAlign,
void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- long nDX = mnDX;
- long nDY = mnDY;
+ tools::Long nDX = mnDX;
+ tools::Long nDY = mnDY;
switch (meAlign)
{
@@ -199,8 +199,8 @@ void SplitWindow::ImplDrawBorderLine(vcl::RenderContext& rRenderContext)
return;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- long nDX = mnDX;
- long nDY = mnDY;
+ tools::Long nDX = mnDX;
+ tools::Long nDY = mnDY;
switch (meAlign)
{
@@ -349,8 +349,8 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
}
static void ImplCalcSet( ImplSplitSet* pSet,
- long nSetLeft, long nSetTop,
- long nSetWidth, long nSetHeight,
+ tools::Long nSetLeft, tools::Long nSetTop,
+ tools::Long nSetWidth, tools::Long nSetHeight,
bool bRows, bool bDown = true )
{
if ( pSet->mvItems.empty() )
@@ -360,9 +360,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
sal_uInt16 nCalcItems;
size_t nItems = pSet->mvItems.size();
sal_uInt16 nAbsItems;
- long nCalcSize;
- long nPos;
- long nMaxPos;
+ tools::Long nCalcSize;
+ tools::Long nPos;
+ tools::Long nMaxPos;
std::vector< ImplSplitItem >& rItems = pSet->mvItems;
bool bEmpty;
@@ -374,12 +374,12 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nCalcSize -= (rItems.size()-1)*pSet->mnSplitSize;
if ( pSet->mbCalcPix || (pSet->mnLastSize != nCalcSize) )
{
- long nPercentFactor = 10;
- long nRelCount = 0;
- long nPercent = 0;
- long nRelPercent = 0;
- long nAbsSize = 0;
- long nCurSize = 0;
+ tools::Long nPercentFactor = 10;
+ tools::Long nRelCount = 0;
+ tools::Long nPercent = 0;
+ tools::Long nRelPercent = 0;
+ tools::Long nAbsSize = 0;
+ tools::Long nCurSize = 0;
for ( const auto& rItem : rItems )
{
if ( rItem.mnBits & SplitWindowItemFlags::RelativeSize )
@@ -393,7 +393,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nPercent *= nPercentFactor;
if ( nRelCount )
{
- long nRelPercentBase = 1000;
+ tools::Long nRelPercentBase = 1000;
while ( (nRelCount > nRelPercentBase) && (nPercentFactor < 100000) )
{
nRelPercentBase *= 10;
@@ -409,7 +409,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
if ( !nPercent )
nPercent = 1;
- long nSizeDelta = nCalcSize-nAbsSize;
+ tools::Long nSizeDelta = nCalcSize-nAbsSize;
for ( auto& rItem : rItems )
{
if ( rItem.mnBits & SplitWindowItemFlags::RelativeSize )
@@ -439,7 +439,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( nSizeDelta )
{
nAbsItems = 0;
- long nSizeWinSize = 0;
+ tools::Long nSizeWinSize = 0;
// first resize absolute items relative
for ( const auto& rItem : rItems )
@@ -453,7 +453,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
// do not compensate rounding errors here
if ( (nAbsItems < o3tl::make_unsigned(std::abs( nSizeDelta ))) && nSizeWinSize )
{
- long nNewSizeWinSize = 0;
+ tools::Long nNewSizeWinSize = 0;
for ( auto& rItem : rItems )
{
@@ -504,15 +504,15 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
// subtract size of individual items
- long nErrorSum = nSizeDelta % nCalcItems;
- long nCurSizeDelta = nSizeDelta / nCalcItems;
+ tools::Long nErrorSum = nSizeDelta % nCalcItems;
+ tools::Long nCurSizeDelta = nSizeDelta / nCalcItems;
nMins = 0;
for ( auto& rItem : rItems )
{
if ( rItem.mbSubSize )
{
- long* pSize = &(rItem.mnPixSize);
- long nTempErr;
+ tools::Long* pSize = &(rItem.mnPixSize);
+ tools::Long nTempErr;
if ( nErrorSum )
{
@@ -526,7 +526,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( (*pSize+nCurSizeDelta+nTempErr) <= 0 )
{
- long nTemp = *pSize;
+ tools::Long nTemp = *pSize;
if ( nTemp )
{
*pSize -= nTemp;
@@ -779,8 +779,8 @@ static void ImplCalcLogSize( std::vector< ImplSplitItem > & rItems, size_t nItem
{
// update original sizes
size_t i;
- long nRelSize = 0;
- long nPerSize = 0;
+ tools::Long nRelSize = 0;
+ tools::Long nPerSize = 0;
for ( i = 0; i < nItems; i++ )
{
@@ -817,9 +817,9 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
return;
size_t nItems = pSet->mvItems.size();
- long nPos;
- long nTop;
- long nBottom;
+ tools::Long nPos;
+ tools::Long nTop;
+ tools::Long nBottom;
std::vector< ImplSplitItem >& rItems = pSet->mvItems;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
@@ -829,8 +829,8 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
{
nPos = rItems[i].mnSplitPos;
- long nItemSplitSize = rItems[i].mnSplitSize;
- long nSplitSize = pSet->mnSplitSize;
+ tools::Long nItemSplitSize = rItems[i].mnSplitSize;
+ tools::Long nSplitSize = pSet->mnSplitSize;
if (bRows)
{
nTop = rItems[i].mnLeft;
@@ -892,7 +892,7 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
}
sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
+ tools::Long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
bool bRows )
{
if ( pSet->mvItems.empty() )
@@ -900,11 +900,11 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
sal_uInt16 nSplitTest;
size_t nItems = pSet->mvItems.size();
- long nMPos1;
- long nMPos2;
- long nPos;
- long nTop;
- long nBottom;
+ tools::Long nMPos1;
+ tools::Long nMPos2;
+ tools::Long nPos;
+ tools::Long nTop;
+ tools::Long nBottom;
std::vector< ImplSplitItem >& rItems = pSet->mvItems;
if ( bRows )
@@ -969,14 +969,14 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
}
sal_uInt16 SplitWindow::ImplTestSplit( const SplitWindow* pWindow, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos )
+ tools::Long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos )
{
// Resizable SplitWindow should be treated different
if ( pWindow->mnWinStyle & WB_SIZEABLE )
{
- long nTPos;
- long nPos;
- long nBorder;
+ tools::Long nTPos;
+ tools::Long nPos;
+ tools::Long nBorder;
if ( pWindow->mbHorz )
{
@@ -1006,7 +1006,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( const SplitWindow* pWindow, const Point&
}
nTPos = rPos.X();
}
- long nSplitSize = pWindow->mpMainSet->mnSplitSize-2;
+ tools::Long nSplitSize = pWindow->mpMainSet->mnSplitSize-2;
if (pWindow->mbFadeOut)
nSplitSize += SPLITWIN_SPLITSIZEEXLN;
if ( !pWindow->mbBottomRight )
@@ -1157,7 +1157,7 @@ void SplitWindow::dispose()
DockingWindow::dispose();
}
-void SplitWindow::ImplSetWindowSize( long nDelta )
+void SplitWindow::ImplSetWindowSize( tools::Long nDelta )
{
if ( !nDelta )
return;
@@ -1200,7 +1200,7 @@ void SplitWindow::ImplSetWindowSize( long nDelta )
Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
{
Size aSize( aNewSize );
- long nSplitSize = mpMainSet->mnSplitSize-2;
+ tools::Long nSplitSize = mpMainSet->mnSplitSize-2;
if (mbFadeOut)
nSplitSize += SPLITWIN_SPLITSIZEEXLN;
@@ -1209,7 +1209,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
// the size is determined according to MainSet
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCalcSize = 0;
+ tools::Long nCalcSize = 0;
std::vector< ImplSplitItem* >::size_type i;
for ( i = 0; i < mpMainSet->mvItems.size(); i++ )
@@ -1222,8 +1222,8 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
if ( i == mpMainSet->mvItems.size() )
{
- long nDelta = 0;
- long nCurSize;
+ tools::Long nDelta = 0;
+ tools::Long nCurSize;
if ( mbHorz )
nCurSize = aNewSize.Height()-mnTopBorder-mnBottomBorder;
@@ -1263,7 +1263,7 @@ void SplitWindow::ImplCalcLayout()
if ( !mbCalc || !mbRecalc || mpMainSet->mvItems.empty() )
return;
- long nSplitSize = mpMainSet->mnSplitSize-2;
+ tools::Long nSplitSize = mpMainSet->mnSplitSize-2;
if (mbFadeOut)
nSplitSize += SPLITWIN_SPLITSIZEEXLN;
@@ -1271,7 +1271,7 @@ void SplitWindow::ImplCalcLayout()
// the size is determined according to MainSet
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCalcSize = 0;
+ tools::Long nCalcSize = 0;
std::vector<ImplSplitItem *>::size_type i;
for ( i = 0; i < mpMainSet->mvItems.size(); i++ )
@@ -1284,7 +1284,7 @@ void SplitWindow::ImplCalcLayout()
if ( i == mpMainSet->mvItems.size() )
{
- long nCurSize;
+ tools::Long nCurSize;
if ( mbHorz )
nCurSize = mnDY-mnTopBorder-mnBottomBorder;
else
@@ -1302,10 +1302,10 @@ void SplitWindow::ImplCalcLayout()
return;
// pre-calculate sizes/position
- long nL;
- long nT;
- long nW;
- long nH;
+ tools::Long nL;
+ tools::Long nT;
+ tools::Long nW;
+ tools::Long nH;
if ( mbHorz )
{
@@ -1377,21 +1377,21 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos )
void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, bool bTest ) const
{
- long nSplitSize = mpMainSet->mnSplitSize-1;
+ tools::Long nSplitSize = mpMainSet->mnSplitSize-1;
if (mbFadeOut || mbFadeIn)
nSplitSize += SPLITWIN_SPLITSIZEEX;
- long nButtonSize = 0;
+ tools::Long nButtonSize = 0;
if ( mbFadeIn )
nButtonSize += SPLITWIN_SPLITSIZEFADE+1;
if ( mbFadeOut )
nButtonSize += SPLITWIN_SPLITSIZEFADE+1;
- long nCenterEx = 0;
+ tools::Long nCenterEx = 0;
if ( mbHorz )
nCenterEx += ((mnDX-mnLeftBorder-mnRightBorder)-nButtonSize)/2;
else
nCenterEx += ((mnDY-mnTopBorder-mnBottomBorder)-nButtonSize)/2;
- long nEx = 0;
+ tools::Long nEx = 0;
if ( nCenterEx > 0 )
nEx += nCenterEx;
@@ -1489,16 +1489,16 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::
AntialiasingFlags nAA = rRenderContext.GetAntialiasing();
rRenderContext.SetAntialiasing(nAA | AntialiasingFlags::PixelSnapHairline | AntialiasingFlags::Enable);
- long nWidth = rRect.getWidth();
- long nWidthHalf = nWidth / 2;
- long nHeight = rRect.getHeight();
- long nHeightHalf = nHeight / 2;
+ tools::Long nWidth = rRect.getWidth();
+ tools::Long nWidthHalf = nWidth / 2;
+ tools::Long nHeight = rRect.getHeight();
+ tools::Long nHeightHalf = nHeight / 2;
- long nLeft = rRect.Left();
- long nRight = rRect.Right();
- long nTop = rRect.Top();
- long nBottom = rRect.Bottom();
- long nMargin = 1;
+ tools::Long nLeft = rRect.Left();
+ tools::Long nRight = rRect.Right();
+ tools::Long nTop = rRect.Top();
+ tools::Long nBottom = rRect.Bottom();
+ tools::Long nMargin = 1;
rRenderContext.SetLineColor(aColor);
rRenderContext.SetFillColor(aColor);
@@ -1507,7 +1507,7 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::
if (bHorizontal)
{
- long nCenter = nLeft + nWidthHalf;
+ tools::Long nCenter = nLeft + nWidthHalf;
if (bLeft)
{
@@ -1525,7 +1525,7 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::
}
else
{
- long nCenter = nTop + nHeightHalf;
+ tools::Long nCenter = nTop + nHeightHalf;
if (bLeft)
{
@@ -1604,7 +1604,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
return;
ImplSplitItem* pSplitItem;
- long nCurMaxSize;
+ tools::Long nCurMaxSize;
bool bPropSmaller;
mnMouseModifier = rMEvt.GetModifier();
@@ -1653,7 +1653,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
if ( mnSplitPos )
{
- long nTemp = mnSplitPos;
+ tools::Long nTemp = mnSplitPos;
while ( nTemp )
{
pSplitItem = &mpSplitSet->mvItems[nTemp-1];
@@ -1850,7 +1850,7 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
return;
Point aPos = rMEvt.GetPosPixel();
- long nTemp;
+ tools::Long nTemp;
ImplSplitSet* pTempSplitSet;
sal_uInt16 nTempSplitPos;
sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
@@ -1982,7 +1982,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) != 0;
bool bPropGreater = (mnMouseModifier & KEY_MOD1) != 0;
- long nDelta = mnMSplitPos-mnMStartPos;
+ tools::Long nDelta = mnMSplitPos-mnMStartPos;
if ( (mnSplitTest & SPLIT_WINDOW) && mpMainSet->mvItems.empty() )
{
@@ -1992,7 +1992,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- long nNewSize = mpSplitSet->mvItems[mnSplitPos].mnPixSize;
+ tools::Long nNewSize = mpSplitSet->mvItems[mnSplitPos].mnPixSize;
if ( (mpSplitSet == mpMainSet.get()) && mbBottomRight )
nNewSize -= nDelta;
else
@@ -2155,7 +2155,7 @@ void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt )
DockingWindow::DataChanged( rDCEvt );
}
-void SplitWindow::InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize,
+void SplitWindow::InsertItem( sal_uInt16 nId, vcl::Window* pWindow, tools::Long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
SplitWindowItemFlags nBits )
{
@@ -2217,7 +2217,7 @@ void SplitWindow::InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize,
ImplUpdate();
}
-void SplitWindow::InsertItem( sal_uInt16 nId, long nSize,
+void SplitWindow::InsertItem( sal_uInt16 nId, tools::Long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
SplitWindowItemFlags nBits )
{
@@ -2265,7 +2265,7 @@ void SplitWindow::RemoveItem( sal_uInt16 nId )
pOrgParent.clear();
}
-void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
+void SplitWindow::SplitItem( sal_uInt16 nId, tools::Long nNewSize,
bool bPropSmall, bool bPropGreat )
{
sal_uInt16 nPos;
@@ -2287,7 +2287,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
return;
}
- long nDelta = nNewSize-rItems[nPos].mnPixSize;
+ tools::Long nDelta = nNewSize-rItems[nPos].mnPixSize;
if ( !nDelta )
return;
@@ -2352,7 +2352,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
{
if ( bPropGreat )
{
- long nTempDelta = nDelta;
+ tools::Long nTempDelta = nDelta;
do
{
n = nPos+1;
@@ -2421,7 +2421,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
{
if ( bPropGreat )
{
- long nTempDelta = nDelta;
+ tools::Long nTempDelta = nDelta;
do
{
n = nPos+1;
@@ -2491,7 +2491,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
ImplUpdate();
}
-void SplitWindow::SetItemSize( sal_uInt16 nId, long nNewSize )
+void SplitWindow::SetItemSize( sal_uInt16 nId, tools::Long nNewSize )
{
sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
@@ -2511,7 +2511,7 @@ void SplitWindow::SetItemSize( sal_uInt16 nId, long nNewSize )
}
}
-long SplitWindow::GetItemSize( sal_uInt16 nId ) const
+tools::Long SplitWindow::GetItemSize( sal_uInt16 nId ) const
{
sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
@@ -2522,7 +2522,7 @@ long SplitWindow::GetItemSize( sal_uInt16 nId ) const
return 0;
}
-long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) const
+tools::Long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) const
{
sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
@@ -2535,8 +2535,8 @@ long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) cons
{
const_cast<SplitWindow*>(this)->ImplCalcLayout();
- long nRelSize = 0;
- long nPerSize = 0;
+ tools::Long nRelSize = 0;
+ tools::Long nPerSize = 0;
size_t nItems;
SplitWindowItemFlags nTempBits;
nItems = pSet->mvItems.size();
@@ -2708,9 +2708,9 @@ void SplitWindow::ShowFadeOutButton()
ImplUpdate();
}
-long SplitWindow::GetFadeInSize() const
+tools::Long SplitWindow::GetFadeInSize() const
{
- long n = 0;
+ tools::Long n = 0;
if ( mbHorz )
n = mnTopBorder+mnBottomBorder;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 283bc033c244..953aa27b5071 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -60,10 +60,10 @@ struct ImplStatusItem
{
sal_uInt16 mnId;
StatusBarItemBits mnBits;
- long mnWidth;
- long mnOffset;
- long mnExtraWidth;
- long mnX;
+ tools::Long mnWidth;
+ tools::Long mnOffset;
+ tools::Long mnExtraWidth;
+ tools::Long mnX;
OUString maText;
OUString maHelpText;
OUString maQuickHelpText;
@@ -75,7 +75,7 @@ struct ImplStatusItem
std::unique_ptr<SalLayout> mxLayoutCache;
};
-static long ImplCalcProgressWidth( sal_uInt16 nMax, long nSize )
+static tools::Long ImplCalcProgressWidth( sal_uInt16 nMax, tools::Long nSize )
{
return ((nMax*(nSize+(nSize/2)))-(nSize/2)+(STATUSBAR_PRGS_OFFSET*2));
}
@@ -83,9 +83,9 @@ static long ImplCalcProgressWidth( sal_uInt16 nMax, long nSize )
static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize,
StatusBarItemBits nStyle )
{
- long nX;
- long nY;
- long delta = (rTextSize.Height()/4) + 1;
+ tools::Long nX;
+ tools::Long nY;
+ tools::Long delta = (rTextSize.Height()/4) + 1;
if( delta + rTextSize.Width() > rRectSize.Width() )
delta = 0;
@@ -208,9 +208,9 @@ void StatusBar::ImplInitSettings()
void StatusBar::ImplFormat()
{
- long nExtraWidth;
- long nExtraWidth2;
- long nX;
+ tools::Long nExtraWidth;
+ tools::Long nExtraWidth2;
+ tools::Long nX;
sal_uInt16 nAutoSizeItems;
bool bChanged;
@@ -219,7 +219,7 @@ void StatusBar::ImplFormat()
nAutoSizeItems = 0;
mnItemsWidth = STATUSBAR_OFFSET_X;
bChanged = false;
- long nOffset = 0;
+ tools::Long nOffset = 0;
for ( const auto & pItem : mvItemList ) {
if ( pItem->mbVisible )
{
@@ -373,7 +373,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
// compute output region
ImplStatusItem* pItem = mvItemList[nPos].get();
- long nW = 1;
+ tools::Long nW = 1;
tools::Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW,
aRect.Right() - nW, aRect.Bottom() - nW);
@@ -468,7 +468,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
}
void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos,
- long nOffset, long nPrgsWidth, long nPrgsHeight,
+ tools::Long nOffset, tools::Long nPrgsWidth, tools::Long nPrgsHeight,
sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount,
const tools::Rectangle& rFramePosSize)
{
@@ -476,8 +476,8 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
{
bool bNeedErase = ImplGetSVData()->maNWFData.mbProgressNeedsErase;
- long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
- long nPerc = std::min<sal_uInt16>(nPercent2, 10000);
+ tools::Long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
+ tools::Long nPerc = std::min<sal_uInt16>(nPercent2, 10000);
ImplControlValue aValue(nFullWidth * nPerc / 10000);
tools::Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
tools::Rectangle aControlRegion(aDrawRect);
@@ -527,8 +527,8 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// support progress that can also decrease
// compute rectangle
- long nDX = nPrgsWidth + nOffset;
- long nLeft = rPos.X() + ((nPerc1 - 1) * nDX);
+ tools::Long nDX = nPrgsWidth + nOffset;
+ tools::Long nLeft = rPos.X() + ((nPerc1 - 1) * nDX);
tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
do
@@ -552,8 +552,8 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
}
// compute rectangle
- long nDX = nPrgsWidth + nOffset;
- long nLeft = rPos.X() + (nPerc1 * nDX);
+ tools::Long nDX = nPrgsWidth + nOffset;
+ tools::Long nLeft = rPos.X() + (nPerc1 * nDX);
tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
do
@@ -592,7 +592,7 @@ void StatusBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16
Point aPos(maPrgsFrameRect.Left() + STATUSBAR_PRGS_OFFSET,
maPrgsFrameRect.Top() + STATUSBAR_PRGS_OFFSET);
- long nPrgsHeight = mnPrgsSize;
+ tools::Long nPrgsHeight = mnPrgsSize;
if (bNative)
{
aPos = maPrgsFrameRect.TopLeft();
@@ -617,7 +617,7 @@ void StatusBar::ImplCalcProgressRect()
mnPrgsSize = maPrgsFrameRect.Bottom()-maPrgsFrameRect.Top()-(STATUSBAR_PRGS_OFFSET*2);
sal_uInt16 nMaxPercent = STATUSBAR_PRGS_COUNT;
- long nMaxWidth = mnDX-STATUSBAR_OFFSET-1;
+ tools::Long nMaxWidth = mnDX-STATUSBAR_OFFSET-1;
// make smaller if there are too many rects
while ( maPrgsFrameRect.Left()+ImplCalcProgressWidth( nMaxPercent, mnPrgsSize ) > nMaxWidth )
@@ -640,10 +640,10 @@ void StatusBar::ImplCalcProgressRect()
ControlState::ENABLED, aValue,
aNativeControlRegion, aNativeContentRegion ) ) )
{
- long nProgressHeight = aNativeControlRegion.GetHeight();
+ tools::Long nProgressHeight = aNativeControlRegion.GetHeight();
if( nProgressHeight > maPrgsFrameRect.GetHeight() )
{
- long nDelta = nProgressHeight - maPrgsFrameRect.GetHeight();
+ tools::Long nDelta = nProgressHeight - maPrgsFrameRect.GetHeight();
maPrgsFrameRect.AdjustTop( -(nDelta - nDelta/2) );
maPrgsFrameRect.AdjustBottom(nDelta/2 );
}
@@ -856,10 +856,10 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt )
mbFormat = true;
ImplInitSettings();
- long nFudge = GetTextHeight() / 4;
+ tools::Long nFudge = GetTextHeight() / 4;
for (auto & pItem : mvItemList)
{
- long nWidth = GetTextWidth( pItem->maText ) + nFudge;
+ tools::Long nWidth = GetTextWidth( pItem->maText ) + nFudge;
if( nWidth > pItem->mnWidth + STATUSBAR_OFFSET )
pItem->mnWidth = nWidth + STATUSBAR_OFFSET;
@@ -889,7 +889,7 @@ void StatusBar::UserDraw( const UserDrawEvent& )
void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
StatusBarItemBits nBits,
- long nOffset, sal_uInt16 nPos )
+ tools::Long nOffset, sal_uInt16 nPos )
{
SAL_WARN_IF( !nItemId, "vcl", "StatusBar::InsertItem(): ItemId == 0" );
SAL_WARN_IF( GetItemPos( nItemId ) != STATUSBAR_ITEM_NOTFOUND, "vcl",
@@ -906,11 +906,11 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
{
nWidth *= GetDPIScaleFactor();
}
- long nFudge = GetTextHeight()/4;
+ tools::Long nFudge = GetTextHeight()/4;
std::unique_ptr<ImplStatusItem> pItem(new ImplStatusItem);
pItem->mnId = nItemId;
pItem->mnBits = nBits;
- pItem->mnWidth = static_cast<long>(nWidth)+nFudge+STATUSBAR_OFFSET;
+ pItem->mnWidth = static_cast<tools::Long>(nWidth)+nFudge+STATUSBAR_OFFSET;
pItem->mnOffset = nOffset;
pItem->mpUserData = nullptr;
pItem->mbVisible = true;
@@ -1058,7 +1058,7 @@ tools::Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
{
// get rectangle and subtract frame
aRect = ImplGetItemRectPos( nPos );
- long nW = 1;
+ tools::Long nW = 1;
aRect.AdjustTop(nW-1 );
aRect.AdjustBottom( -(nW-1) );
aRect.AdjustLeft(nW );
@@ -1080,7 +1080,7 @@ Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const
// get rectangle
ImplStatusItem* pItem = mvItemList[ nPos ].get();
tools::Rectangle aRect = ImplGetItemRectPos( nPos );
- long nW = 1;
+ tools::Long nW = 1;
tools::Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
Point aPos = ImplGetItemTextPos( aTextRect.GetSize(),
@@ -1118,7 +1118,7 @@ StatusBarItemBits StatusBar::GetItemBits( sal_uInt16 nItemId ) const
return StatusBarItemBits::NONE;
}
-long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const
+tools::Long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
@@ -1143,9 +1143,9 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText, int nCha
pItem->maText = rText;
// adjust item width - see also DataChanged()
- long nFudge = GetTextHeight()/4;
+ tools::Long nFudge = GetTextHeight()/4;
- long nWidth;
+ tools::Long nWidth;
if (nCharsWidth != -1)
{
std::unique_ptr<SalLayout> pSalLayout = ImplLayout("0",0,-1);
@@ -1409,9 +1409,9 @@ Size StatusBar::CalcWindowSizePixel() const
{
size_t i = 0;
size_t nCount = mvItemList.size();
- long nOffset = 0;
- long nCalcWidth = STATUSBAR_OFFSET_X*2;
- long nCalcHeight;
+ tools::Long nOffset = 0;
+ tools::Long nCalcWidth = STATUSBAR_OFFSET_X*2;
+ tools::Long nCalcHeight;
while ( i < nCount )
{
@@ -1421,9 +1421,9 @@ Size StatusBar::CalcWindowSizePixel() const
i++;
}
- long nMinHeight = GetTextHeight();
- const long nBarTextOffset = STATUSBAR_OFFSET_TEXTY*2;
- long nProgressHeight = nMinHeight + nBarTextOffset;
+ tools::Long nMinHeight = GetTextHeight();
+ const tools::Long nBarTextOffset = STATUSBAR_OFFSET_TEXTY*2;
+ tools::Long nProgressHeight = nMinHeight + nBarTextOffset;
if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) )
{
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 9399455150a3..a16cce9c39f0 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -588,7 +588,7 @@ OString WindowStateData::ToStr() const
return rStrBuf.makeStringAndClear();
}
-void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window const * i_pConfigureWin )
+void SystemWindow::ImplMoveToScreen( tools::Long& io_rX, tools::Long& io_rY, tools::Long i_nWidth, tools::Long i_nHeight, vcl::Window const * i_pConfigureWin )
{
tools::Rectangle aScreenRect;
if( !Application::IsUnifiedDisplay() )
@@ -706,7 +706,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
SalFrameGeometry g = pWin->mpWindowImpl->mpFrame->GetGeometry();
if( std::abs(g.nX-aState.mnX) < 2 && std::abs(g.nY-aState.mnY) < 5 )
{
- long displacement = g.nTopDecoration ? g.nTopDecoration : 20;
+ tools::Long displacement = g.nTopDecoration ? g.nTopDecoration : 20;
if( aState.mnX + displacement + aState.mnWidth + g.nRightDecoration > o3tl::make_unsigned(aDesktop.Right()) ||
aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration > o3tl::make_unsigned(aDesktop.Bottom()) )
{
@@ -768,18 +768,18 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( IsRollUp() )
RollDown();
- long nX = rData.GetX();
- long nY = rData.GetY();
- long nWidth = rData.GetWidth();
- long nHeight = rData.GetHeight();
+ tools::Long nX = rData.GetX();
+ tools::Long nY = rData.GetY();
+ tools::Long nWidth = rData.GetWidth();
+ tools::Long nHeight = rData.GetHeight();
const SalFrameGeometry& rGeom = pWindow->mpWindowImpl->mpFrame->GetGeometry();
if( nX < 0 )
nX = 0;
- if( nX + nWidth > static_cast<long>(rGeom.nWidth) )
+ if( nX + nWidth > static_cast<tools::Long>(rGeom.nWidth) )
nX = rGeom.nWidth - nWidth;
if( nY < 0 )
nY = 0;
- if( nY + nHeight > static_cast<long>(rGeom.nHeight) )
+ if( nY + nHeight > static_cast<tools::Long>(rGeom.nHeight) )
nY = rGeom.nHeight - nHeight;
setPosSizePixel( nX, nY, nWidth, nHeight, nPosSize );
maOrgSize = Size( nWidth, nHeight );
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 0bcf1e3e0e23..f132300a076b 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -35,8 +35,8 @@ void TabDialog::ImplPosControls()
return;
Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
- long nDownCtrl = 0;
- long nOffY = 0;
+ tools::Long nDownCtrl = 0;
+ tools::Long nOffY = 0;
vcl::Window* pTabControl = nullptr;
vcl::Window* pChild = GetWindow( GetWindowType::FirstChild );
@@ -49,17 +49,17 @@ void TabDialog::ImplPosControls()
else if ( pTabControl )
{
Size aOptimalSize(pChild->get_preferred_size());
- long nTxtWidth = aOptimalSize.Width();
+ tools::Long nTxtWidth = aOptimalSize.Width();
if ( nTxtWidth > aCtrlSize.Width() )
aCtrlSize.setWidth( nTxtWidth );
- long nTxtHeight = aOptimalSize.Height();
+ tools::Long nTxtHeight = aOptimalSize.Height();
if ( nTxtHeight > aCtrlSize.Height() )
aCtrlSize.setHeight( nTxtHeight );
nDownCtrl++;
}
else
{
- long nHeight = pChild->GetSizePixel().Height();
+ tools::Long nHeight = pChild->GetSizePixel().Height();
if ( nHeight > nOffY )
nOffY = nHeight;
}
@@ -91,13 +91,13 @@ void TabDialog::ImplPosControls()
// position all other Children
bool bTabCtrl = false;
int nLines = 0;
- long nX;
- long nY = aDlgSize.Height();
- long nTopX = IMPL_DIALOG_OFFSET;
+ tools::Long nX;
+ tools::Long nY = aDlgSize.Height();
+ tools::Long nTopX = IMPL_DIALOG_OFFSET;
// all buttons are right aligned under Windows 95
nX = IMPL_DIALOG_OFFSET;
- long nCtrlBarWidth = ((aCtrlSize.Width()+IMPL_DIALOG_OFFSET)*nDownCtrl)-IMPL_DIALOG_OFFSET;
+ tools::Long nCtrlBarWidth = ((aCtrlSize.Width()+IMPL_DIALOG_OFFSET)*nDownCtrl)-IMPL_DIALOG_OFFSET;
if ( nCtrlBarWidth <= aTabSize.Width() )
nX = aTabSize.Width() - nCtrlBarWidth + IMPL_DIALOG_OFFSET;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 91bdda0fcd5e..344f60d175eb 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -176,8 +176,8 @@ void ToolBox::ImplUpdateDragArea() const
}
}
-void ToolBox::ImplCalcBorder( WindowAlign eAlign, long& rLeft, long& rTop,
- long& rRight, long& rBottom ) const
+void ToolBox::ImplCalcBorder( WindowAlign eAlign, tools::Long& rLeft, tools::Long& rTop,
+ tools::Long& rRight, tools::Long& rBottom ) const
{
if( ImplIsFloatingMode() || !(mnWinStyle & WB_BORDER) )
{
@@ -331,7 +331,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
// full window height is used when docked (single line)
if (ImplIsFloatingMode())
{
- long nLineSize;
+ tools::Long nLineSize;
if (mbHorz)
{
nLineSize = mnMaxItemHeight;
@@ -347,7 +347,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
}
}
- long nLeft, nTop, nRight, nBottom;
+ tools::Long nLeft, nTop, nRight, nBottom;
ImplCalcBorder(meAlign, nLeft, nTop, nRight, nBottom);
Size aTopLineSz(aLineSz);
@@ -391,7 +391,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
if (mbHorz)
{
- long y = 0;
+ tools::Long y = 0;
rRenderContext.DrawGradient(tools::Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g);
y += aTopLineSz.Height();
@@ -406,7 +406,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
}
else
{
- long x = 0;
+ tools::Long x = 0;
rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g);
x += aTopLineSz.Width();
@@ -546,8 +546,8 @@ void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const tools::Rectang
void ToolBox::ImplDrawBorder(vcl::RenderContext& rRenderContext)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- long nDX = mnDX;
- long nDY = mnDY;
+ tools::Long nDX = mnDX;
+ tools::Long nDY = mnDY;
ImplDockingWindowWrapper* pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper(this);
@@ -629,11 +629,11 @@ const ImplToolItem *ToolBox::ImplGetFirstClippedItem() const
Size ToolBox::ImplCalcSize( ImplToolItems::size_type nCalcLines, sal_uInt16 nCalcMode )
{
- long nMax;
- long nLeft = 0;
- long nTop = 0;
- long nRight = 0;
- long nBottom = 0;
+ tools::Long nMax;
+ tools::Long nLeft = 0;
+ tools::Long nTop = 0;
+ tools::Long nRight = 0;
+ tools::Long nBottom = 0;
Size aSize;
WindowAlign eOldAlign = meAlign;
bool bOldHorz = mbHorz;
@@ -749,7 +749,7 @@ void ToolBox::ImplCalcFloatSizes()
return;
// calculate the minimal size, i.e. where the biggest item just fits
- long nCalcSize = 0;
+ tools::Long nCalcSize = 0;
for (auto const& item : mpData->m_aItems)
{
@@ -757,7 +757,7 @@ void ToolBox::ImplCalcFloatSizes()
{
if ( item.mpWindow )
{
- long nTempSize = item.mpWindow->GetSizePixel().Width();
+ tools::Long nTempSize = item.mpWindow->GetSizePixel().Width();
if ( nTempSize > nCalcSize )
nCalcSize = nTempSize;
}
@@ -770,12 +770,12 @@ void ToolBox::ImplCalcFloatSizes()
}
// calc an upper bound for ImplCalcBreaks below
- long upperBoundWidth = nCalcSize * mpData->m_aItems.size();
+ tools::Long upperBoundWidth = nCalcSize * mpData->m_aItems.size();
ImplToolItems::size_type nLines;
ImplToolItems::size_type nCalcLines;
ImplToolItems::size_type nTempLines;
- long nMaxLineWidth;
+ tools::Long nMaxLineWidth;
nCalcLines = ImplCalcBreaks( nCalcSize, &nMaxLineWidth, true );
maFloatSizes.reserve( nCalcLines );
@@ -783,7 +783,7 @@ void ToolBox::ImplCalcFloatSizes()
nTempLines = nLines = nCalcLines;
while ( nLines )
{
- long nHeight = ImplCalcSize( nTempLines, TB_CALCMODE_FLOAT ).Height();
+ tools::Long nHeight = ImplCalcSize( nTempLines, TB_CALCMODE_FLOAT ).Height();
ImplToolSize aSize;
aSize.mnWidth = nMaxLineWidth+(TB_BORDER_OFFSET1*2);
@@ -868,9 +868,9 @@ void ToolBox::ImplSetMinMaxFloatSize()
}
}
-ToolBox::ImplToolItems::size_type ToolBox::ImplCalcLines( long nToolSize ) const
+ToolBox::ImplToolItems::size_type ToolBox::ImplCalcLines( tools::Long nToolSize ) const
{
- long nLineHeight;
+ tools::Long nLineHeight;
if ( mbHorz )
{
@@ -892,7 +892,7 @@ ToolBox::ImplToolItems::size_type ToolBox::ImplCalcLines( long nToolSize ) const
}
// #i91917# always report at least one line
- long nLines = nToolSize/nLineHeight;
+ tools::Long nLines = nToolSize/nLineHeight;
if( nLines < 1 )
nLines = 1;
@@ -934,10 +934,10 @@ sal_uInt16 ToolBox::ImplTestLineSize( const Point& rPos ) const
void ToolBox::ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode )
{
bool bHorz;
- long nOneLineSize;
- long nCurSize;
- long nMaxSize;
- long nSize;
+ tools::Long nOneLineSize;
+ tools::Long nCurSize;
+ tools::Long nMaxSize;
+ tools::Long nSize;
Size aSize;
if ( nLineMode & DOCK_LINERIGHT )
@@ -1339,7 +1339,7 @@ ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
return nullptr;
}
-static void ImplAddButtonBorder( long &rWidth, long& rHeight, bool bNativeButtons )
+static void ImplAddButtonBorder( tools::Long &rWidth, tools::Long& rHeight, bool bNativeButtons )
{
rWidth += SMALLBUTTON_HSIZE;
rHeight += SMALLBUTTON_VSIZE;
@@ -1363,13 +1363,13 @@ bool ToolBox::ImplCalcItem()
OutputDevice *pDefault = Application::GetDefaultDevice();
float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0;
- long nDefWidth;
- long nDefHeight;
- long nMaxWidth = 0;
- long nMaxHeight = 0;
- long nMinWidth = 6;
- long nMinHeight = 6;
- long nDropDownArrowWidth = TB_DROPDOWNARROWWIDTH * fScaleFactor;
+ tools::Long nDefWidth;
+ tools::Long nDefHeight;
+ tools::Long nMaxWidth = 0;
+ tools::Long nMaxHeight = 0;
+ tools::Long nMinWidth = 6;
+ tools::Long nMinHeight = 6;
+ tools::Long nDropDownArrowWidth = TB_DROPDOWNARROWWIDTH * fScaleFactor;
#ifdef IOS
nDropDownArrowWidth *= 3;
#endif
@@ -1540,7 +1540,7 @@ bool ToolBox::ImplCalcItem()
// if required, take window height into consideration
if ( item.mpWindow )
{
- long nHeight = item.mpWindow->GetSizePixel().Height();
+ tools::Long nHeight = item.mpWindow->GetSizePixel().Height();
if ( nHeight > mnWinHeight )
mnWinHeight = nHeight;
}
@@ -1556,7 +1556,7 @@ bool ToolBox::ImplCalcItem()
// -> swap width and height
if( item.mbVisibleText && !mbHorz )
{
- long tmp = item.maItemSize.Width();
+ tools::Long tmp = item.maItemSize.Width();
item.maItemSize.setWidth( item.maItemSize.Height() );
item.maItemSize.setHeight( tmp );
@@ -1574,19 +1574,19 @@ bool ToolBox::ImplCalcItem()
if ( item.meType == ToolBoxItemType::BUTTON || item.meType == ToolBoxItemType::SPACE )
{
// add borders
- long w = item.maItemSize.Width();
- long h = item.maItemSize.Height();
+ tools::Long w = item.maItemSize.Width();
+ tools::Long h = item.maItemSize.Height();
ImplAddButtonBorder( w, h, mpData->mbNativeButtons );
item.maItemSize.setWidth(w);
item.maItemSize.setHeight(h);
if( item.meType == ToolBoxItemType::BUTTON )
{
- long nMinW = std::max(nMinWidth, item.maMinimalItemSize.Width());
- long nMinH = std::max(nMinHeight, item.maMinimalItemSize.Height());
+ tools::Long nMinW = std::max(nMinWidth, item.maMinimalItemSize.Width());
+ tools::Long nMinH = std::max(nMinHeight, item.maMinimalItemSize.Height());
- long nGrowContentWidth = 0;
- long nGrowContentHeight = 0;
+ tools::Long nGrowContentWidth = 0;
+ tools::Long nGrowContentHeight = 0;
if( item.maItemSize.Width() < nMinW )
{
@@ -1628,8 +1628,8 @@ bool ToolBox::ImplCalcItem()
// as this is used for alignment of multiple toolbars
// it is only required for docked toolbars
- long nFixedWidth = nDefWidth+nDropDownArrowWidth;
- long nFixedHeight = nDefHeight;
+ tools::Long nFixedWidth = nDefWidth+nDropDownArrowWidth;
+ tools::Long nFixedHeight = nDefHeight;
ImplAddButtonBorder( nFixedWidth, nFixedHeight, mpData->mbNativeButtons );
if( mbHorz )
@@ -1653,19 +1653,19 @@ bool ToolBox::ImplCalcItem()
return false;
}
-ToolBox::ImplToolItems::size_type ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz ) const
+ToolBox::ImplToolItems::size_type ToolBox::ImplCalcBreaks( tools::Long nWidth, tools::Long* pMaxLineWidth, bool bCalcHorz ) const
{
sal_uLong nLineStart = 0;
sal_uLong nGroupStart = 0;
- long nLineWidth = 0;
- long nCurWidth;
- long nLastGroupLineWidth = 0;
- long nMaxLineWidth = 0;
+ tools::Long nLineWidth = 0;
+ tools::Long nCurWidth;
+ tools::Long nLastGroupLineWidth = 0;
+ tools::Long nMaxLineWidth = 0;
ImplToolItems::size_type nLines = 1;
bool bWindow;
bool bBreak = false;
- long nWidthTotal = nWidth;
- long nMenuWidth = 0;
+ tools::Long nWidthTotal = nWidth;
+ tools::Long nMenuWidth = 0;
// when docked the menubutton will be in the first line
if( IsMenuEnabled() && !ImplIsFloatingMode() )
@@ -1701,7 +1701,7 @@ ToolBox::ImplToolItems::size_type ToolBox::ImplCalcBreaks( long nWidth, long* pM
if ( it->mpWindow && bCalcHorz )
{
- long nWinItemWidth = it->mpWindow->GetSizePixel().Width();
+ tools::Long nWinItemWidth = it->mpWindow->GetSizePixel().Width();
if ( !mbScroll || (nWinItemWidth <= nWidthTotal) )
{
nCurWidth = nWinItemWidth;
@@ -1791,7 +1791,7 @@ ToolBox::ImplToolItems::size_type ToolBox::ImplCalcBreaks( long nWidth, long* pM
if( ImplIsFloatingMode() && !ImplIsInPopupMode() )
{
// leave enough space to display buttons in the decoration
- long aMinWidth = 2 * GetSettings().GetStyleSettings().GetFloatTitleHeight();
+ tools::Long aMinWidth = 2 * GetSettings().GetStyleSettings().GetFloatTitleHeight();
if( nMaxLineWidth < aMinWidth )
nMaxLineWidth = aMinWidth;
}
@@ -1822,11 +1822,11 @@ Size ToolBox::ImplGetOptimalFloatingSize()
// try to preserve current width
- long nLineHeight = std::max( mnWinHeight, mnMaxItemHeight );
+ tools::Long nLineHeight = std::max( mnWinHeight, mnMaxItemHeight );
int nBorderX = 2*TB_BORDER_OFFSET1 + mnLeftBorder + mnRightBorder;
int nBorderY = 2*TB_BORDER_OFFSET2 + mnTopBorder + mnBottomBorder;
Size aSz( aCurrentSize );
- long maxX;
+ tools::Long maxX;
ImplToolItems::size_type nLines = ImplCalcBreaks( aSz.Width()-nBorderX, &maxX, mbHorz );
ImplToolItems::size_type manyLines = 1000;
@@ -1849,11 +1849,11 @@ Size ToolBox::ImplGetOptimalFloatingSize()
return aSize2;
// set the size with the smallest delta as the current size
- long dx1 = std::abs( mnDX - aSize1.Width() );
- long dy1 = std::abs( mnDY - aSize1.Height() );
+ tools::Long dx1 = std::abs( mnDX - aSize1.Width() );
+ tools::Long dy1 = std::abs( mnDY - aSize1.Height() );
- long dx2 = std::abs( mnDX - aSize2.Width() );
- long dy2 = std::abs( mnDY - aSize2.Height() );
+ tools::Long dx2 = std::abs( mnDX - aSize2.Width() );
+ tools::Long dy2 = std::abs( mnDY - aSize2.Height() );
if( dx1*dy1 < dx2*dy2 )
aCurrentSize = aSize1;
@@ -1899,10 +1899,10 @@ void ToolBox::ImplFormat( bool bResize )
// recalculate positions and sizes
tools::Rectangle aEmptyRect;
- long nLineSize;
- long nLeft;
- long nTop;
- long nMax; // width of layoutarea in pixels
+ tools::Long nLineSize;
+ tools::Long nLeft;
+ tools::Long nTop;
+ tools::Long nMax; // width of layoutarea in pixels
ImplToolItems::size_type nFormatLine;
bool bMustFullPaint;
@@ -1935,7 +1935,7 @@ void ToolBox::ImplFormat( bool bResize )
// Horizontal
if ( mbHorz )
{
- long nBottom;
+ tools::Long nBottom;
// nLineSize: height of a single line, will fit highest item
nLineSize = mnMaxItemHeight;
@@ -1973,14 +1973,14 @@ void ToolBox::ImplFormat( bool bResize )
// we have to center all items in the window height
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- long nWinHeight = mnDY - nTop - nBottom;
+ tools::Long nWinHeight = mnDY - nTop - nBottom;
if( nWinHeight > nLineSize )
nLineSize = nWinHeight;
}
}
else
{
- long nRight;
+ tools::Long nRight;
nLineSize = mnMaxItemWidth;
if ( mbScroll )
@@ -2012,7 +2012,7 @@ void ToolBox::ImplFormat( bool bResize )
// we have to center all items in the window height
if( !ImplIsFloatingMode() && IsMenuEnabled() )
{
- long nWinWidth = mnDX - nLeft - nRight;
+ tools::Long nWinWidth = mnDX - nLeft - nRight;
if( nWinWidth > nLineSize )
nLineSize = nWinWidth;
}
@@ -2037,8 +2037,8 @@ void ToolBox::ImplFormat( bool bResize )
else
{
// init start values
- long nX = nLeft; // top-left offset
- long nY = nTop;
+ tools::Long nX = nLeft; // top-left offset
+ tools::Long nY = nTop;
nFormatLine = 1;
// save old scroll rectangles and reset them
@@ -2147,7 +2147,7 @@ void ToolBox::ImplFormat( bool bResize )
else if ( mnCurLine+mnVisLines-1 > mnCurLines )
mnCurLine = mnCurLines - (mnVisLines-1);
- long firstItemCenter = 0;
+ tools::Long firstItemCenter = 0;
for (auto & item : mpData->m_aItems)
{
item.mbShowWindow = false;
@@ -2368,8 +2368,8 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tool
{
const Image pImage(StockImage::Yes, CHEVRON);
Size aImageSize = pImage.GetSizePixel();
- long x = rRect.Left() + (rRect.getWidth() - aImageSize.Width())/2;
- long y = rRect.Top() + (rRect.getHeight() - aImageSize.Height())/2;
+ tools::Long x = rRect.Left() + (rRect.getWidth() - aImageSize.Width())/2;
+ tools::Long y = rRect.Top() + (rRect.getHeight() - aImageSize.Height())/2;
DrawImageFlags nImageStyle = DrawImageFlags::NONE;
rRenderContext.DrawImage(Point(x,y), pImage, nImageStyle);
@@ -2394,11 +2394,11 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool
tools::Polygon aPoly(4);
// the assumption is, that the width always specifies the size of the expected arrow.
- const long nMargin = round(2 * rRenderContext.GetDPIScaleFactor());
- const long nSize = rDropDownRect.getWidth() - 2 * nMargin;
- const long nHalfSize = (nSize + 1) / 2;
- const long x = rDropDownRect.Left() + nMargin + (bRotate ? (rDropDownRect.getWidth() - nHalfSize) / 2 : 0);
- const long y = rDropDownRect.Top() + nMargin + (rDropDownRect.getHeight() - (bRotate ? nSize : nHalfSize)) / 2;
+ const tools::Long nMargin = round(2 * rRenderContext.GetDPIScaleFactor());
+ const tools::Long nSize = rDropDownRect.getWidth() - 2 * nMargin;
+ const tools::Long nHalfSize = (nSize + 1) / 2;
+ const tools::Long x = rDropDownRect.Left() + nMargin + (bRotate ? (rDropDownRect.getWidth() - nHalfSize) / 2 : 0);
+ const tools::Long y = rDropDownRect.Top() + nMargin + (rDropDownRect.getHeight() - (bRotate ? nSize : nHalfSize)) / 2;
aPoly.SetPoint(Point(x, y), 0);
if (bRotate) // >
@@ -2506,7 +2506,7 @@ void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItem
if (bNativeOk)
return;
- long nCenterPos, nSlim;
+ tools::Long nCenterPos, nSlim;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
rRenderContext.SetLineColor(rStyleSettings.GetSeparatorColor());
if (IsHorizontal())
@@ -2590,10 +2590,10 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
/* Compute the button/separator rectangle here, we'll need it for
* both the buttons and the separators. */
tools::Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize );
- long nOffX = SMALLBUTTON_OFF_NORMAL_X;
- long nOffY = SMALLBUTTON_OFF_NORMAL_Y;
- long nImageOffX = 0;
- long nImageOffY = 0;
+ tools::Long nOffX = SMALLBUTTON_OFF_NORMAL_X;
+ tools::Long nOffY = SMALLBUTTON_OFF_NORMAL_Y;
+ tools::Long nImageOffX = 0;
+ tools::Long nImageOffY = 0;
DrawButtonFlags nStyle = DrawButtonFlags::NONE;
// draw separators in flat style only
@@ -2642,8 +2642,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText );
// compute output values
- long nBtnWidth = aBtnSize.Width()-SMALLBUTTON_HSIZE;
- long nBtnHeight = aBtnSize.Height()-SMALLBUTTON_VSIZE;
+ tools::Long nBtnWidth = aBtnSize.Width()-SMALLBUTTON_HSIZE;
+ tools::Long nBtnHeight = aBtnSize.Height()-SMALLBUTTON_VSIZE;
Size aImageSize;
const bool bDropDown = (pItem->mnBits & ToolBoxItemBits::DROPDOWN) == ToolBoxItemBits::DROPDOWN;
@@ -2705,8 +2705,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
if ( bText )
{
const Size aTxtSize(GetCtrlTextWidth(pItem->maText), GetTextHeight());
- long nTextOffX = nOffX;
- long nTextOffY = nOffY;
+ tools::Long nTextOffX = nOffX;
+ tools::Long nTextOffY = nOffY;
// rotate text when vertically docked
vcl::Font aOldFont = rRenderContext.GetFont();
@@ -3505,8 +3505,8 @@ void ToolBox::Resize()
if( !aSize.Width() && !aSize.Height() )
return;
- long nOldDX = mnDX;
- long nOldDY = mnDY;
+ tools::Long nOldDX = mnDX;
+ tools::Long nOldDY = mnDY;
mnDX = aSize.Width();
mnDY = aSize.Height();
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index b7e094447383..59b7bbbbb01e 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -127,7 +127,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage,
init(nItemId, nItemBits, false);
}
-Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize )
+Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, tools::Long maxWidth, const Size& rDefaultSize )
{
Size aSize( rDefaultSize ); // the size of 'standard' toolbox items
// non-standard items are eg windows or buttons with text
@@ -959,7 +959,7 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
}
}
-static Image ImplRotImage( const Image& rImage, long nAngle10 )
+static Image ImplRotImage( const Image& rImage, tools::Long nAngle10 )
{
BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
@@ -968,7 +968,7 @@ static Image ImplRotImage( const Image& rImage, long nAngle10 )
return Image( aRotBitmapEx );
}
-void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 )
+void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, tools::Long nAngle10 )
{
ImplToolItems::size_type nPos = GetItemPos( nItemId );
@@ -978,7 +978,7 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 )
ImplToolItem* pItem = &mpData->m_aItems[nPos];
Size aOldSize = pItem->maImage.GetSizePixel();
- long nDeltaAngle = (nAngle10 - pItem->mnImageAngle) % 3600;
+ tools::Long nDeltaAngle = (nAngle10 - pItem->mnImageAngle) % 3600;
while( nDeltaAngle < 0 )
nDeltaAngle += 3600;
@@ -1046,7 +1046,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText )
if ( !mbCalc &&
((meButtonType != ButtonType::SYMBOLONLY) || !pItem->maImage) )
{
- long nOldWidth = GetCtrlTextWidth( pItem->maText );
+ tools::Long nOldWidth = GetCtrlTextWidth( pItem->maText );
pItem->maText = MnemonicGenerator::EraseAllMnemonicChars(rText);
mpData->ImplClearLayoutData();
if ( nOldWidth != GetCtrlTextWidth( pItem->maText ) )
@@ -1429,9 +1429,9 @@ OUString ToolBox::GetDisplayText() const
return mpData->m_pLayoutData ? mpData->m_pLayoutData->m_aDisplayText : OUString();
}
-tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
+tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, tools::Long nIndex )
{
- long nItemIndex = -1;
+ tools::Long nItemIndex = -1;
if( ! mpData->m_pLayoutData )
ImplFillLayoutData();
if( mpData->m_pLayoutData )
@@ -1448,9 +1448,9 @@ tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle();
}
-long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID )
+tools::Long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID )
{
- long nIndex = -1;
+ tools::Long nIndex = -1;
rItemID = 0;
if( ! mpData->m_pLayoutData )
ImplFillLayoutData();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7fd200c81b2e..447cd0112cca 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1167,9 +1167,9 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
void Window::ImplInitAppFontData( vcl::Window const * pWindow )
{
ImplSVData* pSVData = ImplGetSVData();
- long nTextHeight = pWindow->GetTextHeight();
- long nTextWidth = pWindow->approximate_char_width() * 8;
- long nSymHeight = nTextHeight*4;
+ tools::Long nTextHeight = pWindow->GetTextHeight();
+ tools::Long nTextWidth = pWindow->approximate_char_width() * 8;
+ tools::Long nSymHeight = nTextHeight*4;
// Make the basis wider if the font is too narrow
// such that the dialog looks symmetrical and does not become too narrow.
// Add some extra space when the dialog has the same width,
@@ -1438,16 +1438,16 @@ void Window::ImplUpdateSysObjPos()
}
}
-void Window::ImplPosSizeWindow( long nX, long nY,
- long nWidth, long nHeight, PosSizeFlags nFlags )
+void Window::ImplPosSizeWindow( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags )
{
bool bNewPos = false;
bool bNewSize = false;
bool bCopyBits = false;
- long nOldOutOffX = mnOutOffX;
- long nOldOutOffY = mnOutOffY;
- long nOldOutWidth = mnOutWidth;
- long nOldOutHeight = mnOutHeight;
+ tools::Long nOldOutOffX = mnOutOffX;
+ tools::Long nOldOutOffY = mnOutOffY;
+ tools::Long nOldOutWidth = mnOutWidth;
+ tools::Long nOldOutHeight = mnOutHeight;
std::unique_ptr<vcl::Region> pOverlapRegion;
std::unique_ptr<vcl::Region> pOldRegion;
@@ -1498,7 +1498,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( nFlags & PosSizeFlags::X )
{
- long nOrgX = nX;
+ tools::Long nOrgX = nX;
Point aPtDev( Point( nX+mnOutOffX, 0 ) );
OutputDevice *pOutDev = GetOutDev();
if( pOutDev->HasMirroredGraphics() )
@@ -2039,7 +2039,7 @@ WindowBorderStyle Window::GetBorderStyle() const
return WindowBorderStyle::NONE;
}
-long Window::CalcTitleWidth() const
+tools::Long Window::CalcTitleWidth() const
{
if ( mpWindowImpl->mpBorderWindow )
@@ -2056,7 +2056,7 @@ long Window::CalcTitleWidth() const
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
vcl::Font aFont = GetFont();
const_cast<vcl::Window*>(this)->SetPointFont(*const_cast<Window*>(this), rStyleSettings.GetTitleFont());
- long nTitleWidth = GetTextWidth( GetText() );
+ tools::Long nTitleWidth = GetTextWidth( GetText() );
const_cast<vcl::Window*>(this)->SetFont( aFont );
nTitleWidth += rStyleSettings.GetTitleHeight() * 3;
nTitleWidth += StyleSettings::GetBorderSize() * 2;
@@ -2103,7 +2103,7 @@ void Window::EndExtTextInput()
ImplGetFrame()->EndExtTextInput( EndExtTextInputFlags::Complete );
}
-void Window::SetCursorRect( const tools::Rectangle* pRect, long nExtTextInputWidth )
+void Window::SetCursorRect( const tools::Rectangle* pRect, tools::Long nExtTextInputWidth )
{
ImplWinData* pWinData = ImplGetWinData();
@@ -2131,14 +2131,14 @@ const tools::Rectangle* Window::GetCursorRect() const
return pWinData->mpCursorRect ? &*pWinData->mpCursorRect : nullptr;
}
-long Window::GetCursorExtTextInputWidth() const
+tools::Long Window::GetCursorExtTextInputWidth() const
{
ImplWinData* pWinData = ImplGetWinData();
return pWinData->mnCursorExtWidth;
}
-void Window::SetCompositionCharRect( const tools::Rectangle* pRect, long nCompositionLength, bool bVertical ) {
+void Window::SetCompositionCharRect( const tools::Rectangle* pRect, tools::Long nCompositionLength, bool bVertical ) {
ImplWinData* pWinData = ImplGetWinData();
pWinData->mpCompositionCharRects.reset();
@@ -2147,7 +2147,7 @@ void Window::SetCompositionCharRect( const tools::Rectangle* pRect, long nCompos
if ( pRect && (nCompositionLength > 0) )
{
pWinData->mpCompositionCharRects.reset( new tools::Rectangle[nCompositionLength] );
- for (long i = 0; i < nCompositionLength; ++i)
+ for (tools::Long i = 0; i < nCompositionLength; ++i)
pWinData->mpCompositionCharRects[i] = pRect[i];
}
}
@@ -2360,8 +2360,8 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
// a system resize
if ( mpWindowImpl->mbWaitSystemResize )
{
- long nOutWidth;
- long nOutHeight;
+ tools::Long nOutWidth;
+ tools::Long nOutHeight;
mpWindowImpl->mpFrame->GetClientSize( nOutWidth, nOutHeight );
ImplHandleResize( this, nOutWidth, nOutHeight );
}
@@ -2664,8 +2664,8 @@ void Window::SetActivateMode( ActivateModeFlags nMode )
}
}
-void Window::setPosSizePixel( long nX, long nY,
- long nWidth, long nHeight, PosSizeFlags nFlags )
+void Window::setPosSizePixel( tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags )
{
bool bHasValidSize = !mpWindowImpl->mbDefSize;
@@ -2684,7 +2684,7 @@ void Window::setPosSizePixel( long nX, long nY,
// Note: if we're positioning a frame, the coordinates are interpreted
// as being the top-left corner of the window's client area and NOT
// as the position of the border ! (due to limitations of several UNIX window managers)
- long nOldWidth = pWindow->mnOutWidth;
+ tools::Long nOldWidth = pWindow->mnOutWidth;
if ( !(nFlags & PosSizeFlags::Width) )
nWidth = pWindow->mnOutWidth;
@@ -2726,7 +2726,7 @@ void Window::setPosSizePixel( long nX, long nY,
const SalFrameGeometry& aSysGeometry = mpWindowImpl->mpFrame->GetUnmirroredGeometry();
const SalFrameGeometry& aParentSysGeometry =
pWinParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry();
- long myWidth = nOldWidth;
+ tools::Long myWidth = nOldWidth;
if( !myWidth )
myWidth = aSysGeometry.nWidth;
if( !myWidth )
@@ -2813,10 +2813,10 @@ Point Window::ScreenToOutputPixel( const Point& rPos ) const
return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY );
}
-long Window::ImplGetUnmirroredOutOffX()
+tools::Long Window::ImplGetUnmirroredOutOffX()
{
// revert mnOutOffX changes that were potentially made in ImplPosSizeWindow
- long offx = mnOutOffX;
+ tools::Long offx = mnOutOffX;
OutputDevice *pOutDev = GetOutDev();
if( pOutDev->HasMirroredGraphics() )
{
@@ -2839,14 +2839,14 @@ long Window::ImplGetUnmirroredOutOffX()
Point Window::OutputToNormalizedScreenPixel( const Point& rPos ) const
{
// relative to top level parent
- long offx = const_cast<vcl::Window*>(this)->ImplGetUnmirroredOutOffX();
+ tools::Long offx = const_cast<vcl::Window*>(this)->ImplGetUnmirroredOutOffX();
return Point( rPos.X()+offx, rPos.Y()+mnOutOffY );
}
Point Window::NormalizedScreenToOutputPixel( const Point& rPos ) const
{
// relative to top level parent
- long offx = const_cast<vcl::Window*>(this)->ImplGetUnmirroredOutOffX();
+ tools::Long offx = const_cast<vcl::Window*>(this)->ImplGetUnmirroredOutOffX();
return Point( rPos.X()-offx, rPos.Y()-mnOutOffY );
}
@@ -2921,7 +2921,7 @@ tools::Rectangle Window::ImplGetWindowExtentsRelative(const vcl::Window *pRelati
return tools::Rectangle( aPos, aSize );
}
-void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
+void Window::Scroll( tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags )
{
ImplScroll( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
@@ -2929,7 +2929,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
nHorzScroll, nVertScroll, nFlags & ~ScrollFlags::Clip );
}
-void Window::Scroll( long nHorzScroll, long nVertScroll,
+void Window::Scroll( tools::Long nHorzScroll, tools::Long nVertScroll,
const tools::Rectangle& rRect, ScrollFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index bc48311e0d8c..a729f655a93d 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -207,7 +207,7 @@ void Window::InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlag
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::N50, this );
else
{
- long nBorder = 1;
+ tools::Long nBorder = 1;
if ( nStyle == ShowTrackFlags::Big )
nBorder = 5;
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), nBorder, SalInvert::N50, this );
@@ -371,9 +371,9 @@ void Window::SetZoom( const Fraction& rZoom )
}
}
-static long WinFloatRound( double fVal )
+static tools::Long WinFloatRound( double fVal )
{
- return( fVal > 0.0 ? static_cast<long>( fVal + 0.5 ) : -static_cast<long>( -fVal + 0.5 ) );
+ return( fVal > 0.0 ? static_cast<tools::Long>( fVal + 0.5 ) : -static_cast<tools::Long>( -fVal + 0.5 ) );
}
void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont)
@@ -394,7 +394,7 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F
}
}
-long Window::CalcZoom( long nCalc ) const
+tools::Long Window::CalcZoom( tools::Long nCalc ) const
{
const Fraction& rZoom = GetZoom();
@@ -560,9 +560,9 @@ vcl::Font Window::GetDrawPixelFont(OutputDevice const * pDev) const
return aFont;
}
-long Window::GetDrawPixel( OutputDevice const * pDev, long nPixels ) const
+tools::Long Window::GetDrawPixel( OutputDevice const * pDev, tools::Long nPixels ) const
{
- long nP = nPixels;
+ tools::Long nP = nPixels;
if ( pDev->GetOutDevType() != OUTDEV_WINDOW )
{
MapMode aMap( MapUnit::Map100thMM );
@@ -579,7 +579,7 @@ static void lcl_HandleScrollHelper( ScrollBar* pScrl, double nN, bool isMultiply
if ( !pScrl || !nN || !pScrl->IsEnabled() || !pScrl->IsInputEnabled() || pScrl->IsInModalMode() )
return;
- long nNewPos = pScrl->GetThumbPos();
+ tools::Long nNewPos = pScrl->GetThumbPos();
if ( nN == double(-LONG_MAX) )
nNewPos += pScrl->GetPageSize();
@@ -599,7 +599,7 @@ static void lcl_HandleScrollHelper( ScrollBar* pScrl, double nN, bool isMultiply
else if ( !o3tl::convertsToAtMost(fVal, LONG_MAX) )
nNewPos = LONG_MAX;
else
- nNewPos = static_cast<long>(fVal);
+ nNewPos = static_cast<tools::Long>(fVal);
}
pScrl->DoScroll( nNewPos );
@@ -680,12 +680,12 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
{
double visSizeX = double(pHScrl->GetVisibleSize());
double ratioX = deltaXInPixels / double(winSize.getWidth());
- long deltaXInLogic = long(visSizeX * ratioX);
+ tools::Long deltaXInLogic = tools::Long(visSizeX * ratioX);
// Touch need to work by pixels. Did not apply this to
// Android, as android code may require adaptations
// to work with this scrolling code
#ifndef IOS
- long lineSizeX = pHScrl->GetLineSize();
+ tools::Long lineSizeX = pHScrl->GetLineSize();
if(lineSizeX)
{
@@ -711,13 +711,13 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
{
double visSizeY = double(pVScrl->GetVisibleSize());
double ratioY = deltaYInPixels / double(winSize.getHeight());
- long deltaYInLogic = long(visSizeY * ratioY);
+ tools::Long deltaYInLogic = tools::Long(visSizeY * ratioY);
// Touch need to work by pixels. Did not apply this to
// Android, as android code may require adaptations
// to work with this scrolling code
#ifndef IOS
- long lineSizeY = pVScrl->GetLineSize();
+ tools::Long lineSizeY = pVScrl->GetLineSize();
if(lineSizeY)
{
deltaYInLogic /= lineSizeY;
@@ -755,7 +755,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
}
else if(pData->meEventType == GestureEventType::PanningUpdate)
{
- long nOriginalPosition = mpWindowImpl->mpFrameData->mnTouchPanPosition;
+ tools::Long nOriginalPosition = mpWindowImpl->mpFrameData->mnTouchPanPosition;
pVScrl->DoScroll(nOriginalPosition + (pData->mfOffset / pVScrl->GetVisibleSize()));
}
if (pData->meEventType == GestureEventType::PanningEnd)
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index ce7b2e02929f..39b76a85b100 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -261,7 +261,7 @@ static void ContextMenuEventLink( void* pCEvent, void* )
}
bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave,
- long nX, long nY, sal_uInt64 nMsgTime,
+ tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime,
sal_uInt16 nCode, MouseEventModifiers nMode )
{
ImplSVHelpData& aHelpData = ImplGetSVHelpData();
@@ -448,12 +448,12 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
{
if ( !pMouseDownWin->ImplGetFrameData()->mbStartDragCalled )
{
- long nDragW = rMSettings.GetStartDragWidth();
- long nDragH = rMSettings.GetStartDragHeight();
+ tools::Long nDragW = rMSettings.GetStartDragWidth();
+ tools::Long nDragH = rMSettings.GetStartDragHeight();
//long nMouseX = nX;
//long nMouseY = nY;
- long nMouseX = aMousePos.X(); // #106074# use the possibly re-mirrored coordinates (RTL) ! nX,nY are unmodified !
- long nMouseY = aMousePos.Y();
+ tools::Long nMouseX = aMousePos.X(); // #106074# use the possibly re-mirrored coordinates (RTL) ! nX,nY are unmodified !
+ tools::Long nMouseY = aMousePos.Y();
if ( (((nMouseX-nDragW) > pMouseDownWin->ImplGetFrameData()->mnFirstMouseX) ||
((nMouseX+nDragW) < pMouseDownWin->ImplGetFrameData()->mnFirstMouseX)) ||
(((nMouseY-nDragH) > pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) ||
@@ -556,12 +556,12 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
{
const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings();
sal_uInt64 nDblClkTime = rMSettings.GetDoubleClickTime();
- long nDblClkW = rMSettings.GetDoubleClickWidth();
- long nDblClkH = rMSettings.GetDoubleClickHeight();
+ tools::Long nDblClkW = rMSettings.GetDoubleClickWidth();
+ tools::Long nDblClkH = rMSettings.GetDoubleClickHeight();
//long nMouseX = nX;
//long nMouseY = nY;
- long nMouseX = aMousePos.X(); // #106074# use the possibly re-mirrored coordinates (RTL) ! nX,nY are unmodified !
- long nMouseY = aMousePos.Y();
+ tools::Long nMouseX = aMousePos.X(); // #106074# use the possibly re-mirrored coordinates (RTL) ! nX,nY are unmodified !
+ tools::Long nMouseY = aMousePos.Y();
if ( (pChild == pChild->ImplGetFrameData()->mpMouseDownWin) &&
(nCode == pChild->ImplGetFrameData()->mnFirstMouseCode) &&
@@ -1223,7 +1223,7 @@ static bool ImplHandleEndExtTextInput()
}
static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
- tools::Rectangle& rRect, long& rInputWidth,
+ tools::Rectangle& rRect, tools::Long& rInputWidth,
bool * pVertical )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1632,7 +1632,7 @@ static void KillOwnPopups( vcl::Window const * pWindow )
}
}
-void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight )
+void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight )
{
const bool bChanged = (nNewWidth != pWindow->GetOutputWidthPixel()) || (nNewHeight != pWindow->GetOutputHeightPixel());
if (bChanged && pWindow->GetStyle() & (WB_MOVEABLE|WB_SIZEABLE))
@@ -1731,7 +1731,7 @@ static void ImplHandleMove( vcl::Window* pWindow )
}
-static void ImplHandleMoveResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight )
+static void ImplHandleMoveResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight )
{
ImplHandleMove( pWindow );
ImplHandleResize( pWindow, nNewWidth, nNewHeight );
@@ -2480,8 +2480,8 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
case SalEvent::Resize:
{
- long nNewWidth;
- long nNewHeight;
+ tools::Long nNewWidth;
+ tools::Long nNewHeight;
pWindow->ImplGetWindowImpl()->mpFrame->GetClientSize( nNewWidth, nNewHeight );
ImplHandleResize( pWindow, nNewWidth, nNewHeight );
}
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 29035742fd99..94e3c416c3cc 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -87,7 +87,7 @@ static const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); }
static const char *GetAtomName( Display *d, Atom a )
{ return Null( XGetAtomName( d, a ) ); }
-static double Hypothenuse( long w, long h )
+static double Hypothenuse( tools::Long w, tools::Long h )
{ return sqrt( static_cast<double>((w*w)+(h*h)) ); }
#endif
@@ -124,7 +124,7 @@ static int sal_significantBits( Pixel nMask )
}
// check if the resolution is sane
-static bool sal_ValidDPI(long nDPI)
+static bool sal_ValidDPI(tools::Long nDPI)
{
return (nDPI >= 50) && (nDPI <= 500);
}
@@ -598,7 +598,7 @@ void SalDisplay::Init()
if( pValStr != nullptr )
{
const OString aValStr( pValStr );
- const long nDPI = static_cast<long>(aValStr.toDouble());
+ const tools::Long nDPI = static_cast<tools::Long>(aValStr.toDouble());
// guard against insane resolution
if( sal_ValidDPI(nDPI) )
{
@@ -612,11 +612,11 @@ void SalDisplay::Init()
* reported screen sizes and resolution. If there are multiple
* screens, just fall back to the default 96x96
*/
- long xDPI = 96;
- long yDPI = 96;
+ tools::Long xDPI = 96;
+ tools::Long yDPI = 96;
if (m_aScreens.size() == 1) {
- xDPI = static_cast<long>(round(DisplayWidth(pDisp_, 0)*25.4/DisplayWidthMM(pDisp_, 0)));
- yDPI = static_cast<long>(round(DisplayHeight(pDisp_, 0)*25.4/DisplayHeightMM(pDisp_, 0)));
+ xDPI = static_cast<tools::Long>(round(DisplayWidth(pDisp_, 0)*25.4/DisplayWidthMM(pDisp_, 0)));
+ yDPI = static_cast<tools::Long>(round(DisplayHeight(pDisp_, 0)*25.4/DisplayHeightMM(pDisp_, 0)));
// if either is invalid set it equal to the other
if (!sal_ValidDPI(xDPI) && sal_ValidDPI(yDPI))
xDPI = yDPI;
@@ -2256,7 +2256,7 @@ void SalDisplay::PrintInfo() const
}
#endif
-void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight )
+void SalDisplay::addXineramaScreenUnique( int i, tools::Long i_nX, tools::Long i_nY, tools::Long i_nWidth, tools::Long i_nHeight )
{
// see if any frame buffers are at the same coordinates
// this can happen with weird configuration e.g. on
@@ -2371,7 +2371,7 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat
aFD.fd = ConnectionNumber(GetDisplay());
aFD.events = POLLIN;
aFD.revents = 0;
- long nTimeout = 1000;
+ tools::Long nTimeout = 1000;
(void)poll(&aFD, 1, nTimeout);
if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) )
{
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 62dfcf94ce8c..ec853e26accc 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -55,7 +55,7 @@ public:
virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const override;
virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const override;
virtual void frameIsMapping( X11SalFrame* pFrame ) const override;
- virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const override;
+ virtual void setUserTime( X11SalFrame* i_pFrame, tools::Long i_nUserTime ) const override;
};
class GnomeWMAdaptor : public WMAdaptor
@@ -464,7 +464,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
)
{
m_aWMWorkAreas = ::std::vector< tools::Rectangle > ( m_nDesktops );
- long* pValues = reinterpret_cast<long*>(pProperty);
+ tools::Long* pValues = reinterpret_cast<long*>(pProperty);
for( int i = 0; i < m_nDesktops; i++ )
{
Point aPoint( pValues[4*i],
@@ -1109,7 +1109,7 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const
* for maximizing use NorthWestGravity (including decoration)
*/
XSizeHints hints;
- long supplied;
+ tools::Long supplied;
bool bHint = false;
if( XGetWMNormalHints( m_pDisplay,
pFrame->GetShellWindow(),
@@ -1199,7 +1199,7 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
* for maximizing use NorthWestGravity (including decoration)
*/
XSizeHints hints;
- long supplied;
+ tools::Long supplied;
bool bHint = false;
if( XGetWMNormalHints( m_pDisplay,
pFrame->GetShellWindow(),
@@ -1268,7 +1268,7 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
// set mwm hints
struct _mwmhints {
unsigned long flags, func, deco;
- long input_mode;
+ tools::Long input_mode;
unsigned long status;
} aHint;
@@ -1777,7 +1777,7 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
int nFormat;
unsigned long nItems, nBytesLeft;
unsigned char* pData = nullptr;
- long nOffset = 0;
+ tools::Long nOffset = 0;
do
{
XGetWindowProperty( m_pDisplay,
@@ -2204,14 +2204,14 @@ void NetWMAdaptor::frameIsMapping( X11SalFrame* pFrame ) const
/*
* WMAdaptor::setUserTime
*/
-void WMAdaptor::setUserTime( X11SalFrame*, long ) const
+void WMAdaptor::setUserTime( X11SalFrame*, tools::Long ) const
{
}
/*
* NetWMAdaptor::setUserTime
*/
-void NetWMAdaptor::setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const
+void NetWMAdaptor::setUserTime( X11SalFrame* i_pFrame, tools::Long i_nUserTime ) const
{
if( m_aWMAtoms[NET_WM_USER_TIME] )
{
@@ -2235,7 +2235,7 @@ void WMAdaptor::setPID( X11SalFrame const * i_pFrame ) const
if( !(m_aWMAtoms[NET_WM_PID]) )
return;
- long nPID = static_cast<long>(getpid());
+ tools::Long nPID = static_cast<tools::Long>(getpid());
XChangeProperty( m_pDisplay,
i_pFrame->GetShellWindow(),
m_aWMAtoms[NET_WM_PID],
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 4be75f23ee56..ce98fcbd09f5 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -103,7 +103,7 @@ extern "C"
}
}
-const long nXdndProtocolRevision = 5;
+const tools::Long nXdndProtocolRevision = 5;
namespace {
@@ -1547,7 +1547,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
rInc.m_nTransferStartTime = time( nullptr );
// use incr protocol, signal start to requestor
- long nMinSize = m_nIncrementalThreshold;
+ tools::Long nMinSize = m_nIncrementalThreshold;
XSelectInput( m_pDisplay, requestor, PropertyChangeMask );
XChangeProperty( m_pDisplay, requestor, property,
m_nINCRAtom, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&nMinSize), 1 );
@@ -1633,7 +1633,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
}
else if( rRequest.target == m_nTIMESTAMPAtom )
{
- long nTimeStamp = static_cast<long>(m_aSelections[rRequest.selection]->m_nOrigTimestamp);
+ tools::Long nTimeStamp = static_cast<tools::Long>(m_aSelections[rRequest.selection]->m_nOrigTimestamp);
XChangeProperty( m_pDisplay, rRequest.requestor, rRequest.property,
XA_INTEGER, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&nTimeStamp), 1 );
aNotify.xselection.property = rRequest.property;
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
index 8b67c5951667..793f17f44342 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
@@ -38,7 +38,7 @@ namespace cairo {
explicit X11SysData( const SystemEnvData& );
void* pDisplay; // the relevant display connection
- long hDrawable; // a drawable
+ tools::Long hDrawable; // a drawable
void* pVisual; // the visual in use
int nScreen; // the current screen of the drawable
void* pRenderFormat; // render format for drawable
@@ -48,9 +48,9 @@ namespace cairo {
struct X11Pixmap
{
void* mpDisplay; // the relevant display connection
- long mhDrawable; // a drawable
+ tools::Long mhDrawable; // a drawable
- X11Pixmap( long hDrawable, void* pDisplay ) :
+ X11Pixmap( tools::Long hDrawable, void* pDisplay ) :
mpDisplay(pDisplay),
mhDrawable(hDrawable)
{}
diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx
index 5a6f04fd856f..2c53f277c12d 100644
--- a/vcl/unx/generic/gdi/font.cxx
+++ b/vcl/unx/generic/gdi/font.cxx
@@ -94,12 +94,12 @@ bool X11SalGraphics::CreateFontSubset(
pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
}
-const void* X11SalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
+const void* X11SalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen)
{
return mxTextRenderImpl->GetEmbedFontData(pFont, pDataLen);
}
-void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen )
+void X11SalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen )
{
mxTextRenderImpl->FreeEmbedFontData(pData, nLen);
}
diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx
index b364406f1e1d..0e6556b24588 100644
--- a/vcl/unx/generic/gdi/freetypetextrender.cxx
+++ b/vcl/unx/generic/gdi/freetypetextrender.cxx
@@ -181,7 +181,7 @@ bool FreeTypeTextRenderImpl::CreateFontSubset(
return bSuccess;
}
-const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
+const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen)
{
// in this context the pFont->GetFontId() is a valid PSP
// font since they are the only ones left after the PDF
@@ -192,7 +192,7 @@ const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFo
return GenPspGraphics::DoGetEmbedFontData(aFont, pDataLen);
}
-void FreeTypeTextRenderImpl::FreeEmbedFontData( const void* pData, long nLen )
+void FreeTypeTextRenderImpl::FreeEmbedFontData( const void* pData, tools::Long nLen )
{
GenPspGraphics::DoFreeEmbedFontData( pData, nLen );
}
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 337454c2a868..eaccc865cd41 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -543,9 +543,9 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry,
}
}
-void X11SalGraphicsImpl::copyArea ( long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+void X11SalGraphicsImpl::copyArea ( tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool /*bWindowInvalidate*/)
{
SalTwoRect aPosAry(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight);
@@ -558,7 +558,7 @@ void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap&
Display* pXDisp = pSalDisp->GetDisplay();
const Drawable aDrawable( mrParent.GetDrawable() );
const SalColormap& rColMap = pSalDisp->GetColormap( mrParent.m_nXScreen );
- const long nDepth = mrParent.GetDisplay()->GetVisual( mrParent.m_nXScreen ).GetDepth();
+ const tools::Long nDepth = mrParent.GetDisplay()->GetVisual( mrParent.m_nXScreen ).GetDepth();
GC aGC( GetCopyGC() );
XGCValues aOldVal, aNewVal;
int nValues = GCForeground | GCBackground;
@@ -791,7 +791,7 @@ bool X11SalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR,
// the alpha values need to be inverted for XRender
// TODO: make upper layers use standard alpha
- long* pLDst = reinterpret_cast<long*>(pAlphaBits);
+ tools::Long* pLDst = reinterpret_cast<long*>(pAlphaBits);
for( int i = nImageSize/sizeof(long); --i >= 0; ++pLDst )
*pLDst = ~*pLDst;
@@ -851,8 +851,8 @@ bool X11SalGraphicsImpl::drawTransformedBitmap(
return false;
}
-bool X11SalGraphicsImpl::drawAlphaRect( long nX, long nY, long nWidth,
- long nHeight, sal_uInt8 nTransparency )
+bool X11SalGraphicsImpl::drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency )
{
if( ! mrParent.m_pFrame && ! mrParent.m_pVDev )
return false;
@@ -951,11 +951,11 @@ bool X11SalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip )
for (auto const& rectangle : aRectangles)
{
- const long nW(rectangle.GetWidth());
+ const tools::Long nW(rectangle.GetWidth());
if(nW)
{
- const long nH(rectangle.GetHeight());
+ const tools::Long nH(rectangle.GetHeight());
if(nH)
{
@@ -1116,13 +1116,13 @@ void X11SalGraphicsImpl::SetXORMode( bool bSet, bool )
}
}
-void X11SalGraphicsImpl::drawPixel( long nX, long nY )
+void X11SalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY )
{
if( mnPenColor != SALCOLOR_NONE )
XDrawPoint( mrParent.GetXDisplay(), mrParent.GetDrawable(), SelectPen(), nX, nY );
}
-void X11SalGraphicsImpl::drawPixel( long nX, long nY, Color nColor )
+void X11SalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY, Color nColor )
{
if( nColor == SALCOLOR_NONE )
return;
@@ -1150,7 +1150,7 @@ void X11SalGraphicsImpl::drawPixel( long nX, long nY, Color nColor )
}
}
-void X11SalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 )
+void X11SalGraphicsImpl::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 )
{
if( mnPenColor != SALCOLOR_NONE )
{
@@ -1159,7 +1159,7 @@ void X11SalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 )
}
}
-void X11SalGraphicsImpl::drawRect( long nX, long nY, long nDX, long nDY )
+void X11SalGraphicsImpl::drawRect( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
if( mnBrushColor != SALCOLOR_NONE )
{
@@ -1320,10 +1320,10 @@ bool X11SalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*,
return false;
}
-void X11SalGraphicsImpl::invert( long nX,
- long nY,
- long nDX,
- long nDY,
+void X11SalGraphicsImpl::invert( tools::Long nX,
+ tools::Long nY,
+ tools::Long nDX,
+ tools::Long nDY,
SalInvert nFlags )
{
GC pGC;
@@ -1372,7 +1372,7 @@ void X11SalGraphicsImpl::invert( sal_uInt32 nPoints,
Complex, CoordModeOrigin );
}
-bool X11SalGraphicsImpl::drawEPS( long,long,long,long,void*,sal_uInt32 )
+bool X11SalGraphicsImpl::drawEPS( tools::Long,tools::Long,tools::Long,tools::Long,void*,sal_uInt32 )
{
return false;
}
@@ -1428,7 +1428,7 @@ bool X11SalGraphicsImpl::drawPolyPolygon(
return bDrawn;
}
-long X11SalGraphicsImpl::GetGraphicsHeight() const
+tools::Long X11SalGraphicsImpl::GetGraphicsHeight() const
{
if( mrParent.m_pFrame )
return mrParent.m_pFrame->maGeometry.nHeight;
@@ -1850,7 +1850,7 @@ bool X11SalGraphicsImpl::drawPolyLine(
return bDrawnOk;
}
-Color X11SalGraphicsImpl::getPixel( long nX, long nY )
+Color X11SalGraphicsImpl::getPixel( tools::Long nX, tools::Long nY )
{
if( mrParent.bWindow_ && !mrParent.bVirDev_ )
{
@@ -1884,7 +1884,7 @@ Color X11SalGraphicsImpl::getPixel( long nX, long nY )
return mrParent.GetColormap().GetColor( aXColor.pixel );
}
-std::shared_ptr<SalBitmap> X11SalGraphicsImpl::getBitmap( long nX, long nY, long nDX, long nDY )
+std::shared_ptr<SalBitmap> X11SalGraphicsImpl::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
bool bFakeWindowBG = false;
@@ -1909,7 +1909,7 @@ std::shared_ptr<SalBitmap> X11SalGraphicsImpl::getBitmap( long nX, long nY, long
bFakeWindowBG = true;
else
{
- long nOrgDX = nDX, nOrgDY = nDY;
+ tools::Long nOrgDX = nDX, nOrgDY = nDY;
// clip to window size
if ( nX < 0 )
@@ -1956,7 +1956,7 @@ sal_uInt16 X11SalGraphicsImpl::GetBitCount() const
return mrParent.GetVisual().GetDepth();
}
-long X11SalGraphicsImpl::GetGraphicsWidth() const
+tools::Long X11SalGraphicsImpl::GetGraphicsWidth() const
{
if( mrParent.m_pFrame )
return mrParent.m_pFrame->maGeometry.nWidth;
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
index 6a9201cf9c6c..1379deca6f83 100644
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ b/vcl/unx/generic/gdi/gdiimpl.hxx
@@ -96,7 +96,7 @@ private:
const basegfx::triangulator::B2DTriangleVector& rTriangles,
double fTransparency);
- long GetGraphicsHeight() const;
+ tools::Long GetGraphicsHeight() const;
void drawMaskedBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSalBitmap,
@@ -120,7 +120,7 @@ public:
virtual sal_uInt16 GetBitCount() const override;
// get the width of the device
- virtual long GetGraphicsWidth() const override;
+ virtual tools::Long GetGraphicsWidth() const override;
// set the clip region to empty
virtual void ResetClipRegion() override;
@@ -149,12 +149,12 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor ) override;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel( long nX, long nY ) override;
- virtual void drawPixel( long nX, long nY, Color nColor ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
+ virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
+ virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -196,9 +196,9 @@ public:
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+ tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate ) override;
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -217,21 +217,21 @@ public:
const SalBitmap& rSalBitmap,
Color nMaskColor ) override;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
- virtual Color getPixel( long nX, long nY ) override;
+ virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
// invert --> ClipRegion (only Windows or VirDevs)
virtual void invert(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
SalInvert nFlags) override;
virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
virtual bool drawEPS(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
void* pPtr,
sal_uInt32 nSize ) override;
@@ -279,8 +279,8 @@ public:
fully transparent rectangle
*/
virtual bool drawAlphaRect(
- long nX, long nY,
- long nWidth, long nHeight,
+ tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight,
sal_uInt8 nTransparency ) override;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 1ca2697ee6a0..9e76a48c08e2 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -112,7 +112,7 @@ namespace
size_t nExtraSpaceInScanLine = pDIB->mnScanlineSize - pDIB->mnWidth * pDIB->mnBitCount / 8;
if (nExtraSpaceInScanLine)
{
- for (long i = 0; i < pDIB->mnHeight; ++i)
+ for (tools::Long i = 0; i < pDIB->mnHeight; ++i)
{
sal_uInt8 *pRow = pDIB->mpBits + (i * pDIB->mnScanlineSize);
memset(pRow + (pDIB->mnScanlineSize - nExtraSpaceInScanLine), 0, nExtraSpaceInScanLine);
@@ -168,7 +168,7 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
pDIB->mnWidth = rSize.Width();
pDIB->mnHeight = rSize.Height();
- long nScanlineBase;
+ tools::Long nScanlineBase;
bool bFail = o3tl::checked_multiply<long>(pDIB->mnWidth, nBitCount, nScanlineBase);
if (bFail)
{
@@ -208,11 +208,11 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
Drawable aDrawable,
SalX11Screen nScreen,
- long nDrawableDepth,
- long nX,
- long nY,
- long nWidth,
- long nHeight,
+ tools::Long nDrawableDepth,
+ tools::Long nX,
+ tools::Long nY,
+ tools::Long nWidth,
+ tools::Long nHeight,
bool bGrey
) {
std::unique_ptr<BitmapBuffer> pDIB;
@@ -358,7 +358,7 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
XImage* X11SalBitmap::ImplCreateXImage(
SalDisplay const *pSalDisp,
SalX11Screen nScreen,
- long nDepth,
+ tools::Long nDepth,
const SalTwoRect& rTwoRect
) const
{
@@ -379,8 +379,8 @@ XImage* X11SalBitmap::ImplCreateXImage(
if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight )
{
Display* pXDisp = pSalDisp->GetDisplay();
- long nWidth = rTwoRect.mnDestWidth;
- long nHeight = rTwoRect.mnDestHeight;
+ tools::Long nWidth = rTwoRect.mnDestWidth;
+ tools::Long nHeight = rTwoRect.mnDestHeight;
if( 1 == GetBitCount() )
nDepth = 1;
@@ -512,11 +512,11 @@ XImage* X11SalBitmap::ImplCreateXImage(
bool X11SalBitmap::ImplCreateFromDrawable(
Drawable aDrawable,
SalX11Screen nScreen,
- long nDrawableDepth,
- long nX,
- long nY,
- long nWidth,
- long nHeight
+ tools::Long nDrawableDepth,
+ tools::Long nX,
+ tools::Long nY,
+ tools::Long nWidth,
+ tools::Long nHeight
) {
Destroy();
@@ -529,7 +529,7 @@ bool X11SalBitmap::ImplCreateFromDrawable(
ImplSalDDB* X11SalBitmap::ImplGetDDB(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
+ tools::Long nDrawableDepth,
const SalTwoRect& rTwoRect
) const
{
@@ -627,7 +627,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
void X11SalBitmap::ImplDraw(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
+ tools::Long nDrawableDepth,
const SalTwoRect& rTwoRect,
const GC& rGC
) const
@@ -707,7 +707,7 @@ bool X11SalBitmap::Create(
css::uno::Sequence< css::uno::Any > args;
if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
- long pixmapHandle = {}; // spurious -Werror=maybe-uninitialized
+ tools::Long pixmapHandle = {}; // spurious -Werror=maybe-uninitialized
sal_Int32 depth;
if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) {
@@ -877,11 +877,11 @@ ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable,
ImplSalDDB::ImplSalDDB(
Drawable aDrawable,
SalX11Screen nXScreen,
- long nDrawableDepth,
- long nX,
- long nY,
- long nWidth,
- long nHeight
+ tools::Long nDrawableDepth,
+ tools::Long nX,
+ tools::Long nY,
+ tools::Long nWidth,
+ tools::Long nHeight
) : maTwoRect(0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight)
, mnDepth( nDrawableDepth )
, mnXScreen( nXScreen )
@@ -922,7 +922,7 @@ ImplSalDDB::~ImplSalDDB()
XFreePixmap( vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDisplay(), maPixmap );
}
-bool ImplSalDDB::ImplMatches( SalX11Screen nXScreen, long nDepth, const SalTwoRect& rTwoRect ) const
+bool ImplSalDDB::ImplMatches( SalX11Screen nXScreen, tools::Long nDepth, const SalTwoRect& rTwoRect ) const
{
bool bRet = false;
@@ -970,14 +970,14 @@ void ImplSalDDB::ImplDraw(
void ImplSalDDB::ImplDraw(
Drawable aSrcDrawable,
- long nSrcDrawableDepth,
+ tools::Long nSrcDrawableDepth,
Drawable aDstDrawable,
- long nSrcX,
- long nSrcY,
- long nDestWidth,
- long nDestHeight,
- long nDestX,
- long nDestY,
+ tools::Long nSrcX,
+ tools::Long nSrcY,
+ tools::Long nDestWidth,
+ tools::Long nDestHeight,
+ tools::Long nDestX,
+ tools::Long nDestY,
const GC& rGC
) {
SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericUnixSalData());
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 6da291c91bea..045a97e14db0 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -342,7 +342,7 @@ sal_uInt16 X11SalGraphics::GetBitCount() const
return mxImpl->GetBitCount();
}
-long X11SalGraphics::GetGraphicsWidth() const
+tools::Long X11SalGraphics::GetGraphicsWidth() const
{
return mxImpl->GetGraphicsWidth();
}
@@ -414,22 +414,22 @@ void X11SalGraphics::SetXORMode( bool bSet, bool bInvertOnly )
mxImpl->SetXORMode( bSet, bInvertOnly );
}
-void X11SalGraphics::drawPixel( long nX, long nY )
+void X11SalGraphics::drawPixel( tools::Long nX, tools::Long nY )
{
mxImpl->drawPixel( nX, nY );
}
-void X11SalGraphics::drawPixel( long nX, long nY, Color nColor )
+void X11SalGraphics::drawPixel( tools::Long nX, tools::Long nY, Color nColor )
{
mxImpl->drawPixel( nX, nY, nColor );
}
-void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
+void X11SalGraphics::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 )
{
mxImpl->drawLine( nX1, nY1, nX2, nY2 );
}
-void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY )
+void X11SalGraphics::drawRect( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
mxImpl->drawRect( nX, nY, nDX, nDY );
}
@@ -474,8 +474,8 @@ void X11SalGraphics::invert( sal_uInt32 nPoints,
mxImpl->invert( nPoints, pPtAry, nFlags );
}
-bool X11SalGraphics::drawEPS( long nX, long nY, long nWidth,
- long nHeight, void* pPtr, sal_uInt32 nSize )
+bool X11SalGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, void* pPtr, sal_uInt32 nSize )
{
return mxImpl->drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
}
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index 768562bfb498..fca6051dc3cd 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -91,9 +91,9 @@ void X11SalGraphics::copyBits( const SalTwoRect& rPosAry,
mxImpl->copyBits( rPosAry, pSSrcGraphics );
}
-void X11SalGraphics::copyArea ( long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+void X11SalGraphics::copyArea ( tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate)
{
mxImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, bWindowInvalidate );
@@ -141,8 +141,8 @@ bool X11SalGraphics::drawTransformedBitmap(
return mxImpl->drawTransformedBitmap( rNull, rX, rY, rSourceBitmap, pAlphaBitmap );
}
-bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
- long nHeight, sal_uInt8 nTransparency )
+bool X11SalGraphics::drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency )
{
return mxImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
}
@@ -154,20 +154,20 @@ void X11SalGraphics::drawMask( const SalTwoRect& rPosAry,
mxImpl->drawMask( rPosAry, rSalBitmap, nMaskColor );
}
-std::shared_ptr<SalBitmap> X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
+std::shared_ptr<SalBitmap> X11SalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
return mxImpl->getBitmap( nX, nY, nDX, nDY );
}
-Color X11SalGraphics::getPixel( long nX, long nY )
+Color X11SalGraphics::getPixel( tools::Long nX, tools::Long nY )
{
return mxImpl->getPixel( nX, nY );
}
-void X11SalGraphics::invert( long nX,
- long nY,
- long nDX,
- long nDY,
+void X11SalGraphics::invert( tools::Long nX,
+ tools::Long nY,
+ tools::Long nDX,
+ tools::Long nDY,
SalInvert nFlags )
{
mxImpl->invert( nX, nY, nDX, nDY, nFlags );
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index 00a6f0a19416..eeb4e73fe62d 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -38,7 +38,7 @@
#endif
std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(SalGraphics const * pGraphics,
- long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData,
+ tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData,
std::unique_ptr<X11SalGraphics> pNewGraphics)
{
assert(pNewGraphics);
@@ -54,7 +54,7 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(SalGrap
}
std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphics* pGraphics,
- long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData)
+ tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData)
{
return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, std::make_unique<X11SalGraphics>());
}
@@ -92,7 +92,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, cairo_surface_t* pPreEx
mxImpl->Init();
}
-X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nDX, long &nDY,
+X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData,
std::unique_ptr<X11SalGraphics> pNewGraphics) :
pGraphics_(std::move(pNewGraphics)),
@@ -132,8 +132,8 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nD
break;
nScreen++;
}
- nDX_ = static_cast<long>(w);
- nDY_ = static_cast<long>(h);
+ nDX_ = static_cast<tools::Long>(w);
+ nDY_ = static_cast<tools::Long>(h);
nDX = nDX_;
nDY = nDY_;
m_nXScreen = SalX11Screen( nScreen );
@@ -199,7 +199,7 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics()
void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* )
{ bGraphics_ = false; }
-bool X11SalVirtualDevice::SetSize( long nDX, long nDY )
+bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY )
{
if( bExternPixmap_ )
return false;
diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx
index 91f82ac84b21..d49d932656ee 100644
--- a/vcl/unx/generic/gdi/x11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx
@@ -46,7 +46,7 @@ void X11CairoTextRender::clipRegion(cairo_t* cr)
Region pClipRegion = mrParent.mpClipRegion;
if( pClipRegion && !XEmptyRegion( pClipRegion ) )
{
- for (long i = 0; i < pClipRegion->numRects; ++i)
+ for (tools::Long i = 0; i < pClipRegion->numRects; ++i)
{
cairo_rectangle(cr,
pClipRegion->rects[i].x1,
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 9b3f8dc5c6f1..cbc8f7e1b4d5 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -421,8 +421,8 @@ FreetypeFont::FreetypeFont(FreetypeFontInstance& rFontInstance, const std::share
if( rFSD.mnOrientation != 0 )
{
const double dRad = rFSD.mnOrientation * ( F_2PI / 3600.0 );
- mnCos = static_cast<long>( 0x10000 * cos( dRad ) + 0.5 );
- mnSin = static_cast<long>( 0x10000 * sin( dRad ) + 0.5 );
+ mnCos = static_cast<tools::Long>( 0x10000 * cos( dRad ) + 0.5 );
+ mnSin = static_cast<tools::Long>( 0x10000 * sin( dRad ) + 0.5 );
}
// set the pixel size of the font instance
@@ -729,11 +729,11 @@ class PolyArgs
public:
PolyArgs( tools::PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints );
- void AddPoint( long nX, long nY, PolyFlags);
+ void AddPoint( tools::Long nX, tools::Long nY, PolyFlags);
void ClosePolygon();
- long GetPosX() const { return maPosition.x;}
- long GetPosY() const { return maPosition.y;}
+ tools::Long GetPosX() const { return maPosition.x;}
+ tools::Long GetPosY() const { return maPosition.y;}
private:
tools::PolyPolygon& mrPolyPoly;
@@ -767,7 +767,7 @@ PolyArgs::PolyArgs( tools::PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints )
maPosition.x = maPosition.y = 0;
}
-void PolyArgs::AddPoint( long nX, long nY, PolyFlags aFlag )
+void PolyArgs::AddPoint( tools::Long nX, tools::Long nY, PolyFlags aFlag )
{
SAL_WARN_IF( (mnPoints >= mnMaxPoints), "vcl", "FTGlyphOutline: AddPoint overflow!" );
if( mnPoints >= mnMaxPoints )
@@ -852,12 +852,12 @@ static int FT_conic_to( const FT_Vector* p1, const FT_Vector* p2, void* vpPolyAr
PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs);
// VCL's Polygon only knows cubic beziers
- const long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6;
- const long nY1 = (2 * rA.GetPosY() + 4 * p1->y + 3) / 6;
+ const tools::Long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6;
+ const tools::Long nY1 = (2 * rA.GetPosY() + 4 * p1->y + 3) / 6;
rA.AddPoint( nX1, nY1, PolyFlags::Control );
- const long nX2 = (2 * p2->x + 4 * p1->x + 3) / 6;
- const long nY2 = (2 * p2->y + 4 * p1->y + 3) / 6;
+ const tools::Long nX2 = (2 * p2->x + 4 * p1->x + 3) / 6;
+ const tools::Long nY2 = (2 * p2->y + 4 * p1->y + 3) / 6;
rA.AddPoint( nX2, nY2, PolyFlags::Control );
rA.AddPoint( p2->x, p2->y, PolyFlags::Normal );
@@ -923,7 +923,7 @@ bool FreetypeFont::GetGlyphOutline(sal_GlyphId nId, basegfx::B2DPolyPolygon& rB2
return true;
}
- long nMaxPoints = 1 + rOutline.n_points * 3;
+ tools::Long nMaxPoints = 1 + rOutline.n_points * 3;
tools::PolyPolygon aToolPolyPolygon;
PolyArgs aPolyArg( aToolPolyPolygon, nMaxPoints );
diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx
index b559b9b1325f..4ddce0214190 100644
--- a/vcl/unx/generic/print/bitmap_gfx.cxx
+++ b/vcl/unx/generic/print/bitmap_gfx.cxx
@@ -511,9 +511,9 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle&
// image body
std::unique_ptr<HexEncoder> xEncoder(new HexEncoder (mpPageBody));
- for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
+ for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
- for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
+ for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn);
xEncoder->EncodeByte (nByte);
@@ -612,9 +612,9 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle&
std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody));
- for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
+ for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
- for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
+ for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn);
xEncoder->EncodeByte (nByte);
@@ -630,12 +630,12 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle&
std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody));
- for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
+ for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
- long nBitPos = 0;
+ tools::Long nBitPos = 0;
unsigned char nByte = 0;
- for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
+ for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nBit = rBitmap.GetPixelIdx (nRow, nColumn);
nByte |= nBit << (7 - nBitPos);
@@ -661,9 +661,9 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectang
std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody));
- for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
+ for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
- for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
+ for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nByte = rBitmap.GetPixelIdx (nRow, nColumn);
xEncoder->EncodeByte (nByte);
@@ -679,9 +679,9 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Recta
std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody));
- for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
+ for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
- for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
+ for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
PrinterColor aColor = rBitmap.GetPixelRGB (nRow, nColumn);
xEncoder->EncodeByte (aColor.GetRed());
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 18caa2e8f413..6d08fbb7842a 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -661,7 +661,7 @@ bool PspSalInfoPrinter::SetData(
void PspSalInfoPrinter::GetPageInfo(
const ImplJobSetup* pJobSetup,
- long& rOutWidth, long& rOutHeight,
+ tools::Long& rOutWidth, tools::Long& rOutHeight,
Point& rPageOffset,
Size& rPaperSize )
{
@@ -925,8 +925,8 @@ struct PDFNewJobParameters
bool operator==(const PDFNewJobParameters& rComp ) const
{
- const long nRotatedWidth = rComp.maPageSize.Height();
- const long nRotatedHeight = rComp.maPageSize.Width();
+ const tools::Long nRotatedWidth = rComp.maPageSize.Height();
+ const tools::Long nRotatedHeight = rComp.maPageSize.Width();
Size aCompLSSize(nRotatedWidth, nRotatedHeight);
return
(maPageSize == rComp.maPageSize || maPageSize == aCompLSSize)
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index a79aaab72fd8..79e3b29175d1 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -226,7 +226,7 @@ sal_uInt16 GenPspGraphics::GetBitCount() const
return m_pPrinterGfx->GetBitCount();
}
-long GenPspGraphics::GetGraphicsWidth() const
+tools::Long GenPspGraphics::GetGraphicsWidth() const
{
return 0;
}
@@ -245,11 +245,11 @@ bool GenPspGraphics::setClipRegion( const vcl::Region& i_rClip )
for (auto const& rectangle : aRectangles)
{
- const long nW(rectangle.GetWidth());
+ const tools::Long nW(rectangle.GetWidth());
if(nW)
{
- const long nH(rectangle.GetHeight());
+ const tools::Long nH(rectangle.GetHeight());
if(nH)
{
@@ -322,12 +322,12 @@ void GenPspGraphics::SetXORMode( bool bSet, bool )
SAL_WARN_IF( bSet, "vcl", "Error: PrinterGfx::SetXORMode() not implemented" );
}
-void GenPspGraphics::drawPixel( long nX, long nY )
+void GenPspGraphics::drawPixel( tools::Long nX, tools::Long nY )
{
m_pPrinterGfx->DrawPixel (Point(nX, nY));
}
-void GenPspGraphics::drawPixel( long nX, long nY, Color nColor )
+void GenPspGraphics::drawPixel( tools::Long nX, tools::Long nY, Color nColor )
{
psp::PrinterColor aColor (nColor.GetRed(),
nColor.GetGreen(),
@@ -335,12 +335,12 @@ void GenPspGraphics::drawPixel( long nX, long nY, Color nColor )
m_pPrinterGfx->DrawPixel (Point(nX, nY), aColor);
}
-void GenPspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
+void GenPspGraphics::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 )
{
m_pPrinterGfx->DrawLine (Point(nX1, nY1), Point(nX2, nY2));
}
-void GenPspGraphics::drawRect( long nX, long nY, long nDX, long nDY )
+void GenPspGraphics::drawRect( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
m_pPrinterGfx->DrawRect (tools::Rectangle(Point(nX, nY), Size(nDX, nDY)));
}
@@ -416,7 +416,7 @@ void GenPspGraphics::invert( sal_uInt32,
SAL_WARN( "vcl", "Error: PrinterGfx::Invert() not implemented" );
}
-bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize )
+bool GenPspGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize )
{
return m_pPrinterGfx->DrawEPS( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
}
@@ -427,7 +427,7 @@ void GenPspGraphics::copyBits( const SalTwoRect&,
OSL_FAIL( "Error: PrinterGfx::CopyBits() not implemented" );
}
-void GenPspGraphics::copyArea ( long,long,long,long,long,long,bool )
+void GenPspGraphics::copyArea ( tools::Long,tools::Long,tools::Long,tools::Long,tools::Long,tools::Long,bool )
{
OSL_FAIL( "Error: PrinterGfx::CopyArea() not implemented" );
}
@@ -461,19 +461,19 @@ void GenPspGraphics::drawMask( const SalTwoRect&,
OSL_FAIL("Error: PrinterGfx::DrawMask() not implemented");
}
-std::shared_ptr<SalBitmap> GenPspGraphics::getBitmap( long, long, long, long )
+std::shared_ptr<SalBitmap> GenPspGraphics::getBitmap( tools::Long, tools::Long, tools::Long, tools::Long )
{
SAL_INFO("vcl", "Warning: PrinterGfx::GetBitmap() not implemented");
return nullptr;
}
-Color GenPspGraphics::getPixel( long, long )
+Color GenPspGraphics::getPixel( tools::Long, tools::Long )
{
OSL_FAIL("Warning: PrinterGfx::GetPixel() not implemented");
return 0;
}
-void GenPspGraphics::invert(long,long,long,long,SalInvert)
+void GenPspGraphics::invert(tools::Long,tools::Long,tools::Long,tools::Long,SalInvert)
{
OSL_FAIL("Warning: PrinterGfx::Invert() not implemented");
}
@@ -854,7 +854,7 @@ bool GenPspGraphics::drawTransformedBitmap(
return false;
}
-bool GenPspGraphics::drawAlphaRect( long, long, long, long, sal_uInt8 )
+bool GenPspGraphics::drawAlphaRect( tools::Long, tools::Long, tools::Long, tools::Long, sal_uInt8 )
{
return false;
}
@@ -898,13 +898,13 @@ bool GenPspGraphics::supportsOperation( OutDevSupportType ) const
return false;
}
-void GenPspGraphics::DoFreeEmbedFontData( const void* pData, long nLen )
+void GenPspGraphics::DoFreeEmbedFontData( const void* pData, tools::Long nLen )
{
if( pData )
munmap( const_cast<void *>(pData), nLen );
}
-const void* GenPspGraphics::DoGetEmbedFontData(psp::fontID aFont, long* pDataLen)
+const void* GenPspGraphics::DoGetEmbedFontData(psp::fontID aFont, tools::Long* pDataLen)
{
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
@@ -929,12 +929,12 @@ const void* GenPspGraphics::DoGetEmbedFontData(psp::fontID aFont, long* pDataLen
return pFile;
}
-void GenPspGraphics::FreeEmbedFontData( const void* pData, long nLen )
+void GenPspGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen )
{
DoFreeEmbedFontData( pData, nLen );
}
-const void* GenPspGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
+const void* GenPspGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen)
{
// in this context the pFont->GetFontId() is a valid PSP
// font since they are the only ones left after the PDF
diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx
index c27348afcff6..1afd827dfbb7 100644
--- a/vcl/unx/generic/print/glyphset.cxx
+++ b/vcl/unx/generic/print/glyphset.cxx
@@ -183,7 +183,7 @@ namespace {
struct EncEntry
{
unsigned char aEnc;
- long aGID;
+ tools::Long aGID;
EncEntry() : aEnc( 0 ), aGID( 0 ) {}
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index b3137fd2b00c..06ed7fecdb9e 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -316,7 +316,7 @@ void PPDDecompressStream::Open( const OUString& i_rFile )
mpMemStream.reset( new SvMemoryStream( 4096, 4096 ) );
ZCodec aCodec;
aCodec.BeginCompression( ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true );
- long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream );
+ tools::Long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream );
aCodec.EndCompression();
if( nComp < 0 )
{
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 3d52797f5cec..b8a3d2a5d0de 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -148,7 +148,7 @@ void X11SalFrame::setXEmbedInfo()
if( !m_bXEmbed )
return;
- long aInfo[2];
+ tools::Long aInfo[2];
aInfo[0] = 1; // XEMBED protocol version
aInfo[1] = (bMapped_ ? 1 : 0); // XEMBED_MAPPED
XChangeProperty( pDisplay_->GetDisplay(),
@@ -1112,7 +1112,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
}
-void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight )
+void X11SalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight )
{
if( IsChildWindow() )
return;
@@ -1122,7 +1122,7 @@ void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight )
return;
XSizeHints* pHints = XAllocSizeHints();
- long nSupplied = 0;
+ tools::Long nSupplied = 0;
XGetWMNormalHints( GetXDisplay(),
GetShellWindow(),
pHints,
@@ -1137,7 +1137,7 @@ void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight )
XFree( pHints );
}
-void X11SalFrame::SetMinClientSize( long nWidth, long nHeight )
+void X11SalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight )
{
if( IsChildWindow() )
return;
@@ -1147,7 +1147,7 @@ void X11SalFrame::SetMinClientSize( long nWidth, long nHeight )
return;
XSizeHints* pHints = XAllocSizeHints();
- long nSupplied = 0;
+ tools::Long nSupplied = 0;
XGetWMNormalHints( GetXDisplay(),
GetShellWindow(),
pHints,
@@ -1425,7 +1425,7 @@ void X11SalFrame::GetWorkArea( tools::Rectangle& rWorkArea )
rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 );
}
-void X11SalFrame::GetClientSize( long &rWidth, long &rHeight )
+void X11SalFrame::GetClientSize( tools::Long &rWidth, tools::Long &rHeight )
{
if( ! bViewable_ )
{
@@ -1582,7 +1582,7 @@ void X11SalFrame::updateScreenNumber()
maGeometry.nDisplayScreenNumber = m_nXScreen.getXScreen();
}
-void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+void X11SalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags )
{
if( nStyle_ & SalFrameStyleFlags::PLUG )
return;
@@ -1663,7 +1663,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
)
{
XSizeHints* pHints = XAllocSizeHints();
- long nSupplied = 0;
+ tools::Long nSupplied = 0;
XGetWMNormalHints( GetXDisplay(),
GetShellWindow(),
pHints,
@@ -1706,7 +1706,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
}
if (pState->mnMask & WindowStateMask::Width)
{
- long nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0;
+ tools::Long nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0;
aPosSize.setWidth (nWidth);
bDoAdjust = true;
}
@@ -1741,14 +1741,14 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
}
// adjust position so that frame fits onto screen
- if( aPosSize.Right()+static_cast<long>(aGeom.nRightDecoration) > aScreenSize.Width()-1 )
- aPosSize.Move( aScreenSize.Width() - aPosSize.Right() - static_cast<long>(aGeom.nRightDecoration), 0 );
- if( aPosSize.Bottom()+static_cast<long>(aGeom.nBottomDecoration) > aScreenSize.Height()-1 )
- aPosSize.Move( 0, aScreenSize.Height() - aPosSize.Bottom() - static_cast<long>(aGeom.nBottomDecoration) );
- if( aPosSize.Left() < static_cast<long>(aGeom.nLeftDecoration) )
- aPosSize.Move( static_cast<long>(aGeom.nLeftDecoration) - aPosSize.Left(), 0 );
- if( aPosSize.Top() < static_cast<long>(aGeom.nTopDecoration) )
- aPosSize.Move( 0, static_cast<long>(aGeom.nTopDecoration) - aPosSize.Top() );
+ if( aPosSize.Right()+static_cast<tools::Long>(aGeom.nRightDecoration) > aScreenSize.Width()-1 )
+ aPosSize.Move( aScreenSize.Width() - aPosSize.Right() - static_cast<tools::Long>(aGeom.nRightDecoration), 0 );
+ if( aPosSize.Bottom()+static_cast<tools::Long>(aGeom.nBottomDecoration) > aScreenSize.Height()-1 )
+ aPosSize.Move( 0, aScreenSize.Height() - aPosSize.Bottom() - static_cast<tools::Long>(aGeom.nBottomDecoration) );
+ if( aPosSize.Left() < static_cast<tools::Long>(aGeom.nLeftDecoration) )
+ aPosSize.Move( static_cast<tools::Long>(aGeom.nLeftDecoration) - aPosSize.Left(), 0 );
+ if( aPosSize.Top() < static_cast<tools::Long>(aGeom.nTopDecoration) )
+ aPosSize.Move( 0, static_cast<tools::Long>(aGeom.nTopDecoration) - aPosSize.Top() );
}
SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
@@ -1848,8 +1848,8 @@ void X11SalFrame::GetPosSize( tools::Rectangle &rPosSize )
if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 )
{
const Size& aScreenSize = pDisplay_->getDataForScreen( m_nXScreen ).m_aSize;
- long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration;
- long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration;
+ tools::Long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration;
+ tools::Long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration;
rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) );
}
@@ -1868,7 +1868,7 @@ void X11SalFrame::SetSize( const Size &rSize )
&& ( nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT )
{
XSizeHints* pHints = XAllocSizeHints();
- long nSupplied = 0;
+ tools::Long nSupplied = 0;
XGetWMNormalHints( GetXDisplay(),
GetShellWindow(),
pHints,
@@ -1948,7 +1948,7 @@ void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize )
)
{
XSizeHints* pHints = XAllocSizeHints();
- long nSupplied = 0;
+ tools::Long nSupplied = 0;
XGetWMNormalHints( GetXDisplay(),
GetShellWindow(),
pHints,
@@ -2239,7 +2239,7 @@ void X11SalFrame::SetPointer( PointerStyle ePointerStyle )
CurrentTime );
}
-void X11SalFrame::SetPointerPos(long nX, long nY)
+void X11SalFrame::SetPointerPos(tools::Long nX, tools::Long nY)
{
/* when the application tries to center the mouse in the dialog the
* window isn't mapped already. So use coordinates relative to the root window.
@@ -4078,7 +4078,7 @@ void X11SalFrame::BeginSetClipRegion( sal_uInt32 /*nRects*/ )
m_vClipRectangles.clear();
}
-void X11SalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+void X11SalFrame::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
m_vClipRectangles.emplace_back( XRectangle { static_cast<short>(nX), static_cast<short>(nY),
static_cast<unsigned short>(nWidth), static_cast<unsigned short>(nHeight) } );
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index 029204481ff8..864b5e22307f 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -199,7 +199,7 @@ SalClipRegion::BeginSetClipRegion( sal_uInt32 nRects )
}
void
-SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+SalClipRegion::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
if ( nWidth && nHeight && (numClipRectangles < maxClipRectangles) )
{
@@ -293,7 +293,7 @@ X11SalObject::BeginSetClipRegion( sal_uInt32 nRectCount )
}
void
-X11SalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+X11SalObject::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
maClipRegion.UnionClipRegion ( nX, nY, nWidth, nHeight );
}
@@ -316,7 +316,7 @@ X11SalObject::EndSetClipRegion()
}
void
-X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
+X11SalObject::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
if ( maPrimary && maSecondary && nWidth && nHeight )
{
@@ -479,7 +479,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::A
if (rEnterArgs.getLength() == 3)
{
rEnterArgs[0] >>= bFreePixmap;
- long pixmapHandle = None;
+ tools::Long pixmapHandle = None;
rEnterArgs[1] >>= pixmapHandle;
aPixmap = pixmapHandle;
}
@@ -493,7 +493,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::A
if (rLeaveArgs.getLength() == 3)
{
rLeaveArgs[0] >>= bFreePixmap;
- long pixmapHandle = None;
+ tools::Long pixmapHandle = None;
rLeaveArgs[1] >>= pixmapHandle;
aPixmap = pixmapHandle;
}
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 4055520fe153..fd18c35aec6d 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -709,7 +709,7 @@ GtkSalFrame::~GtkSalFrame()
cairo_surface_destroy(m_pSurface);
}
-void GtkSalFrame::moveWindow( long nX, long nY )
+void GtkSalFrame::moveWindow( tools::Long nX, tools::Long nY )
{
if( isChild( false ) )
{
@@ -727,12 +727,12 @@ void GtkSalFrame::moveWindow( long nX, long nY )
gtk_window_move( GTK_WINDOW(m_pWindow), nX, nY );
}
-void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight)
+void GtkSalFrame::widget_set_size_request(tools::Long nWidth, tools::Long nHeight)
{
gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight );
}
-void GtkSalFrame::window_resize(long nWidth, long nHeight)
+void GtkSalFrame::window_resize(tools::Long nWidth, tools::Long nHeight)
{
m_nWidthRequest = nWidth;
m_nHeightRequest = nHeight;
@@ -741,7 +741,7 @@ void GtkSalFrame::window_resize(long nWidth, long nHeight)
gtk_window_resize(GTK_WINDOW(m_pWindow), nWidth, nHeight);
}
-void GtkSalFrame::resizeWindow( long nWidth, long nHeight )
+void GtkSalFrame::resizeWindow( tools::Long nWidth, tools::Long nHeight )
{
if( isChild( false ) )
{
@@ -1476,7 +1476,7 @@ void GtkSalFrame::setMinMaxSize()
}
}
-void GtkSalFrame::SetMaxClientSize( long nWidth, long nHeight )
+void GtkSalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight )
{
if( ! isChild() )
{
@@ -1484,7 +1484,7 @@ void GtkSalFrame::SetMaxClientSize( long nWidth, long nHeight )
setMinMaxSize();
}
}
-void GtkSalFrame::SetMinClientSize( long nWidth, long nHeight )
+void GtkSalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight )
{
if( ! isChild() )
{
@@ -1525,7 +1525,7 @@ void GtkSalFrame::AllocateFrame()
m_pGraphics->setSurface(m_pSurface, m_aFrameSize);
}
-void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+void GtkSalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags )
{
if( !m_pWindow || isChild( true, false ) )
return;
@@ -1579,7 +1579,7 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
m_bDefaultPos = false;
}
-void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight )
+void GtkSalFrame::GetClientSize( tools::Long& rWidth, tools::Long& rHeight )
{
if( m_pWindow && !(m_nState & GDK_WINDOW_STATE_ICONIFIED) )
{
@@ -1640,8 +1640,8 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
WindowStateMask::Width | WindowStateMask::Height ) )
{
sal_uInt16 nPosSizeFlags = 0;
- long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0);
- long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0);
+ tools::Long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0);
+ tools::Long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0);
if( pState->mnMask & WindowStateMask::X )
nPosSizeFlags |= SAL_FRAME_POSSIZE_X;
else
@@ -1681,7 +1681,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
namespace
{
- void GetPosAndSize(GtkWindow *pWindow, long& rX, long &rY, long &rWidth, long &rHeight)
+ void GetPosAndSize(GtkWindow *pWindow, tools::Long& rX, tools::Long &rY, tools::Long &rWidth, tools::Long &rHeight)
{
gint root_x, root_y;
gtk_window_get_position(GTK_WINDOW(pWindow), &root_x, &root_y);
@@ -1695,7 +1695,7 @@ namespace
tools::Rectangle GetPosAndSize(GtkWindow *pWindow)
{
- long nX, nY, nWidth, nHeight;
+ tools::Long nX, nY, nWidth, nHeight;
GetPosAndSize(pWindow, nX, nY, nWidth, nHeight);
return tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight);
}
@@ -2057,7 +2057,7 @@ void GtkSalFrame::CaptureMouse( bool bCapture )
getDisplay()->CaptureMouse( bCapture ? this : nullptr );
}
-void GtkSalFrame::SetPointerPos( long nX, long nY )
+void GtkSalFrame::SetPointerPos( tools::Long nX, tools::Long nY )
{
GtkSalFrame* pFrame = this;
while( pFrame && pFrame->isChild( false ) )
@@ -2331,7 +2331,7 @@ void GtkSalFrame::BeginSetClipRegion( sal_uInt32 )
m_pRegion = cairo_region_create();
}
-void GtkSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+void GtkSalFrame::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
if( m_pRegion )
{
@@ -2635,8 +2635,8 @@ gboolean GtkSalFrame::signalButton(GtkWidget*, GdkEventButton* pEvent, gpointer
if (!aDel.isDeleted())
{
aEvent.mnTime = pEvent->time;
- aEvent.mnX = static_cast<long>(pEvent->x_root) - pThis->maGeometry.nX;
- aEvent.mnY = static_cast<long>(pEvent->y_root) - pThis->maGeometry.nY;
+ aEvent.mnX = static_cast<tools::Long>(pEvent->x_root) - pThis->maGeometry.nX;
+ aEvent.mnY = static_cast<tools::Long>(pEvent->y_root) - pThis->maGeometry.nY;
aEvent.mnCode = GetMouseModCode( pEvent->state );
if( AllSettings::GetLayoutRTL() )
@@ -2869,8 +2869,8 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
{
SalMouseEvent aEvent;
aEvent.mnTime = pEvent->time;
- aEvent.mnX = static_cast<long>(pEvent->x_root) - pThis->maGeometry.nX;
- aEvent.mnY = static_cast<long>(pEvent->y_root) - pThis->maGeometry.nY;
+ aEvent.mnX = static_cast<tools::Long>(pEvent->x_root) - pThis->maGeometry.nX;
+ aEvent.mnY = static_cast<tools::Long>(pEvent->y_root) - pThis->maGeometry.nY;
aEvent.mnCode = GetMouseModCode( pEvent->state );
aEvent.mnButton = 0;
@@ -2898,8 +2898,8 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpoi
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
SalMouseEvent aEvent;
aEvent.mnTime = pEvent->time;
- aEvent.mnX = static_cast<long>(pEvent->x_root) - pThis->maGeometry.nX;
- aEvent.mnY = static_cast<long>(pEvent->y_root) - pThis->maGeometry.nY;
+ aEvent.mnX = static_cast<tools::Long>(pEvent->x_root) - pThis->maGeometry.nX;
+ aEvent.mnY = static_cast<tools::Long>(pEvent->y_root) - pThis->maGeometry.nY;
aEvent.mnCode = GetMouseModCode( pEvent->state );
aEvent.mnButton = 0;
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 0a4b3a4911cf..3e2a7e7c69bd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -332,7 +332,7 @@ void GtkYieldMutex::ThreadsLeave()
}
std::unique_ptr<SalVirtualDevice> GtkInstance::CreateVirtualDevice( SalGraphics *pG,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat,
const SystemGraphicsData* pGd )
{
diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx
index 1a2cea0d71da..173e1b02f356 100644
--- a/vcl/unx/gtk3/gtk3gtkobject.cxx
+++ b/vcl/unx/gtk3/gtk3gtkobject.cxx
@@ -134,7 +134,7 @@ void GtkSalObjectBase::BeginSetClipRegion( sal_uInt32 )
m_pRegion = cairo_region_create();
}
-void GtkSalObjectBase::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+void GtkSalObjectBase::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
GdkRectangle aRect;
aRect.x = nX;
@@ -151,7 +151,7 @@ void GtkSalObject::EndSetClipRegion()
gdk_window_shape_combine_region( gtk_widget_get_window(m_pSocket), m_pRegion, 0, 0 );
}
-void GtkSalObject::SetPosSize(long nX, long nY, long nWidth, long nHeight)
+void GtkSalObject::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
if (m_pSocket)
{
@@ -375,7 +375,7 @@ void GtkSalObjectWidgetClip::ApplyClipRegion()
gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(m_pScrolledWindow)), m_aClipRect.Top());
}
-void GtkSalObjectWidgetClip::SetPosSize(long nX, long nY, long nWidth, long nHeight)
+void GtkSalObjectWidgetClip::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
m_aRect = tools::Rectangle(Point(nX, nY), Size(nWidth, nHeight));
if (m_pSocket)
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index c9cbf01e9ecb..64096f805065 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1492,8 +1492,8 @@ namespace
{
void draw_vertical_separator(GtkStyleContext *context, cairo_t *cr, const tools::Rectangle& rControlRegion)
{
- long nX = 0;
- long nY = 0;
+ tools::Long nX = 0;
+ tools::Long nY = 0;
gint nSeparatorWidth = 1;
@@ -1514,8 +1514,8 @@ namespace
void draw_horizontal_separator(GtkStyleContext *context, cairo_t *cr, const tools::Rectangle& rControlRegion)
{
- long nX = 0;
- long nY = 0;
+ tools::Long nX = 0;
+ tools::Long nY = 0;
gint nSeparatorHeight = 1;
@@ -1762,10 +1762,10 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
clipRegion(cr);
cairo_translate(cr, rControlRegion.Left(), rControlRegion.Top());
- long nX = 0;
- long nY = 0;
- long nWidth = rControlRegion.GetWidth();
- long nHeight = rControlRegion.GetHeight();
+ tools::Long nX = 0;
+ tools::Long nY = 0;
+ tools::Long nWidth = rControlRegion.GetWidth();
+ tools::Long nHeight = rControlRegion.GetHeight();
StyleContextSave aContextState;
aContextState.save(context);
@@ -1882,7 +1882,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
{
gtk_render_background(mpProgressBarTroughStyle, cr, nX, nY, nWidth, nHeight);
- long nProgressWidth = rValue.getNumericVal();
+ tools::Long nProgressWidth = rValue.getNumericVal();
if (nProgressWidth)
{
GtkBorder padding;
@@ -1935,11 +1935,11 @@ static tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, Gt
{
GtkRequisition aReq;
gtk_widget_get_preferred_size(widget, nullptr, &aReq);
- long nHeight = std::max<long>(rControlRegion.GetHeight(), aReq.height);
+ tools::Long nHeight = std::max<long>(rControlRegion.GetHeight(), aReq.height);
return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight));
}
-static tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion)
+static tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, tools::Long nContentWidth, tools::Long nContentHeight, const tools::Rectangle& rControlRegion)
{
GtkBorder border;
gtk_style_context_get_border(pStyle, gtk_style_context_get_state(pStyle), &border);
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 55846321d5d4..40fd93f0696b 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -211,9 +211,9 @@ public:
std::vector<tools::Rectangle> aRegions;
// Make small cleared area for these guys
- long nBorderSize = std::min(aSize.Height() / 32, aSize.Width() / 32);
- long nBoxWidth = (aSize.Width() - nBorderSize*(nX+1)) / nX;
- long nBoxHeight = (aSize.Height() - nBorderSize*(nY+1)) / nY;
+ tools::Long nBorderSize = std::min(aSize.Height() / 32, aSize.Width() / 32);
+ tools::Long nBoxWidth = (aSize.Width() - nBorderSize*(nX+1)) / nX;
+ tools::Long nBoxHeight = (aSize.Height() - nBorderSize*(nY+1)) / nY;
for (int y = 0; y < nY; y++)
{
for (int x = 0; x < nX; x++)
@@ -323,9 +323,9 @@ public:
rDev.SetLineColor(COL_BLACK);
rDev.DrawRect(r);
- for(long i=0; i<r.GetHeight(); i+=15)
+ for(tools::Long i=0; i<r.GetHeight(); i+=15)
rDev.DrawLine(Point(r.Left(), r.Top()+i), Point(r.Right(), r.Bottom()-i));
- for(long i=0; i<r.GetWidth(); i+=15)
+ for(tools::Long i=0; i<r.GetWidth(); i+=15)
rDev.DrawLine(Point(r.Left()+i, r.Bottom()), Point(r.Right()-i, r.Top()));
// Should draw a white-line across the middle
@@ -558,7 +558,7 @@ public:
Point aPos(r.Left(), r.Top()+20);
- long nMaxTextHeight = 0;
+ tools::Long nMaxTextHeight = 0;
for (size_t i = 0; i < SAL_N_ELEMENTS(aRuns); ++i)
{
// Legend
@@ -591,7 +591,7 @@ public:
OUString aString(aRuns[i].mpString,
strlen(aRuns[i].mpString),
RTL_TEXTENCODING_UTF8);
- long nNewX = drawStringBox(rDev, aPos, aString,
+ tools::Long nNewX = drawStringBox(rDev, aPos, aString,
nMaxTextHeight);
aPos.setX( nNewX );
@@ -613,9 +613,9 @@ public:
rDev.SetClipRegion();
}
// render text, bbox, DX arrays etc.
- static long drawStringBox(OutputDevice &rDev, Point aPos,
+ static tools::Long drawStringBox(OutputDevice &rDev, Point aPos,
const OUString &aText,
- long &nMaxTextHeight)
+ tools::Long &nMaxTextHeight)
{
rDev.Push();
{
@@ -644,7 +644,7 @@ public:
// DX array rendering
std::unique_ptr<long[]> pItems(new long[aText.getLength()+10]);
rDev.GetTextArray(aText, pItems.get());
- for (long j = 0; j < aText.getLength(); ++j)
+ for (tools::Long j = 0; j < aText.getLength(); ++j)
{
Point aTop = aTextRect.TopLeft();
Point aBottom = aTop;
@@ -733,8 +733,8 @@ public:
{
maCheckered.RenderRegion(rDev, r, rCtx);
- long nDx = r.GetWidth()/20;
- long nDy = r.GetHeight()/20;
+ tools::Long nDx = r.GetWidth()/20;
+ tools::Long nDy = r.GetHeight()/20;
tools::Rectangle aShrunk(r);
aShrunk.Move(nDx, nDy);
aShrunk.SetSize(Size(r.GetWidth()-nDx*2,
@@ -873,7 +873,7 @@ public:
Point aRenderPt(r.TopLeft());
- long aSizes[] = { 200, 100, 200, 100, 50, 5, 2 };
+ tools::Long aSizes[] = { 200, 100, 200, 100, 50, 5, 2 };
// and yes - we really do this in the page border rendering code ...
for (size_t i = 0; i < SAL_N_ELEMENTS(aSizes); i++)
@@ -1237,7 +1237,7 @@ public:
void doDrawIcons(OutputDevice &rDev, tools::Rectangle r, bool bExpanded)
{
- long nMaxH = 0;
+ tools::Long nMaxH = 0;
Point p(r.LeftCenter());
size_t nToRender = maIcons.size();
@@ -1330,22 +1330,22 @@ public:
{
BitmapColor aColW = pAccW->GetPixelFromData(pScanlineW,x);
BitmapColor aColB = pAccB->GetPixelFromData(pScanlineB,x);
- long nAR = static_cast<long>(aColW.GetRed() - aColB.GetRed()); // (1-a)
- long nAG = static_cast<long>(aColW.GetGreen() - aColB.GetGreen()); // (1-a)
- long nAB = static_cast<long>(aColW.GetBlue() - aColB.GetBlue()); // (1-a)
+ tools::Long nAR = static_cast<tools::Long>(aColW.GetRed() - aColB.GetRed()); // (1-a)
+ tools::Long nAG = static_cast<tools::Long>(aColW.GetGreen() - aColB.GetGreen()); // (1-a)
+ tools::Long nAB = static_cast<tools::Long>(aColW.GetBlue() - aColB.GetBlue()); // (1-a)
#define CLAMP(a,b,c) (((a)<=(b))?(b):(((a)>=(c))?(c):(a)))
// we get the most precision from the largest delta
- long nInverseAlpha = std::max(nAR, std::max(nAG, nAB)); // (1-a)
+ tools::Long nInverseAlpha = std::max(nAR, std::max(nAG, nAB)); // (1-a)
nInverseAlpha = CLAMP(nInverseAlpha, 0, 255);
- long nAlpha = 255 - nInverseAlpha;
+ tools::Long nAlpha = 255 - nInverseAlpha;
pMaskAcc->SetPixelOnData(pScanlineMask,x,BitmapColor(static_cast<sal_Int8>(CLAMP(nInverseAlpha,0,255))));
// now recover the pixels
- long nR = (aColW.GetRed() + aColB.GetRed() - nInverseAlpha) * 128;
- long nG = (aColW.GetGreen() + aColB.GetGreen() - nInverseAlpha) * 128;
- long nB = (aColW.GetBlue() + aColB.GetBlue() - nInverseAlpha) * 128;
+ tools::Long nR = (aColW.GetRed() + aColB.GetRed() - nInverseAlpha) * 128;
+ tools::Long nG = (aColW.GetGreen() + aColB.GetGreen() - nInverseAlpha) * 128;
+ tools::Long nB = (aColW.GetBlue() + aColB.GetBlue() - nInverseAlpha) * 128;
if (nAlpha == 0)
{ // doesn't matter what's behind transparency
nR = nG = nB = 0;