include/vcl/BitmapBuffer.hxx | 6 include/vcl/BitmapConvolutionMatrixFilter.hxx | 4 include/vcl/BitmapFilter.hxx | 9 include/vcl/BitmapTools.hxx | 2 include/vcl/GraphicAttributes.hxx | 20 - include/vcl/GraphicObject.hxx | 4 include/vcl/ITiledRenderable.hxx | 4 include/vcl/RawBitmap.hxx | 14 include/vcl/accessibletable.hxx | 4 include/vcl/accessibletableprovider.hxx | 10 include/vcl/animate/Animation.hxx | 6 include/vcl/animate/AnimationBitmap.hxx | 4 include/vcl/bitmap.hxx | 2 include/vcl/bitmapaccess.hxx | 92 ++--- include/vcl/bitmapex.hxx | 4 include/vcl/button.hxx | 8 include/vcl/commandevent.hxx | 20 - include/vcl/ctrl.hxx | 8 include/vcl/cursor.hxx | 6 include/vcl/dockwin.hxx | 28 - include/vcl/embeddedfontshelper.hxx | 3 include/vcl/fixed.hxx | 6 include/vcl/font.hxx | 9 include/vcl/gdimtf.hxx | 6 include/vcl/graph.hxx | 4 include/vcl/hatch.hxx | 9 include/vcl/headbar.hxx | 34 +- include/vcl/i18nhelp.hxx | 3 include/vcl/imap.hxx | 2 include/vcl/layout.hxx | 76 ++-- include/vcl/menu.hxx | 15 include/vcl/metaact.hxx | 96 +++--- include/vcl/metric.hxx | 42 +- include/vcl/notebookbar.hxx | 2 include/vcl/opengl/OpenGLHelper.hxx | 6 include/vcl/outdev.hxx | 156 ++++----- include/vcl/outdevmap.hxx | 20 - include/vcl/pdfwriter.hxx | 6 include/vcl/print.hxx | 14 include/vcl/region.hxx | 2 include/vcl/salgtype.hxx | 24 - include/vcl/salnativewidgets.hxx | 26 - include/vcl/scrbar.hxx | 64 ++-- include/vcl/settings.hxx | 46 +- include/vcl/split.hxx | 14 include/vcl/splitwin.hxx | 44 +- include/vcl/status.hxx | 20 - include/vcl/svapp.hxx | 4 include/vcl/sysdata.hxx | 5 include/vcl/syswin.hxx | 2 include/vcl/tabctrl.hxx | 18 - include/vcl/texteng.hxx | 40 +- include/vcl/textrectinfo.hxx | 4 include/vcl/textview.hxx | 2 include/vcl/toolbox.hxx | 42 +- include/vcl/toolkit/button.hxx | 4 include/vcl/toolkit/combobox.hxx | 8 include/vcl/toolkit/controllayout.hxx | 10 include/vcl/toolkit/dialog.hxx | 4 include/vcl/toolkit/edit.hxx | 10 include/vcl/toolkit/fixedhyper.hxx | 2 include/vcl/toolkit/ivctrl.hxx | 6 include/vcl/toolkit/lstbox.hxx | 6 include/vcl/toolkit/prgsbar.hxx | 4 include/vcl/toolkit/spin.hxx | 24 - include/vcl/toolkit/svlbitm.hxx | 8 include/vcl/toolkit/svtabbx.hxx | 16 - include/vcl/toolkit/treelistbox.hxx | 30 - include/vcl/toolkit/vclmedit.hxx | 2 include/vcl/vcllayout.hxx | 2 include/vcl/virdev.hxx | 4 include/vcl/window.hxx | 32 +- vcl/backendtest/VisualBackendTest.cxx | 20 - vcl/backendtest/outputdevice/common.cxx | 84 ++--- vcl/backendtest/outputdevice/pixel.cxx | 12 vcl/headless/CustomWidgetDraw.cxx | 4 vcl/headless/svpbmp.cxx | 2 vcl/headless/svpdummies.cxx | 4 vcl/headless/svpframe.cxx | 20 - vcl/headless/svpgdi.cxx | 56 +-- vcl/headless/svpinst.cxx | 2 vcl/headless/svptext.cxx | 4 vcl/headless/svpvd.cxx | 10 vcl/inc/FileDefinitionWidgetDraw.hxx | 4 vcl/inc/PhysicalFontFace.hxx | 5 vcl/inc/WidgetThemeLibrary.hxx | 71 ++-- vcl/inc/bitmap/impoctree.hxx | 24 - vcl/inc/bitmapwriteaccess.hxx | 8 vcl/inc/bmpfast.hxx | 5 vcl/inc/brdwin.hxx | 56 +-- vcl/inc/calendar.hxx | 22 - vcl/inc/fontinstance.hxx | 2 vcl/inc/headless/svpdummies.hxx | 4 vcl/inc/headless/svpframe.hxx | 20 - vcl/inc/headless/svpgdi.hxx | 36 +- vcl/inc/headless/svpinst.hxx | 2 vcl/inc/headless/svpvd.hxx | 10 vcl/inc/hyperlabel.hxx | 2 vcl/inc/iconview.hxx | 4 vcl/inc/impanmvw.hxx | 6 vcl/inc/impfontmetricdata.hxx | 135 ++++---- vcl/inc/impgraph.hxx | 4 vcl/inc/jobset.h | 12 vcl/inc/listbox.hxx | 50 +-- vcl/inc/opengl/RenderList.hxx | 6 vcl/inc/opengl/gdiimpl.hxx | 34 +- vcl/inc/opengl/program.hxx | 2 vcl/inc/opengl/salbmp.hxx | 2 vcl/inc/opengl/x11/salvd.hxx | 8 vcl/inc/qt5/Qt5Graphics.hxx | 38 +- vcl/inc/qt5/Qt5VirtualDevice.hxx | 9 vcl/inc/regband.hxx | 32 +- vcl/inc/regionband.hxx | 22 - vcl/inc/salframe.hxx | 16 - vcl/inc/salgdi.hxx | 78 ++-- vcl/inc/salgdiimpl.hxx | 32 +- vcl/inc/salgeom.hxx | 7 vcl/inc/salinst.hxx | 2 vcl/inc/sallayout.hxx | 6 vcl/inc/salobj.hxx | 4 vcl/inc/salprn.hxx | 2 vcl/inc/salvd.hxx | 4 vcl/inc/salvtables.hxx | 2 vcl/inc/salwtype.hxx | 65 ++-- vcl/inc/scanlinewriter.hxx | 6 vcl/inc/scrwnd.hxx | 6 vcl/inc/skia/gdiimpl.hxx | 42 +- vcl/inc/skia/x11/salvd.hxx | 8 vcl/inc/slider.hxx | 58 +-- vcl/inc/svdata.hxx | 4 vcl/inc/svimpbox.hxx | 24 - vcl/inc/test/outputdevice.hxx | 2 vcl/inc/textlayout.hxx | 12 vcl/inc/textlineinfo.hxx | 6 vcl/inc/textrender.hxx | 4 vcl/inc/toolbox.h | 10 vcl/inc/unx/freetypetextrender.hxx | 4 vcl/inc/unx/genprn.h | 2 vcl/inc/unx/genpspgraphics.h | 40 +- vcl/inc/unx/glyphcache.hxx | 4 vcl/inc/unx/gtk/gtkframe.hxx | 24 - vcl/inc/unx/gtk/gtkinst.hxx | 2 vcl/inc/unx/gtk/gtkobject.hxx | 6 vcl/inc/unx/salbmp.h | 60 +-- vcl/inc/unx/saldisp.hxx | 2 vcl/inc/unx/salframe.h | 12 vcl/inc/unx/salgdi.h | 38 +- vcl/inc/unx/salinst.h | 4 vcl/inc/unx/salobj.h | 6 vcl/inc/unx/salunx.h | 4 vcl/inc/unx/salvd.h | 8 vcl/inc/unx/wmadaptor.hxx | 2 vcl/inc/window.h | 34 +- vcl/inc/wizdlg.hxx | 6 vcl/opengl/RenderList.cxx | 6 vcl/opengl/gdiimpl.cxx | 70 ++-- vcl/opengl/program.cxx | 2 vcl/opengl/salbmp.cxx | 2 vcl/opengl/texture.cxx | 8 vcl/opengl/x11/salvd.cxx | 4 vcl/qa/cppunit/BitmapFilterTest.cxx | 32 +- vcl/qa/cppunit/BitmapScaleTest.cxx | 40 +- vcl/qa/cppunit/BitmapTest.cxx | 32 +- vcl/qa/cppunit/GraphicTest.cxx | 4 vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx | 12 vcl/qa/cppunit/complextext.cxx | 2 vcl/qa/cppunit/jpeg/JpegReaderTest.cxx | 18 - vcl/qa/cppunit/pdfexport/pdfexport.cxx | 2 vcl/qa/cppunit/svm/svmtest.cxx | 2 vcl/qt5/Qt5Bitmap.cxx | 2 vcl/qt5/Qt5FilePicker.cxx | 4 vcl/qt5/Qt5Frame.cxx | 14 vcl/qt5/Qt5Graphics_Controls.cxx | 3 vcl/qt5/Qt5Graphics_GDI.cxx | 33 +- vcl/qt5/Qt5Graphics_Text.cxx | 4 vcl/qt5/Qt5Instance.cxx | 7 vcl/qt5/Qt5Object.cxx | 5 vcl/qt5/Qt5VirtualDevice.cxx | 9 vcl/skia/gdiimpl.cxx | 49 +-- vcl/skia/salbmp.cxx | 22 - vcl/skia/x11/salvd.cxx | 6 vcl/source/animate/Animation.cxx | 4 vcl/source/app/help.cxx | 4 vcl/source/app/i18nhelp.cxx | 2 vcl/source/app/salvtables.cxx | 10 vcl/source/app/settings.cxx | 70 ++-- vcl/source/app/svapp.cxx | 16 - vcl/source/app/svmain.cxx | 6 vcl/source/bitmap/BitmapAlphaClampFilter.cxx | 4 vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx | 79 ++--- vcl/source/bitmap/BitmapColorQuantizationFilter.cxx | 32 +- vcl/source/bitmap/BitmapColorizeFilter.cxx | 8 vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx | 12 vcl/source/bitmap/BitmapDisabledImageFilter.cxx | 4 vcl/source/bitmap/BitmapDuoToneFilter.cxx | 8 vcl/source/bitmap/BitmapEmbossGreyFilter.cxx | 22 - vcl/source/bitmap/BitmapFastScaleFilter.cxx | 22 - vcl/source/bitmap/BitmapFilterStackBlur.cxx | 191 ++++++------ vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx | 4 vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx | 68 ++-- vcl/source/bitmap/BitmapLightenFilter.cxx | 4 vcl/source/bitmap/BitmapMedianFilter.cxx | 14 vcl/source/bitmap/BitmapMonochromeFilter.cxx | 12 vcl/source/bitmap/BitmapMosaicFilter.cxx | 6 vcl/source/bitmap/BitmapPopArtFilter.cxx | 8 vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx | 74 ++-- vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 192 ++++++------ vcl/source/bitmap/BitmapSeparableUnsharpenFilter.cxx | 8 vcl/source/bitmap/BitmapSepiaFilter.cxx | 14 vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx | 12 vcl/source/bitmap/BitmapSobelGreyFilter.cxx | 28 - vcl/source/bitmap/BitmapSolarizeFilter.cxx | 8 vcl/source/bitmap/BitmapSymmetryCheck.cxx | 16 - vcl/source/bitmap/BitmapTools.cxx | 66 ++-- vcl/source/bitmap/Octree.cxx | 38 +- vcl/source/bitmap/bitmap.cxx | 136 ++++---- vcl/source/bitmap/bitmappaint.cxx | 221 +++++++------- vcl/source/bitmap/salbmp.cxx | 4 vcl/source/control/button.cxx | 50 +-- vcl/source/control/calendar.cxx | 90 ++--- vcl/source/control/combobox.cxx | 36 +- vcl/source/control/ctrl.cxx | 28 - vcl/source/control/edit.cxx | 80 ++--- vcl/source/control/field.cxx | 10 vcl/source/control/fixed.cxx | 18 - vcl/source/control/hyperlabel.cxx | 2 vcl/source/control/imgctrl.cxx | 2 vcl/source/control/imivctl.hxx | 36 +- vcl/source/control/imivctl1.cxx | 86 ++--- vcl/source/control/imivctl2.cxx | 56 +-- vcl/source/control/imp_listbox.cxx | 108 +++--- vcl/source/control/listbox.cxx | 30 - vcl/source/control/longcurr.cxx | 8 vcl/source/control/notebookbar.cxx | 2 vcl/source/control/prgsbar.cxx | 2 vcl/source/control/roadmap.cxx | 12 vcl/source/control/scrbar.cxx | 56 +-- vcl/source/control/slider.cxx | 52 +-- vcl/source/control/spinbtn.cxx | 10 vcl/source/control/spinfld.cxx | 12 vcl/source/control/tabctrl.cxx | 102 +++--- vcl/source/control/throbber.cxx | 2 vcl/source/control/thumbpos.hxx | 4 vcl/source/control/wizardmachine.cxx | 42 +- vcl/source/control/wizimpldata.hxx | 2 vcl/source/edit/textdat2.hxx | 4 vcl/source/edit/texteng.cxx | 100 +++--- vcl/source/edit/textview.cxx | 38 +- vcl/source/edit/vclmedit.cxx | 40 +- vcl/source/filter/graphicfilter.cxx | 4 vcl/source/filter/igif/gifread.cxx | 18 - vcl/source/filter/ipdf/pdfread.cxx | 4 vcl/source/filter/ixbm/xbmread.cxx | 14 vcl/source/filter/ixpm/xpmread.cxx | 2 vcl/source/filter/jpeg/JpegReader.cxx | 20 - vcl/source/filter/jpeg/JpegReader.hxx | 6 vcl/source/filter/jpeg/JpegWriter.cxx | 14 vcl/source/filter/jpeg/JpegWriter.hxx | 2 vcl/source/filter/jpeg/jpeg.h | 8 vcl/source/filter/jpeg/jpegc.cxx | 20 - vcl/source/filter/png/pngread.cxx | 46 +- vcl/source/filter/png/pngwrite.cxx | 10 vcl/source/filter/wmf/emfwr.cxx | 8 vcl/source/filter/wmf/emfwr.hxx | 4 vcl/source/filter/wmf/wmfwr.cxx | 16 - vcl/source/filter/wmf/wmfwr.hxx | 8 vcl/source/font/PhysicalFontCollection.cxx | 4 vcl/source/font/font.cxx | 8 vcl/source/font/fontmetric.cxx | 36 +- vcl/source/fontsubset/cff.cxx | 2 vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 61 ++- vcl/source/gdi/alpha.cxx | 26 - vcl/source/gdi/bitmap3.cxx | 142 ++++---- vcl/source/gdi/bitmapex.cxx | 92 ++--- vcl/source/gdi/bmpacc.cxx | 10 vcl/source/gdi/bmpacc2.cxx | 68 ++-- vcl/source/gdi/bmpacc3.cxx | 50 +-- vcl/source/gdi/bmpfast.cxx | 14 vcl/source/gdi/dibtools.cxx | 54 +-- vcl/source/gdi/embeddedfontshelper.cxx | 4 vcl/source/gdi/gdimetafiletools.cxx | 4 vcl/source/gdi/gdimtf.cxx | 20 - vcl/source/gdi/gradient.cxx | 30 - vcl/source/gdi/graph.cxx | 16 - vcl/source/gdi/hatch.cxx | 4 vcl/source/gdi/impanmvw.cxx | 2 vcl/source/gdi/impgraph.cxx | 4 vcl/source/gdi/impvect.cxx | 98 +++--- vcl/source/gdi/jobset.cxx | 8 vcl/source/gdi/metaact.cxx | 82 ++--- vcl/source/gdi/pdfwriter.cxx | 6 vcl/source/gdi/pdfwriter_impl.cxx | 88 ++--- vcl/source/gdi/pdfwriter_impl.hxx | 16 - vcl/source/gdi/pdfwriter_impl2.cxx | 38 +- vcl/source/gdi/print.cxx | 18 - vcl/source/gdi/print2.cxx | 22 - vcl/source/gdi/print3.cxx | 22 - vcl/source/gdi/regband.cxx | 32 +- vcl/source/gdi/region.cxx | 46 +- vcl/source/gdi/regionband.cxx | 96 +++--- vcl/source/gdi/salgdilayout.cxx | 58 +-- vcl/source/gdi/sallayout.cxx | 28 - vcl/source/gdi/salmisc.cxx | 98 +++--- vcl/source/gdi/textlayout.cxx | 26 - vcl/source/gdi/virdev.cxx | 10 vcl/source/graphic/GraphicObject.cxx | 22 - vcl/source/helper/canvasbitmap.cxx | 28 - vcl/source/helper/canvastools.cxx | 4 vcl/source/opengl/OpenGLHelper.cxx | 10 vcl/source/outdev/bitmap.cxx | 134 ++++---- vcl/source/outdev/clipping.cxx | 2 vcl/source/outdev/font.cxx | 40 +- vcl/source/outdev/gradient.cxx | 194 ++++++------ vcl/source/outdev/hatch.cxx | 36 +- vcl/source/outdev/map.cxx | 102 +++--- vcl/source/outdev/outdev.cxx | 18 - vcl/source/outdev/pixel.cxx | 4 vcl/source/outdev/polyline.cxx | 6 vcl/source/outdev/rect.cxx | 48 +-- vcl/source/outdev/text.cxx | 178 +++++------ vcl/source/outdev/textline.cxx | 172 +++++----- vcl/source/outdev/transparent.cxx | 16 - vcl/source/outdev/wallpaper.cxx | 40 +- vcl/source/toolkit/group.cxx | 4 vcl/source/toolkit/morebtn.cxx | 2 vcl/source/treelist/headbar.cxx | 56 +-- vcl/source/treelist/iconview.cxx | 4 vcl/source/treelist/iconviewimpl.cxx | 52 +-- vcl/source/treelist/iconviewimpl.hxx | 4 vcl/source/treelist/imap.cxx | 4 vcl/source/treelist/imap2.cxx | 8 vcl/source/treelist/svimpbox.cxx | 136 ++++---- vcl/source/treelist/svlbitm.cxx | 4 vcl/source/treelist/svtabbx.cxx | 18 - vcl/source/treelist/treelist.cxx | 8 vcl/source/treelist/treelistbox.cxx | 90 ++--- vcl/source/uitest/uiobject.cxx | 12 vcl/source/window/brdwin.cxx | 66 ++-- vcl/source/window/commandevent.cxx | 4 vcl/source/window/cursor.cxx | 6 vcl/source/window/debugevent.cxx | 2 vcl/source/window/decoview.cxx | 64 ++-- vcl/source/window/dialog.cxx | 10 vcl/source/window/dockmgr.cxx | 8 vcl/source/window/dockwin.cxx | 4 vcl/source/window/layout.cxx | 142 ++++---- vcl/source/window/menu.cxx | 88 ++--- vcl/source/window/menubarwindow.cxx | 24 - vcl/source/window/menubarwindow.hxx | 6 vcl/source/window/menufloatingwindow.cxx | 58 +-- vcl/source/window/menufloatingwindow.hxx | 4 vcl/source/window/mouse.cxx | 4 vcl/source/window/paint.cxx | 20 - vcl/source/window/printdlg.cxx | 22 - vcl/source/window/scrwnd.cxx | 10 vcl/source/window/split.cxx | 22 - vcl/source/window/splitwin.cxx | 212 ++++++------- vcl/source/window/status.cxx | 80 ++--- vcl/source/window/syswin.cxx | 16 - vcl/source/window/tabdlg.cxx | 18 - vcl/source/window/toolbox.cxx | 174 +++++------ vcl/source/window/toolbox2.cxx | 18 - vcl/source/window/window.cxx | 56 +-- vcl/source/window/window2.cxx | 26 - vcl/source/window/winproc.cxx | 28 - vcl/unx/generic/app/saldisp.cxx | 18 - vcl/unx/generic/app/wmadaptor.cxx | 18 - vcl/unx/generic/dtrans/X11_selection.cxx | 6 vcl/unx/generic/gdi/cairo_xlib_cairo.hxx | 6 vcl/unx/generic/gdi/font.cxx | 4 vcl/unx/generic/gdi/freetypetextrender.cxx | 4 vcl/unx/generic/gdi/gdiimpl.cxx | 46 +- vcl/unx/generic/gdi/gdiimpl.hxx | 34 +- vcl/unx/generic/gdi/salbmp.cxx | 62 +-- vcl/unx/generic/gdi/salgdi.cxx | 14 vcl/unx/generic/gdi/salgdi2.cxx | 22 - vcl/unx/generic/gdi/salvd.cxx | 12 vcl/unx/generic/gdi/x11cairotextrender.cxx | 2 vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 22 - vcl/unx/generic/print/bitmap_gfx.cxx | 22 - vcl/unx/generic/print/genprnpsp.cxx | 6 vcl/unx/generic/print/genpspgraphics.cxx | 34 +- vcl/unx/generic/print/glyphset.cxx | 2 vcl/unx/generic/printer/ppdparser.cxx | 2 vcl/unx/generic/window/salframe.cxx | 46 +- vcl/unx/generic/window/salobj.cxx | 10 vcl/unx/gtk3/gtk3gtkframe.cxx | 40 +- vcl/unx/gtk3/gtk3gtkinst.cxx | 2 vcl/unx/gtk3/gtk3gtkobject.cxx | 6 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 22 - vcl/workben/vcldemo.cxx | 44 +- 391 files changed, 5322 insertions(+), 5224 deletions(-)
New commits: commit 3aef606f2758172a27718a06fea0ff9080e4d80f Author: Noel <noelgran...@gmail.com> AuthorDate: Mon Oct 19 15:12:38 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 19 21:34:46 2020 +0200 use tools::Long in vcl Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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; ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits