[Libreoffice-commits] core.git: 51 commits - accessibility/source avmedia/source basic/source canvas/source chart2/source comphelper/source connectivity/source cppuhelper/source cppu/qa cui/source dbaccess/source desktop/source editeng/source emfio/source extensions/source filter/source forms/source formula/source framework/source i18npool/qa i18npool/source i18nutil/source include/com include/editeng include/formula include/i18nutil include/osl include/sfx2 include/svtools include/svx include/vcl lotuswordpro/source oox/source pyuno/source registry/source reportdesign/source sal/osl sc/inc sc/qa sc/source sdext/source sd/qa sd/source sfx2/source slideshow/source sot/source stoc/source svl/source svtools/source svx/qa svx/source sw/qa sw/source test/source testtools/source toolkit/source tools/source unotools/source unoxml/source uui/source vbahelper/source vcl/qa vcl/source vcl/unx vcl/workben writerfilter/source xmloff/source xmlscript/source xmlsecurity/qa

Stephan Bergmann sbergman at redhat.com
Mon Jan 15 08:08:10 UTC 2018


 accessibility/source/extended/accessiblelistboxentry.cxx           |    2 
 accessibility/source/extended/textwindowaccessibility.cxx          |    2 
 avmedia/source/gstreamer/gstframegrabber.cxx                       |    2 
 basic/source/classes/sbunoobj.cxx                                  |   10 
 basic/source/classes/sbxmod.cxx                                    |    2 
 basic/source/comp/codegen.cxx                                      |   18 -
 basic/source/comp/token.cxx                                        |    2 
 basic/source/runtime/methods.cxx                                   |   12 -
 basic/source/runtime/methods1.cxx                                  |    2 
 basic/source/runtime/runtime.cxx                                   |   30 +-
 basic/source/sbx/sbxarray.cxx                                      |    2 
 basic/source/sbx/sbxbase.cxx                                       |    2 
 basic/source/sbx/sbxobj.cxx                                        |    6 
 basic/source/sbx/sbxvalue.cxx                                      |    6 
 basic/source/sbx/sbxvar.cxx                                        |    2 
 canvas/source/cairo/cairo_canvashelper.cxx                         |    4 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx        |    2 
 chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx            |    2 
 chart2/source/controller/dialogs/res_LegendPosition.cxx            |    4 
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx      |   15 -
 chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx    |    2 
 chart2/source/controller/main/ChartController_Position.cxx         |    2 
 chart2/source/model/main/DataPointProperties.cxx                   |    2 
 chart2/source/view/main/ChartItemPool.cxx                          |    2 
 comphelper/source/streaming/basicio.cxx                            |    2 
 connectivity/source/drivers/dbase/DTable.cxx                       |    2 
 connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx         |    2 
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx |   12 -
 cppu/qa/cppumaker/test_cppumaker.cxx                               |    6 
 cppuhelper/source/tdmgr.cxx                                        |   16 -
 cui/source/dialogs/hltpbase.cxx                                    |    4 
 cui/source/options/optasian.cxx                                    |    4 
 cui/source/options/optctl.cxx                                      |    2 
 cui/source/options/optgdlg.cxx                                     |    4 
 cui/source/options/optlingu.cxx                                    |    2 
 cui/source/tabpages/backgrnd.cxx                                   |    4 
 cui/source/tabpages/chardlg.cxx                                    |   46 ++--
 cui/source/tabpages/connect.cxx                                    |    4 
 cui/source/tabpages/labdlg.cxx                                     |    6 
 cui/source/tabpages/macroass.cxx                                   |    6 
 cui/source/tabpages/measure.cxx                                    |    4 
 cui/source/tabpages/numpages.cxx                                   |    4 
 cui/source/tabpages/page.cxx                                       |    6 
 cui/source/tabpages/paragrph.cxx                                   |    6 
 cui/source/tabpages/swpossizetabpage.cxx                           |   12 -
 cui/source/tabpages/tabstpge.cxx                                   |    2 
 cui/source/tabpages/textanim.cxx                                   |   10 
 cui/source/tabpages/tpbitmap.cxx                                   |    4 
 cui/source/tabpages/tpcolor.cxx                                    |    4 
 cui/source/tabpages/tpgradnt.cxx                                   |    8 
 cui/source/tabpages/tphatch.cxx                                    |    8 
 cui/source/tabpages/tpline.cxx                                     |    6 
 cui/source/tabpages/tpshadow.cxx                                   |    6 
 cui/source/tabpages/tptrans.cxx                                    |   14 -
 cui/source/tabpages/transfrm.cxx                                   |    4 
 dbaccess/source/core/inc/SingleSelectQueryComposer.hxx             |    2 
 dbaccess/source/ui/app/AppController.cxx                           |    4 
 dbaccess/source/ui/tabledesign/TableRow.cxx                        |    4 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx                   |    2 
 desktop/source/lib/lokinteractionhandler.cxx                       |    4 
 editeng/source/editeng/eehtml.cxx                                  |    4 
 editeng/source/editeng/impedit3.cxx                                |    2 
 editeng/source/editeng/impedit4.cxx                                |    4 
 editeng/source/items/borderline.cxx                                |    4 
 editeng/source/items/frmitems.cxx                                  |   48 ++--
 editeng/source/items/justifyitem.cxx                               |   16 -
 editeng/source/items/numitem.cxx                                   |   16 -
 editeng/source/items/paraitem.cxx                                  |   40 +--
 editeng/source/items/textitem.cxx                                  |   74 +++---
 editeng/source/items/writingmodeitem.cxx                           |   10 
 editeng/source/uno/unofdesc.cxx                                    |   14 -
 editeng/source/uno/unofield.cxx                                    |   12 -
 editeng/source/uno/unoipset.cxx                                    |    2 
 editeng/source/uno/unonrule.cxx                                    |    4 
 emfio/source/reader/emfreader.cxx                                  |    2 
 emfio/source/reader/wmfreader.cxx                                  |    4 
 extensions/source/dbpilots/listcombowizard.cxx                     |    2 
 extensions/source/propctrlr/fontdialog.cxx                         |   22 +-
 extensions/source/propctrlr/formcomponenthandler.cxx               |    4 
 extensions/source/propctrlr/pushbuttonnavigation.cxx               |   20 -
 extensions/source/scanner/grid.cxx                                 |    2 
 extensions/source/scanner/sane.cxx                                 |    2 
 extensions/source/update/check/updatehdl.cxx                       |    2 
 filter/source/config/cache/filtercache.cxx                         |    4 
 filter/source/graphicfilter/icgm/actimpr.cxx                       |   10 
 filter/source/graphicfilter/icgm/class1.cxx                        |    4 
 filter/source/graphicfilter/icgm/class2.cxx                        |   10 
 filter/source/graphicfilter/icgm/class4.cxx                        |    4 
 filter/source/graphicfilter/icgm/class5.cxx                        |   20 -
 filter/source/msfilter/escherex.cxx                                |    4 
 filter/source/msfilter/msdffimp.cxx                                |   57 ++---
 filter/source/msfilter/svdfppt.cxx                                 |   36 +--
 filter/source/pdf/pdfinteract.cxx                                  |    2 
 filter/source/svg/svgexport.cxx                                    |   10 
 filter/source/t602/t602filter.cxx                                  |    2 
 forms/source/component/Button.cxx                                  |   10 
 forms/source/component/ComboBox.cxx                                |    4 
 forms/source/component/DatabaseForm.cxx                            |   24 +-
 forms/source/component/Grid.cxx                                    |    2 
 forms/source/component/ImageButton.cxx                             |    8 
 forms/source/component/ListBox.cxx                                 |    4 
 forms/source/component/RadioButton.cxx                             |    2 
 forms/source/component/refvaluecomponent.cxx                       |    2 
 formula/source/ui/dlg/formula.cxx                                  |    2 
 framework/source/fwe/xml/statusbardocumenthandler.cxx              |    4 
 framework/source/fwe/xml/toolboxdocumenthandler.cxx                |    4 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx            |  110 +++++-----
 framework/source/uiconfiguration/imagemanagerimpl.cxx              |    6 
 framework/source/uiconfiguration/windowstateconfiguration.cxx      |    4 
 framework/source/xml/imagesdocumenthandler.cxx                     |    2 
 i18npool/qa/cppunit/test_textsearch.cxx                            |    2 
 i18npool/source/indexentry/indexentrysupplier_default.cxx          |    6 
 i18npool/source/inputchecker/inputsequencechecker.cxx              |   10 
 i18npool/source/search/textsearch.cxx                              |   10 
 i18npool/source/transliteration/transliterationImpl.cxx            |   10 
 i18npool/source/transliteration/transliteration_caseignore.cxx     |    6 
 i18nutil/source/utility/casefolding.cxx                            |   10 
 i18nutil/source/utility/paper.cxx                                  |    2 
 i18nutil/source/utility/unicode.cxx                                |    6 
 include/com/sun/star/uno/Any.h                                     |    2 
 include/com/sun/star/uno/Type.h                                    |    2 
 include/com/sun/star/uno/Type.hxx                                  |    4 
 include/editeng/emphasismarkitem.hxx                               |    2 
 include/editeng/frmdiritem.hxx                                     |    2 
 include/editeng/paravertalignitem.hxx                              |    4 
 include/editeng/writingmodeitem.hxx                                |    2 
 include/formula/errorcodes.hxx                                     |    2 
 include/i18nutil/searchopt.hxx                                     |    4 
 include/i18nutil/transliteration.hxx                               |   70 +++---
 include/osl/conditn.hxx                                            |    2 
 include/osl/file.hxx                                               |    2 
 include/sfx2/groupid.hxx                                           |    2 
 include/svtools/htmltokn.h                                         |    4 
 include/svtools/svlbitm.hxx                                        |    4 
 include/svx/EnhancedCustomShapeFunctionParser.hxx                  |    2 
 include/svx/chrtitem.hxx                                           |    8 
 include/svx/scene3d.hxx                                            |    2 
 include/svx/swframetypes.hxx                                       |   10 
 include/vcl/mapmod.hxx                                             |    2 
 lotuswordpro/source/filter/lwpcelllayout.cxx                       |    2 
 lotuswordpro/source/filter/lwptabrack.hxx                          |    4 
 oox/source/export/drawingml.cxx                                    |    6 
 oox/source/token/relationship.cxx                                  |    2 
 oox/source/vml/vmlshape.cxx                                        |    2 
 pyuno/source/module/pyuno_except.cxx                               |    2 
 pyuno/source/module/pyuno_module.cxx                               |    2 
 pyuno/source/module/pyuno_runtime.cxx                              |    2 
 pyuno/source/module/pyuno_type.cxx                                 |    4 
 registry/source/keyimpl.cxx                                        |   18 -
 registry/source/reflread.cxx                                       |   19 -
 registry/source/reflwrit.cxx                                       |    2 
 registry/source/regimpl.cxx                                        |    8 
 reportdesign/source/core/inc/ReportHelperImpl.hxx                  |    4 
 reportdesign/source/core/sdr/RptModel.cxx                          |    2 
 reportdesign/source/core/sdr/RptObject.cxx                         |    2 
 reportdesign/source/filter/xml/xmlHelper.cxx                       |    2 
 reportdesign/source/ui/inspection/GeometryHandler.cxx              |    4 
 reportdesign/source/ui/report/ReportController.cxx                 |    6 
 sal/osl/unx/socket.cxx                                             |    8 
 sc/inc/address.hxx                                                 |    4 
 sc/inc/attrib.hxx                                                  |    2 
 sc/inc/conditio.hxx                                                |    4 
 sc/inc/generalfunction.hxx                                         |   26 +-
 sc/qa/unit/helper/shared_test_impl.hxx                             |    2 
 sc/qa/unit/subsequent_filters-test.cxx                             |    6 
 sc/qa/unit/tiledrendering/tiledrendering.cxx                       |    2 
 sc/qa/unit/ucalc.cxx                                               |   20 -
 sc/qa/unit/ucalc_formula.cxx                                       |   30 +-
 sc/qa/unit/ucalc_pivottable.cxx                                    |    2 
 sc/source/core/data/conditio.cxx                                   |    2 
 sc/source/core/data/documen5.cxx                                   |    2 
 sc/source/core/data/dpobject.cxx                                   |    4 
 sc/source/core/data/dpsave.cxx                                     |    4 
 sc/source/core/data/dptabres.cxx                                   |    2 
 sc/source/core/data/dptabsrc.cxx                                   |   12 -
 sc/source/core/data/global.cxx                                     |    2 
 sc/source/core/tool/address.cxx                                    |    2 
 sc/source/core/tool/appoptio.cxx                                   |    8 
 sc/source/core/tool/compiler.cxx                                   |    2 
 sc/source/core/tool/interpr4.cxx                                   |    4 
 sc/source/core/tool/reffind.cxx                                    |    2 
 sc/source/core/tool/viewopti.cxx                                   |    6 
 sc/source/filter/excel/impop.cxx                                   |    2 
 sc/source/filter/excel/tokstack.cxx                                |    4 
 sc/source/filter/excel/xiescher.cxx                                |    4 
 sc/source/filter/rtf/eeimpars.cxx                                  |    2 
 sc/source/filter/xml/xmldrani.cxx                                  |    2 
 sc/source/ui/app/scmod.cxx                                         |    4 
 sc/source/ui/condformat/condformatdlgentry.cxx                     |    2 
 sc/source/ui/dbgui/filtdlg.cxx                                     |   18 -
 sc/source/ui/dbgui/pfiltdlg.cxx                                    |    6 
 sc/source/ui/dbgui/validate.cxx                                    |    2 
 sc/source/ui/docshell/externalrefmgr.cxx                           |    2 
 sc/source/ui/drawfunc/drtxtob.cxx                                  |    8 
 sc/source/ui/drawfunc/fuconuno.cxx                                 |    2 
 sc/source/ui/miscdlgs/acredlin.cxx                                 |    2 
 sc/source/ui/miscdlgs/highred.cxx                                  |    2 
 sc/source/ui/miscdlgs/tabopdlg.cxx                                 |    2 
 sc/source/ui/miscdlgs/textdlgs.cxx                                 |    2 
 sc/source/ui/navipi/content.cxx                                    |   34 +--
 sc/source/ui/navipi/navipi.cxx                                     |    2 
 sc/source/ui/optdlg/calcoptionsdlg.cxx                             |    2 
 sc/source/ui/optdlg/tpview.cxx                                     |    6 
 sc/source/ui/undo/undocell.cxx                                     |    6 
 sc/source/ui/unoobj/appluno.cxx                                    |    2 
 sc/source/ui/unoobj/cellsuno.cxx                                   |    4 
 sc/source/ui/unoobj/chartuno.cxx                                   |    2 
 sc/source/ui/unoobj/confuno.cxx                                    |    2 
 sc/source/ui/unoobj/dapiuno.cxx                                    |    8 
 sc/source/ui/unoobj/datauno.cxx                                    |   15 -
 sc/source/ui/unoobj/eventuno.cxx                                   |    6 
 sc/source/ui/unoobj/fmtuno.cxx                                     |   16 -
 sc/source/ui/unoobj/srchuno.cxx                                    |    2 
 sc/source/ui/unoobj/targuno.cxx                                    |    2 
 sc/source/ui/unoobj/viewuno.cxx                                    |   20 -
 sc/source/ui/vba/vbaformat.cxx                                     |    6 
 sc/source/ui/view/cellsh1.cxx                                      |    2 
 sc/source/ui/view/cellsh2.cxx                                      |    6 
 sc/source/ui/view/editsh.cxx                                       |    8 
 sc/source/ui/view/formatsh.cxx                                     |    4 
 sc/source/ui/view/output2.cxx                                      |    2 
 sc/source/ui/view/tabview.cxx                                      |    2 
 sc/source/ui/view/tabview3.cxx                                     |   26 +-
 sc/source/ui/view/tabview4.cxx                                     |    4 
 sc/source/ui/view/tabview5.cxx                                     |    6 
 sc/source/ui/view/tabvwsha.cxx                                     |    2 
 sc/source/ui/view/tabvwshe.cxx                                     |    2 
 sc/source/ui/view/viewdata.cxx                                     |    8 
 sd/qa/unit/export-tests-ooxml1.cxx                                 |    6 
 sd/qa/unit/export-tests-ooxml2.cxx                                 |    4 
 sd/qa/unit/misc-tests.cxx                                          |    6 
 sd/qa/unit/tiledrendering/tiledrendering.cxx                       |    2 
 sd/source/core/drawdoc.cxx                                         |    4 
 sd/source/core/sdpage.cxx                                          |    2 
 sd/source/filter/eppt/eppt.cxx                                     |    6 
 sd/source/filter/eppt/pptx-epptooxml.cxx                           |    2 
 sd/source/filter/eppt/pptx-text.cxx                                |    6 
 sd/source/filter/html/htmlex.cxx                                   |    4 
 sd/source/filter/html/pubdlg.cxx                                   |    6 
 sd/source/ui/app/sdmod1.cxx                                        |    2 
 sd/source/ui/app/sdmod2.cxx                                        |    8 
 sd/source/ui/app/sdpopup.cxx                                       |   18 -
 sd/source/ui/dlg/animobjs.cxx                                      |    2 
 sd/source/ui/dlg/dlgfield.cxx                                      |   14 -
 sd/source/ui/dlg/navigatr.cxx                                      |    6 
 sd/source/ui/dlg/tpaction.cxx                                      |    6 
 sd/source/ui/dlg/tpoption.cxx                                      |    6 
 sd/source/ui/func/fuconarc.cxx                                     |    2 
 sd/source/ui/func/fuconuno.cxx                                     |    2 
 sd/source/ui/func/fuoaprms.cxx                                     |   52 ++--
 sd/source/ui/func/fuprobjs.cxx                                     |    2 
 sd/source/ui/func/fusnapln.cxx                                     |    4 
 sd/source/ui/func/futempl.cxx                                      |    4 
 sd/source/ui/sidebar/SlideBackground.cxx                           |    8 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx             |    2 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx                        |   14 -
 sd/source/ui/unoidl/unopage.cxx                                    |    8 
 sd/source/ui/view/ToolBarManager.cxx                               |    4 
 sd/source/ui/view/ViewShellBase.cxx                                |    2 
 sd/source/ui/view/ViewShellImplementation.cxx                      |    4 
 sd/source/ui/view/drtxtob.cxx                                      |    2 
 sd/source/ui/view/drtxtob1.cxx                                     |   12 -
 sd/source/ui/view/drviews2.cxx                                     |    6 
 sd/source/ui/view/drviews3.cxx                                     |    6 
 sd/source/ui/view/drviews9.cxx                                     |   28 +-
 sd/source/ui/view/drviewsd.cxx                                     |    6 
 sd/source/ui/view/drviewse.cxx                                     |    2 
 sd/source/ui/view/drviewsf.cxx                                     |   13 -
 sd/source/ui/view/frmview.cxx                                      |   12 -
 sd/source/ui/view/outlnvsh.cxx                                     |    2 
 sd/source/ui/view/viewshe3.cxx                                     |   10 
 sdext/source/pdfimport/tree/drawtreevisiting.cxx                   |    2 
 sfx2/source/appl/appcfg.cxx                                        |    2 
 sfx2/source/appl/childwin.cxx                                      |    2 
 sfx2/source/appl/module.cxx                                        |    4 
 sfx2/source/bastyp/frmhtml.cxx                                     |    2 
 sfx2/source/control/dispatch.cxx                                   |    2 
 sfx2/source/control/objface.cxx                                    |    4 
 sfx2/source/control/sfxstatuslistener.cxx                          |    2 
 sfx2/source/dialog/dockwin.cxx                                     |    8 
 sfx2/source/dialog/mgetempl.cxx                                    |    6 
 sfx2/source/dialog/splitwin.cxx                                    |    4 
 sfx2/source/dialog/templdlg.cxx                                    |   20 -
 sfx2/source/doc/printhelper.cxx                                    |   12 -
 sfx2/source/doc/zoomitem.cxx                                       |    4 
 sfx2/source/statbar/stbitem.cxx                                    |    2 
 sfx2/source/toolbox/tbxitem.cxx                                    |    2 
 slideshow/source/engine/shapeattributelayer.cxx                    |    6 
 slideshow/source/engine/shapes/shapeimporter.cxx                   |    2 
 slideshow/source/engine/shapes/viewshape.cxx                       |    2 
 sot/source/sdstor/stgelem.hxx                                      |    2 
 stoc/source/corereflection/crbase.cxx                              |    4 
 svl/source/config/asiancfg.cxx                                     |    7 
 svl/source/config/ctloptions.cxx                                   |    4 
 svl/source/items/macitem.cxx                                       |    4 
 svl/source/items/srchitem.cxx                                      |   16 -
 svl/source/numbers/numfmuno.cxx                                    |    4 
 svl/source/numbers/zforlist.cxx                                    |    2 
 svl/source/numbers/zformat.cxx                                     |    4 
 svtools/source/config/apearcfg.cxx                                 |    8 
 svtools/source/config/miscopt.cxx                                  |   12 -
 svtools/source/config/printoptions.cxx                             |    6 
 svtools/source/contnr/svlbitm.cxx                                  |    4 
 svtools/source/contnr/treelistbox.cxx                              |    2 
 svtools/source/control/calendar.cxx                                |    6 
 svtools/source/filter/SvFilterOptionsDialog.cxx                    |    2 
 svtools/source/graphic/grfcache.cxx                                |    4 
 svtools/source/misc/imagemgr.cxx                                   |    2 
 svtools/source/svhtml/htmlsupp.cxx                                 |    2 
 svtools/source/svhtml/parhtml.cxx                                  |   12 -
 svx/qa/unit/svdraw/test_SdrTextObject.cxx                          |    2 
 svx/source/accessibility/AccessibleFrameSelector.cxx               |    4 
 svx/source/accessibility/svxrectctaccessiblecontext.cxx            |    8 
 svx/source/dialog/dlgutil.cxx                                      |    2 
 svx/source/dialog/docrecovery.cxx                                  |    2 
 svx/source/dialog/optgrid.cxx                                      |    2 
 svx/source/dialog/papersizelistbox.cxx                             |    6 
 svx/source/dialog/rubydialog.cxx                                   |    2 
 svx/source/dialog/srchctrl.cxx                                     |    2 
 svx/source/engine3d/float3d.cxx                                    |    2 
 svx/source/engine3d/svx3ditems.cxx                                 |   30 +-
 svx/source/fmcomp/fmgridif.cxx                                     |   14 -
 svx/source/fmcomp/gridcell.cxx                                     |   10 
 svx/source/form/dataaccessdescriptor.cxx                           |    2 
 svx/source/form/fmshell.cxx                                        |    2 
 svx/source/form/fmshimp.cxx                                        |    2 
 svx/source/form/fmsrcimp.cxx                                       |    2 
 svx/source/form/formcontroller.cxx                                 |    2 
 svx/source/gallery2/galobj.cxx                                     |    4 
 svx/source/gallery2/galtheme.cxx                                   |    4 
 svx/source/items/algitem.cxx                                       |    4 
 svx/source/items/clipfmtitem.cxx                                   |    2 
 svx/source/items/hlnkitem.cxx                                      |    2 
 svx/source/items/numfmtsh.cxx                                      |    6 
 svx/source/items/pageitem.cxx                                      |    4 
 svx/source/items/rotmodit.cxx                                      |    2 
 svx/source/mnuctrls/clipboardctl.cxx                               |    2 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx                  |   16 -
 svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx          |    2 
 svx/source/sidebar/nbdtmg.cxx                                      |    2 
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx                 |    4 
 svx/source/sidebar/paragraph/ParaSpacingControl.cxx                |    4 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx                |   12 -
 svx/source/svdraw/svdattr.cxx                                      |   50 ++--
 svx/source/svdraw/svdedtv1.cxx                                     |    2 
 svx/source/svdraw/svdedtv2.cxx                                     |    2 
 svx/source/svdraw/svdedxv.cxx                                      |    2 
 svx/source/svdraw/svdfmtf.cxx                                      |    2 
 svx/source/svdraw/svdhdl.cxx                                       |    2 
 svx/source/svdraw/svdmodel.cxx                                     |    5 
 svx/source/svdraw/svdopath.cxx                                     |    4 
 svx/source/table/cell.cxx                                          |    2 
 svx/source/tbxctrls/fillctrl.cxx                                   |    4 
 svx/source/tbxctrls/grafctrl.cxx                                   |    2 
 svx/source/tbxctrls/itemwin.cxx                                    |    2 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx                     |    6 
 svx/source/toolbars/extrusionbar.cxx                               |    4 
 svx/source/unodraw/XPropertyTable.cxx                              |    4 
 svx/source/unodraw/unopool.cxx                                     |    2 
 svx/source/unodraw/unoshap2.cxx                                    |   12 -
 svx/source/unodraw/unoshape.cxx                                    |    2 
 svx/source/xoutdev/xattr.cxx                                       |   36 +--
 svx/source/xoutdev/xattr2.cxx                                      |    6 
 sw/qa/extras/globalfilter/globalfilter.cxx                         |    2 
 sw/qa/extras/rtfexport/rtfexport2.cxx                              |    2 
 sw/qa/extras/tiledrendering/tiledrendering.cxx                     |    2 
 sw/qa/extras/ww8export/ww8export.cxx                               |    2 
 sw/source/core/bastyp/calc.cxx                                     |    2 
 sw/source/core/crsr/crsrsh.cxx                                     |    2 
 sw/source/core/doc/dbgoutsw.cxx                                    |    2 
 sw/source/core/doc/docnew.cxx                                      |   14 -
 sw/source/core/docnode/node.cxx                                    |    4 
 sw/source/core/edit/autofmt.cxx                                    |    4 
 sw/source/core/fields/authfld.cxx                                  |    8 
 sw/source/core/fields/dbfld.cxx                                    |    2 
 sw/source/core/fields/docufld.cxx                                  |   20 -
 sw/source/core/fields/expfld.cxx                                   |    2 
 sw/source/core/frmedt/feshview.cxx                                 |    8 
 sw/source/core/graphic/grfatr.cxx                                  |    6 
 sw/source/core/layout/atrfrm.cxx                                   |   16 -
 sw/source/core/text/porlay.cxx                                     |    8 
 sw/source/core/text/txtfld.cxx                                     |    4 
 sw/source/core/tox/ToxTextGenerator.cxx                            |    2 
 sw/source/core/tox/txmsrt.cxx                                      |    4 
 sw/source/core/txtnode/fmtatr2.cxx                                 |    6 
 sw/source/core/undo/docundo.cxx                                    |   12 -
 sw/source/core/undo/undobj.cxx                                     |    2 
 sw/source/core/undo/untbl.cxx                                      |    4 
 sw/source/core/unocore/unocoll.cxx                                 |    4 
 sw/source/core/unocore/unodraw.cxx                                 |    4 
 sw/source/core/unocore/unofield.cxx                                |    2 
 sw/source/core/unocore/unoframe.cxx                                |    4 
 sw/source/core/unocore/unosett.cxx                                 |   18 -
 sw/source/core/unocore/unostyle.cxx                                |    4 
 sw/source/filter/html/htmlatr.cxx                                  |    7 
 sw/source/filter/html/htmldrawreader.cxx                           |    4 
 sw/source/filter/html/htmlfld.cxx                                  |   18 -
 sw/source/filter/html/htmlfldw.cxx                                 |   12 -
 sw/source/filter/html/htmlflywriter.cxx                            |    4 
 sw/source/filter/html/htmlform.cxx                                 |    6 
 sw/source/filter/html/htmlforw.cxx                                 |    8 
 sw/source/filter/html/svxcss1.cxx                                  |   66 +++---
 sw/source/filter/html/swhtml.cxx                                   |    2 
 sw/source/filter/ww8/docxattributeoutput.cxx                       |    4 
 sw/source/filter/ww8/rtfexport.cxx                                 |    2 
 sw/source/filter/ww8/wrtw8esh.cxx                                  |    2 
 sw/source/filter/ww8/wrtw8nds.cxx                                  |    6 
 sw/source/filter/ww8/ww8graf.cxx                                   |    2 
 sw/source/filter/ww8/ww8par.cxx                                    |   17 -
 sw/source/filter/ww8/ww8par3.cxx                                   |    2 
 sw/source/filter/xml/xmlithlp.cxx                                  |    6 
 sw/source/ui/chrdlg/numpara.cxx                                    |    2 
 sw/source/ui/config/optload.cxx                                    |    4 
 sw/source/ui/config/optpage.cxx                                    |   34 +--
 sw/source/ui/dbui/mmlayoutpage.cxx                                 |    8 
 sw/source/ui/dialog/ascfldlg.cxx                                   |    4 
 sw/source/ui/envelp/envfmt.cxx                                     |    8 
 sw/source/ui/envelp/envprt.cxx                                     |    2 
 sw/source/ui/fmtui/tmpdlg.cxx                                      |    4 
 sw/source/ui/frmdlg/frmpage.cxx                                    |    4 
 sw/source/ui/index/cnttab.cxx                                      |   24 +-
 sw/source/ui/index/swuiidxmrk.cxx                                  |   10 
 sw/source/ui/misc/linenum.cxx                                      |    2 
 sw/source/ui/misc/pgfnote.cxx                                      |    2 
 sw/source/uibase/app/apphdl.cxx                                    |    2 
 sw/source/uibase/app/appopt.cxx                                    |    6 
 sw/source/uibase/app/docsh2.cxx                                    |    2 
 sw/source/uibase/app/docst.cxx                                     |   20 -
 sw/source/uibase/app/swmodul1.cxx                                  |   10 
 sw/source/uibase/config/barcfg.cxx                                 |    2 
 sw/source/uibase/config/modcfg.cxx                                 |   18 -
 sw/source/uibase/config/prtopt.cxx                                 |    2 
 sw/source/uibase/config/usrpref.cxx                                |    8 
 sw/source/uibase/docvw/edtwin.cxx                                  |    6 
 sw/source/uibase/envelp/envimg.cxx                                 |    2 
 sw/source/uibase/fldui/fldmgr.cxx                                  |    2 
 sw/source/uibase/misc/numberingtypelistbox.cxx                     |    2 
 sw/source/uibase/shells/annotsh.cxx                                |    8 
 sw/source/uibase/shells/drformsh.cxx                               |    2 
 sw/source/uibase/shells/drwbassh.cxx                               |    8 
 sw/source/uibase/shells/drwtxtex.cxx                               |    8 
 sw/source/uibase/shells/frmsh.cxx                                  |    2 
 sw/source/uibase/shells/grfsh.cxx                                  |    5 
 sw/source/uibase/shells/tabsh.cxx                                  |    6 
 sw/source/uibase/shells/textsh.cxx                                 |   10 
 sw/source/uibase/sidebar/PageFormatPanel.cxx                       |    4 
 sw/source/uibase/sidebar/PageMarginControl.cxx                     |    2 
 sw/source/uibase/sidebar/PageSizeControl.cxx                       |    2 
 sw/source/uibase/sidebar/PageStylesPanel.cxx                       |    6 
 sw/source/uibase/uiview/view.cxx                                   |    4 
 sw/source/uibase/uiview/viewcoll.cxx                               |    2 
 sw/source/uibase/uiview/viewdlg2.cxx                               |    2 
 sw/source/uibase/uno/SwXDocumentSettings.cxx                       |    4 
 sw/source/uibase/uno/unotxdoc.cxx                                  |    6 
 sw/source/uibase/uno/unotxvw.cxx                                   |    4 
 sw/source/uibase/utlui/content.cxx                                 |   14 -
 sw/source/uibase/utlui/numfmtlb.cxx                                |    2 
 sw/source/uibase/utlui/uiitems.cxx                                 |    4 
 test/source/sheet/xspreadsheets2.cxx                               |    2 
 testtools/source/bridgetest/bridgetest.cxx                         |    2 
 toolkit/source/awt/vclxgraphics.cxx                                |    4 
 toolkit/source/awt/vclxmenu.cxx                                    |    4 
 toolkit/source/awt/vclxpointer.cxx                                 |    4 
 toolkit/source/awt/vclxwindow.cxx                                  |    8 
 toolkit/source/awt/vclxwindows.cxx                                 |   10 
 toolkit/source/controls/unocontrolmodel.cxx                        |   12 -
 toolkit/source/helper/vclunohelper.cxx                             |   20 -
 tools/source/stream/strmunx.cxx                                    |    4 
 unotools/source/config/extendedsecurityoptions.cxx                 |    2 
 unotools/source/config/fontcfg.cxx                                 |    4 
 unotools/source/config/securityoptions.cxx                         |    2 
 unotools/source/i18n/charclass.cxx                                 |    4 
 unotools/source/i18n/transliterationwrapper.cxx                    |    2 
 unotools/source/ucbhelper/ucbhelper.cxx                            |    2 
 unotools/source/ucbhelper/ucblockbytes.cxx                         |    2 
 unoxml/source/dom/characterdata.cxx                                |    2 
 unoxml/source/dom/document.cxx                                     |    2 
 unoxml/source/dom/node.cxx                                         |    6 
 uui/source/iahndl-authentication.cxx                               |    2 
 uui/source/iahndl-ioexceptions.cxx                                 |   16 -
 uui/source/iahndl.cxx                                              |    2 
 vbahelper/source/vbahelper/vbafontbase.cxx                         |    2 
 vcl/qa/cppunit/graphicfilter/filters-test.cxx                      |    2 
 vcl/source/app/scheduler.cxx                                       |    4 
 vcl/source/control/button.cxx                                      |    2 
 vcl/source/edit/texteng.cxx                                        |    2 
 vcl/source/filter/graphicfilter.cxx                                |    4 
 vcl/source/filter/graphicfilter2.cxx                               |    2 
 vcl/source/filter/wmf/emfwr.cxx                                    |    4 
 vcl/source/font/font.cxx                                           |   24 +-
 vcl/source/gdi/CommonSalLayout.cxx                                 |    2 
 vcl/source/gdi/animate.cxx                                         |    6 
 vcl/source/gdi/bitmapex.cxx                                        |    2 
 vcl/source/gdi/bmpfast.cxx                                         |    8 
 vcl/source/gdi/dibtools.cxx                                        |    4 
 vcl/source/gdi/gfxlink.cxx                                         |    4 
 vcl/source/gdi/gradient.cxx                                        |    4 
 vcl/source/gdi/hatch.cxx                                           |    4 
 vcl/source/gdi/impgraph.cxx                                        |   10 
 vcl/source/gdi/jobset.cxx                                          |    6 
 vcl/source/gdi/lineinfo.cxx                                        |   10 
 vcl/source/gdi/mapmod.cxx                                          |    4 
 vcl/source/gdi/metaact.cxx                                         |   14 -
 vcl/source/gdi/pdfwriter_impl.cxx                                  |    2 
 vcl/source/gdi/pdfwriter_impl2.cxx                                 |    2 
 vcl/source/gdi/print.cxx                                           |    6 
 vcl/source/gdi/print3.cxx                                          |    2 
 vcl/source/gdi/region.cxx                                          |    2 
 vcl/source/gdi/regionband.cxx                                      |    6 
 vcl/source/gdi/svmconverter.cxx                                    |   34 +--
 vcl/source/outdev/rect.cxx                                         |    2 
 vcl/source/uitest/uiobject.cxx                                     |    2 
 vcl/source/window/keycod.cxx                                       |    6 
 vcl/source/window/printdlg.cxx                                     |    4 
 vcl/source/window/syswin.cxx                                       |    2 
 vcl/source/window/winproc.cxx                                      |    2 
 vcl/unx/gtk/a11y/atkcomponent.cxx                                  |    2 
 vcl/unx/gtk/a11y/atkfactory.cxx                                    |    4 
 vcl/unx/gtk/a11y/atkhypertext.cxx                                  |    2 
 vcl/unx/gtk/a11y/atktextattributes.cxx                             |    4 
 vcl/unx/gtk/a11y/atkutil.cxx                                       |    2 
 vcl/unx/gtk/a11y/atkwindow.cxx                                     |    2 
 vcl/unx/gtk/a11y/atkwrapper.cxx                                    |    4 
 vcl/unx/gtk/gtksalframe.cxx                                        |   14 -
 vcl/unx/gtk3/gtk3gtkframe.cxx                                      |   16 -
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx                          |   40 +--
 vcl/workben/vcldemo.cxx                                            |    2 
 writerfilter/source/dmapper/ConversionHelper.cxx                   |    2 
 writerfilter/source/dmapper/DomainMapper.cxx                       |    2 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx           |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                  |    2 
 writerfilter/source/dmapper/FormControlHelper.cxx                  |    2 
 writerfilter/source/dmapper/GraphicImport.cxx                      |    4 
 writerfilter/source/dmapper/OLEHandler.cxx                         |    2 
 xmloff/source/chart/PropertyMap.hxx                                |    8 
 xmloff/source/chart/PropertyMaps.cxx                               |    2 
 xmloff/source/chart/SchXMLAxisContext.cxx                          |    2 
 xmloff/source/chart/SchXMLEnumConverter.cxx                        |    4 
 xmloff/source/draw/XMLImageMapContext.cxx                          |    2 
 xmloff/source/draw/animexp.cxx                                     |    2 
 xmloff/source/draw/animimp.cxx                                     |    6 
 xmloff/source/draw/eventimp.cxx                                    |    2 
 xmloff/source/draw/sdpropls.cxx                                    |   52 ++--
 xmloff/source/draw/ximpshap.cxx                                    |    4 
 xmloff/source/forms/elementimport.cxx                              |    2 
 xmloff/source/forms/formenums.cxx                                  |   14 -
 xmloff/source/forms/gridcolumnproptranslator.cxx                   |    2 
 xmloff/source/style/DashStyle.cxx                                  |    2 
 xmloff/source/style/GradientStyle.cxx                              |    2 
 xmloff/source/style/HatchStyle.cxx                                 |    2 
 xmloff/source/style/TransGradientStyle.cxx                         |    2 
 xmloff/source/style/XMLBackgroundImageContext.cxx                  |    6 
 xmloff/source/style/XMLFootnoteSeparatorExport.cxx                 |    2 
 xmloff/source/style/XMLFootnoteSeparatorImport.cxx                 |    2 
 xmloff/source/style/adjushdl.cxx                                   |   14 -
 xmloff/source/style/backhdl.cxx                                    |    8 
 xmloff/source/style/breakhdl.cxx                                   |    4 
 xmloff/source/style/fonthdl.cxx                                    |    8 
 xmloff/source/style/postuhdl.cxx                                   |    4 
 xmloff/source/style/prhdlfac.cxx                                   |    4 
 xmloff/source/style/xmlnumfe.cxx                                   |    4 
 xmloff/source/style/xmlnumfi.cxx                                   |    4 
 xmloff/source/style/xmlstyle.cxx                                   |    4 
 xmloff/source/style/xmltabe.cxx                                    |    2 
 xmloff/source/text/XMLIndexSourceBaseContext.cxx                   |    2 
 xmloff/source/text/XMLIndexTOCContext.cxx                          |    2 
 xmloff/source/text/XMLIndexTemplateContext.cxx                     |    2 
 xmloff/source/text/XMLLineNumberingImportContext.cxx               |    2 
 xmloff/source/text/XMLSectionExport.cxx                            |    6 
 xmloff/source/text/XMLTextColumnsContext.cxx                       |    2 
 xmloff/source/text/XMLTextMarkImportContext.cxx                    |    2 
 xmloff/source/text/txtflde.cxx                                     |    2 
 xmloff/source/text/txtfldi.cxx                                     |    2 
 xmloff/source/text/txtparai.cxx                                    |    8 
 xmloff/source/text/txtprhdl.cxx                                    |    8 
 xmloff/source/text/txtvfldi.cxx                                    |    2 
 xmloff/source/transform/StyleOOoTContext.cxx                       |    4 
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx                    |    2 
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx                    |    2 
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx                      |    2 
 580 files changed, 1918 insertions(+), 1948 deletions(-)

New commits:
commit 17fbc3f8fd4ae04fbb0cb94514a41ee3b6bc7274
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:07:26 2018 +0100

    More loplugin:cstylecast: accessibility
    
    Change-Id: I5bc8985586bc13874ba039a60e67cb2d347e6742

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 922ba3721f7a..7b001a5a07e7 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -1127,7 +1127,7 @@ namespace accessibility
                 else if ( nValue > nValueMax )
                     nValue = nValueMax;
 
-                pBox->SetCheckButtonState(pEntry,  (SvButtonState) nValue );
+                pBox->SetCheckButtonState(pEntry,  static_cast<SvButtonState>(nValue) );
                 bReturn = true;
             }
         }
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index c418ab5c7abf..24433d0505bc 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1001,7 +1001,7 @@ Document::retrieveCharacterAttributes(
     //character alignment
     aAttribs[i].Name = "ParaAdjust";
     aAttribs[i].Handle = -1;
-    aAttribs[i].Value <<= (sal_Int16)m_rEngine.GetTextAlign();
+    aAttribs[i].Value <<= static_cast<sal_Int16>(m_rEngine.GetTextAlign());
     aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
     i++;
 
commit 956c04c49d2150328fc0d402d6d156da22d6dfcf
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:07:20 2018 +0100

    More loplugin:cstylecast: avmedia
    
    Change-Id: If76a59af4164f08a79334035c904d5e920115d43

diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index db2f20364b68..45aedd45e375 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -114,7 +114,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
     gint64 gst_position = llround( fMediaTime * GST_SECOND );
     gst_element_seek_simple(
         mpPipeline, GST_FORMAT_TIME,
-        (GstSeekFlags)(GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH),
+        GstSeekFlags(GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH),
         gst_position );
 
     GstElement *pSink = gst_bin_get_by_name( GST_BIN( mpPipeline ), "sink" );
commit 3a40d3de89f0b1252974c98e5a5382d6eca67025
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:07:14 2018 +0100

    More loplugin:cstylecast: basic
    
    Change-Id: I0bb219632da384ab047a2b1fc3f2b041dacaf2cb

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index d622d887ce21..fc2b6fac29ef 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -488,7 +488,7 @@ SbxDataType unoToSbxType( TypeClass eType )
 
         case TypeClass_ENUM:            eRetType = SbxLONG;     break;
         case TypeClass_SEQUENCE:
-            eRetType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
+            eRetType = SbxDataType( SbxOBJECT | SbxARRAY );
             break;
 
 
@@ -867,7 +867,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
         if( auto pArray = dynamic_cast<SbxDimArray*>( xObj.get() ) )
         {
             short nDims = pArray->GetDims();
-            Type aElementType = getUnoTypeForSbxBaseType( (SbxDataType)(pArray->GetType() & 0xfff) );
+            Type aElementType = getUnoTypeForSbxBaseType( static_cast<SbxDataType>(pArray->GetType() & 0xfff) );
             TypeClass eElementTypeClass = aElementType.getTypeClass();
 
             // Normal case: One dimensional array
@@ -1861,7 +1861,7 @@ OUString Impl_DumpProperties(SbUnoObject& rUnoObj)
                 {
                     Type aType = rProp.Type;
                     if( aType.getTypeClass() == TypeClass_SEQUENCE )
-                        eType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
+                        eType = SbxDataType( SbxOBJECT | SbxARRAY );
                 }
             }
             aPropStr.append( Dbg_SbxDataType2String( eType ) );
@@ -1930,7 +1930,7 @@ OUString Impl_DumpMethods(SbUnoObject& rUnoObj)
             {
                 Reference< XIdlClass > xClass = rxMethod->getReturnType();
                 if( xClass.is() && xClass->getTypeClass() == TypeClass_SEQUENCE )
-                    eType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
+                    eType = SbxDataType( SbxOBJECT | SbxARRAY );
             }
             // output the name and the type
             aRet.append( Dbg_SbxDataType2String( eType ) );
@@ -4793,7 +4793,7 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
                 {
                     if( rPropInfo.getTypeClass() == TypeClass_SEQUENCE )
                     {
-                        eType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
+                        eType = SbxDataType( SbxOBJECT | SbxARRAY );
                     }
                 }
             }
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 3c28f7a5b765..d83cd2b59874 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1451,7 +1451,7 @@ const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine,
     sal_uInt32 nPC = static_cast<sal_uInt32>( p - reinterpret_cast<const sal_uInt8*>(pImage->GetCode()) );
     while( nPC < pImage->GetCodeSize() )
     {
-        SbiOpcode eOp = (SbiOpcode ) ( *p++ );
+        SbiOpcode eOp = static_cast<SbiOpcode>( *p++ );
         nPC++;
         if( bFollowJumps && eOp == SbiOpcode::JUMP_ && pImg )
         {
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index e1ad56d7efde..aa587ba0e5b5 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -89,7 +89,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode )
         pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "OPCODE1" );
 #endif
     GenStmnt();
-    aCode += (sal_uInt8) eOpcode;
+    aCode += static_cast<sal_uInt8>(eOpcode);
     return GetPC();
 }
 
@@ -103,7 +103,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd )
         pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "OPCODE2" );
 #endif
     GenStmnt();
-    aCode += (sal_uInt8) eOpcode;
+    aCode += static_cast<sal_uInt8>(eOpcode);
     sal_uInt32 n = GetPC();
     aCode += nOpnd;
     return n;
@@ -119,7 +119,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd1, sal_uInt32 nOp
         pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "OPCODE3" );
 #endif
     GenStmnt();
-    aCode += (sal_uInt8) eOpcode;
+    aCode += static_cast<sal_uInt8>(eOpcode);
     sal_uInt32 n = GetPC();
     aCode += nOpnd1;
     aCode += nOpnd2;
@@ -306,11 +306,11 @@ void SbiCodeGen::Save()
                         SbxDataType t = pPar->GetType();
                         if( !pPar->IsByVal() )
                         {
-                            t = (SbxDataType) ( t | SbxBYREF );
+                            t = static_cast<SbxDataType>( t | SbxBYREF );
                         }
                         if( pPar->GetDims() )
                         {
-                            t = (SbxDataType) ( t | SbxARRAY );
+                            t = static_cast<SbxDataType>( t | SbxARRAY );
                         }
                         // #33677 hand-over an Optional-Info
                         SbxFlagBits nFlags = SbxFlagBits::Read;
@@ -428,7 +428,7 @@ public:
         T nOp1 = 0, nOp2 = 0;
         for( ; pCode < pEnd; )
         {
-            SbiOpcode eOp = (SbiOpcode)(*pCode++);
+            SbiOpcode eOp = static_cast<SbiOpcode>(*pCode++);
 
             if ( eOp <= SbiOpcode::SbOP0_END )
                 visitor.processOpCode0( eOp );
@@ -498,11 +498,11 @@ public:
     virtual void start( const sal_uInt8* pStart ) override { m_pStart = pStart; }
     virtual void processOpCode0( SbiOpcode eOp ) override
     {
-        m_ConvertedBuf += (sal_uInt8)eOp;
+        m_ConvertedBuf += static_cast<sal_uInt8>(eOp);
     }
     virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) override
     {
-        m_ConvertedBuf += (sal_uInt8)eOp;
+        m_ConvertedBuf += static_cast<sal_uInt8>(eOp);
         switch( eOp )
         {
             case SbiOpcode::JUMP_:
@@ -527,7 +527,7 @@ public:
     }
     virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) override
     {
-        m_ConvertedBuf += (sal_uInt8)eOp;
+        m_ConvertedBuf += static_cast<sal_uInt8>(eOp);
         if ( eOp == SbiOpcode::CASEIS_ )
                 if ( nOp1 )
                     nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) );
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 371c9bb4269f..60d10ab6a11b 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -407,7 +407,7 @@ SbiToken SbiTokenizer::Next()
         sal_Unicode ch = aSym[0];
         if( !BasicCharClass::isAlpha( ch, bCompatible ) && !bSymbol )
         {
-            return eCurTok = (SbiToken) (ch & 0x00FF);
+            return eCurTok = static_cast<SbiToken>(ch & 0x00FF);
         }
         return eCurTok = SYMBOL;
     }
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 05adf06d3049..17ee2b4f969d 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2971,15 +2971,15 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
                     bool bDirectory = xSFI->isFolder( aPath );
                     if( bReadOnly )
                     {
-                        nFlags |= (sal_uInt16)SbAttributes::READONLY;
+                        nFlags |= sal_uInt16(SbAttributes::READONLY);
                     }
                     if( bHidden )
                     {
-                        nFlags |= (sal_uInt16)SbAttributes::HIDDEN;
+                        nFlags |= sal_uInt16(SbAttributes::HIDDEN);
                     }
                     if( bDirectory )
                     {
-                        nFlags |= (sal_uInt16)SbAttributes::DIRECTORY;
+                        nFlags |= sal_uInt16(SbAttributes::DIRECTORY);
                     }
                 }
                 catch(const Exception & )
@@ -3001,11 +3001,11 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
             bool bDirectory = isFolder( aType );
             if( bReadOnly )
             {
-                nFlags |= (sal_uInt16)SbAttributes::READONLY;
+                nFlags |= sal_uInt16(SbAttributes::READONLY);
             }
             if( bDirectory )
             {
-                nFlags |= (sal_uInt16)SbAttributes::DIRECTORY;
+                nFlags |= sal_uInt16(SbAttributes::DIRECTORY);
             }
         }
         rPar.Get(0)->PutInteger( nFlags );
@@ -3150,7 +3150,7 @@ void SbRtl_FileAttr(StarBASIC *, SbxArray & rPar, bool)
         sal_Int16 nRet;
         if ( rPar.Get(2)->GetInteger() == 1 )
         {
-            nRet = (sal_Int16)(pSbStrm->GetMode());
+            nRet = static_cast<sal_Int16>(pSbStrm->GetMode());
         }
         else
         {
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index aa7d009be0a8..68dfb503f572 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1004,7 +1004,7 @@ static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
     {
         sal_uInt16 nTemp;
         pStrm->ReadUInt16( nTemp );
-        eSrcType = (SbxDataType)nTemp;
+        eSrcType = static_cast<SbxDataType>(nTemp);
     }
 
     switch( eSrcType )
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 63fe8c580ad8..db68c4988f98 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -661,10 +661,10 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
             if( p )
             {
                 bByVal |= ( p->eType & SbxBYREF ) == 0;
-                t = (SbxDataType) ( p->eType & 0x0FFF );
+                t = static_cast<SbxDataType>( p->eType & 0x0FFF );
 
                 if( !bByVal && t != SbxVARIANT &&
-                    (!v->IsFixed() || (SbxDataType)(v->GetType() & 0x0FFF ) != t) )
+                    (!v->IsFixed() || static_cast<SbxDataType>(v->GetType() & 0x0FFF ) != t) )
                 {
                     bByVal = true;
                 }
@@ -748,7 +748,7 @@ bool SbiRuntime::Step()
             }
         }
 
-        SbiOpcode eOp = (SbiOpcode ) ( *pCode++ );
+        SbiOpcode eOp = static_cast<SbiOpcode>( *pCode++ );
         sal_uInt32 nOp1, nOp2;
         if (eOp <= SbiOpcode::SbOP0_END)
         {
@@ -2813,7 +2813,7 @@ void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 )
     else
     {
         bool bByVal = (nOp1 & 0x8000) != 0;         // Is BYVAL requested?
-        SbxDataType t = (SbxDataType) (nOp1 & 0x7FFF);
+        SbxDataType t = static_cast<SbxDataType>(nOp1 & 0x7FFF);
         SbxVariable* pVar = refArgv->Get( refArgv->Count() - 1 );   // last Arg
 
         // check BYVAL
@@ -3310,7 +3310,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
     else
     {
         bool bFatalError = false;
-        SbxDataType t = (SbxDataType) nOp2;
+        SbxDataType t = static_cast<SbxDataType>(nOp2);
         OUString aName( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) );
         // Hacky capture of Evaluate [] syntax
         // this should be tackled I feel at the pcode level
@@ -3991,7 +3991,7 @@ void SbiRuntime::StepELEM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
 void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
 {
     sal_uInt16 i = static_cast<sal_uInt16>( nOp1 & 0x7FFF );
-    SbxDataType t = (SbxDataType) nOp2;
+    SbxDataType t = static_cast<SbxDataType>(nOp2);
     SbxVariable* p;
 
     // #57915 solve missing in a cleaner way
@@ -4055,7 +4055,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
             Error( ERRCODE_BASIC_NOT_OPTIONAL );
         }
     }
-    else if( t != SbxVARIANT && (SbxDataType)(p->GetType() & 0x0FFF ) != t )
+    else if( t != SbxVARIANT && static_cast<SbxDataType>(p->GetType() & 0x0FFF ) != t )
     {
         SbxVariable* q = new SbxVariable( t );
         aRefSaved.emplace_back(q );
@@ -4082,7 +4082,7 @@ void SbiRuntime::StepCASEIS( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     {
         SbxVariableRef xComp = PopVar();
         SbxVariableRef xCase = refCaseStk->Get( refCaseStk->Count() - 1 );
-        if( xCase->Compare( (SbxOperator) nOp2, *xComp ) )
+        if( xCase->Compare( static_cast<SbxOperator>(nOp2), *xComp ) )
         {
             StepJUMP( nOp1 );
         }
@@ -4100,7 +4100,7 @@ void SbiRuntime::StepCALL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     {
         pArgs = refArgv.get();
     }
-    DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, false );
+    DllCall( aName, aLibName, pArgs, static_cast<SbxDataType>(nOp2), false );
     aLibName.clear();
     if( nOp1 & 0x8000 )
     {
@@ -4118,7 +4118,7 @@ void SbiRuntime::StepCALLC( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     {
         pArgs = refArgv.get();
     }
-    DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, true );
+    DllCall( aName, aLibName, pArgs, static_cast<SbxDataType>(nOp2), true );
     aLibName.clear();
     if( nOp1 & 0x8000 )
     {
@@ -4458,7 +4458,7 @@ void SbiRuntime::StepLOCAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
     if( refLocals->Find( aName, SbxClassType::DontCare ) == nullptr )
     {
-        SbxDataType t = (SbxDataType)(nOp2 & 0xffff);
+        SbxDataType t = static_cast<SbxDataType>(nOp2 & 0xffff);
         SbxVariable* p = new SbxVariable( t );
         p->SetName( aName );
         implHandleSbxFlags( p, t, nOp2 );
@@ -4471,7 +4471,7 @@ void SbiRuntime::StepLOCAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
 void SbiRuntime::StepPUBLIC_Impl( sal_uInt32 nOp1, sal_uInt32 nOp2, bool bUsedForClassModule )
 {
     OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
-    SbxDataType t = (SbxDataType)(nOp2 & 0xffff);
+    SbxDataType t = static_cast<SbxDataType>(nOp2 & 0xffff);
     bool bFlag = pMod->IsSet( SbxFlagBits::NoModify );
     pMod->SetFlag( SbxFlagBits::NoModify );
     SbxVariableRef p = pMod->Find( aName, SbxClassType::Property );
@@ -4523,7 +4523,7 @@ void SbiRuntime::StepGLOBAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
         StepPUBLIC_Impl( nOp1, nOp2, true );
     }
     OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
-    SbxDataType t = (SbxDataType)(nOp2 & 0xffff);
+    SbxDataType t = static_cast<SbxDataType>(nOp2 & 0xffff);
 
     // Store module scope variables at module scope
     // in non vba mode these are stored at the library level :/
@@ -4581,7 +4581,7 @@ void SbiRuntime::StepFIND_G( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     else
     {
         // Return dummy variable
-        SbxDataType t = (SbxDataType) nOp2;
+        SbxDataType t = static_cast<SbxDataType>(nOp2);
         OUString aName( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) );
 
         SbxVariable* pDummyVar = new SbxVariable( t );
@@ -4616,7 +4616,7 @@ SbxVariable* SbiRuntime::StepSTATIC_Impl(
 void SbiRuntime::StepSTATIC( sal_uInt32 nOp1, sal_uInt32 nOp2 )
 {
     OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
-    SbxDataType t = (SbxDataType) (nOp2 & 0xffff);
+    SbxDataType t = static_cast<SbxDataType>(nOp2 & 0xffff);
     StepSTATIC_Impl( aName, t, nOp2 );
 }
 
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index a082c1c523e4..8d3c5515cc8a 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -84,7 +84,7 @@ SbxArray::~SbxArray()
 
 SbxDataType SbxArray::GetType() const
 {
-    return (SbxDataType) ( eType | SbxARRAY );
+    return static_cast<SbxDataType>( eType | SbxARRAY );
 }
 
 SbxClassType SbxArray::GetClass() const
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 1b5a6b8eb228..a99a26751dac 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -315,7 +315,7 @@ void SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
         SbxFlagBits nFlags = static_cast<SbxFlagBits>(nFlagsTmp);
         if( nVer > 1 )
             rStrm.ReadUInt32( nUserData );
-        AddParam( aName, (SbxDataType) nType, nFlags );
+        AddParam( aName, static_cast<SbxDataType>(nType), nFlags );
         SbxParamInfo& p(*m_Params.back());
         p.nUserData = nUserData;
     }
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 5fa4023f9a23..e241b53c0387 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -215,7 +215,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
         "basic.sbx",
         "search" << std::setw(nLvl) << " "
             << (t >= SbxClassType::DontCare && t <= SbxClassType::Object
-                ? pCls[(int)t - 1] : "Unknown class")
+                ? pCls[static_cast<int>(t) - 1] : "Unknown class")
             << " " << rName << " in " << SbxVariable::GetName());
     ++nLvl;
 #endif
@@ -470,7 +470,7 @@ void SbxObject::Insert( SbxVariable* pVar )
             "insert "
                 << ((pVar->GetClass() >= SbxClassType::DontCare
                      && pVar->GetClass() <= SbxClassType::Object)
-                    ? pCls[(int)pVar->GetClass() - 1] : "Unknown class")
+                    ? pCls[static_cast<int>(pVar->GetClass()) - 1] : "Unknown class")
                 << " " << aVarName << " in " << SbxVariable::GetName());
 #endif
     }
@@ -514,7 +514,7 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
             "insert "
                 << ((pVar->GetClass() >= SbxClassType::DontCare
                      && pVar->GetClass() <= SbxClassType::Object)
-                    ? pCls[(int)pVar->GetClass() - 1] : "Unknown class")
+                    ? pCls[static_cast<int>(pVar->GetClass()) - 1] : "Unknown class")
                 << " " << aVarName << " in " << SbxVariable::GetName());
 #endif
     }
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 70fdfe31c512..dcf336544c3e 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -430,7 +430,7 @@ bool SbxValue::Put( const SbxValues& rVal )
         {
             if( !p->CanWrite() )
                 SetError( ERRCODE_BASIC_PROP_READONLY );
-            else if( p->IsFixed() || p->SetType( (SbxDataType) ( rVal.eType & 0x0FFF ) ) )
+            else if( p->IsFixed() || p->SetType( static_cast<SbxDataType>( rVal.eType & 0x0FFF ) ) )
               switch( rVal.eType & 0x0FFF )
             {
                 case SbxEMPTY:
@@ -1525,9 +1525,9 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
                 r.WriteInt32( aData.nLong ); break;
             case SbxDATE:
                 // #49935: Save as double, otherwise an error during the read in
-                const_cast<SbxValue*>(this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE );
+                const_cast<SbxValue*>(this)->aData.eType = static_cast<SbxDataType>( ( nType & 0xF000 ) | SbxDOUBLE );
                 write_uInt16_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
-                const_cast<SbxValue*>(this)->aData.eType = (SbxDataType)nType;
+                const_cast<SbxValue*>(this)->aData.eType = static_cast<SbxDataType>(nType);
                 break;
             case SbxSINGLE:
             case SbxDOUBLE:
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index dba13358febd..17db37db5c37 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -489,7 +489,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
         SbxValues aTmp;
         OUString aTmpString;
         OUString aVal;
-        aTmp.eType = aData.eType = (SbxDataType) nType;
+        aTmp.eType = aData.eType = static_cast<SbxDataType>(nType);
         aTmp.pOUString = &aVal;
         switch( nType )
         {
commit 0cad6d02070ebab995611e8c8125e11e3f7c4836
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:07:10 2018 +0100

    More loplugin:cstylecast: canvas
    
    Change-Id: I16ce5e190febb7a180b53c62344915fefaa26b4c

diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 622985f11b5c..a25dac85acc6 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -379,7 +379,7 @@ namespace cairocanvas
                 }
                 break;
             default:
-                SAL_INFO( "canvas.cairo", "fallback to GetColor for alpha - slow, format: " << (int)pAlphaReadAcc->GetScanlineFormat() );
+                SAL_INFO( "canvas.cairo", "fallback to GetColor for alpha - slow, format: " << static_cast<int>(pAlphaReadAcc->GetScanlineFormat()) );
                 for( nX = 0; nX < nWidth; nX++ )
                 {
                     nAlpha = data[ nOff ] = 255 - pAlphaReadAcc->GetColor( nY, nX ).GetIndex();
@@ -603,7 +603,7 @@ namespace cairocanvas
                         }
                         break;
                     default:
-                        SAL_INFO( "canvas.cairo", "fallback to GetColor - slow, format: " << (int)pBitmapReadAcc->GetScanlineFormat() );
+                        SAL_INFO( "canvas.cairo", "fallback to GetColor - slow, format: " << static_cast<int>(pBitmapReadAcc->GetScanlineFormat()) );
 
                         if( pAlphaReadAcc )
                             if( readAlpha( pAlphaReadAcc, nY, nWidth, data, nOff ) )
commit 2b9975f6cdc81c37d896a234c9fc69bbc8535cc0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:07:04 2018 +0100

    More loplugin:cstylecast: chart2
    
    Change-Id: Id704acc62a62554a81673c512e84a71a71798013

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 6c83d564b6dd..7351ca30fcda 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1133,7 +1133,7 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con
     css::chart::ChartDataRowSource eChartDataRowSource = css::chart::ChartDataRowSource_ROWS;
     if( ! (rOuterValue >>= eChartDataRowSource) )
     {
-        sal_Int32 nNew = (sal_Int32)css::chart::ChartDataRowSource_ROWS;
+        sal_Int32 nNew = sal_Int32(css::chart::ChartDataRowSource_ROWS);
         if( !(rOuterValue >>= nNew) )
             throw lang::IllegalArgumentException( "Property DataRowSource requires css::chart::ChartDataRowSource value", nullptr, 0 );
         eChartDataRowSource = css::chart::ChartDataRowSource(nNew);
diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
index aecf250adb20..4c5040caf4ef 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx
@@ -59,7 +59,7 @@ void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
         SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
         TabulatorDisableFlags const nFlags(( TabulatorDisableFlags::TypeMask &~TabulatorDisableFlags::TypeLeft ) |
                                      ( TabulatorDisableFlags::FillMask &~TabulatorDisableFlags::FillNone ));
-        aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_DISABLEFLAGS, (sal_uInt16)nFlags) );
+        aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_DISABLEFLAGS, static_cast<sal_uInt16>(nFlags)) );
         rPage.PageCreated( aSet );
     }
 }
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index bac8ef363e17..e530fb07d241 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -181,7 +181,7 @@ void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs )
     const SfxPoolItem* pPoolItem = nullptr;
     if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET )
     {
-        chart2::LegendPosition nLegendPosition = (chart2::LegendPosition) static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+        chart2::LegendPosition nLegendPosition = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
         switch( nLegendPosition )
         {
             case chart2::LegendPosition_LINE_START:
@@ -219,7 +219,7 @@ void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const
         nLegendPosition = chart2::LegendPosition_LINE_END;
     else if( m_pRbtBottom->IsChecked() )
         nLegendPosition = chart2::LegendPosition_PAGE_END;
-    rOutAttrs.Put( SfxInt32Item(SCHATTR_LEGEND_POS, (sal_Int32)nLegendPosition ) );
+    rOutAttrs.Put( SfxInt32Item(SCHATTR_LEGEND_POS, static_cast<sal_Int32>(nLegendPosition) ) );
 
     rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, m_pCbxShow == nullptr || m_pCbxShow->IsChecked()) );
 }
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index aa168a51e6e2..6b59fcb5394f 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -338,7 +338,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
         {
             css::chart::ChartAxisPosition eAxisPos( css::chart::ChartAxisPosition_ZERO );
             GetPropertySet()->getPropertyValue( "CrossoverPosition" ) >>= eAxisPos;
-            rOutItemSet.Put( SfxInt32Item( nWhichId, (sal_Int32)eAxisPos ) );
+            rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast<sal_Int32>(eAxisPos) ) );
         }
         break;
 
@@ -371,7 +371,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
         {
             css::chart::ChartAxisLabelPosition ePos( css::chart::ChartAxisLabelPosition_NEAR_AXIS );
             GetPropertySet()->getPropertyValue( "LabelPosition" ) >>= ePos;
-            rOutItemSet.Put( SfxInt32Item( nWhichId, (sal_Int32)ePos ) );
+            rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast<sal_Int32>(ePos) ) );
         }
         break;
 
@@ -379,7 +379,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
         {
             css::chart::ChartAxisMarkPosition ePos( css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
             GetPropertySet()->getPropertyValue( "MarkPosition" ) >>= ePos;
-            rOutItemSet.Put( SfxInt32Item( nWhichId, (sal_Int32)ePos ) );
+            rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast<sal_Int32>(ePos) ) );
         }
         break;
 
@@ -741,8 +741,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
         case SCHATTR_AXIS_POSITION:
         {
             css::chart::ChartAxisPosition eAxisPos =
-                (css::chart::ChartAxisPosition)
-                static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue();
+                static_cast<css::chart::ChartAxisPosition>(static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue());
 
             css::chart::ChartAxisPosition eOldAxisPos( css::chart::ChartAxisPosition_ZERO );
             bool bPropExisted = ( GetPropertySet()->getPropertyValue( "CrossoverPosition" ) >>= eOldAxisPos );
@@ -813,8 +812,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
         case SCHATTR_AXIS_LABEL_POSITION:
         {
             css::chart::ChartAxisLabelPosition ePos =
-                (css::chart::ChartAxisLabelPosition)
-                static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue();
+                static_cast<css::chart::ChartAxisLabelPosition>(static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue());
 
             css::chart::ChartAxisLabelPosition eOldPos( css::chart::ChartAxisLabelPosition_NEAR_AXIS );
             bool bPropExisted = ( GetPropertySet()->getPropertyValue( "LabelPosition" ) >>= eOldPos );
@@ -851,8 +849,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
         case SCHATTR_AXIS_MARK_POSITION:
         {
             css::chart::ChartAxisMarkPosition ePos =
-                (css::chart::ChartAxisMarkPosition)
-                static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue();
+                static_cast<css::chart::ChartAxisMarkPosition>(static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue());
 
             css::chart::ChartAxisMarkPosition eOldPos( css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS );
             bool bPropExisted = ( GetPropertySet()->getPropertyValue( "MarkPosition" ) >>= eOldPos );
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index a3a30c165981..80e42df5c7fb 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -178,7 +178,7 @@ void LegendItemConverter::FillSpecialItem(
         {
             chart2::LegendPosition eLegendPos( chart2::LegendPosition_LINE_END );
             GetPropertySet()->getPropertyValue( "AnchorPosition" ) >>= eLegendPos;
-            rOutItemSet.Put( SfxInt32Item(SCHATTR_LEGEND_POS, (sal_Int32)eLegendPos ) );
+            rOutItemSet.Put( SfxInt32Item(SCHATTR_LEGEND_POS, static_cast<sal_Int32>(eLegendPos) ) );
         }
         break;
    }
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 1421fc1cbc12..e0dee1b7f8d1 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -66,7 +66,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang
     if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)==SfxItemState::SET)
         nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
     if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)==SfxItemState::SET)
-        eRP=(RectPoint)static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue();
+        eRP=static_cast<RectPoint>(static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue());
 
     switch( eRP )
     {
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index 66e0b88d1f5a..217b30cbda20 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -480,7 +480,7 @@ void DataPointProperties::AddDefaultsToMap(
 
     PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_TEXT_WORD_WRAP, false );
     PropertyHelper::setPropertyValueDefault< OUString >( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, " " );
-    PropertyHelper::setPropertyValueDefault<sal_Int32>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_STYLE, (sal_Int32)drawing::LineStyle_NONE);
+    PropertyHelper::setPropertyValueDefault<sal_Int32>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_STYLE, sal_Int32(drawing::LineStyle_NONE));
     PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_COLOR);
     PropertyHelper::setPropertyValueDefault<sal_Int32>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_WIDTH, 0);
     PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH, drawing::LineDash());
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index 387e83944c31..44129345dd5c 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -57,7 +57,7 @@ ChartItemPool::ChartItemPool():
     rPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_SOURCE - SCHATTR_START] = new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE);
 
     //legend
-    rPoolDefaults[SCHATTR_LEGEND_POS               - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, (sal_Int32)css::chart2::LegendPosition_LINE_END );
+    rPoolDefaults[SCHATTR_LEGEND_POS               - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, sal_Int32(css::chart2::LegendPosition_LINE_END) );
     rPoolDefaults[SCHATTR_LEGEND_SHOW              - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, true);
 
     //text
commit 51b56f7fc5cbd8a6d5e9d086b00c2d1ebb69b1fa
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:58 2018 +0100

    More loplugin:cstylecast: comphelper
    
    Change-Id: I64421e43afd7086a582fcfae0fd97b2afb6f8ef4

diff --git a/comphelper/source/streaming/basicio.cxx b/comphelper/source/streaming/basicio.cxx
index 98d8174f1d63..b43b6b1c7da0 100644
--- a/comphelper/source/streaming/basicio.cxx
+++ b/comphelper/source/streaming/basicio.cxx
@@ -63,7 +63,7 @@ const css::uno::Reference<css::io::XObjectInputStream>& operator >> (
     _rFont.Pitch = _rxInStream->readShort();
     _rFont.CharacterWidth = static_cast< float >(_rxInStream->readDouble());
     _rFont.Weight = static_cast< float >(_rxInStream->readDouble());
-    _rFont.Slant = (css::awt::FontSlant)_rxInStream->readShort();
+    _rFont.Slant = static_cast<css::awt::FontSlant>(_rxInStream->readShort());
     _rFont.Underline = _rxInStream->readShort();
     _rFont.Strikeout = _rxInStream->readShort();
     _rFont.Orientation = static_cast< float >(_rxInStream->readDouble());
commit 9bff1e15e55e95a90887cc45f49cabad39a126bb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:50 2018 +0100

    More loplugin:cstylecast: connectivity
    
    Change-Id: Id7cbe6a119b944813bc7638b08e59d4705607ece

diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index eef8df9bb5e7..5b7b60915531 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -236,7 +236,7 @@ void ODbaseTable::readHeader()
     else
     {
         // Consistency check of the header:
-        m_aHeader.type = (DBFType)nType;
+        m_aHeader.type = static_cast<DBFType>(nType);
         switch (m_aHeader.type)
         {
             case dBaseIII:
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index 328d377dada3..07376ab262f7 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -95,7 +95,7 @@ namespace
 
     OUString const & lcl_guessProfileRoot( MozillaProductType _product )
     {
-        size_t productIndex = (int)_product - 1;
+        size_t productIndex = static_cast<int>(_product) - 1;
 
         static OUString s_productDirectories[NB_PRODUCTS];
 
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index ac0cca926bbb..56d82555cedc 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -67,7 +67,7 @@ namespace connectivity
         //Thunderbird and firefox profiles are saved in profiles.ini
         void ProfileAccess::LoadXPToolkitProfiles(MozillaProductType product)
         {
-            sal_Int32 index=(sal_Int32)product;
+            sal_Int32 index=static_cast<sal_Int32>(product);
             ProductStruct &rProduct = m_ProductProfileList[index];
 
             OUString regDir = getRegistryDir(product);
@@ -142,7 +142,7 @@ namespace connectivity
 
         OUString ProfileAccess::getProfilePath( css::mozilla::MozillaProductType product, const OUString& profileName )
         {
-            sal_Int32 index=(sal_Int32)product;
+            sal_Int32 index=static_cast<sal_Int32>(product);
             ProductStruct &rProduct = m_ProductProfileList[index];
             if (rProduct.mProfileList.empty() || rProduct.mProfileList.find(profileName) == rProduct.mProfileList.end())
             {
@@ -155,13 +155,13 @@ namespace connectivity
 
         ::sal_Int32 ProfileAccess::getProfileCount( css::mozilla::MozillaProductType product)
         {
-            sal_Int32 index=(sal_Int32)product;
+            sal_Int32 index=static_cast<sal_Int32>(product);
             ProductStruct &rProduct = m_ProductProfileList[index];
             return static_cast< ::sal_Int32 >(rProduct.mProfileList.size());
         }
         ::sal_Int32 ProfileAccess::getProfileList( css::mozilla::MozillaProductType product, css::uno::Sequence< OUString >& list )
         {
-            sal_Int32 index=(sal_Int32)product;
+            sal_Int32 index=static_cast<sal_Int32>(product);
             ProductStruct &rProduct = m_ProductProfileList[index];
             list.realloc(static_cast<sal_Int32>(rProduct.mProfileList.size()));
             sal_Int32 i=0;
@@ -179,7 +179,7 @@ namespace connectivity
 
         OUString ProfileAccess::getDefaultProfile( css::mozilla::MozillaProductType product )
         {
-            sal_Int32 index=(sal_Int32)product;
+            sal_Int32 index=static_cast<sal_Int32>(product);
             ProductStruct &rProduct = m_ProductProfileList[index];
             if (!rProduct.mCurrentProfileName.isEmpty())
             {
@@ -197,7 +197,7 @@ namespace connectivity
 
         bool ProfileAccess::getProfileExists( css::mozilla::MozillaProductType product, const OUString& profileName )
         {
-            sal_Int32 index=(sal_Int32)product;
+            sal_Int32 index=static_cast<sal_Int32>(product);
             ProductStruct &rProduct = m_ProductProfileList[index];
             if (rProduct.mProfileList.empty() || rProduct.mProfileList.find(profileName) == rProduct.mProfileList.end())
             {
commit 016b8d71a222dad3637824c1e1625b2f22b2cc73
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:40 2018 +0100

    More loplugin:cstylecast: cppu
    
    Change-Id: I728a40ab6ef4aa44fbe328abdf244e6b5fac9d04

diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx
index fd0d63935772..87802cba6b60 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -430,15 +430,15 @@ void Test::testBigStruct() {
     CPPUNIT_ASSERT_EQUAL(guard.p->m10, 0.0);
     CPPUNIT_ASSERT_EQUAL(guard.p->m11, u'\0');
     CPPUNIT_ASSERT_EQUAL(guard.p->m12.getLength(), static_cast< sal_Int32 >(0));
-    CPPUNIT_ASSERT_EQUAL((sal_Int32)guard.p->m13.getTypeClass(), (sal_Int32)css::uno::TypeClass_VOID);
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(guard.p->m13.getTypeClass()), sal_Int32(css::uno::TypeClass_VOID));
     CPPUNIT_ASSERT_EQUAL(guard.p->m14.hasValue(), false);
     CPPUNIT_ASSERT_EQUAL(guard.p->m15.getLength(), static_cast< sal_Int32 >(0));
-    CPPUNIT_ASSERT_EQUAL((int)guard.p->m16, (int)test::codemaker::cppumaker::HelperEnum_ZERO);
+    CPPUNIT_ASSERT_EQUAL(static_cast<int>(guard.p->m16), int(test::codemaker::cppumaker::HelperEnum_ZERO));
     CPPUNIT_ASSERT_EQUAL(guard.p->m17.m1, sal_False);
     CPPUNIT_ASSERT_EQUAL(guard.p->m17.m2.is(), false);
     CPPUNIT_ASSERT_EQUAL(guard.p->m18.is(), false);
     CPPUNIT_ASSERT_EQUAL(guard.p->m19, static_cast< sal_Int8 >(0));
-    CPPUNIT_ASSERT_EQUAL((sal_Int32)guard.p->m20, (sal_Int32)test::codemaker::cppumaker::HelperEnum_ZERO);
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(guard.p->m20), sal_Int32(test::codemaker::cppumaker::HelperEnum_ZERO));
     CPPUNIT_ASSERT_EQUAL(guard.p->m21.getLength(), static_cast< sal_Int32 >(0));
     CPPUNIT_ASSERT_EQUAL(guard.p->m22.getLength(), static_cast< sal_Int32 >(0));
     CPPUNIT_ASSERT_EQUAL(guard.p->m23.getLength(), static_cast< sal_Int32 >(0));
diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h
index 2e216719b59e..4c52167a6b67 100644
--- a/include/com/sun/star/uno/Any.h
+++ b/include/com/sun/star/uno/Any.h
@@ -168,7 +168,7 @@ public:
         @return the type class of the set value
      */
     TypeClass SAL_CALL getValueTypeClass() const
-        { return (TypeClass)pType->eTypeClass; }
+        { return static_cast<TypeClass>(pType->eTypeClass); }
 
     /** Gets the type name of the set value.
 
diff --git a/include/com/sun/star/uno/Type.h b/include/com/sun/star/uno/Type.h
index 55b9c8317aef..5ca395e881fb 100644
--- a/include/com/sun/star/uno/Type.h
+++ b/include/com/sun/star/uno/Type.h
@@ -132,7 +132,7 @@ public:
         @return type class of set type
     */
     TypeClass SAL_CALL getTypeClass() const
-        { return (TypeClass)_pType->eTypeClass; }
+        { return static_cast<TypeClass>(_pType->eTypeClass); }
 
     /** Gets the name of the set type.
 
diff --git a/include/com/sun/star/uno/Type.hxx b/include/com/sun/star/uno/Type.hxx
index 171f52e113ee..770734f99df3 100644
--- a/include/com/sun/star/uno/Type.hxx
+++ b/include/com/sun/star/uno/Type.hxx
@@ -47,13 +47,13 @@ inline Type::Type()
 inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName )
     : _pType( NULL )
 {
-    ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData );
+    ::typelib_typedescriptionreference_new( &_pType, static_cast<typelib_TypeClass>(eTypeClass), rTypeName.pData );
 }
 
 inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName )
     : _pType( NULL )
 {
-    ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName );
+    ::typelib_typedescriptionreference_newByAsciiName( &_pType, static_cast<typelib_TypeClass>(eTypeClass), pTypeName );
 }
 
 inline Type::Type( typelib_TypeDescriptionReference * pType )
commit 2fa1c894ecabb3dbc2f2debd5ce73931c8da536c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:32 2018 +0100

    More loplugin:cstylecast: cppuhelper
    
    Change-Id: I193884eea6289653d648489edd1a8e929524a3c5

diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 6a1ca23740b0..fd0e99c9e520 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -95,7 +95,7 @@ inline static typelib_TypeDescription * createCTD(
         for ( nPos = nMembers; nPos--; )
         {
             typelib_CompoundMember_Init & rInit = pMemberInits[nPos];
-            rInit.eTypeClass = (typelib_TypeClass)pMemberTypes[nPos]->getTypeClass();
+            rInit.eTypeClass = static_cast<typelib_TypeClass>(pMemberTypes[nPos]->getTypeClass());
 
             OUString aMemberTypeName( pMemberTypes[nPos]->getName() );
             rtl_uString_acquire( rInit.pTypeName = aMemberTypeName.pData );
@@ -106,7 +106,7 @@ inline static typelib_TypeDescription * createCTD(
 
         typelib_typedescription_new(
             &pRet,
-            (typelib_TypeClass)xType->getTypeClass(),
+            static_cast<typelib_TypeClass>(xType->getTypeClass()),
             aTypeName.pData,
             (pBaseType ? pBaseType->pWeakRef : nullptr),
             nMembers, pMemberInits );
@@ -167,7 +167,7 @@ inline static typelib_TypeDescription * createCTD(
         {
             typelib_StructMember_Init & rInit = pMemberInits[nPos];
             rInit.aBase.eTypeClass
-                = (typelib_TypeClass)pMemberTypes[nPos]->getTypeClass();
+                = static_cast<typelib_TypeClass>(pMemberTypes[nPos]->getTypeClass());
 
             OUString aMemberTypeName( pMemberTypes[nPos]->getName() );
             rtl_uString_acquire(
@@ -227,7 +227,7 @@ inline static typelib_TypeDescription * createCTD(
             reinterpret_cast<typelib_InterfaceAttributeTypeDescription **>(&pRet),
             xAttribute->getPosition(),
             aMemberName.pData, // name
-            (typelib_TypeClass)xType->getTypeClass(),
+            static_cast<typelib_TypeClass>(xType->getTypeClass()),
             aMemberTypeName.pData, // type name
             xAttribute->isReadOnly(),
             getExc.size(), getExc.data(),
@@ -259,7 +259,7 @@ static typelib_TypeDescription * createCTD(
             const Reference< XTypeDescription > & xType  = xParam->getType();
             typelib_Parameter_Init & rInit = pParamInit[xParam->getPosition()];
 
-            rInit.eTypeClass = (typelib_TypeClass)xType->getTypeClass();
+            rInit.eTypeClass = static_cast<typelib_TypeClass>(xType->getTypeClass());
             OUString aParamTypeName( xType->getName() );
             rtl_uString_acquire( rInit.pTypeName = aParamTypeName.pData );
             OUString aParamName( xParam->getName() );
@@ -289,7 +289,7 @@ static typelib_TypeDescription * createCTD(
             xMethod->getPosition(),
             xMethod->isOneway(),
             aTypeName.pData,
-            (typelib_TypeClass)xReturnType->getTypeClass(),
+            static_cast<typelib_TypeClass>(xReturnType->getTypeClass()),
             aReturnTypeName.pData,
             nParams, pParamInit,
             nExceptions, ppExceptionNames );
@@ -349,7 +349,7 @@ inline static typelib_TypeDescription * createCTD(
             ppMemberRefs[nPos] = nullptr;
             typelib_typedescriptionreference_new(
                 ppMemberRefs + nPos,
-                (typelib_TypeClass)pMembers[nPos]->getTypeClass(),
+                static_cast<typelib_TypeClass>(pMembers[nPos]->getTypeClass()),
                 aMemberTypeName.pData );
         }
 
@@ -407,7 +407,7 @@ inline static typelib_TypeDescription * createCTD(
 
         typelib_typedescription_new(
             &pRet,
-            (typelib_TypeClass)xType->getTypeClass(),
+            static_cast<typelib_TypeClass>(xType->getTypeClass()),
             aTypeName.pData,
             pRefType->pWeakRef,
             0, nullptr );
commit 8fc6c5c84b3e4249f4c38ebb7399e0d07d9d4463
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:24 2018 +0100

    More loplugin:cstylecast: cui
    
    Change-Id: I5bbdd0b65111c65850652f2ddc93379954498073

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 2d41c1b664f5..933f3c394512 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -427,10 +427,10 @@ void SvxHyperlinkTabPageBase::GetDataFromCommonFields( OUString& aStrName,
     aStrIntName = mpEdText->GetText();
     aStrName    = mpEdIndication->GetText();
     aStrFrame   = mpCbbFrame->GetText();
-    eMode       = (SvxLinkInsertMode) (mpLbForm->GetSelectedEntryPos()+1);
+    eMode       = static_cast<SvxLinkInsertMode>(mpLbForm->GetSelectedEntryPos()+1);
     // Ask dialog whether the current doc is a HTML-doc
     if (static_cast<SvxHpLinkDlg*>(mpDialog.get())->IsHTMLDoc())
-        eMode = (SvxLinkInsertMode) ( sal_uInt16(eMode) | HLINK_HTMLMODE );
+        eMode = static_cast<SvxLinkInsertMode>( sal_uInt16(eMode) | HLINK_HTMLMODE );
 }
 
 // reset dialog-fields
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 07cc8d3cb883..05c13741bd19 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -194,7 +194,7 @@ bool SvxAsianLayoutPage::FillItemSet( SfxItemSet* )
         OUString sCompress(cCharacterCompressionType);
         if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sCompress))
         {
-            pImpl->xPrSet->setPropertyValue(sCompress, Any((sal_uInt16)nSet));
+            pImpl->xPrSet->setPropertyValue(sCompress, Any(static_cast<sal_uInt16>(nSet)));
         }
     }
     pImpl->aConfig.Commit();
@@ -253,7 +253,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet* )
             Any aVal = pImpl->xPrSet->getPropertyValue(sCompress);
             sal_uInt16 nTmp;
             if (aVal >>= nTmp)
-                nCompress = (CharCompressType)nTmp;
+                nCompress = static_cast<CharCompressType>(nTmp);
         }
         OUString sPunct(cIsKernAsianPunctuation);
         if(pImpl->xPrSetInfo->hasPropertyByName(sPunct))
diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx
index 563888e55cf6..fbbbe0af158d 100644
--- a/cui/source/options/optctl.cxx
+++ b/cui/source/options/optctl.cxx
@@ -115,7 +115,7 @@ bool SvxCTLOptionsPage::FillItemSet( SfxItemSet* )
     if ( m_pNumeralsLB->IsValueChangedFromSaved() )
     {
         const sal_Int32 nPos = m_pNumeralsLB->GetSelectedEntryPos();
-        aCTLOptions.SetCTLTextNumerals( (SvtCTLOptions::TextNumerals)nPos );
+        aCTLOptions.SetCTLTextNumerals( static_cast<SvtCTLOptions::TextNumerals>(nPos) );
         bModified = true;
     }
 
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 1cbef34f5251..8a3a972771f5 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -823,7 +823,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 
     // Mouse Snap Mode
     SnapType eOldSnap = pAppearanceCfg->GetSnapMode();
-    SnapType eNewSnap = (SnapType)m_pMousePosLB->GetSelectedEntryPos();
+    SnapType eNewSnap = static_cast<SnapType>(m_pMousePosLB->GetSelectedEntryPos());
     if(eNewSnap > SnapType::NONE)
         eNewSnap = SnapType::NONE;
 
@@ -1001,7 +1001,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
     m_pIconStyleLB->SaveValue();
 
     // Mouse Snap
-    m_pMousePosLB->SelectEntryPos((sal_Int32)pAppearanceCfg->GetSnapMode());
+    m_pMousePosLB->SelectEntryPos(static_cast<sal_Int32>(pAppearanceCfg->GetSnapMode()));
     m_pMousePosLB->SaveValue();
 
     // Mouse Snap
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index a625c014677c..63b060ce3797 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1178,7 +1178,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
         SvTreeListEntry *pEntry = m_pLinguOptionsCLB->GetEntry( j );
 
         OptionsUserData aData( reinterpret_cast<sal_uLong>(pEntry->GetUserData()) );
-        OUString aPropName( lcl_GetPropertyName( (EID_OPTIONS) aData.GetEntryId() ) );
+        OUString aPropName( lcl_GetPropertyName( static_cast<EID_OPTIONS>(aData.GetEntryId()) ) );
 
         Any aAny;
         if (aData.IsCheckable())
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 0bd155a15198..00bdcd0cadd8 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -101,7 +101,7 @@ struct SvxBackgroundPage_Impl
 /// Returns the fill style of the currently selected entry.
 static drawing::FillStyle lcl_getFillStyle(ListBox const * pLbSelect)
 {
-    return (drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetSelectedEntryData());
+    return static_cast<drawing::FillStyle>(reinterpret_cast<sal_uLong>(pLbSelect->GetSelectedEntryData()));
 }
 
 // Selects the entry matching the specified fill style.
@@ -109,7 +109,7 @@ static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle)
 {
     for (int i = 0; i < pLbSelect->GetEntryCount(); ++i)
     {
-        if ((drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i)) == eStyle)
+        if (static_cast<drawing::FillStyle>(reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i))) == eStyle)
         {
             pLbSelect->SelectEntryPos(i);
             return;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 4fbea4152af0..aa92adbe3973 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1489,11 +1489,11 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     rCTLFont.SetColor(GetPreviewFontColor(rSelectedColor));
 
     sal_Int32 nPos = m_pUnderlineLB->GetSelectedEntryPos();
-    FontLineStyle eUnderline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos ));
+    FontLineStyle eUnderline = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )));
     nPos = m_pOverlineLB->GetSelectedEntryPos();
-    FontLineStyle eOverline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos ));
+    FontLineStyle eOverline = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )));
     nPos = m_pStrikeoutLB->GetSelectedEntryPos();
-    FontStrikeout eStrikeout = (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos ));
+    FontStrikeout eStrikeout = static_cast<FontStrikeout>(reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos )));
     rFont.SetUnderline( eUnderline );
     rCJKFont.SetUnderline( eUnderline );
     rCTLFont.SetUnderline( eUnderline );
@@ -1511,7 +1511,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     if (nEmphasis != LISTBOX_ENTRY_NOTFOUND)
     {
         bool bUnder = ( CHRDLG_POSITION_UNDER == reinterpret_cast<sal_uLong>(m_pPositionLB->GetEntryData( nPos )) );
-        FontEmphasisMark eMark = (FontEmphasisMark)nEmphasis;
+        FontEmphasisMark eMark = static_cast<FontEmphasisMark>(nEmphasis);
         eMark |= bUnder ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove;
         rFont.SetEmphasisMark( eMark );
         rCJKFont.SetEmphasisMark( eMark );
@@ -1521,9 +1521,9 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     sal_Int32 nRelief = m_pReliefLB->GetSelectedEntryPos();
     if (LISTBOX_ENTRY_NOTFOUND != nRelief)
     {
-        rFont.SetRelief( (FontRelief)nRelief );
-        rCJKFont.SetRelief( (FontRelief)nRelief );
-        rCTLFont.SetRelief( (FontRelief)nRelief );
+        rFont.SetRelief( static_cast<FontRelief>(nRelief) );
+        rCJKFont.SetRelief( static_cast<FontRelief>(nRelief) );
+        rCTLFont.SetRelief( static_cast<FontRelief>(nRelief) );
     }
 
     rFont.SetOutline( StateToAttr( m_pOutlineBtn->GetState() ) );
@@ -1537,7 +1537,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     sal_Int32 nCapsPos = m_pEffectsLB->GetSelectedEntryPos();
     if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND )
     {
-        SvxCaseMap eCaps = (SvxCaseMap)nCapsPos;
+        SvxCaseMap eCaps = static_cast<SvxCaseMap>(nCapsPos);
         rFont.SetCaseMap( eCaps );
         rCJKFont.SetCaseMap( eCaps );
         // #i78474# small caps do not exist in CTL fonts
@@ -1758,7 +1758,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
             {
                 for ( sal_Int32 i = 0; i < m_pUnderlineLB->GetEntryCount(); ++i )
                 {
-                    if ( (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData(i)) == eUnderline )
+                    if ( static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData(i))) == eUnderline )
                     {
                         m_pUnderlineLB->SelectEntryPos(i);
                         bEnable = true;
@@ -1802,7 +1802,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
             {
                 for ( sal_Int32 i = 0; i < m_pOverlineLB->GetEntryCount(); ++i )
                 {
-                    if ( (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData(i)) == eOverline )
+                    if ( static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData(i))) == eOverline )
                     {
                         m_pOverlineLB->SelectEntryPos(i);
                         bEnable = true;
@@ -1846,7 +1846,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
             {
                 for ( sal_Int32 i = 0; i < m_pStrikeoutLB->GetEntryCount(); ++i )
                 {
-                    if ( (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData(i)) == eStrikeout )
+                    if ( static_cast<FontStrikeout>(reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData(i))) == eStrikeout )
                     {
                         m_pStrikeoutLB->SelectEntryPos(i);
                         bEnable = true;
@@ -1900,7 +1900,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
         rCJKFont.SetEmphasisMark( eMark );
         rCTLFont.SetEmphasisMark( eMark );
 
-        m_pEmphasisLB->SelectEntryPos( (sal_Int32)FontEmphasisMark( eMark & FontEmphasisMark::Style ) );
+        m_pEmphasisLB->SelectEntryPos( static_cast<sal_Int32>(FontEmphasisMark( eMark & FontEmphasisMark::Style )) );
         eMark &= ~FontEmphasisMark::Style;
         sal_uLong nEntryData = ( eMark == FontEmphasisMark::PosAbove )
             ? CHRDLG_POSITION_OVER
@@ -1998,7 +1998,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
         case SfxItemState::SET:
         {
             const SvxCharReliefItem& rItem = static_cast<const SvxCharReliefItem&>(rSet->Get( nWhich ));
-            m_pReliefLB->SelectEntryPos((sal_Int32)rItem.GetValue());
+            m_pReliefLB->SelectEntryPos(static_cast<sal_Int32>(rItem.GetValue()));
             SelectHdl_Impl(m_pReliefLB);
             break;
         }
@@ -2026,7 +2026,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
         case SfxItemState::SET:
         {
             const SvxContourItem& rItem = static_cast<const SvxContourItem&>(rSet->Get( nWhich ));
-            m_pOutlineBtn->SetState( (TriState)rItem.GetValue() );
+            m_pOutlineBtn->SetState( static_cast<TriState>(rItem.GetValue()) );
             m_pOutlineBtn->EnableTriState( false );
             break;
         }
@@ -2055,7 +2055,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
         case SfxItemState::SET:
         {
             const SvxShadowedItem& rItem = static_cast<const SvxShadowedItem&>(rSet->Get( nWhich ));
-            m_pShadowBtn->SetState( (TriState)rItem.GetValue() );
+            m_pShadowBtn->SetState( static_cast<TriState>(rItem.GetValue()) );
             m_pShadowBtn->EnableTriState( false );
             break;
         }
@@ -2084,7 +2084,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
         case SfxItemState::SET:
         {
             const SvxBlinkItem& rItem = static_cast<const SvxBlinkItem&>(rSet->Get( nWhich ));
-            m_pBlinkingBtn->SetState( (TriState)rItem.GetValue() );
+            m_pBlinkingBtn->SetState( static_cast<TriState>(rItem.GetValue()) );
             m_pBlinkingBtn->EnableTriState( false );
             break;
         }
@@ -2112,7 +2112,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
         case SfxItemState::SET:
         {
             const SvxCharHiddenItem& rItem = static_cast<const SvxCharHiddenItem&>(rSet->Get( nWhich ));
-            m_pHiddenBtn->SetState( (TriState)rItem.GetValue() );
+            m_pHiddenBtn->SetState( static_cast<TriState>(rItem.GetValue()) );
             m_pHiddenBtn->EnableTriState( false );
             break;
         }
@@ -2155,7 +2155,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
     sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
     pOld = GetOldItem( *rSet, SID_ATTR_CHAR_UNDERLINE );
     sal_Int32 nPos = m_pUnderlineLB->GetSelectedEntryPos();
-    FontLineStyle eUnder = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos ));
+    FontLineStyle eUnder = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )));
 
     if ( pOld )
     {
@@ -2189,7 +2189,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
     nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
     pOld = GetOldItem( *rSet, SID_ATTR_CHAR_OVERLINE );
     nPos = m_pOverlineLB->GetSelectedEntryPos();
-    FontLineStyle eOver = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos ));
+    FontLineStyle eOver = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )));
 
     if ( pOld )
     {
@@ -2223,7 +2223,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
     nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
     pOld = GetOldItem( *rSet, SID_ATTR_CHAR_STRIKEOUT );
     nPos = m_pStrikeoutLB->GetSelectedEntryPos();
-    FontStrikeout eStrike = (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos ));
+    FontStrikeout eStrike = static_cast<FontStrikeout>(reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos )));
 
     if ( pOld )
     {
@@ -2280,7 +2280,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
     pOld = GetOldItem( *rSet, SID_ATTR_CHAR_EMPHASISMARK );
     sal_Int32 nMarkPos = m_pEmphasisLB->GetSelectedEntryPos();
     sal_Int32 nPosPos = m_pPositionLB->GetSelectedEntryPos();
-    FontEmphasisMark eMark = (FontEmphasisMark)nMarkPos;
+    FontEmphasisMark eMark = static_cast<FontEmphasisMark>(nMarkPos);
     if ( m_pPositionLB->IsEnabled() )
     {
         eMark |= ( CHRDLG_POSITION_UNDER == reinterpret_cast<sal_uLong>(m_pPositionLB->GetEntryData( nPosPos )) )
@@ -2319,7 +2319,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
     sal_Int32 nCapsPos = m_pEffectsLB->GetSelectedEntryPos();
     if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND )
     {
-        eCaseMap = (SvxCaseMap)nCapsPos;
+        eCaseMap = static_cast<SvxCaseMap>(nCapsPos);
         bChecked = true;
     }
 
@@ -2352,7 +2352,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
     if(m_pReliefLB->IsValueChangedFromSaved())
     {
         m_pReliefLB->SaveValue();
-        SvxCharReliefItem aRelief((FontRelief)m_pReliefLB->GetSelectedEntryPos(), nWhich);
+        SvxCharReliefItem aRelief(static_cast<FontRelief>(m_pReliefLB->GetSelectedEntryPos()), nWhich);
         rSet->Put(aRelief);
     }
 
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 7aa82e5bad6f..ebfe9a008e2e 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -367,7 +367,7 @@ bool SvxConnectionPage::FillItemSet( SfxItemSet* rAttrs)
     {
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
-            rAttrs->Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
+            rAttrs->Put( SdrEdgeKindItem( static_cast<SdrEdgeKind>(nPos) ) );
             bModified = true;
         }
     }
@@ -453,7 +453,7 @@ void SvxConnectionPage::ChangeAttrHdl_Impl(void const * p)
         sal_Int32 nPos = m_pLbType->GetSelectedEntryPos();
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
-            aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
+            aAttrSet.Put( SdrEdgeKindItem( static_cast<SdrEdgeKind>(nPos) ) );
         }
     }
 
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 384475316bac..969ad25fcf0d 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -171,7 +171,7 @@ bool SvxCaptionTabPage::FillItemSet( SfxItemSet*  _rOutAttrs)
 
     MapUnit      eUnit;
 
-    nCaptionType = (SdrCaptionType) (m_pCT_CAPTTYPE->GetSelectItemId()-1);
+    nCaptionType = static_cast<SdrCaptionType>(m_pCT_CAPTTYPE->GetSelectItemId()-1);
 
     _rOutAttrs->Put( SdrCaptionTypeItem( nCaptionType ) );
 
@@ -349,7 +349,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet*  )
     m_pLB_ANSATZ->SelectEntryPos( nAnsatzTypePos );
 
     SetupAnsatz_Impl( nAnsatzTypePos );
-    m_pCT_CAPTTYPE->SelectItem( (int)nCaptionType+1 ); // Enum starts at 0!
+    m_pCT_CAPTTYPE->SelectItem( static_cast<int>(nCaptionType)+1 ); // Enum starts at 0!
     SetupType_Impl( nCaptionType );
 }
 
@@ -454,7 +454,7 @@ IMPL_LINK( SvxCaptionTabPage, LineOptHdl_Impl, Button *, pButton, void )
 
 IMPL_LINK_NOARG(SvxCaptionTabPage, SelectCaptTypeHdl_Impl, ValueSet*, void)
 {
-    SetupType_Impl( (SdrCaptionType) m_pCT_CAPTTYPE->GetSelectItemId() );
+    SetupType_Impl( static_cast<SdrCaptionType>(m_pCT_CAPTTYPE->GetSelectItemId()) );
 }
 
 void SvxCaptionTabPage::SetupType_Impl( SdrCaptionType nType )
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 8aa7f60aa7ba..0ee4dcff56b2 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -117,7 +117,7 @@ void SfxMacroTabPage::EnableButtons()
     if ( pE )
     {
         // get bound macro
-        const SvxMacro* pM = aTbl.Get( (SvMacroItemId)reinterpret_cast<sal_uLong>(pE->GetUserData()) );
+        const SvxMacro* pM = aTbl.Get( static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>(pE->GetUserData())) );
         mpImpl->pDeletePB->Enable( nullptr != pM );
 
         OUString sEventMacro = static_cast<const SvLBoxString&>(pE->GetItem( LB_MACROS_ITEMPOS )).GetText();
@@ -325,7 +325,7 @@ bool SfxMacroTabPage::AssignDeleteHdl(Control const * pBtn)
     const bool bAssEnabled = pBtn != mpImpl->pDeletePB && mpImpl->pAssignPB->IsEnabled();
 
     // remove from the table
-    SvMacroItemId nEvent = (SvMacroItemId)reinterpret_cast<sal_uLong>(pE->GetUserData());
+    SvMacroItemId nEvent = static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>(pE->GetUserData()));
     aTbl.Erase( nEvent );
 
     OUString sScriptURI;
@@ -428,7 +428,7 @@ void SfxMacroTabPage::FillEvents()
 
             OUString          sOld( rLItem.GetText() );
             OUString          sNew;
-            SvMacroItemId     nEventId = (SvMacroItemId) reinterpret_cast<sal_uLong>( pE->GetUserData() );
+            SvMacroItemId     nEventId = static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>( pE->GetUserData() ));
             if( aTbl.IsKeyValid( nEventId ) )
                 sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) );
 
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index f220327a9c15..adfb0ec6fa26 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -512,7 +512,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
             sal_uInt16 nFieldUnit = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(m_pLbUnit->GetEntryData( nPos )));
-            FieldUnit _eUnit = (FieldUnit) nFieldUnit;
+            FieldUnit _eUnit = static_cast<FieldUnit>(nFieldUnit);
             rAttrs->Put( SdrMeasureUnitItem( _eUnit ) );
             bModified = true;
         }
@@ -738,7 +738,7 @@ void SvxMeasurePage::ChangeAttrHdl_Impl( void const * p )
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
             sal_uInt16 nFieldUnit = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(m_pLbUnit->GetEntryData( nPos )));
-            FieldUnit _eUnit = (FieldUnit) nFieldUnit;
+            FieldUnit _eUnit = static_cast<FieldUnit>(nFieldUnit);
             aAttrSet.Put( SdrMeasureUnitItem( _eUnit ) );
         }
     }
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 9708119125ed..bafe79ca8fd2 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -114,7 +114,7 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValu
         {
             sal_Int16 nTmp;
             if (pValues[j].Value >>= nTmp)
-                pNew->nNumberType = (SvxNumType)nTmp;
+                pNew->nNumberType = static_cast<SvxNumType>(nTmp);
         }
         else if ( pValues[j].Name == "Prefix" )
             pValues[j].Value >>= pNew->sPrefix;
@@ -1744,7 +1744,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox&, rBox, void
         {
             SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
             // PAGEDESC does not exist
-            SvxNumType nNumType = (SvxNumType)reinterpret_cast<sal_uLong>(rBox.GetSelectedEntryData());
+            SvxNumType nNumType = static_cast<SvxNumType>(reinterpret_cast<sal_uLong>(rBox.GetSelectedEntryData()));
             aNumFmt.SetNumberingType(nNumType);
             sal_uInt16 nNumberingType = aNumFmt.GetNumberingType();
             if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN)))
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 36548ec99905..69ed0a9a8d43 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -723,7 +723,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
     }
 
     nPos = m_pPaperSizeBox->GetSelectedEntryPos();
-    Paper ePaper = (Paper)reinterpret_cast<sal_uLong>(m_pPaperSizeBox->GetEntryData( nPos ));
+    Paper ePaper = static_cast<Paper>(reinterpret_cast<sal_uLong>(m_pPaperSizeBox->GetEntryData( nPos )));
     const sal_Int32 nOld = m_pPaperSizeBox->GetSavedValue();
     bool bChecked = m_pLandscapeBtn->IsChecked();
 
@@ -1652,12 +1652,12 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet)
 
     if (pModeItem)
     {
-        eMode = (SvxModeType)pModeItem->GetEnumValue();
+        eMode = static_cast<SvxModeType>(pModeItem->GetEnumValue());
     }
 
     if(pPaperStartItem && pPaperEndItem)
     {
-        SetPaperFormatRanges((Paper)pPaperStartItem->GetEnumValue());
+        SetPaperFormatRanges(static_cast<Paper>(pPaperStartItem->GetEnumValue()));
     }
 
     if(pCollectListItem)
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index fc050eb31451..5ea77cf288e1 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -897,7 +897,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl()
         case LLINESPACE_MIN:
         case LLINESPACE_DURCH:
         case LLINESPACE_FIX:
-            m_pExampleWin->SetLineSpace( (SvxPrevLineSpace)nPos );
+            m_pExampleWin->SetLineSpace( static_cast<SvxPrevLineSpace>(nPos) );
             break;
     }
     m_pExampleWin->Invalidate();
@@ -1153,7 +1153,7 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
     }
     if(m_pVertAlignLB->IsValueChangedFromSaved())
     {
-        rOutSet->Put(SvxParaVertAlignItem((SvxParaVertAlignItem::Align)m_pVertAlignLB->GetSelectedEntryPos(), GetWhich( SID_PARA_VERTALIGN )));
+        rOutSet->Put(SvxParaVertAlignItem(static_cast<SvxParaVertAlignItem::Align>(m_pVertAlignLB->GetSelectedEntryPos()), GetWhich( SID_PARA_VERTALIGN )));
         bModified = true;
     }
 
@@ -1242,7 +1242,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
 
         const SvxParaVertAlignItem& rAlign = static_cast<const SvxParaVertAlignItem&>(rSet->Get( _nWhich ));
 
-        m_pVertAlignLB->SelectEntryPos((sal_Int32)rAlign.GetValue());
+        m_pVertAlignLB->SelectEntryPos(static_cast<sal_Int32>(rAlign.GetValue()));
     }
 
     _nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION );
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index bc9995dcd5bb..16126a4ea367 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -773,7 +773,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
     bool bModified = false;
     if(bAnchorChanged)
     {
-        rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, (sal_Int16)nAnchor));
+        rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, static_cast<sal_Int16>(nAnchor)));
         bModified = true;
     }
     if ( m_pPositionCB->IsValueChangedFromSaved() )
@@ -911,7 +911,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
         rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), nWidth ) );
         rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), nHeight ) );
         //this item is required by SdrEditView::SetGeoAttrToMarked()
-        rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), (sal_uInt16)RectPoint::LT ) );
+        rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal_uInt16(RectPoint::LT) ) );
 
         bModified = true;
     }
@@ -926,7 +926,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet)
     RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA;
     if(pItem)
     {
-        nAnchorType = (RndStdIds) static_cast<const SfxInt16Item*>(pItem)->GetValue();
+        nAnchorType = static_cast<RndStdIds>(static_cast<const SfxInt16Item*>(pItem)->GetValue());
         switch(nAnchorType)
         {
             case RndStdIds::FLY_AT_PAGE:   m_pToPageRB->Check();  break;
@@ -1734,13 +1734,13 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_
                 nLBRelations = pMap[nMapPos].nLBRelations;
             }
 
-            for (sal_uLong nBit = 1; nBit < (sal_uLong)LB::LAST; nBit <<= 1)
+            for (sal_uLong nBit = 1; nBit < sal_uLong(LB::LAST); nBit <<= 1)
             {
-                if (nLBRelations & (LB)nBit)
+                if (nLBRelations & static_cast<LB>(nBit))
                 {
                     for (sal_uInt16 nRelPos = 0; nRelPos < SAL_N_ELEMENTS(aRelationMap); nRelPos++)
                     {
-                        if (aRelationMap[nRelPos].nLBRelation == (LB)nBit)
+                        if (aRelationMap[nRelPos].nLBRelation == static_cast<LB>(nBit))
                         {
                             SvxSwFramePosString::StringId sStrId1 = m_pHoriMirrorCB->IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId;
                             sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index aa72b0f452d7..d4015f1d3a10 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -679,7 +679,7 @@ void SvxTabulatorTabPage::PageCreated(const SfxAllItemSet& aSet)
 {
     const SfxUInt16Item* pControlItem = aSet.GetItem<SfxUInt16Item>(SID_SVXTABULATORTABPAGE_DISABLEFLAGS, false);
     if (pControlItem)
-        DisableControls((TabulatorDisableFlags)pControlItem->GetValue());
+        DisableControls(static_cast<TabulatorDisableFlags>(pControlItem->GetValue()));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index bab7754a2de0..904ed4de4403 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -73,7 +73,7 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
             if (rMarkList.GetMarkCount() == 1)
             {
                 const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-                eKind = (SdrObjKind)pObj->GetObjIdentifier();
+                eKind = static_cast<SdrObjKind>(pObj->GetObjIdentifier());
             }
         }
         static_cast<SvxTextAttrPage&>(rPage).SetObjKind(eKind);
@@ -371,7 +371,7 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
     if( nPos != LISTBOX_ENTRY_NOTFOUND &&
         m_pLbEffect->IsValueChangedFromSaved() )
     {
-        rAttrs->Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) );
+        rAttrs->Put( SdrTextAniKindItem( static_cast<SdrTextAniKind>(nPos) ) );
         bModified = true;
     }
 
@@ -381,7 +381,7 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
         m_aRightState != m_pBtnRight->GetState() ||
         m_aDownState != m_pBtnDown->GetState())
     {
-        SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection();
+        SdrTextAniDirection eValue = static_cast<SdrTextAniDirection>(GetSelectedDirection());
         rAttrs->Put( SdrTextAniDirectionItem( eValue ) );
         bModified = true;
     }
@@ -485,7 +485,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, SelectEffectHdl_Impl, ListBox&, void)
     sal_Int32 nPos = m_pLbEffect->GetSelectedEntryPos();
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
-        eAniKind = (SdrTextAniKind) nPos;
+        eAniKind = static_cast<SdrTextAniKind>(nPos);
         switch( eAniKind )
         {
             case SdrTextAniKind::NONE:
@@ -637,7 +637,7 @@ sal_uInt16 SvxTextAnimationPage::GetSelectedDirection()
     else if( m_pBtnDown->IsChecked() )
         nValue = SdrTextAniDirection::Down;
 
-    return (sal_uInt16)nValue;
+    return static_cast<sal_uInt16>(nValue);
 }
 
 
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index f1b1752c8659..46d3f519ffad 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -210,7 +210,7 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
         rAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
     }
 
-    BitmapStyle eStylePos = (BitmapStyle)m_pBitmapStyleLB->GetSelectedEntryPos();        bool bIsStretched( eStylePos == STRETCHED );
+    BitmapStyle eStylePos = static_cast<BitmapStyle>(m_pBitmapStyleLB->GetSelectedEntryPos());        bool bIsStretched( eStylePos == STRETCHED );
     bool bIsTiled( eStylePos == TILED );
 
     rAttrs->Put( XFillBmpTileItem(bIsTiled) );
@@ -644,7 +644,7 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ClickScaleHdl, Button*, void )
 
 IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, ListBox&, void )
 {
-    BitmapStyle eStylePos = (BitmapStyle)m_pBitmapStyleLB->GetSelectedEntryPos();
+    BitmapStyle eStylePos = static_cast<BitmapStyle>(m_pBitmapStyleLB->GetSelectedEntryPos());
     bool bIsStretched( eStylePos == STRETCHED );
     bool bIsTiled( eStylePos == TILED );
 
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 4fe0db177ddc..f363f7b7498f 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -299,7 +299,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
 
     // set color model
     OUString aStr = GetUserData();
-    eCM = (ColorModel)aStr.toInt32();
+    eCM = static_cast<ColorModel>(aStr.toInt32());
     SetColorModel( eCM );
     ChangeColorModel();
 
@@ -760,7 +760,7 @@ sal_uInt16 SvxColorTabPage::PercentToColor_Impl( sal_uInt16 nPercent )
 void SvxColorTabPage::FillUserData()
 {
     // the color model is saved in the Ini-file
-    SetUserData( OUString::number( (int)eCM ) );
+    SetUserData( OUString::number( static_cast<int>(eCM) ) );
 }
 
 
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index e01db477109b..0ce06ab0a362 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -237,7 +237,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
         aString = "gradient";
         pXGradient.reset(new XGradient( m_pLbColorFrom->GetSelectEntryColor(),
                     m_pLbColorTo->GetSelectEntryColor(),
-                    (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(),
+                    static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()),
                     static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource
                     static_cast<sal_uInt16>(m_pMtrCenterX->GetValue()),
                     static_cast<sal_uInt16>(m_pMtrCenterY->GetValue()),
@@ -330,7 +330,7 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * pControl )
     if(pControl == m_pSliderIncrement)
         m_pMtrIncrement->SetValue( m_pSliderIncrement->GetThumbPos() );
 
-    css::awt::GradientStyle eXGS = (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos();
+    css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos());
 
     XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(),
                           m_pLbColorTo->GetSelectEntryColor(),
@@ -410,7 +410,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, Button*, void)
     {
         XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(),
                               m_pLbColorTo->GetSelectEntryColor(),
-                              (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(),
+                              static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()),
                               static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource
                               static_cast<sal_uInt16>(m_pMtrCenterX->GetValue()),
                               static_cast<sal_uInt16>(m_pMtrCenterY->GetValue()),
@@ -449,7 +449,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl, Button*, void)
 
         XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(),
                               m_pLbColorTo->GetSelectEntryColor(),
-                              (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(),
+                              static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()),
                               static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource
                               static_cast<sal_uInt16>(m_pMtrCenterX->GetValue()),
                               static_cast<sal_uInt16>(m_pMtrCenterY->GetValue()),
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index d03df82bfe65..3b0f8823969e 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -261,7 +261,7 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
     else
     {
         pXHatch.reset(new XHatch( m_pLbLineColor->GetSelectEntryColor(),
-                    (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(),
+                    static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()),
                     GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
                     static_cast<long>(m_pMtrAngle->GetValue() * 10) ));
     }
@@ -362,7 +362,7 @@ void SvxHatchTabPage::ModifiedHdl_Impl( void const * p )
         m_pMtrAngle->SetValue( m_pSliderAngle->GetThumbPos() );
 
     XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
-                    (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(),
+                    static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()),
                     GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
                     static_cast<long>(m_pMtrAngle->GetValue() * 10) );
 
@@ -478,7 +478,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void)
     if( !nError )
     {
         XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
-                        (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(),
+                        static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()),
                         GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
                         static_cast<long>(m_pMtrAngle->GetValue() * 10) );
 
@@ -507,7 +507,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
         OUString aName( m_pHatchingList->GetHatch( static_cast<sal_uInt16>(nPos) )->GetName() );
 
         XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
-                        (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(),
+                        static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()),
                          GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
                         static_cast<long>(m_pMtrAngle->GetValue() * 10) );
 
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index c57590af33ee..44a2b721c44e 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -543,7 +543,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
 {
     const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false);
     if (pPageTypeItem)
-        SetPageType((PageType) pPageTypeItem->GetValue());
+        SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
     if( m_nDlgType == 0 && m_pDashList.is() )
     {
         sal_Int32 nPos;
@@ -954,7 +954,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
             }
         }
     }
-    rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, (sal_uInt16)m_nPageType));
+    rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(m_nPageType)));
     return bModified;
 }
 
@@ -1781,7 +1781,7 @@ void SvxLineTabPage::PageCreated(const SfxAllItemSet& aSet)
     if (pLineEndListItem)
         SetLineEndList(pLineEndListItem->GetLineEndList());
     if (pPageTypeItem)
-        SetPageType((PageType) pPageTypeItem->GetValue());
+        SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
     if (pDlgTypeItem)
         SetDlgType(pDlgTypeItem->GetValue());
     Construct();
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 6296400844e7..9db1afd02bf8 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -175,7 +175,7 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
 {
     const SfxUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
     if (pPageTypeItem)
-        SetPageType((PageType) pPageTypeItem->GetValue());
+        SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
 
     if( m_nDlgType == 0 )
     {
@@ -324,7 +324,7 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
         }
     }
 
-    rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, (sal_uInt16)m_nPageType));
+    rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(m_nPageType)));
 
     return bModified;
 }
@@ -506,7 +506,7 @@ void SvxShadowTabPage::PageCreated(const SfxAllItemSet& aSet)
     if (pColorListItem)
         SetColorList(pColorListItem->GetColorList());
     if (pPageTypeItem)
-        SetPageType((PageType) pPageTypeItem->GetValue());
+        SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
     if (pDlgTypeItem)
         SetDlgType(pDlgTypeItem->GetValue());
 }
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index e4faafec0142..bf8ce4d9ff02 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -152,7 +152,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void const * pControl)
 {
     if(pControl == m_pLbTrgrGradientType || pControl == this)
     {
-        css::awt::GradientStyle eXGS = (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos();
+        css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos());
         SetControlState_Impl( eXGS );
     }
 
@@ -162,7 +162,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void const * pControl)
     XGradient aTmpGradient(
                 Color(nStartCol, nStartCol, nStartCol),
                 Color(nEndCol, nEndCol, nEndCol),
-                (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos(),
+                static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos()),
                 static_cast<sal_uInt16>(m_pMtrTrgrAngle->GetValue()) * 10,
                 static_cast<sal_uInt16>(m_pMtrTrgrCenterX->GetValue()),
                 static_cast<sal_uInt16>(m_pMtrTrgrCenterY->GetValue()),
@@ -181,7 +181,7 @@ void SvxTransparenceTabPage::ActivateGradient(bool bActivate)
 
     if(bActivate)
     {
-        css::awt::GradientStyle eXGS = (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos();
+        css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos());
         SetControlState_Impl( eXGS );
     }
 }
@@ -346,7 +346,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
             XGradient aTmpGradient(
                         Color(nStartCol, nStartCol, nStartCol),
                         Color(nEndCol, nEndCol, nEndCol),
-                        (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos(),
+                        static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos()),
                         static_cast<sal_uInt16>(m_pMtrTrgrAngle->GetValue()) * 10,
                         static_cast<sal_uInt16>(m_pMtrTrgrCenterX->GetValue()),
                         static_cast<sal_uInt16>(m_pMtrTrgrCenterY->GetValue()),
@@ -393,7 +393,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
         rAttrs->Put(aShadowItem);
         bModified = true;
     }
-    rAttrs->Put(CntUInt16Item(SID_PAGE_TYPE, (sal_uInt16)nPageType));
+    rAttrs->Put(CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(nPageType)));
     return bModified;
 }
 
@@ -470,7 +470,7 @@ void SvxTransparenceTabPage::ActivatePage(const SfxItemSet& rSet)
 {
     const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false);
     if (pPageTypeItem)
-        SetPageType((PageType) pPageTypeItem->GetValue());
+        SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
 
     if(nDlgType == 0) // area dialog
         nPageType = PageType::Transparence;
@@ -566,7 +566,7 @@ void SvxTransparenceTabPage::PageCreated(const SfxAllItemSet& aSet)
     const SfxUInt16Item* pDlgTypeItem = aSet.GetItem<SfxUInt16Item>(SID_DLG_TYPE, false);
 
     if (pPageTypeItem)
-        SetPageType((PageType) pPageTypeItem->GetValue());
+        SetPageType(static_cast<PageType>(pPageTypeItem->GetValue()));
     if (pDlgTypeItem)
         SetDlgType(pDlgTypeItem->GetValue());
 }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index b7c154ab2842..245e823ba6c3 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -620,7 +620,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
     if (rMarkList.GetMarkCount() == 1)
     {
         SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-        SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
+        SdrObjKind eKind = static_cast<SdrObjKind>(pObj->GetObjIdentifier());
         if (eKind == OBJ_CUSTOMSHAPE)
         {
             //save geometry
@@ -872,7 +872,7 @@ void SvxPositionSizeTabPage::Construct()
     if(1 == rMarkList.GetMarkCount())
     {
         const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-        const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
+        const SdrObjKind eKind(static_cast<SdrObjKind>(pObj->GetObjIdentifier()));
 
         if((pObj->GetObjInventor() == SdrInventor::Default) &&
             (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) &&
commit d73e5b066bc575ee97ec388f301806297eeb7f59
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:18 2018 +0100

    More loplugin:cstylecast: dbaccess
    
    Change-Id: Ic59e95a28606d42eca250fb0bed4c5b821b266cf

diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
index fbdffabc2090..d17add7850ea 100644
--- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
+++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
@@ -66,7 +66,7 @@ namespace dbaccess
 
             SQLPartCount
         };
-        static void incSQLPart( SQLPart& e ) { e = (SQLPart)(1 + static_cast<size_t>(e)); }
+        static void incSQLPart( SQLPart& e ) { e = static_cast<SQLPart>(1 + static_cast<size_t>(e)); }
         enum EColumnType
         {
             SelectColumns       = 0,
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index c589a2a8803c..ff5cbd4a9cef 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1871,14 +1871,14 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
 
 IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType, void )
 {
-    ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType );
+    ElementType eType = static_cast<ElementType>(reinterpret_cast< sal_IntPtr >( _pType ));
     if (getContainer())
         getContainer()->selectContainer(eType);
 }
 
 IMPL_LINK( OApplicationController, OnCreateWithPilot, void*, _pType, void )
 {
-    ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType );
+    ElementType eType = static_cast<ElementType>(reinterpret_cast< sal_IntPtr >( _pType ));
     newElementWithPilot( eType );
 }
 
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index 3d66eae034de..1b52a530bb84 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -127,7 +127,7 @@ namespace dbaui
             _rStr.WriteInt32( pFieldDesc->GetScale() );
             _rStr.WriteInt32( pFieldDesc->GetIsNullable() );
             _rStr.WriteInt32( pFieldDesc->GetFormatKey() );
-            _rStr.WriteInt32( (sal_Int32)pFieldDesc->GetHorJustify() );
+            _rStr.WriteInt32( static_cast<sal_Int32>(pFieldDesc->GetHorJustify()) );
             _rStr.WriteInt32( pFieldDesc->IsAutoIncrement() ? 1 : 0 );
             _rStr.WriteInt32( pFieldDesc->IsPrimaryKey() ? 1 : 0 );
             _rStr.WriteInt32( pFieldDesc->IsCurrency() ? 1 : 0 );
@@ -179,7 +179,7 @@ namespace dbaui
             _rStr.ReadInt32( nValue );
             pFieldDesc->SetFormatKey(nValue);
             _rStr.ReadInt32( nValue );
-            pFieldDesc->SetHorJustify((SvxCellHorJustify)nValue);
+            pFieldDesc->SetHorJustify(static_cast<SvxCellHorJustify>(nValue));
 
             _rStr.ReadInt32( nValue );
             pFieldDesc->SetAutoIncrement(nValue != 0);
commit edc19f0400e7cac09a59291b8ed6c6c13f48468e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:11 2018 +0100

    More loplugin:cstylecast: desktop
    
    Change-Id: Ie03ac7c1a347389b804ff4d90982cdaf771e72dc

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 8d0c39d23a03..d1c16ea2007a 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -272,7 +272,7 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
     if ( !GetEntryData( nPos )->m_sLicenseText.isEmpty() )
         aPopup->InsertItem( CMD_SHOW_LICENSE, DpResId( RID_STR_SHOW_LICENSE_CMD ) );
 
-    return (MENU_COMMAND) aPopup->Execute( this, rPos );
+    return static_cast<MENU_COMMAND>(aPopup->Execute( this, rPos ));
 }
 
 
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx
index 8c77471eb4be..1baf274b386b 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -146,7 +146,7 @@ bool LOKInteractionHandler::handleIOException(const css::uno::Sequence<css::uno:
     if (!(rRequest >>= aIoException))
         return false;
 
-    static ErrCode const aErrorCode[(int)ucb::IOErrorCode_WRONG_VERSION + 1] =
+    static ErrCode const aErrorCode[int(ucb::IOErrorCode_WRONG_VERSION) + 1] =
     {
         ERRCODE_IO_ABORT,
         ERRCODE_IO_ACCESSDENIED,
@@ -186,7 +186,7 @@ bool LOKInteractionHandler::handleIOException(const css::uno::Sequence<css::uno:
         ERRCODE_IO_WRONGVERSION,
     };
 
-    postError(aIoException.Classification, "io", aErrorCode[(int)aIoException.Code], "");
+    postError(aIoException.Classification, "io", aErrorCode[static_cast<int>(aIoException.Code)], "");
     selectApproved(rContinuations);
 
     return true;
commit 856b938afd1a7dc66cb079b1b70fd90d1634c177
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 15 09:06:01 2018 +0100

    More loplugin:cstylecast: editeng
    
    Change-Id: I58978e5376ff1b91fa6dddbd308c923b3f3ab0ec

diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 44f21112d828..8e56f488f316 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -485,7 +485,7 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken )
             else if ( !isOffToken(nToken) )
             {
                 DBG_ASSERT( !isOffToken( nToken ), "No Start-Token ?!" );
-                SkipGroup( static_cast<HtmlTokenId>((int)nToken + 1) );
+                SkipGroup( static_cast<HtmlTokenId>(static_cast<int>(nToken) + 1) );
             }
         }
     }
@@ -801,7 +801,7 @@ void EditHTMLParser::HeadingStart( HtmlTokenId nToken )
         ImpInsertParaBreak();
 
     sal_uInt16 nId = sal::static_int_cast< sal_uInt16 >(
-        1 + ( ( (int)nToken - (int)HtmlTokenId::HEAD1_ON ) / 2 ) );
+        1 + ( ( static_cast<int>(nToken) - int(HtmlTokenId::HEAD1_ON) ) / 2 ) );
     DBG_ASSERT( (nId >= 1) && (nId <= 9), "HeadingStart: ID can not be correct!" );
     ImpSetStyleSheet( nId );
 }
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 7b048386c0e0..f81e1f7fd46e 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2434,7 +2434,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS
 
     if ( mpIMEInfos && mpIMEInfos->nLen && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) )
     {
-        ExtTextInputAttr nLastAttr = (ExtTextInputAttr)0xFFFF;
+        ExtTextInputAttr nLastAttr = ExtTextInputAttr(0xFFFF);
         for( sal_Int32 n = 0; n < mpIMEInfos->nLen; n++ )
         {
             if ( mpIMEInfos->pAttribs[n] != nLastAttr )
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 01a94950bee7..06e07e849cd4 100644

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list