summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/clang-format/excludelist118
-rw-r--r--vcl/backendtest/outputdevice/gradient.cxx36
-rw-r--r--vcl/backendtest/outputdevice/pixel.cxx7
-rw-r--r--vcl/backendtest/outputdevice/polypolygon.cxx16
-rw-r--r--vcl/backendtest/outputdevice/rectangle.cxx30
-rw-r--r--vcl/headless/svpcairotextrender.cxx10
-rw-r--r--vcl/inc/BitmapScaleConvolutionFilter.hxx6
-rw-r--r--vcl/inc/BitmapScaleSuperFilter.hxx1
-rw-r--r--vcl/inc/BitmapSymmetryCheck.hxx2
-rw-r--r--vcl/inc/ControlCacheKey.hxx13
-rw-r--r--vcl/inc/IconThemeScanner.hxx26
-rw-r--r--vcl/inc/android/androidinst.hxx14
-rw-r--r--vcl/inc/headless/svpprn.hxx4
-rw-r--r--vcl/inc/iconview.hxx5
-rw-r--r--vcl/inc/ios/iosinst.hxx13
-rw-r--r--vcl/inc/langboost.hxx2
-rw-r--r--vcl/inc/opengl/BufferObject.hxx8
-rw-r--r--vcl/inc/opengl/TextureState.hxx7
-rw-r--r--vcl/inc/opengl/x11/gdiimpl.hxx6
-rw-r--r--vcl/inc/opengl/zone.hxx12
-rw-r--r--vcl/inc/osx/a11ylistener.hxx11
-rw-r--r--vcl/inc/osx/keyboardfocuslistener.hxx5
-rw-r--r--vcl/inc/osx/salnsmenu.h20
-rw-r--r--vcl/inc/osx/salnstimer.h2
-rw-r--r--vcl/inc/quartz/ctfonts.hxx2
-rw-r--r--vcl/inc/regionband.hxx11
-rw-r--r--vcl/inc/salsys.hxx10
-rw-r--r--vcl/inc/scanlinewriter.hxx15
-rw-r--r--vcl/inc/scrptrun.h47
-rw-r--r--vcl/inc/unx/desktops.hxx3
-rw-r--r--vcl/inc/unx/i18n_keysym.hxx2
-rw-r--r--vcl/inc/unx/salunx.h6
-rw-r--r--vcl/inc/unx/screensaverinhibitor.hxx18
-rw-r--r--vcl/inc/unx/x11/x11gdiimpl.h4
-rw-r--r--vcl/inc/unx/x11_cursors/wshide_curs.h6
-rw-r--r--vcl/inc/unx/x11_cursors/wshide_mask.h6
-rw-r--r--vcl/inc/unx/x11_cursors/wsshow_curs.h6
-rw-r--r--vcl/inc/unx/x11_cursors/wsshow_mask.h6
-rw-r--r--vcl/inc/vcleventlisteners.hxx9
-rw-r--r--vcl/opengl/DeviceInfo.cxx4
-rw-r--r--vcl/osx/DragActionConversion.cxx40
-rw-r--r--vcl/osx/PictToBmpFlt.hxx9
-rw-r--r--vcl/osx/a11yactionwrapper.h4
-rw-r--r--vcl/osx/a11ycomponentwrapper.h12
-rw-r--r--vcl/osx/a11yfocuslistener.hxx11
-rw-r--r--vcl/osx/a11yselectionwrapper.h8
-rw-r--r--vcl/osx/a11ytablewrapper.h8
-rw-r--r--vcl/osx/a11ytextwrapper.h50
-rw-r--r--vcl/osx/a11yutil.h7
-rw-r--r--vcl/osx/a11yvaluewrapper.h12
-rw-r--r--vcl/osx/a11ywrapperbutton.h6
-rw-r--r--vcl/osx/a11ywrappercheckbox.h6
-rw-r--r--vcl/osx/a11ywrappercombobox.h21
-rw-r--r--vcl/osx/a11ywrappergroup.h4
-rw-r--r--vcl/osx/a11ywrapperlist.h2
-rw-r--r--vcl/osx/a11ywrapperradiobutton.h6
-rw-r--r--vcl/osx/a11ywrapperradiogroup.h2
-rw-r--r--vcl/osx/a11ywrapperrow.h4
-rw-r--r--vcl/osx/a11ywrapperscrollarea.h6
-rw-r--r--vcl/osx/a11ywrapperscrollbar.h2
-rw-r--r--vcl/osx/a11ywrappersplitter.h2
-rw-r--r--vcl/osx/a11ywrapperstatictext.h4
-rw-r--r--vcl/osx/a11ywrappertabgroup.h2
-rw-r--r--vcl/osx/a11ywrappertextarea.h2
-rw-r--r--vcl/osx/a11ywrappertoolbar.h2
-rw-r--r--vcl/qa/cppunit/BitmapProcessorTest.cxx1
-rw-r--r--vcl/qa/cppunit/fontcharmap.cxx11
-rw-r--r--vcl/qa/cppunit/jpeg/JpegReaderTest.cxx16
-rw-r--r--vcl/qa/cppunit/mnemonic.cxx6
-rw-r--r--vcl/qa/cppunit/outdev.cxx33
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx385
-rw-r--r--vcl/qa/unit/vcl-dialogs-test.cxx9
-rw-r--r--vcl/source/app/ITiledRenderable.cxx30
-rw-r--r--vcl/source/app/salvtables.cxx675
-rw-r--r--vcl/source/app/sound.cxx2
-rw-r--r--vcl/source/bitmap/bitmapfilter.cxx4
-rw-r--r--vcl/source/control/thumbpos.hxx5
-rw-r--r--vcl/source/filter/graphicfilter_internal.hxx2
-rw-r--r--vcl/source/filter/igif/gifread.hxx2
-rw-r--r--vcl/source/filter/ixbm/xbmread.hxx2
-rw-r--r--vcl/source/filter/ixpm/xpmread.hxx2
-rw-r--r--vcl/source/filter/jpeg/JpegTransform.hxx7
-rw-r--r--vcl/source/filter/jpeg/jinclude.h16
-rw-r--r--vcl/source/filter/png/pngwrite.cxx129
-rw-r--r--vcl/source/filter/wmf/wmfexternal.cxx14
-rw-r--r--vcl/source/fontsubset/xlat.hxx10
-rw-r--r--vcl/source/gdi/bmpacc3.cxx37
-rw-r--r--vcl/source/gdi/extoutdevdata.cxx6
-rw-r--r--vcl/source/gdi/salgdiimpl.cxx4
-rw-r--r--vcl/source/helper/lazydelete.cxx16
-rw-r--r--vcl/source/helper/threadex.cxx18
-rw-r--r--vcl/source/salmain/salmain.cxx3
-rw-r--r--vcl/source/treelist/iconview.cxx63
-rw-r--r--vcl/source/treelist/iconviewimpl.hxx26
-rw-r--r--vcl/source/treelist/imap3.cxx29
-rw-r--r--vcl/source/uitest/logger.cxx56
-rw-r--r--vcl/source/window/abstdlg.cxx20
-rw-r--r--vcl/source/window/debug.cxx10
-rw-r--r--vcl/source/window/introwin.cxx13
-rw-r--r--vcl/source/window/window3.cxx9
-rw-r--r--vcl/unx/generic/gdi/nativewindowhandleprovider.cxx5
-rw-r--r--vcl/unx/generic/print/prtsetup.hxx21
-rw-r--r--vcl/unx/gtk3/a11y/atkregistry.hxx8
-rw-r--r--vcl/unx/gtk3/a11y/atktextattributes.hxx34
-rw-r--r--vcl/unx/gtk3/a11y/gtk3atkbridge.cxx4
-rw-r--r--vcl/unx/gtk3/fpicker/eventnotification.hxx5
-rw-r--r--vcl/win/dtrans/DtObjFactory.cxx5
-rw-r--r--vcl/win/dtrans/FmtFilter.hxx20
-rw-r--r--vcl/win/dtrans/ImplHelper.hxx22
-rw-r--r--vcl/win/dtrans/MimeAttrib.hxx8
-rw-r--r--vcl/win/dtrans/globals.hxx13
-rw-r--r--vcl/win/dtrans/sourcecontext.hxx24
-rw-r--r--vcl/win/dtrans/target.hxx95
-rw-r--r--vcl/win/dtrans/targetdragcontext.cxx18
-rw-r--r--vcl/win/dtrans/targetdragcontext.hxx10
-rw-r--r--vcl/win/dtrans/targetdropcontext.cxx21
-rw-r--r--vcl/win/dtrans/targetdropcontext.hxx12
-rw-r--r--vcl/win/gdi/winlayout.cxx133
-rw-r--r--vcl/workben/localestub/localestub.cxx10
119 files changed, 1361 insertions, 1539 deletions
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index fb5d403349f9..bc1764ba2cde 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14853,17 +14853,12 @@ vcl/android/androidinst.cxx
vcl/backendtest/VisualBackendTest.cxx
vcl/backendtest/outputdevice/bitmap.cxx
vcl/backendtest/outputdevice/common.cxx
-vcl/backendtest/outputdevice/gradient.cxx
vcl/backendtest/outputdevice/line.cxx
vcl/backendtest/outputdevice/outputdevice.cxx
-vcl/backendtest/outputdevice/pixel.cxx
vcl/backendtest/outputdevice/polygon.cxx
vcl/backendtest/outputdevice/polyline.cxx
-vcl/backendtest/outputdevice/polypolygon.cxx
-vcl/backendtest/outputdevice/rectangle.cxx
vcl/headless/headlessinst.cxx
vcl/headless/svpbmp.cxx
-vcl/headless/svpcairotextrender.cxx
vcl/headless/svpdata.cxx
vcl/headless/svpdummies.cxx
vcl/headless/svpframe.cxx
@@ -14872,11 +14867,6 @@ vcl/headless/svpinst.cxx
vcl/headless/svpprn.cxx
vcl/headless/svptext.cxx
vcl/headless/svpvd.cxx
-vcl/inc/BitmapScaleConvolutionFilter.hxx
-vcl/inc/BitmapScaleSuperFilter.hxx
-vcl/inc/BitmapSymmetryCheck.hxx
-vcl/inc/ControlCacheKey.hxx
-vcl/inc/IconThemeScanner.hxx
vcl/inc/IconThemeSelector.hxx
vcl/inc/PhysicalFontCollection.hxx
vcl/inc/PhysicalFontFace.hxx
@@ -14885,7 +14875,6 @@ vcl/inc/ResampleKernel.hxx
vcl/inc/WidgetThemeLibraryTypes.hxx
vcl/inc/accel.h
vcl/inc/accmgr.hxx
-vcl/inc/android/androidinst.hxx
vcl/inc/bmpfast.hxx
vcl/inc/brdwin.hxx
vcl/inc/calendar.hxx
@@ -14910,11 +14899,9 @@ vcl/inc/headless/svpdummies.hxx
vcl/inc/headless/svpframe.hxx
vcl/inc/headless/svpgdi.hxx
vcl/inc/headless/svpinst.hxx
-vcl/inc/headless/svpprn.hxx
vcl/inc/headless/svpvd.hxx
vcl/inc/helpwin.hxx
vcl/inc/hyperlabel.hxx
-vcl/inc/iconview.hxx
vcl/inc/image.h
vcl/inc/imagerepository.hxx
vcl/inc/impanmvw.hxx
@@ -14925,18 +14912,14 @@ vcl/inc/impfontcharmap.hxx
vcl/inc/impfontmetricdata.hxx
vcl/inc/impgraph.hxx
vcl/inc/implimagetree.hxx
-vcl/inc/ios/iosinst.hxx
vcl/inc/jobdata.hxx
vcl/inc/jobset.h
-vcl/inc/langboost.hxx
vcl/inc/listbox.hxx
-vcl/inc/opengl/BufferObject.hxx
vcl/inc/opengl/FixedTextureAtlas.hxx
vcl/inc/opengl/LineRenderUtils.hxx
vcl/inc/opengl/PackedTextureAtlas.hxx
vcl/inc/opengl/RenderList.hxx
vcl/inc/opengl/RenderState.hxx
-vcl/inc/opengl/TextureState.hxx
vcl/inc/opengl/VertexUtils.hxx
vcl/inc/opengl/framebuffer.hxx
vcl/inc/opengl/gdiimpl.hxx
@@ -14946,14 +14929,10 @@ vcl/inc/opengl/texture.hxx
vcl/inc/opengl/win/WinDeviceInfo.hxx
vcl/inc/opengl/win/gdiimpl.hxx
vcl/inc/opengl/x11/X11DeviceInfo.hxx
-vcl/inc/opengl/x11/gdiimpl.hxx
vcl/inc/opengl/x11/salvd.hxx
-vcl/inc/opengl/zone.hxx
vcl/inc/osx/a11yfactory.h
vcl/inc/osx/a11yfocustracker.hxx
-vcl/inc/osx/a11ylistener.hxx
vcl/inc/osx/a11ywrapper.h
-vcl/inc/osx/keyboardfocuslistener.hxx
vcl/inc/osx/printview.h
vcl/inc/osx/runinmain.hxx
vcl/inc/osx/saldata.hxx
@@ -14962,8 +14941,6 @@ vcl/inc/osx/salframeview.h
vcl/inc/osx/salinst.h
vcl/inc/osx/salmenu.h
vcl/inc/osx/salnativewidgets.h
-vcl/inc/osx/salnsmenu.h
-vcl/inc/osx/salnstimer.h
vcl/inc/osx/salobj.h
vcl/inc/osx/salprn.h
vcl/inc/osx/salsys.h
@@ -14976,14 +14953,12 @@ vcl/inc/print.h
vcl/inc/printdlg.hxx
vcl/inc/printerinfomanager.hxx
vcl/inc/quartz/common.h
-vcl/inc/quartz/ctfonts.hxx
vcl/inc/quartz/salbmp.h
vcl/inc/quartz/salgdi.h
vcl/inc/quartz/salgdicommon.hxx
vcl/inc/quartz/salvd.h
vcl/inc/quartz/utils.h
vcl/inc/regband.hxx
-vcl/inc/regionband.hxx
vcl/inc/salbmp.hxx
vcl/inc/saldatabasic.hxx
vcl/inc/salframe.hxx
@@ -14997,14 +14972,11 @@ vcl/inc/salobj.hxx
vcl/inc/salprn.hxx
vcl/inc/salptype.hxx
vcl/inc/salsession.hxx
-vcl/inc/salsys.hxx
vcl/inc/saltimer.hxx
vcl/inc/salusereventlist.hxx
vcl/inc/salvd.hxx
vcl/inc/salwtype.hxx
-vcl/inc/scanlinewriter.hxx
vcl/inc/schedulerimpl.hxx
-vcl/inc/scrptrun.h
vcl/inc/scrwnd.hxx
vcl/inc/sft.hxx
vcl/inc/slider.hxx
@@ -15021,7 +14993,6 @@ vcl/inc/toolbox.h
vcl/inc/unx/cairotextrender.hxx
vcl/inc/unx/cpdmgr.hxx
vcl/inc/unx/cupsmgr.hxx
-vcl/inc/unx/desktops.hxx
vcl/inc/unx/fc_fontoptions.hxx
vcl/inc/unx/fontmanager.hxx
vcl/inc/unx/freetype_glyphcache.hxx
@@ -15048,7 +15019,6 @@ vcl/inc/unx/helper.hxx
vcl/inc/unx/i18n_cb.hxx
vcl/inc/unx/i18n_ic.hxx
vcl/inc/unx/i18n_im.hxx
-vcl/inc/unx/i18n_keysym.hxx
vcl/inc/unx/i18n_xkb.hxx
vcl/inc/unx/printergfx.hxx
vcl/inc/unx/printerjob.hxx
@@ -15061,13 +15031,10 @@ vcl/inc/unx/salinst.h
vcl/inc/unx/salobj.h
vcl/inc/unx/saltimer.h
vcl/inc/unx/saltype.h
-vcl/inc/unx/salunx.h
vcl/inc/unx/salunxtime.h
vcl/inc/unx/salvd.h
-vcl/inc/unx/screensaverinhibitor.hxx
vcl/inc/unx/sm.hxx
vcl/inc/unx/wmadaptor.hxx
-vcl/inc/unx/x11/x11gdiimpl.h
vcl/inc/unx/x11/x11sys.hxx
vcl/inc/unx/x11/xlimits.hxx
vcl/inc/unx/x11/xrender_peer.hxx
@@ -15192,11 +15159,6 @@ vcl/inc/unx/x11_cursors/vertcurs_curs.h
vcl/inc/unx/x11_cursors/vertcurs_mask.h
vcl/inc/unx/x11_cursors/vshear_curs.h
vcl/inc/unx/x11_cursors/vshear_mask.h
-vcl/inc/unx/x11_cursors/wshide_curs.h
-vcl/inc/unx/x11_cursors/wshide_mask.h
-vcl/inc/unx/x11_cursors/wsshow_curs.h
-vcl/inc/unx/x11_cursors/wsshow_mask.h
-vcl/inc/vcleventlisteners.hxx
vcl/inc/vclstatuslistener.hxx
vcl/inc/wall2.hxx
vcl/inc/win/DWriteTextRenderer.hxx
@@ -15218,7 +15180,6 @@ vcl/inc/wizdlg.hxx
vcl/ios/dummies.cxx
vcl/ios/iosinst.cxx
vcl/null/printerinfomanager.cxx
-vcl/opengl/DeviceInfo.cxx
vcl/opengl/FixedTextureAtlas.cxx
vcl/opengl/LineRenderUtils.cxx
vcl/opengl/PackedTextureAtlas.cxx
@@ -15237,7 +15198,6 @@ vcl/opengl/x11/gdiimpl.cxx
vcl/opengl/x11/salvd.cxx
vcl/osx/DataFlavorMapping.cxx
vcl/osx/DataFlavorMapping.hxx
-vcl/osx/DragActionConversion.cxx
vcl/osx/DragSource.cxx
vcl/osx/DragSource.hxx
vcl/osx/DragSourceContext.cxx
@@ -15248,35 +15208,11 @@ vcl/osx/HtmlFmtFlt.cxx
vcl/osx/OSXTransferable.cxx
vcl/osx/OSXTransferable.hxx
vcl/osx/PictToBmpFlt.cxx
-vcl/osx/PictToBmpFlt.hxx
-vcl/osx/a11yactionwrapper.h
-vcl/osx/a11ycomponentwrapper.h
vcl/osx/a11yfocuslistener.cxx
-vcl/osx/a11yfocuslistener.hxx
vcl/osx/a11yfocustracker.cxx
vcl/osx/a11ylistener.cxx
vcl/osx/a11yrolehelper.h
-vcl/osx/a11yselectionwrapper.h
-vcl/osx/a11ytablewrapper.h
vcl/osx/a11ytextattributeswrapper.h
-vcl/osx/a11ytextwrapper.h
-vcl/osx/a11yutil.h
-vcl/osx/a11yvaluewrapper.h
-vcl/osx/a11ywrapperbutton.h
-vcl/osx/a11ywrappercheckbox.h
-vcl/osx/a11ywrappercombobox.h
-vcl/osx/a11ywrappergroup.h
-vcl/osx/a11ywrapperlist.h
-vcl/osx/a11ywrapperradiobutton.h
-vcl/osx/a11ywrapperradiogroup.h
-vcl/osx/a11ywrapperrow.h
-vcl/osx/a11ywrapperscrollarea.h
-vcl/osx/a11ywrapperscrollbar.h
-vcl/osx/a11ywrappersplitter.h
-vcl/osx/a11ywrapperstatictext.h
-vcl/osx/a11ywrappertabgroup.h
-vcl/osx/a11ywrappertextarea.h
-vcl/osx/a11ywrappertoolbar.h
vcl/osx/clipboard.cxx
vcl/osx/clipboard.hxx
vcl/osx/cuidraw.hxx
@@ -15292,7 +15228,6 @@ vcl/osx/salprn.cxx
vcl/osx/salsys.cxx
vcl/osx/saltimer.cxx
vcl/osx/service_entry.cxx
-vcl/qa/cppunit/BitmapProcessorTest.cxx
vcl/qa/cppunit/app/test_IconThemeInfo.cxx
vcl/qa/cppunit/app/test_IconThemeScanner.cxx
vcl/qa/cppunit/app/test_IconThemeSelector.cxx
@@ -15302,17 +15237,11 @@ vcl/qa/cppunit/complextext.cxx
vcl/qa/cppunit/dndtest.cxx
vcl/qa/cppunit/errorhandler.cxx
vcl/qa/cppunit/font.cxx
-vcl/qa/cppunit/fontcharmap.cxx
vcl/qa/cppunit/fontmetric.cxx
vcl/qa/cppunit/graphicfilter/filters-test.cxx
-vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
vcl/qa/cppunit/lifecycle.cxx
-vcl/qa/cppunit/mnemonic.cxx
-vcl/qa/cppunit/outdev.cxx
-vcl/qa/cppunit/pdfexport/pdfexport.cxx
vcl/qa/cppunit/svm/svmtest.cxx
vcl/qa/cppunit/timer.cxx
-vcl/qa/unit/vcl-dialogs-test.cxx
vcl/quartz/ctfonts.cxx
vcl/quartz/salbmp.cxx
vcl/quartz/salgdi.cxx
@@ -15320,7 +15249,6 @@ vcl/quartz/salgdicommon.cxx
vcl/quartz/salgdiutils.cxx
vcl/quartz/salvd.cxx
vcl/quartz/utils.cxx
-vcl/source/app/ITiledRenderable.cxx
vcl/source/app/IconThemeInfo.cxx
vcl/source/app/IconThemeScanner.cxx
vcl/source/app/IconThemeSelector.cxx
@@ -15332,11 +15260,9 @@ vcl/source/app/i18nhelp.cxx
vcl/source/app/idle.cxx
vcl/source/app/salplug.cxx
vcl/source/app/salusereventlist.cxx
-vcl/source/app/salvtables.cxx
vcl/source/app/scheduler.cxx
vcl/source/app/session.cxx
vcl/source/app/settings.cxx
-vcl/source/app/sound.cxx
vcl/source/app/stdtext.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
@@ -15350,7 +15276,6 @@ vcl/source/bitmap/BitmapScaleSuperFilter.cxx
vcl/source/bitmap/BitmapSymmetryCheck.cxx
vcl/source/bitmap/BitmapTools.cxx
vcl/source/bitmap/bitmap.cxx
-vcl/source/bitmap/bitmapfilter.cxx
vcl/source/bitmap/checksum.cxx
vcl/source/bitmap/salbmp.cxx
vcl/source/cnttype/mcnttfactory.cxx
@@ -15391,7 +15316,6 @@ vcl/source/control/spinbtn.cxx
vcl/source/control/spinfld.cxx
vcl/source/control/tabctrl.cxx
vcl/source/control/throbber.cxx
-vcl/source/control/thumbpos.hxx
vcl/source/control/wizardmachine.cxx
vcl/source/control/wizimpldata.hxx
vcl/source/edit/textdat2.hxx
@@ -15411,25 +15335,19 @@ vcl/source/filter/FilterConfigCache.hxx
vcl/source/filter/FilterConfigItem.cxx
vcl/source/filter/graphicfilter.cxx
vcl/source/filter/graphicfilter2.cxx
-vcl/source/filter/graphicfilter_internal.hxx
vcl/source/filter/igif/decode.cxx
vcl/source/filter/igif/decode.hxx
vcl/source/filter/igif/gifread.cxx
-vcl/source/filter/igif/gifread.hxx
vcl/source/filter/ixbm/xbmread.cxx
-vcl/source/filter/ixbm/xbmread.hxx
vcl/source/filter/ixpm/rgbtable.hxx
vcl/source/filter/ixpm/xpmread.cxx
-vcl/source/filter/ixpm/xpmread.hxx
vcl/source/filter/jpeg/Exif.cxx
vcl/source/filter/jpeg/Exif.hxx
vcl/source/filter/jpeg/JpegReader.cxx
vcl/source/filter/jpeg/JpegReader.hxx
vcl/source/filter/jpeg/JpegTransform.cxx
-vcl/source/filter/jpeg/JpegTransform.hxx
vcl/source/filter/jpeg/JpegWriter.cxx
vcl/source/filter/jpeg/JpegWriter.hxx
-vcl/source/filter/jpeg/jinclude.h
vcl/source/filter/jpeg/jpeg.cxx
vcl/source/filter/jpeg/jpeg.h
vcl/source/filter/jpeg/jpeg.hxx
@@ -15437,11 +15355,9 @@ vcl/source/filter/jpeg/jpegc.cxx
vcl/source/filter/jpeg/transupp.c
vcl/source/filter/jpeg/transupp.h
vcl/source/filter/png/pngread.cxx
-vcl/source/filter/png/pngwrite.cxx
vcl/source/filter/wmf/emfwr.cxx
vcl/source/filter/wmf/emfwr.hxx
vcl/source/filter/wmf/wmf.cxx
-vcl/source/filter/wmf/wmfexternal.cxx
vcl/source/filter/wmf/wmfwr.cxx
vcl/source/filter/wmf/wmfwr.hxx
vcl/source/font/PhysicalFontCollection.cxx
@@ -15462,7 +15378,6 @@ vcl/source/fontsubset/sft.cxx
vcl/source/fontsubset/ttcr.cxx
vcl/source/fontsubset/ttcr.hxx
vcl/source/fontsubset/xlat.cxx
-vcl/source/fontsubset/xlat.hxx
vcl/source/gdi/CommonSalLayout.cxx
vcl/source/gdi/VerticalOrientationData.cxx
vcl/source/gdi/alpha.cxx
@@ -15470,13 +15385,11 @@ vcl/source/gdi/bitmap3.cxx
vcl/source/gdi/bitmapex.cxx
vcl/source/gdi/bmpacc.cxx
vcl/source/gdi/bmpacc2.cxx
-vcl/source/gdi/bmpacc3.cxx
vcl/source/gdi/bmpfast.cxx
vcl/source/gdi/configsettings.cxx
vcl/source/gdi/cvtgrf.cxx
vcl/source/gdi/dibtools.cxx
vcl/source/gdi/embeddedfontshelper.cxx
-vcl/source/gdi/extoutdevdata.cxx
vcl/source/gdi/gdimetafiletools.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/gfxlink.cxx
@@ -15507,7 +15420,6 @@ vcl/source/gdi/print3.cxx
vcl/source/gdi/regband.cxx
vcl/source/gdi/region.cxx
vcl/source/gdi/regionband.cxx
-vcl/source/gdi/salgdiimpl.cxx
vcl/source/gdi/salgdilayout.cxx
vcl/source/gdi/sallayout.cxx
vcl/source/gdi/salmisc.cxx
@@ -15530,10 +15442,8 @@ vcl/source/helper/canvastools.cxx
vcl/source/helper/commandinfoprovider.cxx
vcl/source/helper/displayconnectiondispatch.cxx
vcl/source/helper/evntpost.cxx
-vcl/source/helper/lazydelete.cxx
vcl/source/helper/strhelper.cxx
vcl/source/helper/svtaccessiblefactory.cxx
-vcl/source/helper/threadex.cxx
vcl/source/image/Image.cxx
vcl/source/image/ImageRepository.cxx
vcl/source/image/ImageTree.cxx
@@ -15562,16 +15472,12 @@ vcl/source/outdev/textline.cxx
vcl/source/outdev/transparent.cxx
vcl/source/outdev/vclreferencebase.cxx
vcl/source/outdev/wallpaper.cxx
-vcl/source/salmain/salmain.cxx
vcl/source/toolkit/group.cxx
vcl/source/toolkit/morebtn.cxx
vcl/source/treelist/headbar.cxx
-vcl/source/treelist/iconview.cxx
vcl/source/treelist/iconviewimpl.cxx
-vcl/source/treelist/iconviewimpl.hxx
vcl/source/treelist/imap.cxx
vcl/source/treelist/imap2.cxx
-vcl/source/treelist/imap3.cxx
vcl/source/treelist/inetimg.cxx
vcl/source/treelist/svimpbox.cxx
vcl/source/treelist/svlbitm.cxx
@@ -15584,14 +15490,12 @@ vcl/source/treelist/treelistentry.cxx
vcl/source/treelist/uiobject.cxx
vcl/source/treelist/viewdataentry.cxx
vcl/source/uipreviewer/previewer.cxx
-vcl/source/uitest/logger.cxx
vcl/source/uitest/uiobject.cxx
vcl/source/uitest/uitest.cxx
vcl/source/uitest/uno/uiobject_uno.cxx
vcl/source/uitest/uno/uiobject_uno.hxx
vcl/source/uitest/uno/uitest_uno.cxx
vcl/source/window/EnumContext.cxx
-vcl/source/window/abstdlg.cxx
vcl/source/window/accel.cxx
vcl/source/window/accessibility.cxx
vcl/source/window/accmgr.cxx
@@ -15600,7 +15504,6 @@ vcl/source/window/builder.cxx
vcl/source/window/clipping.cxx
vcl/source/window/commandevent.cxx
vcl/source/window/cursor.cxx
-vcl/source/window/debug.cxx
vcl/source/window/debugevent.cxx
vcl/source/window/decoview.cxx
vcl/source/window/dialog.cxx
@@ -15615,7 +15518,6 @@ vcl/source/window/errinf.cxx
vcl/source/window/event.cxx
vcl/source/window/floatwin.cxx
vcl/source/window/globalization.cxx
-vcl/source/window/introwin.cxx
vcl/source/window/keycod.cxx
vcl/source/window/keyevent.cxx
vcl/source/window/layout.cxx
@@ -15649,7 +15551,6 @@ vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
-vcl/source/window/window3.cxx
vcl/source/window/winproc.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/generic/app/gendisp.cxx
@@ -15701,7 +15602,6 @@ vcl/unx/generic/gdi/font.cxx
vcl/unx/generic/gdi/freetypetextrender.cxx
vcl/unx/generic/gdi/gdiimpl.cxx
vcl/unx/generic/gdi/gdiimpl.hxx
-vcl/unx/generic/gdi/nativewindowhandleprovider.cxx
vcl/unx/generic/gdi/salbmp.cxx
vcl/unx/generic/gdi/salgdi.cxx
vcl/unx/generic/gdi/salgdi2.cxx
@@ -15718,7 +15618,6 @@ vcl/unx/generic/print/glyphset.cxx
vcl/unx/generic/print/glyphset.hxx
vcl/unx/generic/print/printerjob.cxx
vcl/unx/generic/print/prtsetup.cxx
-vcl/unx/generic/print/prtsetup.hxx
vcl/unx/generic/print/psputil.cxx
vcl/unx/generic/print/psputil.hxx
vcl/unx/generic/print/text_gfx.cxx
@@ -15732,11 +15631,8 @@ vcl/unx/generic/window/salobj.cxx
vcl/unx/generic/window/screensaverinhibitor.cxx
vcl/unx/glxtest.cxx
vcl/unx/gtk3/a11y/atklistener.hxx
-vcl/unx/gtk3/a11y/atkregistry.hxx
-vcl/unx/gtk3/a11y/atktextattributes.hxx
vcl/unx/gtk3/a11y/atkwrapper.hxx
vcl/unx/gtk3/a11y/gtk3atkaction.cxx
-vcl/unx/gtk3/a11y/gtk3atkbridge.cxx
vcl/unx/gtk3/a11y/gtk3atkcomponent.cxx
vcl/unx/gtk3/a11y/gtk3atkeditabletext.cxx
vcl/unx/gtk3/a11y/gtk3atkfactory.cxx
@@ -15759,7 +15655,6 @@ vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx
vcl/unx/gtk3/fpicker/SalGtkFolderPicker.hxx
vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
vcl/unx/gtk3/fpicker/SalGtkPicker.hxx
-vcl/unx/gtk3/fpicker/eventnotification.hxx
vcl/unx/gtk3/fpicker/resourceprovider.cxx
vcl/unx/gtk3/gtk3gloactiongroup.cxx
vcl/unx/gtk3/gtk3glomenu.cxx
@@ -15788,7 +15683,6 @@ vcl/win/dtrans/DataFmtTransl.cxx
vcl/win/dtrans/DataFmtTransl.hxx
vcl/win/dtrans/DOTransferable.cxx
vcl/win/dtrans/DOTransferable.hxx
-vcl/win/dtrans/DtObjFactory.cxx
vcl/win/dtrans/DtObjFactory.hxx
vcl/win/dtrans/DTransHelper.cxx
vcl/win/dtrans/DTransHelper.hxx
@@ -15797,30 +15691,20 @@ vcl/win/dtrans/Fetc.hxx
vcl/win/dtrans/FetcList.cxx
vcl/win/dtrans/FetcList.hxx
vcl/win/dtrans/FmtFilter.cxx
-vcl/win/dtrans/FmtFilter.hxx
vcl/win/dtrans/ftransl.cxx
vcl/win/dtrans/ftransl.hxx
vcl/win/dtrans/generic_clipboard.cxx
vcl/win/dtrans/generic_clipboard.hxx
vcl/win/dtrans/globals.cxx
-vcl/win/dtrans/globals.hxx
vcl/win/dtrans/idroptarget.cxx
vcl/win/dtrans/idroptarget.hxx
vcl/win/dtrans/ImplHelper.cxx
-vcl/win/dtrans/ImplHelper.hxx
-vcl/win/dtrans/MimeAttrib.hxx
vcl/win/dtrans/MtaOleClipb.cxx
vcl/win/dtrans/MtaOleClipb.hxx
vcl/win/dtrans/sourcecontext.cxx
-vcl/win/dtrans/sourcecontext.hxx
vcl/win/dtrans/source.cxx
vcl/win/dtrans/source.hxx
vcl/win/dtrans/target.cxx
-vcl/win/dtrans/targetdragcontext.cxx
-vcl/win/dtrans/targetdragcontext.hxx
-vcl/win/dtrans/targetdropcontext.cxx
-vcl/win/dtrans/targetdropcontext.hxx
-vcl/win/dtrans/target.hxx
vcl/win/dtrans/TxtCnvtHlp.cxx
vcl/win/dtrans/TxtCnvtHlp.hxx
vcl/win/dtrans/XNotifyingDataObject.cxx
@@ -15838,7 +15722,6 @@ vcl/win/gdi/salgdi_gdiplus.cxx
vcl/win/gdi/salnativewidgets-luna.cxx
vcl/win/gdi/salprn.cxx
vcl/win/gdi/salvd.cxx
-vcl/win/gdi/winlayout.cxx
vcl/win/window/keynames.cxx
vcl/win/window/salframe.cxx
vcl/win/window/salmenu.cxx
@@ -15879,7 +15762,6 @@ vcl/workben/localestub/localedata_en_TT.cxx
vcl/workben/localestub/localedata_en_US.cxx
vcl/workben/localestub/localedata_en_ZA.cxx
vcl/workben/localestub/localedata_en_ZW.cxx
-vcl/workben/localestub/localestub.cxx
vcl/workben/lwpfuzzer.cxx
vcl/workben/metfuzzer.cxx
vcl/workben/mtfdemo.cxx
diff --git a/vcl/backendtest/outputdevice/gradient.cxx b/vcl/backendtest/outputdevice/gradient.cxx
index e9b454660cbc..ec5e9079e028 100644
--- a/vcl/backendtest/outputdevice/gradient.cxx
+++ b/vcl/backendtest/outputdevice/gradient.cxx
@@ -11,16 +11,16 @@
#include <test/outputdevice.hxx>
#include <vcl/gradient.hxx>
-namespace vcl::test {
-
+namespace vcl::test
+{
Bitmap OutputDeviceTestGradient::setupLinearGradient()
{
initialSetup(12, 12, constBackgroundColor);
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetAngle(Degree10(900));
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -32,8 +32,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientAngled()
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetAngle(Degree10(450));
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -45,8 +45,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientBorder()
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetBorder(50);
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -58,8 +58,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientIntensity()
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetStartIntensity(50);
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -72,8 +72,8 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientSteps()
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetAngle(Degree10(900));
aGradient.SetSteps(4);
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -85,8 +85,8 @@ Bitmap OutputDeviceTestGradient::setupAxialGradient()
Gradient aGradient(GradientStyle::Axial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetAngle(Degree10(900));
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -97,8 +97,8 @@ Bitmap OutputDeviceTestGradient::setupRadialGradient()
initialSetup(12, 12, constBackgroundColor);
Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
@@ -111,8 +111,8 @@ Bitmap OutputDeviceTestGradient::setupRadialGradientOfs()
Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetOfsX(100); // Move center to the bottom-right corner.
aGradient.SetOfsY(100);
- tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
- maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
diff --git a/vcl/backendtest/outputdevice/pixel.cxx b/vcl/backendtest/outputdevice/pixel.cxx
index 520cf50fe92f..c0fcc47705f5 100644
--- a/vcl/backendtest/outputdevice/pixel.cxx
+++ b/vcl/backendtest/outputdevice/pixel.cxx
@@ -10,12 +10,11 @@
#include <test/outputdevice.hxx>
-namespace vcl::test {
-
+namespace vcl::test
+{
namespace
{
-
-void drawPixelOffset(OutputDevice& rDevice, tools::Rectangle const & rRect, int nOffset)
+void drawPixelOffset(OutputDevice& rDevice, tools::Rectangle const& rRect, int nOffset)
{
for (tools::Long x = 0 + nOffset; x < (rRect.GetWidth() - nOffset); ++x)
{
diff --git a/vcl/backendtest/outputdevice/polypolygon.cxx b/vcl/backendtest/outputdevice/polypolygon.cxx
index a53acbaf72be..9151bd28ff3f 100644
--- a/vcl/backendtest/outputdevice/polypolygon.cxx
+++ b/vcl/backendtest/outputdevice/polypolygon.cxx
@@ -10,23 +10,21 @@
#include <test/outputdevice.hxx>
-
-namespace vcl::test {
-
+namespace vcl::test
+{
namespace
{
-
-tools::Polygon createPolygonOffset(tools::Rectangle const & rRect, int nOffset, int nFix = 0)
+tools::Polygon createPolygonOffset(tools::Rectangle const& rRect, int nOffset, int nFix = 0)
{
// Note: According to https://lists.freedesktop.org/archives/libreoffice/2019-November/083709.html
// filling polygons always skips the right-most and bottom-most pixels, in order to avoid
// overlaps when drawing adjacent polygons. Specifying nFix = 1 allows to visually compensate
// for this by making the polygon explicitly larger.
tools::Polygon aPolygon(4);
- aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0);
- aPolygon.SetPoint(Point(rRect.Right() - nOffset + nFix, rRect.Top() + nOffset), 1);
+ aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0);
+ aPolygon.SetPoint(Point(rRect.Right() - nOffset + nFix, rRect.Top() + nOffset), 1);
aPolygon.SetPoint(Point(rRect.Right() - nOffset + nFix, rRect.Bottom() - nOffset + nFix), 2);
- aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Bottom() - nOffset + nFix), 3);
+ aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Bottom() - nOffset + nFix), 3);
aPolygon.Optimize(PolyOptimizeFlags::CLOSE);
return aPolygon;
}
@@ -53,7 +51,7 @@ Bitmap OutputDeviceTestPolyPolygon::setupFilledRectangle(bool useLineColor)
{
initialSetup(13, 13, constBackgroundColor);
- if(useLineColor)
+ if (useLineColor)
mpVirtualDevice->SetLineColor(constLineColor);
else
mpVirtualDevice->SetLineColor();
diff --git a/vcl/backendtest/outputdevice/rectangle.cxx b/vcl/backendtest/outputdevice/rectangle.cxx
index 8e7c0ba861aa..1401a39e1695 100644
--- a/vcl/backendtest/outputdevice/rectangle.cxx
+++ b/vcl/backendtest/outputdevice/rectangle.cxx
@@ -10,23 +10,23 @@
#include <test/outputdevice.hxx>
-namespace vcl::test {
-
+namespace vcl::test
+{
namespace
{
- void drawRectOffset(OutputDevice& rDevice, tools::Rectangle const & rRect, int nOffset)
- {
- rDevice.DrawRect(tools::Rectangle(rRect.Left() + nOffset, rRect.Top() + nOffset,
- rRect.Right() - nOffset, rRect.Bottom() - nOffset));
-
- }
+void drawRectOffset(OutputDevice& rDevice, tools::Rectangle const& rRect, int nOffset)
+{
+ rDevice.DrawRect(tools::Rectangle(rRect.Left() + nOffset, rRect.Top() + nOffset,
+ rRect.Right() - nOffset, rRect.Bottom() - nOffset));
+}
- void drawInvertOffset(OutputDevice& rDevice, tools::Rectangle const & rRect, int nOffset, InvertFlags eFlags)
- {
- tools::Rectangle aRectangle(rRect.Left() + nOffset, rRect.Top() + nOffset,
- rRect.Right() - nOffset, rRect.Bottom() - nOffset);
- rDevice.Invert(aRectangle, eFlags);
- }
+void drawInvertOffset(OutputDevice& rDevice, tools::Rectangle const& rRect, int nOffset,
+ InvertFlags eFlags)
+{
+ tools::Rectangle aRectangle(rRect.Left() + nOffset, rRect.Top() + nOffset,
+ rRect.Right() - nOffset, rRect.Bottom() - nOffset);
+ rDevice.Invert(aRectangle, eFlags);
+}
} // end anonymous namespace
@@ -34,7 +34,7 @@ Bitmap OutputDeviceTestRect::setupFilledRectangle(bool useLineColor)
{
initialSetup(13, 13, constBackgroundColor);
- if(useLineColor)
+ if (useLineColor)
mpVirtualDevice->SetLineColor(constLineColor);
else
mpVirtualDevice->SetLineColor();
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx
index de62b9e5064c..9abd5902864d 100644
--- a/vcl/headless/svpcairotextrender.cxx
+++ b/vcl/headless/svpcairotextrender.cxx
@@ -16,10 +16,7 @@ SvpCairoTextRender::SvpCairoTextRender(SvpSalGraphics& rParent)
{
}
-cairo_t* SvpCairoTextRender::getCairoContext()
-{
- return mrParent.getCairoContext(false);
-}
+cairo_t* SvpCairoTextRender::getCairoContext() { return mrParent.getCairoContext(false); }
void SvpCairoTextRender::getSurfaceOffset(double& nDX, double& nDY)
{
@@ -27,10 +24,7 @@ void SvpCairoTextRender::getSurfaceOffset(double& nDX, double& nDY)
nDY = 0;
}
-void SvpCairoTextRender::clipRegion(cairo_t* cr)
-{
- mrParent.clipRegion(cr);
-}
+void SvpCairoTextRender::clipRegion(cairo_t* cr) { mrParent.clipRegion(cr); }
void SvpCairoTextRender::releaseCairoContext(cairo_t* cr)
{
diff --git a/vcl/inc/BitmapScaleConvolutionFilter.hxx b/vcl/inc/BitmapScaleConvolutionFilter.hxx
index 9bc1bd45ca0c..fba393223382 100644
--- a/vcl/inc/BitmapScaleConvolutionFilter.hxx
+++ b/vcl/inc/BitmapScaleConvolutionFilter.hxx
@@ -29,7 +29,8 @@ namespace vcl
class BitmapScaleConvolutionFilter : public BitmapFilter
{
protected:
- BitmapScaleConvolutionFilter(const double& rScaleX, const double& rScaleY, std::unique_ptr<Kernel> pKernel)
+ BitmapScaleConvolutionFilter(const double& rScaleX, const double& rScaleY,
+ std::unique_ptr<Kernel> pKernel)
: mxKernel(std::move(pKernel))
, mrScaleX(rScaleX)
, mrScaleY(rScaleY)
@@ -57,7 +58,7 @@ class VCL_DLLPUBLIC BitmapScaleBicubicFilter final : public BitmapScaleConvoluti
{
public:
BitmapScaleBicubicFilter(const double& rScaleX, const double& rScaleY)
- : BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<BicubicKernel>())
+ : BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<BicubicKernel>())
{
}
};
@@ -70,7 +71,6 @@ public:
{
}
};
-
}
#endif // VCL_INC_BITMAPSCALECONVOLUTIONFILTER_HXX
diff --git a/vcl/inc/BitmapScaleSuperFilter.hxx b/vcl/inc/BitmapScaleSuperFilter.hxx
index 47e48eb1ad27..764ef567840d 100644
--- a/vcl/inc/BitmapScaleSuperFilter.hxx
+++ b/vcl/inc/BitmapScaleSuperFilter.hxx
@@ -33,7 +33,6 @@ public:
private:
double mrScaleX;
double mrScaleY;
-
};
#endif
diff --git a/vcl/inc/BitmapSymmetryCheck.hxx b/vcl/inc/BitmapSymmetryCheck.hxx
index faf058923fdf..0c7d4444c774 100644
--- a/vcl/inc/BitmapSymmetryCheck.hxx
+++ b/vcl/inc/BitmapSymmetryCheck.hxx
@@ -23,7 +23,7 @@ public:
static bool check(Bitmap& rBitmap);
private:
- static bool checkImpl(BitmapReadAccess const * pReadAccess);
+ static bool checkImpl(BitmapReadAccess const* pReadAccess);
};
#endif // INCLUDED_VCL_INC_BITMAPSYMMETRYCHECK_HXX
diff --git a/vcl/inc/ControlCacheKey.hxx b/vcl/inc/ControlCacheKey.hxx
index 9c8f467ee5d4..e4e7616e2322 100644
--- a/vcl/inc/ControlCacheKey.hxx
+++ b/vcl/inc/ControlCacheKey.hxx
@@ -37,20 +37,19 @@ public:
, mnPart(nPart)
, mnState(nState)
, maSize(rSize)
- {}
+ {
+ }
bool operator==(ControlCacheKey const& aOther) const
{
- return mnType == aOther.mnType
- && mnPart == aOther.mnPart
- && mnState == aOther.mnState
- && maSize.Width() == aOther.maSize.Width()
- && maSize.Height() == aOther.maSize.Height();
+ return mnType == aOther.mnType && mnPart == aOther.mnPart && mnState == aOther.mnState
+ && maSize.Width() == aOther.maSize.Width()
+ && maSize.Height() == aOther.maSize.Height();
}
bool canCacheControl() const
{
- switch(mnType)
+ switch (mnType)
{
case ControlType::Checkbox:
case ControlType::Radiobutton:
diff --git a/vcl/inc/IconThemeScanner.hxx b/vcl/inc/IconThemeScanner.hxx
index 3cbca74a4683..d997443a63aa 100644
--- a/vcl/inc/IconThemeScanner.hxx
+++ b/vcl/inc/IconThemeScanner.hxx
@@ -21,8 +21,8 @@
// forward declaration of unit test class. Required for friend relationship.
class IconThemeScannerTest;
-namespace vcl {
-
+namespace vcl
+{
/** This class scans a folder for icon themes and provides the results.
*/
class VCL_DLLPUBLIC IconThemeScanner
@@ -31,15 +31,13 @@ public:
/** Factory method to create the object.
* Provide a path to search for IconThemes.
*/
- static std::shared_ptr<IconThemeScanner> Create(const OUString &path);
+ static std::shared_ptr<IconThemeScanner> Create(const OUString& path);
/** This method will return the standard path where icon themes are located.
*/
- static OUString
- GetStandardIconThemePath();
+ static OUString GetStandardIconThemePath();
- const std::vector<IconThemeInfo>&
- GetFoundIconThemes() const {return mFoundIconThemes;}
+ const std::vector<IconThemeInfo>& GetFoundIconThemes() const { return mFoundIconThemes; }
/** Get the IconThemeInfo for a theme.
* If the theme id is not among the found themes, a std::runtime_error will be thrown.
@@ -50,8 +48,7 @@ public:
/** Checks whether the theme with the provided name has been found in the
* scanned directory.
*/
- bool
- IconThemeIsInstalled(const OUString& themeId) const;
+ bool IconThemeIsInstalled(const OUString& themeId) const;
private:
IconThemeScanner();
@@ -63,22 +60,19 @@ private:
* - The directory does not exist
* - There are no files which match the pattern images_xxx.zip
*/
- void ScanDirectoryForIconThemes(const OUString &path);
+ void ScanDirectoryForIconThemes(const OUString& path);
/** Adds the provided icon theme by path.
*/
- bool
- AddIconThemeByPath(const OUString &path);
+ bool AddIconThemeByPath(const OUString& path);
/** Scans the provided directory for icon themes.
* The returned strings will contain the URLs to the icon themes.
*/
- static std::vector<OUString>
- ReadIconThemesFromPath(const OUString& dir);
+ static std::vector<OUString> ReadIconThemesFromPath(const OUString& dir);
/** Check whether a single file is valid */
- static bool
- FileIsValidIconTheme(const OUString&);
+ static bool FileIsValidIconTheme(const OUString&);
std::vector<IconThemeInfo> mFoundIconThemes;
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index 526174b14951..46adea903e09 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -22,22 +22,22 @@ class AndroidSalInstance : public SvpSalInstance
// This JNIEnv is valid only in the thread where this
// AndroidSalInstance object is created, which is the "LO" thread
// in which soffice_main() runs
- JNIEnv *m_pJNIEnv;
+ JNIEnv* m_pJNIEnv;
public:
- AndroidSalInstance( std::unique_ptr<SalYieldMutex> pMutex );
+ AndroidSalInstance(std::unique_ptr<SalYieldMutex> pMutex);
virtual ~AndroidSalInstance();
- static AndroidSalInstance *getInstance();
+ static AndroidSalInstance* getInstance();
virtual SalSystem* CreateSalSystem();
// frame management
- void GetWorkArea( tools::Rectangle& rRect );
- SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
- SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle );
+ void GetWorkArea(tools::Rectangle& rRect);
+ SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle);
+ SalFrame* CreateChildFrame(SystemParentData* pParent, SalFrameStyleFlags nStyle);
// mainloop pieces
- virtual bool AnyInput( VclInputFlags nType );
+ virtual bool AnyInput(VclInputFlags nType);
virtual void updateMainThread();
virtual void releaseMainThread();
diff --git a/vcl/inc/headless/svpprn.hxx b/vcl/inc/headless/svpprn.hxx
index 3d241a96eb9a..e1dd1e15f9e2 100644
--- a/vcl/inc/headless/svpprn.hxx
+++ b/vcl/inc/headless/svpprn.hxx
@@ -25,13 +25,13 @@
class SvpSalInfoPrinter final : public PspSalInfoPrinter
{
public:
- virtual bool Setup( weld::Window* pFrame, ImplJobSetup* pSetupData ) override;
+ virtual bool Setup(weld::Window* pFrame, ImplJobSetup* pSetupData) override;
};
class SvpSalPrinter final : public PspSalPrinter
{
public:
- SvpSalPrinter( SalInfoPrinter* pInfoPrinter );
+ SvpSalPrinter(SalInfoPrinter* pInfoPrinter);
};
#endif // INCLUDED_VCL_INC_HEADLESS_SVPPRN_HXX
diff --git a/vcl/inc/iconview.hxx b/vcl/inc/iconview.hxx
index 091f08fb2d3b..9c74d29f9834 100644
--- a/vcl/inc/iconview.hxx
+++ b/vcl/inc/iconview.hxx
@@ -25,13 +25,14 @@
class IconView final : public SvTreeListBox
{
public:
- IconView( vcl::Window* pParent, WinBits nBits );
+ IconView(vcl::Window* pParent, WinBits nBits);
virtual void Resize() override;
virtual tools::Rectangle GetFocusRect(const SvTreeListEntry*, tools::Long nEntryPos) override;
- void PaintEntry( SvTreeListEntry&, tools::Long nX, tools::Long nY, vcl::RenderContext& rRenderContext);
+ void PaintEntry(SvTreeListEntry&, tools::Long nX, tools::Long nY,
+ vcl::RenderContext& rRenderContext);
};
#endif
diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx
index a937fb25fa55..f1269cabe75e 100644
--- a/vcl/inc/ios/iosinst.hxx
+++ b/vcl/inc/ios/iosinst.hxx
@@ -33,17 +33,18 @@ class IosSalFrame;
class IosSalInstance : public SvpSalInstance
{
public:
- IosSalInstance( std::unique_ptr<SalYieldMutex> pMutex );
+ IosSalInstance(std::unique_ptr<SalYieldMutex> pMutex);
virtual ~IosSalInstance();
- static IosSalInstance *getInstance();
+ static IosSalInstance* getInstance();
SalSystem* CreateSalSystem() override;
- css::uno::Reference< css::uno::XInterface > CreateClipboard( const css::uno::Sequence< css::uno::Any >& i_rArguments ) override;
+ css::uno::Reference<css::uno::XInterface>
+ CreateClipboard(const css::uno::Sequence<css::uno::Any>& i_rArguments) override;
- void GetWorkArea( tools::Rectangle& rRect );
- SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
- SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
+ void GetWorkArea(tools::Rectangle& rRect);
+ SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle) override;
+ SalFrame* CreateChildFrame(SystemParentData* pParent, SalFrameStyleFlags nStyle) override;
};
#endif // INCLUDED_VCL_INC_IOS_IOSINST_HXX
diff --git a/vcl/inc/langboost.hxx b/vcl/inc/langboost.hxx
index 84bdb2d84111..77553de05c6b 100644
--- a/vcl/inc/langboost.hxx
+++ b/vcl/inc/langboost.hxx
@@ -11,7 +11,7 @@
namespace vcl
{
- const char* getLangBoost();
+const char* getLangBoost();
}
#endif
diff --git a/vcl/inc/opengl/BufferObject.hxx b/vcl/inc/opengl/BufferObject.hxx
index 396de89de0ed..e31148b74c6e 100644
--- a/vcl/inc/opengl/BufferObject.hxx
+++ b/vcl/inc/opengl/BufferObject.hxx
@@ -13,9 +13,7 @@
namespace vcl
{
-
-template<typename TYPE, GLenum BUFFER_TYPE>
-class BufferObject
+template <typename TYPE, GLenum BUFFER_TYPE> class BufferObject
{
private:
GLuint mId;
@@ -65,11 +63,9 @@ public:
CHECK_GL_ERROR();
}
}
-
};
-template<typename TYPE>
-class VertexBufferObject final : public BufferObject<TYPE, GL_ARRAY_BUFFER>
+template <typename TYPE> class VertexBufferObject final : public BufferObject<TYPE, GL_ARRAY_BUFFER>
{
};
diff --git a/vcl/inc/opengl/TextureState.hxx b/vcl/inc/opengl/TextureState.hxx
index fbf2b9cee548..e285cd7704fa 100644
--- a/vcl/inc/opengl/TextureState.hxx
+++ b/vcl/inc/opengl/TextureState.hxx
@@ -23,7 +23,8 @@ public:
TextureState()
: mnCurrentTextureUnit(0)
, maBoundTextures(4, 0)
- {}
+ {
+ }
static void generate(GLuint& nTexture)
{
@@ -39,7 +40,6 @@ public:
CHECK_GL_ERROR();
mnCurrentTextureUnit = nTextureUnit;
}
-
}
void bind(GLuint nTexture)
@@ -66,11 +66,8 @@ public:
maBoundTextures[i] = 0;
}
}
-
};
-
-
#endif // INCLUDED_VCL_INC_OPENGL_TEXTURE_STATE_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx
index d86af9223c54..e55c6f1095ba 100644
--- a/vcl/inc/opengl/x11/gdiimpl.hxx
+++ b/vcl/inc/opengl/x11/gdiimpl.hxx
@@ -22,17 +22,17 @@ struct TextureCombo;
class X11OpenGLSalGraphicsImpl : public OpenGLSalGraphicsImpl, public X11GraphicsImpl
{
private:
- X11SalGraphics& mrX11Parent;
+ X11SalGraphics& mrX11Parent;
public:
- X11OpenGLSalGraphicsImpl( X11SalGraphics& rParent );
+ X11OpenGLSalGraphicsImpl(X11SalGraphics& rParent);
virtual ~X11OpenGLSalGraphicsImpl() override;
protected:
virtual rtl::Reference<OpenGLContext> CreateWinContext() override;
public:
- virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
+ virtual void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
virtual void Init() override;
};
diff --git a/vcl/inc/opengl/zone.hxx b/vcl/inc/opengl/zone.hxx
index 4bcdf15dcf79..f7f36ea22f84 100644
--- a/vcl/inc/opengl/zone.hxx
+++ b/vcl/inc/opengl/zone.hxx
@@ -19,23 +19,27 @@
* We want to be able to detect if a given crash came
* from the OpenGL code, so use this helper to track that.
*/
-class VCL_DLLPUBLIC OpenGLZone : public CrashZone< OpenGLZone > {
+class VCL_DLLPUBLIC OpenGLZone : public CrashZone<OpenGLZone>
+{
public:
static void hardDisable();
static void relaxWatchdogTimings();
static const CrashWatchdogTimingsValues& getCrashWatchdogTimingsValues();
- static void checkDebug( int nUnchanged, const CrashWatchdogTimingsValues& aTimingValues );
+ static void checkDebug(int nUnchanged, const CrashWatchdogTimingsValues& aTimingValues);
static const char* name() { return "OpenGL"; }
};
/// Create this to not only enter the zone, but set VCL context.
-class OpenGLVCLContextZone {
+class OpenGLVCLContextZone
+{
OpenGLZone aZone;
+
public:
OpenGLVCLContextZone();
};
-class VCL_DLLPUBLIC PreDefaultWinNoOpenGLZone {
+class VCL_DLLPUBLIC PreDefaultWinNoOpenGLZone
+{
public:
PreDefaultWinNoOpenGLZone();
~PreDefaultWinNoOpenGLZone();
diff --git a/vcl/inc/osx/a11ylistener.hxx b/vcl/inc/osx/a11ylistener.hxx
index a5355946786d..43aa6df66987 100644
--- a/vcl/inc/osx/a11ylistener.hxx
+++ b/vcl/inc/osx/a11ylistener.hxx
@@ -28,20 +28,19 @@
#include <set>
#include <com/sun/star/awt/Rectangle.hpp>
-
-class AquaA11yEventListener :
- public ::cppu::WeakImplHelper< css::accessibility::XAccessibleEventListener >
+class AquaA11yEventListener
+ : public ::cppu::WeakImplHelper<css::accessibility::XAccessibleEventListener>
{
-
public:
AquaA11yEventListener(id wrapperObject, sal_Int16 role);
virtual ~AquaA11yEventListener() override;
// XEventListener
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
// XAccessibleEventListener
- virtual void SAL_CALL notifyEvent( const css::accessibility::AccessibleEventObject& aEvent ) override;
+ virtual void SAL_CALL
+ notifyEvent(const css::accessibility::AccessibleEventObject& aEvent) override;
private:
const id m_wrapperObject;
diff --git a/vcl/inc/osx/keyboardfocuslistener.hxx b/vcl/inc/osx/keyboardfocuslistener.hxx
index 1da1c845293a..9589a471e733 100644
--- a/vcl/inc/osx/keyboardfocuslistener.hxx
+++ b/vcl/inc/osx/keyboardfocuslistener.hxx
@@ -25,11 +25,12 @@
#include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx>
-
class KeyboardFocusListener : public salhelper::SimpleReferenceObject
{
public:
- virtual void focusedObjectChanged(const css::uno::Reference< css::accessibility::XAccessible >& xAccessible) = 0;
+ virtual void
+ focusedObjectChanged(const css::uno::Reference<css::accessibility::XAccessible>& xAccessible)
+ = 0;
};
#endif // INCLUDED_VCL_INC_OSX_KEYBOARDFOCUSLISTENER_HXX
diff --git a/vcl/inc/osx/salnsmenu.h b/vcl/inc/osx/salnsmenu.h
index f815c14c006d..696abca2fc0b 100644
--- a/vcl/inc/osx/salnsmenu.h
+++ b/vcl/inc/osx/salnsmenu.h
@@ -26,26 +26,26 @@ class AquaSalMenuItem;
@interface OOStatusItemView : NSView
{
}
--(void)drawRect: (NSRect)aRect;
--(void)layout;
--(void)mouseUp: (NSEvent *)pEvent;
+- (void)drawRect:(NSRect)aRect;
+- (void)layout;
+- (void)mouseUp:(NSEvent*)pEvent;
@end
@interface SalNSMenu : NSMenu
{
- AquaSalMenu* mpMenu;
+ AquaSalMenu* mpMenu;
}
--(id)initWithMenu: (AquaSalMenu*)pMenu;
--(void)menuNeedsUpdate: (NSMenu*)pMenu;
--(void)setSalMenu: (AquaSalMenu*)pMenu;
+- (id)initWithMenu:(AquaSalMenu*)pMenu;
+- (void)menuNeedsUpdate:(NSMenu*)pMenu;
+- (void)setSalMenu:(AquaSalMenu*)pMenu;
@end
@interface SalNSMenuItem : NSMenuItem
{
- AquaSalMenuItem* mpMenuItem;
+ AquaSalMenuItem* mpMenuItem;
}
--(id)initWithMenuItem: (AquaSalMenuItem*)pMenuItem;
--(void)menuItemTriggered: (id)aSender;
+- (id)initWithMenuItem:(AquaSalMenuItem*)pMenuItem;
+- (void)menuItemTriggered:(id)aSender;
@end
#endif // INCLUDED_VCL_INC_OSX_SALNSMENU_H
diff --git a/vcl/inc/osx/salnstimer.h b/vcl/inc/osx/salnstimer.h
index d1928fe9d671..5c831cdf45fe 100644
--- a/vcl/inc/osx/salnstimer.h
+++ b/vcl/inc/osx/salnstimer.h
@@ -27,7 +27,7 @@
@interface TimerCallbackCaller : NSObject
{
}
--(void)timerElapsed:(NSTimer*)pTimer;
+- (void)timerElapsed:(NSTimer*)pTimer;
@end
#endif // INCLUDED_VCL_INC_OSX_SALNSTIMER_H
diff --git a/vcl/inc/quartz/ctfonts.hxx b/vcl/inc/quartz/ctfonts.hxx
index 89cc554439ba..431385aeeda6 100644
--- a/vcl/inc/quartz/ctfonts.hxx
+++ b/vcl/inc/quartz/ctfonts.hxx
@@ -24,7 +24,7 @@
#include <sallayout.hxx>
SystemFontList* GetCoretextFontList();
-FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef, bool* );
+FontAttributes DevFontFromCTFontDescriptor(CTFontDescriptorRef, bool*);
#endif // INCLUDED_VCL_INC_QUARTZ_CTFONTS_HXX
diff --git a/vcl/inc/regionband.hxx b/vcl/inc/regionband.hxx
index 30a75ac015de..b722be430e6a 100644
--- a/vcl/inc/regionband.hxx
+++ b/vcl/inc/regionband.hxx
@@ -32,8 +32,8 @@ class RegionBand
private:
friend const char* ImplDbgTestRegionBand(const void*);
- ImplRegionBand* mpFirstBand; // root of the list with y-bands
- ImplRegionBand* mpLastCheckedBand;
+ ImplRegionBand* mpFirstBand; // root of the list with y-bands
+ ImplRegionBand* mpLastCheckedBand;
void implReset();
[[nodiscard]] bool CheckConsistency() const;
@@ -45,7 +45,7 @@ public:
RegionBand(const tools::Rectangle&);
~RegionBand();
- bool operator==( const RegionBand& rRegionBand ) const;
+ bool operator==(const RegionBand& rRegionBand) const;
[[nodiscard]] bool load(SvStream& rIStrm);
void save(SvStream& rIStrm) const;
@@ -57,7 +57,7 @@ public:
void processPoints();
void CreateBandRange(tools::Long nYTop, tools::Long nYBottom);
void InsertLine(const Point& rStartPt, const Point& rEndPt, tools::Long nLineId);
- void InsertPoint(const Point &rPoint, tools::Long nLineID, bool bEndPoint, LineType eLineType);
+ void InsertPoint(const Point& rPoint, tools::Long nLineID, bool bEndPoint, LineType eLineType);
bool OptimizeBandList();
void Move(tools::Long nHorzMove, tools::Long nVertMove);
void Scale(double fScaleX, double fScaleY);
@@ -73,7 +73,8 @@ public:
void XOr(const RegionBand& rSource);
tools::Rectangle GetBoundRect() const;
bool IsInside(const Point& rPoint) const;
- sal_uInt32 getRectangleCount() const; // only users are Region::Intersect, Region::IsRectangle and PSWriter::ImplBmp
+ sal_uInt32 getRectangleCount()
+ const; // only users are Region::Intersect, Region::IsRectangle and PSWriter::ImplBmp
void GetRegionRectangles(RectangleVector& rTarget) const;
};
diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx
index fc80e90d0ca9..cf89bff59259 100644
--- a/vcl/inc/salsys.hxx
+++ b/vcl/inc/salsys.hxx
@@ -25,12 +25,12 @@
#include <rtl/ustring.hxx>
// Button identifier for ShowNativeMessageBox
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1;
+const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1;
class VCL_PLUGIN_PUBLIC SalSystem
{
public:
- SalSystem() {}
+ SalSystem() {}
virtual ~SalSystem();
// get info about the display
@@ -63,7 +63,7 @@ public:
else position relative to whole display
size: size of the screen
*/
- virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel(unsigned int nScreen) = 0;
/* Shows a native message box with the specified title, message and button
combination.
@@ -78,9 +78,7 @@ public:
See button identifier above. If the function fails the
return value is 0.
*/
- virtual int ShowNativeMessageBox( const OUString& rTitle,
- const OUString& rMessage ) = 0;
-
+ virtual int ShowNativeMessageBox(const OUString& rTitle, const OUString& rMessage) = 0;
};
VCL_DLLPUBLIC SalSystem* ImplGetSalSystem();
diff --git a/vcl/inc/scanlinewriter.hxx b/vcl/inc/scanlinewriter.hxx
index 6be9623023cd..43334f955c50 100644
--- a/vcl/inc/scanlinewriter.hxx
+++ b/vcl/inc/scanlinewriter.hxx
@@ -25,31 +25,32 @@
namespace vcl
{
-
// Write color information for 1, 4 and 8 bit palette bitmap scanlines.
class ScanlineWriter
{
BitmapPalette& maPalette;
sal_uInt8 const mnColorsPerByte; // number of colors that are stored in one byte
- sal_uInt8 const mnColorBitSize; // number of bits a color takes
- sal_uInt8 const mnColorBitMask; // bit mask used to isolate the color
+ sal_uInt8 const mnColorBitSize; // number of bits a color takes
+ sal_uInt8 const mnColorBitMask; // bit mask used to isolate the color
sal_uInt8* mpCurrentScanline;
tools::Long mnX;
public:
-
ScanlineWriter(BitmapPalette& aPalette, sal_Int8 nColorsPerByte)
: maPalette(aPalette)
, mnColorsPerByte(nColorsPerByte)
- , mnColorBitSize(8 / mnColorsPerByte) // bit size is number of bit in a byte divided by number of colors per byte (8 / 2 = 4 for 4-bit)
+ , mnColorBitSize(
+ 8
+ / mnColorsPerByte) // bit size is number of bit in a byte divided by number of colors per byte (8 / 2 = 4 for 4-bit)
, mnColorBitMask((1 << mnColorBitSize) - 1) // calculate the bit mask from the bit size
, mpCurrentScanline(nullptr)
, mnX(0)
- {}
+ {
+ }
static std::unique_ptr<ScanlineWriter> Create(sal_uInt16 nBits, BitmapPalette& aPalette)
{
- switch(nBits)
+ switch (nBits)
{
case 1:
return std::make_unique<ScanlineWriter>(aPalette, 8);
diff --git a/vcl/inc/scrptrun.h b/vcl/inc/scrptrun.h
index b663deeed7d9..db2a778cf24a 100644
--- a/vcl/inc/scrptrun.h
+++ b/vcl/inc/scrptrun.h
@@ -43,22 +43,22 @@
#include <unicode/uscript.h>
#include <vector>
-namespace vcl {
-
+namespace vcl
+{
struct ParenStackEntry
{
int32_t pairIndex;
UScriptCode scriptCode;
ParenStackEntry()
- : pairIndex(0)
- , scriptCode(USCRIPT_INVALID_CODE)
+ : pairIndex(0)
+ , scriptCode(USCRIPT_INVALID_CODE)
{
}
};
-class ScriptRun final : public icu::UObject {
+class ScriptRun final : public icu::UObject
+{
public:
-
ScriptRun(const UChar chars[], int32_t length);
void reset();
@@ -87,13 +87,15 @@ s * ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @stable ICU 2.2
*/
- static UClassID getStaticClassID() { return static_cast<UClassID>(const_cast<char *>(&fgClassID)); }
+ static UClassID getStaticClassID()
+ {
+ return static_cast<UClassID>(const_cast<char*>(&fgClassID));
+ }
private:
-
int32_t charStart;
int32_t charLimit;
- const UChar *charArray;
+ const UChar* charArray;
int32_t scriptStart;
int32_t scriptEnd;
@@ -109,32 +111,20 @@ private:
static const char fgClassID;
};
-inline ScriptRun::ScriptRun(const UChar chars[], int32_t length)
-{
- reset(chars, 0, length);
-}
+inline ScriptRun::ScriptRun(const UChar chars[], int32_t length) { reset(chars, 0, length); }
-inline int32_t ScriptRun::getScriptStart() const
-{
- return scriptStart;
-}
+inline int32_t ScriptRun::getScriptStart() const { return scriptStart; }
-inline int32_t ScriptRun::getScriptEnd() const
-{
- return scriptEnd;
-}
+inline int32_t ScriptRun::getScriptEnd() const { return scriptEnd; }
-inline UScriptCode ScriptRun::getScriptCode() const
-{
- return scriptCode;
-}
+inline UScriptCode ScriptRun::getScriptCode() const { return scriptCode; }
inline void ScriptRun::reset()
{
scriptStart = charStart;
- scriptEnd = charStart;
- scriptCode = USCRIPT_INVALID_CODE;
- parenSP = -1;
+ scriptEnd = charStart;
+ scriptCode = USCRIPT_INVALID_CODE;
+ parenSP = -1;
parenStack.resize(128);
}
@@ -152,7 +142,6 @@ inline void ScriptRun::reset(const UChar chars[], int32_t start, int32_t length)
reset(start, length);
}
-
}
#endif
diff --git a/vcl/inc/unx/desktops.hxx b/vcl/inc/unx/desktops.hxx
index 531e4c64272b..0abb6aa71339 100644
--- a/vcl/inc/unx/desktops.hxx
+++ b/vcl/inc/unx/desktops.hxx
@@ -24,7 +24,8 @@
#include <sal/types.h>
-enum SAL_DLLPUBLIC_RTTI DesktopType {
+enum SAL_DLLPUBLIC_RTTI DesktopType
+{
DESKTOP_NONE, // headless, i.e. no X connection at all
DESKTOP_UNKNOWN, // unknown desktop, simple WM, etc.
DESKTOP_GNOME,
diff --git a/vcl/inc/unx/i18n_keysym.hxx b/vcl/inc/unx/i18n_keysym.hxx
index 3189087398f4..a6c8d49a911d 100644
--- a/vcl/inc/unx/i18n_keysym.hxx
+++ b/vcl/inc/unx/i18n_keysym.hxx
@@ -60,7 +60,7 @@
of course not all keysyms can be mapped to a unicode code point
*/
-sal_Unicode KeysymToUnicode (KeySym nKeySym);
+sal_Unicode KeysymToUnicode(KeySym nKeySym);
#endif // INCLUDED_VCL_INC_UNX_I18N_KEYSYM_HXX
diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h
index 70fb0e4d0a58..f8e36d15cd5c 100644
--- a/vcl/inc/unx/salunx.h
+++ b/vcl/inc/unx/salunx.h
@@ -22,8 +22,10 @@
#include <tools/long.hxx>
-inline tools::Long Divide( tools::Long nDividend, tools::Long nDivisor )
-{ return (nDividend + nDivisor/2) / nDivisor; }
+inline tools::Long Divide(tools::Long nDividend, tools::Long nDivisor)
+{
+ return (nDividend + nDivisor / 2) / nDivisor;
+}
#endif
diff --git a/vcl/inc/unx/screensaverinhibitor.hxx b/vcl/inc/unx/screensaverinhibitor.hxx
index 58c00e7fa382..f9de1c8530ce 100644
--- a/vcl/inc/unx/screensaverinhibitor.hxx
+++ b/vcl/inc/unx/screensaverinhibitor.hxx
@@ -21,8 +21,8 @@
class VCL_PLUGIN_PUBLIC ScreenSaverInhibitor
{
public:
- void inhibit( bool bInhibit, const OUString& sReason,
- bool bIsX11, const std::optional<unsigned int>& xid, std::optional<Display*> pDisplay );
+ void inhibit(bool bInhibit, const OUString& sReason, bool bIsX11,
+ const std::optional<unsigned int>& xid, std::optional<Display*> pDisplay);
private:
// These are all used as guint, however this header may be included
@@ -56,14 +56,14 @@ private:
// (This is replaced by the GSM interface from Mate 1.12 onwards)
//
// Note: the Uninhibit call has different spelling in FDO (UnInhibit) vs GSM (Uninhibit)
- void inhibitFDO( bool bInhibit, const char* appname, const char* reason );
- void inhibitFDOPM( bool bInhibit, const char* appname, const char* reason );
- void inhibitGSM( bool bInhibit, const char* appname, const char* reason, const unsigned int xid );
- void inhibitMSM( bool bInhibit, const char* appname, const char* reason, const unsigned int xid );
+ void inhibitFDO(bool bInhibit, const char* appname, const char* reason);
+ void inhibitFDOPM(bool bInhibit, const char* appname, const char* reason);
+ void inhibitGSM(bool bInhibit, const char* appname, const char* reason, const unsigned int xid);
+ void inhibitMSM(bool bInhibit, const char* appname, const char* reason, const unsigned int xid);
- void inhibitXScreenSaver( bool bInhibit, Display* pDisplay );
- static void inhibitXAutoLock( bool bInhibit, Display* pDisplay );
- void inhibitDPMS( bool bInhibit, Display* pDisplay );
+ void inhibitXScreenSaver(bool bInhibit, Display* pDisplay);
+ static void inhibitXAutoLock(bool bInhibit, Display* pDisplay);
+ void inhibitDPMS(bool bInhibit, Display* pDisplay);
};
#endif // INCLUDED_VCL_INC_UNX_SCREENSAVERINHIBITOR_HXX
diff --git a/vcl/inc/unx/x11/x11gdiimpl.h b/vcl/inc/unx/x11/x11gdiimpl.h
index 342da0907517..43e4c6bda99e 100644
--- a/vcl/inc/unx/x11/x11gdiimpl.h
+++ b/vcl/inc/unx/x11/x11gdiimpl.h
@@ -17,8 +17,8 @@ class ControlCacheKey;
class X11GraphicsImpl
{
public:
- virtual ~X11GraphicsImpl() {};
- virtual void Flush() {};
+ virtual ~X11GraphicsImpl(){};
+ virtual void Flush(){};
};
#endif // INCLUDED_VCL_INC_UNX_X11_X11GDIIMPL_HXX
diff --git a/vcl/inc/unx/x11_cursors/wshide_curs.h b/vcl/inc/unx/x11_cursors/wshide_curs.h
index e8fd2723024c..8f6d81541520 100644
--- a/vcl/inc/unx/x11_cursors/wshide_curs.h
+++ b/vcl/inc/unx/x11_cursors/wshide_curs.h
@@ -22,8 +22,8 @@
#define hidewhitespace_curs_x_hot 0
#define hidewhitespace_curs_y_hot 10
static unsigned char hidewhitespace_curs_bits[] = {
- 0x00, 0x01, 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01, 0xFF, 0xFF,
- 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0x01,
- 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0x00, 0x01, };
+ 0x00, 0x01, 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01, 0xFF, 0xFF, 0x01, 0x80, 0x01, 0x80,
+ 0x01, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0x00, 0x01,
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/x11_cursors/wshide_mask.h b/vcl/inc/unx/x11_cursors/wshide_mask.h
index 8547baa25183..50bd0c3f023f 100644
--- a/vcl/inc/unx/x11_cursors/wshide_mask.h
+++ b/vcl/inc/unx/x11_cursors/wshide_mask.h
@@ -22,8 +22,8 @@
#define hidewhitespace_mask_x_hot 0
#define hidewhitespace_mask_y_hot 10
static unsigned char hidewhitespace_mask_bits[] = {
- 0x00, 0x01, 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01, 0xFF, 0xFF,
- 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0x01,
- 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0x00, 0x01, };
+ 0x00, 0x01, 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01, 0xFF, 0xFF, 0x01, 0x80, 0x01, 0x80,
+ 0x01, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0x00, 0x01,
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/x11_cursors/wsshow_curs.h b/vcl/inc/unx/x11_cursors/wsshow_curs.h
index 56b705e69796..8b30f6e8f4fb 100644
--- a/vcl/inc/unx/x11_cursors/wsshow_curs.h
+++ b/vcl/inc/unx/x11_cursors/wsshow_curs.h
@@ -22,8 +22,8 @@
#define showwhitespace_curs_x_hot 0
#define showwhitespace_curs_y_hot 10
static unsigned char showwhitespace_curs_bits[] = {
- 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0xFF, 0xFF, 0x01, 0x81,
- 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0xFF, 0xFF,
- 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01, };
+ 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0xFF, 0xFF, 0x01, 0x81, 0x01, 0x81, 0x01, 0x81,
+ 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0xFF, 0xFF, 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01,
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/x11_cursors/wsshow_mask.h b/vcl/inc/unx/x11_cursors/wsshow_mask.h
index 2da7aea99094..bba14181d8e6 100644
--- a/vcl/inc/unx/x11_cursors/wsshow_mask.h
+++ b/vcl/inc/unx/x11_cursors/wsshow_mask.h
@@ -22,8 +22,8 @@
#define showwhitespace_mask_x_hot 0
#define showwhitespace_mask_y_hot 10
static unsigned char showwhitespace_mask_bits[] = {
- 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0xFF, 0xFF, 0x01, 0x81,
- 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0xFF, 0xFF,
- 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01, };
+ 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0x00, 0x01, 0xFF, 0xFF, 0x01, 0x81, 0x01, 0x81, 0x01, 0x81,
+ 0x01, 0x81, 0x01, 0x81, 0x01, 0x81, 0xFF, 0xFF, 0x00, 0x01, 0xC0, 0x07, 0x80, 0x03, 0x00, 0x01,
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcleventlisteners.hxx b/vcl/inc/vcleventlisteners.hxx
index a733499065f6..47a84e3b80bc 100644
--- a/vcl/inc/vcleventlisteners.hxx
+++ b/vcl/inc/vcleventlisteners.hxx
@@ -25,11 +25,12 @@
class VclEventListeners
{
public:
- void Call( VclSimpleEvent& rEvent ) const;
- void addListener( const Link<VclSimpleEvent&,void>& rListener );
- void removeListener( const Link<VclSimpleEvent&,void>& rListener );
+ void Call(VclSimpleEvent& rEvent) const;
+ void addListener(const Link<VclSimpleEvent&, void>& rListener);
+ void removeListener(const Link<VclSimpleEvent&, void>& rListener);
+
private:
- std::vector<Link<VclSimpleEvent&,void>> m_aListeners;
+ std::vector<Link<VclSimpleEvent&, void>> m_aListeners;
};
#endif // INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
diff --git a/vcl/opengl/DeviceInfo.cxx b/vcl/opengl/DeviceInfo.cxx
index 24f42e34e481..f4bce64a88d8 100644
--- a/vcl/opengl/DeviceInfo.cxx
+++ b/vcl/opengl/DeviceInfo.cxx
@@ -9,8 +9,6 @@
#include <opengl/DeviceInfo.hxx>
-OpenGLDeviceInfo::~OpenGLDeviceInfo()
-{
-}
+OpenGLDeviceInfo::~OpenGLDeviceInfo() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/DragActionConversion.cxx b/vcl/osx/DragActionConversion.cxx
index 3af6cd010a3f..d44c3384a6fc 100644
--- a/vcl/osx/DragActionConversion.cxx
+++ b/vcl/osx/DragActionConversion.cxx
@@ -28,24 +28,24 @@ using namespace com::sun::star::datatransfer::dnd;
*/
unsigned int OfficeToSystemDragActions(sal_Int8 dragActions)
{
- unsigned int actions = NSDragOperationNone;
+ unsigned int actions = NSDragOperationNone;
- if (dragActions & DNDConstants::ACTION_COPY)
+ if (dragActions & DNDConstants::ACTION_COPY)
{
- actions |= NSDragOperationCopy;
+ actions |= NSDragOperationCopy;
}
- if (dragActions & DNDConstants::ACTION_MOVE)
+ if (dragActions & DNDConstants::ACTION_MOVE)
{
- actions |= NSDragOperationMove;
+ actions |= NSDragOperationMove;
}
- if (dragActions & DNDConstants::ACTION_LINK)
+ if (dragActions & DNDConstants::ACTION_LINK)
{
- actions |= NSDragOperationLink;
+ actions |= NSDragOperationLink;
}
- return actions;
+ return actions;
}
/* Convert system conform drag actions into office conform
@@ -54,31 +54,31 @@ unsigned int OfficeToSystemDragActions(sal_Int8 dragActions)
*/
sal_Int8 SystemToOfficeDragActions(unsigned int dragActions)
{
- sal_Int8 actions = DNDConstants::ACTION_NONE;
+ sal_Int8 actions = DNDConstants::ACTION_NONE;
- if (dragActions & NSDragOperationCopy)
+ if (dragActions & NSDragOperationCopy)
{
- actions |= DNDConstants::ACTION_COPY;
+ actions |= DNDConstants::ACTION_COPY;
}
- if (dragActions & NSDragOperationMove)
+ if (dragActions & NSDragOperationMove)
{
- actions |= DNDConstants::ACTION_MOVE;
+ actions |= DNDConstants::ACTION_MOVE;
}
- if (dragActions & NSDragOperationLink)
+ if (dragActions & NSDragOperationLink)
{
- actions |= DNDConstants::ACTION_LINK;
+ actions |= DNDConstants::ACTION_LINK;
}
- // We map NSDragOperationGeneric to ACTION_DEFAULT to
- // signal that we have to decide for a drag action
- if (dragActions & NSDragOperationGeneric)
+ // We map NSDragOperationGeneric to ACTION_DEFAULT to
+ // signal that we have to decide for a drag action
+ if (dragActions & NSDragOperationGeneric)
{
- actions |= DNDConstants::ACTION_DEFAULT;
+ actions |= DNDConstants::ACTION_DEFAULT;
}
- return actions;
+ return actions;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/PictToBmpFlt.hxx b/vcl/osx/PictToBmpFlt.hxx
index 027bd178bc3a..e0e111818d99 100644
--- a/vcl/osx/PictToBmpFlt.hxx
+++ b/vcl/osx/PictToBmpFlt.hxx
@@ -26,12 +26,11 @@
#include <Cocoa/Cocoa.h>
#include <postmac.h>
-bool ImageToPNG( css::uno::Sequence<sal_Int8> const & rImgData,
- css::uno::Sequence<sal_Int8>& rPngData);
+bool ImageToPNG(css::uno::Sequence<sal_Int8> const& rImgData,
+ css::uno::Sequence<sal_Int8>& rPngData);
-bool PNGToImage( css::uno::Sequence<sal_Int8> const & rPngData,
- css::uno::Sequence<sal_Int8>& rImgData,
- NSBitmapImageFileType eOutFormat);
+bool PNGToImage(css::uno::Sequence<sal_Int8> const& rPngData,
+ css::uno::Sequence<sal_Int8>& rImgData, NSBitmapImageFileType eOutFormat);
#endif // INCLUDED_VCL_OSX_PICTTOBMPFLT_HXX
diff --git a/vcl/osx/a11yactionwrapper.h b/vcl/osx/a11yactionwrapper.h
index 20b2bad1b4af..51da8a2caf38 100644
--- a/vcl/osx/a11yactionwrapper.h
+++ b/vcl/osx/a11yactionwrapper.h
@@ -26,8 +26,8 @@
@interface AquaA11yActionWrapper : NSObject
{
}
-+(NSArray *)actionNamesForElement:(AquaA11yWrapper *)wrapper;
-+(void)doAction:(NSString *)action ofElement:(AquaA11yWrapper *)wrapper;
++ (NSArray*)actionNamesForElement:(AquaA11yWrapper*)wrapper;
++ (void)doAction:(NSString*)action ofElement:(AquaA11yWrapper*)wrapper;
@end
#endif // INCLUDED_VCL_OSX_A11YACTIONWRAPPER_H
diff --git a/vcl/osx/a11ycomponentwrapper.h b/vcl/osx/a11ycomponentwrapper.h
index 92c6b1b493fd..3d8b16929279 100644
--- a/vcl/osx/a11ycomponentwrapper.h
+++ b/vcl/osx/a11ycomponentwrapper.h
@@ -26,12 +26,12 @@
@interface AquaA11yComponentWrapper : NSObject
{
}
-+(id)sizeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)positionAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)descriptionAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setFocusedAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
++ (id)sizeAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)positionAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)descriptionAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (void)addAttributeNamesTo:(NSMutableArray*)attributeNames;
++ (BOOL)isAttributeSettable:(NSString*)attribute forElement:(AquaA11yWrapper*)wrapper;
++ (void)setFocusedAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
@end
#endif // INCLUDED_VCL_OSX_A11YCOMPONENTWRAPPER_H
diff --git a/vcl/osx/a11yfocuslistener.hxx b/vcl/osx/a11yfocuslistener.hxx
index 44a25cce0b8f..fdd28ac230c2 100644
--- a/vcl/osx/a11yfocuslistener.hxx
+++ b/vcl/osx/a11yfocuslistener.hxx
@@ -27,18 +27,19 @@ class AquaA11yFocusListener : public KeyboardFocusListener
{
id m_focusedObject;
- static rtl::Reference< AquaA11yFocusListener > theListener;
+ static rtl::Reference<AquaA11yFocusListener> theListener;
AquaA11yFocusListener();
- virtual ~AquaA11yFocusListener() override {};
-public:
+ virtual ~AquaA11yFocusListener() override{};
- static rtl::Reference< AquaA11yFocusListener > const & get();
+public:
+ static rtl::Reference<AquaA11yFocusListener> const& get();
id getFocusedUIElement();
// KeyboardFocusListener
- virtual void focusedObjectChanged(const css::uno::Reference< css::accessibility::XAccessible >& xAccessible) override;
+ virtual void focusedObjectChanged(
+ const css::uno::Reference<css::accessibility::XAccessible>& xAccessible) override;
};
#endif // INCLUDED_VCL_OSX_A11YFOCUSLISTENER_HXX
diff --git a/vcl/osx/a11yselectionwrapper.h b/vcl/osx/a11yselectionwrapper.h
index 923737b652c7..880281a114ed 100644
--- a/vcl/osx/a11yselectionwrapper.h
+++ b/vcl/osx/a11yselectionwrapper.h
@@ -26,10 +26,10 @@
@interface AquaA11ySelectionWrapper : NSObject
{
}
-+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setSelectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
++ (id)selectedChildrenAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (void)addAttributeNamesTo:(NSMutableArray*)attributeNames;
++ (BOOL)isAttributeSettable:(NSString*)attribute forElement:(AquaA11yWrapper*)wrapper;
++ (void)setSelectedChildrenAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
@end
#endif // INCLUDED_VCL_OSX_A11YSELECTIONWRAPPER_H
diff --git a/vcl/osx/a11ytablewrapper.h b/vcl/osx/a11ytablewrapper.h
index 450a829c12f3..ae2c454a81f0 100644
--- a/vcl/osx/a11ytablewrapper.h
+++ b/vcl/osx/a11ytablewrapper.h
@@ -27,11 +27,11 @@
@interface AquaA11yTableWrapper : AquaA11yWrapper
{
}
-+(id)childrenAttributeForElement:(AquaA11yTableWrapper *)wrapper;
-+(void)addAttributeNamesTo: (NSMutableArray *)attributeNames object: (AquaA11yWrapper*)pObject;
++ (id)childrenAttributeForElement:(AquaA11yTableWrapper*)wrapper;
++ (void)addAttributeNamesTo:(NSMutableArray*)attributeNames object:(AquaA11yWrapper*)pObject;
--(id)rowsAttribute;
--(id)columnsAttribute;
+- (id)rowsAttribute;
+- (id)columnsAttribute;
@end
#endif // INCLUDED_VCL_OSX_A11YTABLEWRAPPER_H
diff --git a/vcl/osx/a11ytextwrapper.h b/vcl/osx/a11ytextwrapper.h
index 5d2154ff6298..356f664fbfa8 100644
--- a/vcl/osx/a11ytextwrapper.h
+++ b/vcl/osx/a11ytextwrapper.h
@@ -26,31 +26,31 @@
@interface AquaA11yTextWrapper : NSObject
{
}
-+(id)valueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)numberOfCharactersAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)selectedTextAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)selectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)visibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)sharedTextUIElementsAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)sharedCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)stringForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)attributedStringForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)rangeForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index;
-+(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point;
-+(id)boundsForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)styleRangeForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index;
-+(id)rTFForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)lineForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index;
-+(id)rangeForLineAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)line;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(void)addParameterizedAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(NSArray *)specialAttributeNames;
-+(NSArray *)specialParameterizedAttributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-+(void)setSelectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-+(void)setSelectedTextAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
++ (id)valueAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)numberOfCharactersAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)selectedTextAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)selectedTextRangeAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)visibleCharacterRangeAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)sharedTextUIElementsAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)sharedCharacterRangeAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)stringForRangeAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)range;
++ (id)attributedStringForRangeAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)range;
++ (id)rangeForIndexAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)index;
++ (id)rangeForPositionAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)point;
++ (id)boundsForRangeAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)range;
++ (id)styleRangeForIndexAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)index;
++ (id)rTFForRangeAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)range;
++ (id)lineForIndexAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)index;
++ (id)rangeForLineAttributeForElement:(AquaA11yWrapper*)wrapper forParameter:(id)line;
++ (void)addAttributeNamesTo:(NSMutableArray*)attributeNames;
++ (void)addParameterizedAttributeNamesTo:(NSMutableArray*)attributeNames;
++ (NSArray*)specialAttributeNames;
++ (NSArray*)specialParameterizedAttributeNames;
++ (BOOL)isAttributeSettable:(NSString*)attribute forElement:(AquaA11yWrapper*)wrapper;
++ (void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
++ (void)setSelectedTextRangeAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
++ (void)setSelectedTextAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
++ (void)setValueAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
@end
#endif // INCLUDED_VCL_OSX_A11YTEXTWRAPPER_H
diff --git a/vcl/osx/a11yutil.h b/vcl/osx/a11yutil.h
index 56778e76dd80..7edf60b292a5 100644
--- a/vcl/osx/a11yutil.h
+++ b/vcl/osx/a11yutil.h
@@ -22,10 +22,11 @@
#include <com/sun/star/awt/Point.hpp>
-@interface AquaA11yUtil : NSObject {
+@interface AquaA11yUtil : NSObject
+{
}
-+(NSValue *)vclPointToNSPoint:(css::awt::Point)vclPoint;
-+(css::awt::Point)nsPointToVclPoint:(NSValue *)nsPoint;
++ (NSValue*)vclPointToNSPoint:(css::awt::Point)vclPoint;
++ (css::awt::Point)nsPointToVclPoint:(NSValue*)nsPoint;
@end
#endif // INCLUDED_VCL_OSX_A11YUTIL_H
diff --git a/vcl/osx/a11yvaluewrapper.h b/vcl/osx/a11yvaluewrapper.h
index b4db1de964ab..686006b94800 100644
--- a/vcl/osx/a11yvaluewrapper.h
+++ b/vcl/osx/a11yvaluewrapper.h
@@ -27,12 +27,12 @@
@interface AquaA11yValueWrapper : NSObject
{
}
-+(id)valueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)minValueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)maxValueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
++ (id)valueAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)minValueAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (id)maxValueAttributeForElement:(AquaA11yWrapper*)wrapper;
++ (void)addAttributeNamesTo:(NSMutableArray*)attributeNames;
++ (BOOL)isAttributeSettable:(NSString*)attribute forElement:(AquaA11yWrapper*)wrapper;
++ (void)setValueAttributeForElement:(AquaA11yWrapper*)wrapper to:(id)value;
@end
#endif // INCLUDED_VCL_OSX_A11YVALUEWRAPPER_H
diff --git a/vcl/osx/a11ywrapperbutton.h b/vcl/osx/a11ywrapperbutton.h
index 23103cd92b98..7105d160bf6c 100644
--- a/vcl/osx/a11ywrapperbutton.h
+++ b/vcl/osx/a11ywrapperbutton.h
@@ -25,9 +25,9 @@
@interface AquaA11yWrapperButton : AquaA11yWrapper
{
}
--(id)valueAttribute;
--(id)descriptionAttribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)valueAttribute;
+- (id)descriptionAttribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERBUTTON_H
diff --git a/vcl/osx/a11ywrappercheckbox.h b/vcl/osx/a11ywrappercheckbox.h
index 6f20a888b271..80c37b1dcaad 100644
--- a/vcl/osx/a11ywrappercheckbox.h
+++ b/vcl/osx/a11ywrappercheckbox.h
@@ -25,9 +25,9 @@
@interface AquaA11yWrapperCheckBox : AquaA11yWrapper
{
}
--(id)valueAttribute;
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)valueAttribute;
+- (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERCHECKBOX_H
diff --git a/vcl/osx/a11ywrappercombobox.h b/vcl/osx/a11ywrappercombobox.h
index 7995f06b69fd..1df25fbbe184 100644
--- a/vcl/osx/a11ywrappercombobox.h
+++ b/vcl/osx/a11ywrappercombobox.h
@@ -25,18 +25,19 @@
@interface AquaA11yWrapperComboBox : AquaA11yWrapper
{
- AquaA11yWrapper * textArea;
+ AquaA11yWrapper* textArea;
}
--(id)initWithAccessibleContext: (css::uno::Reference < css::accessibility::XAccessibleContext >) anAccessibleContext;
--(id)valueAttribute;
--(id)numberOfCharactersAttribute;
--(id)selectedTextAttribute;
--(id)selectedTextRangeAttribute;
--(id)visibleCharacterRangeAttribute;
+- (id)initWithAccessibleContext:
+ (css::uno::Reference<css::accessibility::XAccessibleContext>)anAccessibleContext;
+- (id)valueAttribute;
+- (id)numberOfCharactersAttribute;
+- (id)selectedTextAttribute;
+- (id)selectedTextRangeAttribute;
+- (id)visibleCharacterRangeAttribute;
// Accessibility Protocol
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
--(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute;
--(NSArray *)accessibilityAttributeNames;
+- (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;
+- (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERCOMBOBOX_H
diff --git a/vcl/osx/a11ywrappergroup.h b/vcl/osx/a11ywrappergroup.h
index 5309c155b1c4..ece809a84d57 100644
--- a/vcl/osx/a11ywrappergroup.h
+++ b/vcl/osx/a11ywrappergroup.h
@@ -25,8 +25,8 @@
@interface AquaA11yWrapperGroup : AquaA11yWrapper
{
}
--(id)titleUIElementAttribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)titleUIElementAttribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERGROUP_H
diff --git a/vcl/osx/a11ywrapperlist.h b/vcl/osx/a11ywrapperlist.h
index 8864555f283e..d13101c584aa 100644
--- a/vcl/osx/a11ywrapperlist.h
+++ b/vcl/osx/a11ywrapperlist.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperList : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERLIST_H
diff --git a/vcl/osx/a11ywrapperradiobutton.h b/vcl/osx/a11ywrapperradiobutton.h
index ec8999f36035..11f94b033cc9 100644
--- a/vcl/osx/a11ywrapperradiobutton.h
+++ b/vcl/osx/a11ywrapperradiobutton.h
@@ -25,9 +25,9 @@
@interface AquaA11yWrapperRadioButton : AquaA11yWrapper
{
}
--(id)valueAttribute;
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)valueAttribute;
+- (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERRADIOBUTTON_H
diff --git a/vcl/osx/a11ywrapperradiogroup.h b/vcl/osx/a11ywrapperradiogroup.h
index 98e5a5cf5789..6c576c866513 100644
--- a/vcl/osx/a11ywrapperradiogroup.h
+++ b/vcl/osx/a11ywrapperradiogroup.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperRadioGroup : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERRADIOGROUP_H
diff --git a/vcl/osx/a11ywrapperrow.h b/vcl/osx/a11ywrapperrow.h
index 00e32f4dfdb4..ebf6ae0bb5fa 100644
--- a/vcl/osx/a11ywrapperrow.h
+++ b/vcl/osx/a11ywrapperrow.h
@@ -25,8 +25,8 @@
@interface AquaA11yWrapperRow : AquaA11yWrapper
{
}
--(id)disclosingAttribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)disclosingAttribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERROW_H
diff --git a/vcl/osx/a11ywrapperscrollarea.h b/vcl/osx/a11ywrapperscrollarea.h
index c1556f9a9c19..3eaf1dc42ad1 100644
--- a/vcl/osx/a11ywrapperscrollarea.h
+++ b/vcl/osx/a11ywrapperscrollarea.h
@@ -25,9 +25,9 @@
@interface AquaA11yWrapperScrollArea : AquaA11yWrapper
{
}
--(id)verticalScrollBarAttribute;
--(id)horizontalScrollBarAttribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)verticalScrollBarAttribute;
+- (id)horizontalScrollBarAttribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERSCROLLAREA_H
diff --git a/vcl/osx/a11ywrapperscrollbar.h b/vcl/osx/a11ywrapperscrollbar.h
index 88beceb4f1cd..e05ab3cccaf4 100644
--- a/vcl/osx/a11ywrapperscrollbar.h
+++ b/vcl/osx/a11ywrapperscrollbar.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperScrollBar : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERSCROLLBAR_H
diff --git a/vcl/osx/a11ywrappersplitter.h b/vcl/osx/a11ywrappersplitter.h
index 22397e869488..60774c258622 100644
--- a/vcl/osx/a11ywrappersplitter.h
+++ b/vcl/osx/a11ywrappersplitter.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperSplitter : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERSPLITTER_H
diff --git a/vcl/osx/a11ywrapperstatictext.h b/vcl/osx/a11ywrapperstatictext.h
index c02a1f3b82a4..d3fcd3536d6c 100644
--- a/vcl/osx/a11ywrapperstatictext.h
+++ b/vcl/osx/a11ywrapperstatictext.h
@@ -25,8 +25,8 @@
@interface AquaA11yWrapperStaticText : AquaA11yWrapper
{
}
--(id)titleAttribute;
--(NSArray *)accessibilityAttributeNames;
+- (id)titleAttribute;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERSTATICTEXT_H
diff --git a/vcl/osx/a11ywrappertabgroup.h b/vcl/osx/a11ywrappertabgroup.h
index 38c12ed21afb..c38b1d34ac1c 100644
--- a/vcl/osx/a11ywrappertabgroup.h
+++ b/vcl/osx/a11ywrappertabgroup.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperTabGroup : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERTABGROUP_H
diff --git a/vcl/osx/a11ywrappertextarea.h b/vcl/osx/a11ywrappertextarea.h
index 325284973eac..f32862a769ce 100644
--- a/vcl/osx/a11ywrappertextarea.h
+++ b/vcl/osx/a11ywrappertextarea.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperTextArea : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERTEXTAREA_H
diff --git a/vcl/osx/a11ywrappertoolbar.h b/vcl/osx/a11ywrappertoolbar.h
index d8871a507879..2d61822900c5 100644
--- a/vcl/osx/a11ywrappertoolbar.h
+++ b/vcl/osx/a11ywrappertoolbar.h
@@ -25,7 +25,7 @@
@interface AquaA11yWrapperToolbar : AquaA11yWrapper
{
}
--(NSArray *)accessibilityAttributeNames;
+- (NSArray*)accessibilityAttributeNames;
@end
#endif // INCLUDED_VCL_OSX_A11YWRAPPERTOOLBAR_H
diff --git a/vcl/qa/cppunit/BitmapProcessorTest.cxx b/vcl/qa/cppunit/BitmapProcessorTest.cxx
index 2a628285d0f2..e7793cf0a67f 100644
--- a/vcl/qa/cppunit/BitmapProcessorTest.cxx
+++ b/vcl/qa/cppunit/BitmapProcessorTest.cxx
@@ -21,7 +21,6 @@
namespace
{
-
class BitmapProcessorTest : public CppUnit::TestFixture
{
void testDisabledImage();
diff --git a/vcl/qa/cppunit/fontcharmap.cxx b/vcl/qa/cppunit/fontcharmap.cxx
index b9d0d8c2179f..26a2fe9a0a0d 100644
--- a/vcl/qa/cppunit/fontcharmap.cxx
+++ b/vcl/qa/cppunit/fontcharmap.cxx
@@ -14,7 +14,10 @@
class VclFontCharMapTest : public test::BootstrapFixture
{
public:
- VclFontCharMapTest() : BootstrapFixture(true, false) {}
+ VclFontCharMapTest()
+ : BootstrapFixture(true, false)
+ {
+ }
void testDefaultFontCharMap();
@@ -25,9 +28,9 @@ public:
void VclFontCharMapTest::testDefaultFontCharMap()
{
- FontCharMapRef xfcmap( new FontCharMap() ); // gets default map
+ FontCharMapRef xfcmap(new FontCharMap()); // gets default map
- CPPUNIT_ASSERT( xfcmap->IsDefaultMap() );
+ CPPUNIT_ASSERT(xfcmap->IsDefaultMap());
sal_uInt32 nStartBMPPlane = xfcmap->GetFirstChar();
sal_uInt32 nStartSupBMPPlane = xfcmap->GetNextChar(0xD800);
@@ -35,7 +38,7 @@ void VclFontCharMapTest::testDefaultFontCharMap()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0x0020), nStartBMPPlane);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0xE000), nStartSupBMPPlane);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0xFFF0-1), nEndBMPPlane);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0xFFF0 - 1), nEndBMPPlane);
}
CPPUNIT_TEST_SUITE_REGISTRATION(VclFontCharMapTest);
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 3dd113a5ccd2..78124beef5f3 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -38,24 +38,25 @@ public:
static int deltaColor(BitmapColor aColor1, BitmapColor aColor2)
{
- int deltaR = std::abs(aColor1.GetRed() - aColor2.GetRed());
+ int deltaR = std::abs(aColor1.GetRed() - aColor2.GetRed());
int deltaG = std::abs(aColor1.GetGreen() - aColor2.GetGreen());
- int deltaB = std::abs(aColor1.GetBlue() - aColor2.GetBlue());
+ int deltaB = std::abs(aColor1.GetBlue() - aColor2.GetBlue());
return std::max(std::max(deltaR, deltaG), deltaB);
}
-static bool checkRect(Bitmap& rBitmap, int aLayerNumber, tools::Long nAreaHeight, tools::Long nAreaWidth, Color aExpectedColor, int nMaxDelta)
+static bool checkRect(Bitmap& rBitmap, int aLayerNumber, tools::Long nAreaHeight,
+ tools::Long nAreaWidth, Color aExpectedColor, int nMaxDelta)
{
BitmapScopedWriteAccess pAccess(rBitmap);
- tools::Long nWidth = std::min(nAreaWidth, pAccess->Width());
+ tools::Long nWidth = std::min(nAreaWidth, pAccess->Width());
tools::Long nHeight = std::min(nAreaHeight, pAccess->Height());
tools::Long firstX = 0 + aLayerNumber;
tools::Long firstY = 0 + aLayerNumber;
- tools::Long lastX = nWidth - 1 - aLayerNumber;
+ tools::Long lastX = nWidth - 1 - aLayerNumber;
tools::Long lastY = nHeight - 1 - aLayerNumber;
int delta;
@@ -79,7 +80,7 @@ static bool checkRect(Bitmap& rBitmap, int aLayerNumber, tools::Long nAreaHeight
if (delta > nMaxDelta)
return false;
- Color aColorLast = pAccess->GetPixel(lastY, x);
+ Color aColorLast = pAccess->GetPixel(lastY, x);
delta = deltaColor(aColorLast, aExpectedColor);
if (delta > nMaxDelta)
return false;
@@ -132,7 +133,8 @@ void JpegReaderTest::testReadGray()
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
- aBitmap.Convert(BmpConversion::N24Bit); // convert to 24bit so we don't need to deal with palette
+ aBitmap.Convert(
+ BmpConversion::N24Bit); // convert to 24bit so we don't need to deal with palette
int nMaxDelta = 1;
CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), nMaxDelta));
diff --git a/vcl/qa/cppunit/mnemonic.cxx b/vcl/qa/cppunit/mnemonic.cxx
index e870e1d29c98..59456503b54f 100644
--- a/vcl/qa/cppunit/mnemonic.cxx
+++ b/vcl/qa/cppunit/mnemonic.cxx
@@ -18,7 +18,10 @@
class VclMnemonicTest : public test::BootstrapFixture
{
public:
- VclMnemonicTest() : BootstrapFixture(true, false) {}
+ VclMnemonicTest()
+ : BootstrapFixture(true, false)
+ {
+ }
void testMnemonic();
@@ -47,7 +50,6 @@ void VclMnemonicTest::testMnemonic()
OUString sResult = aGenerator.CreateMnemonic(OUString(TEST, SAL_N_ELEMENTS(TEST)));
CPPUNIT_ASSERT_EQUAL(OUString("(~C)"), sResult.copy(sResult.getLength() - 4));
}
-
}
CPPUNIT_TEST_SUITE_REGISTRATION(VclMnemonicTest);
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index e99a35f67adf..97ec62096ce9 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -24,7 +24,10 @@
class VclOutdevTest : public test::BootstrapFixture
{
public:
- VclOutdevTest() : BootstrapFixture(true, false) {}
+ VclOutdevTest()
+ : BootstrapFixture(true, false)
+ {
+ }
void testVirtualDevice();
void testUseAfterDispose();
@@ -80,20 +83,20 @@ void VclOutdevTest::testWindowBackgroundColor()
void VclOutdevTest::testVirtualDevice()
{
- ScopedVclPtrInstance< VirtualDevice > pVDev;
- pVDev->SetOutputSizePixel(Size(32,32));
+ ScopedVclPtrInstance<VirtualDevice> pVDev;
+ pVDev->SetOutputSizePixel(Size(32, 32));
pVDev->SetBackground(Wallpaper(COL_WHITE));
CPPUNIT_ASSERT_EQUAL(pVDev->GetBackgroundColor(), COL_WHITE);
pVDev->Erase();
- pVDev->DrawPixel(Point(1,2),COL_BLUE);
- pVDev->DrawPixel(Point(31,30),COL_RED);
+ pVDev->DrawPixel(Point(1, 2), COL_BLUE);
+ pVDev->DrawPixel(Point(31, 30), COL_RED);
Size aSize = pVDev->GetOutputSizePixel();
- CPPUNIT_ASSERT_EQUAL(Size(32,32), aSize);
+ CPPUNIT_ASSERT_EQUAL(Size(32, 32), aSize);
- Bitmap aBmp = pVDev->GetBitmap(Point(),aSize);
+ Bitmap aBmp = pVDev->GetBitmap(Point(), aSize);
#if 0
OUString rFileName("/tmp/foo-unx.png");
@@ -107,21 +110,21 @@ void VclOutdevTest::testVirtualDevice()
}
#endif
- CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(0,0)));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(0, 0)));
#if !defined _WIN32 //TODO: various failures on Windows tinderboxes
- CPPUNIT_ASSERT_EQUAL(COL_BLUE, pVDev->GetPixel(Point(1,2)));
- CPPUNIT_ASSERT_EQUAL(COL_RED, pVDev->GetPixel(Point(31,30)));
+ CPPUNIT_ASSERT_EQUAL(COL_BLUE, pVDev->GetPixel(Point(1, 2)));
+ CPPUNIT_ASSERT_EQUAL(COL_RED, pVDev->GetPixel(Point(31, 30)));
#endif
- CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(30,31)));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(30, 31)));
// Gotcha: y and x swap for BitmapReadAccess: deep joy.
Bitmap::ScopedReadAccess pAcc(aBmp);
- CPPUNIT_ASSERT_EQUAL(COL_WHITE, static_cast<Color>(pAcc->GetPixel(0,0)));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, static_cast<Color>(pAcc->GetPixel(0, 0)));
#if !defined _WIN32 //TODO: various failures on Windows tinderboxes
- CPPUNIT_ASSERT_EQUAL(COL_BLUE, static_cast<Color>(pAcc->GetPixel(2,1)));
- CPPUNIT_ASSERT_EQUAL(COL_RED, static_cast<Color>(pAcc->GetPixel(30,31)));
+ CPPUNIT_ASSERT_EQUAL(COL_BLUE, static_cast<Color>(pAcc->GetPixel(2, 1)));
+ CPPUNIT_ASSERT_EQUAL(COL_RED, static_cast<Color>(pAcc->GetPixel(30, 31)));
#endif
- CPPUNIT_ASSERT_EQUAL(COL_WHITE, static_cast<Color>(pAcc->GetPixel(31,30)));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, static_cast<Color>(pAcc->GetPixel(31, 30)));
#if 0
VclPtr<vcl::Window> pWin = VclPtr<WorkWindow>::Create( (vcl::Window *)nullptr );
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index c99f12cafd07..92d5bcb22bd0 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -59,7 +59,6 @@ static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
namespace
{
-
/// Tests the PDF export filter.
class PdfExportTest : public test::BootstrapFixture, public unotest::MacrosTest
{
@@ -68,7 +67,8 @@ protected:
utl::TempFile maTempFile;
SvMemoryStream maMemory;
// Export the document as PDF, then parse it with PDFium.
- std::unique_ptr<vcl::pdf::PDFiumDocument> exportAndParse(const OUString& rURL, const utl::MediaDescriptor& rDescriptor);
+ std::unique_ptr<vcl::pdf::PDFiumDocument>
+ exportAndParse(const OUString& rURL, const utl::MediaDescriptor& rDescriptor);
std::shared_ptr<vcl::pdf::PDFium> mpPDFium;
public:
@@ -79,12 +79,10 @@ public:
void load(const OUString& rFile, vcl::filter::PDFDocument& rDocument);
};
-PdfExportTest::PdfExportTest()
-{
- maTempFile.EnableKillingFile();
-}
+PdfExportTest::PdfExportTest() { maTempFile.EnableKillingFile(); }
-std::unique_ptr<vcl::pdf::PDFiumDocument> PdfExportTest::exportAndParse(const OUString& rURL, const utl::MediaDescriptor& rDescriptor)
+std::unique_ptr<vcl::pdf::PDFiumDocument>
+PdfExportTest::exportAndParse(const OUString& rURL, const utl::MediaDescriptor& rDescriptor)
{
// Import the bugdoc and export as PDF.
mxComponent = loadFromDesktop(rURL);
@@ -156,9 +154,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106059)
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
// Explicitly enable the usage of the reference XObject markup.
- uno::Sequence<beans::PropertyValue> aFilterData( comphelper::InitPropertySequence({
- {"UseReferenceXObject", uno::Any(true) }
- }));
+ uno::Sequence<beans::PropertyValue> aFilterData(
+ comphelper::InitPropertySequence({ { "UseReferenceXObject", uno::Any(true) } }));
aMediaDescriptor["FilterData"] <<= aFilterData;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
@@ -173,11 +170,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106059)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
// The page has one image.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pReferenceXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pReferenceXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pReferenceXObject);
// The image is a reference XObject.
// This dictionary key was missing, so the XObject wasn't a reference one.
@@ -196,11 +195,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106693)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
// The page has one image.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
// The image is a form XObject.
auto pSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pXObject->Lookup("Subtype"));
@@ -211,14 +212,18 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106693)
// Assert that the form object refers to an inner form object, not a
// bitmap.
- auto pInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
+ auto pInnerResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pInnerResources);
- auto pInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerResources->LookupElement("XObject"));
+ auto pInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pInnerXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pInnerXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pInnerXObject = pInnerXObjects->LookupObject(pInnerXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pInnerXObject
+ = pInnerXObjects->LookupObject(pInnerXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pInnerXObject);
- auto pInnerSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pInnerXObject->Lookup("Subtype"));
+ auto pInnerSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pInnerXObject->Lookup("Subtype"));
CPPUNIT_ASSERT(pInnerSubtype);
// This failed: this was Image (bitmap), not Form (vector).
CPPUNIT_ASSERT_EQUAL(OString("Form"), pInnerSubtype->GetValue());
@@ -270,8 +275,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105461)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107868)
{
- // No need to run it on Windows, since it would use GDI printing, and not trigger PDF export
- // which is the intent of the test.
+// No need to run it on Windows, since it would use GDI printing, and not trigger PDF export
+// which is the intent of the test.
// FIXME: Why does this fail on macOS?
#if !defined MACOSX && !defined _WIN32
@@ -284,10 +289,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107868)
uno::Reference<view::XPrintable> xPrintable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xPrintable.is());
uno::Sequence<beans::PropertyValue> aOptions(comphelper::InitPropertySequence(
- {
- {"FileName", uno::makeAny(maTempFile.GetURL())},
- {"Wait", uno::makeAny(true)}
- }));
+ { { "FileName", uno::makeAny(maTempFile.GetURL()) }, { "Wait", uno::makeAny(true) } }));
xPrintable->print(aOptions);
// Parse the export result with pdfium.
@@ -339,20 +341,25 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105093)
auto pAnnots = dynamic_cast<vcl::filter::PDFArrayElement*>(aPages[0]->Lookup("Annots"));
CPPUNIT_ASSERT(pAnnots);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pAnnots->GetElements().size());
- auto pAnnotReference = dynamic_cast<vcl::filter::PDFReferenceElement*>(pAnnots->GetElements()[0]);
+ auto pAnnotReference
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pAnnots->GetElements()[0]);
CPPUNIT_ASSERT(pAnnotReference);
vcl::filter::PDFObjectElement* pAnnot = pAnnotReference->LookupObject();
CPPUNIT_ASSERT(pAnnot);
- CPPUNIT_ASSERT_EQUAL(OString("Annot"), static_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"))->GetValue());
+ CPPUNIT_ASSERT_EQUAL(
+ OString("Annot"),
+ static_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"))->GetValue());
// Get the Action -> Rendition -> MediaClip -> FileSpec.
auto pAction = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pAnnot->Lookup("A"));
CPPUNIT_ASSERT(pAction);
auto pRendition = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pAction->LookupElement("R"));
CPPUNIT_ASSERT(pRendition);
- auto pMediaClip = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pRendition->LookupElement("C"));
+ auto pMediaClip
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pRendition->LookupElement("C"));
CPPUNIT_ASSERT(pMediaClip);
- auto pFileSpec = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pMediaClip->LookupElement("D"));
+ auto pFileSpec
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pMediaClip->LookupElement("D"));
CPPUNIT_ASSERT(pFileSpec);
// Make sure the filespec refers to an embedded file.
// This key was missing, the embedded video was handled as a linked one.
@@ -404,7 +411,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106206)
// And also that it's not an invalid one.
OString aInvalidImage("/Im0");
- it = std::search(pStart, pEnd, aInvalidImage.getStr(), aInvalidImage.getStr() + aInvalidImage.getLength());
+ it = std::search(pStart, pEnd, aInvalidImage.getStr(),
+ aInvalidImage.getStr() + aInvalidImage.getLength());
// This failed, object #0 was referenced.
CPPUNIT_ASSERT(bool(it == pEnd));
}
@@ -433,10 +441,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf109143)
// Get access to the only image on the only page.
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
// Make sure it's re-compressed.
@@ -470,23 +480,29 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106972)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
// Get access to the only image inside the form object.
- auto pFormResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
+ auto pFormResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pFormResources);
- auto pImages = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pFormResources->LookupElement("XObject"));
+ auto pImages = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pFormResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pImages);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pImages->GetItems().size());
- vcl::filter::PDFObjectElement* pImage = pImages->LookupObject(pImages->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pImage
+ = pImages->LookupObject(pImages->GetItems().begin()->first);
CPPUNIT_ASSERT(pImage);
// Assert resources of the image.
- auto pImageResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pImage->Lookup("Resources"));
+ auto pImageResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pImage->Lookup("Resources"));
CPPUNIT_ASSERT(pImageResources);
// This failed: the PDF image had no Font resource.
CPPUNIT_ASSERT(pImageResources->LookupElement("Font"));
@@ -514,10 +530,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106972Pdf17)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
// Assert that we now attempt to preserve the original PDF data, even if
@@ -527,8 +545,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106972Pdf17)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testSofthyphenPos)
{
- // No need to run it on Windows, since it would use GDI printing, and not trigger PDF export
- // which is the intent of the test.
+// No need to run it on Windows, since it would use GDI printing, and not trigger PDF export
+// which is the intent of the test.
// FIXME: Why does this fail on macOS?
#if !defined MACOSX && !defined _WIN32
@@ -541,10 +559,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testSofthyphenPos)
uno::Reference<view::XPrintable> xPrintable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xPrintable.is());
uno::Sequence<beans::PropertyValue> aOptions(comphelper::InitPropertySequence(
- {
- {"FileName", uno::makeAny(maTempFile.GetURL())},
- {"Wait", uno::makeAny(true)}
- }));
+ { { "FileName", uno::makeAny(maTempFile.GetURL()) }, { "Wait", uno::makeAny(true) } }));
xPrintable->print(aOptions);
// Parse the export result with pdfium.
@@ -597,10 +612,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107013)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
// This failed, the reference to the image was created, but not the image.
CPPUNIT_ASSERT(pXObject);
}
@@ -615,24 +632,31 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107018)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
// Get access to the form object inside the image.
- auto pXObjectResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
+ auto pXObjectResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pXObjectResources);
- auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObjectResources->LookupElement("XObject"));
+ auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pXObjectResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pXObjectForms);
- vcl::filter::PDFObjectElement* pForm = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pForm
+ = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
CPPUNIT_ASSERT(pForm);
// Get access to Resources -> Font -> F1 of the form.
- auto pFormResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pForm->Lookup("Resources"));
+ auto pFormResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pForm->Lookup("Resources"));
CPPUNIT_ASSERT(pFormResources);
- auto pFonts = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pFormResources->LookupElement("Font"));
+ auto pFonts
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pFormResources->LookupElement("Font"));
CPPUNIT_ASSERT(pFonts);
auto pF1Ref = dynamic_cast<vcl::filter::PDFReferenceElement*>(pFonts->LookupElement("F1"));
CPPUNIT_ASSERT(pF1Ref);
@@ -663,18 +687,23 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107089)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
// Get access to the form object inside the image.
- auto pXObjectResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
+ auto pXObjectResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pXObjectResources);
- auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObjectResources->LookupElement("XObject"));
+ auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pXObjectResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pXObjectForms);
- vcl::filter::PDFObjectElement* pForm = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pForm
+ = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
CPPUNIT_ASSERT(pForm);
// Make sure 'Hello' is part of the form object's stream.
@@ -732,7 +761,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680)
const char* pEnd = pStart + aUncompressed.GetSize();
size_t nSaveCount = std::count(pStart, pEnd, 'q');
size_t nRestoreCount = std::count(pStart, pEnd, 'Q');
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Save/restore graphic state operators count mismatch!", nSaveCount, nRestoreCount);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Save/restore graphic state operators count mismatch!", nSaveCount,
+ nRestoreCount);
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680_2)
@@ -773,7 +803,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680_2)
const char* pEnd = pStart + aUncompressed.GetSize();
size_t nSaveCount = std::count(pStart, pEnd, 'q');
size_t nRestoreCount = std::count(pStart, pEnd, 'Q');
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Save/restore graphic state operators count mismatch!", nSaveCount, nRestoreCount);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Save/restore graphic state operators count mismatch!",
+ nSaveCount, nRestoreCount);
}
}
@@ -828,7 +859,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf108963)
// The path described a yellow rectangle, but it was not rotated.
int nSegments = pPdfPageObject->getPathSegmentCount();
CPPUNIT_ASSERT_EQUAL(5, nSegments);
- std::unique_ptr<vcl::pdf::PDFiumPathSegment> pSegment = pPdfPageObject->getPathSegment(0);
+ std::unique_ptr<vcl::pdf::PDFiumPathSegment> pSegment
+ = pPdfPageObject->getPathSegment(0);
CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_MOVETO, pSegment->getType());
basegfx::B2DPoint aPoint = pSegment->getPoint();
CPPUNIT_ASSERT_EQUAL(245395, static_cast<int>(round(aPoint.getX() * 1000)));
@@ -881,23 +913,24 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf118244_radioButtonGroup)
// There are eight radio buttons.
auto pAnnots = dynamic_cast<vcl::filter::PDFArrayElement*>(aPages[0]->Lookup("Annots"));
CPPUNIT_ASSERT(pAnnots);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("# of radio buttons",static_cast<size_t>(8), pAnnots->GetElements().size());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("# of radio buttons", static_cast<size_t>(8),
+ pAnnots->GetElements().size());
sal_uInt32 nRadioGroups = 0;
- for ( const auto& aElement : aDocument.GetElements() )
+ for (const auto& aElement : aDocument.GetElements())
{
auto pObject = dynamic_cast<vcl::filter::PDFObjectElement*>(aElement.get());
- if ( !pObject )
+ if (!pObject)
continue;
auto pType = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("FT"));
- if ( pType && pType->GetValue() == "Btn" )
+ if (pType && pType->GetValue() == "Btn")
{
auto pKids = dynamic_cast<vcl::filter::PDFArrayElement*>(pObject->Lookup("Kids"));
- if ( pKids )
+ if (pKids)
{
size_t expectedSize = 2;
++nRadioGroups;
- if ( nRadioGroups == 3 )
+ if (nRadioGroups == 3)
expectedSize = 3;
CPPUNIT_ASSERT_EQUAL(expectedSize, pKids->GetElements().size());
}
@@ -926,7 +959,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_1)
auto pType = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("Type"));
if (pType && pType->GetValue() == "Font")
{
- auto pToUnicodeRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
+ auto pToUnicodeRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
CPPUNIT_ASSERT(pToUnicodeRef);
pToUnicode = pToUnicodeRef->LookupObject();
break;
@@ -991,7 +1025,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2)
auto pType = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("Type"));
if (pType && pType->GetValue() == "Font")
{
- auto pToUnicodeRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
+ auto pToUnicodeRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
CPPUNIT_ASSERT(pToUnicodeRef);
pToUnicode = pToUnicodeRef->LookupObject();
break;
@@ -1133,11 +1168,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
auto pType = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("Type"));
if (pType && pType->GetValue() == "Font")
{
- auto pName = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"));
+ auto pName
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"));
auto aName = pName->GetValue().copy(7); // skip the subset id
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", OString("Amiri-Regular"), aName);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", OString("Amiri-Regular"),
+ aName);
- auto pToUnicodeRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
+ auto pToUnicodeRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
CPPUNIT_ASSERT(pToUnicodeRef);
pToUnicode = pToUnicodeRef->LookupObject();
break;
@@ -1162,7 +1200,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
std::string aCmap("1 beginbfchar\n"
"<01> <0020>\n"
"endbfchar");
- std::string aData(static_cast<const char*>(aObjectStream.GetData()), aObjectStream.GetSize());
+ std::string aData(static_cast<const char*>(aObjectStream.GetData()),
+ aObjectStream.GetSize());
auto nPos = aData.find(aCmap);
CPPUNIT_ASSERT(nPos != std::string::npos);
}
@@ -1186,7 +1225,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
CPPUNIT_ASSERT(aZCodec.EndCompression());
// Make sure the expected ActualText is present.
- std::string aData(static_cast<const char*>(aUncompressed.GetData()), aUncompressed.GetSize());
+ std::string aData(static_cast<const char*>(aUncompressed.GetData()),
+ aUncompressed.GetSize());
std::string aActualText("/Span<</ActualText<");
size_t nCount = 0;
@@ -1196,7 +1236,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_1)
nCount++;
nPos += aActualText.length();
}
- CPPUNIT_ASSERT_EQUAL_MESSAGE("The should be one ActualText entry!", static_cast<size_t>(1), nCount);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The should be one ActualText entry!", static_cast<size_t>(1),
+ nCount);
aActualText = "/Span<</ActualText<FEFF00A0>>>";
nPos = aData.find(aActualText);
@@ -1224,11 +1265,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
auto pType = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("Type"));
if (pType && pType->GetValue() == "Font")
{
- auto pName = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"));
+ auto pName
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"));
auto aName = pName->GetValue().copy(7); // skip the subset id
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", OString("ReemKufi-Regular"), aName);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", OString("ReemKufi-Regular"),
+ aName);
- auto pToUnicodeRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
+ auto pToUnicodeRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
CPPUNIT_ASSERT(pToUnicodeRef);
pToUnicode = pToUnicodeRef->LookupObject();
break;
@@ -1255,7 +1299,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
"<09> <0628>\n"
"<0B> <0623>\n"
"endbfchar");
- std::string aData(static_cast<const char*>(aObjectStream.GetData()), aObjectStream.GetSize());
+ std::string aData(static_cast<const char*>(aObjectStream.GetData()),
+ aObjectStream.GetSize());
auto nPos = aData.find(aCmap);
CPPUNIT_ASSERT(nPos != std::string::npos);
}
@@ -1279,7 +1324,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
CPPUNIT_ASSERT(aZCodec.EndCompression());
// Make sure the expected ActualText is present.
- std::string aData(static_cast<const char*>(aUncompressed.GetData()), aUncompressed.GetSize());
+ std::string aData(static_cast<const char*>(aUncompressed.GetData()),
+ aUncompressed.GetSize());
std::vector<std::string> aCodes({ "0632", "062C", "0628", "0623" });
std::string aActualText("/Span<</ActualText<");
@@ -1290,7 +1336,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
nCount++;
nPos += aActualText.length();
}
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of ActualText entries does not match!", aCodes.size(), nCount);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of ActualText entries does not match!", aCodes.size(),
+ nCount);
for (const auto& aCode : aCodes)
{
@@ -1321,11 +1368,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3)
auto pType = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("Type"));
if (pType && pType->GetValue() == "Font")
{
- auto pName = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"));
+ auto pName
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"));
auto aName = pName->GetValue().copy(7); // skip the subset id
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", OString("GentiumBasic"), aName);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", OString("GentiumBasic"),
+ aName);
- auto pToUnicodeRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
+ auto pToUnicodeRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObject->Lookup("ToUnicode"));
CPPUNIT_ASSERT(pToUnicodeRef);
pToUnicode = pToUnicodeRef->LookupObject();
break;
@@ -1346,7 +1396,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3)
"<01> <1ECB0331030B>\n"
"<05> <0020>\n"
"endbfchar");
- std::string aData(static_cast<const char*>(aObjectStream.GetData()), aObjectStream.GetSize());
+ std::string aData(static_cast<const char*>(aObjectStream.GetData()),
+ aObjectStream.GetSize());
auto nPos = aData.find(aCmap);
CPPUNIT_ASSERT(nPos != std::string::npos);
}
@@ -1370,7 +1421,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3)
CPPUNIT_ASSERT(aZCodec.EndCompression());
// Make sure the expected ActualText is present.
- std::string aData(static_cast<const char*>(aUncompressed.GetData()), aUncompressed.GetSize());
+ std::string aData(static_cast<const char*>(aUncompressed.GetData()),
+ aUncompressed.GetSize());
std::string aActualText("/Span<</ActualText<FEFF1ECB0331030B>>>");
size_t nCount = 0;
@@ -1380,7 +1432,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3)
nCount++;
nPos += aActualText.length();
}
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of ActualText entries does not match!", static_cast<size_t>(4), nCount);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of ActualText entries does not match!",
+ static_cast<size_t>(4), nCount);
}
#endif
}
@@ -1684,38 +1737,40 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121615)
// Get access to the only image on the only page.
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
- vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pXObject
+ = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
CPPUNIT_ASSERT(pXObject);
vcl::filter::PDFStreamElement* pStream = pXObject->GetStream();
CPPUNIT_ASSERT(pStream);
SvMemoryStream& rObjectStream = pStream->GetMemory();
// Load the embedded image.
- rObjectStream.Seek( 0 );
+ rObjectStream.Seek(0);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
Graphic aGraphic;
sal_uInt16 format;
- ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString( "import" ), rObjectStream,
- GRFILTER_FORMAT_DONTKNOW, &format);
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString("import"), rObjectStream,
+ GRFILTER_FORMAT_DONTKNOW, &format);
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
// The image should be grayscale 8bit JPEG.
- sal_uInt16 jpegFormat = rFilter.GetImportFormatNumberForShortName( JPG_SHORTNAME );
- CPPUNIT_ASSERT( jpegFormat != GRFILTER_FORMAT_NOTFOUND );
- CPPUNIT_ASSERT_EQUAL( jpegFormat, format );
+ sal_uInt16 jpegFormat = rFilter.GetImportFormatNumberForShortName(JPG_SHORTNAME);
+ CPPUNIT_ASSERT(jpegFormat != GRFILTER_FORMAT_NOTFOUND);
+ CPPUNIT_ASSERT_EQUAL(jpegFormat, format);
BitmapEx aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL( tools::Long(200), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL( tools::Long(300), aBitmap.GetSizePixel().Height());
- CPPUNIT_ASSERT_EQUAL( 8, int(aBitmap.GetBitCount()));
+ CPPUNIT_ASSERT_EQUAL(tools::Long(200), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(300), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(8, int(aBitmap.GetBitCount()));
// tdf#121615 was caused by broken handling of data width with 8bit color,
// so the test image has some black in the bottomright corner, check it's there
- CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 0 ));
- CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 299 ));
- CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 199, 0 ));
- CPPUNIT_ASSERT_EQUAL( COL_BLACK, aBitmap.GetPixelColor( 199, 299 ));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(0, 0));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(0, 299));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(199, 0));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, aBitmap.GetPixelColor(199, 299));
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTocLink)
@@ -2071,20 +2126,23 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testMultiPagePDF)
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
- CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pXObjects->GetItems().size()); // 3 PDFs as Form XObjects
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3),
+ pXObjects->GetItems().size()); // 3 PDFs as Form XObjects
std::vector<OString> rIDs;
- for (auto const & rPair : pXObjects->GetItems()) {
+ for (auto const& rPair : pXObjects->GetItems())
+ {
rIDs.push_back(rPair.first);
}
// Let's check the embedded PDF pages - just make sure the size differs,
// which should indicate we don't have 3 times the same page.
- { // embedded PDF page 1
+ { // embedded PDF page 1
vcl::filter::PDFObjectElement* pXObject1 = pXObjects->LookupObject(rIDs[0]);
CPPUNIT_ASSERT(pXObject1);
CPPUNIT_ASSERT_EQUAL(OString("Im19"), rIDs[0]);
@@ -2093,11 +2151,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testMultiPagePDF)
CPPUNIT_ASSERT(pSubtype1);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pSubtype1->GetValue());
- auto pXObjectResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject1->Lookup("Resources"));
+ auto pXObjectResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject1->Lookup("Resources"));
CPPUNIT_ASSERT(pXObjectResources);
- auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObjectResources->LookupElement("XObject"));
+ auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pXObjectResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pXObjectForms);
- vcl::filter::PDFObjectElement* pForm = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pForm
+ = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
CPPUNIT_ASSERT(pForm);
vcl::filter::PDFStreamElement* pStream = pForm->GetStream();
@@ -2109,7 +2170,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testMultiPagePDF)
CPPUNIT_ASSERT_EQUAL(sal_uInt64(230), rObjectStream.remainingSize());
}
- { // embedded PDF page 2
+ { // embedded PDF page 2
vcl::filter::PDFObjectElement* pXObject2 = pXObjects->LookupObject(rIDs[1]);
CPPUNIT_ASSERT(pXObject2);
CPPUNIT_ASSERT_EQUAL(OString("Im24"), rIDs[1]);
@@ -2118,11 +2179,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testMultiPagePDF)
CPPUNIT_ASSERT(pSubtype2);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pSubtype2->GetValue());
- auto pXObjectResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject2->Lookup("Resources"));
+ auto pXObjectResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject2->Lookup("Resources"));
CPPUNIT_ASSERT(pXObjectResources);
- auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObjectResources->LookupElement("XObject"));
+ auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pXObjectResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pXObjectForms);
- vcl::filter::PDFObjectElement* pForm = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pForm
+ = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
CPPUNIT_ASSERT(pForm);
vcl::filter::PDFStreamElement* pStream = pForm->GetStream();
@@ -2134,7 +2198,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testMultiPagePDF)
CPPUNIT_ASSERT_EQUAL(sal_uInt64(309), rObjectStream.remainingSize());
}
- { // embedded PDF page 3
+ { // embedded PDF page 3
vcl::filter::PDFObjectElement* pXObject3 = pXObjects->LookupObject(rIDs[2]);
CPPUNIT_ASSERT(pXObject3);
CPPUNIT_ASSERT_EQUAL(OString("Im4"), rIDs[2]);
@@ -2143,11 +2207,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testMultiPagePDF)
CPPUNIT_ASSERT(pSubtype3);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pSubtype3->GetValue());
- auto pXObjectResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject3->Lookup("Resources"));
+ auto pXObjectResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject3->Lookup("Resources"));
CPPUNIT_ASSERT(pXObjectResources);
- auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObjectResources->LookupElement("XObject"));
+ auto pXObjectForms = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pXObjectResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pXObjectForms);
- vcl::filter::PDFObjectElement* pForm = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
+ vcl::filter::PDFObjectElement* pForm
+ = pXObjectForms->LookupObject(pXObjectForms->GetItems().begin()->first);
CPPUNIT_ASSERT(pForm);
vcl::filter::PDFStreamElement* pStream = pForm->GetStream();
@@ -2247,11 +2314,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testReexportPDF)
vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
CPPUNIT_ASSERT(pResources);
- auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+ auto pXObjects
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
CPPUNIT_ASSERT(pXObjects);
std::vector<OString> rIDs;
- for (auto const & rPair : pXObjects->GetItems())
+ for (auto const& rPair : pXObjects->GetItems())
rIDs.push_back(rPair.first);
CPPUNIT_ASSERT_EQUAL(size_t(2), rIDs.size());
@@ -2270,54 +2338,66 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testReexportPDF)
CPPUNIT_ASSERT(pSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pSubtype->GetValue());
- auto pInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
+ auto pInnerResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pInnerResources);
- auto pInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerResources->LookupElement("XObject"));
+ auto pInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pInnerXObjects);
CPPUNIT_ASSERT_EQUAL(size_t(1), pInnerXObjects->GetItems().size());
OString aInnerObjectID = pInnerXObjects->GetItems().begin()->first;
CPPUNIT_ASSERT_EQUAL(OString("Im13"), aInnerObjectID);
- vcl::filter::PDFObjectElement* pInnerXObject = pInnerXObjects->LookupObject(aInnerObjectID);
+ vcl::filter::PDFObjectElement* pInnerXObject
+ = pInnerXObjects->LookupObject(aInnerObjectID);
CPPUNIT_ASSERT(pInnerXObject);
- auto pInnerSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pInnerXObject->Lookup("Subtype"));
+ auto pInnerSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pInnerXObject->Lookup("Subtype"));
CPPUNIT_ASSERT(pInnerSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pInnerSubtype->GetValue());
- auto pInnerInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerXObject->Lookup("Resources"));
+ auto pInnerInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pInnerInnerResources);
- auto pInnerInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerInnerResources->LookupElement("XObject"));
+ auto pInnerInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerInnerResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pInnerInnerXObjects);
CPPUNIT_ASSERT_EQUAL(size_t(2), pInnerInnerXObjects->GetItems().size());
std::vector<OString> aBitmapIDs1;
- for (auto const & rPair : pInnerInnerXObjects->GetItems())
+ for (auto const& rPair : pInnerInnerXObjects->GetItems())
aBitmapIDs1.push_back(rPair.first);
{
CPPUNIT_ASSERT_EQUAL(OString("Im11"), aBitmapIDs1[0]);
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pInnerInnerXObjects->LookupElement(aBitmapIDs1[0]));
+ auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(
+ pInnerInnerXObjects->LookupElement(aBitmapIDs1[0]));
CPPUNIT_ASSERT(pRef);
aBitmapRefs1.push_back(pRef->GetObjectValue());
CPPUNIT_ASSERT_EQUAL(0, pRef->GetGenerationValue());
- vcl::filter::PDFObjectElement* pBitmap = pInnerInnerXObjects->LookupObject(aBitmapIDs1[0]);
+ vcl::filter::PDFObjectElement* pBitmap
+ = pInnerInnerXObjects->LookupObject(aBitmapIDs1[0]);
CPPUNIT_ASSERT(pBitmap);
- auto pBitmapSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
+ auto pBitmapSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
CPPUNIT_ASSERT(pBitmapSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Image"), pBitmapSubtype->GetValue());
}
{
CPPUNIT_ASSERT_EQUAL(OString("Im5"), aBitmapIDs1[1]);
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pInnerInnerXObjects->LookupElement(aBitmapIDs1[1]));
+ auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(
+ pInnerInnerXObjects->LookupElement(aBitmapIDs1[1]));
CPPUNIT_ASSERT(pRef);
aBitmapRefs1.push_back(pRef->GetObjectValue());
CPPUNIT_ASSERT_EQUAL(0, pRef->GetGenerationValue());
- vcl::filter::PDFObjectElement* pBitmap = pInnerInnerXObjects->LookupObject(aBitmapIDs1[1]);
+ vcl::filter::PDFObjectElement* pBitmap
+ = pInnerInnerXObjects->LookupObject(aBitmapIDs1[1]);
CPPUNIT_ASSERT(pBitmap);
- auto pBitmapSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
+ auto pBitmapSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
CPPUNIT_ASSERT(pBitmapSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Image"), pBitmapSubtype->GetValue());
}
@@ -2334,54 +2414,66 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testReexportPDF)
CPPUNIT_ASSERT(pSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pSubtype->GetValue());
- auto pInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
+ auto pInnerResources
+ = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pInnerResources);
- auto pInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerResources->LookupElement("XObject"));
+ auto pInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pInnerXObjects);
CPPUNIT_ASSERT_EQUAL(size_t(1), pInnerXObjects->GetItems().size());
OString aInnerObjectID = pInnerXObjects->GetItems().begin()->first;
CPPUNIT_ASSERT_EQUAL(OString("Im5"), aInnerObjectID);
- vcl::filter::PDFObjectElement* pInnerXObject = pInnerXObjects->LookupObject(aInnerObjectID);
+ vcl::filter::PDFObjectElement* pInnerXObject
+ = pInnerXObjects->LookupObject(aInnerObjectID);
CPPUNIT_ASSERT(pInnerXObject);
- auto pInnerSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pInnerXObject->Lookup("Subtype"));
+ auto pInnerSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pInnerXObject->Lookup("Subtype"));
CPPUNIT_ASSERT(pInnerSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Form"), pInnerSubtype->GetValue());
- auto pInnerInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerXObject->Lookup("Resources"));
+ auto pInnerInnerResources = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerXObject->Lookup("Resources"));
CPPUNIT_ASSERT(pInnerInnerResources);
- auto pInnerInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pInnerInnerResources->LookupElement("XObject"));
+ auto pInnerInnerXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(
+ pInnerInnerResources->LookupElement("XObject"));
CPPUNIT_ASSERT(pInnerInnerXObjects);
CPPUNIT_ASSERT_EQUAL(size_t(2), pInnerInnerXObjects->GetItems().size());
std::vector<OString> aBitmapIDs2;
- for (auto const & rPair : pInnerInnerXObjects->GetItems())
+ for (auto const& rPair : pInnerInnerXObjects->GetItems())
aBitmapIDs2.push_back(rPair.first);
{
CPPUNIT_ASSERT_EQUAL(OString("Im11"), aBitmapIDs2[0]);
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pInnerInnerXObjects->LookupElement(aBitmapIDs2[0]));
+ auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(
+ pInnerInnerXObjects->LookupElement(aBitmapIDs2[0]));
CPPUNIT_ASSERT(pRef);
aBitmapRefs2.push_back(pRef->GetObjectValue());
CPPUNIT_ASSERT_EQUAL(0, pRef->GetGenerationValue());
- vcl::filter::PDFObjectElement* pBitmap = pInnerInnerXObjects->LookupObject(aBitmapIDs2[0]);
+ vcl::filter::PDFObjectElement* pBitmap
+ = pInnerInnerXObjects->LookupObject(aBitmapIDs2[0]);
CPPUNIT_ASSERT(pBitmap);
- auto pBitmapSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
+ auto pBitmapSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
CPPUNIT_ASSERT(pBitmapSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Image"), pBitmapSubtype->GetValue());
}
{
CPPUNIT_ASSERT_EQUAL(OString("Im5"), aBitmapIDs2[1]);
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pInnerInnerXObjects->LookupElement(aBitmapIDs2[1]));
+ auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(
+ pInnerInnerXObjects->LookupElement(aBitmapIDs2[1]));
CPPUNIT_ASSERT(pRef);
aBitmapRefs2.push_back(pRef->GetObjectValue());
CPPUNIT_ASSERT_EQUAL(0, pRef->GetGenerationValue());
- vcl::filter::PDFObjectElement* pBitmap = pInnerInnerXObjects->LookupObject(aBitmapIDs2[1]);
+ vcl::filter::PDFObjectElement* pBitmap
+ = pInnerInnerXObjects->LookupObject(aBitmapIDs2[1]);
CPPUNIT_ASSERT(pBitmap);
- auto pBitmapSubtype = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
+ auto pBitmapSubtype
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pBitmap->Lookup("Subtype"));
CPPUNIT_ASSERT(pBitmapSubtype);
CPPUNIT_ASSERT_EQUAL(OString("Image"), pBitmapSubtype->GetValue());
}
@@ -2393,7 +2485,6 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testReexportPDF)
#endif
}
-
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/vcl/qa/unit/vcl-dialogs-test.cxx b/vcl/qa/unit/vcl-dialogs-test.cxx
index fa750666e2bb..bca3437099f2 100644
--- a/vcl/qa/unit/vcl-dialogs-test.cxx
+++ b/vcl/qa/unit/vcl-dialogs-test.cxx
@@ -36,19 +36,14 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-VclDialogsTest::VclDialogsTest()
-{
-}
+VclDialogsTest::VclDialogsTest() {}
void VclDialogsTest::registerKnownDialogsByID(mapType& /*rKnownDialogs*/)
{
// fill map of known dialogs
}
-VclPtr<VclAbstractDialog> VclDialogsTest::createDialogByID(sal_uInt32 /*nID*/)
-{
- return nullptr;
-}
+VclPtr<VclAbstractDialog> VclDialogsTest::createDialogByID(sal_uInt32 /*nID*/) { return nullptr; }
void VclDialogsTest::openAnyDialog()
{
diff --git a/vcl/source/app/ITiledRenderable.cxx b/vcl/source/app/ITiledRenderable.cxx
index e2a639decacd..52a4ab0f50d4 100644
--- a/vcl/source/app/ITiledRenderable.cxx
+++ b/vcl/source/app/ITiledRenderable.cxx
@@ -11,21 +11,20 @@
namespace vcl
{
-
- /*
- * Map directly to css cursor styles to avoid further mapping in the client.
- * Gtk (via gdk_cursor_new_from_name) also supports the same css cursor styles.
- *
- * This was created partially with help of the mappings in gtkdata.cxx.
- * The list is incomplete as some cursor style simply aren't supported
- * by css, it might turn out to be worth mapping some of these missing cursors
- * to available cursors?
- */
+/*
+ * Map directly to css cursor styles to avoid further mapping in the client.
+ * Gtk (via gdk_cursor_new_from_name) also supports the same css cursor styles.
+ *
+ * This was created partially with help of the mappings in gtkdata.cxx.
+ * The list is incomplete as some cursor style simply aren't supported
+ * by css, it might turn out to be worth mapping some of these missing cursors
+ * to available cursors?
+ */
#ifdef _MSC_VER
#pragma warning(push)
-#pragma warning( disable : 4592)
+#pragma warning(disable : 4592)
#endif
- const std::map <PointerStyle, OString> gaLOKPointerMap {
+const std::map<PointerStyle, OString> gaLOKPointerMap{
{ PointerStyle::Arrow, "default" },
// PointerStyle::Null ?
{ PointerStyle::Wait, "wait" },
@@ -67,15 +66,12 @@ namespace vcl
{ PointerStyle::TextVertical, "vertical-text" }
// Pivot Delete, TabSelectS through TabSelectSW
// PaintBrush, HideWhiteSpace, ShowWhiteSpace
- };
+};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
-ITiledRenderable::~ITiledRenderable()
-{
-}
-
+ITiledRenderable::~ITiledRenderable() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 38c91df612bf..03f68e381163 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -141,8 +141,9 @@ void SalBitmap::DropScaledCache()
{
auto& rCache = pSVData->maGDIData.maScaleCache;
- rCache.remove_if([this] (const lru_scale_cache::key_value_pair_t& rKeyValuePair)
- { return rKeyValuePair.first.mpBitmap == this; });
+ rCache.remove_if([this](const lru_scale_cache::key_value_pair_t& rKeyValuePair) {
+ return rKeyValuePair.first.mpBitmap == this;
+ });
}
}
@@ -514,8 +515,7 @@ css::uno::Reference<css::datatransfer::dnd::XDropTarget> SalInstanceWidget::get_
return m_xWidget->GetDropTarget();
}
-void SalInstanceWidget::connect_get_property_tree(
- const Link<tools::JsonWriter&, void>& rLink)
+void SalInstanceWidget::connect_get_property_tree(const Link<tools::JsonWriter&, void>& rLink)
{
m_xWidget->SetDumpAsPropertyTreeHdl(rLink);
}
@@ -557,11 +557,13 @@ void SalInstanceWidget::HandleEventListener(VclWindowEvent& rEvent)
namespace
{
- MouseEvent TransformEvent(const MouseEvent& rEvent, const vcl::Window* pParent, const vcl::Window* pChild)
- {
- return MouseEvent(pParent->ScreenToOutputPixel(pChild->OutputToScreenPixel(rEvent.GetPosPixel())),
- rEvent.GetClicks(), rEvent.GetMode(), rEvent.GetButtons(), rEvent.GetModifier());
- }
+MouseEvent TransformEvent(const MouseEvent& rEvent, const vcl::Window* pParent,
+ const vcl::Window* pChild)
+{
+ return MouseEvent(
+ pParent->ScreenToOutputPixel(pChild->OutputToScreenPixel(rEvent.GetPosPixel())),
+ rEvent.GetClicks(), rEvent.GetMode(), rEvent.GetButtons(), rEvent.GetModifier());
+}
}
void SalInstanceWidget::HandleMouseEventListener(VclSimpleEvent& rEvent)
@@ -577,7 +579,8 @@ void SalInstanceWidget::HandleMouseEventListener(VclSimpleEvent& rEvent)
else if (m_xWidget->ImplIsChild(rWinEvent.GetWindow()))
{
const MouseEvent* pMouseEvent = static_cast<const MouseEvent*>(rWinEvent.GetData());
- const MouseEvent aTransformedEvent(TransformEvent(*pMouseEvent, m_xWidget, rWinEvent.GetWindow()));
+ const MouseEvent aTransformedEvent(
+ TransformEvent(*pMouseEvent, m_xWidget, rWinEvent.GetWindow()));
m_aMousePressHdl.Call(aTransformedEvent);
}
}
@@ -592,7 +595,8 @@ void SalInstanceWidget::HandleMouseEventListener(VclSimpleEvent& rEvent)
else if (m_xWidget->ImplIsChild(rWinEvent.GetWindow()))
{
const MouseEvent* pMouseEvent = static_cast<const MouseEvent*>(rWinEvent.GetData());
- const MouseEvent aTransformedEvent(TransformEvent(*pMouseEvent, m_xWidget, rWinEvent.GetWindow()));
+ const MouseEvent aTransformedEvent(
+ TransformEvent(*pMouseEvent, m_xWidget, rWinEvent.GetWindow()));
m_aMouseReleaseHdl.Call(aTransformedEvent);
}
}
@@ -607,7 +611,8 @@ void SalInstanceWidget::HandleMouseEventListener(VclSimpleEvent& rEvent)
else if (m_xWidget->ImplIsChild(rWinEvent.GetWindow()))
{
const MouseEvent* pMouseEvent = static_cast<const MouseEvent*>(rWinEvent.GetData());
- const MouseEvent aTransformedEvent(TransformEvent(*pMouseEvent, m_xWidget, rWinEvent.GetWindow()));
+ const MouseEvent aTransformedEvent(
+ TransformEvent(*pMouseEvent, m_xWidget, rWinEvent.GetWindow()));
m_aMouseMotionHdl.Call(aTransformedEvent);
}
}
@@ -691,8 +696,8 @@ sal_uInt16 insert_to_menu(sal_uInt16 nLastId, PopupMenu* pMenu, int pos, const O
else
nBits = MenuItemBits::NONE;
- pMenu->InsertItem(nNewid, rStr, nBits,
- OUStringToOString(rId, RTL_TEXTENCODING_UTF8), pos == -1 ? MENU_APPEND : pos);
+ pMenu->InsertItem(nNewid, rStr, nBits, OUStringToOString(rId, RTL_TEXTENCODING_UTF8),
+ pos == -1 ? MENU_APPEND : pos);
if (pIconName)
{
pMenu->SetItemImage(nNewid, createImage(*pIconName));
@@ -718,7 +723,7 @@ OString SalInstanceMenu::popup_at_rect(weld::Widget* pParent, const tools::Recta
SalInstanceWidget* pVclWidget = dynamic_cast<SalInstanceWidget*>(pParent);
assert(pVclWidget);
m_xMenu->Execute(pVclWidget->getWidget(), rRect,
- PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose);
+ PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose);
return m_xMenu->GetCurItemIdent();
}
void SalInstanceMenu::set_sensitive(const OString& rIdent, bool bSensitive)
@@ -747,11 +752,11 @@ void SalInstanceMenu::set_visible(const OString& rIdent, bool bShow)
}
void SalInstanceMenu::clear() { m_xMenu->Clear(); }
void SalInstanceMenu::insert(int pos, const OUString& rId, const OUString& rStr,
- const OUString* pIconName, VirtualDevice* pImageSurface,
- TriState eCheckRadioFalse)
+ const OUString* pIconName, VirtualDevice* pImageSurface,
+ TriState eCheckRadioFalse)
{
- m_nLastId
- = insert_to_menu(m_nLastId, m_xMenu, pos, rId, rStr, pIconName, pImageSurface, eCheckRadioFalse);
+ m_nLastId = insert_to_menu(m_nLastId, m_xMenu, pos, rId, rStr, pIconName, pImageSurface,
+ eCheckRadioFalse);
}
void SalInstanceMenu::insert_separator(int pos, const OUString& rId)
{
@@ -789,7 +794,8 @@ IMPL_LINK_NOARG(SalInstanceMenu, SelectMenuHdl, ::Menu*, bool)
return false;
}
-SalInstanceToolbar::SalInstanceToolbar(ToolBox* pToolBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+SalInstanceToolbar::SalInstanceToolbar(ToolBox* pToolBox, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceWidget(pToolBox, pBuilder, bTakeOwnership)
, m_xToolBox(pToolBox)
{
@@ -849,7 +855,7 @@ void SalInstanceToolbar::set_menu_item_active(const OString& rIdent, bool bActiv
{
if (bActive)
vcl::Window::GetDockingManager()->StartPopupMode(m_xToolBox, pFloat,
- FloatWinPopupFlags::GrabFocus);
+ FloatWinPopupFlags::GrabFocus);
else
vcl::Window::GetDockingManager()->EndPopupMode(pFloat);
}
@@ -938,8 +944,7 @@ OString SalInstanceToolbar::get_item_ident(int nIndex) const
void SalInstanceToolbar::set_item_ident(int nIndex, const OString& rIdent)
{
- return m_xToolBox->SetItemCommand(m_xToolBox->GetItemId(nIndex),
- OUString::fromUtf8(rIdent));
+ return m_xToolBox->SetItemCommand(m_xToolBox->GetItemId(nIndex), OUString::fromUtf8(rIdent));
}
void SalInstanceToolbar::set_item_label(int nIndex, const OUString& rLabel)
@@ -960,11 +965,11 @@ void SalInstanceToolbar::set_item_label(const OString& rIdent, const OUString& r
void SalInstanceToolbar::set_item_icon_name(const OString& rIdent, const OUString& rIconName)
{
m_xToolBox->SetItemImage(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)),
- Image(StockImage::Yes, rIconName));
+ Image(StockImage::Yes, rIconName));
}
void SalInstanceToolbar::set_item_image(const OString& rIdent,
- const css::uno::Reference<css::graphic::XGraphic>& rIcon)
+ const css::uno::Reference<css::graphic::XGraphic>& rIcon)
{
m_xToolBox->SetItemImage(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)), Image(rIcon));
}
@@ -973,13 +978,13 @@ void SalInstanceToolbar::set_item_image(const OString& rIdent, VirtualDevice* pD
{
if (pDevice)
m_xToolBox->SetItemImage(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)),
- createImage(*pDevice));
+ createImage(*pDevice));
else
m_xToolBox->SetItemImage(m_xToolBox->GetItemId(OUString::fromUtf8(rIdent)), Image());
}
void SalInstanceToolbar::set_item_image(int nIndex,
- const css::uno::Reference<css::graphic::XGraphic>& rIcon)
+ const css::uno::Reference<css::graphic::XGraphic>& rIcon)
{
m_xToolBox->SetItemImage(m_xToolBox->GetItemId(nIndex), Image(rIcon));
}
@@ -1023,10 +1028,7 @@ void SalInstanceToolbar::set_icon_size(vcl::ImageType eType)
}
}
-sal_uInt16 SalInstanceToolbar::get_modifier_state() const
-{
- return m_xToolBox->GetModifier();
-}
+sal_uInt16 SalInstanceToolbar::get_modifier_state() const { return m_xToolBox->GetModifier(); }
int SalInstanceToolbar::get_drop_index(const Point& rPoint) const
{
@@ -1159,36 +1161,37 @@ std::unique_ptr<weld::Container> SalInstanceWidget::weld_parent() const
namespace
{
- void DoRecursivePaint(vcl::Window* pWindow, const Point& rPos, OutputDevice& rOutput)
- {
- Size aSize = pWindow->GetSizePixel();
+void DoRecursivePaint(vcl::Window* pWindow, const Point& rPos, OutputDevice& rOutput)
+{
+ Size aSize = pWindow->GetSizePixel();
- VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
- xOutput->SetOutputSizePixel(aSize);
- xOutput->DrawOutDev(Point(), aSize, rPos, aSize, rOutput);
+ VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
+ xOutput->SetOutputSizePixel(aSize);
+ xOutput->DrawOutDev(Point(), aSize, rPos, aSize, rOutput);
- //set ReallyVisible to match Visible, we restore the original
- //state after Paint
- WindowImpl* pImpl = pWindow->ImplGetWindowImpl();
- bool bRVisible = pImpl->mbReallyVisible;
- pImpl->mbReallyVisible = pWindow->IsVisible();
+ //set ReallyVisible to match Visible, we restore the original
+ //state after Paint
+ WindowImpl* pImpl = pWindow->ImplGetWindowImpl();
+ bool bRVisible = pImpl->mbReallyVisible;
+ pImpl->mbReallyVisible = pWindow->IsVisible();
- pWindow->Paint(*xOutput, tools::Rectangle(Point(), aSize));
+ pWindow->Paint(*xOutput, tools::Rectangle(Point(), aSize));
- pImpl->mbReallyVisible = bRVisible;
+ pImpl->mbReallyVisible = bRVisible;
- rOutput.DrawOutDev(rPos, aSize, Point(), aSize, *xOutput);
+ rOutput.DrawOutDev(rPos, aSize, Point(), aSize, *xOutput);
- xOutput.disposeAndClear();
+ xOutput.disposeAndClear();
- for (vcl::Window *pChild = pWindow->GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next))
- {
- if (!pChild->IsVisible())
- continue;
- DoRecursivePaint(pChild, rPos + pChild->GetPosPixel(), rOutput);
- }
+ for (vcl::Window* pChild = pWindow->GetWindow(GetWindowType::FirstChild); pChild;
+ pChild = pChild->GetWindow(GetWindowType::Next))
+ {
+ if (!pChild->IsVisible())
+ continue;
+ DoRecursivePaint(pChild, rPos + pChild->GetPosPixel(), rOutput);
}
}
+}
void SalInstanceWidget::draw(OutputDevice& rOutput, const tools::Rectangle& rRect)
{
@@ -1206,6 +1209,7 @@ class SalInstanceBox : public SalInstanceContainer, public virtual weld::Box
{
private:
VclPtr<VclBox> m_xBox;
+
public:
SalInstanceBox(VclBox* pContainer, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
: SalInstanceContainer(pContainer, pBuilder, bTakeOwnership)
@@ -1218,10 +1222,7 @@ public:
assert(pVclWidget);
pVclWidget->getWidget()->reorderWithinParent(nNewPosition);
}
- virtual void sort_native_button_order() override
- {
- ::sort_native_button_order(*m_xBox);
- }
+ virtual void sort_native_button_order() override { ::sort_native_button_order(*m_xBox); }
};
void CollectChildren(const vcl::Window& rCurrent, const basegfx::B2IPoint& rTopLeft,
@@ -1252,7 +1253,6 @@ void CollectChildren(const vcl::Window& rCurrent, const basegfx::B2IPoint& rTopL
}
}
}
-
}
void SalInstanceWindow::override_child_help(vcl::Window* pParent)
@@ -1648,8 +1648,9 @@ IMPL_LINK(SalInstanceDialog, PopupScreenShotMenuHdl, const CommandEvent&, rCEvt,
return false;
}
-SalInstanceMessageDialog::SalInstanceMessageDialog(::MessageDialog* pDialog, SalInstanceBuilder* pBuilder,
- bool bTakeOwnership)
+SalInstanceMessageDialog::SalInstanceMessageDialog(::MessageDialog* pDialog,
+ SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceDialog(pDialog, pBuilder, bTakeOwnership)
, m_xMessageDialog(pDialog)
{
@@ -1682,7 +1683,6 @@ weld::Container* SalInstanceMessageDialog::weld_message_area()
namespace
{
-
class SalInstanceAssistant : public SalInstanceDialog, public virtual weld::Assistant
{
private:
@@ -1872,7 +1872,6 @@ public:
rPage.disposeAndClear();
}
};
-
}
IMPL_LINK_NOARG(SalInstanceAssistant, OnRoadmapItemSelected, LinkParamNone*, void)
@@ -1941,15 +1940,9 @@ public:
{
}
- virtual void set_position(int nPos) override
- {
- m_xPaned->set_position(nPos);
- }
+ virtual void set_position(int nPos) override { m_xPaned->set_position(nPos); }
- virtual int get_position() const override
- {
- return m_xPaned->get_position();
- }
+ virtual int get_position() const override { return m_xPaned->get_position(); }
};
class SalInstanceScrolledWindow : public SalInstanceContainer, public virtual weld::ScrolledWindow
@@ -2173,7 +2166,6 @@ public:
rVertScrollBar.SetScrollHdl(m_aOrigVScrollHdl);
}
};
-
}
IMPL_LINK(SalInstanceScrolledWindow, VscrollHdl, ScrollBar*, pScrollBar, void)
@@ -2190,7 +2182,8 @@ IMPL_LINK_NOARG(SalInstanceScrolledWindow, HscrollHdl, ScrollBar*, void)
m_aOrigHScrollHdl.Call(&m_xScrolledWindow->getHorzScrollBar());
}
-SalInstanceNotebook::SalInstanceNotebook(TabControl* pNotebook, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+SalInstanceNotebook::SalInstanceNotebook(TabControl* pNotebook, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceContainer(pNotebook, pBuilder, bTakeOwnership)
, m_xNotebook(pNotebook)
{
@@ -2434,7 +2427,6 @@ public:
m_xNotebook->SetDeactivatePageHdl(Link<VerticalTabControl*, bool>());
}
};
-
}
IMPL_LINK_NOARG(SalInstanceVerticalNotebook, DeactivatePageHdl, VerticalTabControl*, bool)
@@ -2447,7 +2439,8 @@ IMPL_LINK_NOARG(SalInstanceVerticalNotebook, ActivatePageHdl, VerticalTabControl
m_aEnterPageHdl.Call(get_current_page_ident());
}
-SalInstanceButton::SalInstanceButton(::Button* pButton, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+SalInstanceButton::SalInstanceButton(::Button* pButton, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceContainer(pButton, pBuilder, bTakeOwnership)
, m_xButton(pButton)
, m_aOldClickHdl(pButton->GetClickHdl())
@@ -2662,7 +2655,6 @@ public:
m_xMenuButton->SetActivateHdl(Link<::MenuButton*, void>());
}
};
-
}
IMPL_LINK_NOARG(SalInstanceMenuButton, MenuSelectHdl, ::MenuButton*, void)
@@ -2679,14 +2671,15 @@ IMPL_LINK_NOARG(SalInstanceMenuButton, ActivateHdl, ::MenuButton*, void)
namespace
{
-
-class SalInstanceMenuToggleButton : public SalInstanceMenuButton, public virtual weld::MenuToggleButton
+class SalInstanceMenuToggleButton : public SalInstanceMenuButton,
+ public virtual weld::MenuToggleButton
{
private:
VclPtr<::MenuToggleButton> m_xMenuToggleButton;
public:
- SalInstanceMenuToggleButton(::MenuToggleButton* pButton, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+ SalInstanceMenuToggleButton(::MenuToggleButton* pButton, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceMenuButton(pButton, pBuilder, bTakeOwnership)
, m_xMenuToggleButton(pButton)
{
@@ -2703,7 +2696,6 @@ public:
virtual bool get_active() const override { return m_xMenuToggleButton->GetActive(); }
};
-
}
namespace
@@ -2736,7 +2728,6 @@ public:
virtual ~SalInstanceLinkButton() override { m_xButton->SetClickHdl(m_aOrigClickHdl); }
};
-
}
IMPL_LINK(SalInstanceLinkButton, ClickHdl, FixedHyperlink&, rButton, void)
@@ -2805,7 +2796,6 @@ public:
m_xRadioButton->SetToggleHdl(Link<::RadioButton&, void>());
}
};
-
}
IMPL_LINK_NOARG(SalInstanceRadioButton, ToggleHdl, ::RadioButton&, void)
@@ -2866,7 +2856,6 @@ public:
LINK(this, SalInstanceToggleButton, ToggleListener));
}
};
-
}
IMPL_LINK(SalInstanceToggleButton, ToggleListener, VclWindowEvent&, rEvent, void)
@@ -2877,7 +2866,8 @@ IMPL_LINK(SalInstanceToggleButton, ToggleListener, VclWindowEvent&, rEvent, void
signal_toggled();
}
-SalInstanceCheckButton::SalInstanceCheckButton(CheckBox* pButton, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+SalInstanceCheckButton::SalInstanceCheckButton(CheckBox* pButton, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceButton(pButton, pBuilder, bTakeOwnership)
, m_xCheckButton(pButton)
{
@@ -2961,7 +2951,6 @@ public:
virtual ~SalInstanceScale() override { m_xScale->SetSlideHdl(Link<Slider*, void>()); }
};
-
}
IMPL_LINK_NOARG(SalInstanceScale, SlideHdl, Slider*, void) { signal_value_changed(); }
@@ -3063,7 +3052,6 @@ public:
m_xCalendar->SetActivateHdl(Link<::Calendar*, void>());
}
};
-
}
IMPL_LINK_NOARG(SalInstanceCalendar, SelectHdl, ::Calendar*, void)
@@ -3114,25 +3102,13 @@ void SalInstanceEntry::set_text(const OUString& rText)
enable_notify_events();
}
-OUString SalInstanceEntry::get_text() const
-{
- return m_xEntry->GetText();
-}
+OUString SalInstanceEntry::get_text() const { return m_xEntry->GetText(); }
-void SalInstanceEntry::set_width_chars(int nChars)
-{
- m_xEntry->SetWidthInChars(nChars);
-}
+void SalInstanceEntry::set_width_chars(int nChars) { m_xEntry->SetWidthInChars(nChars); }
-int SalInstanceEntry::get_width_chars() const
-{
- return m_xEntry->GetWidthInChars();
-}
+int SalInstanceEntry::get_width_chars() const { return m_xEntry->GetWidthInChars(); }
-void SalInstanceEntry::set_max_length(int nChars)
-{
- m_xEntry->SetMaxTextLen(nChars);
-}
+void SalInstanceEntry::set_max_length(int nChars) { m_xEntry->SetMaxTextLen(nChars); }
void SalInstanceEntry::select_region(int nStartPos, int nEndPos)
{
@@ -3166,30 +3142,15 @@ void SalInstanceEntry::set_position(int nCursorPos)
enable_notify_events();
}
-int SalInstanceEntry::get_position() const
-{
- return m_xEntry->GetSelection().Max();
-}
+int SalInstanceEntry::get_position() const { return m_xEntry->GetSelection().Max(); }
-void SalInstanceEntry::set_editable(bool bEditable)
-{
- m_xEntry->SetReadOnly(!bEditable);
-}
+void SalInstanceEntry::set_editable(bool bEditable) { m_xEntry->SetReadOnly(!bEditable); }
-bool SalInstanceEntry::get_editable() const
-{
- return !m_xEntry->IsReadOnly();
-}
+bool SalInstanceEntry::get_editable() const { return !m_xEntry->IsReadOnly(); }
-void SalInstanceEntry::set_overwrite_mode(bool bOn)
-{
- m_xEntry->SetInsertMode(!bOn);
-}
+void SalInstanceEntry::set_overwrite_mode(bool bOn) { m_xEntry->SetInsertMode(!bOn); }
-bool SalInstanceEntry::get_overwrite_mode() const
-{
- return !m_xEntry->IsInsertMode();
-}
+bool SalInstanceEntry::get_overwrite_mode() const { return !m_xEntry->IsInsertMode(); }
void SalInstanceEntry::set_message_type(weld::EntryMessageType eType)
{
@@ -3243,59 +3204,41 @@ void SalInstanceEntry::set_placeholder_text(const OUString& rText)
m_xEntry->SetPlaceholderText(rText);
}
-Edit& SalInstanceEntry::getEntry()
-{
- return *m_xEntry;
-}
+Edit& SalInstanceEntry::getEntry() { return *m_xEntry; }
-void SalInstanceEntry::fire_signal_changed()
-{
- signal_changed();
-}
+void SalInstanceEntry::fire_signal_changed() { signal_changed(); }
-void SalInstanceEntry::cut_clipboard()
-{
- m_xEntry->Cut();
-}
+void SalInstanceEntry::cut_clipboard() { m_xEntry->Cut(); }
-void SalInstanceEntry::copy_clipboard()
-{
- m_xEntry->Copy();
-}
+void SalInstanceEntry::copy_clipboard() { m_xEntry->Copy(); }
-void SalInstanceEntry::paste_clipboard()
-{
- m_xEntry->Paste();
-}
+void SalInstanceEntry::paste_clipboard() { m_xEntry->Paste(); }
namespace
{
- void set_alignment(Edit& rEntry, TxtAlign eXAlign)
+void set_alignment(Edit& rEntry, TxtAlign eXAlign)
+{
+ WinBits nAlign(0);
+ switch (eXAlign)
{
- WinBits nAlign(0);
- switch (eXAlign)
- {
- case TxtAlign::Left:
- nAlign = WB_LEFT;
- break;
- case TxtAlign::Center:
- nAlign = WB_CENTER;
- break;
- case TxtAlign::Right:
- nAlign = WB_RIGHT;
- break;
- }
- WinBits nBits = rEntry.GetStyle();
- nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
- rEntry.SetStyle(nBits | nAlign);
+ case TxtAlign::Left:
+ nAlign = WB_LEFT;
+ break;
+ case TxtAlign::Center:
+ nAlign = WB_CENTER;
+ break;
+ case TxtAlign::Right:
+ nAlign = WB_RIGHT;
+ break;
}
+ WinBits nBits = rEntry.GetStyle();
+ nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
+ rEntry.SetStyle(nBits | nAlign);
}
-
-void SalInstanceEntry::set_alignment(TxtAlign eXAlign)
-{
- ::set_alignment(*m_xEntry, eXAlign);
}
+void SalInstanceEntry::set_alignment(TxtAlign eXAlign) { ::set_alignment(*m_xEntry, eXAlign); }
+
SalInstanceEntry::~SalInstanceEntry()
{
if (m_aCursorPositionHdl.IsSet())
@@ -3336,7 +3279,6 @@ struct SalInstanceTreeIter : public weld::TreeIter
}
SvTreeListEntry* iter;
};
-
}
class SalInstanceTreeView;
@@ -3345,37 +3287,38 @@ static SalInstanceTreeView* g_DragSource;
namespace
{
- // tdf#131581 if the TreeView is hidden then there are possibly additional
- // optimizations available
- class UpdateGuardIfHidden
- {
- private:
- SvTabListBox& m_rTreeView;
- bool m_bOrigUpdate;
- bool m_bOrigEnableInvalidate;
-
- public:
- UpdateGuardIfHidden(SvTabListBox& rTreeView)
- : m_rTreeView(rTreeView)
- // tdf#136962 only do SetUpdateMode(false) optimization if the widget is currently hidden
- , m_bOrigUpdate(!m_rTreeView.IsVisible() && m_rTreeView.IsUpdateMode())
- // tdf#137432 only do EnableInvalidate(false) optimization if the widget is currently hidden
- , m_bOrigEnableInvalidate(!m_rTreeView.IsVisible() && m_rTreeView.GetModel()->IsEnableInvalidate())
- {
- if (m_bOrigUpdate)
- m_rTreeView.SetUpdateMode(false);
- if (m_bOrigEnableInvalidate)
- m_rTreeView.GetModel()->EnableInvalidate(false);
- }
+// tdf#131581 if the TreeView is hidden then there are possibly additional
+// optimizations available
+class UpdateGuardIfHidden
+{
+private:
+ SvTabListBox& m_rTreeView;
+ bool m_bOrigUpdate;
+ bool m_bOrigEnableInvalidate;
- ~UpdateGuardIfHidden()
- {
- if (m_bOrigEnableInvalidate)
- m_rTreeView.GetModel()->EnableInvalidate(true);
- if (m_bOrigUpdate)
- m_rTreeView.SetUpdateMode(true);
- }
- };
+public:
+ UpdateGuardIfHidden(SvTabListBox& rTreeView)
+ : m_rTreeView(rTreeView)
+ // tdf#136962 only do SetUpdateMode(false) optimization if the widget is currently hidden
+ , m_bOrigUpdate(!m_rTreeView.IsVisible() && m_rTreeView.IsUpdateMode())
+ // tdf#137432 only do EnableInvalidate(false) optimization if the widget is currently hidden
+ , m_bOrigEnableInvalidate(!m_rTreeView.IsVisible()
+ && m_rTreeView.GetModel()->IsEnableInvalidate())
+ {
+ if (m_bOrigUpdate)
+ m_rTreeView.SetUpdateMode(false);
+ if (m_bOrigEnableInvalidate)
+ m_rTreeView.GetModel()->EnableInvalidate(false);
+ }
+
+ ~UpdateGuardIfHidden()
+ {
+ if (m_bOrigEnableInvalidate)
+ m_rTreeView.GetModel()->EnableInvalidate(true);
+ if (m_bOrigUpdate)
+ m_rTreeView.SetUpdateMode(true);
+ }
+};
}
class SalInstanceTreeView : public SalInstanceContainer, public virtual weld::TreeView
@@ -3468,8 +3411,8 @@ private:
void do_insert(const weld::TreeIter* pParent, int pos, const OUString* pStr,
const OUString* pId, const OUString* pIconName,
- const VirtualDevice* pImageSurface, bool bChildrenOnDemand,
- weld::TreeIter* pRet, bool bIsSeparator)
+ const VirtualDevice* pImageSurface, bool bChildrenOnDemand, weld::TreeIter* pRet,
+ bool bIsSeparator)
{
disable_notify_events();
const SalInstanceTreeIter* pVclIter = static_cast<const SalInstanceTreeIter*>(pParent);
@@ -3514,7 +3457,8 @@ private:
if (bChildrenOnDemand)
{
- SvTreeListEntry* pPlaceHolder = m_xTreeView->InsertEntry("<dummy>", pEntry, false, 0, nullptr);
+ SvTreeListEntry* pPlaceHolder
+ = m_xTreeView->InsertEntry("<dummy>", pEntry, false, 0, nullptr);
SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pPlaceHolder);
pViewData->SetSelectable(false);
}
@@ -3551,7 +3495,6 @@ private:
SvLBoxButtonData* pData = m_bTogglesAsRadio ? &m_aRadioButtonData : &m_aCheckButtonData;
pEntry->ReplaceItem(std::make_unique<SvLBoxButton>(pData), 0);
update_checkbutton_column_width(pEntry);
-
}
SvLBoxItem& rItem = pEntry->GetItem(col);
assert(dynamic_cast<SvLBoxButton*>(&rItem));
@@ -3743,7 +3686,7 @@ public:
virtual void set_column_editables(const std::vector<bool>& rEditables) override
{
size_t nTabCount = rEditables.size();
- for (size_t i = 0 ; i < nTabCount; ++i)
+ for (size_t i = 0; i < nTabCount; ++i)
m_xTreeView->SetTabEditable(i, rEditables[i]);
}
@@ -3797,7 +3740,8 @@ public:
{
// invalidate the entries
SvTreeList* pModel = m_xTreeView->GetModel();
- for (SvTreeListEntry* pEntry = m_xTreeView->First(); pEntry; pEntry = m_xTreeView->Next(pEntry))
+ for (SvTreeListEntry* pEntry = m_xTreeView->First(); pEntry;
+ pEntry = m_xTreeView->Next(pEntry))
pModel->InvalidateEntry(pEntry);
}
@@ -3820,15 +3764,14 @@ public:
VirtualDevice* pImageSurface, bool bChildrenOnDemand,
weld::TreeIter* pRet) override
{
- do_insert(pParent, pos, pStr, pId, pIconName, pImageSurface,
- bChildrenOnDemand, pRet, false);
+ do_insert(pParent, pos, pStr, pId, pIconName, pImageSurface, bChildrenOnDemand, pRet,
+ false);
}
virtual void insert_separator(int pos, const OUString& /*rId*/) override
{
OUString sSep(VclResId(STR_SEPARATOR));
- do_insert(nullptr, pos, &sSep, nullptr, nullptr, nullptr,
- false, nullptr, true);
+ do_insert(nullptr, pos, &sSep, nullptr, nullptr, nullptr, false, nullptr, true);
}
virtual void
@@ -3951,7 +3894,9 @@ public:
virtual void select(int pos) override
{
- assert(m_xTreeView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xTreeView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
if (pos == -1 || (pos == 0 && n_children() == 0))
m_xTreeView->SelectAll(false);
@@ -3987,7 +3932,9 @@ public:
virtual void scroll_to_row(int pos) override
{
- assert(m_xTreeView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xTreeView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos);
m_xTreeView->MakeVisible(pEntry);
@@ -4002,7 +3949,9 @@ public:
virtual void unselect(int pos) override
{
- assert(m_xTreeView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xTreeView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
if (pos == -1)
m_xTreeView->SelectAll(true);
@@ -4232,9 +4181,8 @@ public:
set_text_align(pEntry, fAlign, col);
}
- virtual void connect_editing(
- const Link<const weld::TreeIter&, bool>& rStartLink,
- const Link<const iter_string&, bool>& rEndLink) override
+ virtual void connect_editing(const Link<const weld::TreeIter&, bool>& rStartLink,
+ const Link<const iter_string&, bool>& rEndLink) override
{
m_xTreeView->EnableInplaceEditing(rStartLink.IsSet() || rEndLink.IsSet());
weld::TreeView::connect_editing(rStartLink, rEndLink);
@@ -4481,7 +4429,9 @@ public:
virtual void select(const weld::TreeIter& rIter) override
{
- assert(m_xTreeView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xTreeView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter);
m_xTreeView->Select(rVclIter.iter, true);
@@ -4490,7 +4440,9 @@ public:
virtual void scroll_to_row(const weld::TreeIter& rIter) override
{
- assert(m_xTreeView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xTreeView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter);
m_xTreeView->MakeVisible(rVclIter.iter);
@@ -4536,7 +4488,8 @@ public:
return GetPlaceHolderChild(rVclIter.iter) != nullptr;
}
- virtual void set_children_on_demand(const weld::TreeIter& rIter, bool bChildrenOnDemand) override
+ virtual void set_children_on_demand(const weld::TreeIter& rIter,
+ bool bChildrenOnDemand) override
{
disable_notify_events();
@@ -4804,10 +4757,13 @@ public:
SvTabListBox& getTreeView() { return *m_xTreeView; }
- virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* pResult, bool bDnDMode) override
+ virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* pResult,
+ bool bDnDMode) override
{
- LclTabListBox* pTreeView = !bDnDMode ? dynamic_cast<LclTabListBox*>(m_xTreeView.get()) : nullptr;
- SvTreeListEntry* pTarget = pTreeView ? pTreeView->GetTargetAtPoint(rPos, false) : m_xTreeView->GetDropTarget(rPos);
+ LclTabListBox* pTreeView
+ = !bDnDMode ? dynamic_cast<LclTabListBox*>(m_xTreeView.get()) : nullptr;
+ SvTreeListEntry* pTarget = pTreeView ? pTreeView->GetTargetAtPoint(rPos, false)
+ : m_xTreeView->GetDropTarget(rPos);
if (pTarget && pResult)
{
@@ -4818,10 +4774,7 @@ public:
return pTarget != nullptr;
}
- virtual void unset_drag_dest_row() override
- {
- m_xTreeView->UnsetDropTarget();
- }
+ virtual void unset_drag_dest_row() override { m_xTreeView->UnsetDropTarget(); }
virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const override
{
@@ -5039,7 +4992,8 @@ IMPL_LINK_NOARG(SalInstanceTreeView, DeSelectHdl, SvTreeListBox*, void)
{
if (notify_events_disabled())
return;
- if (m_xTreeView->GetSelectionMode() == SelectionMode::Single && !m_xTreeView->GetHoverSelection())
+ if (m_xTreeView->GetSelectionMode() == SelectionMode::Single
+ && !m_xTreeView->GetHoverSelection())
return;
signal_changed();
}
@@ -5120,8 +5074,8 @@ IMPL_LINK(SalInstanceTreeView, EditingEntryHdl, SvTreeListEntry*, pEntry, bool)
IMPL_LINK(SalInstanceTreeView, EditedEntryHdl, IterString, rIterString, bool)
{
- return signal_editing_done(iter_string(
- SalInstanceTreeIter(rIterString.first), rIterString.second));
+ return signal_editing_done(
+ iter_string(SalInstanceTreeIter(rIterString.first), rIterString.second));
}
class SalInstanceIconView : public SalInstanceContainer, public virtual weld::IconView
@@ -5219,7 +5173,9 @@ public:
virtual void select(int pos) override
{
- assert(m_xIconView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xIconView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
if (pos == -1 || (pos == 0 && n_children() == 0))
m_xIconView->SelectAll(false);
@@ -5234,7 +5190,9 @@ public:
virtual void unselect(int pos) override
{
- assert(m_xIconView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xIconView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
if (pos == -1)
m_xIconView->SelectAll(true);
@@ -5293,7 +5251,9 @@ public:
virtual void scroll_to_item(const weld::TreeIter& rIter) override
{
- assert(m_xIconView->IsUpdateMode() && "don't select when frozen, select after thaw. Note selection doesn't survive a freeze");
+ assert(m_xIconView->IsUpdateMode()
+ && "don't select when frozen, select after thaw. Note selection doesn't survive a "
+ "freeze");
disable_notify_events();
const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter);
m_xIconView->MakeVisible(rVclIter.iter);
@@ -5362,7 +5322,7 @@ IMPL_LINK_NOARG(SalInstanceIconView, DoubleClickHdl, SvTreeListBox*, bool)
double SalInstanceSpinButton::toField(int nValue) const
{
return static_cast<double>(nValue) / Power10(get_digits());
- }
+}
int SalInstanceSpinButton::fromField(double fValue) const
{
@@ -5370,7 +5330,7 @@ int SalInstanceSpinButton::fromField(double fValue) const
}
SalInstanceSpinButton::SalInstanceSpinButton(FormattedField* pButton, SalInstanceBuilder* pBuilder,
- bool bTakeOwnership)
+ bool bTakeOwnership)
: SalInstanceEntry(pButton, pBuilder, bTakeOwnership)
, m_xButton(pButton)
, m_rFormatter(m_xButton->GetFormatter())
@@ -5387,15 +5347,9 @@ SalInstanceSpinButton::SalInstanceSpinButton(FormattedField* pButton, SalInstanc
m_xButton->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl));
}
-int SalInstanceSpinButton::get_value() const
-{
- return fromField(m_rFormatter.GetValue());
-}
+int SalInstanceSpinButton::get_value() const { return fromField(m_rFormatter.GetValue()); }
-void SalInstanceSpinButton::set_value(int value)
-{
- m_rFormatter.SetValue(toField(value));
-}
+void SalInstanceSpinButton::set_value(int value) { m_rFormatter.SetValue(toField(value)); }
void SalInstanceSpinButton::set_range(int min, int max)
{
@@ -5427,21 +5381,12 @@ void SalInstanceSpinButton::set_digits(unsigned int digits)
// SpinButton may be comprised of multiple subwidgets, consider the lot as
// one thing for focus
-bool SalInstanceSpinButton::has_focus() const
-{
- return m_xWidget->HasChildPathFocus();
-}
+bool SalInstanceSpinButton::has_focus() const { return m_xWidget->HasChildPathFocus(); }
//off by default for direct SpinButtons, MetricSpinButton enables it
-void SalInstanceSpinButton::SetUseThousandSep()
-{
- m_rFormatter.SetThousandsSep(true);
-}
+void SalInstanceSpinButton::SetUseThousandSep() { m_rFormatter.SetThousandsSep(true); }
-unsigned int SalInstanceSpinButton::get_digits() const
-{
- return m_rFormatter.GetDecimalDigits();
-}
+unsigned int SalInstanceSpinButton::get_digits() const { return m_rFormatter.GetDecimalDigits(); }
SalInstanceSpinButton::~SalInstanceSpinButton()
{
@@ -5551,10 +5496,7 @@ public:
// no-op for gen
}
- virtual Formatter& GetFormatter() override
- {
- return m_xButton->GetFormatter();
- }
+ virtual Formatter& GetFormatter() override { return m_xButton->GetFormatter(); }
virtual ~SalInstanceFormattedSpinButton() override
{
@@ -5564,14 +5506,16 @@ public:
}
};
-IMPL_LINK_NOARG(SalInstanceFormattedSpinButton, UpDownHdl, SpinField&, void) { signal_value_changed(); }
+IMPL_LINK_NOARG(SalInstanceFormattedSpinButton, UpDownHdl, SpinField&, void)
+{
+ signal_value_changed();
+}
IMPL_LINK_NOARG(SalInstanceFormattedSpinButton, LoseFocusHdl, Control&, void)
{
signal_value_changed();
m_aLoseFocusHdl.Call(*this);
}
-
}
SalInstanceLabel::SalInstanceLabel(Control* pLabel, SalInstanceBuilder* pBuilder,
@@ -5641,7 +5585,7 @@ std::unique_ptr<weld::Label> SalInstanceFrame::weld_label_widget() const
}
SalInstanceTextView::SalInstanceTextView(VclMultiLineEdit* pTextView, SalInstanceBuilder* pBuilder,
- bool bTakeOwnership)
+ bool bTakeOwnership)
: SalInstanceContainer(pTextView, pBuilder, bTakeOwnership)
, m_xTextView(pTextView)
{
@@ -5694,7 +5638,7 @@ void SalInstanceTextView::set_monospace(bool bMonospace)
vcl::Font aFont;
if (bMonospace)
aFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_FIXED, LANGUAGE_DONTKNOW,
- GetDefaultFontFlags::OnlyOne, m_xTextView);
+ GetDefaultFontFlags::OnlyOne, m_xTextView);
else
aFont = Application::GetSettings().GetStyleSettings().GetFieldFont();
aFont.SetFontHeight(aOrigFont.GetFontHeight());
@@ -5729,20 +5673,11 @@ bool SalInstanceTextView::can_move_cursor_with_down() const
return !bNoSelection || m_xTextView->CanDown();
}
-void SalInstanceTextView::cut_clipboard()
-{
- m_xTextView->Cut();
-}
+void SalInstanceTextView::cut_clipboard() { m_xTextView->Cut(); }
-void SalInstanceTextView::copy_clipboard()
-{
- m_xTextView->Copy();
-}
+void SalInstanceTextView::copy_clipboard() { m_xTextView->Copy(); }
-void SalInstanceTextView::paste_clipboard()
-{
- m_xTextView->Paste();
-}
+void SalInstanceTextView::paste_clipboard() { m_xTextView->Paste(); }
void SalInstanceTextView::set_alignment(TxtAlign eXAlign)
{
@@ -5780,10 +5715,7 @@ int SalInstanceTextView::vadjustment_get_page_size() const
return rVertScrollBar.GetVisibleSize();
}
-bool SalInstanceTextView::has_focus() const
-{
- return m_xTextView->HasChildPathFocus();
-}
+bool SalInstanceTextView::has_focus() const { return m_xTextView->HasChildPathFocus(); }
SalInstanceTextView::~SalInstanceTextView()
{
@@ -5854,7 +5786,6 @@ public:
m_xExpander->SetExpandedHdl(Link<VclExpander&, void>());
}
};
-
}
IMPL_LINK_NOARG(SalInstanceExpander, ExpandedHdl, VclExpander&, void) { signal_expanded(); }
@@ -5882,9 +5813,10 @@ void SalInstanceDrawingArea::HandleMouseEventListener(VclSimpleEvent& rEvent)
bool SalInstanceDrawingArea::HandleKeyEventListener(VclWindowEvent& /*rEvent*/) { return false; }
-SalInstanceDrawingArea::SalInstanceDrawingArea(VclDrawingArea* pDrawingArea, SalInstanceBuilder* pBuilder,
- const a11yref& rAlly, FactoryFunction pUITestFactoryFunction,
- void* pUserData, bool bTakeOwnership)
+SalInstanceDrawingArea::SalInstanceDrawingArea(VclDrawingArea* pDrawingArea,
+ SalInstanceBuilder* pBuilder, const a11yref& rAlly,
+ FactoryFunction pUITestFactoryFunction,
+ void* pUserData, bool bTakeOwnership)
: SalInstanceWidget(pDrawingArea, pBuilder, bTakeOwnership)
, m_xDrawingArea(pDrawingArea)
{
@@ -5901,7 +5833,8 @@ SalInstanceDrawingArea::SalInstanceDrawingArea(VclDrawingArea* pDrawingArea, Sal
m_xDrawingArea->SetCommandHdl(LINK(this, SalInstanceDrawingArea, CommandHdl));
m_xDrawingArea->SetQueryTooltipHdl(LINK(this, SalInstanceDrawingArea, QueryTooltipHdl));
m_xDrawingArea->SetGetSurroundingHdl(LINK(this, SalInstanceDrawingArea, GetSurroundingHdl));
- m_xDrawingArea->SetDeleteSurroundingHdl(LINK(this, SalInstanceDrawingArea, DeleteSurroundingHdl));
+ m_xDrawingArea->SetDeleteSurroundingHdl(
+ LINK(this, SalInstanceDrawingArea, DeleteSurroundingHdl));
m_xDrawingArea->SetStartDragHdl(LINK(this, SalInstanceDrawingArea, StartDragHdl));
}
@@ -5939,10 +5872,12 @@ void SalInstanceDrawingArea::set_input_context(const InputContext& rInputContext
m_xDrawingArea->SetInputContext(rInputContext);
}
-void SalInstanceDrawingArea::im_context_set_cursor_location(const tools::Rectangle& rCursorRect, int nExtTextInputWidth)
+void SalInstanceDrawingArea::im_context_set_cursor_location(const tools::Rectangle& rCursorRect,
+ int nExtTextInputWidth)
{
tools::Rectangle aCursorRect = m_xDrawingArea->PixelToLogic(rCursorRect);
- m_xDrawingArea->SetCursorRect(&aCursorRect, m_xDrawingArea->PixelToLogic(Size(nExtTextInputWidth, 0)).Width());
+ m_xDrawingArea->SetCursorRect(
+ &aCursorRect, m_xDrawingArea->PixelToLogic(Size(nExtTextInputWidth, 0)).Width());
}
a11yref SalInstanceDrawingArea::get_accessible_parent()
@@ -5988,7 +5923,7 @@ Point SalInstanceDrawingArea::get_accessible_location()
}
void SalInstanceDrawingArea::enable_drag_source(rtl::Reference<TransferDataContainer>& rHelper,
- sal_uInt8 eDNDConstants)
+ sal_uInt8 eDNDConstants)
{
m_xDrawingArea->SetDragHelper(rHelper, eDNDConstants);
}
@@ -6089,19 +6024,23 @@ IMPL_LINK_NOARG(SalInstanceDrawingArea, StartDragHdl, VclDrawingArea*, bool)
return false;
}
-SalInstanceComboBoxWithoutEdit::SalInstanceComboBoxWithoutEdit(ListBox* pListBox, SalInstanceBuilder* pBuilder,
- bool bTakeOwnership)
+SalInstanceComboBoxWithoutEdit::SalInstanceComboBoxWithoutEdit(ListBox* pListBox,
+ SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceComboBox<ListBox>(pListBox, pBuilder, bTakeOwnership)
{
m_xComboBox->SetSelectHdl(LINK(this, SalInstanceComboBoxWithoutEdit, SelectHdl));
}
-OUString SalInstanceComboBoxWithoutEdit::get_active_text() const { return m_xComboBox->GetSelectedEntry(); }
+OUString SalInstanceComboBoxWithoutEdit::get_active_text() const
+{
+ return m_xComboBox->GetSelectedEntry();
+}
void SalInstanceComboBoxWithoutEdit::remove(int pos) { m_xComboBox->RemoveEntry(pos); }
void SalInstanceComboBoxWithoutEdit::insert(int pos, const OUString& rStr, const OUString* pId,
- const OUString* pIconName, VirtualDevice* pImageSurface)
+ const OUString* pIconName, VirtualDevice* pImageSurface)
{
auto nInsertPos = pos == -1 ? COMBOBOX_APPEND : pos;
sal_Int32 nInsertedAt;
@@ -6135,9 +6074,13 @@ void SalInstanceComboBoxWithoutEdit::set_entry_message_type(weld::EntryMessageTy
void SalInstanceComboBoxWithoutEdit::set_entry_text(const OUString& /*rText*/) { assert(false); }
-void SalInstanceComboBoxWithoutEdit::select_entry_region(int /*nStartPos*/, int /*nEndPos*/) { assert(false); }
+void SalInstanceComboBoxWithoutEdit::select_entry_region(int /*nStartPos*/, int /*nEndPos*/)
+{
+ assert(false);
+}
-bool SalInstanceComboBoxWithoutEdit::get_entry_selection_bounds(int& /*rStartPos*/, int& /*rEndPos*/)
+bool SalInstanceComboBoxWithoutEdit::get_entry_selection_bounds(int& /*rStartPos*/,
+ int& /*rEndPos*/)
{
assert(false);
return false;
@@ -6161,7 +6104,11 @@ void SalInstanceComboBoxWithoutEdit::paste_entry_clipboard() { assert(false); }
void SalInstanceComboBoxWithoutEdit::set_entry_font(const vcl::Font&) { assert(false); }
-vcl::Font SalInstanceComboBoxWithoutEdit::get_entry_font() { assert(false); return vcl::Font(); }
+vcl::Font SalInstanceComboBoxWithoutEdit::get_entry_font()
+{
+ assert(false);
+ return vcl::Font();
+}
void SalInstanceComboBoxWithoutEdit::set_custom_renderer(bool /*bOn*/)
{
@@ -6174,10 +6121,7 @@ int SalInstanceComboBoxWithoutEdit::get_max_mru_count() const
return 0;
}
-void SalInstanceComboBoxWithoutEdit::set_max_mru_count(int)
-{
- assert(false && "not implemented");
-}
+void SalInstanceComboBoxWithoutEdit::set_max_mru_count(int) { assert(false && "not implemented"); }
OUString SalInstanceComboBoxWithoutEdit::get_mru_entries() const
{
@@ -6205,8 +6149,9 @@ IMPL_LINK_NOARG(SalInstanceComboBoxWithoutEdit, SelectHdl, ListBox&, void)
return signal_changed();
}
-SalInstanceComboBoxWithEdit::SalInstanceComboBoxWithEdit(::ComboBox* pComboBox, SalInstanceBuilder* pBuilder,
- bool bTakeOwnership)
+SalInstanceComboBoxWithEdit::SalInstanceComboBoxWithEdit(::ComboBox* pComboBox,
+ SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
: SalInstanceComboBox<::ComboBox>(pComboBox, pBuilder, bTakeOwnership)
, m_aTextFilter(m_aEntryInsertTextHdl)
, m_bInSelect(false)
@@ -6245,15 +6190,14 @@ OUString SalInstanceComboBoxWithEdit::get_active_text() const { return m_xComboB
void SalInstanceComboBoxWithEdit::remove(int pos) { m_xComboBox->RemoveEntryAt(pos); }
void SalInstanceComboBoxWithEdit::insert(int pos, const OUString& rStr, const OUString* pId,
- const OUString* pIconName, VirtualDevice* pImageSurface)
+ const OUString* pIconName, VirtualDevice* pImageSurface)
{
auto nInsertPos = pos == -1 ? COMBOBOX_APPEND : pos;
sal_Int32 nInsertedAt;
if (!pIconName && !pImageSurface)
nInsertedAt = m_xComboBox->InsertEntry(rStr, nInsertPos);
else if (pIconName)
- nInsertedAt
- = m_xComboBox->InsertEntryWithImage(rStr, createImage(*pIconName), nInsertPos);
+ nInsertedAt = m_xComboBox->InsertEntryWithImage(rStr, createImage(*pIconName), nInsertPos);
else
nInsertedAt
= m_xComboBox->InsertEntryWithImage(rStr, createImage(*pImageSurface), nInsertPos);
@@ -6270,14 +6214,20 @@ void SalInstanceComboBoxWithEdit::insert_separator(int pos, const OUString& /*rI
m_xComboBox->AddSeparator(nInsertPos - 1);
}
-void SalInstanceComboBoxWithEdit::set_entry_text(const OUString& rText) { m_xComboBox->SetText(rText); }
+void SalInstanceComboBoxWithEdit::set_entry_text(const OUString& rText)
+{
+ m_xComboBox->SetText(rText);
+}
void SalInstanceComboBoxWithEdit::set_entry_width_chars(int nChars)
{
m_xComboBox->SetWidthInChars(nChars);
}
-void SalInstanceComboBoxWithEdit::set_entry_max_length(int nChars) { m_xComboBox->SetMaxTextLen(nChars); }
+void SalInstanceComboBoxWithEdit::set_entry_max_length(int nChars)
+{
+ m_xComboBox->SetMaxTextLen(nChars);
+}
void SalInstanceComboBoxWithEdit::set_entry_completion(bool bEnable, bool bCaseSensitive)
{
@@ -6294,20 +6244,11 @@ void SalInstanceComboBoxWithEdit::set_entry_editable(bool bEditable)
m_xComboBox->SetReadOnly(!bEditable);
}
-void SalInstanceComboBoxWithEdit::cut_entry_clipboard()
-{
- m_xComboBox->Cut();
-}
+void SalInstanceComboBoxWithEdit::cut_entry_clipboard() { m_xComboBox->Cut(); }
-void SalInstanceComboBoxWithEdit::copy_entry_clipboard()
-{
- m_xComboBox->Copy();
-}
+void SalInstanceComboBoxWithEdit::copy_entry_clipboard() { m_xComboBox->Copy(); }
-void SalInstanceComboBoxWithEdit::paste_entry_clipboard()
-{
- m_xComboBox->Paste();
-}
+void SalInstanceComboBoxWithEdit::paste_entry_clipboard() { m_xComboBox->Paste(); }
void SalInstanceComboBoxWithEdit::select_entry_region(int nStartPos, int nEndPos)
{
@@ -6359,10 +6300,7 @@ void SalInstanceComboBoxWithEdit::set_custom_renderer(bool bOn)
m_xComboBox->SetDropDownLineCount(nDropDownLineCount * fRatio);
}
-int SalInstanceComboBoxWithEdit::get_max_mru_count() const
-{
- return m_xComboBox->GetMaxMRUCount();
-}
+int SalInstanceComboBoxWithEdit::get_max_mru_count() const { return m_xComboBox->GetMaxMRUCount(); }
void SalInstanceComboBoxWithEdit::set_max_mru_count(int nCount)
{
@@ -6519,10 +6457,7 @@ public:
virtual bool changed_by_direct_pick() const override { return m_bTreeChange; }
- virtual void set_custom_renderer(bool /*bOn*/) override
- {
- assert(false && "not implemented");
- }
+ virtual void set_custom_renderer(bool /*bOn*/) override { assert(false && "not implemented"); }
virtual int get_max_mru_count() const override
{
@@ -6530,10 +6465,7 @@ public:
return 0;
}
- virtual void set_max_mru_count(int) override
- {
- assert(false && "not implemented");
- }
+ virtual void set_max_mru_count(int) override { assert(false && "not implemented"); }
virtual OUString get_mru_entries() const override
{
@@ -6541,10 +6473,7 @@ public:
return OUString();
}
- virtual void set_mru_entries(const OUString&) override
- {
- assert(false && "not implemented");
- }
+ virtual void set_mru_entries(const OUString&) override { assert(false && "not implemented"); }
virtual void set_item_menu(const OString&, weld::Menu*) override
{
@@ -6577,7 +6506,7 @@ IMPL_LINK(SalInstanceEntryTreeView, KeyPressListener, VclWindowEvent&, rEvent, v
const KeyEvent& rKeyEvent = *static_cast<KeyEvent*>(rEvent.GetData());
sal_uInt16 nKeyCode = rKeyEvent.GetKeyCode().GetCode();
if (!(nKeyCode == KEY_UP || nKeyCode == KEY_DOWN || nKeyCode == KEY_PAGEUP
- || nKeyCode == KEY_PAGEDOWN))
+ || nKeyCode == KEY_PAGEDOWN))
return;
m_pTreeView->disable_notify_events();
@@ -6626,7 +6555,8 @@ IMPL_LINK(SalInstanceEntryTreeView, AutocompleteHdl, Edit&, rEdit, void)
}
SalInstanceBuilder::SalInstanceBuilder(vcl::Window* pParent, const OUString& rUIRoot,
- const OUString& rUIFile, const css::uno::Reference<css::frame::XFrame>& rFrame)
+ const OUString& rUIFile,
+ const css::uno::Reference<css::frame::XFrame>& rFrame)
: weld::Builder()
, m_xBuilder(new VclBuilder(pParent, rUIRoot, rUIFile, OString(), rFrame, false))
{
@@ -6712,22 +6642,19 @@ std::unique_ptr<weld::Widget> SalInstanceBuilder::weld_widget(const OString& id)
std::unique_ptr<weld::Container> SalInstanceBuilder::weld_container(const OString& id)
{
vcl::Window* pContainer = m_xBuilder->get(id);
- return pContainer ? std::make_unique<SalInstanceContainer>(pContainer, this, false)
- : nullptr;
+ return pContainer ? std::make_unique<SalInstanceContainer>(pContainer, this, false) : nullptr;
}
std::unique_ptr<weld::Box> SalInstanceBuilder::weld_box(const OString& id)
{
VclBox* pContainer = m_xBuilder->get<VclBox>(id);
- return pContainer ? std::make_unique<SalInstanceBox>(pContainer, this, false)
- : nullptr;
+ return pContainer ? std::make_unique<SalInstanceBox>(pContainer, this, false) : nullptr;
}
std::unique_ptr<weld::Paned> SalInstanceBuilder::weld_paned(const OString& id)
{
VclPaned* pPaned = m_xBuilder->get<VclPaned>(id);
- return pPaned ? std::make_unique<SalInstancePaned>(pPaned, this, false)
- : nullptr;
+ return pPaned ? std::make_unique<SalInstancePaned>(pPaned, this, false) : nullptr;
}
std::unique_ptr<weld::Frame> SalInstanceBuilder::weld_frame(const OString& id)
@@ -6737,12 +6664,13 @@ std::unique_ptr<weld::Frame> SalInstanceBuilder::weld_frame(const OString& id)
return pRet;
}
-std::unique_ptr<weld::ScrolledWindow> SalInstanceBuilder::weld_scrolled_window(const OString& id, bool bUserManagedScrolling)
+std::unique_ptr<weld::ScrolledWindow>
+SalInstanceBuilder::weld_scrolled_window(const OString& id, bool bUserManagedScrolling)
{
VclScrolledWindow* pScrolledWindow = m_xBuilder->get<VclScrolledWindow>(id);
- return pScrolledWindow
- ? std::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, this, false, bUserManagedScrolling)
- : nullptr;
+ return pScrolledWindow ? std::make_unique<SalInstanceScrolledWindow>(
+ pScrolledWindow, this, false, bUserManagedScrolling)
+ : nullptr;
}
std::unique_ptr<weld::Notebook> SalInstanceBuilder::weld_notebook(const OString& id)
@@ -6768,46 +6696,41 @@ std::unique_ptr<weld::Button> SalInstanceBuilder::weld_button(const OString& id)
std::unique_ptr<weld::MenuButton> SalInstanceBuilder::weld_menu_button(const OString& id)
{
MenuButton* pButton = m_xBuilder->get<MenuButton>(id);
- return pButton ? std::make_unique<SalInstanceMenuButton>(pButton, this, false)
- : nullptr;
+ return pButton ? std::make_unique<SalInstanceMenuButton>(pButton, this, false) : nullptr;
}
-std::unique_ptr<weld::MenuToggleButton> SalInstanceBuilder::weld_menu_toggle_button(const OString& id)
+std::unique_ptr<weld::MenuToggleButton>
+SalInstanceBuilder::weld_menu_toggle_button(const OString& id)
{
MenuToggleButton* pButton = m_xBuilder->get<MenuToggleButton>(id);
- return pButton ? std::make_unique<SalInstanceMenuToggleButton>(pButton, this, false)
- : nullptr;
+ return pButton ? std::make_unique<SalInstanceMenuToggleButton>(pButton, this, false) : nullptr;
}
std::unique_ptr<weld::LinkButton> SalInstanceBuilder::weld_link_button(const OString& id)
{
FixedHyperlink* pButton = m_xBuilder->get<FixedHyperlink>(id);
- return pButton ? std::make_unique<SalInstanceLinkButton>(pButton, this, false)
- : nullptr;
+ return pButton ? std::make_unique<SalInstanceLinkButton>(pButton, this, false) : nullptr;
}
std::unique_ptr<weld::ToggleButton> SalInstanceBuilder::weld_toggle_button(const OString& id)
{
PushButton* pToggleButton = m_xBuilder->get<PushButton>(id);
- return pToggleButton
- ? std::make_unique<SalInstanceToggleButton>(pToggleButton, this, false)
- : nullptr;
+ return pToggleButton ? std::make_unique<SalInstanceToggleButton>(pToggleButton, this, false)
+ : nullptr;
}
std::unique_ptr<weld::RadioButton> SalInstanceBuilder::weld_radio_button(const OString& id)
{
RadioButton* pRadioButton = m_xBuilder->get<RadioButton>(id);
- return pRadioButton
- ? std::make_unique<SalInstanceRadioButton>(pRadioButton, this, false)
- : nullptr;
+ return pRadioButton ? std::make_unique<SalInstanceRadioButton>(pRadioButton, this, false)
+ : nullptr;
}
std::unique_ptr<weld::CheckButton> SalInstanceBuilder::weld_check_button(const OString& id)
{
CheckBox* pCheckButton = m_xBuilder->get<CheckBox>(id);
- return pCheckButton
- ? std::make_unique<SalInstanceCheckButton>(pCheckButton, this, false)
- : nullptr;
+ return pCheckButton ? std::make_unique<SalInstanceCheckButton>(pCheckButton, this, false)
+ : nullptr;
}
std::unique_ptr<weld::Scale> SalInstanceBuilder::weld_scale(const OString& id)
@@ -6819,15 +6742,13 @@ std::unique_ptr<weld::Scale> SalInstanceBuilder::weld_scale(const OString& id)
std::unique_ptr<weld::ProgressBar> SalInstanceBuilder::weld_progress_bar(const OString& id)
{
::ProgressBar* pProgress = m_xBuilder->get<::ProgressBar>(id);
- return pProgress ? std::make_unique<SalInstanceProgressBar>(pProgress, this, false)
- : nullptr;
+ return pProgress ? std::make_unique<SalInstanceProgressBar>(pProgress, this, false) : nullptr;
}
std::unique_ptr<weld::Spinner> SalInstanceBuilder::weld_spinner(const OString& id)
{
Throbber* pThrobber = m_xBuilder->get<Throbber>(id);
- return pThrobber ? std::make_unique<SalInstanceSpinner>(pThrobber, this, false)
- : nullptr;
+ return pThrobber ? std::make_unique<SalInstanceSpinner>(pThrobber, this, false) : nullptr;
}
std::unique_ptr<weld::Image> SalInstanceBuilder::weld_image(const OString& id)
@@ -6839,8 +6760,7 @@ std::unique_ptr<weld::Image> SalInstanceBuilder::weld_image(const OString& id)
std::unique_ptr<weld::Calendar> SalInstanceBuilder::weld_calendar(const OString& id)
{
Calendar* pCalendar = m_xBuilder->get<Calendar>(id);
- return pCalendar ? std::make_unique<SalInstanceCalendar>(pCalendar, this, false)
- : nullptr;
+ return pCalendar ? std::make_unique<SalInstanceCalendar>(pCalendar, this, false) : nullptr;
}
std::unique_ptr<weld::Entry> SalInstanceBuilder::weld_entry(const OString& id)
@@ -6872,9 +6792,8 @@ std::unique_ptr<weld::FormattedSpinButton>
SalInstanceBuilder::weld_formatted_spin_button(const OString& id)
{
FormattedField* pSpinButton = m_xBuilder->get<FormattedField>(id);
- return pSpinButton
- ? std::make_unique<SalInstanceFormattedSpinButton>(pSpinButton, this, false)
- : nullptr;
+ return pSpinButton ? std::make_unique<SalInstanceFormattedSpinButton>(pSpinButton, this, false)
+ : nullptr;
}
std::unique_ptr<weld::ComboBox> SalInstanceBuilder::weld_combo_box(const OString& id)
@@ -6884,9 +6803,8 @@ std::unique_ptr<weld::ComboBox> SalInstanceBuilder::weld_combo_box(const OString
if (pComboBox)
return std::make_unique<SalInstanceComboBoxWithEdit>(pComboBox, this, false);
ListBox* pListBox = dynamic_cast<ListBox*>(pWidget);
- return pListBox
- ? std::make_unique<SalInstanceComboBoxWithoutEdit>(pListBox, this, false)
- : nullptr;
+ return pListBox ? std::make_unique<SalInstanceComboBoxWithoutEdit>(pListBox, this, false)
+ : nullptr;
}
std::unique_ptr<weld::EntryTreeView>
@@ -6894,24 +6812,22 @@ SalInstanceBuilder::weld_entry_tree_view(const OString& containerid, const OStri
const OString& treeviewid)
{
vcl::Window* pContainer = m_xBuilder->get(containerid);
- return pContainer ? std::make_unique<SalInstanceEntryTreeView>(
- pContainer, this, false, weld_entry(entryid),
- weld_tree_view(treeviewid))
+ return pContainer ? std::make_unique<SalInstanceEntryTreeView>(pContainer, this, false,
+ weld_entry(entryid),
+ weld_tree_view(treeviewid))
: nullptr;
}
std::unique_ptr<weld::TreeView> SalInstanceBuilder::weld_tree_view(const OString& id)
{
SvTabListBox* pTreeView = m_xBuilder->get<SvTabListBox>(id);
- return pTreeView ? std::make_unique<SalInstanceTreeView>(pTreeView, this, false)
- : nullptr;
+ return pTreeView ? std::make_unique<SalInstanceTreeView>(pTreeView, this, false) : nullptr;
}
std::unique_ptr<weld::IconView> SalInstanceBuilder::weld_icon_view(const OString& id)
{
IconView* pIconView = m_xBuilder->get<IconView>(id);
- return pIconView ? std::make_unique<SalInstanceIconView>(pIconView, this, false)
- : nullptr;
+ return pIconView ? std::make_unique<SalInstanceIconView>(pIconView, this, false) : nullptr;
}
std::unique_ptr<weld::Label> SalInstanceBuilder::weld_label(const OString& id)
@@ -6923,15 +6839,13 @@ std::unique_ptr<weld::Label> SalInstanceBuilder::weld_label(const OString& id)
std::unique_ptr<weld::TextView> SalInstanceBuilder::weld_text_view(const OString& id)
{
VclMultiLineEdit* pTextView = m_xBuilder->get<VclMultiLineEdit>(id);
- return pTextView ? std::make_unique<SalInstanceTextView>(pTextView, this, false)
- : nullptr;
+ return pTextView ? std::make_unique<SalInstanceTextView>(pTextView, this, false) : nullptr;
}
std::unique_ptr<weld::Expander> SalInstanceBuilder::weld_expander(const OString& id)
{
VclExpander* pExpander = m_xBuilder->get<VclExpander>(id);
- return pExpander ? std::make_unique<SalInstanceExpander>(pExpander, this, false)
- : nullptr;
+ return pExpander ? std::make_unique<SalInstanceExpander>(pExpander, this, false) : nullptr;
}
std::unique_ptr<weld::DrawingArea>
@@ -6939,10 +6853,10 @@ SalInstanceBuilder::weld_drawing_area(const OString& id, const a11yref& rA11yImp
FactoryFunction pUITestFactoryFunction, void* pUserData)
{
VclDrawingArea* pDrawingArea = m_xBuilder->get<VclDrawingArea>(id);
- return pDrawingArea ? std::make_unique<SalInstanceDrawingArea>(pDrawingArea, this, rA11yImpl,
- pUITestFactoryFunction,
- pUserData, false)
- : nullptr;
+ return pDrawingArea
+ ? std::make_unique<SalInstanceDrawingArea>(pDrawingArea, this, rA11yImpl,
+ pUITestFactoryFunction, pUserData, false)
+ : nullptr;
}
std::unique_ptr<weld::Menu> SalInstanceBuilder::weld_menu(const OString& id)
@@ -6954,8 +6868,7 @@ std::unique_ptr<weld::Menu> SalInstanceBuilder::weld_menu(const OString& id)
std::unique_ptr<weld::Toolbar> SalInstanceBuilder::weld_toolbar(const OString& id)
{
ToolBox* pToolBox = m_xBuilder->get<ToolBox>(id);
- return pToolBox ? std::make_unique<SalInstanceToolbar>(pToolBox, this, false)
- : nullptr;
+ return pToolBox ? std::make_unique<SalInstanceToolbar>(pToolBox, this, false) : nullptr;
}
std::unique_ptr<weld::SizeGroup> SalInstanceBuilder::create_size_group()
diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx
index 5d1c28e20d68..024ba9ebcd1e 100644
--- a/vcl/source/app/sound.cxx
+++ b/vcl/source/app/sound.cxx
@@ -27,7 +27,7 @@
void Sound::Beep()
{
// #i91990#
- if ( Application::IsHeadlessModeEnabled() )
+ if (Application::IsHeadlessModeEnabled())
return;
vcl::Window* pWindow = ImplGetDefaultWindow();
diff --git a/vcl/source/bitmap/bitmapfilter.cxx b/vcl/source/bitmap/bitmapfilter.cxx
index 58a01f1fb007..70d9cdd62dc1 100644
--- a/vcl/source/bitmap/bitmapfilter.cxx
+++ b/vcl/source/bitmap/bitmapfilter.cxx
@@ -17,7 +17,7 @@ BitmapFilter::BitmapFilter() {}
BitmapFilter::~BitmapFilter() {}
-bool BitmapFilter::Filter(BitmapEx& rBmpEx, BitmapFilter const & rFilter)
+bool BitmapFilter::Filter(BitmapEx& rBmpEx, BitmapFilter const& rFilter)
{
BitmapEx aTmpBmpEx(rFilter.execute(rBmpEx));
@@ -31,7 +31,7 @@ bool BitmapFilter::Filter(BitmapEx& rBmpEx, BitmapFilter const & rFilter)
return true;
}
-bool BitmapFilter::Filter(Animation& rAnimation, BitmapFilter const & rFilter)
+bool BitmapFilter::Filter(Animation& rAnimation, BitmapFilter const& rFilter)
{
SAL_WARN_IF(rAnimation.IsInAnimation(), "vcl", "Animation modified while it is animated");
diff --git a/vcl/source/control/thumbpos.hxx b/vcl/source/control/thumbpos.hxx
index 13e24fe6044e..e7048f35fc27 100644
--- a/vcl/source/control/thumbpos.hxx
+++ b/vcl/source/control/thumbpos.hxx
@@ -10,11 +10,12 @@
#ifndef INCLUDED_VCL_SOURCE_CONTROL_THUMBPOS_HXX
#define INCLUDED_VCL_SOURCE_CONTROL_THUMBPOS_HXX
-inline tools::Long ImplMulDiv( tools::Long nNumber, tools::Long nNumerator, tools::Long nDenominator )
+inline tools::Long ImplMulDiv(tools::Long nNumber, tools::Long nNumerator, tools::Long nDenominator)
{
if (!nDenominator)
return 0;
- double n = (static_cast<double>(nNumber) * static_cast<double>(nNumerator)) / static_cast<double>(nDenominator);
+ double n = (static_cast<double>(nNumber) * static_cast<double>(nNumerator))
+ / static_cast<double>(nDenominator);
return static_cast<tools::Long>(n);
}
diff --git a/vcl/source/filter/graphicfilter_internal.hxx b/vcl/source/filter/graphicfilter_internal.hxx
index cf8443f505ed..87f328fceabd 100644
--- a/vcl/source/filter/graphicfilter_internal.hxx
+++ b/vcl/source/filter/graphicfilter_internal.hxx
@@ -23,7 +23,7 @@
#include <tools/solar.h>
#include <tools/stream.hxx>
-sal_uInt8* ImplSearchEntry( sal_uInt8*, sal_uInt8 const *, sal_uLong, sal_uLong );
+sal_uInt8* ImplSearchEntry(sal_uInt8*, sal_uInt8 const*, sal_uLong, sal_uLong);
extern bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen);
diff --git a/vcl/source/filter/igif/gifread.hxx b/vcl/source/filter/igif/gifread.hxx
index 25e72f6cc3d2..def223483883 100644
--- a/vcl/source/filter/igif/gifread.hxx
+++ b/vcl/source/filter/igif/gifread.hxx
@@ -22,7 +22,7 @@
#include <vcl/graph.hxx>
-VCL_DLLPUBLIC bool ImportGIF( SvStream& rStream, Graphic& rGraphic );
+VCL_DLLPUBLIC bool ImportGIF(SvStream& rStream, Graphic& rGraphic);
bool IsGIFAnimated(SvStream& rStream);
#endif // INCLUDED_VCL_SOURCE_FILTER_IGIF_GIFREAD_HXX
diff --git a/vcl/source/filter/ixbm/xbmread.hxx b/vcl/source/filter/ixbm/xbmread.hxx
index 6d9a7094b899..bee3eadc9406 100644
--- a/vcl/source/filter/ixbm/xbmread.hxx
+++ b/vcl/source/filter/ixbm/xbmread.hxx
@@ -22,7 +22,7 @@
#include <vcl/graph.hxx>
-VCL_DLLPUBLIC bool ImportXBM( SvStream& rStream, Graphic& rGraphic );
+VCL_DLLPUBLIC bool ImportXBM(SvStream& rStream, Graphic& rGraphic);
#endif // INCLUDED_VCL_SOURCE_FILTER_IXBM_XBMREAD_HXX
diff --git a/vcl/source/filter/ixpm/xpmread.hxx b/vcl/source/filter/ixpm/xpmread.hxx
index 1d7a071c3cf5..b9f7bf5cd7d8 100644
--- a/vcl/source/filter/ixpm/xpmread.hxx
+++ b/vcl/source/filter/ixpm/xpmread.hxx
@@ -24,7 +24,7 @@
class Graphic;
-VCL_DLLPUBLIC bool ImportXPM( SvStream& rStream, Graphic& rGraphic );
+VCL_DLLPUBLIC bool ImportXPM(SvStream& rStream, Graphic& rGraphic);
#endif // INCLUDED_VCL_SOURCE_FILTER_IXPM_XPMREAD_HXX
diff --git a/vcl/source/filter/jpeg/JpegTransform.hxx b/vcl/source/filter/jpeg/JpegTransform.hxx
index ed5d550276fa..682eb29b8a3f 100644
--- a/vcl/source/filter/jpeg/JpegTransform.hxx
+++ b/vcl/source/filter/jpeg/JpegTransform.hxx
@@ -24,12 +24,11 @@
class JpegTransform final
{
- Degree10 maRotate;
- SvStream& mrInputStream;
- SvStream& mrOutputStream;
+ Degree10 maRotate;
+ SvStream& mrInputStream;
+ SvStream& mrOutputStream;
public:
-
JpegTransform(SvStream& rInputStream, SvStream& rOutputStream);
~JpegTransform();
diff --git a/vcl/source/filter/jpeg/jinclude.h b/vcl/source/filter/jpeg/jinclude.h
index 5bd55a6e3a7c..b863b11c43c2 100644
--- a/vcl/source/filter/jpeg/jinclude.h
+++ b/vcl/source/filter/jpeg/jinclude.h
@@ -16,8 +16,8 @@
/* Include auto-config file to find out which system include files we need. */
-#include <jconfig.h> /* auto configuration options */
-#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
+#include <jconfig.h> /* auto configuration options */
+#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
/*
* We need the NULL macro and size_t typedef.
@@ -57,14 +57,14 @@
#ifdef NEED_BSD_STRINGS
#include <strings.h>
-#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size))
-#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size))
+#define MEMZERO(target, size) bzero((void*)(target), (size_t)(size))
+#define MEMCOPY(dest, src, size) bcopy((const void*)(src), (void*)(dest), (size_t)(size))
#else /* not BSD, assume ANSI/SysV string lib */
#include <string.h>
-#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size))
-#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size))
+#define MEMZERO(target, size) memset((void*)(target), 0, (size_t)(size))
+#define MEMCOPY(dest, src, size) memcpy((void*)(dest), (const void*)(src), (size_t)(size))
#endif
@@ -76,6 +76,4 @@
* we always use this SIZEOF() macro in place of using sizeof() directly.
*/
-#define SIZEOF(object) ((size_t) sizeof(object))
-
-
+#define SIZEOF(object) ((size_t)sizeof(object))
diff --git a/vcl/source/filter/png/pngwrite.cxx b/vcl/source/filter/png/pngwrite.cxx
index 740f84830614..e504f179cc9d 100644
--- a/vcl/source/filter/png/pngwrite.cxx
+++ b/vcl/source/filter/png/pngwrite.cxx
@@ -44,23 +44,17 @@
namespace vcl
{
-
class PNGWriterImpl
{
public:
-
PNGWriterImpl(const BitmapEx& BmpEx,
const css::uno::Sequence<css::beans::PropertyValue>* pFilterData);
bool Write(SvStream& rOutStream);
- std::vector<vcl::PNGWriter::ChunkData>& GetChunks()
- {
- return maChunkSeq;
- }
+ std::vector<vcl::PNGWriter::ChunkData>& GetChunks() { return maChunkSeq; }
private:
-
std::vector<vcl::PNGWriter::ChunkData> maChunkSeq;
sal_Int32 mnCompLevel;
@@ -72,16 +66,17 @@ private:
BitmapReadAccess* mpMaskAccess;
ZCodec mpZCodec;
- std::unique_ptr<sal_uInt8[]> mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
- std::unique_ptr<sal_uInt8[]> mpPreviousScan; // as big as mpDeflateInBuf
+ std::unique_ptr<sal_uInt8[]>
+ mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ std::unique_ptr<sal_uInt8[]> mpPreviousScan; // as big as mpDeflateInBuf
std::unique_ptr<sal_uInt8[]> mpCurrentScan;
sal_uLong mnDeflateInSize;
sal_uLong mnWidth;
sal_uLong mnHeight;
sal_uInt8 mnBitsPerPixel;
- sal_uInt8 mnFilterType; // 0 or 4;
- sal_uLong mnBBP; // bytes per pixel ( needed for filtering )
+ sal_uInt8 mnFilterType; // 0 or 4;
+ sal_uLong mnBBP; // bytes per pixel ( needed for filtering )
bool mbTrueAlpha;
void ImplWritepHYs(const BitmapEx& rBitmapEx);
@@ -94,11 +89,11 @@ private:
void ImplOpenChunk(sal_uLong nChunkType);
void ImplWriteChunk(sal_uInt8 nNumb);
void ImplWriteChunk(sal_uInt32 nNumb);
- void ImplWriteChunk(unsigned char const * pSource, sal_uInt32 nDatSize);
+ void ImplWriteChunk(unsigned char const* pSource, sal_uInt32 nDatSize);
};
-PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBitmapEx,
- const css::uno::Sequence<css::beans::PropertyValue>* pFilterData )
+PNGWriterImpl::PNGWriterImpl(const BitmapEx& rBitmapEx,
+ const css::uno::Sequence<css::beans::PropertyValue>* pFilterData)
: mnCompLevel(PNG_DEF_COMPRESSION)
, mnInterlaced(0)
, mnMaxChunkSize(0)
@@ -153,7 +148,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBitmapEx,
{
if (mnBitsPerPixel <= 8 && aBitmapEx.IsAlpha())
{
- aBmp.Convert( BmpConversion::N24Bit );
+ aBmp.Convert(BmpConversion::N24Bit);
mnBitsPerPixel = 24;
}
@@ -260,7 +255,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBitmapEx,
bool PNGWriterImpl::Write(SvStream& rOStm)
{
- /* png signature is always an array of 8 bytes */
+ /* png signature is always an array of 8 bytes */
SvStreamEndian nOldMode = rOStm.GetEndian();
rOStm.SetEndian(SvStreamEndian::BIG);
rOStm.WriteUInt32(0x89504e47);
@@ -269,9 +264,9 @@ bool PNGWriterImpl::Write(SvStream& rOStm)
for (auto const& chunk : maChunkSeq)
{
sal_uInt32 nType = chunk.nType;
- #if defined(__LITTLEENDIAN) || defined(OSL_LITENDIAN)
+#if defined(__LITTLEENDIAN) || defined(OSL_LITENDIAN)
nType = OSL_SWAPDWORD(nType);
- #endif
+#endif
sal_uInt32 nCRC = rtl_crc32(0, &nType, 4);
sal_uInt32 nDataSize = chunk.aData.size();
if (nDataSize)
@@ -286,7 +281,6 @@ bool PNGWriterImpl::Write(SvStream& rOStm)
return mbStatus;
}
-
bool PNGWriterImpl::ImplWriteHeader()
{
ImplOpenChunk(PNGCHUNK_IHDR);
@@ -305,9 +299,9 @@ bool PNGWriterImpl::ImplWriteHeader()
sal_uInt8 nColorType = 2; // colortype:
- // bit 0 -> palette is used
+ // bit 0 -> palette is used
if (mpAccess->HasPalette()) // bit 1 -> color is used
- nColorType |= 1; // bit 2 -> alpha channel is used
+ nColorType |= 1; // bit 2 -> alpha channel is used
else
nBitDepth /= 3;
@@ -335,7 +329,7 @@ void PNGWriterImpl::ImplWritePalette()
ImplOpenChunk(PNGCHUNK_PLTE);
- for ( sal_uLong i = 0; i < nCount; i++ )
+ for (sal_uLong i = 0; i < nCount; i++)
{
const BitmapColor& rColor = mpAccess->GetPaletteColor(i);
*pTmp++ = rColor.GetRed();
@@ -353,7 +347,8 @@ void PNGWriterImpl::ImplWriteTransparent()
for (sal_uLong n = 0; n <= nTransIndex; n++)
{
- ImplWriteChunk((nTransIndex == n) ? static_cast<sal_uInt8>(0x0) : static_cast<sal_uInt8>(0xff));
+ ImplWriteChunk((nTransIndex == n) ? static_cast<sal_uInt8>(0x0)
+ : static_cast<sal_uInt8>(0xff));
}
}
@@ -367,8 +362,10 @@ void PNGWriterImpl::ImplWritepHYs(const BitmapEx& rBmpEx)
if (aPrefSize.Width() && aPrefSize.Height() && mnWidth && mnHeight)
{
ImplOpenChunk(PNGCHUNK_pHYs);
- sal_uInt32 nPrefSizeX = static_cast<sal_uInt32>(100000.0 / (static_cast<double>(aPrefSize.Width()) / mnWidth) + 0.5);
- sal_uInt32 nPrefSizeY = static_cast<sal_uInt32>(100000.0 / (static_cast<double>(aPrefSize.Height()) / mnHeight) + 0.5);
+ sal_uInt32 nPrefSizeX = static_cast<sal_uInt32>(
+ 100000.0 / (static_cast<double>(aPrefSize.Width()) / mnWidth) + 0.5);
+ sal_uInt32 nPrefSizeY = static_cast<sal_uInt32>(
+ 100000.0 / (static_cast<double>(aPrefSize.Height()) / mnHeight) + 0.5);
ImplWriteChunk(nPrefSizeX);
ImplWriteChunk(nPrefSizeY);
ImplWriteChunk(sal_uInt8(1)); // nMapUnit
@@ -453,7 +450,7 @@ void PNGWriterImpl::ImplWriteIDAT()
{
for (nY = 1; nY < mnHeight; nY += 2)
{
- mpZCodec.Write(aOStm, mpDeflateInBuf.get(), ImplGetFilter (nY));
+ mpZCodec.Write(aOStm, mpDeflateInBuf.get(), ImplGetFilter(nY));
}
}
}
@@ -468,11 +465,14 @@ void PNGWriterImpl::ImplWriteIDAT()
sal_uInt32 nIDATSize = aOStm.Tell();
sal_uInt32 nBytes, nBytesToWrite = nIDATSize;
- while(nBytesToWrite)
+ while (nBytesToWrite)
{
nBytes = nBytesToWrite <= mnMaxChunkSize ? nBytesToWrite : mnMaxChunkSize;
ImplOpenChunk(PNGCHUNK_IDAT);
- ImplWriteChunk(const_cast<unsigned char *>(static_cast<unsigned char const *>(aOStm.GetData())) + (nIDATSize - nBytesToWrite), nBytes);
+ ImplWriteChunk(
+ const_cast<unsigned char*>(static_cast<unsigned char const*>(aOStm.GetData()))
+ + (nIDATSize - nBytesToWrite),
+ nBytes);
nBytesToWrite -= nBytes;
}
}
@@ -481,7 +481,7 @@ void PNGWriterImpl::ImplWriteIDAT()
// appends to the currently used pass
// the complete size of scanline will be returned - in interlace mode zero is possible!
-sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLong nXAdd)
+sal_uLong PNGWriterImpl::ImplGetFilter(sal_uLong nY, sal_uLong nXStart, sal_uLong nXAdd)
{
sal_uInt8* pDest;
@@ -494,36 +494,37 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
{
*pDest++ = mnFilterType; // in this version the filter type is either 0 or 4
- if (mpAccess->HasPalette()) // alphachannel is not allowed by pictures including palette entries
+ if (mpAccess
+ ->HasPalette()) // alphachannel is not allowed by pictures including palette entries
{
switch (mnBitsPerPixel)
{
case 1:
{
- Scanline pScanline = mpAccess->GetScanline( nY );
+ Scanline pScanline = mpAccess->GetScanline(nY);
sal_uLong nX, nXIndex;
for (nX = nXStart, nXIndex = 0; nX < mnWidth; nX += nXAdd, nXIndex++)
{
sal_uLong nShift = (nXIndex & 7) ^ 7;
if (nShift == 7)
*pDest = mpAccess->GetIndexFromData(pScanline, nX) << nShift;
- else if (nShift == 0)
+ else if (nShift == 0)
*pDest++ |= mpAccess->GetIndexFromData(pScanline, nX) << nShift;
else
*pDest |= mpAccess->GetIndexFromData(pScanline, nX) << nShift;
}
- if ( (nXIndex & 7) != 0 )
- pDest++; // byte is not completely used, so the bufferpointer is to correct
+ if ((nXIndex & 7) != 0)
+ pDest++; // byte is not completely used, so the bufferpointer is to correct
}
break;
case 4:
{
- Scanline pScanline = mpAccess->GetScanline( nY );
+ Scanline pScanline = mpAccess->GetScanline(nY);
sal_uLong nX, nXIndex;
for (nX = nXStart, nXIndex = 0; nX < mnWidth; nX += nXAdd, nXIndex++)
{
- if(nXIndex & 1)
+ if (nXIndex & 1)
*pDest++ |= mpAccess->GetIndexFromData(pScanline, nX);
else
*pDest = mpAccess->GetIndexFromData(pScanline, nX) << 4;
@@ -535,17 +536,17 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
case 8:
{
- Scanline pScanline = mpAccess->GetScanline( nY );
+ Scanline pScanline = mpAccess->GetScanline(nY);
for (sal_uLong nX = nXStart; nX < mnWidth; nX += nXAdd)
{
- *pDest++ = mpAccess->GetIndexFromData( pScanline, nX );
+ *pDest++ = mpAccess->GetIndexFromData(pScanline, nX);
}
}
break;
- default :
+ default:
mbStatus = false;
- break;
+ break;
}
}
else
@@ -554,8 +555,8 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
{
if (mbTrueAlpha)
{
- Scanline pScanline = mpAccess->GetScanline( nY );
- Scanline pScanlineMask = mpMaskAccess->GetScanline( nY );
+ Scanline pScanline = mpAccess->GetScanline(nY);
+ Scanline pScanlineMask = mpMaskAccess->GetScanline(nY);
for (sal_uLong nX = nXStart; nX < mnWidth; nX += nXAdd)
{
const BitmapColor& rColor = mpAccess->GetPixelFromData(pScanline, nX);
@@ -568,8 +569,8 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
else
{
const BitmapColor aTrans(mpMaskAccess->GetBestMatchingColor(COL_WHITE));
- Scanline pScanline = mpAccess->GetScanline( nY );
- Scanline pScanlineMask = mpMaskAccess->GetScanline( nY );
+ Scanline pScanline = mpAccess->GetScanline(nY);
+ Scanline pScanlineMask = mpMaskAccess->GetScanline(nY);
for (sal_uLong nX = nXStart; nX < mnWidth; nX += nXAdd)
{
@@ -578,7 +579,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
*pDest++ = rColor.GetGreen();
*pDest++ = rColor.GetBlue();
- if(mpMaskAccess->GetPixelFromData(pScanlineMask, nX) == aTrans)
+ if (mpMaskAccess->GetPixelFromData(pScanlineMask, nX) == aTrans)
*pDest++ = 0;
else
*pDest++ = 0xff;
@@ -587,7 +588,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
}
else
{
- Scanline pScanline = mpAccess->GetScanline( nY );
+ Scanline pScanline = mpAccess->GetScanline(nY);
for (sal_uLong nX = nXStart; nX < mnWidth; nX += nXAdd)
{
const BitmapColor& rColor = mpAccess->GetPixelFromData(pScanline, nX);
@@ -606,9 +607,9 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
*pDest++ = 4; // filter type
sal_uInt8* p1 = mpCurrentScan.get() + 1; // Current Pixel
- sal_uInt8* p2 = p1 - mnBBP; // left pixel
- sal_uInt8* p3 = mpPreviousScan.get(); // upper pixel
- sal_uInt8* p4 = p3 - mnBBP; // upperleft Pixel;
+ sal_uInt8* p2 = p1 - mnBBP; // left pixel
+ sal_uInt8* p3 = mpPreviousScan.get(); // upper pixel
+ sal_uInt8* p4 = p3 - mnBBP; // upperleft Pixel;
while (pDest < mpDeflateInBuf.get() + mnDeflateInSize)
{
@@ -630,15 +631,15 @@ sal_uLong PNGWriterImpl::ImplGetFilter (sal_uLong nY, sal_uLong nXStart, sal_uLo
tools::Long npc = np - nc;
if (npa < 0)
- npa =-npa;
+ npa = -npa;
if (npb < 0)
- npb =-npb;
+ npb = -npb;
if (npc < 0)
- npc =-npc;
+ npc = -npc;
if (npa <= npb && npa <= npc)
*pDest++ = *p1++ - static_cast<sal_uInt8>(na);
- else if ( npb <= npc )
+ else if (npb <= npc)
*pDest++ = *p1++ - static_cast<sal_uInt8>(nb);
else
*pDest++ = *p1++ - static_cast<sal_uInt8>(nc);
@@ -664,18 +665,18 @@ void PNGWriterImpl::ImplClearFirstScanline()
memset(mpPreviousScan.get(), 0, mnDeflateInSize);
}
-void PNGWriterImpl::ImplOpenChunk (sal_uLong nChunkType)
+void PNGWriterImpl::ImplOpenChunk(sal_uLong nChunkType)
{
maChunkSeq.emplace_back();
maChunkSeq.back().nType = nChunkType;
}
-void PNGWriterImpl::ImplWriteChunk (sal_uInt8 nSource)
+void PNGWriterImpl::ImplWriteChunk(sal_uInt8 nSource)
{
maChunkSeq.back().aData.push_back(nSource);
}
-void PNGWriterImpl::ImplWriteChunk (sal_uInt32 nSource)
+void PNGWriterImpl::ImplWriteChunk(sal_uInt32 nSource)
{
vcl::PNGWriter::ChunkData& rChunkData = maChunkSeq.back();
rChunkData.aData.push_back(static_cast<sal_uInt8>(nSource >> 24));
@@ -684,7 +685,7 @@ void PNGWriterImpl::ImplWriteChunk (sal_uInt32 nSource)
rChunkData.aData.push_back(static_cast<sal_uInt8>(nSource));
}
-void PNGWriterImpl::ImplWriteChunk (unsigned char const * pSource, sal_uInt32 nDatSize)
+void PNGWriterImpl::ImplWriteChunk(unsigned char const* pSource, sal_uInt32 nDatSize)
{
if (nDatSize)
{
@@ -701,19 +702,11 @@ PNGWriter::PNGWriter(const BitmapEx& rBmpEx,
{
}
-PNGWriter::~PNGWriter()
-{
-}
+PNGWriter::~PNGWriter() {}
-bool PNGWriter::Write(SvStream& rStream)
-{
- return mpImpl->Write(rStream);
-}
+bool PNGWriter::Write(SvStream& rStream) { return mpImpl->Write(rStream); }
-std::vector<vcl::PNGWriter::ChunkData>& PNGWriter::GetChunks()
-{
- return mpImpl->GetChunks();
-}
+std::vector<vcl::PNGWriter::ChunkData>& PNGWriter::GetChunks() { return mpImpl->GetChunks(); }
} // namespace vcl
diff --git a/vcl/source/filter/wmf/wmfexternal.cxx b/vcl/source/filter/wmf/wmfexternal.cxx
index 4080d3f041fe..cc7dc3b1e972 100644
--- a/vcl/source/filter/wmf/wmfexternal.cxx
+++ b/vcl/source/filter/wmf/wmfexternal.cxx
@@ -21,16 +21,16 @@
#include <com/sun/star/beans/PropertyValue.hpp>
// formally known as WMF_EXTERNALHEADER
-WmfExternal::WmfExternal() :
- xExt(0),
- yExt(0),
- mapMode(0)
+WmfExternal::WmfExternal()
+ : xExt(0)
+ , yExt(0)
+ , mapMode(0)
{
}
-css::uno::Sequence< css::beans::PropertyValue > WmfExternal::getSequence() const
+css::uno::Sequence<css::beans::PropertyValue> WmfExternal::getSequence() const
{
- css::uno::Sequence< css::beans::PropertyValue > aSequence;
+ css::uno::Sequence<css::beans::PropertyValue> aSequence;
if (0 != xExt || 0 != yExt || 0 != mapMode)
{
@@ -46,7 +46,7 @@ css::uno::Sequence< css::beans::PropertyValue > WmfExternal::getSequence() const
return aSequence;
}
-bool WmfExternal::setSequence(const css::uno::Sequence< css::beans::PropertyValue >& rSequence)
+bool WmfExternal::setSequence(const css::uno::Sequence<css::beans::PropertyValue>& rSequence)
{
bool bRetval(false);
diff --git a/vcl/source/fontsubset/xlat.hxx b/vcl/source/fontsubset/xlat.hxx
index c9994b48fe18..61e8534b1ae5 100644
--- a/vcl/source/fontsubset/xlat.hxx
+++ b/vcl/source/fontsubset/xlat.hxx
@@ -28,11 +28,11 @@ namespace vcl
{
// TODO: sal_UCS4
- sal_uInt16 TranslateChar12(sal_uInt16);
- sal_uInt16 TranslateChar13(sal_uInt16);
- sal_uInt16 TranslateChar14(sal_uInt16);
- sal_uInt16 TranslateChar15(sal_uInt16);
- sal_uInt16 TranslateChar16(sal_uInt16);
+sal_uInt16 TranslateChar12(sal_uInt16);
+sal_uInt16 TranslateChar13(sal_uInt16);
+sal_uInt16 TranslateChar14(sal_uInt16);
+sal_uInt16 TranslateChar15(sal_uInt16);
+sal_uInt16 TranslateChar16(sal_uInt16);
}
#endif // INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index dcd449aa820d..0bf75b12d743 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -26,7 +26,7 @@
#include <bmpfast.hxx>
#include <bitmapwriteaccess.hxx>
-void BitmapWriteAccess::SetLineColor( const Color& rColor )
+void BitmapWriteAccess::SetLineColor(const Color& rColor)
{
if (rColor.GetTransparency() == 255)
{
@@ -45,12 +45,9 @@ void BitmapWriteAccess::SetLineColor( const Color& rColor )
}
}
-void BitmapWriteAccess::SetFillColor()
-{
- mpFillColor.reset();
-}
+void BitmapWriteAccess::SetFillColor() { mpFillColor.reset(); }
-void BitmapWriteAccess::SetFillColor( const Color& rColor )
+void BitmapWriteAccess::SetFillColor(const Color& rColor)
{
if (rColor.GetTransparency() == 255)
{
@@ -69,7 +66,7 @@ void BitmapWriteAccess::SetFillColor( const Color& rColor )
}
}
-void BitmapWriteAccess::Erase( const Color& rColor )
+void BitmapWriteAccess::Erase(const Color& rColor)
{
// convert the color format from RGB to palette index if needed
// TODO: provide and use Erase( BitmapColor& method)
@@ -101,7 +98,7 @@ void BitmapWriteAccess::Erase( const Color& rColor )
}
}
-void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
+void BitmapWriteAccess::DrawLine(const Point& rStart, const Point& rEnd)
{
if (!mpLineColor)
return;
@@ -119,13 +116,13 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
if (nEndY > nY)
{
- for (; nY <= nEndY; nY++ )
- SetPixel( nY, nX, rLineColor );
+ for (; nY <= nEndY; nY++)
+ SetPixel(nY, nX, rLineColor);
}
else
{
- for (; nY >= nEndY; nY-- )
- SetPixel( nY, nX, rLineColor );
+ for (; nY >= nEndY; nY--)
+ SetPixel(nY, nX, rLineColor);
}
}
else if (rStart.Y() == rEnd.Y())
@@ -149,8 +146,8 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
else
{
- const tools::Long nDX = std::abs( rEnd.X() - rStart.X() );
- const tools::Long nDY = std::abs( rEnd.Y() - rStart.Y() );
+ const tools::Long nDX = std::abs(rEnd.X() - rStart.X());
+ const tools::Long nDY = std::abs(rEnd.Y() - rStart.Y());
tools::Long nX1;
tools::Long nY1;
tools::Long nX2;
@@ -212,8 +209,8 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nY2 = rStart.Y();
}
- const tools::Long nDYX = (nDX - nDY) << 1;
- const tools::Long nDY2 = nDX << 1;
+ const tools::Long nDYX = (nDX - nDY) << 1;
+ const tools::Long nDY2 = nDX << 1;
tools::Long nD = nDY2 - nDY;
bool bPos = nX1 < nX2;
@@ -237,7 +234,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
}
-void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect )
+void BitmapWriteAccess::FillRect(const tools::Rectangle& rRect)
{
if (!mpFillColor)
return;
@@ -257,7 +254,7 @@ void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect )
for (tools::Long nY = nStartY; nY <= nEndY; nY++)
{
- Scanline pScanline = GetScanline( nY );
+ Scanline pScanline = GetScanline(nY);
for (tools::Long nX = nStartX; nX <= nEndX; nX++)
{
SetPixelOnData(pScanline, nX, rFillColor);
@@ -265,12 +262,12 @@ void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect )
}
}
-void BitmapWriteAccess::DrawRect( const tools::Rectangle& rRect )
+void BitmapWriteAccess::DrawRect(const tools::Rectangle& rRect)
{
if (mpFillColor)
FillRect(rRect);
- if (mpLineColor && (!mpFillColor || ( *mpFillColor != *mpLineColor)))
+ if (mpLineColor && (!mpFillColor || (*mpFillColor != *mpLineColor)))
{
DrawLine(rRect.TopLeft(), rRect.TopRight());
DrawLine(rRect.TopRight(), rRect.BottomRight());
diff --git a/vcl/source/gdi/extoutdevdata.cxx b/vcl/source/gdi/extoutdevdata.cxx
index 49f188c850f7..1bb84a66940a 100644
--- a/vcl/source/gdi/extoutdevdata.cxx
+++ b/vcl/source/gdi/extoutdevdata.cxx
@@ -21,11 +21,7 @@
namespace vcl
{
-
-ExtOutDevData::~ExtOutDevData()
-{
-}
-
+ExtOutDevData::~ExtOutDevData() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/salgdiimpl.cxx b/vcl/source/gdi/salgdiimpl.cxx
index 654ae90edf3d..622c86c395d7 100644
--- a/vcl/source/gdi/salgdiimpl.cxx
+++ b/vcl/source/gdi/salgdiimpl.cxx
@@ -19,8 +19,6 @@
#include <salgdiimpl.hxx>
-SalGraphicsImpl::~SalGraphicsImpl()
-{
-}
+SalGraphicsImpl::~SalGraphicsImpl() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 6cd1e1b469ba..6d39e9765c28 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -21,26 +21,26 @@
#include <svdata.hxx>
#include <sal/log.hxx>
-namespace vcl {
-
+namespace vcl
+{
DeleteOnDeinitBase::~DeleteOnDeinitBase()
{
ImplSVData* pSVData = ImplGetSVData();
- if( !pSVData )
+ if (!pSVData)
return;
- auto & rList = pSVData->maDeinitDeleteList;
+ auto& rList = pSVData->maDeinitDeleteList;
rList.erase(std::remove(rList.begin(), rList.end(), this), rList.end());
}
-void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
+void DeleteOnDeinitBase::addDeinitContainer(DeleteOnDeinitBase* i_pContainer)
{
ImplSVData* pSVData = ImplGetSVData();
- SAL_WARN_IF( pSVData->mbDeInit, "vcl", "DeleteOnDeinit added after DeiInitVCL !" );
- if( pSVData->mbDeInit )
+ SAL_WARN_IF(pSVData->mbDeInit, "vcl", "DeleteOnDeinit added after DeiInitVCL !");
+ if (pSVData->mbDeInit)
return;
- pSVData->maDeinitDeleteList.push_back( i_pContainer );
+ pSVData->maDeinitDeleteList.push_back(i_pContainer);
}
void DeleteOnDeinitBase::ImplDeleteOnDeInit()
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 16249bf44c9a..838cdf44c40c 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -23,19 +23,17 @@
using namespace vcl;
SolarThreadExecutor::SolarThreadExecutor()
- :m_aStart()
- ,m_aFinish()
- ,m_bTimeout( false )
+ : m_aStart()
+ , m_aFinish()
+ , m_bTimeout(false)
{
}
-SolarThreadExecutor::~SolarThreadExecutor()
-{
-}
+SolarThreadExecutor::~SolarThreadExecutor() {}
IMPL_LINK_NOARG(SolarThreadExecutor, worker, void*, void)
{
- if ( !m_bTimeout )
+ if (!m_bTimeout)
{
m_aStart.set();
doIt();
@@ -45,7 +43,7 @@ IMPL_LINK_NOARG(SolarThreadExecutor, worker, void*, void)
void SolarThreadExecutor::execute()
{
- if( Application::IsMainThread() )
+ if (Application::IsMainThread())
{
m_aStart.set();
doIt();
@@ -56,11 +54,11 @@ void SolarThreadExecutor::execute()
m_aStart.reset();
m_aFinish.reset();
SolarMutexReleaser aReleaser;
- ImplSVEvent * nEvent = Application::PostUserEvent( LINK( this, SolarThreadExecutor, worker ) );
+ ImplSVEvent* nEvent = Application::PostUserEvent(LINK(this, SolarThreadExecutor, worker));
if (m_aStart.wait() == osl::Condition::result_timeout)
{
m_bTimeout = true;
- Application::RemoveUserEvent( nEvent );
+ Application::RemoveUserEvent(nEvent);
}
else
{
diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx
index d03f6b2cd28b..06349efac5dd 100644
--- a/vcl/source/salmain/salmain.cxx
+++ b/vcl/source/salmain/salmain.cxx
@@ -26,7 +26,8 @@
#include <vcl/vclmain.hxx>
#include <vcl/svmain.hxx>
-SAL_IMPLEMENT_MAIN() {
+SAL_IMPLEMENT_MAIN()
+{
fire_glxtest_process();
tools::extendApplicationEnvironment();
vclmain::createApplication();
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index c462cc4ef70a..12bdd75165fe 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -22,25 +22,25 @@
#include <iconview.hxx>
#include "iconviewimpl.hxx"
-IconView::IconView( vcl::Window* pParent, WinBits nBits )
- : SvTreeListBox( pParent, nBits )
+IconView::IconView(vcl::Window* pParent, WinBits nBits)
+ : SvTreeListBox(pParent, nBits)
{
nColumns = 1;
mbCenterAndClipText = true;
- SetEntryHeight( 100 );
- SetEntryWidth( 100 );
+ SetEntryHeight(100);
+ SetEntryWidth(100);
- pImpl.reset( new IconViewImpl( this, GetModel(), GetStyle() ) );
+ pImpl.reset(new IconViewImpl(this, GetModel(), GetStyle()));
}
void IconView::Resize()
{
Size aBoxSize = Control::GetParent()->GetOutputSizePixel();
- if ( !aBoxSize.Width() )
+ if (!aBoxSize.Width())
return;
- SetSizePixel( aBoxSize );
+ SetSizePixel(aBoxSize);
nColumns = aBoxSize.Width() / nEntryWidth;
@@ -50,33 +50,32 @@ void IconView::Resize()
tools::Rectangle IconView::GetFocusRect(const SvTreeListEntry*, tools::Long nEntryPos)
{
Size aSize;
- aSize.setHeight( nEntryHeight );
- aSize.setWidth( nEntryWidth );
+ aSize.setHeight(nEntryHeight);
+ aSize.setWidth(nEntryWidth);
Point aPos;
- aPos.setX( 0 );
- aPos.setY( 0 );
+ aPos.setX(0);
+ aPos.setY(0);
tools::Rectangle aRect;
short nCols = GetColumnsCount();
- if(nCols)
+ if (nCols)
{
- aPos.setY( ( nEntryPos / nCols ) * nEntryHeight );
- aPos.setX( ( nEntryPos % nCols ) * nEntryWidth );
+ aPos.setY((nEntryPos / nCols) * nEntryHeight);
+ aPos.setX((nEntryPos % nCols) * nEntryWidth);
}
- aRect.SetPos( aPos );
- aRect.SetSize( aSize );
+ aRect.SetPos(aPos);
+ aRect.SetSize(aSize);
return aRect;
}
void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long nY,
- vcl::RenderContext& rRenderContext)
+ vcl::RenderContext& rRenderContext)
{
-
tools::Rectangle aRect; // multi purpose
pImpl->UpdateContextBmpWidthMax(&rEntry);
@@ -92,7 +91,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
bool bCurFontIsSel = false;
const WinBits nWindowStyle = GetStyle();
- const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus();
+ const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) != 0 && !HasFocus();
const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
vcl::Font aHighlightFont(rRenderContext.GetFont());
@@ -101,7 +100,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
Size aRectSize(nTempEntryWidth, nTempEntryHeight);
- SvViewDataEntry* pViewDataEntry = GetViewDataEntry( &rEntry );
+ SvViewDataEntry* pViewDataEntry = GetViewDataEntry(&rEntry);
sal_uInt16 nItemCount = rEntry.ItemCount();
sal_uInt16 nCurItem = 0;
@@ -121,8 +120,8 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
auto nItemHeight = SvLBoxItem::GetHeight(pViewDataEntry, nCurItem);
- aEntryPos.setX( nX );
- aEntryPos.setY( nY );
+ aEntryPos.setX(nX);
+ aEntryPos.setY(nY);
// set background pattern/color
@@ -134,7 +133,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
// if the face color is bright then the deactivate color is also bright
// -> so you can't see any deactivate selection
if (bHideSelection && !rSettings.GetFaceColor().IsBright()
- && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
+ && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
{
aNewWallColor = rSettings.GetDeactiveColor();
}
@@ -147,7 +146,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
}
aWallpaper.SetColor(aNewWallColor);
}
- else // no selection
+ else // no selection
{
if (bCurFontIsSel)
{
@@ -178,9 +177,9 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
}
// center vertically
- aEntryPos.AdjustY((nTempEntryHeight - nItemHeight) / 2 );
+ aEntryPos.AdjustY((nTempEntryHeight - nItemHeight) / 2);
- aEntryPos.AdjustY(15 );
+ aEntryPos.AdjustY(15);
pItem->Paint(aEntryPos, *this, rRenderContext, pViewDataEntry, rEntry);
@@ -190,21 +189,21 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
}
// draw icon
- if(nIconItem != nItemCount && nIconItem < nItemCount)
+ if (nIconItem != nItemCount && nIconItem < nItemCount)
{
SvLBoxItem* pItem = &rEntry.GetItem(nIconItem);
auto nItemWidth = pItem->GetWidth(this, pViewDataEntry, nIconItem);
auto nItemHeight = SvLBoxItem::GetHeight(pViewDataEntry, nIconItem);
- aEntryPos.setX( nX );
- aEntryPos.setY( nY );
+ aEntryPos.setX(nX);
+ aEntryPos.setY(nY);
// center horizontally
- aEntryPos.AdjustX((nTempEntryWidth - nItemWidth) / 2 );
+ aEntryPos.AdjustX((nTempEntryWidth - nItemWidth) / 2);
// center vertically
- aEntryPos.AdjustY((nTempEntryHeight - nItemHeight) / 2 );
+ aEntryPos.AdjustY((nTempEntryHeight - nItemHeight) / 2);
- aEntryPos.AdjustY( -10 );
+ aEntryPos.AdjustY(-10);
pItem->Paint(aEntryPos, *this, rRenderContext, pViewDataEntry, rEntry);
}
diff --git a/vcl/source/treelist/iconviewimpl.hxx b/vcl/source/treelist/iconviewimpl.hxx
index 70ec7eece285..9436324bc566 100644
--- a/vcl/source/treelist/iconviewimpl.hxx
+++ b/vcl/source/treelist/iconviewimpl.hxx
@@ -28,39 +28,39 @@ class Point;
class IconViewImpl : public SvImpLBox
{
public:
- IconViewImpl( SvTreeListBox* pTreeListBox, SvTreeList* pTreeList, WinBits nWinStyle );
+ IconViewImpl(SvTreeListBox* pTreeListBox, SvTreeList* pTreeList, WinBits nWinStyle);
- void KeyDown( bool bPageDown ) override;
+ void KeyDown(bool bPageDown) override;
- void KeyUp( bool bPageUp ) override;
+ void KeyUp(bool bPageUp) override;
Point GetEntryPosition(const SvTreeListEntry* pEntry) const override;
- SvTreeListEntry* GetClickedEntry( const Point& rPoint ) const override;
+ SvTreeListEntry* GetClickedEntry(const Point& rPoint) const override;
- bool IsEntryInView( SvTreeListEntry* pEntry ) const override;
+ bool IsEntryInView(SvTreeListEntry* pEntry) const override;
- void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
// returns 0 if position is just past the last entry
- SvTreeListEntry* GetEntry( const Point& rPoint ) const override;
+ SvTreeListEntry* GetEntry(const Point& rPoint) const override;
- void UpdateAll( bool bInvalidateCompleteView ) override;
+ void UpdateAll(bool bInvalidateCompleteView) override;
- bool KeyInput( const KeyEvent& ) override;
+ bool KeyInput(const KeyEvent&) override;
- void InvalidateEntry( tools::Long nId ) const override;
+ void InvalidateEntry(tools::Long nId) const override;
protected:
tools::Long GetEntryLine(const SvTreeListEntry* pEntry) const override;
void CursorUp() override;
void CursorDown() override;
- void PageDown( sal_uInt16 nDelta ) override;
- void PageUp( sal_uInt16 nDelta ) override;
+ void PageDown(sal_uInt16 nDelta) override;
+ void PageUp(sal_uInt16 nDelta) override;
void SyncVerThumb() override;
- void AdjustScrollBars( Size& rSize ) override;
+ void AdjustScrollBars(Size& rSize) override;
};
#endif // INCLUDED_VCL_SOURCE_INC_ICONVIEWIMPL_HXX
diff --git a/vcl/source/treelist/imap3.cxx b/vcl/source/treelist/imap3.cxx
index 32c6523e4cf6..073725f34b21 100644
--- a/vcl/source/treelist/imap3.cxx
+++ b/vcl/source/treelist/imap3.cxx
@@ -21,40 +21,38 @@
#include <tools/debug.hxx>
-
/******************************************************************************
|*
|* Ctor
|*
\******************************************************************************/
-IMapCompat::IMapCompat( SvStream& rStm, const StreamMode nStreamMode )
+IMapCompat::IMapCompat(SvStream& rStm, const StreamMode nStreamMode)
: pRWStm(&rStm)
, nCompatPos(0)
, nTotalSize(0)
, nStmMode(nStreamMode)
{
- DBG_ASSERT( nStreamMode == StreamMode::READ || nStreamMode == StreamMode::WRITE, "Wrong Mode!" );
+ DBG_ASSERT(nStreamMode == StreamMode::READ || nStreamMode == StreamMode::WRITE, "Wrong Mode!");
- if ( pRWStm->GetError() )
+ if (pRWStm->GetError())
return;
- if ( nStmMode == StreamMode::WRITE )
+ if (nStmMode == StreamMode::WRITE)
{
nCompatPos = pRWStm->Tell();
- pRWStm->SeekRel( 4 );
+ pRWStm->SeekRel(4);
nTotalSize = nCompatPos + 4;
}
else
{
sal_uInt32 nTotalSizeTmp;
- pRWStm->ReadUInt32( nTotalSizeTmp );
+ pRWStm->ReadUInt32(nTotalSizeTmp);
nTotalSize = nTotalSizeTmp;
nCompatPos = pRWStm->Tell();
}
}
-
/******************************************************************************
|*
|* Dtor
@@ -63,25 +61,24 @@ IMapCompat::IMapCompat( SvStream& rStm, const StreamMode nStreamMode )
IMapCompat::~IMapCompat()
{
- if ( pRWStm->GetError() )
+ if (pRWStm->GetError())
return;
- if ( nStmMode == StreamMode::WRITE )
+ if (nStmMode == StreamMode::WRITE)
{
const sal_uInt64 nEndPos = pRWStm->Tell();
- pRWStm->Seek( nCompatPos );
- pRWStm->WriteUInt32( nEndPos - nTotalSize );
- pRWStm->Seek( nEndPos );
+ pRWStm->Seek(nCompatPos);
+ pRWStm->WriteUInt32(nEndPos - nTotalSize);
+ pRWStm->Seek(nEndPos);
}
else
{
const sal_uInt64 nReadSize = pRWStm->Tell() - nCompatPos;
- if ( nTotalSize > nReadSize )
- pRWStm->SeekRel( nTotalSize - nReadSize );
+ if (nTotalSize > nReadSize)
+ pRWStm->SeekRel(nTotalSize - nReadSize);
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 31e8ea836040..9262302e8493 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -325,7 +325,7 @@ OUString StringMapToOUString(const std::map<OUString, OUString>& rParameters)
if (rParameters.empty())
return "";
- OUStringBuffer aParameterString(static_cast<int>(rParameters.size()*32));
+ OUStringBuffer aParameterString(static_cast<int>(rParameters.size() * 32));
aParameterString.append(" {");
for (std::map<OUString, OUString>::const_iterator itr = rParameters.begin();
@@ -391,8 +391,9 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
}
else if (rDescription.aKeyWord == "ValueSet")
{
- aLogLine = "Choose element with position " + GetValueInMapWithIndex(rDescription.aParameters, 0) +
- " in '" + rDescription.aID +"' from '" + rDescription.aParent + "'";
+ aLogLine = "Choose element with position "
+ + GetValueInMapWithIndex(rDescription.aParameters, 0) + " in '"
+ + rDescription.aID + "' from '" + rDescription.aParent + "'";
}
else if (rDescription.aAction == "SELECT" && rDescription.aID.isEmpty())
{
@@ -450,11 +451,8 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
}
else if (rDescription.aAction == "LAUNCH")
{
- aLogLine = "Launch"
- + GetKeyInMapWithIndex(rDescription.aParameters, 2)
- + " from Col "
- + GetValueInMapWithIndex(rDescription.aParameters, 2)
- + " and Row "
+ aLogLine = "Launch" + GetKeyInMapWithIndex(rDescription.aParameters, 2) + " from Col "
+ + GetValueInMapWithIndex(rDescription.aParameters, 2) + " and Row "
+ GetValueInMapWithIndex(rDescription.aParameters, 1);
}
else if (rDescription.aAction == "DELETE_CONTENT")
@@ -501,11 +499,11 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
else if (rDescription.aAction == "COMMENT")
{
OUString type = GetKeyInMapWithIndex(rDescription.aParameters, 0);
- if(type == "OPEN")
+ if (type == "OPEN")
{
aLogLine = "Open Comment";
}
- else if(type == "CLOSE")
+ else if (type == "CLOSE")
{
aLogLine = "Close Comment";
}
@@ -561,19 +559,24 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
}
else if (rDescription.aKeyWord == "SwEditWinUIObject")
{
- if(rDescription.aAction=="LEAVE"){
+ if (rDescription.aAction == "LEAVE")
+ {
aLogLine = "Leave '" + rDescription.aID + "'";
}
- else if(rDescription.aAction=="SHOW"){
+ else if (rDescription.aAction == "SHOW")
+ {
aLogLine = "Show '" + rDescription.aID + "'";
}
- else if(rDescription.aAction=="HIDE"){
+ else if (rDescription.aAction == "HIDE")
+ {
aLogLine = "Hide '" + rDescription.aID + "'";
}
- else if(rDescription.aAction=="DELETE"){
+ else if (rDescription.aAction == "DELETE")
+ {
aLogLine = "Delete '" + rDescription.aID + "'";
}
- else if(rDescription.aAction=="SETRESOLVED"){
+ else if (rDescription.aAction == "SETRESOLVED")
+ {
aLogLine = "Resolve '" + rDescription.aID + "'";
}
}
@@ -581,21 +584,26 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
{
aLogLine = "Select element no " + rDescription.aID + " From " + rDescription.aParent;
}
- else if(rDescription.aKeyWord == "MenuButton"){
- if(rDescription.aAction == "OPENLIST"){
+ else if (rDescription.aKeyWord == "MenuButton")
+ {
+ if (rDescription.aAction == "OPENLIST")
+ {
aLogLine = "Open List From " + rDescription.aID;
}
- else if(rDescription.aAction == "CLOSELIST"){
+ else if (rDescription.aAction == "CLOSELIST")
+ {
aLogLine = "Close List From " + rDescription.aID;
}
- else if(rDescription.aAction == "OPENFROMLIST"){
- aLogLine = "Select item no "+ GetValueInMapWithIndex(rDescription.aParameters, 0) +" From List of "+ rDescription.aID;
+ else if (rDescription.aAction == "OPENFROMLIST")
+ {
+ aLogLine = "Select item no " + GetValueInMapWithIndex(rDescription.aParameters, 0)
+ + " From List of " + rDescription.aID;
}
}
- else if(rDescription.aKeyWord == "VerticalTab"){
- aLogLine = "Choose Tab number " + GetValueInMapWithIndex(rDescription.aParameters, 0) +
- " in '" + rDescription.aID +
- "' from " + rDescription.aParent ;
+ else if (rDescription.aKeyWord == "VerticalTab")
+ {
+ aLogLine = "Choose Tab number " + GetValueInMapWithIndex(rDescription.aParameters, 0)
+ + " in '" + rDescription.aID + "' from " + rDescription.aParent;
}
else
{
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 7a75e8c439fb..29d79b0cd154 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -21,10 +21,12 @@
#include <vcl/abstdlg.hxx>
#include <vcl/bitmapex.hxx>
-typedef VclAbstractDialogFactory* (SAL_CALL* FuncPtrCreateDialogFactory)();
+typedef VclAbstractDialogFactory*(SAL_CALL* FuncPtrCreateDialogFactory)();
#ifndef DISABLE_DYNLOADING
-extern "C" { static void thisModule() {} }
+extern "C" {
+static void thisModule() {}
+}
#else
extern "C" VclAbstractDialogFactory* CreateDialogFactory();
#endif
@@ -38,7 +40,7 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY))
{
auto const p = reinterpret_cast<FuncPtrCreateDialogFactory>(
- aDialogLibrary.getFunctionSymbol( "CreateDialogFactory" ) );
+ aDialogLibrary.getFunctionSymbol("CreateDialogFactory"));
aDialogLibrary.release();
return p;
}
@@ -47,16 +49,14 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
return CreateDialogFactory;
#endif
}();
- if ( fp )
+ if (fp)
return fp();
return nullptr;
}
-VclAbstractDialog::~VclAbstractDialog()
-{
-}
+VclAbstractDialog::~VclAbstractDialog() {}
-bool VclAbstractDialog::StartExecuteAsync(AsyncContext &)
+bool VclAbstractDialog::StartExecuteAsync(AsyncContext&)
{
assert(false);
return false;
@@ -80,8 +80,6 @@ BitmapEx VclAbstractDialog::createScreenshot() const
return BitmapEx();
}
-VclAbstractDialogFactory::~VclAbstractDialogFactory()
-{
-}
+VclAbstractDialogFactory::~VclAbstractDialogFactory() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/debug.cxx b/vcl/source/window/debug.cxx
index 4b3d41137970..34645692383d 100644
--- a/vcl/source/window/debug.cxx
+++ b/vcl/source/window/debug.cxx
@@ -23,20 +23,20 @@
#include <window.h>
#ifdef DBG_UTIL
-const char* ImplDbgCheckWindow( const void* pObj )
+const char* ImplDbgCheckWindow(const void* pObj)
{
DBG_TESTSOLARMUTEX();
- const vcl::Window* pWindow = static_cast<vcl::Window const *>(pObj);
+ const vcl::Window* pWindow = static_cast<vcl::Window const*>(pObj);
- if ( (pWindow->GetType() < WindowType::FIRST) || (pWindow->GetType() > WindowType::LAST) )
+ if ((pWindow->GetType() < WindowType::FIRST) || (pWindow->GetType() > WindowType::LAST))
return "Window data overwrite";
// check window-chain
vcl::Window* pChild = pWindow->mpWindowImpl->mpFirstChild;
- while ( pChild )
+ while (pChild)
{
- if ( pChild->mpWindowImpl->mpParent != pWindow )
+ if (pChild->mpWindowImpl->mpParent != pWindow)
return "Child-Window-Parent wrong";
pChild = pChild->mpWindowImpl->mpNext;
}
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 934754aa4c49..3ac75eab0d7e 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -28,22 +28,19 @@ void IntroWindow::ImplInitIntroWindowData()
pSVData->mpIntroWindow = this;
}
-IntroWindow::IntroWindow( ) :
- WorkWindow( WindowType::INTROWINDOW )
+IntroWindow::IntroWindow()
+ : WorkWindow(WindowType::INTROWINDOW)
{
ImplInitIntroWindowData();
- WorkWindow::ImplInit( nullptr, WB_INTROWIN );
+ WorkWindow::ImplInit(nullptr, WB_INTROWIN);
}
-IntroWindow::~IntroWindow()
-{
- disposeOnce();
-}
+IntroWindow::~IntroWindow() { disposeOnce(); }
void IntroWindow::dispose()
{
ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->mpIntroWindow.get() == this )
+ if (pSVData->mpIntroWindow.get() == this)
pSVData->mpIntroWindow = nullptr;
WorkWindow::dispose();
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index c99d085f41e5..2410f4bbd4a6 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -24,16 +24,13 @@
WaitObject::~WaitObject()
{
- if ( mpWindow )
+ if (mpWindow)
mpWindow->LeaveWait();
}
-namespace vcl {
-
-Size Window::GetOptimalSize() const
+namespace vcl
{
- return Size();
-}
+Size Window::GetOptimalSize() const { return Size(); }
void Window::ImplAdjustNWFSizes()
{
diff --git a/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx b/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx
index 47986cf2050a..0b891de141c7 100644
--- a/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx
+++ b/vcl/unx/generic/gdi/nativewindowhandleprovider.cxx
@@ -9,9 +9,6 @@
#include <unx/nativewindowhandleprovider.hxx>
-NativeWindowHandleProvider::~NativeWindowHandleProvider()
-{
-}
-
+NativeWindowHandleProvider::~NativeWindowHandleProvider() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/print/prtsetup.hxx b/vcl/unx/generic/print/prtsetup.hxx
index e5d88c7e1668..6da7b9aa6757 100644
--- a/vcl/unx/generic/print/prtsetup.hxx
+++ b/vcl/unx/generic/print/prtsetup.hxx
@@ -33,7 +33,7 @@ class RTSDialog : public weld::GenericDialogController
friend class RTSPaperPage;
friend class RTSDevicePage;
- ::psp::PrinterInfo m_aJobData;
+ ::psp::PrinterInfo m_aJobData;
bool m_bDataModified;
@@ -43,21 +43,22 @@ class RTSDialog : public weld::GenericDialogController
std::unique_ptr<weld::Button> m_xCancelButton;
// pages
- std::unique_ptr<RTSPaperPage> m_xPaperPage;
+ std::unique_ptr<RTSPaperPage> m_xPaperPage;
std::unique_ptr<RTSDevicePage> m_xDevicePage;
- DECL_LINK(ActivatePage, const OString&, void );
- DECL_LINK(ClickButton, weld::Button&, void );
+ DECL_LINK(ActivatePage, const OString&, void);
+ DECL_LINK(ClickButton, weld::Button&, void);
// helper functions
void insertAllPPDValues(weld::ComboBox&, const psp::PPDParser*, const psp::PPDKey*);
+
public:
RTSDialog(const ::psp::PrinterInfo& rJobData, weld::Window* pParent);
virtual ~RTSDialog() override;
const ::psp::PrinterInfo& getSetup() const { return m_aJobData; }
- void SetDataModified( bool bModified ) { m_bDataModified = bModified; }
+ void SetDataModified(bool bModified) { m_bDataModified = bModified; }
bool GetDataModified() const { return m_bDataModified; }
};
@@ -66,7 +67,7 @@ class RTSPaperPage
private:
std::unique_ptr<weld::Builder> m_xBuilder;
- RTSDialog* m_pParent;
+ RTSDialog* m_pParent;
std::unique_ptr<weld::Widget> m_xContainer;
@@ -86,6 +87,7 @@ private:
DECL_LINK(SelectHdl, weld::ComboBox&, void);
DECL_LINK(CheckBoxHdl, weld::ToggleButton&, void);
+
public:
RTSPaperPage(weld::Widget* pPage, RTSDialog* pDialog);
~RTSPaperPage();
@@ -101,7 +103,7 @@ private:
std::unique_ptr<weld::Builder> m_xBuilder;
const psp::PPDValue* m_pCustomValue;
- RTSDialog* m_pParent;
+ RTSDialog* m_pParent;
std::unique_ptr<weld::Widget> m_xContainer;
std::unique_ptr<weld::TreeView> m_xPPDKeyBox;
@@ -112,14 +114,15 @@ private:
std::unique_ptr<weld::ComboBox> m_xSpaceBox;
std::unique_ptr<weld::ComboBox> m_xDepthBox;
- void FillValueBox( const ::psp::PPDKey* );
- void ValueBoxChanged( const ::psp::PPDKey* );
+ void FillValueBox(const ::psp::PPDKey*);
+ void ValueBoxChanged(const ::psp::PPDKey*);
Idle m_aReselectCustomIdle;
DECL_LINK(SelectHdl, weld::TreeView&, void);
DECL_LINK(ModifyHdl, weld::Entry&, void);
DECL_LINK(ImplHandleReselectHdl, Timer*, void);
+
public:
RTSDevicePage(weld::Widget* pPage, RTSDialog* pDialog);
~RTSDevicePage();
diff --git a/vcl/unx/gtk3/a11y/atkregistry.hxx b/vcl/unx/gtk3/a11y/atkregistry.hxx
index b692290847d8..6534c2840005 100644
--- a/vcl/unx/gtk3/a11y/atkregistry.hxx
+++ b/vcl/unx/gtk3/a11y/atkregistry.hxx
@@ -23,12 +23,14 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <atk/atk.h>
-AtkObject * ooo_wrapper_registry_get(const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible);
+AtkObject*
+ooo_wrapper_registry_get(const css::uno::Reference<css::accessibility::XAccessible>& rxAccessible);
-void ooo_wrapper_registry_add(const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible, AtkObject *obj);
+void ooo_wrapper_registry_add(
+ const css::uno::Reference<css::accessibility::XAccessible>& rxAccessible, AtkObject* obj);
void ooo_wrapper_registry_remove(
- css::uno::Reference<css::accessibility::XAccessible> const & pAccessible);
+ css::uno::Reference<css::accessibility::XAccessible> const& pAccessible);
#endif // __ATK_REGISTRY_HXX_
diff --git a/vcl/unx/gtk3/a11y/atktextattributes.hxx b/vcl/unx/gtk3/a11y/atktextattributes.hxx
index f86c82f4fe09..35dc661a6096 100644
--- a/vcl/unx/gtk3/a11y/atktextattributes.hxx
+++ b/vcl/unx/gtk3/a11y/atktextattributes.hxx
@@ -26,26 +26,22 @@
#include <atk/atk.h>
-AtkAttributeSet*
-attribute_set_new_from_property_values(
- const css::uno::Sequence< css::beans::PropertyValue >& rAttributeList,
- bool run_attributes_only,
- AtkText *text);
-
-AtkAttributeSet*
-attribute_set_new_from_extended_attributes(
- const css::uno::Reference< css::accessibility::XAccessibleExtendedAttributes >& rExtendedAttributes );
-
-bool
-attribute_set_map_to_property_values(
- AtkAttributeSet* attribute_set,
- css::uno::Sequence< css::beans::PropertyValue >& rValueList );
-
-AtkAttributeSet* attribute_set_prepend_misspelled( AtkAttributeSet* attribute_set );
+AtkAttributeSet* attribute_set_new_from_property_values(
+ const css::uno::Sequence<css::beans::PropertyValue>& rAttributeList, bool run_attributes_only,
+ AtkText* text);
+
+AtkAttributeSet* attribute_set_new_from_extended_attributes(
+ const css::uno::Reference<css::accessibility::XAccessibleExtendedAttributes>&
+ rExtendedAttributes);
+
+bool attribute_set_map_to_property_values(
+ AtkAttributeSet* attribute_set, css::uno::Sequence<css::beans::PropertyValue>& rValueList);
+
+AtkAttributeSet* attribute_set_prepend_misspelled(AtkAttributeSet* attribute_set);
// #i92232#
-AtkAttributeSet* attribute_set_prepend_tracked_change_insertion( AtkAttributeSet* attribute_set );
-AtkAttributeSet* attribute_set_prepend_tracked_change_deletion( AtkAttributeSet* attribute_set );
-AtkAttributeSet* attribute_set_prepend_tracked_change_formatchange( AtkAttributeSet* attribute_set );
+AtkAttributeSet* attribute_set_prepend_tracked_change_insertion(AtkAttributeSet* attribute_set);
+AtkAttributeSet* attribute_set_prepend_tracked_change_deletion(AtkAttributeSet* attribute_set);
+AtkAttributeSet* attribute_set_prepend_tracked_change_formatchange(AtkAttributeSet* attribute_set);
#endif
diff --git a/vcl/unx/gtk3/a11y/gtk3atkbridge.cxx b/vcl/unx/gtk3/a11y/gtk3atkbridge.cxx
index ddcc20f2037a..c7cb32ca3ce2 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkbridge.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkbridge.cxx
@@ -27,8 +27,6 @@ bool InitAtkBridge()
return true;
}
-void DeInitAtkBridge()
-{
-}
+void DeInitAtkBridge() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk3/fpicker/eventnotification.hxx b/vcl/unx/gtk3/fpicker/eventnotification.hxx
index 88a472e0e8ce..4a46ef0933c6 100644
--- a/vcl/unx/gtk3/fpicker/eventnotification.hxx
+++ b/vcl/unx/gtk3/fpicker/eventnotification.hxx
@@ -33,9 +33,10 @@
class CEventNotification
{
public:
- virtual ~CEventNotification() { };
+ virtual ~CEventNotification(){};
- virtual void SAL_CALL notifyEventListener( css::uno::Reference< css::uno::XInterface > xListener ) = 0;
+ virtual void SAL_CALL notifyEventListener(css::uno::Reference<css::uno::XInterface> xListener)
+ = 0;
};
#endif
diff --git a/vcl/win/dtrans/DtObjFactory.cxx b/vcl/win/dtrans/DtObjFactory.cxx
index 5a17d8b4c2e4..8fe03789b1f1 100644
--- a/vcl/win/dtrans/DtObjFactory.cxx
+++ b/vcl/win/dtrans/DtObjFactory.cxx
@@ -24,8 +24,9 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::lang;
-IDataObjectPtr CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext,
- const Reference< XTransferable >& refXTransferable)
+IDataObjectPtr
+CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext,
+ const Reference<XTransferable>& refXTransferable)
{
return (IDataObjectPtr(new CXTDataObject(rxContext, refXTransferable)));
}
diff --git a/vcl/win/dtrans/FmtFilter.hxx b/vcl/win/dtrans/FmtFilter.hxx
index 3c05c953c95d..b4fb1e1fc328 100644
--- a/vcl/win/dtrans/FmtFilter.hxx
+++ b/vcl/win/dtrans/FmtFilter.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <objidl.h>
@@ -33,29 +33,29 @@
input:
aMetaFilePict - a sequence of bytes containing a METAFILEPICT struct
------------------------------------------------------------------------*/
-css::uno::Sequence< sal_Int8 > WinMFPictToOOMFPict( css::uno::Sequence< sal_Int8 >& aMetaFilePict );
-css::uno::Sequence< sal_Int8 > WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile );
+css::uno::Sequence<sal_Int8> WinMFPictToOOMFPict(css::uno::Sequence<sal_Int8>& aMetaFilePict);
+css::uno::Sequence<sal_Int8> WinENHMFPictToOOMFPict(HENHMETAFILE hEnhMetaFile);
/*------------------------------------------------------------------------
input:
aByteStream - a sequence of bytes containing a LibreOffice metafile
picture with a leading METAFILEHEADER
------------------------------------------------------------------------*/
-HMETAFILEPICT OOMFPictToWinMFPict( css::uno::Sequence< sal_Int8 > const & aOOMetaFilePict );
-HENHMETAFILE OOMFPictToWinENHMFPict( css::uno::Sequence< sal_Int8 > const & aOOMetaFilePict );
+HMETAFILEPICT OOMFPictToWinMFPict(css::uno::Sequence<sal_Int8> const& aOOMetaFilePict);
+HENHMETAFILE OOMFPictToWinENHMFPict(css::uno::Sequence<sal_Int8> const& aOOMetaFilePict);
/*------------------------------------------------------------------------
input:
aWinDIB - sequence of bytes containing a windows device independent
bitmap
------------------------------------------------------------------------*/
-css::uno::Sequence< sal_Int8 > WinDIBToOOBMP( const css::uno::Sequence< sal_Int8 >& aWinDIB );
+css::uno::Sequence<sal_Int8> WinDIBToOOBMP(const css::uno::Sequence<sal_Int8>& aWinDIB);
/*------------------------------------------------------------------------
input:
aWinDIB - sequence of bytes containing a windows bitmap handle
------------------------------------------------------------------------*/
-css::uno::Sequence< sal_Int8 > WinBITMAPToOOBMP( HBITMAP );
+css::uno::Sequence<sal_Int8> WinBITMAPToOOBMP(HBITMAP);
/*------------------------------------------------------------------------
input:
@@ -63,7 +63,7 @@ css::uno::Sequence< sal_Int8 > WinBITMAPToOOBMP( HBITMAP );
May contain CF_DIBV5 or CF_DIB, but removing the BITMAPFILEHEADER
is always the same size
------------------------------------------------------------------------*/
-css::uno::Sequence< sal_Int8 > OOBmpToWinDIB( css::uno::Sequence< sal_Int8 >& aOOBmp );
+css::uno::Sequence<sal_Int8> OOBmpToWinDIB(css::uno::Sequence<sal_Int8>& aOOBmp);
/*------------------------------------------------------------------------
input:
@@ -72,13 +72,13 @@ css::uno::Sequence< sal_Int8 > OOBmpToWinDIB( css::uno::Sequence< sal_Int8 >& aO
the Format is described in the MSDN Library under HTML Clipboard
Format
------------------------------------------------------------------------*/
-css::uno::Sequence< sal_Int8 > TextHtmlToHTMLFormat( css::uno::Sequence< sal_Int8 > const & aTextHtml );
+css::uno::Sequence<sal_Int8> TextHtmlToHTMLFormat(css::uno::Sequence<sal_Int8> const& aTextHtml);
/**
Return a FileList in which Windows Shell Links (lnk) are resolved.
If for whatever reason a resolution is not possible leave the
original lnk file.
*/
-css::uno::Sequence< sal_Int8 > CF_HDROPToFileList(HGLOBAL hGlobal);
+css::uno::Sequence<sal_Int8> CF_HDROPToFileList(HGLOBAL hGlobal);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/ImplHelper.hxx b/vcl/win/dtrans/ImplHelper.hxx
index fbe2c7ae70e5..ffc160602e7a 100644
--- a/vcl/win/dtrans/ImplHelper.hxx
+++ b/vcl/win/dtrans/ImplHelper.hxx
@@ -23,7 +23,7 @@
#include <rtl/ustring.hxx>
#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <objidl.h>
@@ -31,8 +31,8 @@
// target device and formatetc helper
void DeleteTargetDevice(DVTARGETDEVICE* ptd);
bool CopyFormatEtc(LPFORMATETC petcDest, LPFORMATETC petcSrc);
-sal_Int32 CompareFormatEtc( const FORMATETC* pFetcLeft, const FORMATETC* pFetcRight);
-bool CompareTargetDevice(DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE const * ptdRight);
+sal_Int32 CompareFormatEtc(const FORMATETC* pFetcLeft, const FORMATETC* pFetcRight);
+bool CompareTargetDevice(DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE const* ptdRight);
DVTARGETDEVICE* CopyTargetDevice(DVTARGETDEVICE* ptdSrc);
// some codepage helper functions
@@ -40,35 +40,31 @@ DVTARGETDEVICE* CopyTargetDevice(DVTARGETDEVICE* ptdSrc);
// returns a windows codepage appropriate to the
// given mime charset parameter value
-sal_uInt32 getWinCPFromMimeCharset(
- const OUString& charset );
+sal_uInt32 getWinCPFromMimeCharset(const OUString& charset);
// returns a windows codepage appropriate to the
// given locale and locale type
-OUString getWinCPFromLocaleId(
- LCID lcid, LCTYPE lctype );
+OUString getWinCPFromLocaleId(LCID lcid, LCTYPE lctype);
// returns a mime charset parameter value appropriate
// to the given codepage, optional a prefix can be
// given, e.g. "windows-" or "cp"
-OUString getMimeCharsetFromWinCP(
- sal_uInt32 cp, const OUString& aPrefix );
+OUString getMimeCharsetFromWinCP(sal_uInt32 cp, const OUString& aPrefix);
// returns a mime charset parameter value appropriate
// to the given locale id and locale type, optional a
// prefix can be given, e.g. "windows-" or "cp"
-OUString getMimeCharsetFromLocaleId(
- LCID lcid, LCTYPE lctype, const OUString& aPrefix );
+OUString getMimeCharsetFromLocaleId(LCID lcid, LCTYPE lctype, const OUString& aPrefix);
// returns true, if a given codepage is an oem codepage
-bool IsOEMCP( sal_uInt32 codepage );
+bool IsOEMCP(sal_uInt32 codepage);
// converts a codepage into a string representation
-OUString cptostr( sal_uInt32 codepage );
+OUString cptostr(sal_uInt32 codepage);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/MimeAttrib.hxx b/vcl/win/dtrans/MimeAttrib.hxx
index dc8c3ef86fbb..33e53d779f01 100644
--- a/vcl/win/dtrans/MimeAttrib.hxx
+++ b/vcl/win/dtrans/MimeAttrib.hxx
@@ -23,9 +23,9 @@
const OUString TEXTPLAIN_PARAM_CHARSET("charset");
-const OUString PRE_WINDOWS_CODEPAGE ("windows");
-const OUString PRE_OEM_CODEPAGE ("cp");
-const OUString CHARSET_UTF16 ("utf-16");
-const OUString CHARSET_UNICODE ("unicode");
+const OUString PRE_WINDOWS_CODEPAGE("windows");
+const OUString PRE_OEM_CODEPAGE("cp");
+const OUString CHARSET_UTF16("utf-16");
+const OUString CHARSET_UNICODE("unicode");
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/globals.hxx b/vcl/win/dtrans/globals.hxx
index 824c56a5aa73..69e9f2d15597 100644
--- a/vcl/win/dtrans/globals.hxx
+++ b/vcl/win/dtrans/globals.hxx
@@ -23,7 +23,10 @@
#include <com/sun/star/uno/Reference.hxx>
#include <osl/mutex.hxx>
-namespace com::sun::star::datatransfer { class XTransferable; }
+namespace com::sun::star::datatransfer
+{
+class XTransferable;
+}
#include <wtypes.h>
#include <sal/types.h>
@@ -40,27 +43,27 @@ namespace com::sun::star::datatransfer { class XTransferable; }
// is not considered relevant in a drag operation. Contrarily the file explorer
// gives that button a special meaning: the user has to select the effect from
// a context menu on drop.
-sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 sourceActions);
+sal_Int8 dndOleKeysToAction(DWORD grfKeyState, sal_Int8 sourceActions);
// The function maps a windows DROPEFFECTs to actions
// ( css::datatransfer::dnd::DNDConstants).
// The argument can be a combination of different DROPEFFECTS,
// In that case the return value is also a combination of the
// appropriate actions.
-sal_Int8 dndOleDropEffectsToActions( DWORD dwEffect);
+sal_Int8 dndOleDropEffectsToActions(DWORD dwEffect);
// The function maps actions ( css::datatransfer::dnd::DNDConstants)
// to window DROPEFFECTs.
// The argument can be a combination of different actions
// In that case the return value is also a combination of the
// appropriate DROPEFFECTS.
-DWORD dndActionsToDropEffects( sal_Int8 actions);
+DWORD dndActionsToDropEffects(sal_Int8 actions);
// If the argument constitutes only one action then it is mapped to the
// corresponding DROPEFFECT otherwise DROPEFFECT_MOVE is returned. This is
// why move is the default effect (no modifiers pressed, or right mouse button
// or Alt).
-DWORD dndActionsToSingleDropEffect( sal_Int8 actions);
+DWORD dndActionsToSingleDropEffect(sal_Int8 actions);
struct MutexDummy
{
diff --git a/vcl/win/dtrans/sourcecontext.hxx b/vcl/win/dtrans/sourcecontext.hxx
index 60609559a121..9bc9e273cc7f 100644
--- a/vcl/win/dtrans/sourcecontext.hxx
+++ b/vcl/win/dtrans/sourcecontext.hxx
@@ -35,8 +35,7 @@ using namespace ::com::sun::star::lang;
// currently.
// An instance of SourceContext only lives as long as the drag and drop
// operation lasts.
-class SourceContext: public MutexDummy,
- public WeakComponentImplHelper<XDragSourceContext>
+class SourceContext : public MutexDummy, public WeakComponentImplHelper<XDragSourceContext>
{
DragSource* m_pDragSource;
Reference<XDragSource> m_dragSource;
@@ -44,24 +43,23 @@ class SourceContext: public MutexDummy,
sal_Int8 m_currentAction;
public:
- SourceContext( DragSource* pSource, const Reference<XDragSourceListener>& listener);
+ SourceContext(DragSource* pSource, const Reference<XDragSourceListener>& listener);
~SourceContext() override;
SourceContext(const SourceContext&) = delete;
- SourceContext &operator= (const SourceContext&) = delete;
+ SourceContext& operator=(const SourceContext&) = delete;
/// @throws RuntimeException
- virtual void addDragSourceListener( const Reference<XDragSourceListener >& dsl );
+ virtual void addDragSourceListener(const Reference<XDragSourceListener>& dsl);
/// @throws RuntimeException
- virtual void removeDragSourceListener( const Reference<XDragSourceListener >& dsl );
- virtual sal_Int32 SAL_CALL getCurrentCursor( ) override;
- virtual void SAL_CALL setCursor( sal_Int32 cursorId ) override;
- virtual void SAL_CALL setImage( sal_Int32 imageId ) override;
- virtual void SAL_CALL transferablesFlavorsChanged( ) override;
+ virtual void removeDragSourceListener(const Reference<XDragSourceListener>& dsl);
+ virtual sal_Int32 SAL_CALL getCurrentCursor() override;
+ virtual void SAL_CALL setCursor(sal_Int32 cursorId) override;
+ virtual void SAL_CALL setImage(sal_Int32 imageId) override;
+ virtual void SAL_CALL transferablesFlavorsChanged() override;
// non - interface functions
- void fire_dragDropEnd( bool success, sal_Int8 byte);
- void fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAction);
-
+ void fire_dragDropEnd(bool success, sal_Int8 byte);
+ void fire_dropActionChanged(sal_Int8 dropAction, sal_Int8 userAction);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/target.hxx b/vcl/win/dtrans/target.hxx
index 8f4a13f13ac9..0e3da70d7e5c 100644
--- a/vcl/win/dtrans/target.hxx
+++ b/vcl/win/dtrans/target.hxx
@@ -30,7 +30,10 @@
#include <oleidl.h>
#include "globals.hxx"
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::uno
+{
+class XComponentContext;
+}
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
@@ -46,8 +49,8 @@ using namespace ::com::sun::star::datatransfer::dnd;
// If the service calls OleInitialize then it also calls OleUnitialize when
// it is destroyed. Therefore no second instance may exist which was
// created in the same thread and still needs OLE.
-class DropTarget: public MutexDummy,
- public WeakComponentImplHelper< XInitialization, XDropTarget, XServiceInfo>
+class DropTarget : public MutexDummy,
+ public WeakComponentImplHelper<XInitialization, XDropTarget, XServiceInfo>
{
private:
@@ -79,7 +82,7 @@ private:
// If m_bActive == sal_True then events are fired to XDropTargetListener s,
// none otherwise. The default value is sal_True.
bool m_bActive;
- sal_Int8 m_nDefaultActions;
+ sal_Int8 m_nDefaultActions;
// This value is set when a XDropTargetListener calls accept or reject on
// the XDropTargetDropContext or XDropTargetDragContext.
@@ -91,7 +94,7 @@ private:
Reference<XTransferable> m_currentData;
// The current action is used to determine if the USER
// action has changed (dropActionChanged)
-// sal_Int8 m_userAction;
+ // sal_Int8 m_userAction;
// Set by listeners when they call XDropTargetDropContext::dropComplete
bool m_bDropComplete;
Reference<XDropTargetDragContext> m_currentDragContext;
@@ -100,75 +103,75 @@ private:
public:
explicit DropTarget(const Reference<XComponentContext>& rxContext);
virtual ~DropTarget() override;
- DropTarget(DropTarget const &) = delete;
- DropTarget &operator= (DropTarget const &) = delete;
+ DropTarget(DropTarget const&) = delete;
+ DropTarget& operator=(DropTarget const&) = delete;
// Overrides WeakComponentImplHelper::disposing which is called by
// WeakComponentImplHelper::dispose
// Must be called.
virtual void SAL_CALL disposing() override;
- // XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) override;
+ // XInitialization
+ virtual void SAL_CALL initialize(const Sequence<Any>& aArguments) override;
// XDropTarget
- virtual void SAL_CALL addDropTargetListener( const Reference< XDropTargetListener >& dtl ) override;
- virtual void SAL_CALL removeDropTargetListener( const Reference< XDropTargetListener >& dtl ) override;
+ virtual void SAL_CALL addDropTargetListener(const Reference<XDropTargetListener>& dtl) override;
+ virtual void SAL_CALL
+ removeDropTargetListener(const Reference<XDropTargetListener>& dtl) override;
// Default is not active
- virtual sal_Bool SAL_CALL isActive( ) override;
- virtual void SAL_CALL setActive( sal_Bool isActive ) override;
- virtual sal_Int8 SAL_CALL getDefaultActions( ) override;
- virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) override;
+ virtual sal_Bool SAL_CALL isActive() override;
+ virtual void SAL_CALL setActive(sal_Bool isActive) override;
+ virtual sal_Int8 SAL_CALL getDefaultActions() override;
+ virtual void SAL_CALL setDefaultActions(sal_Int8 actions) override;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
+ virtual Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
// Functions called from the IDropTarget implementation ( m_pDropTarget)
virtual HRESULT DragEnter(
- /* [unique][in] */ IDataObject *pDataObj,
- /* [in] */ DWORD grfKeyState,
- /* [in] */ POINTL pt,
- /* [out][in] */ DWORD *pdwEffect);
+ /* [unique][in] */ IDataObject* pDataObj,
+ /* [in] */ DWORD grfKeyState,
+ /* [in] */ POINTL pt,
+ /* [out][in] */ DWORD* pdwEffect);
virtual HRESULT STDMETHODCALLTYPE DragOver(
- /* [in] */ DWORD grfKeyState,
- /* [in] */ POINTL pt,
- /* [out][in] */ DWORD *pdwEffect);
+ /* [in] */ DWORD grfKeyState,
+ /* [in] */ POINTL pt,
+ /* [out][in] */ DWORD* pdwEffect);
- virtual HRESULT STDMETHODCALLTYPE DragLeave( ) ;
+ virtual HRESULT STDMETHODCALLTYPE DragLeave();
virtual HRESULT STDMETHODCALLTYPE Drop(
- /* [unique][in] */ IDataObject *pDataObj,
- /* [in] */ DWORD grfKeyState,
- /* [in] */ POINTL pt,
- /* [out][in] */ DWORD *pdwEffect);
+ /* [unique][in] */ IDataObject* pDataObj,
+ /* [in] */ DWORD grfKeyState,
+ /* [in] */ POINTL pt,
+ /* [out][in] */ DWORD* pdwEffect);
-// Non - interface functions --------------------------------------------------
-// XDropTargetDropContext delegated from DropContext
+ // Non - interface functions --------------------------------------------------
+ // XDropTargetDropContext delegated from DropContext
- void _acceptDrop( sal_Int8 dropOperation, const Reference<XDropTargetDropContext>& context);
- void _rejectDrop( const Reference<XDropTargetDropContext>& context);
- void _dropComplete( bool success, const Reference<XDropTargetDropContext>& context);
+ void _acceptDrop(sal_Int8 dropOperation, const Reference<XDropTargetDropContext>& context);
+ void _rejectDrop(const Reference<XDropTargetDropContext>& context);
+ void _dropComplete(bool success, const Reference<XDropTargetDropContext>& context);
-// XDropTargetDragContext delegated from DragContext
- void _acceptDrag( sal_Int8 dragOperation, const Reference<XDropTargetDragContext>& context);
- void _rejectDrag( const Reference<XDropTargetDragContext>& context);
+ // XDropTargetDragContext delegated from DragContext
+ void _acceptDrag(sal_Int8 dragOperation, const Reference<XDropTargetDragContext>& context);
+ void _rejectDrag(const Reference<XDropTargetDragContext>& context);
protected:
// Gets the current action dependent on the pressed modifiers, the effects
// supported by the drop source (IDropSource) and the default actions of the
// drop target (XDropTarget, this class))
- inline sal_Int8 getFilteredActions( DWORD grfKeyState, DWORD sourceActions);
+ inline sal_Int8 getFilteredActions(DWORD grfKeyState, DWORD sourceActions);
// Only filters with the default actions
- inline sal_Int8 getFilteredActions( DWORD grfKeyState);
-
- void fire_drop( const DropTargetDropEvent& dte);
- void fire_dragEnter( const DropTargetDragEnterEvent& dtde );
- void fire_dragExit( const DropTargetEvent& dte );
- void fire_dragOver( const DropTargetDragEvent& dtde );
- void fire_dropActionChanged( const DropTargetDragEvent& dtde );
+ inline sal_Int8 getFilteredActions(DWORD grfKeyState);
+ void fire_drop(const DropTargetDropEvent& dte);
+ void fire_dragEnter(const DropTargetDragEnterEvent& dtde);
+ void fire_dragExit(const DropTargetEvent& dte);
+ void fire_dragOver(const DropTargetDragEvent& dtde);
+ void fire_dropActionChanged(const DropTargetDragEvent& dtde);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/targetdragcontext.cxx b/vcl/win/dtrans/targetdragcontext.cxx
index 4ffd16123d9d..71e345b74c60 100644
--- a/vcl/win/dtrans/targetdragcontext.cxx
+++ b/vcl/win/dtrans/targetdragcontext.cxx
@@ -19,25 +19,21 @@
#include "targetdragcontext.hxx"
-TargetDragContext::TargetDragContext( DropTarget* p)
+TargetDragContext::TargetDragContext(DropTarget* p)
{
- m_pDropTarget= p;
+ m_pDropTarget = p;
p->acquire();
}
-TargetDragContext::~TargetDragContext()
-{
- m_pDropTarget->release();
-}
+TargetDragContext::~TargetDragContext() { m_pDropTarget->release(); }
-void SAL_CALL TargetDragContext::acceptDrag( sal_Int8 dragOperation )
+void SAL_CALL TargetDragContext::acceptDrag(sal_Int8 dragOperation)
{
- m_pDropTarget->_acceptDrag( dragOperation, static_cast<XDropTargetDragContext*>( this) );
-
+ m_pDropTarget->_acceptDrag(dragOperation, static_cast<XDropTargetDragContext*>(this));
}
-void SAL_CALL TargetDragContext::rejectDrag( )
+void SAL_CALL TargetDragContext::rejectDrag()
{
- m_pDropTarget->_rejectDrag( static_cast<XDropTargetDragContext*>( this) );
+ m_pDropTarget->_rejectDrag(static_cast<XDropTargetDragContext*>(this));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/targetdragcontext.hxx b/vcl/win/dtrans/targetdragcontext.hxx
index c55a8fe673e9..5c05acc35da9 100644
--- a/vcl/win/dtrans/targetdragcontext.hxx
+++ b/vcl/win/dtrans/targetdragcontext.hxx
@@ -30,7 +30,7 @@ using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-class TargetDragContext: public WeakImplHelper<XDropTargetDragContext>
+class TargetDragContext : public WeakImplHelper<XDropTargetDragContext>
{
// some calls to the functions of XDropTargetDragContext are delegated
// to non-interface functions of m_pDropTarget
@@ -39,11 +39,11 @@ class TargetDragContext: public WeakImplHelper<XDropTargetDragContext>
public:
explicit TargetDragContext(DropTarget* pTarget);
~TargetDragContext() override;
- TargetDragContext( const TargetDragContext&) = delete;
- TargetDragContext &operator= ( const TargetDragContext&) = delete;
+ TargetDragContext(const TargetDragContext&) = delete;
+ TargetDragContext& operator=(const TargetDragContext&) = delete;
- virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) override;
- virtual void SAL_CALL rejectDrag( ) override;
+ virtual void SAL_CALL acceptDrag(sal_Int8 dragOperation) override;
+ virtual void SAL_CALL rejectDrag() override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/targetdropcontext.cxx b/vcl/win/dtrans/targetdropcontext.cxx
index 9719664a9fbb..fe6538943136 100644
--- a/vcl/win/dtrans/targetdropcontext.cxx
+++ b/vcl/win/dtrans/targetdropcontext.cxx
@@ -24,30 +24,27 @@ using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-TargetDropContext::TargetDropContext( DropTarget* p)
+TargetDropContext::TargetDropContext(DropTarget* p)
{
- m_pDropTarget= p;
+ m_pDropTarget = p;
p->acquire();
}
-TargetDropContext::~TargetDropContext()
-{
- m_pDropTarget->release();
-}
+TargetDropContext::~TargetDropContext() { m_pDropTarget->release(); }
-void SAL_CALL TargetDropContext::acceptDrop( sal_Int8 dropOperation )
+void SAL_CALL TargetDropContext::acceptDrop(sal_Int8 dropOperation)
{
- m_pDropTarget->_acceptDrop( dropOperation, static_cast<XDropTargetDropContext*>( this) );
+ m_pDropTarget->_acceptDrop(dropOperation, static_cast<XDropTargetDropContext*>(this));
}
-void SAL_CALL TargetDropContext::rejectDrop( )
+void SAL_CALL TargetDropContext::rejectDrop()
{
- m_pDropTarget->_rejectDrop( static_cast<XDropTargetDropContext*>( this) );
+ m_pDropTarget->_rejectDrop(static_cast<XDropTargetDropContext*>(this));
}
-void SAL_CALL TargetDropContext::dropComplete( sal_Bool success )
+void SAL_CALL TargetDropContext::dropComplete(sal_Bool success)
{
- m_pDropTarget->_dropComplete( success, static_cast<XDropTargetDropContext*>( this) );
+ m_pDropTarget->_dropComplete(success, static_cast<XDropTargetDropContext*>(this));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/targetdropcontext.hxx b/vcl/win/dtrans/targetdropcontext.hxx
index 8584c581db0a..6b3389c40017 100644
--- a/vcl/win/dtrans/targetdropcontext.hxx
+++ b/vcl/win/dtrans/targetdropcontext.hxx
@@ -29,7 +29,7 @@ using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-class TargetDropContext: public WeakImplHelper<XDropTargetDropContext>
+class TargetDropContext : public WeakImplHelper<XDropTargetDropContext>
{
// calls to the functions of XDropTargetDropContext are delegated
// to non-interface functions of m_pDropTarget
@@ -38,15 +38,15 @@ class TargetDropContext: public WeakImplHelper<XDropTargetDropContext>
public:
explicit TargetDropContext(DropTarget* pTarget);
~TargetDropContext() override;
- TargetDropContext( const TargetDropContext&) = delete;
- TargetDropContext &operator= ( const TargetDropContext&) = delete;
+ TargetDropContext(const TargetDropContext&) = delete;
+ TargetDropContext& operator=(const TargetDropContext&) = delete;
// XDropTargetDragContext
- virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) override;
- virtual void SAL_CALL rejectDrop( ) override;
+ virtual void SAL_CALL acceptDrop(sal_Int8 dropOperation) override;
+ virtual void SAL_CALL rejectDrop() override;
// XDropTargetDropContext (inherits XDropTargetDragContext)
- virtual void SAL_CALL dropComplete( sal_Bool success ) override;
+ virtual void SAL_CALL dropComplete(sal_Bool success) override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index feda998d5759..7863a3c353d2 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -54,9 +54,9 @@
#include <shlwapi.h>
#include <winver.h>
-GlobalWinGlyphCache * GlobalWinGlyphCache::get()
+GlobalWinGlyphCache* GlobalWinGlyphCache::get()
{
- SalData *data = GetSalData();
+ SalData* data = GetSalData();
if (!data->m_pGlobalWinGlyphCache)
{
if (OpenGLHelper::isVCLOpenGLEnabled())
@@ -85,10 +85,11 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
return false;
}
const ::comphelper::ScopeGuard aHFONTrestoreScopeGuard(
- [&aHDC,hOrigFont]() { SelectFont(aHDC.get(), hOrigFont); });
+ [&aHDC, hOrigFont]() { SelectFont(aHDC.get(), hOrigFont); });
// For now we assume DWrite is present and we won't bother with fallback paths.
- D2DWriteTextOutRenderer * pTxt = dynamic_cast<D2DWriteTextOutRenderer *>(&TextOutRenderer::get(true));
+ D2DWriteTextOutRenderer* pTxt
+ = dynamic_cast<D2DWriteTextOutRenderer*>(&TextOutRenderer::get(true));
if (!pTxt)
return false;
@@ -96,7 +97,8 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
if (!pTxt->BindFont(aHDC.get()))
{
- SAL_WARN("vcl.gdi", "Binding of font failed. The font might not be supported by DirectWrite.");
+ SAL_WARN("vcl.gdi",
+ "Binding of font failed. The font might not be supported by DirectWrite.");
return false;
}
const ::comphelper::ScopeGuard aFontReleaseScopeGuard([&pTxt]() { pTxt->ReleaseFont(); });
@@ -109,7 +111,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
if (aInkBoxes.empty())
return false;
- for (auto &box : aInkBoxes)
+ for (auto& box : aInkBoxes)
bounds.Union(box + Point(bounds.Right(), 0));
// bounds.Top() is the offset from the baseline at (0,0) to the top of the
@@ -122,8 +124,8 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
// individual rectangles for each glyph. The ABC widths don't
// take anti-aliasing into consideration. Let's hope that leaving
// "extra" space between glyphs will help.
- std::vector<float> aGlyphAdv(1); // offsets between glyphs
- std::vector<DWRITE_GLYPH_OFFSET> aGlyphOffset(1, {0.0f, 0.0f});
+ std::vector<float> aGlyphAdv(1); // offsets between glyphs
+ std::vector<DWRITE_GLYPH_OFFSET> aGlyphOffset(1, { 0.0f, 0.0f });
std::vector<int> aEnds(1); // end of each glyph box
float fHScale = getHScale();
float totWidth = 0;
@@ -150,7 +152,8 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
aElement.maLocation.SetBottom(bounds.getHeight() + aElement.getExtraSpace());
nPos = aEnds[0];
- std::unique_ptr<CompatibleDC> aDC(CompatibleDC::create(rGraphics, 0, 0, nBitmapWidth, nBitmapHeight));
+ std::unique_ptr<CompatibleDC> aDC(
+ CompatibleDC::create(rGraphics, 0, 0, nBitmapWidth, nBitmapHeight));
SetTextColor(aDC->getCompatibleHDC(), RGB(0, 0, 0));
SetBkColor(aDC->getCompatibleHDC(), RGB(255, 255, 255));
@@ -164,21 +167,13 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
if (!SUCCEEDED(pRT->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::Black), &pBrush)))
return false;
- D2D1_POINT_2F baseline = {
- static_cast<FLOAT>(aElement.getExtraOffset()),
- static_cast<FLOAT>(aElement.getExtraOffset() + aElement.mnBaselineOffset)
- };
-
- DWRITE_GLYPH_RUN glyphs = {
- pTxt->GetFontFace(),
- pTxt->GetEmHeight(),
- 1,
- aGlyphIndices.data(),
- aGlyphAdv.data(),
- aGlyphOffset.data(),
- false,
- 0
- };
+ D2D1_POINT_2F baseline
+ = { static_cast<FLOAT>(aElement.getExtraOffset()),
+ static_cast<FLOAT>(aElement.getExtraOffset() + aElement.mnBaselineOffset) };
+
+ DWRITE_GLYPH_RUN glyphs
+ = { pTxt->GetFontFace(), pTxt->GetEmHeight(), 1, aGlyphIndices.data(),
+ aGlyphAdv.data(), aGlyphOffset.data(), false, 0 };
WinFontTransformGuard aTransformGuard(pRT, fHScale, rLayout, baseline);
pRT->BeginDraw();
@@ -189,14 +184,15 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
switch (hResult)
{
- case S_OK:
- break;
- case D2DERR_RECREATE_TARGET:
- pTxt->CreateRenderTarget();
- break;
- default:
- SAL_WARN("vcl.gdi", "DrawGlyphRun-EndDraw failed: " << WindowsErrorString(GetLastError()));
- return false;
+ case S_OK:
+ break;
+ case D2DERR_RECREATE_TARGET:
+ pTxt->CreateRenderTarget();
+ break;
+ default:
+ SAL_WARN("vcl.gdi",
+ "DrawGlyphRun-EndDraw failed: " << WindowsErrorString(GetLastError()));
+ return false;
}
if (!GlobalWinGlyphCache::get()->AllocateTexture(aElement, aDC.get()))
@@ -207,12 +203,12 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex,
return true;
}
-TextOutRenderer & TextOutRenderer::get(bool bUseDWrite)
+TextOutRenderer& TextOutRenderer::get(bool bUseDWrite)
{
- SalData *const pSalData = GetSalData();
+ SalData* const pSalData = GetSalData();
if (!pSalData)
- { // don't call this after DeInitVCL()
+ { // don't call this after DeInitVCL()
fprintf(stderr, "TextOutRenderer fatal error: no SalData");
abort();
}
@@ -232,12 +228,10 @@ TextOutRenderer & TextOutRenderer::get(bool bUseDWrite)
return *pSalData->m_pExTextOutRenderer;
}
-
-bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
- SalGraphics & /*rGraphics*/,
- HDC hDC)
+bool ExTextOutRenderer::operator()(GenericSalLayout const& rLayout, SalGraphics& /*rGraphics*/,
+ HDC hDC)
{
- HFONT hFont = static_cast<HFONT>(GetCurrentObject( hDC, OBJ_FONT ));
+ HFONT hFont = static_cast<HFONT>(GetCurrentObject(hDC, OBJ_FONT));
ScopedHFONT hAltFont;
bool bUseAltFont = false;
bool bShift = false;
@@ -248,7 +242,7 @@ bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
if (aLogFont.lfFaceName[0] == '@')
{
memmove(&aLogFont.lfFaceName[0], &aLogFont.lfFaceName[1],
- sizeof(aLogFont.lfFaceName)-sizeof(aLogFont.lfFaceName[0]));
+ sizeof(aLogFont.lfFaceName) - sizeof(aLogFont.lfFaceName[0]));
hAltFont.reset(CreateFontIndirectW(&aLogFont));
}
else
@@ -260,7 +254,7 @@ bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
}
}
- UINT nTextAlign = GetTextAlign ( hDC );
+ UINT nTextAlign = GetTextAlign(hDC);
int nStart = 0;
Point aPos(0, 0);
const GlyphItem* pGlyph;
@@ -273,7 +267,7 @@ bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
SelectFont(hDC, bUseAltFont ? hAltFont.get() : hFont);
}
if (bShift && pGlyph->IsVertical())
- SetTextAlign(hDC, TA_TOP|TA_LEFT);
+ SetTextAlign(hDC, TA_TOP | TA_LEFT);
ExtTextOutW(hDC, aPos.X(), aPos.Y(), ETO_GLYPH_INDEX, nullptr, &glyphWStr, 1, nullptr);
@@ -317,7 +311,7 @@ WinFontInstance::~WinFontInstance()
bool WinFontInstance::hasHScale() const
{
- const FontSelectPattern &rPattern = GetFontSelectPattern();
+ const FontSelectPattern& rPattern = GetFontSelectPattern();
int nHeight(rPattern.mnHeight);
int nWidth(rPattern.mnWidth ? rPattern.mnWidth * GetAverageWidthFactor() : nHeight);
return nWidth != nHeight;
@@ -333,29 +327,29 @@ float WinFontInstance::getHScale() const
return nWidth / nHeight;
}
-namespace {
-
+namespace
+{
struct BlobReference
{
hb_blob_t* mpBlob;
- BlobReference(hb_blob_t* pBlob) : mpBlob(pBlob)
+ BlobReference(hb_blob_t* pBlob)
+ : mpBlob(pBlob)
{
hb_blob_reference(mpBlob);
}
- BlobReference(BlobReference const & other)
+ BlobReference(BlobReference const& other)
: mpBlob(other.mpBlob)
{
hb_blob_reference(mpBlob);
}
~BlobReference() { hb_blob_destroy(mpBlob); }
};
-
}
using BlobCacheKey = std::pair<rtl::Reference<PhysicalFontFace>, hb_tag_t>;
-namespace {
-
+namespace
+{
struct BlobCacheKeyHash
{
std::size_t operator()(BlobCacheKey const& rKey) const
@@ -366,7 +360,6 @@ struct BlobCacheKeyHash
return seed;
}
};
-
}
static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData)
@@ -379,7 +372,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
assert(hDC);
assert(hFont);
- BlobCacheKey cacheKey { rtl::Reference<PhysicalFontFace>(pFont->GetFontFace()), nTableTag };
+ BlobCacheKey cacheKey{ rtl::Reference<PhysicalFontFace>(pFont->GetFontFace()), nTableTag };
auto it = gCache.find(cacheKey);
if (it != gCache.end())
{
@@ -402,11 +395,12 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
if (!pBuffer)
return nullptr;
- hb_blob_t* pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY,
- pBuffer, [](void* data){ delete[] static_cast<unsigned char*>(data); });
+ hb_blob_t* pBlob
+ = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY,
+ pBuffer, [](void* data) { delete[] static_cast<unsigned char*>(data); });
if (!pBlob)
return pBlob;
- gCache.insert({cacheKey, BlobReference(pBlob)});
+ gCache.insert({ cacheKey, BlobReference(pBlob) });
return pBlob;
}
@@ -442,7 +436,7 @@ hb_font_t* WinFontInstance::ImplInitHbFont()
return pHbFont;
}
-void WinFontInstance::SetGraphics(WinSalGraphics *pGraphics)
+void WinFontInstance::SetGraphics(WinSalGraphics* pGraphics)
{
m_pGraphics = pGraphics;
if (m_hFont)
@@ -491,7 +485,7 @@ bool WinSalGraphics::DrawCachedGlyphs(const GenericSalLayout& rLayout)
COLORREF color = GetTextColor(hDC);
Color salColor(GetRValue(color), GetGValue(color), GetBValue(color));
- WinSalGraphicsImplBase *pImpl = dynamic_cast<WinSalGraphicsImplBase*>(mpImpl.get());
+ WinSalGraphicsImplBase* pImpl = dynamic_cast<WinSalGraphicsImplBase*>(mpImpl.get());
if (!pImpl->UseTextDraw())
return false;
@@ -508,8 +502,7 @@ bool WinSalGraphics::DrawCachedGlyphs(const GenericSalLayout& rLayout)
if (!texture || !texture->isValid())
return false;
- SalTwoRect a2Rects(0, 0,
- texture->GetWidth(), texture->GetHeight(),
+ SalTwoRect a2Rects(0, 0, texture->GetWidth(), texture->GetHeight(),
aPos.X() - rElement.getExtraOffset() + rElement.maLeftOverhangs,
aPos.Y() - rElement.mnBaselineOffset - rElement.getExtraOffset(),
texture->GetWidth(), texture->GetHeight());
@@ -520,21 +513,18 @@ bool WinSalGraphics::DrawCachedGlyphs(const GenericSalLayout& rLayout)
return true;
}
-static void PruneGlyphCache()
-{
- GlobalWinGlyphCache::get()->Prune();
-}
+static void PruneGlyphCache() { GlobalWinGlyphCache::get()->Prune(); }
void WinSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout, HDC hDC, bool bUseDWrite)
{
- TextOutRenderer &render = TextOutRenderer::get(bUseDWrite);
+ TextOutRenderer& render = TextOutRenderer::get(bUseDWrite);
render(rLayout, *this, hDC);
}
void WinSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
{
WinSalGraphicsImplBase* pImpl = dynamic_cast<WinSalGraphicsImplBase*>(mpImpl.get());
- if( !mbPrinter && pImpl->DrawTextLayout(rLayout))
+ if (!mbPrinter && pImpl->DrawTextLayout(rLayout))
return; // handled by pImpl
HDC hDC = getHDC();
@@ -593,18 +583,21 @@ void WinSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
tools::Rectangle aRect;
rLayout.GetBoundRect(aRect);
- if( aRect.IsEmpty())
+ if (aRect.IsEmpty())
return;
pImpl->PreDrawText();
- std::unique_ptr<CompatibleDC> aDC(CompatibleDC::create(*this, aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight()));
+ std::unique_ptr<CompatibleDC> aDC(CompatibleDC::create(
+ *this, aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight()));
// we are making changes to the DC, make sure we got a new one
assert(aDC->getCompatibleHDC() != hDC);
- RECT aWinRect = { aRect.Left(), aRect.Top(), aRect.Left() + aRect.GetWidth(), aRect.Top() + aRect.GetHeight() };
- ::FillRect(aDC->getCompatibleHDC(), &aWinRect, static_cast<HBRUSH>(::GetStockObject(WHITE_BRUSH)));
+ RECT aWinRect = { aRect.Left(), aRect.Top(), aRect.Left() + aRect.GetWidth(),
+ aRect.Top() + aRect.GetHeight() };
+ ::FillRect(aDC->getCompatibleHDC(), &aWinRect,
+ static_cast<HBRUSH>(::GetStockObject(WHITE_BRUSH)));
// setup the hidden DC with black color and white background, we will
// use the result of the text drawing later as a mask only
diff --git a/vcl/workben/localestub/localestub.cxx b/vcl/workben/localestub/localestub.cxx
index 66942f1c6180..64c7d7c37312 100644
--- a/vcl/workben/localestub/localestub.cxx
+++ b/vcl/workben/localestub/localestub.cxx
@@ -15,11 +15,11 @@ extern "C" const sal_Unicode* getSTC_CharData_S2V() { return nullptr; }
extern "C" const sal_uInt16* getSTC_CharIndex_S2V() { return nullptr; }
extern "C" const sal_Unicode* getSTC_CharData_S2T() { return nullptr; }
extern "C" const sal_uInt16* getSTC_CharIndex_S2T() { return nullptr; }
-extern "C" const sal_Unicode *getSTC_WordData(sal_Int32&) { return nullptr; }
-extern "C" const sal_uInt16 *getSTC_WordIndex_T2S(sal_Int32&) { return nullptr; }
-extern "C" const sal_uInt16 *getSTC_WordEntry_T2S() { return nullptr; }
-extern "C" const sal_uInt16 *getSTC_WordIndex_S2T(sal_Int32&) { return nullptr; }
-extern "C" const sal_uInt16 *getSTC_WordEntry_S2T() { return nullptr; }
+extern "C" const sal_Unicode* getSTC_WordData(sal_Int32&) { return nullptr; }
+extern "C" const sal_uInt16* getSTC_WordIndex_T2S(sal_Int32&) { return nullptr; }
+extern "C" const sal_uInt16* getSTC_WordEntry_T2S() { return nullptr; }
+extern "C" const sal_uInt16* getSTC_WordIndex_S2T(sal_Int32&) { return nullptr; }
+extern "C" const sal_uInt16* getSTC_WordEntry_S2T() { return nullptr; }
extern "C" sal_uInt16** get_zh_zhuyin() { return nullptr; }
extern "C" sal_uInt16** get_zh_pinyin() { return nullptr; }
extern "C" const sal_Unicode* getHangul2HanjaData() { return nullptr; }