summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-20 16:41:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-05 06:51:20 +0000
commit954f752cf10fc6a8777af2a6a93e496688464687 (patch)
tree0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972
parentc1e18e05a53c1d55afe36a887ca25f74f3f1d32d (diff)
convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basctl/source/accessibility/accessibledialogcontrolshape.cxx2
-rw-r--r--basctl/source/accessibility/accessibledialogwindow.cxx2
-rw-r--r--basctl/source/basicide/basicrenderable.cxx2
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basctl/source/basicide/moduldl2.cxx4
-rw-r--r--basctl/source/basicide/moduldlg.cxx2
-rw-r--r--basctl/source/basicide/objdlg.cxx6
-rw-r--r--basctl/source/dlged/dlged.cxx10
-rw-r--r--basctl/source/dlged/dlgedobj.cxx36
-rw-r--r--basic/source/runtime/inputbox.cxx4
-rw-r--r--basic/source/runtime/iosys.cxx2
-rw-r--r--basic/source/runtime/methods1.cxx8
-rw-r--r--basic/source/runtime/stdobj1.cxx4
-rw-r--r--canvas/source/cairo/cairo_devicehelper.cxx4
-rw-r--r--canvas/source/opengl/ogl_spritedevicehelper.cxx4
-rw-r--r--canvas/source/vcl/devicehelper.cxx4
-rw-r--r--chart2/source/controller/accessibility/AccessibleViewForwarder.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx14
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx4
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx2
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx4
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx4
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx2
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.cxx2
-rw-r--r--chart2/source/view/main/ChartItemPool.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx6
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx2
-rw-r--r--cui/source/customize/acccfg.cxx10
-rw-r--r--cui/source/customize/cfg.cxx6
-rw-r--r--cui/source/customize/eventdlg.cxx2
-rw-r--r--cui/source/customize/macropg.cxx8
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/dialogs/colorpicker.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx4
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx2
-rw-r--r--cui/source/dialogs/linkdlg.cxx8
-rw-r--r--cui/source/dialogs/multipat.cxx4
-rw-r--r--cui/source/options/certpath.cxx2
-rw-r--r--cui/source/options/connpooloptions.cxx8
-rw-r--r--cui/source/options/dbregister.cxx8
-rw-r--r--cui/source/options/fontsubs.cxx6
-rw-r--r--cui/source/options/optaboutconfig.cxx6
-rw-r--r--cui/source/options/optfltr.cxx2
-rw-r--r--cui/source/options/optjava.cxx6
-rw-r--r--cui/source/options/optlingu.cxx2
-rw-r--r--cui/source/options/optpath.cxx8
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--cui/source/options/webconninfo.cxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx10
-rw-r--r--cui/source/tabpages/border.cxx10
-rw-r--r--cui/source/tabpages/chardlg.cxx16
-rw-r--r--cui/source/tabpages/grfpage.cxx10
-rw-r--r--cui/source/tabpages/labdlg.cxx2
-rw-r--r--cui/source/tabpages/macroass.cxx4
-rw-r--r--cui/source/tabpages/measure.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx12
-rw-r--r--cui/source/tabpages/page.cxx70
-rw-r--r--cui/source/tabpages/paragrph.cxx6
-rw-r--r--cui/source/tabpages/tabstpge.cxx14
-rw-r--r--cui/source/tabpages/tparea.cxx4
-rw-r--r--cui/source/tabpages/tpbitmap.cxx16
-rw-r--r--cui/source/tabpages/tpcolor.cxx4
-rw-r--r--cui/source/tabpages/tpline.cxx18
-rw-r--r--cui/source/tabpages/transfrm.cxx14
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx4
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx2
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx4
-rw-r--r--dbaccess/source/ui/app/AppView.cxx4
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx8
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx2
-rw-r--r--dbaccess/source/ui/control/VertSplitView.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx4
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx12
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx8
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx4
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx2
-rw-r--r--drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx2
-rw-r--r--drawinglayer/source/primitive2d/controlprimitive2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx20
-rw-r--r--drawinglayer/source/primitive2d/sceneprimitive2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx10
-rw-r--r--drawinglayer/source/tools/converters.cxx2
-rw-r--r--editeng/source/editeng/editdbg.cxx4
-rw-r--r--editeng/source/editeng/editview.cxx4
-rw-r--r--editeng/source/editeng/eehtml.cxx10
-rw-r--r--editeng/source/editeng/eertfpar.cxx6
-rw-r--r--editeng/source/editeng/impedit.cxx26
-rw-r--r--editeng/source/editeng/impedit2.cxx4
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/items/itemtype.cxx62
-rw-r--r--editeng/source/items/numitem.cxx4
-rw-r--r--editeng/source/items/paperinf.cxx12
-rw-r--r--editeng/source/items/textitem.cxx73
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--editeng/source/uno/unoipset.cxx20
-rw-r--r--extensions/source/abpilot/abspilot.cxx2
-rw-r--r--extensions/source/bibliography/general.cxx2
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx2
-rw-r--r--extensions/source/propctrlr/browserline.cxx2
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx4
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx4
-rw-r--r--extensions/source/propctrlr/inspectorhelpwindow.cxx8
-rw-r--r--extensions/source/propctrlr/listselectiondlg.cxx2
-rw-r--r--extensions/source/scanner/grid.cxx4
-rw-r--r--extensions/source/scanner/sanedlg.cxx16
-rw-r--r--filter/source/flash/swfwriter.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx4
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx4
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx4
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx4
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx16
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx4
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx2
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx2
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx6
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx10
-rw-r--r--filter/source/msfilter/eschesdo.cxx4
-rw-r--r--filter/source/msfilter/msdffimp.cxx30
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--filter/source/pdf/impdialog.cxx2
-rw-r--r--filter/source/pdf/pdfexport.cxx10
-rw-r--r--filter/source/svg/svgexport.cxx12
-rw-r--r--filter/source/svg/svgfontexport.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx6
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx8
-rw-r--r--forms/source/richtext/richtextcontrol.cxx4
-rw-r--r--forms/source/richtext/richtextengine.cxx2
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx2
-rw-r--r--forms/source/richtext/rtattributehandler.cxx8
-rw-r--r--formula/source/ui/dlg/formula.cxx2
-rw-r--r--formula/source/ui/dlg/funcpage.cxx2
-rw-r--r--formula/source/ui/dlg/structpg.cxx2
-rw-r--r--fpicker/source/office/PlacesListBox.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--fpicker/source/office/iodlgimp.cxx2
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx2
-rw-r--r--include/editeng/fhgtitem.hxx2
-rw-r--r--include/editeng/paperinf.hxx4
-rw-r--r--include/svtools/simptabl.hxx2
-rw-r--r--include/svtools/svtabbx.hxx4
-rw-r--r--include/svx/nbdtmg.hxx2
-rw-r--r--include/svx/svdetc.hxx6
-rw-r--r--include/svx/svdmodel.hxx16
-rw-r--r--include/svx/svdtrans.hxx6
-rw-r--r--include/tools/mapunit.hxx15
-rw-r--r--include/tools/rc.h5
-rw-r--r--include/vcl/gdimtf.hxx2
-rw-r--r--include/vcl/outdev.hxx4
-rw-r--r--include/vcl/pdfwriter.hxx2
-rw-r--r--lotuswordpro/source/filter/lwppagelayout.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/export/drawingml.cxx4
-rw-r--r--oox/source/export/shapes.cxx4
-rw-r--r--oox/source/helper/graphichelper.cxx2
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx4
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx2
-rw-r--r--reportdesign/source/ui/dlg/DateTime.cxx4
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx2
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx6
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx8
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx6
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx2
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--rsc/inc/rscdb.hxx2
-rw-r--r--rsc/source/parser/rscibas.cxx27
-rw-r--r--sc/source/core/data/column2.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx4
-rw-r--r--sc/source/core/data/documen2.cxx4
-rw-r--r--sc/source/core/data/documen8.cxx8
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx8
-rw-r--r--sc/source/core/data/global.cxx6
-rw-r--r--sc/source/core/data/patattr.cxx4
-rw-r--r--sc/source/core/data/poolhelp.cxx4
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/tool/editutil.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx6
-rw-r--r--sc/source/filter/excel/xlescher.cxx10
-rw-r--r--sc/source/filter/excel/xlroot.cxx6
-rw-r--r--sc/source/filter/html/htmlexp.cxx4
-rw-r--r--sc/source/filter/html/htmlimp.cxx4
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx4
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx6
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx8
-rw-r--r--sc/source/ui/app/client.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/app/msgpool.cxx4
-rw-r--r--sc/source/ui/app/transobj.cxx4
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx2
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx2
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx2
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx4
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx2
-rw-r--r--sc/source/ui/docshell/docsh3.cxx6
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/docshell/sizedev.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx8
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx10
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx8
-rw-r--r--sc/source/ui/namedlg/namepast.cxx2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx4
-rw-r--r--sc/source/ui/undo/undostyl.cxx2
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx2
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx8
-rw-r--r--sc/source/ui/unoobj/textuno.cxx6
-rw-r--r--sc/source/ui/view/drawutil.cxx2
-rw-r--r--sc/source/ui/view/drawvie4.cxx8
-rw-r--r--sc/source/ui/view/drawview.cxx6
-rw-r--r--sc/source/ui/view/gridmerg.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx10
-rw-r--r--sc/source/ui/view/gridwin4.cxx26
-rw-r--r--sc/source/ui/view/gridwin_dbgutil.cxx4
-rw-r--r--sc/source/ui/view/hintwin.cxx4
-rw-r--r--sc/source/ui/view/notemark.cxx4
-rw-r--r--sc/source/ui/view/output.cxx2
-rw-r--r--sc/source/ui/view/output3.cxx6
-rw-r--r--sc/source/ui/view/preview.cxx20
-rw-r--r--sc/source/ui/view/printfun.cxx26
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sc/source/ui/view/tabvwshb.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx6
-rw-r--r--sc/source/ui/view/viewfun7.cxx10
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx2
-rw-r--r--sd/source/core/drawdoc.cxx4
-rw-r--r--sd/source/core/drawdoc2.cxx8
-rw-r--r--sd/source/core/sdpage.cxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx4
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx8
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/html/buttonset.cxx2
-rw-r--r--sd/source/filter/html/pubdlg.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx4
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx2
-rw-r--r--sd/source/ui/app/sdmod2.cxx2
-rw-r--r--sd/source/ui/dlg/PaneDockingWindow.cxx2
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx6
-rw-r--r--sd/source/ui/dlg/animobjs.cxx10
-rw-r--r--sd/source/ui/dlg/copydlg.cxx28
-rw-r--r--sd/source/ui/dlg/dlgsnap.cxx8
-rw-r--r--sd/source/ui/dlg/docprev.cxx2
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx2
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx2
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx2
-rw-r--r--sd/source/ui/docshell/docshel2.cxx8
-rw-r--r--sd/source/ui/docshell/docshel4.cxx2
-rw-r--r--sd/source/ui/docshell/sdclient.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx28
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx2
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx8
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx2
-rw-r--r--sd/source/ui/slideshow/showwin.cxx10
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx2
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx6
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx4
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/drviews8.cxx4
-rw-r--r--sd/source/ui/view/drviews9.cxx2
-rw-r--r--sd/source/ui/view/sdview.cxx8
-rw-r--r--sd/source/ui/view/sdview3.cxx20
-rw-r--r--sd/source/ui/view/sdview4.cxx10
-rw-r--r--sd/source/ui/view/sdwindow.cxx6
-rw-r--r--sfx2/source/appl/appuno.cxx8
-rw-r--r--sfx2/source/appl/newhelp.cxx12
-rw-r--r--sfx2/source/control/ctrlitem.cxx2
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx8
-rw-r--r--sfx2/source/dialog/dialoghelper.cxx8
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx10
-rw-r--r--sfx2/source/dialog/mgetempl.cxx10
-rw-r--r--sfx2/source/dialog/versdlg.cxx6
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--sfx2/source/doc/new.cxx4
-rw-r--r--sfx2/source/doc/objembed.cxx4
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/sidebar/SidebarChildWindow.cxx2
-rw-r--r--sfx2/source/view/classificationcontroller.cxx2
-rw-r--r--slideshow/source/engine/rehearsetimingsactivity.cxx4
-rw-r--r--starmath/source/ElementsDockingWindow.cxx6
-rw-r--r--starmath/source/accessibility.cxx2
-rw-r--r--starmath/source/dialog.cxx6
-rw-r--r--starmath/source/document.cxx28
-rw-r--r--starmath/source/edit.cxx2
-rw-r--r--starmath/source/tmpdevice.cxx4
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--starmath/source/view.cxx30
-rw-r--r--svl/source/inc/poolio.hxx2
-rw-r--r--svl/source/items/itempool.cxx2
-rw-r--r--svl/source/items/poolitem.cxx2
-rw-r--r--svtools/source/brwbox/brwbox2.cxx16
-rw-r--r--svtools/source/contnr/fileview.cxx8
-rw-r--r--svtools/source/contnr/simptabl.cxx2
-rw-r--r--svtools/source/contnr/svtabbx.cxx4
-rw-r--r--svtools/source/control/ctrlbox.cxx4
-rw-r--r--svtools/source/control/ctrltool.cxx2
-rw-r--r--svtools/source/control/roadmap.cxx8
-rw-r--r--svtools/source/control/ruler.cxx26
-rw-r--r--svtools/source/control/scrwin.cxx2
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx2
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx10
-rw-r--r--svtools/source/dialogs/wizdlg.cxx2
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx2
-rw-r--r--svtools/source/filter/GraphicExportOptionsDialog.cxx4
-rw-r--r--svtools/source/filter/exportdialog.cxx50
-rw-r--r--svtools/source/graphic/descriptor.cxx4
-rw-r--r--svtools/source/graphic/grfmgr.cxx20
-rw-r--r--svtools/source/graphic/provider.cxx12
-rw-r--r--svtools/source/misc/embedhlp.cxx4
-rw-r--r--svtools/source/misc/embedtransfer.cxx4
-rw-r--r--svtools/source/misc/imap.cxx14
-rw-r--r--svtools/source/misc/imap2.cxx4
-rw-r--r--svtools/source/misc/transfer.cxx8
-rw-r--r--svtools/source/misc/unitconv.cxx96
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx10
-rw-r--r--svtools/source/uno/svtxgridcontrol.cxx4
-rw-r--r--svtools/source/uno/wizard/wizardshell.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx12
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx4
-rw-r--r--svx/source/dialog/_bmpmask.cxx4
-rw-r--r--svx/source/dialog/_contdlg.cxx12
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx6
-rw-r--r--svx/source/dialog/connctrl.cxx6
-rw-r--r--svx/source/dialog/contwnd.cxx2
-rw-r--r--svx/source/dialog/ctredlin.cxx2
-rw-r--r--svx/source/dialog/dialcontrol.cxx2
-rw-r--r--svx/source/dialog/dlgctl3d.cxx6
-rw-r--r--svx/source/dialog/dlgctrl.cxx8
-rw-r--r--svx/source/dialog/dlgunit.hxx2
-rw-r--r--svx/source/dialog/docrecovery.cxx2
-rw-r--r--svx/source/dialog/fntctrl.cxx8
-rw-r--r--svx/source/dialog/fontwork.cxx24
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/dialog/graphctl.cxx4
-rw-r--r--svx/source/dialog/hdft.cxx20
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/dialog/measctrl.cxx2
-rw-r--r--svx/source/dialog/pagectrl.cxx4
-rw-r--r--svx/source/dialog/paraprev.cxx2
-rw-r--r--svx/source/dialog/rubydialog.cxx4
-rw-r--r--svx/source/dialog/srchdlg.cxx14
-rw-r--r--svx/source/dialog/swframeexample.cxx4
-rw-r--r--svx/source/engine3d/float3d.cxx4
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx8
-rw-r--r--svx/source/fmcomp/fmgridif.cxx10
-rw-r--r--svx/source/fmcomp/gridctrl.cxx4
-rw-r--r--svx/source/form/datanavi.cxx14
-rw-r--r--svx/source/form/filtnav.cxx6
-rw-r--r--svx/source/form/fmexpl.cxx6
-rw-r--r--svx/source/form/fmvwimp.cxx4
-rw-r--r--svx/source/gallery2/GalleryControl.cxx2
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/gallery2/galctrl.cxx2
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx4
-rw-r--r--svx/source/gallery2/galtheme.cxx2
-rw-r--r--svx/source/items/grfitem.cxx8
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx12
-rw-r--r--svx/source/sdr/overlay/overlayobjectlist.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx6
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx6
-rw-r--r--svx/source/sidebar/area/AreaTransparencyGradientControl.cxx40
-rw-r--r--svx/source/sidebar/line/LinePropertyPanelBase.cxx4
-rw-r--r--svx/source/sidebar/line/LineWidthPopup.cxx10
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx6
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx6
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx40
-rw-r--r--svx/source/sidebar/paragraph/ParaSpacingWindow.cxx4
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx10
-rw-r--r--svx/source/sidebar/possize/SidebarDialControl.cxx2
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.cxx4
-rw-r--r--svx/source/svdraw/svddrgmt.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdibrow.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx28
-rw-r--r--svx/source/svdraw/svdmrkv.cxx8
-rw-r--r--svx/source/svdraw/svdoashp.cxx8
-rw-r--r--svx/source/svdraw/svdobj.cxx8
-rw-r--r--svx/source/svdraw/svdocapt.cxx4
-rw-r--r--svx/source/svdraw/svdograf.cxx8
-rw-r--r--svx/source/svdraw/svdomeas.cxx8
-rw-r--r--svx/source/svdraw/svdomedia.cxx2
-rw-r--r--svx/source/svdraw/svdoole2.cxx6
-rw-r--r--svx/source/svdraw/svdopath.cxx8
-rw-r--r--svx/source/svdraw/svdotext.cxx8
-rw-r--r--svx/source/svdraw/svdtrans.cxx84
-rw-r--r--svx/source/table/tablecontroller.cxx8
-rw-r--r--svx/source/table/tablertfexporter.cxx2
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--svx/source/tbxctrls/bulletsnumbering.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx6
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx2
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx6
-rw-r--r--svx/source/tbxctrls/itemwin.cxx14
-rw-r--r--svx/source/tbxctrls/layctrl.cxx2
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx2
-rw-r--r--svx/source/tbxctrls/linectrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx4
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx6
-rw-r--r--svx/source/unodraw/unopool.cxx8
-rw-r--r--svx/source/unodraw/unoprov.cxx44
-rw-r--r--svx/source/unodraw/unoshap4.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx24
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx4
-rw-r--r--svx/source/xoutdev/xattr.cxx2
-rw-r--r--svx/source/xoutdev/xtabdash.cxx2
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx2
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx12
-rw-r--r--sw/source/core/bastyp/swtypes.cxx4
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx4
-rw-r--r--sw/source/core/doc/fmtcol.cxx2
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx18
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/drawdoc.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx6
-rw-r--r--sw/source/core/layout/atrfrm.cxx8
-rw-r--r--sw/source/core/layout/fly.cxx6
-rw-r--r--sw/source/core/ole/ndole.cxx6
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx4
-rw-r--r--sw/source/core/text/noteurl.cxx2
-rw-r--r--sw/source/core/text/porrst.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx10
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx8
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx2
-rw-r--r--sw/source/core/view/viewpg.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/core/view/vprint.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx4
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx4
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx16
-rw-r--r--sw/source/filter/html/htmlform.cxx8
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx4
-rw-r--r--sw/source/filter/html/htmltabw.cxx10
-rw-r--r--sw/source/filter/html/svxcss1.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx10
-rw-r--r--sw/source/filter/xml/xmlexp.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx10
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx36
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx12
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/envelp/envfmt.cxx4
-rw-r--r--sw/source/ui/envelp/envlop1.cxx4
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx6
-rw-r--r--sw/source/uibase/app/appenv.cxx2
-rw-r--r--sw/source/uibase/app/docshini.cxx4
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx14
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarScrollBar.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx4
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/shells/grfshex.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageFormatPanel.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx4
-rw-r--r--sw/source/uibase/table/chartins.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/swcli.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx2
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx4
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx2
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx8
-rw-r--r--toolkit/source/awt/vclxcontainer.cxx2
-rw-r--r--toolkit/source/awt/vclxdevice.cxx2
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx6
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx6
-rw-r--r--toolkit/source/helper/vclunohelper.cxx72
-rw-r--r--uui/source/fltdlg.cxx2
-rw-r--r--vcl/README.GDIMetaFile2
-rw-r--r--vcl/osx/salprn.cxx2
-rw-r--r--vcl/qa/cppunit/mapmode.cxx50
-rw-r--r--vcl/source/app/settings.cxx2
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/field.cxx36
-rw-r--r--vcl/source/control/morebtn.cxx2
-rw-r--r--vcl/source/control/scrbar.cxx8
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx16
-rw-r--r--vcl/source/filter/graphicfilter2.cxx12
-rw-r--r--vcl/source/filter/igif/gifread.cxx2
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx6
-rw-r--r--vcl/source/filter/sgfbram.cxx2
-rw-r--r--vcl/source/filter/sgvmain.cxx2
-rw-r--r--vcl/source/filter/sgvtext.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx4
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx8
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx6
-rw-r--r--vcl/source/gdi/bitmap.cxx4
-rw-r--r--vcl/source/gdi/bitmap3.cxx2
-rw-r--r--vcl/source/gdi/dibtools.cxx6
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx6
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/graph.cxx2
-rw-r--r--vcl/source/gdi/impgraph.cxx4
-rw-r--r--vcl/source/gdi/impvect.cxx2
-rw-r--r--vcl/source/gdi/mapmod.cxx30
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx22
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx4
-rw-r--r--vcl/source/gdi/pngread.cxx6
-rw-r--r--vcl/source/gdi/pngwrite.cxx2
-rw-r--r--vcl/source/gdi/print.cxx6
-rw-r--r--vcl/source/gdi/print2.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx26
-rw-r--r--vcl/source/gdi/svgdata.cxx2
-rw-r--r--vcl/source/gdi/svmconverter.cxx2
-rw-r--r--vcl/source/gdi/textlayout.cxx8
-rw-r--r--vcl/source/outdev/bitmap.cxx6
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/map.cxx92
-rw-r--r--vcl/source/outdev/text.cxx2
-rw-r--r--vcl/source/window/decoview.cxx2
-rw-r--r--vcl/source/window/dockwin.cxx2
-rw-r--r--vcl/source/window/menubarwindow.cxx2
-rw-r--r--vcl/source/window/paint.cxx6
-rw-r--r--vcl/source/window/printdlg.cxx28
-rw-r--r--vcl/source/window/resource.cxx4
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/source/window/window2.cxx4
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx2
-rw-r--r--vcl/workben/svptest.cxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx4
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx2
648 files changed, 2090 insertions, 2080 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index b4f8ac0971ca..05e16b6e3d17 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -146,7 +146,7 @@ awt::Rectangle AccessibleDialogControlShape::GetBounds()
aRect.Move( aOrg.X(), aOrg.Y() );
// convert logic units to pixel
- aRect = m_pDialogWindow->LogicToPixel( aRect, MapMode(MAP_100TH_MM) );
+ aRect = m_pDialogWindow->LogicToPixel( aRect, MapMode(MapUnit::Map100thMM) );
// clip the shape's bounding box with the bounding box of its parent
Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() );
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index 830d885373b7..653625857043 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -222,7 +222,7 @@ bool AccessibleDialogWindow::IsChildVisible( const ChildDescriptor& rDesc )
aRect.Move( aOrg.X(), aOrg.Y() );
// convert logic units to pixel
- aRect = m_pDialogWindow->LogicToPixel( aRect, MapMode(MAP_100TH_MM) );
+ aRect = m_pDialogWindow->LogicToPixel( aRect, MapMode(MapUnit::Map100thMM) );
// check, if the shape's bounding box intersects with the bounding box of its parent
Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() );
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index d30171c78a6e..4e5a9675b2c3 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -128,7 +128,7 @@ Sequence<beans::PropertyValue> SAL_CALL Renderable::getRenderer (
// no renderdevice is legal; the first call is to get our print ui options
if( pPrinter )
{
- Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) ) );
awt::Size aSize;
aSize.Width = aPageSize.Width();
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index c994910dbd9c..11872eb4e3f6 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -804,7 +804,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
aFont.SetTransparent( true );
aFont.SetFontSize( Size( 0, 360 ) );
pPrinter->SetFont( aFont );
- pPrinter->SetMapMode( MAP_100TH_MM );
+ pPrinter->SetMapMode( MapUnit::Map100thMM );
OUString aTitle( CreateQualifiedName() );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 9b8eb6fc53e6..57f04b0f1492 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1617,7 +1617,7 @@ WatchWindow::WatchWindow (Layout* pParent) :
tabs[ 1 ] = 0;
tabs[ 2 ] = nVarTabWidth;
tabs[ 3 ] = nVarTabWidth + nValueTabWidth;
- aTreeListBox->SvHeaderTabListBox::SetTabs( tabs, MAP_PIXEL );
+ aTreeListBox->SvHeaderTabListBox::SetTabs( tabs, MapUnit::MapPixel );
aTreeListBox->InitHeaderBar( aHeaderBar.get() );
aTreeListBox->SetNodeDefaultImages( );
@@ -1802,7 +1802,7 @@ IMPL_LINK_NOARG( WatchWindow, implEndDragHdl, HeaderBar *, void )
for( sal_uInt16 i = 1 ; i < nTabs ; ++i )
{
nPos += aHeaderBar->GetItemSize( i );
- aTreeListBox->SetTab( i, nPos, MAP_PIXEL );
+ aTreeListBox->SetTab( i, nPos, MapUnit::MapPixel );
}
}
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index b4933cdb1c56..1b661a8c9d7d 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -483,7 +483,7 @@ LibPage::LibPage(vcl::Window * pParent)
{
get(m_pBasicsBox, "location");
get(m_pLibBox, "library");
- Size aSize(m_pLibBox->LogicToPixel(Size(130, 87), MAP_APPFONT));
+ Size aSize(m_pLibBox->LogicToPixel(Size(130, 87), MapUnit::MapAppFont));
m_pLibBox->set_height_request(aSize.Height());
m_pLibBox->set_width_request(aSize.Width());
get(m_pEditButton, "edit");
@@ -510,7 +510,7 @@ LibPage::LibPage(vcl::Window * pParent)
m_pLibBox->SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP );
long aTabs[] = { 2, 30, 120 };
- m_pLibBox->SetTabs( aTabs, MAP_PIXEL );
+ m_pLibBox->SetTabs( aTabs, MapUnit::MapPixel );
FillListBox();
m_pBasicsBox->SelectEntryPos( 0 );
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 5a7ce994f70c..386069ed73e0 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -553,7 +553,7 @@ ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, sal_uInt16 nM
".ui")
{
get(m_pBasicBox, "library");
- Size aSize(m_pBasicBox->LogicToPixel(Size(130, 117), MAP_APPFONT));
+ Size aSize(m_pBasicBox->LogicToPixel(Size(130, 117), MapUnit::MapAppFont));
m_pBasicBox->set_height_request(aSize.Height());
m_pBasicBox->set_width_request(aSize.Width());
get(m_pEditButton, "edit");
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 2371c3facad3..240b7e15212f 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -112,15 +112,15 @@ void ObjectCatalog::ArrangeWindows()
aTitle->Hide();
else
{
- Size aTitleSize = LogicToPixel(Size(3, 10), MAP_APPFONT);
+ Size aTitleSize = LogicToPixel(Size(3, 10), MapUnit::MapAppFont);
aTitleSize.Width() = aSize.Width() - 2*aTitleSize.Width();
- aTitle->SetPosPixel(LogicToPixel(Point(3, 3), MAP_APPFONT));
+ aTitle->SetPosPixel(LogicToPixel(Point(3, 3), MapUnit::MapAppFont));
aTitle->SetSizePixel(aTitleSize);
aTitle->Show();
}
// tree
- Point const aTreePos = LogicToPixel(Point(3, bFloating ? 3 : 16), MAP_APPFONT);
+ Point const aTreePos = LogicToPixel(Point(3, bFloating ? 3 : 16), MapUnit::MapAppFont);
long const nMargin = aTreePos.X();
Size const aTreeSize(
aSize.Width() - 2*nMargin,
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 363f043465b9..09fb33607a25 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -200,7 +200,7 @@ DlgEditor::DlgEditor (
{
pDlgEdModel->GetItemPool().FreezeIdRanges();
pDlgEdView.reset(new DlgEdView(*pDlgEdModel, rWindow_, *this));
- pDlgEdModel->SetScaleUnit( MAP_100TH_MM );
+ pDlgEdModel->SetScaleUnit( MapUnit::Map100thMM );
SdrLayerAdmin& rAdmin = pDlgEdModel->GetLayerAdmin();
rAdmin.NewLayer( rAdmin.GetControlLayerName() );
@@ -221,7 +221,7 @@ DlgEditor::DlgEditor (
aMarkIdle.SetPriority(SchedulerPriority::LOW);
aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
- rWindow.SetMapMode( MapMode( MAP_100TH_MM ) );
+ rWindow.SetMapMode( MapMode( MapUnit::Map100thMM ) );
pDlgEdPage->SetSize( rWindow.PixelToLogic( Size(DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN) ) );
pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0));
@@ -1150,7 +1150,7 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor
MapMode aOldMap( pPrinter->GetMapMode());
vcl::Font aOldFont( pPrinter->GetFont() );
- MapMode aMap( MAP_100TH_MM );
+ MapMode aMap( MapUnit::Map100thMM );
pPrinter->SetMapMode( aMap );
vcl::Font aFont;
aFont.SetAlignment( ALIGN_BOTTOM );
@@ -1215,13 +1215,13 @@ bool DlgEditor::AdjustPageSize()
if ( pDlgEdForm && pDlgEdForm->TransformFormToSdrCoordinates( nFormXIn, nFormYIn, nFormWidthIn, nFormHeightIn, nFormX, nFormY, nFormWidth, nFormHeight ) )
{
Size aPageSizeDelta( 400, 300 );
- aPageSizeDelta = rWindow.PixelToLogic( aPageSizeDelta, MapMode( MAP_100TH_MM ) );
+ aPageSizeDelta = rWindow.PixelToLogic( aPageSizeDelta, MapMode( MapUnit::Map100thMM ) );
sal_Int32 nNewPageWidth = nFormX + nFormWidth + aPageSizeDelta.Width();
sal_Int32 nNewPageHeight = nFormY + nFormHeight + aPageSizeDelta.Height();
Size aPageSizeMin( DLGED_PAGE_WIDTH_MIN, DLGED_PAGE_HEIGHT_MIN );
- aPageSizeMin = rWindow.PixelToLogic( aPageSizeMin, MapMode( MAP_100TH_MM ) );
+ aPageSizeMin = rWindow.PixelToLogic( aPageSizeMin, MapMode( MapUnit::Map100thMM ) );
sal_Int32 nPageWidthMin = aPageSizeMin.Width();
sal_Int32 nPageHeightMin = aPageSizeMin.Height();
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 0f8edbe22d6f..e57f329e88d4 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -137,9 +137,9 @@ bool DlgEdObj::TransformSdrToControlCoordinates(
DBG_ASSERT( pDevice, "DlgEdObj::TransformSdrToControlCoordinates: missing default device!" );
if ( !pDevice )
return false;
- aPos = pDevice->LogicToPixel( aPos, MapMode( MAP_100TH_MM ) );
- aSize = pDevice->LogicToPixel( aSize, MapMode( MAP_100TH_MM ) );
- aFormPos = pDevice->LogicToPixel( aFormPos, MapMode( MAP_100TH_MM ) );
+ aPos = pDevice->LogicToPixel( aPos, MapMode( MapUnit::Map100thMM ) );
+ aSize = pDevice->LogicToPixel( aSize, MapMode( MapUnit::Map100thMM ) );
+ aFormPos = pDevice->LogicToPixel( aFormPos, MapMode( MapUnit::Map100thMM ) );
// subtract form position
aPos.Width() -= aFormPos.Width();
@@ -160,8 +160,8 @@ bool DlgEdObj::TransformSdrToControlCoordinates(
}
// convert pixel to logic units
- aPos = pDevice->PixelToLogic( aPos, MAP_APPFONT );
- aSize = pDevice->PixelToLogic( aSize, MAP_APPFONT );
+ aPos = pDevice->PixelToLogic( aPos, MapUnit::MapAppFont );
+ aSize = pDevice->PixelToLogic( aSize, MapUnit::MapAppFont );
// set out parameters
nXOut = aPos.Width();
@@ -185,8 +185,8 @@ bool DlgEdObj::TransformSdrToFormCoordinates(
DBG_ASSERT( pDevice, "DlgEdObj::TransformSdrToFormCoordinates: missing default device!" );
if ( !pDevice )
return false;
- aPos = pDevice->LogicToPixel( aPos, MapMode( MAP_100TH_MM ) );
- aSize = pDevice->LogicToPixel( aSize, MapMode( MAP_100TH_MM ) );
+ aPos = pDevice->LogicToPixel( aPos, MapMode( MapUnit::Map100thMM ) );
+ aSize = pDevice->LogicToPixel( aSize, MapMode( MapUnit::Map100thMM ) );
// take window borders into account
DlgEdForm* pForm = nullptr;
@@ -207,8 +207,8 @@ bool DlgEdObj::TransformSdrToFormCoordinates(
aSize.Height() -= aDeviceInfo.TopInset + aDeviceInfo.BottomInset;
}
// convert pixel to logic units
- aPos = pDevice->PixelToLogic( aPos, MAP_APPFONT );
- aSize = pDevice->PixelToLogic( aSize, MAP_APPFONT );
+ aPos = pDevice->PixelToLogic( aPos, MapUnit::MapAppFont );
+ aSize = pDevice->PixelToLogic( aSize, MapUnit::MapAppFont );
// set out parameters
nXOut = aPos.Width();
@@ -248,9 +248,9 @@ bool DlgEdObj::TransformControlToSdrCoordinates(
DBG_ASSERT( pDevice, "DlgEdObj::TransformControlToSdrCoordinates: missing default device!" );
if ( !pDevice )
return false;
- aPos = pDevice->LogicToPixel( aPos, MAP_APPFONT );
- aSize = pDevice->LogicToPixel( aSize, MAP_APPFONT );
- aFormPos = pDevice->LogicToPixel( aFormPos, MAP_APPFONT );
+ aPos = pDevice->LogicToPixel( aPos, MapUnit::MapAppFont );
+ aSize = pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
+ aFormPos = pDevice->LogicToPixel( aFormPos, MapUnit::MapAppFont );
// add form position
aPos.Width() += aFormPos.Width();
@@ -267,8 +267,8 @@ bool DlgEdObj::TransformControlToSdrCoordinates(
}
// convert pixel to 100th_mm
- aPos = pDevice->PixelToLogic( aPos, MapMode( MAP_100TH_MM ) );
- aSize = pDevice->PixelToLogic( aSize, MapMode( MAP_100TH_MM ) );
+ aPos = pDevice->PixelToLogic( aPos, MapMode( MapUnit::Map100thMM ) );
+ aSize = pDevice->PixelToLogic( aSize, MapMode( MapUnit::Map100thMM ) );
// set out parameters
nXOut = aPos.Width();
@@ -298,8 +298,8 @@ bool DlgEdObj::TransformFormToSdrCoordinates(
if ( !lcl_getDlgEdForm( this, pForm ) )
return false;
- aPos = pDevice->LogicToPixel( aPos, MAP_APPFONT );
- aSize = pDevice->LogicToPixel( aSize, MAP_APPFONT );
+ aPos = pDevice->LogicToPixel( aPos, MapUnit::MapAppFont );
+ aSize = pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
// take window borders into account
Reference< beans::XPropertySet > xPSetForm( pForm->GetUnoControlModel(), UNO_QUERY );
@@ -316,8 +316,8 @@ bool DlgEdObj::TransformFormToSdrCoordinates(
}
// convert pixel to 100th_mm
- aPos = pDevice->PixelToLogic( aPos, MapMode( MAP_100TH_MM ) );
- aSize = pDevice->PixelToLogic( aSize, MapMode( MAP_100TH_MM ) );
+ aPos = pDevice->PixelToLogic( aPos, MapMode( MapUnit::Map100thMM ) );
+ aSize = pDevice->PixelToLogic( aSize, MapMode( MapUnit::Map100thMM ) );
// set out parameters
nXOut = aPos.Width();
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index 4b89c6c4cf08..215c2a5a7835 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -58,7 +58,7 @@ SvRTLInputBox::SvRTLInputBox( vcl::Window* pParent, const OUString& rPrompt,
aEdit( VclPtr<Edit>::Create(this, WB_LEFT | WB_BORDER) ),
aOk( VclPtr<OKButton>::Create(this) ), aCancel( VclPtr<CancelButton>::Create(this) ), aPromptText( VclPtr<FixedText>::Create(this, WB_WORDBREAK) )
{
- SetMapMode( MapMode( MAP_APPFONT ) );
+ SetMapMode( MapMode( MapUnit::MapAppFont ) );
Size aDlgSizeApp( 280, 80 );
PositionDialog( nXTwips, nYTwips, aDlgSizeApp );
InitButtons( aDlgSizeApp );
@@ -104,7 +104,7 @@ void SvRTLInputBox::PositionDialog(long nXTwips, long nYTwips, const Size& rDlgS
if( nXTwips != -1 && nYTwips != -1 )
{
Point aDlgPosApp( nXTwips, nYTwips );
- SetPosPixel( LogicToPixel( aDlgPosApp, MAP_TWIP ) );
+ SetPosPixel( LogicToPixel( aDlgPosApp, MapUnit::MapTwip ) );
}
}
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index a56d6e33373d..a143257e722d 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -83,7 +83,7 @@ SbiInputDialog::SbiInputDialog( vcl::Window* pParent, const OUString& rPrompt )
SetText( rPrompt );
aOk->SetClickHdl( LINK( this, SbiInputDialog, Ok ) );
aCancel->SetClickHdl( LINK( this, SbiInputDialog, Cancel ) );
- SetMapMode( MapMode( MAP_APPFONT ) );
+ SetMapMode( MapMode( MapUnit::MapAppFont ) );
Point aPt = LogicToPixel( Point( 50, 50 ) );
Size aSz = LogicToPixel( Size( 145, 65 ) );
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index a60b16d1c79d..8a385c2a3d9b 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -747,7 +747,7 @@ RTLFUNC(TwipsPerPixelX)
sal_Int32 nResult = 0;
Size aSize( 100,0 );
- MapMode aMap( MAP_TWIP );
+ MapMode aMap( MapUnit::MapTwip );
OutputDevice* pDevice = Application::GetDefaultDevice();
if( pDevice )
{
@@ -764,7 +764,7 @@ RTLFUNC(TwipsPerPixelY)
sal_Int32 nResult = 0;
Size aSize( 0,100 );
- MapMode aMap( MAP_TWIP );
+ MapMode aMap( MapUnit::MapTwip );
OutputDevice* pDevice = Application::GetDefaultDevice();
if( pDevice )
{
@@ -1345,9 +1345,9 @@ static double GetDialogZoomFactor( bool bX, long nValue )
Size aRefSize( nValue, nValue );
Fraction aFracX( 1, 26 );
Fraction aFracY( 1, 24 );
- MapMode aMap( MAP_APPFONT, Point(), aFracX, aFracY );
+ MapMode aMap( MapUnit::MapAppFont, Point(), aFracX, aFracY );
Size aScaledSize = pDevice->LogicToPixel( aRefSize, aMap );
- aRefSize = pDevice->LogicToPixel( aRefSize, MapMode(MAP_TWIP) );
+ aRefSize = pDevice->LogicToPixel( aRefSize, MapMode(MapUnit::MapTwip) );
double nRef, nScaled;
if( bX )
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index 5c2e6e071983..cd963d12301b 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -86,7 +86,7 @@ void SbStdPicture::PropWidth( SbxVariable* pVar, SbxArray*, bool bWrite )
Size aSize = aGraphic.GetPrefSize();
aSize = Application::GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() );
- aSize = Application::GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) );
+ aSize = Application::GetAppWindow()->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) );
pVar->PutInteger( (sal_Int16)aSize.Width() );
}
@@ -101,7 +101,7 @@ void SbStdPicture::PropHeight( SbxVariable* pVar, SbxArray*, bool bWrite )
Size aSize = aGraphic.GetPrefSize();
aSize = Application::GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() );
- aSize = Application::GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) );
+ aSize = Application::GetAppWindow()->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) );
pVar->PutInteger( (sal_Int16)aSize.Height() );
}
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index d2ea8416a149..eae148187671 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -104,7 +104,7 @@ namespace cairocanvas
{
// Map a one-by-one millimeter box to pixel
const MapMode aOldMapMode( mpRefDevice->GetMapMode() );
- mpRefDevice->SetMapMode( MapMode(MAP_MM) );
+ mpRefDevice->SetMapMode( MapMode(MapUnit::MapMM) );
const Size aPixelSize( mpRefDevice->LogicToPixel(Size(1,1)) );
mpRefDevice->SetMapMode( aOldMapMode );
@@ -118,7 +118,7 @@ namespace cairocanvas
// Map the pixel dimensions of the output window to millimeter
const MapMode aOldMapMode( mpRefDevice->GetMapMode() );
- mpRefDevice->SetMapMode( MapMode(MAP_MM) );
+ mpRefDevice->SetMapMode( MapMode(MapUnit::MapMM) );
const Size aLogSize( mpRefDevice->PixelToLogic(mpRefDevice->GetOutputSizePixel()) );
mpRefDevice->SetMapMode( aOldMapMode );
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index 0ccf5b7df17f..50bf7142e9a4 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -160,7 +160,7 @@ namespace oglcanvas
// Map a one-by-one millimeter box to pixel
SystemChildWindow* pChildWindow = mxContext->getChildWindow();
const MapMode aOldMapMode( pChildWindow->GetMapMode() );
- pChildWindow->SetMapMode( MapMode(MAP_MM) );
+ pChildWindow->SetMapMode( MapMode(MapUnit::MapMM) );
const Size aPixelSize( pChildWindow->LogicToPixel(Size(1,1)) );
pChildWindow->SetMapMode( aOldMapMode );
@@ -175,7 +175,7 @@ namespace oglcanvas
// Map the pixel dimensions of the output window to millimeter
SystemChildWindow* pChildWindow = mxContext->getChildWindow();
const MapMode aOldMapMode( pChildWindow->GetMapMode() );
- pChildWindow->SetMapMode( MapMode(MAP_MM) );
+ pChildWindow->SetMapMode( MapMode(MapUnit::MapMM) );
const Size aLogSize( pChildWindow->PixelToLogic(pChildWindow->GetOutputSizePixel()) );
pChildWindow->SetMapMode( aOldMapMode );
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index 7447cef2f2ad..a278273bf048 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -54,7 +54,7 @@ namespace vclcanvas
// Map a one-by-one millimeter box to pixel
OutputDevice& rOutDev = mpOutDev->getOutDev();
const MapMode aOldMapMode( rOutDev.GetMapMode() );
- rOutDev.SetMapMode( MapMode(MAP_MM) );
+ rOutDev.SetMapMode( MapMode(MapUnit::MapMM) );
const Size aPixelSize( rOutDev.LogicToPixel(Size(1,1)) );
rOutDev.SetMapMode( aOldMapMode );
@@ -69,7 +69,7 @@ namespace vclcanvas
// Map the pixel dimensions of the output window to millimeter
OutputDevice& rOutDev = mpOutDev->getOutDev();
const MapMode aOldMapMode( rOutDev.GetMapMode() );
- rOutDev.SetMapMode( MapMode(MAP_MM) );
+ rOutDev.SetMapMode( MapMode(MapUnit::MapMM) );
const Size aLogSize( rOutDev.PixelToLogic(rOutDev.GetOutputSizePixel()) );
rOutDev.SetMapMode( aOldMapMode );
diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
index 30e2acc7051f..22dff81d646a 100644
--- a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx
@@ -30,7 +30,7 @@ namespace chart
AccessibleViewForwarder::AccessibleViewForwarder( AccessibleChartView* pAccChartView, vcl::Window* pWindow )
:m_pAccChartView( pAccChartView )
,m_pWindow( pWindow )
- ,m_aMapMode( MAP_100TH_MM )
+ ,m_aMapMode( MapUnit::Map100thMM )
{
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index c256754ddb13..7ccda8441db3 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -409,7 +409,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
if( (xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize) )
{
Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height);
- Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MAP_PIXEL, MAP_100TH_MM ));
+ Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MapUnit::MapPixel, MapUnit::Map100thMM ));
aSize = awt::Size( aNewSize.Width(), aNewSize.Height() );
if( aSize.Width == 0 && aSize.Height == 0 )
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 79b214efd9a7..b6c7df5ae441 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -244,29 +244,29 @@ void SeriesHeader::SetPos( const Point & rPos )
// chart type symbol
Size aSize( nSymbolHeight, nSymbolHeight );
- aSize = m_pDevice->LogicToPixel( aSize, MAP_APPFONT );
+ aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spSymbol->set_width_request(aSize.Width());
m_spSymbol->set_height_request(aSize.Height());
// series name edit field
aSize.setWidth(nSymbolDistance);
- aSize = m_pDevice->LogicToPixel( aSize, MAP_APPFONT );
+ aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spSeriesName->set_margin_left(aSize.Width() + 2);
aSize.setWidth( m_nWidth - nSymbolHeight - nSymbolDistance );
sal_Int32 nHeight = 12;
aSize.setHeight( nHeight );
- aSize = m_pDevice->LogicToPixel( aSize, MAP_APPFONT );
+ aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spSeriesName->set_width_request(aSize.Width());
m_spSeriesName->set_height_request(aSize.Height());
// color bar
aSize.setWidth(1);
- aSize = m_pDevice->LogicToPixel( aSize, MAP_APPFONT );
+ aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spColorBar->set_margin_left(aSize.Width() + 2);
nHeight = 3;
aSize.setWidth( m_nWidth - 1 );
aSize.setHeight( nHeight );
- aSize = m_pDevice->LogicToPixel( aSize, MAP_APPFONT );
+ aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spColorBar->set_width_request(aSize.Width());
m_spColorBar->set_height_request(aSize.Height());
}
@@ -279,7 +279,7 @@ void SeriesHeader::SetWidth( sal_Int32 nWidth )
void SeriesHeader::SetPixelWidth( sal_Int32 nWidth )
{
- SetWidth( m_pDevice->PixelToLogic( Size( nWidth, 0 ), MAP_APPFONT ).getWidth());
+ SetWidth( m_pDevice->PixelToLogic( Size( nWidth, 0 ), MapUnit::MapAppFont ).getWidth());
}
void SeriesHeader::SetChartType(
@@ -555,7 +555,7 @@ void DataBrowser::RenewTable()
OUString aDefaultSeriesName(SCH_RESSTR(STR_COLUMN_LABEL));
replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", OUString::number( 24 ) );
sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
- + GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MAP_APPFONT ).X();
+ + GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MapUnit::MapAppFont ).X();
sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
// nRowCount is a member of a base class
sal_Int32 nRowCountLocal = m_apDataBrowserModel->getMaxRowCount();
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 268cf58145c3..21f6e28d6726 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -68,8 +68,8 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram
);
this->SetRoadmapHelpId( HID_SCH_WIZARD_ROADMAP );
this->SetRoadmapInteractive( true );
- Size aAdditionalRoadmapSize( LogicToPixel( Size( 85, 0 ), MAP_APPFONT ) );
- Size aSize(LogicToPixel(Size(CHART_WIZARD_PAGEWIDTH, CHART_WIZARD_PAGEHEIGHT), MAP_APPFONT));
+ Size aAdditionalRoadmapSize( LogicToPixel( Size( 85, 0 ), MapUnit::MapAppFont ) );
+ Size aSize(LogicToPixel(Size(CHART_WIZARD_PAGEWIDTH, CHART_WIZARD_PAGEHEIGHT), MapUnit::MapAppFont));
aSize.Width() += aAdditionalRoadmapSize.Width();
this->SetSizePixel( aSize );
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 36af3ffcb78d..15971efc442e 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -52,7 +52,7 @@ DataEditor::DataEditor(vcl::Window* pParent,
m_xBrwData->set_hexpand(true);
m_xBrwData->set_vexpand(true);
m_xBrwData->set_expand(true);
- Size aSize(m_xBrwData->LogicToPixel(Size(232, 121), MAP_APPFONT));
+ Size aSize(m_xBrwData->LogicToPixel(Size(232, 121), MapUnit::MapAppFont));
m_xBrwData->set_width_request(aSize.Width());
m_xBrwData->set_height_request(aSize.Height());
m_xBrwData->Show();
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 777297cb45c0..99447ea1ff61 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -700,7 +700,7 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent
get(m_pFT_ChooseType, "FT_CAPTION_FOR_WIZARD");
get(m_pMainTypeList, "charttype");
get(m_pSubTypeList, "subtype");
- Size aSize(m_pSubTypeList->LogicToPixel(Size(150, 50), MAP_APPFONT));
+ Size aSize(m_pSubTypeList->LogicToPixel(Size(150, 50), MapUnit::MapAppFont));
m_pSubTypeList->set_width_request(aSize.Width());
m_pSubTypeList->set_height_request(aSize.Height());
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 2a6e4097cf9c..9ff91385bc97 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -143,7 +143,7 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
SdrObject* pObj = pSymbolList->GetObj(nStandardSymbol);
ScopedVclPtrInstance< VirtualDevice > pVDev;
- pVDev->SetMapMode(MapMode(MAP_100TH_MM));
+ pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
SdrModel* pModel = new SdrModel();
pModel->GetItemPool().FreezeIdRanges();
SdrPage* pPage = new SdrPage( *pModel, false );
@@ -164,7 +164,7 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
Graphic aGraph(aMeta);
Size aSize = pObj->GetSnapRect().GetSize();
aGraph.SetPrefSize(aSize);
- aGraph.SetPrefMapMode(MAP_100TH_MM);
+ aGraph.SetPrefMapMode(MapUnit::Map100thMM);
pView->UnmarkAll();
pObj=pPage->RemoveObject(0);
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index e55196f86521..b1daf046eaee 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -229,7 +229,7 @@ void SAL_CALL ChartController::setPosSize(
if(xWindow.is() && m_pChartWindow)
{
- Size aLogicSize = m_pChartWindow->PixelToLogic( Size( Width, Height ), MapMode( MAP_100TH_MM ) );
+ Size aLogicSize = m_pChartWindow->PixelToLogic( Size( Width, Height ), MapMode( MapUnit::Map100thMM ) );
//todo: for standalone chart: detect whether we are standalone
//change map mode to fit new size
@@ -239,7 +239,7 @@ void SAL_CALL ChartController::setPosSize(
sal_Int32 nScaleYNumerator = aLogicSize.Height();
sal_Int32 nScaleYDenominator = aModelPageSize.Height;
MapMode aNewMapMode(
- MAP_100TH_MM,
+ MapUnit::Map100thMM,
Point(0,0),
Fraction(nScaleXNumerator, nScaleXDenominator),
Fraction(nScaleYNumerator, nScaleYDenominator) );
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index ed053f67b8d4..21cc0cefc2ab 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -58,7 +58,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi
{
set_id("chart_window");
this->SetHelpId( HID_SCH_WIN_DOCUMENT );
- this->SetMapMode( MapMode(MAP_100TH_MM) );
+ this->SetMapMode( MapMode(MapUnit::Map100thMM) );
adjustHighContrastMode();
// chart does not depend on exact pixel painting => enable antialiased drawing
SetAntialiasing( AntialiasingFlags::EnableB2dDraw | GetAntialiasing() );
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 6d1453b581fa..e03a43c7e094 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -318,7 +318,7 @@ uno::Reference< awt::XWindow > SAL_CALL ElementSelectorToolbarController::create
{
m_apSelectorListBox.reset( VclPtr<SelectorListBox>::Create( pParent, WB_DROPDOWN|WB_AUTOHSCROLL|WB_BORDER ) );
::Size aLogicalSize( 95, 160 );
- ::Size aPixelSize = m_apSelectorListBox->LogicToPixel( aLogicalSize, MAP_APPFONT );
+ ::Size aPixelSize = m_apSelectorListBox->LogicToPixel( aLogicalSize, MapUnit::MapAppFont );
m_apSelectorListBox->SetSizePixel( aPixelSize );
m_apSelectorListBox->SetDropDownLineCount( 5 );
}
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 8cc18b90dca6..8fefe156675e 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -174,7 +174,7 @@ void ChartLinePanel::Initialize()
SvxColorToolBoxControl* pToolBoxColor = getColorToolBoxControl(mpTBColor.get());
pToolBoxColor->setColorSelectFunction(maLineColorWrapper);
- setMapUnit(MAP_100TH_MM);
+ setMapUnit(MapUnit::Map100thMM);
updateData();
}
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index 7ec565c406f0..4ec9554a3c96 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -203,7 +203,7 @@ SfxItemPool* ChartItemPool::Clone() const
MapUnit ChartItemPool::GetMetric(sal_uInt16 /* nWhich */) const
{
- return MAP_100TH_MM;
+ return MapUnit::Map100thMM;
}
SfxItemPool* ChartItemPool::CreateChartItemPool()
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 3c27e6d1bb34..5f81d854f1ee 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -3347,7 +3347,7 @@ void ChartView::createShapes3D()
if( pWindow->GetSizePixel().Width() == 0 || pWindow->GetSizePixel().Height() == 0 )
{
awt::Size aPageSize = mrChartModel.getVisualAreaSize( embed::Aspects::MSOLE_CONTENT );
- Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit(MAP_100TH_MM) );
+ Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit(MapUnit::Map100thMM) );
pWindow->SetSizePixel(aSize);
}
pWindow->Show();
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 4dda034eb916..826e02230f36 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -58,12 +58,12 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
{
m_pChartItemPool = ChartItemPool::CreateChartItemPool();
- SetScaleUnit(MAP_100TH_MM);
+ SetScaleUnit(MapUnit::Map100thMM);
SetScaleFraction(Fraction(1, 1));
SetDefaultFontHeight(423); // 12pt
SfxItemPool* pMasterPool = &GetItemPool();
- pMasterPool->SetDefaultMetric(MAP_100TH_MM);
+ pMasterPool->SetDefaultMetric(MapUnit::Map100thMM);
pMasterPool->SetPoolDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) );
pMasterPool->SetPoolDefaultItem(makeSvx3DPercentDiagonalItem (5));
@@ -113,7 +113,7 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
m_pRefDevice.disposeAndClear();
m_pRefDevice = VclPtr<VirtualDevice>::Create(*pDefaultDevice);
MapMode aMapMode = m_pRefDevice->GetMapMode();
- aMapMode.SetMapUnit(MAP_100TH_MM);
+ aMapMode.SetMapUnit(MapUnit::Map100thMM);
m_pRefDevice->SetMapMode(aMapMode);
SetRefDevice(m_pRefDevice.get());
rOutliner.SetRefDevice(m_pRefDevice.get());
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 6d7b165da0ca..0491553a42ff 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -816,7 +816,7 @@ namespace cppcanvas
rFontSizeLog = ::Size(0, 16);
// convert to target MapUnit if not pixels
- rFontSizeLog = OutputDevice::LogicToLogic(rFontSizeLog, MAP_PIXEL, rParms.mrVDev.GetMapMode());
+ rFontSizeLog = OutputDevice::LogicToLogic(rFontSizeLog, MapUnit::MapPixel, rParms.mrVDev.GetMapMode());
}
const sal_Int32 nFontWidthLog = rFontSizeLog.Width();
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 65281aadce3d..c3f14d1c6adf 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -761,20 +761,20 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const
get(m_pSaveButton, "save");
get(m_pResetButton, "reset");
get(m_pEntriesBox, "shortcuts");
- Size aSize(LogicToPixel(Size(174, 100), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(174, 100), MapUnit::MapAppFont));
m_pEntriesBox->set_width_request(aSize.Width());
m_pEntriesBox->set_height_request(aSize.Height());
m_pEntriesBox->SetAccelConfigPage(this);
get(m_pGroupLBox, "category");
- aSize = LogicToPixel(Size(78 , 91), MAP_APPFONT);
+ aSize = LogicToPixel(Size(78 , 91), MapUnit::MapAppFont);
m_pGroupLBox->set_width_request(aSize.Width());
m_pGroupLBox->set_height_request(aSize.Height());
get(m_pFunctionBox, "function");
- aSize = LogicToPixel(Size(88, 91), MAP_APPFONT);
+ aSize = LogicToPixel(Size(88, 91), MapUnit::MapAppFont);
m_pFunctionBox->set_width_request(aSize.Width());
m_pFunctionBox->set_height_request(aSize.Height());
get(m_pKeyBox, "keys");
- aSize = LogicToPixel(Size(80, 91), MAP_APPFONT);
+ aSize = LogicToPixel(Size(80, 91), MapUnit::MapAppFont);
m_pKeyBox->set_width_request(aSize.Width());
m_pKeyBox->set_height_request(aSize.Height());
@@ -810,7 +810,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const
nMaxWidth = nTmp;
}
// recalc second tab
- long nNewTab = PixelToLogic( Size( nMaxWidth, 0 ), MAP_APPFONT ).Width();
+ long nNewTab = PixelToLogic( Size( nMaxWidth, 0 ), MapUnit::MapAppFont ).Width();
nNewTab = nNewTab + 5; // additional space
m_pEntriesBox->SetTab( 1, nNewTab );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index bfda9e3f3551..dcbe98f2acab 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1763,7 +1763,7 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
get(m_pDescriptionField, "desc");
m_pDescriptionField->set_height_request(m_pDescriptionField->GetTextHeight()*4);
get(m_pEntries, "entries");
- Size aSize(LogicToPixel(Size(108, 115), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(108, 115), MapUnit::MapAppFont));
m_pEntries->set_height_request(aSize.Height());
m_pEntries->set_width_request(aSize.Width());
@@ -5015,7 +5015,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
get(pBtnImport, "importButton");
get(pBtnDelete, "deleteButton");
- aTbSize = pTbSymbol->LogicToPixel(Size(160, 80), MapMode(MAP_APPFONT));
+ aTbSize = pTbSymbol->LogicToPixel(Size(160, 80), MapMode(MapUnit::MapAppFont));
pTbSymbol->set_width_request(aTbSize.Width());
pTbSymbol->set_height_request(aTbSize.Height());
pTbSymbol->SetStyle(pTbSymbol->GetStyle() | WB_SCROLL | WB_LINESPACING);
@@ -5630,7 +5630,7 @@ SvxIconChangeDialog::SvxIconChangeDialog(
get(pFImageInfo, "infoImage");
get(pLineEditDescription, "addrTextview");
- Size aSize(LogicToPixel(Size(140, 83), MapMode(MAP_APPFONT)));
+ Size aSize(LogicToPixel(Size(140, 83), MapMode(MapUnit::MapAppFont)));
pLineEditDescription->set_width_request(aSize.Width());
pLineEditDescription->set_height_request(aSize.Height());
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx
index 082194fdc66d..9e422eb9ba84 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -65,7 +65,7 @@ SvxEventConfigPage::SvxEventConfigPage(vcl::Window *pParent, const SfxItemSet& r
mpImpl->sStrEvent = get<FixedText>("eventft")->GetText();
mpImpl->sAssignedMacro = get<FixedText>("actionft")->GetText();
get(mpImpl->pEventLB, "events");
- Size aSize(LogicToPixel(Size(205, 229), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(205, 229), MapUnit::MapAppFont));
mpImpl->pEventLB->set_width_request(aSize.Width());
mpImpl->pEventLB->set_height_request(aSize.Height());
get(mpImpl->pAssignPB, "macro");
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 3826bf53713f..7ff2f551da7a 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -110,7 +110,7 @@ IMPL_LINK( MacroEventListBox, HeaderEndDrag_Impl, HeaderBar*, pBar, void )
long _nWidth = maHeaderBar->GetItemSize( i );
aSz.Width() = _nWidth + nTmpSz;
nTmpSz += _nWidth;
- maListBox->SetTab( i, PixelToLogic( aSz, MapMode( MAP_APPFONT ) ).Width() );
+ maListBox->SetTab( i, PixelToLogic( aSz, MapMode( MapUnit::MapAppFont ) ).Width() );
}
}
}
@@ -166,7 +166,7 @@ VCL_BUILDER_DECL_FACTORY(MacroEventListBox)
Size MacroEventListBox::GetOptimalSize() const
{
- return LogicToPixel(Size(192, 72), MapMode(MAP_APPFONT ));
+ return LogicToPixel(Size(192, 72), MapMode(MapUnit::MapAppFont ));
}
void MacroEventListBox::Resize()
@@ -727,9 +727,9 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla
rListBox.SetSelectionMode( SelectionMode::Single );
rListBox.SetTabs( &nTabs[0] );
Size aSize( nTabs[ 2 ], 0 );
- rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+ rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() );
aSize.Width() = 1764; // don't know what, so 42^2 is best to use...
- rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+ rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() );
rListBox.SetSpaceBetweenEntries( 0 );
mpImpl->pEventLB->Show();
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 56bbd308123f..a08ec7546344 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -201,7 +201,7 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
get(m_pExplainLink, "explainlink");
get(m_pNotInDictFT, "notindictft");
get(m_pSentenceED, "sentence");
- Size aEdSize(LogicToPixel(Size(197, 48), MAP_APPFONT));
+ Size aEdSize(LogicToPixel(Size(197, 48), MapUnit::MapAppFont));
m_pSentenceED->set_width_request(aEdSize.Width());
m_pSentenceED->set_height_request(aEdSize.Height());
get(m_pSuggestionFT, "suggestionsft");
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index c1c7ac64e61b..5591310489c7 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -276,7 +276,7 @@ VCL_BUILDER_DECL_FACTORY(ColorFieldControl)
Size ColorFieldControl::GetOptimalSize() const
{
- return LogicToPixel(Size(158, 158), MAP_APPFONT);
+ return LogicToPixel(Size(158, 158), MapUnit::MapAppFont);
}
void ColorFieldControl::UpdateBitmap()
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 2484a03dddd8..f90e719022aa 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -733,7 +733,7 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( vcl::Window* pWindow, const
{
get(m_pCbbFileType, "filetype");
get(m_pLbxFound, "files");
- Size aSize(LogicToPixel(Size(172, 156), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(172, 156), MapUnit::MapAppFont));
m_pLbxFound->set_width_request(aSize.Width());
m_pLbxFound->set_height_request(aSize.Height());
m_pLbxFound->EnableMultiSelection(true);
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index dc680de5bd48..43217dc39d96 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -53,7 +53,7 @@ VCL_BUILDER_DECL_FACTORY(GraphicPreviewWindow)
Size GraphicPreviewWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(81, 73), MAP_APPFONT);
+ return LogicToPixel(Size(81, 73), MapUnit::MapAppFont);
}
@@ -532,7 +532,7 @@ void EmbossControl::MouseButtonDown( const MouseEvent& rEvt )
Size EmbossControl::GetOptimalSize() const
{
- return LogicToPixel(Size(77, 60), MAP_APPFONT);
+ return LogicToPixel(Size(77, 60), MapUnit::MapAppFont);
}
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 986e608a6598..f2087cc4840e 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -95,7 +95,7 @@ VCL_BUILDER_DECL_FACTORY(SvxHlmarkTreeLBox)
Size SvxHlmarkTreeLBox::GetOptimalSize() const
{
- return LogicToPixel(Size(103, 162), MAP_APPFONT);
+ return LogicToPixel(Size(103, 162), MapUnit::MapAppFont);
}
void SvxHlmarkTreeLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 4ee16b38bf1c..7df24bd982d3 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -99,7 +99,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
aUpdateIdle("cui SvBaseLinksDlg UpdateIdle")
{
get(m_pTbLinks, "TB_LINKS");
- Size aSize(LogicToPixel(Size(257, 87), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(257, 87), MapUnit::MapAppFont));
m_pTbLinks->set_width_request(aSize.Width());
m_pTbLinks->set_height_request(aSize.Height());
get(m_pFtFullFileName, "FULL_FILE_NAME");
@@ -115,11 +115,11 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
m_pTbLinks->SetSelectionMode( SelectionMode::Multiple );
m_pTbLinks->SetTabs( &nTabs[0] );
FixedText *pFtFiles = get<FixedText>("FILES");
- pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MAP_APPFONT).Width());
+ pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MapUnit::MapAppFont).Width());
FixedText *pFtLinks = get<FixedText>("LINKS");
- pFtLinks->set_width_request(LogicToPixel(Size(nTabs[3] - nTabs[2] - 2, 0), MAP_APPFONT).Width());
+ pFtLinks->set_width_request(LogicToPixel(Size(nTabs[3] - nTabs[2] - 2, 0), MapUnit::MapAppFont).Width());
FixedText *pFtTypes = get<FixedText>("TYPE");
- pFtTypes->set_width_request(LogicToPixel(Size(nTabs[4] - nTabs[3] - 2, 0), MAP_APPFONT).Width());
+ pFtTypes->set_width_request(LogicToPixel(Size(nTabs[4] - nTabs[3] - 2, 0), MapUnit::MapAppFont).Width());
m_pTbLinks->Resize(); // OS: hack for correct selection
// UpdateTimer for DDE-/Grf-links, which are waited for
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index afe5584e8b15..f20db7a4583c 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -179,7 +179,7 @@ SvxMultiPathDialog::SvxMultiPathDialog(vcl::Window* pParent)
get(m_pDelBtn, "delete");
SvSimpleTableContainer* pRadioLBContainer = get<SvSimpleTableContainer>("paths");
- Size aSize(LogicToPixel(Size(195, 77), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(195, 77), MapUnit::MapAppFont));
pRadioLBContainer->set_width_request(aSize.Width());
pRadioLBContainer->set_height_request(aSize.Height());
m_pRadioLB = VclPtr<svx::SvxRadioButtonListBox>::Create(*pRadioLBContainer, 0);
@@ -207,7 +207,7 @@ SvxPathSelectDialog::SvxPathSelectDialog(vcl::Window* pParent)
get(m_pAddBtn, "add");
get(m_pDelBtn, "delete");
get(m_pPathLB, "paths");
- Size aSize(LogicToPixel(Size(189, 80), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(189, 80), MapUnit::MapAppFont));
m_pPathLB->set_width_request(aSize.Width());
m_pPathLB->set_height_request(aSize.Height());
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 18ad0b14abac..f853ce3e9b50 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -31,7 +31,7 @@ CertPathDialog::CertPathDialog(vcl::Window* pParent)
get(m_pOKBtn, "ok");
get(m_pAddBtn, "add");
get(m_pCertPathListContainer, "paths");
- Size aSize(LogicToPixel(Size(210, 60), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(210, 60), MapUnit::MapAppFont));
m_pCertPathListContainer->set_width_request(aSize.Width());
m_pCertPathListContainer->set_height_request(aSize.Height());
m_pCertPathList =
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 9362469caf3a..bf34078cac9a 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -127,11 +127,11 @@ namespace offapp
{
EditBrowseBox::Init();
- Size aColWidth = LogicToPixel(Size(160, 0), MAP_APPFONT);
+ Size aColWidth = LogicToPixel(Size(160, 0), MapUnit::MapAppFont);
InsertDataColumn(1, OUString(CUI_RES(RID_SVXSTR_DRIVER_NAME)), aColWidth.Width());
- aColWidth = LogicToPixel(Size(30, 0), MAP_APPFONT);
+ aColWidth = LogicToPixel(Size(30, 0), MapUnit::MapAppFont);
InsertDataColumn(2, OUString(CUI_RES(RID_SVXSTR_POOLED_FLAG)), aColWidth.Width());
- aColWidth = LogicToPixel(Size(60, 0), MAP_APPFONT);
+ aColWidth = LogicToPixel(Size(60, 0), MapUnit::MapAppFont);
InsertDataColumn(3, OUString(CUI_RES(RID_SVXSTR_POOL_TIMEOUT)), aColWidth.Width());
// Attention: the resource of the string is local to the resource of the enclosing dialog!
}
@@ -303,7 +303,7 @@ namespace offapp
get(m_pTimeout, "timeout");
Size aControlSize(248, 100);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
m_pDriverList->set_width_request(aControlSize.Width());
m_pDriverList->set_height_request(aControlSize.Height());
m_pDriverList->Init();
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index be470fc95c0b..c34f7b60919b 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -110,7 +110,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons
{
get(m_pPathCtrl, "pathctrl");
Size aControlSize(248, 147);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
m_pPathCtrl->set_width_request(aControlSize.Width());
m_pPathCtrl->set_height_request(aControlSize.Height());
@@ -134,11 +134,11 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons
Size aSz;
aSz.Width() = TAB_WIDTH1;
rBar.InsertItem( ITEMID_TYPE, m_aTypeText,
- LogicToPixel( aSz, MapMode( MAP_APPFONT ) ).Width(),
+ LogicToPixel( aSz, MapMode( MapUnit::MapAppFont ) ).Width(),
HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW );
aSz.Width() = TAB_WIDTH2;
rBar.InsertItem( ITEMID_PATH, m_aPathText,
- LogicToPixel( aSz, MapMode( MAP_APPFONT ) ).Width(),
+ LogicToPixel( aSz, MapMode( MapUnit::MapAppFont ) ).Width(),
HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER );
static long aTabs[] = {3, 0, TAB_WIDTH1, TAB_WIDTH1 + TAB_WIDTH2 };
@@ -364,7 +364,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar, void
long _nWidth = pBar->GetItemSize(i);
aSz.Width() = _nWidth + nTmpSz;
nTmpSz += _nWidth;
- m_pPathBox->SetTab( i, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() );
+ m_pPathBox->SetTab( i, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
}
}
}
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 9abe7d4db52b..7264c0d194c9 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -59,7 +59,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent,
SvSimpleTableContainer *pCheckLBContainer = get<SvSimpleTableContainer>("checklb");
Size aControlSize(248, 75);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
pCheckLBContainer->set_width_request(aControlSize.Width());
pCheckLBContainer->set_height_request(aControlSize.Height());
@@ -421,7 +421,7 @@ void SvxFontSubstCheckListBox::setColSizes()
long nW1 = rBar.GetTextWidth(rBar.GetItemText(3));
long nW2 = rBar.GetTextWidth(rBar.GetItemText(4));
long nMax = std::max( nW1, nW2 ) + 6; // width of the longest header + a little offset
- long nMin = rBar.LogicToPixel(Size(10, 0), MAP_APPFONT).Width();
+ long nMin = rBar.LogicToPixel(Size(10, 0), MapUnit::MapAppFont).Width();
nMax = std::max( nMax, nMin );
const long nDoubleMax = 2*nMax;
const long nRest = GetSizePixel().Width() - nDoubleMax;
@@ -429,7 +429,7 @@ void SvxFontSubstCheckListBox::setColSizes()
aStaticTabs[2] = nMax;
aStaticTabs[3] = nDoubleMax;
aStaticTabs[4] = nDoubleMax + nRest/2;
- SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL);
+ SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
}
void SvxFontSubstCheckListBox::Resize()
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index a6c06a9c4ba4..bacba9e98b78 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -137,7 +137,7 @@ void CuiCustomMultilineEdit::KeyInput( const KeyEvent& rKeyEvent )
Size CuiCustomMultilineEdit::GetOptimalSize() const
{
- return LogicToPixel(Size(150, GetTextHeight()), MAP_APPFONT);
+ return LogicToPixel(Size(150, GetTextHeight()), MapUnit::MapAppFont);
}
CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxItemSet& rItemSet*/ ) :
@@ -150,7 +150,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI
m_vectorOfModified(),
m_pPrefBox( VclPtr<SvSimpleTable>::Create(*m_pPrefCtrl, WB_SCROLL | WB_HSCROLL | WB_VSCROLL ) )
{
- Size aControlSize(LogicToPixel(Size(385, 230), MAP_APPFONT));
+ Size aControlSize(LogicToPixel(Size(385, 230), MapUnit::MapAppFont));
m_pPrefCtrl->set_width_request(aControlSize.Width());
m_pPrefCtrl->set_height_request(aControlSize.Height());
@@ -179,7 +179,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI
m_options.searchFlag |= (util::SearchFlags::REG_NOT_BEGINOFLINE |
util::SearchFlags::REG_NOT_ENDOFLINE);
- m_pPrefBox->SetTabs(aTabs, MAP_PIXEL);
+ m_pPrefBox->SetTabs(aTabs, MapUnit::MapPixel);
m_pPrefBox->SetAlternatingRowColors( true );
}
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index d3c9fc1002c8..6e791c8911ca 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -158,7 +158,7 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet
get( aShadingRB, "shading" );
Size aControlSize(248, 55);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
m_pCheckLBContainer->set_width_request(aControlSize.Width());
m_pCheckLBContainer->set_height_request(aControlSize.Height());
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 9ddc4fff0cf8..c8bb0cb241eb 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -108,7 +108,7 @@ public:
if (rBar.GetItemCount() < 4)
return;
long nCheckWidth = std::max(GetControlColumnWidth() + 12,
- rBar.LogicToPixel(Size(15, 0), MAP_APPFONT).Width());
+ rBar.LogicToPixel(Size(15, 0), MapUnit::MapAppFont).Width());
long nVersionWidth = 12 +
std::max(rBar.GetTextWidth(rBar.GetItemText(3)),
GetTextWidth("0.0.0_00-icedtea"));
@@ -123,7 +123,7 @@ public:
aStaticTabs[2] = nCheckWidth;
aStaticTabs[3] = aStaticTabs[2] + nVendorWidth;
aStaticTabs[4] = aStaticTabs[3] + nVersionWidth;
- SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL);
+ SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
}
virtual void Resize() override
{
@@ -163,7 +163,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet&
SvSimpleTableContainer *pJavaListContainer = get<SvSimpleTableContainer>("javas");
Size aControlSize(177, 60);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
pJavaListContainer->set_width_request(aControlSize.Width());
pJavaListContainer->set_height_request(aControlSize.Height());
m_pJavaList = VclPtr<SvxJavaListBox>::Create(*pJavaListContainer, m_sAccessibilityText);
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index fc9f3c612240..6e3c09993cff 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1816,7 +1816,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD
get(m_pPrioDownPB, "down");
get(m_pPrioUpPB, "up");
get(m_pModulesCLB, "lingudicts");
- Size aListSize(m_pModulesCLB->LogicToPixel(Size(166, 120), MAP_APPFONT));
+ Size aListSize(m_pModulesCLB->LogicToPixel(Size(166, 120), MapUnit::MapAppFont));
m_pModulesCLB->set_height_request(aListSize.Height());
m_pModulesCLB->set_width_request(aListSize.Width());
get(m_pLanguageLB, "language");
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 88d7fd5b6eb8..f3511513f88b 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -204,7 +204,7 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pPathBtn->SetClickHdl( LINK( this, SvxPathTabPage, PathHdl_Impl ) );
Size aControlSize(236 , 147);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
m_pPathCtrl->set_width_request(aControlSize.Width());
m_pPathCtrl->set_height_request(aControlSize.Height());
WinBits nBits = WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP;
@@ -227,7 +227,7 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
long aTabs[] = {3, 0, 0, 0};
aTabs[2] = nWidth1 + 12;
aTabs[3] = aTabs[2] + nWidth2 + 12;
- pPathBox->SetTabs(aTabs, MAP_PIXEL);
+ pPathBox->SetTabs(aTabs, MapUnit::MapPixel);
pPathBox->SetDoubleClickHdl( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) );
pPathBox->SetSelectHdl( LINK( this, SvxPathTabPage, PathSelect_Impl ) );
@@ -342,7 +342,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
long aTabs[] = {3, 0, 0, 0};
aTabs[2] = nWidth1 + 12;
aTabs[3] = aTabs[2] + nWidth2 + 12;
- pPathBox->SetTabs(aTabs, MAP_PIXEL);
+ pPathBox->SetTabs(aTabs, MapUnit::MapPixel);
#if 0
String aUserData = GetUserData();
@@ -716,7 +716,7 @@ IMPL_LINK( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar, void )
long _nWidth = pBar->GetItemSize(i);
aSz.Width() = _nWidth + nTmpSz;
nTmpSz += _nWidth;
- pPathBox->SetTab( i, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() );
+ pPathBox->SetTab( i, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
}
}
}
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 716bb2a253e1..3ecfdf624a84 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -498,7 +498,7 @@ void OfaTreeOptionsDialog::InitWidgets()
get(pBackPB, "revert");
get(pTreeLB, "pages");
get(pTabBox, "box");
- Size aSize(pTabBox->LogicToPixel(Size(278, 259), MAP_APPFONT));
+ Size aSize(pTabBox->LogicToPixel(Size(278, 259), MapUnit::MapAppFont));
pTabBox->set_width_request(aSize.Width());
pTabBox->set_height_request(aSize.Height() - get_action_area()->get_preferred_size().Height());
pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25);
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 21ed6daa0e88..d9473ea8f7ab 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -96,7 +96,7 @@ void PasswordTable::setColWidths()
GetSizePixel().Width() - nUserNameWidth);
long aStaticTabs[]= { 2, 0, 0 };
aStaticTabs[2] = nWebSiteWidth;
- SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL);
+ SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
}
// class WebConnectionInfoDialog -----------------------------------------
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 64ab34f826f5..67efba2e1b2c 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -437,7 +437,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( vcl::Window* pParent,
SvSimpleTableContainer* pCheckLBContainer(get<SvSimpleTableContainer>("list"));
Size aControlSize(248 , 149);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
pCheckLBContainer->set_width_request(aControlSize.Width());
pCheckLBContainer->set_height_request(aControlSize.Height());
m_pCheckLB = VclPtr<OfaACorrCheckListBox>::Create(*pCheckLBContainer);
@@ -1773,7 +1773,7 @@ void AutoCorrEdit::Resize()
Edit::Resize();
if (!m_xReplaceTLB)
return;
- m_xReplaceTLB->SetTab(m_nCol, GetPosPixel().X(), MAP_PIXEL);
+ m_xReplaceTLB->SetTab(m_nCol, GetPosPixel().X(), MapUnit::MapPixel);
}
enum OfaQuoteOptions
@@ -1823,7 +1823,7 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
SvSimpleTableContainer *pListContainer = get<SvSimpleTableContainer>("list");
Size aControlSize(252 , 85);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
pListContainer->set_width_request(aControlSize.Width());
pListContainer->set_height_request(aControlSize.Height());
m_pSwCheckLB = VclPtr<OfaACorrCheckListBox>::Create(*pListContainer);
@@ -2195,7 +2195,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(vcl::Window* pParent,
get(m_pNFMaxEntries, "maxentries");
get(m_pLBEntries, "entries");
m_pLBEntries->SetPage(this);
- aSize = LogicToPixel(Size(121, 158), MAP_APPFONT);
+ aSize = LogicToPixel(Size(121, 158), MapUnit::MapAppFont);
m_pLBEntries->set_width_request(aSize.Width());
m_pLBEntries->set_height_request(aSize.Height());
get(m_pPBEntries, "delete");
@@ -2477,7 +2477,7 @@ OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( vcl::Window* pParent,
// some options for the list box:
m_pSmartTagTypesLB->SetStyle( m_pSmartTagTypesLB->GetStyle() | WB_HSCROLL | WB_HIDESELECTION );
m_pSmartTagTypesLB->SetHighlightRange();
- Size aControlSize(LogicToPixel(Size(172, 154), MAP_APPFONT));
+ Size aControlSize(LogicToPixel(Size(172, 154), MapUnit::MapAppFont));
m_pSmartTagTypesLB->set_width_request(aControlSize.Width());
m_pSmartTagTypesLB->set_height_request(aControlSize.Height());
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index f94fb4aba33c..2a2a32065d9a 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -251,7 +251,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
}
bIsDontCare = !pBoxInfo->IsValid( SvxBoxInfoItemValidFlags::DISABLE );
}
- if(!mbUseMarginItem && eFUnit == FUNIT_MM && MAP_TWIP == rCoreAttrs.GetPool()->GetMetric( GetWhich( SID_ATTR_BORDER_INNER ) ))
+ if(!mbUseMarginItem && eFUnit == FUNIT_MM && MapUnit::MapTwip == rCoreAttrs.GetPool()->GetMetric( GetWhich( SID_ATTR_BORDER_INNER ) ))
{
//#i91548# changing the number of decimal digits changes the minimum values, too
lcl_SetDecimalDigitsTo1(*m_pLeftMF);
@@ -540,7 +540,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
// Determine the width first as some styles can be missing depending on it
sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
sal_Int64( nWidth ), m_pLineWidthMF->GetDecimalDigits( ),
- MAP_TWIP,m_pLineWidthMF->GetUnit() ));
+ MapUnit::MapTwip, m_pLineWidthMF->GetUnit() ));
m_pLineWidthMF->SetValue( nWidthPt );
m_pLbLineStyle->SetWidth( nWidth );
@@ -896,7 +896,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, Edit&, void)
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
m_pLineWidthMF->GetValue( ),
m_pLineWidthMF->GetDecimalDigits( ),
- m_pLineWidthMF->GetUnit(), MAP_TWIP ));
+ m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
m_pLbLineStyle->SetWidth( nVal );
m_pFrameSel->SetStyleToSelection( nVal,
@@ -911,7 +911,7 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox&, rLb, void )
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
m_pLineWidthMF->GetValue( ),
m_pLineWidthMF->GetDecimalDigits( ),
- m_pLineWidthMF->GetUnit(), MAP_TWIP ));
+ m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
m_pFrameSel->SetStyleToSelection ( nVal,
SvxBorderStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
}
@@ -1111,7 +1111,7 @@ void SvxBorderTabPage::FillLineListBox_Impl()
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
m_pLineWidthMF->GetValue( ),
m_pLineWidthMF->GetDecimalDigits( ),
- m_pLineWidthMF->GetUnit(), MAP_TWIP ));
+ m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
m_pLbLineStyle->SetWidth( nVal );
}
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 444fd626376e..1d270844ce60 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -780,9 +780,9 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
MapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
const SvxFontHeightItem& rItem = static_cast<const SvxFontHeightItem&>(rSet.Get( nWhich ));
- if( rItem.GetProp() != 100 || MAP_RELATIVE != rItem.GetPropUnit() )
+ if( rItem.GetProp() != 100 || MapUnit::MapRelative != rItem.GetPropUnit() )
{
- bool bPtRel = MAP_POINT == rItem.GetPropUnit();
+ bool bPtRel = MapUnit::MapPoint == rItem.GetPropUnit();
pSizeBox->SetPtRelative( bPtRel );
pSizeBox->SetValue( bPtRel ? ((short)rItem.GetProp()) * 10 : rItem.GetProp() );
}
@@ -1079,7 +1079,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
}
if ( bChanged || !pOldHeight ||
- bRel != ( MAP_RELATIVE != pOldHeight->GetPropUnit() || 100 != pOldHeight->GetProp() ) )
+ bRel != ( MapUnit::MapRelative != pOldHeight->GetPropUnit() || 100 != pOldHeight->GetProp() ) )
{
MapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
if ( pSizeBox->IsRelative() )
@@ -1090,7 +1090,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
SvxFontHeightItem aHeight( 240, 100, nWhich );
if ( pSizeBox->IsPtRelative() )
- aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)( nSize / 10 ), MAP_POINT, eUnit );
+ aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)( nSize / 10 ), MapUnit::MapPoint, eUnit );
else
aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)nSize );
rSet.Put( aHeight );
@@ -2826,7 +2826,7 @@ IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, Button*, pBox, void )
IMPL_LINK_NOARG(SvxCharPositionPage, KerningModifyHdl_Impl, Edit&, void)
{
long nVal = static_cast<long>(m_pKerningMF->GetValue());
- nVal = LogicToLogic( nVal, MAP_POINT, MAP_TWIP );
+ nVal = LogicToLogic( nVal, MapUnit::MapPoint, MapUnit::MapTwip );
long nKern = (short)m_pKerningMF->Denormalize( nVal );
SvxFont& rFont = GetPreviewFont();
@@ -3005,12 +3005,12 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
const SvxKerningItem& rItem = static_cast<const SvxKerningItem&>(rSet->Get( nWhich ));
MapUnit eUnit = rSet->GetPool()->GetMetric( nWhich );
MapUnit eOrgUnit = (MapUnit)eUnit;
- MapUnit ePntUnit( MAP_POINT );
+ MapUnit ePntUnit( MapUnit::MapPoint );
long nBig = static_cast<long>(m_pKerningMF->Normalize( static_cast<long>(rItem.GetValue()) ));
long nKerning = LogicToLogic( nBig, eOrgUnit, ePntUnit );
// set Kerning at the Font, convert into Twips before
- long nKern = LogicToLogic( rItem.GetValue(), (MapUnit)eUnit, MAP_TWIP );
+ long nKern = LogicToLogic( rItem.GetValue(), (MapUnit)eUnit, MapUnit::MapTwip );
rFont.SetFixKerning( (short)nKern );
rCJKFont.SetFixKerning( (short)nKern );
rCTLFont.SetFixKerning( (short)nKern );
@@ -3179,7 +3179,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
MapUnit eUnit = rSet->GetPool()->GetMetric( nWhich );
long nTmp = static_cast<long>(m_pKerningMF->GetValue());
- long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
+ long nVal = LogicToLogic( nTmp, MapUnit::MapPoint, (MapUnit)eUnit );
nKerning = (short)m_pKerningMF->Denormalize( nVal );
SfxItemState eOldKernState = rOldSet.GetItemState( nWhich, false );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 5c09f6b10d39..0e0965819b27 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -217,7 +217,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
{
aPageSize = OutputDevice::LogicToLogic(
Size( CM_1_TO_TWIP, CM_1_TO_TWIP ),
- MapMode( MAP_TWIP ),
+ MapMode( MapUnit::MapTwip ),
MapMode( (MapUnit)rSet->GetPool()->GetMetric( nW ) ) );
}
@@ -749,9 +749,9 @@ IMPL_LINK( SvxGrfCropPage, CropModifyHdl, Edit&, rField, void )
Size SvxGrfCropPage::GetGrfOrigSize( const Graphic& rGrf ) const
{
- const MapMode aMapTwip( MAP_TWIP );
+ const MapMode aMapTwip( MapUnit::MapTwip );
Size aSize( rGrf.GetPrefSize() );
- if( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )
+ if( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
aSize = PixelToLogic( aSize, aMapTwip );
else
aSize = OutputDevice::LogicToLogic( aSize,
@@ -765,7 +765,7 @@ SvxCropExample::SvxCropExample( vcl::Window* pPar, WinBits nStyle )
: Window( pPar, nStyle)
, aFrameSize( OutputDevice::LogicToLogic(
Size( CM_1_TO_TWIP / 2, CM_1_TO_TWIP / 2 ),
- MapMode( MAP_TWIP ), GetMapMode() ))
+ MapMode( MapUnit::MapTwip ), GetMapMode() ))
, aTopLeft(0,0)
, aBottomRight(0,0)
{
@@ -774,7 +774,7 @@ SvxCropExample::SvxCropExample( vcl::Window* pPar, WinBits nStyle )
Size SvxCropExample::GetOptimalSize() const
{
- return LogicToPixel(Size(78, 78), MAP_APPFONT);
+ return LogicToPixel(Size(78, 78), MapUnit::MapAppFont);
}
VCL_BUILDER_DECL_FACTORY(SvxCropExample)
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index c325ff9d19a3..e255e9cec723 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -87,7 +87,7 @@ SvxCaptionTabPage::SvxCaptionTabPage(vcl::Window* pParent, const SfxItemSet& rIn
{
get(m_pCT_CAPTTYPE, "valueset");
- Size aSize(m_pCT_CAPTTYPE->LogicToPixel(Size(187, 38), MAP_APPFONT));
+ Size aSize(m_pCT_CAPTTYPE->LogicToPixel(Size(187, 38), MapUnit::MapAppFont));
m_pCT_CAPTTYPE->set_width_request(aSize.Width());
m_pCT_CAPTTYPE->set_height_request(aSize.Height());
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index b980bc1f38cb..8c7a4e0f0387 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -398,9 +398,9 @@ void SfxMacroTabPage::InitAndSetHandler()
rListBox.SetSelectionMode( SelectionMode::Single );
rListBox.SetTabs( &nTabs[0] );
Size aSize( nTabs[ 2 ], 0 );
- rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+ rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() );
aSize.Width() = 1764; // don't know what, so 42^2 is best to use...
- rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+ rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MapUnit::MapAppFont ) ).Width() );
rListBox.SetSpaceBetweenEntries( 0 );
mpImpl->pEventLB->Show();
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 6fabe1fee2a1..e023463ee431 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -86,7 +86,7 @@ SvxMeasurePage::SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs
rOutAttrs ( rInAttrs ),
aAttrSet ( *rInAttrs.GetPool() ),
pView( nullptr ),
- eUnit( MAP_100TH_MM ),
+ eUnit( MapUnit::Map100thMM ),
bPositionModified ( false )
{
get(m_pMtrFldLineDist, "MTR_LINE_DIST");
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 04cabab006d1..1d7ab68557e5 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -969,7 +969,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
{
Size aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic);
sal_Int16 eOrient = text::VertOrientation::LINE_CENTER;
- aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit);
+ aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)eCoreUnit);
SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH );
aFmt.SetGraphicBrush( &aBrush, &aSize, &eOrient );
}
@@ -2013,7 +2013,7 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, void )
}
if(bSucc)
{
- aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit);
+ aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)eCoreUnit);
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
@@ -2171,9 +2171,9 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, Edit&, rField, void)
long nWidthVal = static_cast<long>(m_pWidthMF->Denormalize(m_pWidthMF->GetValue(FUNIT_100TH_MM)));
long nHeightVal = static_cast<long>(m_pHeightMF->Denormalize(m_pHeightMF->GetValue(FUNIT_100TH_MM)));
nWidthVal = OutputDevice::LogicToLogic( nWidthVal ,
- MAP_100TH_MM, (MapUnit)eCoreUnit );
+ MapUnit::Map100thMM, (MapUnit)eCoreUnit );
nHeightVal = OutputDevice::LogicToLogic( nHeightVal,
- MAP_100TH_MM, (MapUnit)eCoreUnit);
+ MapUnit::Map100thMM, (MapUnit)eCoreUnit);
double fSizeRatio;
bool bRepaint = false;
@@ -2201,7 +2201,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, Edit&, rField, void)
{
aSize.Height() = aInitSize[i].Height() + (long)((double)nDelta / fSizeRatio);
m_pHeightMF->SetUserValue(m_pHeightMF->Normalize(
- OutputDevice::LogicToLogic( aSize.Height(), (MapUnit)eCoreUnit, MAP_100TH_MM )),
+ OutputDevice::LogicToLogic( aSize.Height(), (MapUnit)eCoreUnit, MapUnit::Map100thMM )),
FUNIT_100TH_MM);
}
}
@@ -2213,7 +2213,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, Edit&, rField, void)
{
aSize.Width() = aInitSize[i].Width() + (long)((double)nDelta * fSizeRatio);
m_pWidthMF->SetUserValue(m_pWidthMF->Normalize(
- OutputDevice::LogicToLogic( aSize.Width(), (MapUnit)eCoreUnit, MAP_100TH_MM )),
+ OutputDevice::LogicToLogic( aSize.Width(), (MapUnit)eCoreUnit, MapUnit::Map100thMM )),
FUNIT_100TH_MM);
}
}
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index b0940e4f85f7..a6097ea8aaa2 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -118,7 +118,7 @@ Size GetMinBorderSpace_Impl( const SvxShadowItem& rShadow, const SvxBoxItem& rBo
long ConvertLong_Impl( const long nIn, MapUnit eUnit )
{
- return OutputDevice::LogicToLogic( nIn, eUnit, MAP_TWIP );
+ return OutputDevice::LogicToLogic( nIn, eUnit, MapUnit::MapTwip );
}
bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )
@@ -290,7 +290,7 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr
}
MapMode aOldMode = mpDefPrinter->GetMapMode();
- mpDefPrinter->SetMapMode( MAP_TWIP );
+ mpDefPrinter->SetMapMode( MapUnit::MapTwip );
// set first- and last-values for the margins
Size aPaperSize = mpDefPrinter->GetPaperSize();
@@ -535,22 +535,22 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
m_pBspWin->SetSize( Size( ConvertLong_Impl( aPaperSize.Width(), eUnit ),
ConvertLong_Impl( aPaperSize.Height(), eUnit ) ) );
- aPaperSize = OutputDevice::LogicToLogic(aPaperSize, (MapUnit)eUnit, MAP_100TH_MM);
+ aPaperSize = OutputDevice::LogicToLogic(aPaperSize, (MapUnit)eUnit, MapUnit::Map100thMM);
if ( bLandscape )
Swap( aPaperSize );
// Actual Paper Format
- Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, true );
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MapUnit::Map100thMM, true );
if ( PAPER_USER != ePaper )
- aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM );
+ aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MapUnit::Map100thMM );
if ( bLandscape )
Swap( aPaperSize );
// write values into the edits
- SetMetricValue( *m_pPaperHeightEdit, aPaperSize.Height(), MAP_100TH_MM );
- SetMetricValue( *m_pPaperWidthEdit, aPaperSize.Width(), MAP_100TH_MM );
+ SetMetricValue( *m_pPaperHeightEdit, aPaperSize.Height(), MapUnit::Map100thMM );
+ SetMetricValue( *m_pPaperWidthEdit, aPaperSize.Width(), MapUnit::Map100thMM );
m_pPaperSizeBox->Clear();
m_pPaperSizeBox->FillPaperSizeEntries( ( ePaperStart == PAPER_A3 ) ? PaperSizeApp::Std : PaperSizeApp::Draw );
@@ -953,7 +953,7 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox&, rBox, void )
if ( ePaper != PAPER_USER )
{
- Size aSize( SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ) );
+ Size aSize( SvxPaperInfo::GetPaperSize( ePaper, MapUnit::Map100thMM ) );
if ( m_pLandscapeBtn->IsChecked() )
Swap( aSize );
@@ -964,8 +964,8 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox&, rBox, void )
if ( aSize.Width() < m_pPaperWidthEdit->GetMin( FUNIT_100TH_MM ) )
m_pPaperWidthEdit->SetMin(
m_pPaperWidthEdit->Normalize( aSize.Width() ), FUNIT_100TH_MM );
- SetMetricValue( *m_pPaperHeightEdit, aSize.Height(), MAP_100TH_MM );
- SetMetricValue( *m_pPaperWidthEdit, aSize.Width(), MAP_100TH_MM );
+ SetMetricValue( *m_pPaperHeightEdit, aSize.Height(), MapUnit::Map100thMM );
+ SetMetricValue( *m_pPaperWidthEdit, aSize.Width(), MapUnit::Map100thMM );
CalcMargin_Impl();
@@ -984,28 +984,28 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox&, rBox, void )
if ( bScreen || m_pRightMarginEdit->GetValue() == 0 )
{
- SetMetricValue( *m_pRightMarginEdit, nTmp, MAP_CM );
+ SetMetricValue( *m_pRightMarginEdit, nTmp, MapUnit::MapCM );
if ( !bScreen &&
m_pRightMarginEdit->GetFirst() > m_pRightMarginEdit->GetValue() )
m_pRightMarginEdit->SetValue( m_pRightMarginEdit->GetFirst() );
}
if ( bScreen || m_pLeftMarginEdit->GetValue() == 0 )
{
- SetMetricValue( *m_pLeftMarginEdit, nTmp, MAP_CM );
+ SetMetricValue( *m_pLeftMarginEdit, nTmp, MapUnit::MapCM );
if ( !bScreen &&
m_pLeftMarginEdit->GetFirst() > m_pLeftMarginEdit->GetValue() )
m_pLeftMarginEdit->SetValue( m_pLeftMarginEdit->GetFirst() );
}
if ( bScreen || m_pBottomMarginEdit->GetValue() == 0 )
{
- SetMetricValue( *m_pBottomMarginEdit, nTmp, MAP_CM );
+ SetMetricValue( *m_pBottomMarginEdit, nTmp, MapUnit::MapCM );
if ( !bScreen &&
m_pBottomMarginEdit->GetFirst() > m_pBottomMarginEdit->GetValue() )
m_pBottomMarginEdit->SetValue( m_pBottomMarginEdit->GetFirst() );
}
if ( bScreen || m_pTopMarginEdit->GetValue() == 0 )
{
- SetMetricValue( *m_pTopMarginEdit, nTmp, MAP_CM );
+ SetMetricValue( *m_pTopMarginEdit, nTmp, MapUnit::MapCM );
if ( !bScreen &&
m_pTopMarginEdit->GetFirst() > m_pTopMarginEdit->GetValue() )
m_pTopMarginEdit->SetValue( m_pTopMarginEdit->GetFirst() );
@@ -1038,12 +1038,12 @@ IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, Button *, pBtn, void )
{
bLandscape = m_pLandscapeBtn->IsChecked();
- const long lWidth = GetCoreValue( *m_pPaperWidthEdit, MAP_100TH_MM );
- const long lHeight = GetCoreValue( *m_pPaperHeightEdit, MAP_100TH_MM );
+ const long lWidth = GetCoreValue( *m_pPaperWidthEdit, MapUnit::Map100thMM );
+ const long lHeight = GetCoreValue( *m_pPaperHeightEdit, MapUnit::Map100thMM );
// swap width and height
- SetMetricValue( *m_pPaperWidthEdit, lHeight, MAP_100TH_MM );
- SetMetricValue( *m_pPaperHeightEdit, lWidth, MAP_100TH_MM );
+ SetMetricValue( *m_pPaperWidthEdit, lHeight, MapUnit::Map100thMM );
+ SetMetricValue( *m_pPaperHeightEdit, lWidth, MapUnit::Map100thMM );
// recalculate margins if necessary
CalcMargin_Impl();
@@ -1065,7 +1065,7 @@ void SvxPageDescPage::SwapFirstValues_Impl( bool bSet )
eOri = Orientation::Landscape;
Orientation eOldOri = mpDefPrinter->GetOrientation();
mpDefPrinter->SetOrientation( eOri );
- mpDefPrinter->SetMapMode( MAP_TWIP );
+ mpDefPrinter->SetMapMode( MapUnit::MapTwip );
// set first- and last-values for margins
Size aPaperSize = mpDefPrinter->GetPaperSize();
@@ -1133,16 +1133,16 @@ IMPL_LINK_NOARG(SvxPageDescPage, BorderModify_Impl, Edit&, void)
void SvxPageDescPage::UpdateExample_Impl( bool bResetbackground )
{
// Size
- Size aSize( GetCoreValue( *m_pPaperWidthEdit, MAP_TWIP ),
- GetCoreValue( *m_pPaperHeightEdit, MAP_TWIP ) );
+ Size aSize( GetCoreValue( *m_pPaperWidthEdit, MapUnit::MapTwip ),
+ GetCoreValue( *m_pPaperHeightEdit, MapUnit::MapTwip ) );
m_pBspWin->SetSize( aSize );
// Margins
- m_pBspWin->SetTop( GetCoreValue( *m_pTopMarginEdit, MAP_TWIP ) );
- m_pBspWin->SetBottom( GetCoreValue( *m_pBottomMarginEdit, MAP_TWIP ) );
- m_pBspWin->SetLeft( GetCoreValue( *m_pLeftMarginEdit, MAP_TWIP ) );
- m_pBspWin->SetRight( GetCoreValue( *m_pRightMarginEdit, MAP_TWIP ) );
+ m_pBspWin->SetTop( GetCoreValue( *m_pTopMarginEdit, MapUnit::MapTwip ) );
+ m_pBspWin->SetBottom( GetCoreValue( *m_pBottomMarginEdit, MapUnit::MapTwip ) );
+ m_pBspWin->SetLeft( GetCoreValue( *m_pLeftMarginEdit, MapUnit::MapTwip ) );
+ m_pBspWin->SetRight( GetCoreValue( *m_pRightMarginEdit, MapUnit::MapTwip ) );
// Layout
m_pBspWin->SetUsage( PosToPageUsage_Impl( m_pLayoutBox->GetSelectEntryPos() ) );
@@ -1540,14 +1540,14 @@ IMPL_LINK_NOARG(SvxPageDescPage, RangeHdl_Impl, Control&, void)
void SvxPageDescPage::CalcMargin_Impl()
{
// current values for page margins
- long nBT = GetCoreValue( *m_pTopMarginEdit, MAP_TWIP );
- long nBB = GetCoreValue( *m_pBottomMarginEdit, MAP_TWIP );
+ long nBT = GetCoreValue( *m_pTopMarginEdit, MapUnit::MapTwip );
+ long nBB = GetCoreValue( *m_pBottomMarginEdit, MapUnit::MapTwip );
- long nBL = GetCoreValue( *m_pLeftMarginEdit, MAP_TWIP );
- long nBR = GetCoreValue( *m_pRightMarginEdit, MAP_TWIP );
+ long nBL = GetCoreValue( *m_pLeftMarginEdit, MapUnit::MapTwip );
+ long nBR = GetCoreValue( *m_pRightMarginEdit, MapUnit::MapTwip );
- long nH = GetCoreValue( *m_pPaperHeightEdit, MAP_TWIP );
- long nW = GetCoreValue( *m_pPaperWidthEdit, MAP_TWIP );
+ long nH = GetCoreValue( *m_pPaperHeightEdit, MapUnit::MapTwip );
+ long nW = GetCoreValue( *m_pPaperWidthEdit, MapUnit::MapTwip );
long nWidth = nBL + nBR + MINBODY;
long nHeight = nBT + nBB + MINBODY;
@@ -1560,9 +1560,9 @@ void SvxPageDescPage::CalcMargin_Impl()
nTmp -= nWidth - nW;
if ( nBL <= nBR )
- SetMetricValue( *m_pRightMarginEdit, nTmp, MAP_TWIP );
+ SetMetricValue( *m_pRightMarginEdit, nTmp, MapUnit::MapTwip );
else
- SetMetricValue( *m_pLeftMarginEdit, nTmp, MAP_TWIP );
+ SetMetricValue( *m_pLeftMarginEdit, nTmp, MapUnit::MapTwip );
}
if ( nHeight > nH )
@@ -1571,9 +1571,9 @@ void SvxPageDescPage::CalcMargin_Impl()
nTmp -= nHeight - nH;
if ( nBT <= nBB )
- SetMetricValue( *m_pBottomMarginEdit, nTmp, MAP_TWIP );
+ SetMetricValue( *m_pBottomMarginEdit, nTmp, MapUnit::MapTwip );
else
- SetMetricValue( *m_pTopMarginEdit, nTmp, MAP_TWIP );
+ SetMetricValue( *m_pTopMarginEdit, nTmp, MapUnit::MapTwip );
}
}
}
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 1266cc67d36c..55a080c66d2d 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -365,7 +365,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
if ( bNullTab )
{
MapUnit eUnit = (MapUnit)pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) );
- if ( MAP_100TH_MM != eUnit )
+ if ( MapUnit::Map100thMM != eUnit )
{
// negative first line indent -> set null default tabstob if applicable
@@ -837,7 +837,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox&, rBox, void )
// if the value has been changed at SetMin,
// it is time for the default
if ( m_pLineDistAtMetricBox->GetValue() != nTemp )
- SetMetricValue( *m_pLineDistAtMetricBox, FIX_DIST_DEF, MAP_TWIP ); // fix is only in Writer
+ SetMetricValue( *m_pLineDistAtMetricBox, FIX_DIST_DEF, MapUnit::MapTwip ); // fix is only in Writer
m_pLineDistAtPercentBox->Hide();
m_pLineDistAtMetricBox->Show();
m_pLineDistAtMetricBox->Enable();
@@ -908,7 +908,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl()
case LLINESPACE_DURCH:
case LLINESPACE_FIX:
m_pExampleWin->SetLineSpace( (SvxPrevLineSpace)nPos,
- (sal_uInt16)GetCoreValue( *m_pLineDistAtMetricBox, MAP_TWIP ) );
+ (sal_uInt16)GetCoreValue( *m_pLineDistAtMetricBox, MapUnit::MapTwip ) );
break;
}
m_pExampleWin->Invalidate();
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 477ac3bce31a..239406398e9f 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -224,7 +224,7 @@ bool SvxTabulatorTabPage::FillItemSet(SfxItemSet* rSet)
MapUnit eUnit = (MapUnit)pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP));
const SfxPoolItem* pOld = GetOldItem(*rSet, SID_ATTR_TABSTOP);
- if (MAP_100TH_MM != eUnit)
+ if (MapUnit::Map100thMM != eUnit)
{
// If the ItemSet contains a LRSpaceItem with negative first line indent,
// the TabStopItem needs to have a DefTab at position 0.
@@ -245,7 +245,7 @@ bool SvxTabulatorTabPage::FillItemSet(SfxItemSet* rSet)
for (sal_uInt16 i = 0; i < aNewTabs.Count(); ++i)
{
SvxTabStop aTmpStop = aNewTabs[i];
- aTmpStop.GetTabPos() = LogicToLogic(aTmpStop.GetTabPos(), MAP_100TH_MM, eUnit);
+ aTmpStop.GetTabPos() = LogicToLogic(aTmpStop.GetTabPos(), MapUnit::Map100thMM, eUnit);
aTmp.Insert(aTmpStop);
}
@@ -278,7 +278,7 @@ void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
if (pItem)
{
- if (MAP_100TH_MM != eUnit)
+ if (MapUnit::Map100thMM != eUnit)
{
SvxTabStopItem aTmp(*static_cast<const SvxTabStopItem*>(pItem));
aNewTabs.Remove(0, aNewTabs.Count());
@@ -286,7 +286,7 @@ void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
for (sal_uInt16 i = 0; i < aTmp.Count(); ++i)
{
SvxTabStop aTmpStop = aTmp[i];
- aTmpStop.GetTabPos() = LogicToLogic(aTmpStop.GetTabPos(), eUnit, MAP_100TH_MM);
+ aTmpStop.GetTabPos() = LogicToLogic(aTmpStop.GetTabPos(), eUnit, MapUnit::Map100thMM);
aNewTabs.Insert(aTmpStop);
}
}
@@ -301,7 +301,7 @@ void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
pItem = GetItem(*rSet, SID_ATTR_TABSTOP_DEFAULTS);
if (pItem)
- nDefDist = LogicToLogic(long(static_cast<const SfxUInt16Item*>(pItem)->GetValue()), eUnit, MAP_100TH_MM);
+ nDefDist = LogicToLogic(long(static_cast<const SfxUInt16Item*>(pItem)->GetValue()), eUnit, MapUnit::Map100thMM);
// Tab pos currently selected
sal_uInt16 nTabPos = 0;
@@ -373,7 +373,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos )
{
nOffset = static_cast<const SfxInt32Item*>(pItem)->GetValue();
MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric(GetWhich(SID_ATTR_TABSTOP));
- nOffset = OutputDevice::LogicToLogic(nOffset, eUnit, MAP_100TH_MM);
+ nOffset = OutputDevice::LogicToLogic(nOffset, eUnit, MapUnit::Map100thMM);
}
// Correct current TabPos and default tabs
@@ -479,7 +479,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn, void )
{
nOffset = static_cast<const SfxInt32Item*>(pItem)->GetValue();
MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) );
- nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MAP_100TH_MM );
+ nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MapUnit::Map100thMM );
}
const long nReal = nVal - nOffset;
sal_Int32 nSize = m_pTabBox->GetEntryCount();
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index a9022678b390..d89945dbd8e3 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -137,7 +137,7 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
m_pCtlXRectPreview->EnableRTL(false);
// Calculate size of dropdown listboxes
- Size aSize = LogicToPixel(Size(108, 103), MAP_APPFONT);
+ Size aSize = LogicToPixel(Size(108, 103), MapUnit::MapAppFont);
m_pLbColor->set_width_request(aSize.Width());
m_pLbColor->set_height_request(aSize.Height());
@@ -151,7 +151,7 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
m_pLbBitmap->set_height_request(aSize.Height());
// Calculate size of display boxes
- Size aSize2 = LogicToPixel(Size(110, 42), MAP_APPFONT);
+ Size aSize2 = LogicToPixel(Size(110, 42), MapUnit::MapAppFont);
m_pCtlBitmapPreview->set_width_request(aSize2.Width());
m_pCtlBitmapPreview->set_height_request(aSize2.Height());
m_pCtlXRectPreview->set_width_request(aSize2.Width());
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 5265f34fbb12..55f8ea55a82e 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -298,12 +298,12 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
pItem = GetItem( rGeoAttr, SID_ATTR_TRANSFORM_WIDTH );
m_fObjectWidth = std::max( pItem ? (double)static_cast<const SfxUInt32Item*>(pItem)->GetValue() : 0.0, 1.0 );
- double fTmpWidth((OutputDevice::LogicToLogic(static_cast<sal_Int32>(m_fObjectWidth),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale);
+ double fTmpWidth((OutputDevice::LogicToLogic(static_cast<sal_Int32>(m_fObjectWidth), mePoolUnit, MapUnit::Map100thMM )) / fUIScale);
m_fObjectWidth = fTmpWidth;
pItem = GetItem( rGeoAttr, SID_ATTR_TRANSFORM_HEIGHT );
m_fObjectHeight = std::max( pItem ? (double)static_cast<const SfxUInt32Item*>(pItem)->GetValue() : 0.0, 1.0 );
- double fTmpHeight((OutputDevice::LogicToLogic(static_cast<sal_Int32>(m_fObjectHeight),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale);
+ double fTmpHeight((OutputDevice::LogicToLogic(static_cast<sal_Int32>(m_fObjectHeight), mePoolUnit, MapUnit::Map100thMM )) / fUIScale);
m_fObjectHeight = fTmpHeight;
XFillBitmapItem aItem( static_cast<const XFillBitmapItem&>(rAttrs->Get(XATTR_FILLBITMAP)) );
@@ -324,8 +324,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
{
BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx());
Size aTempBitmapSize = aBmpEx.GetSizePixel();
- rBitmapSize.Width() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Width()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale);
- rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Height()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale);
+ rBitmapSize.Width() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Width()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale);
+ rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Height()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale);
CalculateBitmapPresetSize();
}
@@ -376,8 +376,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
if(eRelative != TRISTATE_TRUE)
{
- nWidth = (OutputDevice::LogicToLogic(static_cast<long>(nWidth),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale;
- nHeight = (OutputDevice::LogicToLogic(static_cast<long>(nHeight),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale;
+ nWidth = (OutputDevice::LogicToLogic(static_cast<long>(nWidth), mePoolUnit, MapUnit::Map100thMM )) / fUIScale;
+ nHeight = (OutputDevice::LogicToLogic(static_cast<long>(nHeight), mePoolUnit, MapUnit::Map100thMM )) / fUIScale;
}
if(m_pBitmapStyleLB->GetSelectEntryPos() == 0)
@@ -537,8 +537,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void)
Size aTempBitmapSize = aBmpEx.GetSizePixel();
const double fUIScale(double(mpView->GetModel()->GetUIScale()));
- rBitmapSize.Width() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Width()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale);
- rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Height()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale);
+ rBitmapSize.Width() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Width()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale);
+ rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Height()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale);
CalculateBitmapPresetSize();
ModifyBitmapStyleHdl( *m_pBitmapStyleLB );
ModifyBitmapPositionHdl( *m_pPositionLB );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index d0335f325bee..36abaf503b79 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -72,13 +72,13 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
{
get(m_pSelectPalette, "paletteselector");
get(m_pValSetColorList, "colorset");
- Size aSize = LogicToPixel(Size(100 , 120), MAP_APPFONT);
+ Size aSize = LogicToPixel(Size(100 , 120), MapUnit::MapAppFont);
m_pValSetColorList->set_width_request(aSize.Width());
m_pValSetColorList->set_height_request(aSize.Height());
get(m_pValSetRecentList, "recentcolorset");
get(m_pCtlPreviewOld, "oldpreview");
get(m_pCtlPreviewNew, "newpreview");
- aSize = LogicToPixel(Size(34 , 25), MAP_APPFONT);
+ aSize = LogicToPixel(Size(34 , 25), MapUnit::MapAppFont);
m_pCtlPreviewOld->set_width_request(aSize.Width());
m_pCtlPreviewOld->set_height_request(aSize.Height());
m_pCtlPreviewNew->set_width_request(aSize.Width());
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 6b5ade69f9eb..43f51a5485fd 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -353,7 +353,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && m_pSymbolList)
{
ScopedVclPtrInstance< VirtualDevice > pVDev;
- pVDev->SetMapMode(MapMode(MAP_100TH_MM));
+ pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
std::unique_ptr<SdrModel> pModel(new SdrModel);
pModel->GetItemPool().FreezeIdRanges();
// Page
@@ -498,7 +498,7 @@ void SvxLineTabPage::SymbolSelected(MenuButton* pButton)
if(pGraphic)
{
Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic);
- aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)m_ePoolUnit);
+ aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)m_ePoolUnit);
m_aSymbolGraphic=*pGraphic;
if( bResetSize )
{
@@ -1134,7 +1134,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
else if(nSymType >= 0)
{
ScopedVclPtrInstance< VirtualDevice > pVDev;
- pVDev->SetMapMode(MapMode(MAP_100TH_MM));
+ pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
std::unique_ptr<SdrModel> pModel(new SdrModel);
pModel->GetItemPool().FreezeIdRanges();
@@ -1181,7 +1181,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
m_aSymbolGraphic=Graphic(aMeta);
m_aSymbolSize=pObj->GetSnapRect().GetSize();
m_aSymbolGraphic.SetPrefSize(pInvisibleSquare->GetSnapRect().GetSize());
- m_aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM);
+ m_aSymbolGraphic.SetPrefMapMode(MapUnit::Map100thMM);
bPrevSym=true;
bEnable=true;
bIgnoreGraphic=true;
@@ -1209,7 +1209,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
{
m_aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
pGraphic->GetPrefMapMode(),
- MAP_100TH_MM );
+ MapUnit::Map100thMM );
}
bPrevSym=true;
}
@@ -1733,8 +1733,8 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, Edit&, rField, void)
bool bRatio = m_pSymbolRatioCB->IsChecked();
long nWidthVal = static_cast<long>(m_pSymbolWidthMF->Denormalize(m_pSymbolWidthMF->GetValue(FUNIT_100TH_MM)));
long nHeightVal= static_cast<long>(m_pSymbolHeightMF->Denormalize(m_pSymbolHeightMF->GetValue(FUNIT_100TH_MM)));
- nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)m_ePoolUnit );
- nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MAP_100TH_MM,(MapUnit)m_ePoolUnit);
+ nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MapUnit::Map100thMM,(MapUnit)m_ePoolUnit );
+ nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MapUnit::Map100thMM,(MapUnit)m_ePoolUnit);
m_aSymbolSize = Size(nWidthVal,nHeightVal);
double fSizeRatio = (double)1;
@@ -1753,7 +1753,7 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, Edit&, rField, void)
if (bRatio)
{
m_aSymbolSize.Height() = m_aSymbolLastSize.Height() + (long)((double)nDelta / fSizeRatio);
- m_aSymbolSize.Height() = OutputDevice::LogicToLogic( m_aSymbolSize.Height(),(MapUnit)m_ePoolUnit, MAP_100TH_MM );
+ m_aSymbolSize.Height() = OutputDevice::LogicToLogic( m_aSymbolSize.Height(),(MapUnit)m_ePoolUnit, MapUnit::Map100thMM );
m_pSymbolHeightMF->SetUserValue(m_pSymbolHeightMF->Normalize(m_aSymbolSize.Height()), FUNIT_100TH_MM);
}
}
@@ -1764,7 +1764,7 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, Edit&, rField, void)
if (bRatio)
{
m_aSymbolSize.Width() = m_aSymbolLastSize.Width() + (long)((double)nDelta * fSizeRatio);
- m_aSymbolSize.Width() = OutputDevice::LogicToLogic( m_aSymbolSize.Width(), (MapUnit)m_ePoolUnit, MAP_100TH_MM );
+ m_aSymbolSize.Width() = OutputDevice::LogicToLogic( m_aSymbolSize.Width(), (MapUnit)m_ePoolUnit, MapUnit::Map100thMM );
m_pSymbolWidthMF->SetUserValue(m_pSymbolWidthMF->Normalize(m_aSymbolSize.Width()), FUNIT_100TH_MM);
}
}
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index d673aa64725a..98d1f9b765f4 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -900,8 +900,8 @@ void SvxPositionSizeTabPage::Construct()
// take UI units into account
const sal_uInt16 nDigits(m_pMtrPosX->GetDecimalDigits());
- TransfrmHelper::ConvertRect( maWorkRange, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
- TransfrmHelper::ConvertRect( maRange, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
+ TransfrmHelper::ConvertRect( maWorkRange, nDigits, mePoolUnit, meDlgUnit );
+ TransfrmHelper::ConvertRect( maRange, nDigits, mePoolUnit, meDlgUnit );
SetMinMaxPosition();
}
@@ -969,14 +969,14 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs )
double nWidth = static_cast<double>(m_pMtrWidth->GetValue( meDlgUnit ));
nWidth = MetricField::ConvertDoubleValue( nWidth, m_pMtrWidth->GetBaseValue(), m_pMtrWidth->GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM );
long lWidth = long(nWidth * (double)aUIScale);
- lWidth = OutputDevice::LogicToLogic( lWidth, MAP_100TH_MM, (MapUnit)mePoolUnit );
+ lWidth = OutputDevice::LogicToLogic( lWidth, MapUnit::Map100thMM, mePoolUnit );
lWidth = static_cast<long>(m_pMtrWidth->Denormalize( lWidth ));
// get Height
double nHeight = static_cast<double>(m_pMtrHeight->GetValue( meDlgUnit ));
nHeight = MetricField::ConvertDoubleValue( nHeight, m_pMtrHeight->GetBaseValue(), m_pMtrHeight->GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM );
long lHeight = long(nHeight * (double)aUIScale);
- lHeight = OutputDevice::LogicToLogic( lHeight, MAP_100TH_MM, (MapUnit)mePoolUnit );
+ lHeight = OutputDevice::LogicToLogic( lHeight, MapUnit::Map100thMM, mePoolUnit );
lHeight = static_cast<long>(m_pMtrHeight->Denormalize( lHeight ));
// put Width & Height to itemset
@@ -1073,7 +1073,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* )
{ // #i75273# set width
pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_WIDTH );
mfOldWidth = std::max( pItem ? (double)static_cast<const SfxUInt32Item*>(pItem)->GetValue() : 0.0, 1.0 );
- double fTmpWidth((OutputDevice::LogicToLogic(static_cast<sal_Int32>(mfOldWidth), (MapUnit)mePoolUnit, MAP_100TH_MM)) / fUIScale);
+ double fTmpWidth((OutputDevice::LogicToLogic(static_cast<sal_Int32>(mfOldWidth), mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
if(m_pMtrWidth->GetDecimalDigits())
fTmpWidth *= pow(10.0, m_pMtrWidth->GetDecimalDigits());
@@ -1085,7 +1085,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet* )
{ // #i75273# set height
pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_HEIGHT );
mfOldHeight = std::max( pItem ? (double)static_cast<const SfxUInt32Item*>(pItem)->GetValue() : 0.0, 1.0 );
- double fTmpHeight((OutputDevice::LogicToLogic(static_cast<sal_Int32>(mfOldHeight), (MapUnit)mePoolUnit, MAP_100TH_MM)) / fUIScale);
+ double fTmpHeight((OutputDevice::LogicToLogic(static_cast<sal_Int32>(mfOldHeight), mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
if(m_pMtrHeight->GetDecimalDigits())
fTmpHeight *= pow(10.0, m_pMtrHeight->GetDecimalDigits());
@@ -1310,7 +1310,7 @@ void SvxPositionSizeTabPage::SetMinMaxPosition()
}
}
- const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MAP_100TH_MM, meDlgUnit ) - 1L));
+ const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1L));
fLeft = basegfx::clamp(fLeft, -fMaxLong, fMaxLong);
fRight = basegfx::clamp(fRight, -fMaxLong, fMaxLong);
fTop = basegfx::clamp(fTop, - fMaxLong, fMaxLong);
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index ab736b1ad026..ad6916f1b6af 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -137,7 +137,7 @@ namespace dbmm
declarePath( PATH_DEFAULT, {STATE_CLOSE_SUB_DOCS, STATE_BACKUP_DBDOC, STATE_MIGRATE, STATE_SUMMARY} );
- SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
+ SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MapUnit::MapAppFont ) );
SetRoadmapInteractive( true );
enableAutomaticNextButtonState();
defaultButton( WizardButtonFlags::NEXT );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 2b2867ec23c6..74706f5a3889 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -929,7 +929,7 @@ void OAppDetailPageHelper::Resize()
vcl::Window* pWindow = getCurrentView();
if ( pWindow )
{
- Size aFLSize = LogicToPixel( Size( 2, 6 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 2, 6 ), MapUnit::MapAppFont );
sal_Int32 n6PPT = aFLSize.Height();
long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index dfa9c280ea2d..d19fca85ccc7 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -444,7 +444,7 @@ void OTasksWindow::Resize()
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
- Size aFLSize = LogicToPixel( Size( 2, 6 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 2, 6 ), MapUnit::MapAppFont );
sal_Int32 n6PPT = aFLSize.Height();
long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
@@ -542,7 +542,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
m_aContainer->Show();
- const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
+ const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MapUnit::MapAppFont ).Width();
m_aHorzSplitter->SetPosSizePixel( Point(0,50), Size(0,nFrameWidth) );
// now set the components at the base class
set(m_aContainer.get(),m_aTasks.get());
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 644b846b86ae..084d79d56e56 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -63,7 +63,7 @@ void OApplicationSwapWindow::dispose()
void OApplicationSwapWindow::Resize()
{
- Size aFLSize = LogicToPixel( Size( 8, 0 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 8, 0 ), MapUnit::MapAppFont );
long nX = 0;
if ( m_aIconControl->GetEntryCount() != 0 )
nX = m_aIconControl->GetBoundingBox( m_aIconControl->GetEntry(0) ).GetWidth() + aFLSize.Width();
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index 7c89754c0da0..d11608cfcdd5 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -83,7 +83,7 @@ void OTitleWindow::Resize()
long nOutputWidth = aOutputSize.Width();
long nOutputHeight = aOutputSize.Height();
- Size aTextSize = LogicToPixel( Size( 6, 3 ), MAP_APPFONT );
+ Size aTextSize = LogicToPixel( Size( 6, 3 ), MapUnit::MapAppFont );
sal_Int32 nXOffset = aTextSize.Width();
sal_Int32 nYOffset = aTextSize.Height();
sal_Int32 nHeight = GetTextHeight() + 2*nYOffset;
@@ -118,7 +118,7 @@ void OTitleWindow::GetFocus()
long OTitleWindow::GetWidthPixel() const
{
- Size aTextSize = LogicToPixel( Size( 12, 0 ), MAP_APPFONT );
+ Size aTextSize = LogicToPixel( Size( 12, 0 ), MapUnit::MapAppFont );
sal_Int32 nWidth = GetTextWidth(m_aTitle->GetText()) + 2*aTextSize.Width();
return nWidth;
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index cb07e831cda7..fdb2f078a478 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -113,7 +113,7 @@ void OAppBorderWindow::Resize()
long nOutputHeight = aOutputSize.Height();
long nX = 0;
- Size aFLSize = LogicToPixel( Size( 3, 8 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 3, 8 ), MapUnit::MapAppFont );
if ( m_pPanel )
{
OApplicationSwapWindow* pSwap = getPanel();
@@ -244,7 +244,7 @@ void OApplicationView::resizeDocumentView(Rectangle& _rPlayground)
{
if ( m_pWin && !_rPlayground.IsEmpty() )
{
- Size aFLSize = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
+ Size aFLSize = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont );
_rPlayground.Move( aFLSize.A(),aFLSize.B() );
Size aOldSize = _rPlayground.GetSize();
_rPlayground.SetSize( Size(aOldSize.A() - 2*aFLSize.A(), aOldSize.B() - 2*aFLSize.B()) );
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index d041f10fcec4..f40bcf13f009 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -215,7 +215,7 @@ void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground)
if (m_pStatus && m_pStatus->IsVisible())
{
Size aStatusSize(aPlaygroundPos.X(), GetTextHeight() + 2);
- aStatusSize = LogicToPixel(aStatusSize, MAP_APPFONT);
+ aStatusSize = LogicToPixel(aStatusSize, MapUnit::MapAppFont);
aStatusSize.Width() = aTreeViewSize.Width() - 2 - 2;
Point aStatusPos( aPlaygroundPos.X() + 2, aTreeViewPos.Y() + aTreeViewSize.Height() - aStatusSize.Height() );
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index da2d7c9d275c..f42a38633b91 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -348,7 +348,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
{
// create controls and set sizes
- const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width();
+ const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MapUnit::MapAppFont ).Width();
m_pSplitter = VclPtr<Splitter>::Create(getBrowserView(),WB_HSCROLL);
m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
@@ -364,7 +364,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
m_pTreeView->SetHelpId(HID_CTL_TREEVIEW);
// a default pos for the splitter, so that the listbox is about 80 (logical) pixels wide
- m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MAP_APPFONT ).Width() );
+ m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MapUnit::MapAppFont ).Width() );
getBrowserView()->setSplitter(m_pSplitter);
getBrowserView()->setTreeView(m_pTreeView);
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index b9735ec0c03b..812c2049a622 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -290,7 +290,7 @@ void OFieldDescControl::CheckScrollBars()
// Which one is the last one that fits?
sal_uInt16 nLastVisible;
const sal_Int32 nControlHeight = GetMaxControlHeight();
- const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
+ const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height();
if (bNeedHScrollBar)
nLastVisible = static_cast<sal_uInt16>((szOverallSize.Height() - nControl_Spacing_y - nHScrollHeight) / (nControl_Spacing_y + nControlHeight));
else
@@ -369,7 +369,7 @@ void OFieldDescControl::ScrollAllAggregates()
if (m_nOldVThumb != m_pVertScroll->GetThumbPos())
{
const sal_Int32 nControlHeight = GetMaxControlHeight();
- const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
+ const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height();
nDeltaY = (m_nOldVThumb - m_pVertScroll->GetThumbPos()) * (nControl_Spacing_y + nControlHeight);
m_nOldVThumb = m_pVertScroll->GetThumbPos();
}
@@ -994,7 +994,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control>& rControl, long nRow, sal_uI
const sal_Int32 nControlHeight = GetMaxControlHeight();
Size aSize(0,nControlHeight);
if ( isRightAligned() && nCol )
- aSize.Width() = LogicToPixel(Size(m_nWidth, 0),MAP_APPFONT).Width();
+ aSize.Width() = LogicToPixel(Size(m_nWidth, 0),MapUnit::MapAppFont).Width();
else
{
switch( nCol )
@@ -1041,7 +1041,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control>& rControl, long nRow, sal_uI
rControl->SetSizePixel( aSize );
aSize = rControl->GetSizePixel( );
- const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
+ const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MapUnit::MapAppFont).Height();
aPosition.Y() += ((nRow+1)*nControl_Spacing_y) +
(nRow*nControlHeight);
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index ea6987518c1e..f996db591258 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -435,7 +435,7 @@ namespace dbaui
Size ORelationControl::GetOptimalSize() const
{
- return LogicToPixel(Size(140, 80), MAP_APPFONT);
+ return LogicToPixel(Size(140, 80), MapUnit::MapAppFont);
}
// class OTableListBoxControl
diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx
index 45e11a6c20e1..57a61ecbcb8e 100644
--- a/dbaccess/source/ui/control/VertSplitView.cxx
+++ b/dbaccess/source/ui/control/VertSplitView.cxx
@@ -156,7 +156,7 @@ void OSplitterView::setSplitter(Splitter* _pSplitter)
m_pSplitter = _pSplitter;
if ( m_pSplitter )
{
- m_pSplitter->SetSplitPosPixel( LogicToPixel( Size( SPLITTER_WIDTH, 0 ), MAP_APPFONT ).Width() );
+ m_pSplitter->SetSplitPosPixel( LogicToPixel( Size( SPLITTER_WIDTH, 0 ), MapUnit::MapAppFont ).Width() );
m_pSplitter->SetSplitHdl( LINK(this, OSplitterView, SplitHdl) );
m_pSplitter->Show();
LINK( this, OSplitterView, SplitHdl ).Call(m_pSplitter);
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 0a5f62e811bb..2b3100c3a460 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -278,7 +278,7 @@ namespace dbaui
aReference.Y() += _rReference.GetSizePixel().Height();
const vcl::Window* pConverter = _rControl.GetParent();
- Size aOffset = pConverter->LogicToPixel( Size( _nIndentAppFont, ( _eRelation == RelatedControls ? 3 : 6 ) ), MAP_APPFONT );
+ Size aOffset = pConverter->LogicToPixel( Size( _nIndentAppFont, ( _eRelation == RelatedControls ? 3 : 6 ) ), MapUnit::MapAppFont );
Point aControlPos( aReference.X() + aOffset.Width(), aReference.Y() + aOffset.Height() );
_rControl.SetPosPixel( aControlPos );
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 71e5f26e9b18..1aa01c2182c0 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -322,7 +322,7 @@ OAddTableDlg::OAddTableDlg( vcl::Window* pParent, IAddTableDialogContext& _rCont
get(m_pTableList, "tablelist");
get(m_pQueryList, "querylist");
- Size aSize(LogicToPixel(Size(106 , 122), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(106 , 122), MapUnit::MapAppFont));
m_pTableList->set_height_request(aSize.Height());
m_pTableList->set_width_request(aSize.Width());
get(m_pQueryList, "querylist");
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 3ed234ce954d..2495ff2316df 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -50,7 +50,7 @@ ODbaseIndexDialog::ODbaseIndexDialog(vcl::Window * pParent, const OUString& aDat
get(m_pIndexes, "frame");
get(m_pLB_TableIndexes, "tableindex");
get(m_pLB_FreeIndexes, "freeindex");
- Size aSize(LogicToPixel(Size(76, 98), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(76, 98), MapUnit::MapAppFont));
m_pLB_TableIndexes->set_height_request(aSize.Height());
m_pLB_TableIndexes->set_width_request(aSize.Width());
m_pLB_FreeIndexes->set_height_request(aSize.Height());
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 2062b4269d4f..3eb5c8055dfc 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -78,7 +78,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet);
- SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT));
+ SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MapUnit::MapAppFont));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, false);
enableAutomaticNextButtonState();
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 3e1c2200216b..523a0a314090 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -145,7 +145,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
- SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT));
+ SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MapUnit::MapAppFont));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, true);
enableAutomaticNextButtonState();
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 53ecfa10e867..d2758b0d51ac 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -193,7 +193,7 @@ namespace dbaui
maLcResetCmdImg = get<FixedImage>("image5")->GetImage();
get(m_pIndexList, "INDEX_LIST");
- Size aSize(LogicToPixel(Size(70, 97), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(70, 97), MapUnit::MapAppFont));
m_pIndexList->set_width_request(aSize.Width());
m_pIndexList->set_height_request(aSize.Height());
get(m_pIndexDetails, "INDEX_DETAILS");
@@ -202,7 +202,7 @@ namespace dbaui
get(m_pUnique, "UNIQUE");
get(m_pFieldsLabel, "FIELDS_LABEL");
get(m_pFields, "FIELDS");
- aSize = LogicToPixel(Size(128, 61), MAP_APPFONT);
+ aSize = LogicToPixel(Size(128, 61), MapUnit::MapAppFont);
m_pFields->set_width_request(aSize.Width());
m_pFields->set_height_request(aSize.Height());
get(m_pClose, "close");
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 3a5cd53d4c82..2d4660d03f3e 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -303,11 +303,11 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti
, m_aExceptions(_rExceptions)
{
get(m_pExceptionList, "list");
- Size aListSize(LogicToPixel(Size(85, 93), MAP_APPFONT));
+ Size aListSize(LogicToPixel(Size(85, 93), MapUnit::MapAppFont));
m_pExceptionList->set_width_request(aListSize.Width());
m_pExceptionList->set_height_request(aListSize.Height());
get(m_pExceptionText, "description");
- Size aTextSize(LogicToPixel(Size(125 , 93), MAP_APPFONT));
+ Size aTextSize(LogicToPixel(Size(125 , 93), MapUnit::MapAppFont));
m_pExceptionText->set_width_request(aTextSize.Width());
m_pExceptionText->set_height_request(aTextSize.Height());
@@ -398,8 +398,8 @@ namespace
{
void lcl_positionInAppFont( const vcl::Window& _rParent, vcl::Window& _rChild, long _nX, long _nY, long Width, long Height )
{
- Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MAP_APPFONT );
- Size aSize = _rParent.LogicToPixel( Size( Width, Height ), MAP_APPFONT );
+ Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MapUnit::MapAppFont );
+ Size aSize = _rParent.LogicToPixel( Size( Width, Height ), MapUnit::MapAppFont );
_rChild.SetPosSizePixel( aPos, aSize );
}
@@ -512,8 +512,8 @@ void OSQLMessageBox::impl_positionControls()
// adjust dialog size accordingly
const Rectangle& rBottomTextRect( bHaveSecondaryText ? aSecondaryRect : aPrimaryRect );
- Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MAP_APPFONT );
- Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MAP_APPFONT ) );
+ Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MapUnit::MapAppFont );
+ Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MapUnit::MapAppFont ) );
aDialogSize.Height() = rBottomTextRect.Bottom() + aBorderSize.Height();
aDialogSize.Width() = aPrimaryRect.Right() + aBorderSize.Width();
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 430e703cc525..35ba9385d185 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -821,7 +821,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
};
SfxItemPool* pPool = new SfxItemPool(OUString("GridBrowserProperties"), SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, pDefaults);
- pPool->SetDefaultMetric( MAP_TWIP ); // ripped, don't understand why
+ pPool->SetDefaultMetric( MapUnit::MapTwip ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
std::unique_ptr<SfxItemSet> pFormatDescriptor(new SfxItemSet(*pPool, aAttrMap));
@@ -990,11 +990,11 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
sal_uInt32 nDefaultWidth = _pBox->GetDefaultColumnWidth( _pBox->GetColumnTitle( _nColId ) );
if ( nDefaultWidth != _pBox->GetColumnWidth( _nColId ) )
{
- Size aSizeMM = _pBox->PixelToLogic( Size( _pBox->GetColumnWidth( _nColId ), 0 ), MapMode( MAP_MM ) );
+ Size aSizeMM = _pBox->PixelToLogic( Size( _pBox->GetColumnWidth( _nColId ), 0 ), MapMode( MapUnit::MapMM ) );
nColSize = aSizeMM.Width() * 10;
}
- Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) );
+ Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MapUnit::MapMM ) );
ScopedVclPtrInstance< DlgSize > aColumnSizeDlg( _pBox, nColSize, false, aDefaultMM.Width() * 10 );
if ( aColumnSizeDlg->Execute() )
@@ -1007,7 +1007,7 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
else
{
Size aSizeMM( nValue / 10, 0 );
- nValue = _pBox->LogicToPixel( aSizeMM, MapMode( MAP_MM ) ).Width();
+ nValue = _pBox->LogicToPixel( aSizeMM, MapMode( MapUnit::MapMM ) ).Width();
}
_pBox->SetColumnWidth( _nColId, nValue );
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index cd473baa5a50..c7127dce6898 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -645,11 +645,11 @@ void OCopyTableWizard::construct()
AddButton( m_pbNext = VclPtr<PushButton>::Create(this, WB_TABSTOP));
AddButton( m_pbFinish = VclPtr<PushButton>::Create(this, WB_TABSTOP));
- m_pbHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbPrev->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbNext->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
- m_pbFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
+ m_pbHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbPrev->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbNext->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
+ m_pbFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) );
m_pbPrev->SetText(ModuleRes(STR_WIZ_PB_PREV));
m_pbNext->SetText(ModuleRes(STR_WIZ_PB_NEXT));
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index f78cd420e7ba..2118643b32e5 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -203,7 +203,7 @@ namespace dbaui
Size aSize = GetOutputSizePixel();
Size aBeamer(aSize.Width(),sal_Int32(aSize.Height()*0.33));
- const long nFrameHeight = LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
+ const long nFrameHeight = LogicToPixel( Size( 0, 3 ), MapUnit::MapAppFont ).Height();
Point aPos(0,aBeamer.Height()+nFrameHeight);
m_pBeamer->SetPosSizePixel(Point(0,0),aBeamer);
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 7710a97be15b..97268bab13b9 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -55,7 +55,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
, m_xConnection(_xConnection)
{
get(m_pML_HelpText, "helptext");
- Size aSize(LogicToPixel(Size(179, 49), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(179, 49), MapUnit::MapAppFont));
//alternatively loop through the STR_QUERY_* strings with their STR_JOIN_TYPE_HINT
//suffix to find the longest entry at runtime
m_pML_HelpText->set_height_request(aSize.Height());
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index fd15aae69031..553f1f5c1e88 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -184,7 +184,7 @@ void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog)
m_pRemoveBtn->SetText( DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
Size aSize = LogicToPixel( Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ),
- MapMode( MAP_APPFONT ) );
+ MapMode( MapUnit::MapAppFont ) );
m_pOptionsBtn->SetSizePixel( aSize );
m_pEnableBtn->SetSizePixel( aSize );
m_pRemoveBtn->SetSizePixel( aSize );
@@ -1574,7 +1574,7 @@ ShowLicenseDialog::ShowLicenseDialog( vcl::Window * pParent,
: ModalDialog(pParent, "ShowLicenseDialog", "desktop/ui/showlicensedialog.ui")
{
get(m_pLicenseText, "textview");
- Size aSize(m_pLicenseText->LogicToPixel(Size(290, 170), MAP_APPFONT));
+ Size aSize(m_pLicenseText->LogicToPixel(Size(290, 170), MapUnit::MapAppFont));
m_pLicenseText->set_width_request(aSize.Width());
m_pLicenseText->set_height_request(aSize.Height());
m_pLicenseText->SetText(xPackage->getLicenseText());
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 375512bfc939..2eaef2913346 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -756,7 +756,7 @@ void ExtensionBox_Impl::Resize()
Size ExtensionBox_Impl::GetOptimalSize() const
{
- return LogicToPixel(Size(250, 150), MAP_APPFONT);
+ return LogicToPixel(Size(250, 150), MapUnit::MapAppFont);
}
VCL_BUILDER_DECL_FACTORY(ExtensionBox)
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index caf95d46c575..85ae2a080748 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -510,7 +510,7 @@ UpdateDialog::UpdateDialog(
get(m_pUpdate, "UPDATE_LABEL");
get(m_pContainer, "UPDATES_CONTAINER");
m_pUpdates = VclPtr<UpdateDialog::CheckListBox>::Create(m_pContainer, *this);
- Size aSize(LogicToPixel(Size(240, 51), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(240, 51), MapUnit::MapAppFont));
m_pUpdates->set_width_request(aSize.Width());
m_pUpdates->set_height_request(aSize.Height());
m_pUpdates->Show();
@@ -521,7 +521,7 @@ UpdateDialog::UpdateDialog(
get(m_pReleaseNotesLabel, "RELEASE_NOTES_LABEL");
get(m_pReleaseNotesLink, "RELEASE_NOTES_LINK");
get(m_pDescriptions, "DESCRIPTIONS");
- aSize = LogicToPixel(Size(240, 59), MAP_APPFONT);
+ aSize = LogicToPixel(Size(240, 59), MapUnit::MapAppFont);
m_pDescriptions->set_width_request(aSize.Width());
m_pDescriptions->set_height_request(aSize.Height());
get(m_pOk, "INSTALL");
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index e94db4bb5f6b..6540181139db 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -216,7 +216,7 @@ LicenseDialogImpl::LicenseDialogImpl(
m_pArrow2->Show(false);
get(m_pLicense, "textview");
- Size aSize(m_pLicense->LogicToPixel(Size(290, 170), MAP_APPFONT));
+ Size aSize(m_pLicense->LogicToPixel(Size(290, 170), MapUnit::MapAppFont));
m_pLicense->set_width_request(aSize.Width());
m_pLicense->set_height_request(aSize.Height());
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 1092de8d796d..ef23f2194ede 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -176,7 +176,7 @@ namespace drawinglayer
{
const uno::Reference< rendering::XGraphicDevice > xGraphicDevice;
- aBitmapEx.SetPrefMapMode(MapMode(MAP_100TH_MM));
+ aBitmapEx.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
aBitmapEx.SetPrefSize(Size(basegfx::fround(fWidth), basegfx::fround(fHeight)));
XBitmap = vcl::unotools::xBitmapFromBitmapEx(xGraphicDevice, aBitmapEx);
}
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 1367692b8f3c..6a62af0ad014 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -135,8 +135,8 @@ namespace drawinglayer
{ // #i93162# For painting the control setting a Zoom (using setZoom() at the xControlView)
// is needed to define the font size. Normally this is done in
// ViewObjectContactOfUnoControl::createPrimitive2DSequence by using positionControlForPaint().
- // For some reason the difference between MAP_TWIPS and MAP_100TH_MM still plays
- // a role there so that for Draw/Impress/Calc (the MAP_100TH_MM users) i need to set a zoom
+ // For some reason the difference between MapUnit::MapTwipS and MapUnit::Map100thMM still plays
+ // a role there so that for Draw/Impress/Calc (the MapUnit::Map100thMM users) i need to set a zoom
// here, too. The factor includes the needed scale, but is calculated by pure comparisons. It
// is somehow related to the twips/100thmm relationship.
bool bUserIs100thmm(false);
@@ -160,7 +160,7 @@ namespace drawinglayer
if(pWindow)
{
- if(MAP_100TH_MM == pWindow->GetMapMode().GetMapUnit())
+ if(MapUnit::Map100thMM == pWindow->GetMapMode().GetMapUnit())
{
bUserIs100thmm = true;
}
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index f83939a65cd4..de1c22bba9b0 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -104,7 +104,7 @@ namespace
public:
PropertyHolder()
: maTransformation(),
- maMapUnit(MAP_100TH_MM),
+ maMapUnit(MapUnit::Map100thMM),
maLineColor(),
maFillColor(),
maTextColor(COL_BLACK),
@@ -2661,14 +2661,14 @@ namespace
case MetaActionType::MAPMODE :
{
/** CHECKED, WORKS WELL */
- // the most necessary MapMode to be interpreted is MAP_RELATIVE,
+ // the most necessary MapMode to be interpreted is MapUnit::MapRelative,
// but also the others may occur. Even not yet supported ones
// may need to be added here later
const MetaMapModeAction* pA = static_cast<const MetaMapModeAction*>(pAction);
const MapMode& rMapMode = pA->GetMapMode();
basegfx::B2DHomMatrix aMapping;
- if(MAP_RELATIVE == rMapMode.GetMapUnit())
+ if(MapUnit::MapRelative == rMapMode.GetMapUnit())
{
aMapping = getTransformFromMapMode(rMapMode);
}
@@ -2676,21 +2676,21 @@ namespace
{
switch(rMapMode.GetMapUnit())
{
- case MAP_100TH_MM :
+ case MapUnit::Map100thMM :
{
- if(MAP_TWIP == rPropertyHolders.Current().getMapUnit())
+ if(MapUnit::MapTwip == rPropertyHolders.Current().getMapUnit())
{
- // MAP_TWIP -> MAP_100TH_MM
+ // MapUnit::MapTwip -> MapUnit::Map100thMM
const double fTwipTo100thMm(127.0 / 72.0);
aMapping.scale(fTwipTo100thMm, fTwipTo100thMm);
}
break;
}
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
- if(MAP_100TH_MM == rPropertyHolders.Current().getMapUnit())
+ if(MapUnit::Map100thMM == rPropertyHolders.Current().getMapUnit())
{
- // MAP_100TH_MM -> MAP_TWIP
+ // MapUnit::Map100thMM -> MapUnit::MapTwip
const double f100thMmToTwip(72.0 / 127.0);
aMapping.scale(f100thMmToTwip, f100thMmToTwip);
}
@@ -2733,7 +2733,7 @@ namespace
// convert to target MapUnit if not pixels
aFontSize = OutputDevice::LogicToLogic(
- aFontSize, MAP_PIXEL, rPropertyHolders.Current().getMapUnit());
+ aFontSize, MapUnit::MapPixel, rPropertyHolders.Current().getMapUnit());
aCorrectedFont.SetFontSize(aFontSize);
rPropertyHolders.Current().setFont(aCorrectedFont);
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index b87df2739280..d863d21eb7a5 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -124,7 +124,7 @@ namespace
aRetval = BitmapEx(aContent, aAlpha);
// #i101811# set PrefMapMode and PrefSize at newly created Bitmap
- aRetval.SetPrefMapMode(MAP_PIXEL);
+ aRetval.SetPrefMapMode(MapUnit::MapPixel);
aRetval.SetPrefSize(Size(nWidth, nHeight));
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index ce0c192c44d1..19ad8bdb9fb8 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -818,7 +818,7 @@ namespace drawinglayer
double fFactorY(1.0);
{
- const MapMode aMapMode100thmm(MAP_100TH_MM);
+ const MapMode aMapMode100thmm(MapUnit::Map100thMM);
const Size aBitmapSize(OutputDevice::LogicToLogic(
rGraphicPrimitive.getGraphicObject().GetPrefSize(),
rGraphicPrimitive.getGraphicObject().GetPrefMapMode(), aMapMode100thmm));
@@ -909,7 +909,7 @@ namespace drawinglayer
pPDFControl->Location = aRectLogic;
Size aFontSize(pPDFControl->TextFont.GetFontSize());
- aFontSize = OutputDevice::LogicToLogic(aFontSize, MapMode(MAP_POINT), mpOutputDevice->GetMapMode());
+ aFontSize = OutputDevice::LogicToLogic(aFontSize, MapMode(MapUnit::MapPoint), mpOutputDevice->GetMapMode());
pPDFControl->TextFont.SetFontSize(aFontSize);
mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::Form);
@@ -2033,10 +2033,10 @@ namespace drawinglayer
// prepare view transformation for target renderers
// ATTENTION! Need to apply another scaling because of the potential DPI differences
// between Printer and VDev (mpOutputDevice and aBufferDevice here).
- // To get the DPI, LogicToPixel from (1,1) from MAP_INCH needs to be used.
+ // To get the DPI, LogicToPixel from (1,1) from MapUnit::MapInch needs to be used.
basegfx::B2DHomMatrix aViewTransform(aBufferDevice->GetViewTransformation());
- const Size aDPIOld(mpOutputDevice->LogicToPixel(Size(1, 1), MAP_INCH));
- const Size aDPINew(aBufferDevice->LogicToPixel(Size(1, 1), MAP_INCH));
+ const Size aDPIOld(mpOutputDevice->LogicToPixel(Size(1, 1), MapUnit::MapInch));
+ const Size aDPINew(aBufferDevice->LogicToPixel(Size(1, 1), MapUnit::MapInch));
const double fDPIXChange((double)aDPIOld.getWidth() / (double)aDPINew.getWidth());
const double fDPIYChange((double)aDPIOld.getHeight() / (double)aDPINew.getHeight());
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index ac41e60fbc77..93cc3329b2e6 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -50,7 +50,7 @@ namespace drawinglayer
if(!rSeq.empty() && nDiscreteWidth && nDiscreteHeight)
{
// get destination size in pixels
- const MapMode aMapModePixel(MAP_PIXEL);
+ const MapMode aMapModePixel(MapUnit::MapPixel);
const sal_uInt32 nViewVisibleArea(nDiscreteWidth * nDiscreteHeight);
drawinglayer::primitive2d::Primitive2DContainer aSequence(rSeq);
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 134abc8d7457..a39b465c155b 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -208,7 +208,7 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
Size aSz( 0, static_cast<const SvxFontHeightItem&>(rItem).GetHeight() );
MapUnit eUnit = rPool.GetMetric( rItem.Which() );
MapMode aItemMapMode(eUnit);
- MapMode aPntMap( MAP_POINT );
+ MapMode aPntMap( MapUnit::MapPoint );
aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
aDebStr.append(" Points=");
aDebStr.append(static_cast<sal_Int32>(aSz.Height()));
@@ -278,7 +278,7 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
Size aSz( 0, (short)static_cast<const SvxKerningItem&>(rItem).GetValue() );
MapUnit eUnit = rPool.GetMetric( rItem.Which() );
MapMode aItemMapMode(eUnit);
- MapMode aPntMap( MAP_POINT );
+ MapMode aPntMap( MapUnit::MapPoint );
aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
aDebStr.append(" Points=");
aDebStr.append(static_cast<sal_Int32>(aSz.Height()));
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 491507820060..3c256baa5c4f 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1211,7 +1211,7 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo
SvxFontHeightItem aFontHeightItem( static_cast<const SvxFontHeightItem&>(rSet.Get( *pWhich )) );
long nHeight = aFontHeightItem.GetHeight();
const MapUnit eUnit = rSet.GetPool()->GetMetric( *pWhich );
- nHeight = OutputDevice::LogicToLogic(nHeight * 10, eUnit, MAP_POINT);
+ nHeight = OutputDevice::LogicToLogic(nHeight * 10, eUnit, MapUnit::MapPoint);
FontMetric aFontMetric = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() );
const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontMetric );
@@ -1264,7 +1264,7 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo
if( (nHeight >= 2) && (nHeight <= 9999 ) )
{
- nHeight = OutputDevice::LogicToLogic( nHeight, MAP_POINT, (MapUnit)eUnit ) / 10;
+ nHeight = OutputDevice::LogicToLogic( nHeight, MapUnit::MapPoint, (MapUnit)eUnit ) / 10;
if( nHeight != (long)aFontHeightItem.GetHeight() )
{
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 58620b6efb72..4f7f99bba563 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -607,8 +607,8 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
// Font hight and margins, when LogicToLogic is possible:
MapUnit eUnit = mpEditEngine->GetRefMapMode().GetMapUnit();
- if ( ( eUnit != MAP_PIXEL ) && ( eUnit != MAP_SYSFONT ) &&
- ( eUnit != MAP_APPFONT ) && ( eUnit != MAP_RELATIVE ) )
+ if ( ( eUnit != MapUnit::MapPixel ) && ( eUnit != MapUnit::MapSysFont ) &&
+ ( eUnit != MapUnit::MapAppFont ) && ( eUnit != MapUnit::MapRelative ) )
{
long nPoints = 10;
if ( nHLevel == 1 )
@@ -620,7 +620,7 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
else if ( nHLevel == 4 )
nPoints = 11;
- nPoints = OutputDevice::LogicToLogic( nPoints, MAP_POINT, eUnit );
+ nPoints = OutputDevice::LogicToLogic( nPoints, MapUnit::MapPoint, eUnit );
SvxFontHeightItem aHeightItem( nPoints, 100, EE_CHAR_FONTHEIGHT );
aItems.Put( aHeightItem );
@@ -635,8 +635,8 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) )
{
SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE );
- aULSpaceItem.SetUpper( (sal_uInt16)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) );
- aULSpaceItem.SetLower( (sal_uInt16)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) );
+ aULSpaceItem.SetUpper( (sal_uInt16)OutputDevice::LogicToLogic( 42, MapUnit::Map10thMM, eUnit ) );
+ aULSpaceItem.SetLower( (sal_uInt16)OutputDevice::LogicToLogic( 35, MapUnit::Map10thMM, eUnit ) );
aItems.Put( aULSpaceItem );
}
}
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index bf03c9042241..19a4225073db 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -55,7 +55,7 @@ EditRTFParser::EditRTFParser(
SvxRTFParser(rAttrPool, rIn, nullptr),
aCurSel(aSel),
mpEditEngine(pEditEngine),
- aRTFMapMode(MAP_TWIP),
+ aRTFMapMode(MapUnit::MapTwip),
nDefFont(0),
nDefTab(0),
bLastActionInsertParaBreak(false)
@@ -143,7 +143,7 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r
{
// Problem: DefFont and DefFontHeight
Size aSz( 12, 0 );
- MapMode aPntMode( MAP_POINT );
+ MapMode aPntMode( MapUnit::MapPoint );
MapMode _aEditMapMode(mpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit());
aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode);
SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT );
@@ -495,7 +495,7 @@ void EditRTFParser::CreateStyleSheets()
void EditRTFParser::CalcValue()
{
- const MapUnit eDestUnit = static_cast< MapUnit >( aEditMapMode.GetMapUnit() );
+ const MapUnit eDestUnit = aEditMapMode.GetMapUnit();
const MapUnit eSrcUnit = aRTFMapMode.GetMapUnit();
if (eDestUnit != eSrcUnit)
nTokenValue = OutputDevice::LogicToLogic( (long)nTokenValue, eSrcUnit, eDestUnit );
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index b04a4918e5ba..3d4498084444 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -179,7 +179,7 @@ void lcl_translateTwips(vcl::Window& rParent, vcl::Window& rChild)
if (!rChild.IsMapModeEnabled())
{
MapMode aMapMode(rChild.GetMapMode());
- aMapMode.SetMapUnit(MAP_TWIP);
+ aMapMode.SetMapUnit(MapUnit::MapTwip);
aMapMode.SetScaleX(rParent.GetMapMode().GetScaleX());
aMapMode.SetScaleY(rParent.GetMapMode().GetScaleY());
rChild.SetMapMode(aMapMode);
@@ -351,7 +351,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
if (comphelper::LibreOfficeKit::isActive() && mpViewShell && !pOldRegion)
{
pOutWin->Push(PushFlags::MAPMODE);
- if (pOutWin->GetMapMode().GetMapUnit() == MAP_TWIP)
+ if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip)
{
// Find the parent that is not right
// on top of us to use its offset.
@@ -369,10 +369,10 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
}
}
- bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM;
+ bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM;
Point aOrigin;
- if (pOutWin->GetMapMode().GetMapUnit() == MAP_TWIP)
+ if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip)
// Writer comments: they use editeng, but are separate widgets.
aOrigin = pOutWin->GetMapMode().GetOrigin();
@@ -388,7 +388,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
Rectangle& rStart = aRectangles.front();
Rectangle aStart = Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom());
if (bMm100ToTwip)
- aStart = OutputDevice::LogicToLogic(aStart, MAP_100TH_MM, MAP_TWIP);
+ aStart = OutputDevice::LogicToLogic(aStart, MapUnit::Map100thMM, MapUnit::MapTwip);
aStart.Move(aOrigin.getX(), aOrigin.getY());
mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr());
@@ -396,7 +396,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
Rectangle& rEnd = aRectangles.back();
Rectangle aEnd = Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom());
if (bMm100ToTwip)
- aEnd = OutputDevice::LogicToLogic(aEnd, MAP_100TH_MM, MAP_TWIP);
+ aEnd = OutputDevice::LogicToLogic(aEnd, MapUnit::Map100thMM, MapUnit::MapTwip);
aEnd.Move(aOrigin.getX(), aOrigin.getY());
mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr());
@@ -406,7 +406,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
for (Rectangle & rRectangle : aRectangles)
{
if (bMm100ToTwip)
- rRectangle = OutputDevice::LogicToLogic(rRectangle, MAP_100TH_MM, MAP_TWIP);
+ rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
rRectangle.Move(aOrigin.getX(), aOrigin.getY());
v.push_back(rRectangle.toString().getStr());
}
@@ -444,7 +444,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
void ImpEditView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects)
{
- bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM;
+ bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM;
vcl::Region aRegion;
DrawSelection(aEditSelection, &aRegion);
aRegion.GetRegionRectangles(rLogicRects);
@@ -452,7 +452,7 @@ void ImpEditView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects)
for (Rectangle& rRectangle : rLogicRects)
{
if (bMm100ToTwip)
- rRectangle = OutputDevice::LogicToLogic(rRectangle, MAP_100TH_MM, MAP_TWIP);
+ rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
}
}
@@ -460,7 +460,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
{
if ( rDocPosTopLeft.X() != rDocPosBottomRight.X() )
{
- bool bPixelMode = _pTarget->GetMapMode() == MAP_PIXEL;
+ bool bPixelMode = _pTarget->GetMapMode() == MapUnit::MapPixel;
Point aPnt1( GetWindowPos( rDocPosTopLeft ) );
Point aPnt2( GetWindowPos( rDocPosBottomRight ) );
@@ -1007,9 +1007,9 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight());
// LOK output is always in twips, convert from mm100 if necessary.
- if (pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
- aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP);
- else if (pOutWin->GetMapMode().GetMapUnit() == MAP_TWIP)
+ if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRect = OutputDevice::LogicToLogic(aRect, MapUnit::Map100thMM, MapUnit::MapTwip);
+ else if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip)
{
// Writer comments: they use editeng, but are separate widgets.
Point aOrigin = pOutWin->GetMapMode().GetOrigin();
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 0badeb5a712a..4fd52827283e 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -194,7 +194,7 @@ void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
if ( !pRef )
{
pRefDev = VclPtr<VirtualDevice>::Create();
- pRefDev->SetMapMode( MAP_TWIP );
+ pRefDev->SetMapMode( MapUnit::MapTwip );
bOwnerOfRefDev = true;
} else
{
@@ -219,7 +219,7 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
if ( !bOwnerOfRefDev )
{
pRefDev = VclPtr<VirtualDevice>::Create();
- pRefDev->SetMapMode( MAP_TWIP );
+ pRefDev->SetMapMode( MapUnit::MapTwip );
SetRefDevice( pRefDev );
bOwnerOfRefDev = true;
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index c994c40e65c0..e98c5adda0fc 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -535,7 +535,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
rOutput.WriteChar( '}' ) << endl;
// DefTab:
- MapMode aTwpMode( MAP_TWIP );
+ MapMode aTwpMode( MapUnit::MapTwip );
sal_uInt16 nDefTabTwps = (sal_uInt16) GetRefDevice()->LogicToLogic(
Point( aEditDoc.GetDefTab(), 0 ),
&GetRefMapMode(), &aTwpMode ).X();
@@ -965,7 +965,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
SvxFont aFont;
ContentNode* pNode = aEditDoc.GetObject( nPara );
SeekCursor( pNode, nPos, aFont );
- MapMode aPntMode( MAP_POINT );
+ MapMode aPntMode( MapUnit::MapPoint );
long nFontHeight = GetRefDevice()->LogicToLogic(
aFont.GetFontSize(), &GetRefMapMode(), &aPntMode ).Height();
nFontHeight *=2; // Half Points
@@ -3112,7 +3112,7 @@ bool ImpEditEngine::ImplHasText() const
sal_Int32 ImpEditEngine::LogicToTwips(sal_Int32 n)
{
Size aSz(n, 0);
- MapMode aTwipsMode( MAP_TWIP );
+ MapMode aTwipsMode( MapUnit::MapTwip );
aSz = pRefDev->LogicToLogic( aSz, nullptr, &aTwipsMode );
return aSz.Width();
}
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index ee1749186b8b..c8ff68c37e26 100644
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -39,45 +39,45 @@ OUString GetMetricText( long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const In
switch ( eDestUnit )
{
- case MAP_100TH_MM:
- case MAP_10TH_MM:
- case MAP_MM:
- case MAP_CM:
+ case MapUnit::Map100thMM:
+ case MapUnit::Map10thMM:
+ case MapUnit::MapMM:
+ case MapUnit::MapCM:
{
nRet = (long)OutputDevice::LogicToLogic(
- nVal, (MapUnit)eSrcUnit, (MapUnit)MAP_100TH_MM );
+ nVal, (MapUnit)eSrcUnit, (MapUnit)MapUnit::Map100thMM );
switch ( eDestUnit )
{
- case MAP_100TH_MM: nRet *= 1000; break;
- case MAP_10TH_MM: nRet *= 100; break;
- case MAP_MM: nRet *= 10; break;
+ case MapUnit::Map100thMM: nRet *= 1000; break;
+ case MapUnit::Map10thMM: nRet *= 100; break;
+ case MapUnit::MapMM: nRet *= 10; break;
default: ;//prevent warning
}
break;
}
- case MAP_1000TH_INCH:
- case MAP_100TH_INCH:
- case MAP_10TH_INCH:
- case MAP_INCH:
+ case MapUnit::Map1000thInch:
+ case MapUnit::Map100thInch:
+ case MapUnit::Map10thInch:
+ case MapUnit::MapInch:
{
nRet = OutputDevice::LogicToLogic(
- nVal, (MapUnit)eSrcUnit, (MapUnit)MAP_1000TH_INCH );
+ nVal, (MapUnit)eSrcUnit, (MapUnit)MapUnit::Map1000thInch );
switch ( eDestUnit )
{
- case MAP_1000TH_INCH: nRet *= 1000; break;
- case MAP_100TH_INCH: nRet *= 100; break;
- case MAP_10TH_INCH: nRet *= 10; break;
+ case MapUnit::Map1000thInch: nRet *= 1000; break;
+ case MapUnit::Map100thInch: nRet *= 100; break;
+ case MapUnit::Map10thInch: nRet *= 10; break;
default: ;//prevent warning
}
break;
}
- case MAP_POINT:
- case MAP_TWIP:
- case MAP_PIXEL:
+ case MapUnit::MapPoint:
+ case MapUnit::MapTwip:
+ case MapUnit::MapPixel:
return OUString::number( (long)OutputDevice::LogicToLogic(
nVal, (MapUnit)eSrcUnit, (MapUnit)eDestUnit ));
@@ -86,7 +86,7 @@ OUString GetMetricText( long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const In
return OUString();
}
- if ( MAP_CM == eDestUnit || MAP_INCH == eDestUnit )
+ if ( MapUnit::MapCM == eDestUnit || MapUnit::MapInch == eDestUnit )
{
sal_Int32 nMod = nRet % 10;
@@ -174,32 +174,32 @@ sal_uInt16 GetMetricId( MapUnit eUnit )
switch ( eUnit )
{
- case MAP_100TH_MM:
- case MAP_10TH_MM:
- case MAP_MM:
+ case MapUnit::Map100thMM:
+ case MapUnit::Map10thMM:
+ case MapUnit::MapMM:
nId = RID_SVXITEMS_METRIC_MM;
break;
- case MAP_CM:
+ case MapUnit::MapCM:
nId = RID_SVXITEMS_METRIC_CM;
break;
- case MAP_1000TH_INCH:
- case MAP_100TH_INCH:
- case MAP_10TH_INCH:
- case MAP_INCH:
+ case MapUnit::Map1000thInch:
+ case MapUnit::Map100thInch:
+ case MapUnit::Map10thInch:
+ case MapUnit::MapInch:
nId = RID_SVXITEMS_METRIC_INCH;
break;
- case MAP_POINT:
+ case MapUnit::MapPoint:
nId = RID_SVXITEMS_METRIC_POINT;
break;
- case MAP_TWIP:
+ case MapUnit::MapTwip:
nId = RID_SVXITEMS_METRIC_TWIP;
break;
- case MAP_PIXEL:
+ case MapUnit::MapPixel:
nId = RID_SVXITEMS_METRIC_PIXEL;
break;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index cde00e370a0d..3b6eba562c33 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -484,10 +484,10 @@ void SvxNumberFormat::SetIndentAt( const long nIndentAt )
Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic)
{
- const MapMode aMapMM100( MAP_100TH_MM );
+ const MapMode aMapMM100( MapUnit::Map100thMM );
const Size& rSize = pGraphic->GetPrefSize();
Size aRetSize;
- if ( pGraphic->GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ if ( pGraphic->GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
{
OutputDevice* pOutDev = Application::GetDefaultDevice();
MapMode aOldMap( pOutDev->GetMapMode() );
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx
index 42d49e768369..bde8319d93e7 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -37,7 +37,7 @@ Size SvxPaperInfo::GetPaperSize( Paper ePaper, MapUnit eUnit )
{
PaperInfo aInfo(ePaper);
Size aRet(aInfo.getWidth(), aInfo.getHeight()); // in 100thMM
- return eUnit == MAP_100TH_MM ? aRet : OutputDevice::LogicToLogic(aRet, MAP_100TH_MM, eUnit);
+ return eUnit == MapUnit::Map100thMM ? aRet : OutputDevice::LogicToLogic(aRet, MapUnit::Map100thMM, eUnit);
}
/*------------------------------------------------------------------------
@@ -70,7 +70,7 @@ Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter )
if ( aMap1 == aMap2 )
aPaperSize =
- pPrinter->PixelToLogic( aPaperSize, MapMode( MAP_TWIP ) );
+ pPrinter->PixelToLogic( aPaperSize, MapMode( MapUnit::MapTwip ) );
return aPaperSize;
}
@@ -85,7 +85,7 @@ Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter )
Paper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy )
{
- Size aSize(eUnit == MAP_100TH_MM ? rSize : OutputDevice::LogicToLogic(rSize, eUnit, MAP_100TH_MM));
+ Size aSize(eUnit == MapUnit::Map100thMM ? rSize : OutputDevice::LogicToLogic(rSize, eUnit, MapUnit::Map100thMM));
PaperInfo aInfo(aSize.Width(), aSize.Height());
if (bSloppy)
aInfo.doSloppyFit();
@@ -95,9 +95,9 @@ Paper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy
long SvxPaperInfo::GetSloppyPaperDimension( long nSize )
{
- nSize = OutputDevice::LogicToLogic(nSize, MAP_TWIP, MAP_100TH_MM);
+ nSize = OutputDevice::LogicToLogic(nSize, MapUnit::MapTwip, MapUnit::Map100thMM);
nSize = PaperInfo::sloppyFitPageDimension(nSize);
- return OutputDevice::LogicToLogic(nSize, MAP_100TH_MM, MAP_TWIP);
+ return OutputDevice::LogicToLogic(nSize, MapUnit::Map100thMM, MapUnit::MapTwip);
}
@@ -105,7 +105,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
{
PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
Size aRet(aInfo.getWidth(), aInfo.getHeight());
- return eUnit == MAP_100TH_MM ? aRet : OutputDevice::LogicToLogic(aRet, MAP_100TH_MM, eUnit);
+ return eUnit == MapUnit::Map100thMM ? aRet : OutputDevice::LogicToLogic(aRet, MapUnit::Map100thMM, eUnit);
}
/*------------------------------------------------------------------------
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 410b83a872c4..b7e4446b450b 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -727,13 +727,13 @@ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion )
rStrm.WriteUInt16( GetHeight() );
if( FONTHEIGHT_UNIT_VERSION <= nItemVersion )
- rStrm.WriteUInt16( GetProp() ).WriteUInt16( GetPropUnit() );
+ rStrm.WriteUInt16( GetProp() ).WriteUInt16( (sal_uInt16)GetPropUnit() );
else
{
// When exporting to the old versions the relative information is lost
// when there is no percentage
sal_uInt16 _nProp = GetProp();
- if( MAP_RELATIVE != GetPropUnit() )
+ if( MapUnit::MapRelative != GetPropUnit() )
_nProp = 100;
rStrm.WriteUInt16( _nProp );
}
@@ -744,7 +744,8 @@ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion )
SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
sal_uInt16 nVersion ) const
{
- sal_uInt16 nsize, nprop = 0, nPropUnit = MAP_RELATIVE;
+ sal_uInt16 nsize, nprop = 0;
+ MapUnit nPropUnit = MapUnit::MapRelative;
rStrm.ReadUInt16( nsize );
@@ -758,7 +759,11 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
}
if( FONTHEIGHT_UNIT_VERSION <= nVersion )
- rStrm.ReadUInt16( nPropUnit );
+ {
+ sal_uInt16 nTmp;
+ rStrm.ReadUInt16( nTmp );
+ nPropUnit = (MapUnit)nTmp;
+ }
SvxFontHeightItem* pItem = new SvxFontHeightItem( nsize, 100, Which() );
pItem->SetProp( nprop, (MapUnit)nPropUnit );
@@ -801,22 +806,22 @@ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
aFontHeight.Height = fRoundPoints;
}
- aFontHeight.Prop = (sal_Int16)(MAP_RELATIVE == ePropUnit ? nProp : 100);
+ aFontHeight.Prop = (sal_Int16)(MapUnit::MapRelative == ePropUnit ? nProp : 100);
float fRet = (float)(short)nProp;
switch( ePropUnit )
{
- case MAP_RELATIVE:
+ case MapUnit::MapRelative:
fRet = 0.;
break;
- case MAP_100TH_MM:
+ case MapUnit::Map100thMM:
fRet = convertMm100ToTwip(fRet);
fRet /= 20.;
break;
- case MAP_POINT:
+ case MapUnit::MapPoint:
break;
- case MAP_TWIP:
+ case MapUnit::MapTwip:
fRet /= 20.;
break;
default: ;//prevent warning
@@ -843,24 +848,24 @@ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
case MID_FONTHEIGHT_PROP:
- rVal <<= (sal_Int16)(MAP_RELATIVE == ePropUnit ? nProp : 100);
+ rVal <<= (sal_Int16)(MapUnit::MapRelative == ePropUnit ? nProp : 100);
break;
case MID_FONTHEIGHT_DIFF:
{
float fRet = (float)(short)nProp;
switch( ePropUnit )
{
- case MAP_RELATIVE:
+ case MapUnit::MapRelative:
fRet = 0.;
break;
- case MAP_100TH_MM:
+ case MapUnit::Map100thMM:
fRet = convertMm100ToTwip(fRet);
fRet /= 20.;
break;
- case MAP_POINT:
+ case MapUnit::MapPoint:
break;
- case MAP_TWIP:
+ case MapUnit::MapTwip:
fRet /= 20.;
break;
default: ;//prevent warning
@@ -885,11 +890,11 @@ static sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, M
short nDiff = 0;
switch( eProp )
{
- case MAP_RELATIVE:
+ case MapUnit::MapRelative:
nRet *= 100;
nRet /= nProp;
break;
- case MAP_POINT:
+ case MapUnit::MapPoint:
{
short nTemp = (short)nProp;
nDiff = nTemp * 20;
@@ -897,11 +902,11 @@ static sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, M
nDiff = (short)convertTwipToMm100((long)(nDiff));
}
break;
- case MAP_100TH_MM:
+ case MapUnit::Map100thMM:
//then the core is surely also in 1/100 mm
nDiff = (short)nProp;
break;
- case MAP_TWIP:
+ case MapUnit::MapTwip:
// Here surely TWIP
nDiff = ((short)nProp);
break;
@@ -926,7 +931,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if ( rVal >>= aFontHeight )
{
// Height
- ePropUnit = MAP_RELATIVE;
+ ePropUnit = MapUnit::MapRelative;
nProp = 100;
double fPoint = aFontHeight.Height;
if( fPoint < 0. || fPoint > 10000. )
@@ -944,7 +949,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
break;
case MID_FONTHEIGHT:
{
- ePropUnit = MAP_RELATIVE;
+ ePropUnit = MapUnit::MapRelative;
nProp = 100;
double fPoint = 0;
if(!(rVal >>= fPoint))
@@ -973,7 +978,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
nHeight *= nNew;
nHeight /= 100;
nProp = nNew;
- ePropUnit = MAP_RELATIVE;
+ ePropUnit = MapUnit::MapRelative;
}
break;
case MID_FONTHEIGHT_DIFF:
@@ -990,7 +995,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nCoreDiffValue = (sal_Int16)(fValue * 20.);
nHeight += bConvert ? nCoreDiffValue : convertTwipToMm100(nCoreDiffValue);
nProp = (sal_uInt16)((sal_Int16)fValue);
- ePropUnit = MAP_POINT;
+ ePropUnit = MapUnit::MapPoint;
}
break;
}
@@ -1006,7 +1011,7 @@ bool SvxFontHeightItem::GetPresentation
OUString& rText, const IntlWrapper *pIntl
) const
{
- if( MAP_RELATIVE != ePropUnit )
+ if( MapUnit::MapRelative != ePropUnit )
{
rText = OUString::number( (short)nProp ) +
" " + EE_RESSTR( GetMetricId( ePropUnit ) );
@@ -1016,8 +1021,8 @@ bool SvxFontHeightItem::GetPresentation
else if( 100 == nProp )
{
rText = GetMetricText( (long)nHeight,
- eCoreUnit, MAP_POINT, pIntl ) +
- " " + EE_RESSTR(GetMetricId(MAP_POINT));
+ eCoreUnit, MapUnit::MapPoint, pIntl ) +
+ " " + EE_RESSTR(GetMetricId(MapUnit::MapPoint));
}
else
rText = OUString::number( nProp ) + "%";
@@ -1049,7 +1054,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewP
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
- if( MAP_RELATIVE != eUnit )
+ if( MapUnit::MapRelative != eUnit )
nHeight = nNewHeight + ::ItemToControl( (short)nNewProp, eUnit,
FUNIT_TWIP );
else if( 100 != nNewProp )
@@ -1066,7 +1071,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp,
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
- if( MAP_RELATIVE != eMetric )
+ if( MapUnit::MapRelative != eMetric )
nHeight = nNewHeight +
::ControlToItem( ::ItemToControl((short)nNewProp, eMetric,
FUNIT_TWIP ), FUNIT_TWIP,
@@ -1086,7 +1091,7 @@ void SvxFontHeightItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("height"), BAD_CAST(OString::number(nHeight).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("prop"), BAD_CAST(OString::number(nProp).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("propUnit"), BAD_CAST(OString::number(ePropUnit).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("propUnit"), BAD_CAST(OString::number((int)ePropUnit).getStr()));
xmlTextWriterEndElement(pWriter);
}
@@ -1194,8 +1199,8 @@ bool SvxFontWidthItem::GetPresentation
if ( 100 == nProp )
{
rText = GetMetricText( (long)nWidth,
- eCoreUnit, MAP_POINT, pIntl ) +
- " " + EE_RESSTR(GetMetricId(MAP_POINT));
+ eCoreUnit, MapUnit::MapPoint, pIntl ) +
+ " " + EE_RESSTR(GetMetricId(MapUnit::MapPoint));
}
else
rText = OUString::number( nProp ) + "%";
@@ -2033,8 +2038,8 @@ bool SvxKerningItem::GetPresentation
switch ( ePres )
{
case SfxItemPresentation::Nameless:
- rText = GetMetricText( (long)GetValue(), eCoreUnit, MAP_POINT, pIntl ) +
- " " + EE_RESSTR(GetMetricId(MAP_POINT));
+ rText = GetMetricText( (long)GetValue(), eCoreUnit, MapUnit::MapPoint, pIntl ) +
+ " " + EE_RESSTR(GetMetricId(MapUnit::MapPoint));
return true;
case SfxItemPresentation::Complete:
{
@@ -2049,8 +2054,8 @@ bool SvxKerningItem::GetPresentation
if ( nId )
rText += EE_RESSTR(nId);
rText = rText +
- GetMetricText( (long)GetValue(), eCoreUnit, MAP_POINT, pIntl ) +
- " " + EE_RESSTR(GetMetricId(MAP_POINT));
+ GetMetricText( (long)GetValue(), eCoreUnit, MapUnit::MapPoint, pIntl ) +
+ " " + EE_RESSTR(GetMetricId(MapUnit::MapPoint));
return true;
}
default: ; //prevent warning
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index a7f86b652142..f385cee753d0 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1455,7 +1455,7 @@ Size Outliner::ImplGetBulletSize( sal_Int32 nPara )
}
else
{
- pPara->aBulSize = OutputDevice::LogicToLogic( pFmt->GetGraphicSize(), MAP_100TH_MM, pEditEngine->GetRefDevice()->GetMapMode() );
+ pPara->aBulSize = OutputDevice::LogicToLogic( pFmt->GetGraphicSize(), MapUnit::Map100thMM, pEditEngine->GetRefDevice()->GetMapMode() );
}
}
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 31f7e48ea8e1..60bac11af009 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -103,9 +103,9 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
if( nullptr == pItem && pPool )
pItem = &(pPool->GetDefaultItem( pMap->nWID ));
- const MapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : MAP_100TH_MM;
+ const MapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : MapUnit::Map100thMM;
sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
- if( eMapUnit == MAP_100TH_MM )
+ if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
if(pItem)
@@ -113,7 +113,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
pItem->QueryValue( aVal, nMemberId );
if( pMap->nMemberId & SFX_METRIC_ITEM )
{
- if( eMapUnit != MAP_100TH_MM )
+ if( eMapUnit != MapUnit::Map100thMM )
{
if ( !bDontConvertNegativeValues || SvxUnoCheckForPositiveValue( aVal ) )
SvxUnoConvertToMM( eMapUnit, aVal );
@@ -164,10 +164,10 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa
{
uno::Any aValue( rVal );
- const MapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : MAP_100TH_MM;
+ const MapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : MapUnit::Map100thMM;
// check for needed metric translation
- if( (pMap->nMemberId & SFX_METRIC_ITEM) && eMapUnit != MAP_100TH_MM )
+ if( (pMap->nMemberId & SFX_METRIC_ITEM) && eMapUnit != MapUnit::Map100thMM )
{
if ( !bDontConvertNegativeValues || SvxUnoCheckForPositiveValue( aValue ) )
SvxUnoConvertFromMM( eMapUnit, aValue );
@@ -176,7 +176,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa
SfxPoolItem *pNewItem = pItem->Clone();
sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
- if( eMapUnit == MAP_100TH_MM )
+ if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
if( pNewItem->PutValue( aValue, nMemberId ) )
@@ -200,7 +200,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
// No UsrAny detected yet, generate Default entry and return this
const MapUnit eMapUnit = mrItemPool.GetMetric((sal_uInt16)pMap->nWID);
sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
- if( eMapUnit == MAP_100TH_MM )
+ if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
uno::Any aVal;
SfxItemSet aSet( mrItemPool, pMap->nWID, pMap->nWID);
@@ -226,7 +226,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
if( pMap->nMemberId & SFX_METRIC_ITEM )
{
// check for needed metric translation
- if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != MAP_100TH_MM)
+ if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != MapUnit::Map100thMM)
{
SvxUnoConvertToMM( eMapUnit, aVal );
}
@@ -282,7 +282,7 @@ void SvxUnoConvertToMM( const MapUnit eSourceMapUnit, uno::Any & rMetric ) throw
// map the metric of the itempool to 100th mm
switch(eSourceMapUnit)
{
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
switch( rMetric.getValueTypeClass() )
{
@@ -319,7 +319,7 @@ void SvxUnoConvertFromMM( const MapUnit eDestinationMapUnit, uno::Any & rMetric
{
switch(eDestinationMapUnit)
{
- case MAP_TWIP :
+ case MapUnit::MapTwip :
{
switch( rMetric.getValueTypeClass() )
{
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index c24f55da2a58..8ceb9e2054ca 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -60,7 +60,7 @@ namespace abp
,m_aNewDataSource(_rxORB)
,m_eNewDataSourceType( AST_INVALID )
{
- SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
+ SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapUnit::MapAppFont));
declarePath( PATH_COMPLETE,
{STATE_SELECT_ABTYPE,
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 38188dfd525f..1cc434f8c0d9 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -336,7 +336,7 @@ BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan):
SetText(BIB_RESSTR(ST_TYPE_TITLE));
- Size aSize(LogicToPixel(Size(0, 209), MapMode(MAP_APPFONT)));
+ Size aSize(LogicToPixel(Size(0, 209), MapMode(MapUnit::MapAppFont)));
set_height_request(aSize.Height());
}
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 261918671f31..82ea3ea0d860 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -246,7 +246,7 @@ namespace dbp
m_aContext.xObjectModel = _rxObjectModel;
initContext();
- SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
+ SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapUnit::MapAppFont));
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, false);
}
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index c223cc6dc305..d40f9f31cee4 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -209,7 +209,7 @@ namespace pcr
if ( m_bIndentTitle )
{
- Size aIndent( m_pTheParent->LogicToPixel( Size( 8, 0 ), MAP_APPFONT ) );
+ Size aIndent( m_pTheParent->LogicToPixel( Size( 8, 0 ), MapUnit::MapAppFont ) );
aTitlePos.X() += aIndent.Width();
aTitleSize.Width() -= aIndent.Width();
}
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index bd9758a3fcf5..7036a7b22e8e 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -436,7 +436,7 @@ namespace pcr
void OBrowserListBox::Resize()
{
Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() );
- Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MAP_APPFONT ) );
+ Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MapUnit::MapAppFont ) );
long nHelpWindowHeight = m_nCurrentPreferredHelpHeight = impl_getPrefererredHelpHeight();
bool bPositionHelpWindow = ( nHelpWindowHeight != 0 );
@@ -773,7 +773,7 @@ namespace pcr
if ( HasHelpSection() )
{
- Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MAP_APPFONT ) );
+ Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MapUnit::MapAppFont ) );
nMinHeight += aHelpWindowDistance.Height();
nMinHeight += m_pHelpWindow->GetMinimalHeightPixel();
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 400739aa8e46..61a8a718e472 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -224,7 +224,7 @@ namespace pcr
// build SfxItems with the values
SvxFontItem aFontItem((FontFamily)nFontFamily, aFontName, aFontStyleName, PITCH_DONTKNOW, nFontCharset, CFID_FONT);
- nFontHeight = (float)OutputDevice::LogicToLogic(Size(0, (sal_Int32)nFontHeight), MAP_POINT, MAP_TWIP).Height();
+ nFontHeight = (float)OutputDevice::LogicToLogic(Size(0, (sal_Int32)nFontHeight), MapUnit::MapPoint, MapUnit::MapTwip).Height();
SvxFontHeightItem aSvxFontHeightItem((sal_uInt32)nFontHeight,100,CFID_HEIGHT);
FontWeight eWeight=VCLUnoHelper::ConvertFontWeight(nFontWeight);
@@ -328,7 +328,7 @@ namespace pcr
const SvxFontHeightItem& rSvxFontHeightItem =
static_cast<const SvxFontHeightItem&>(_rSet.Get(CFID_HEIGHT));
- float nHeight = (float)OutputDevice::LogicToLogic(Size(0, rSvxFontHeightItem.GetHeight()), MAP_TWIP, MAP_POINT).Height();
+ float nHeight = (float)OutputDevice::LogicToLogic(Size(0, rSvxFontHeightItem.GetHeight()), MapUnit::MapTwip, MapUnit::MapPoint).Height();
lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_HEIGHT,makeAny(nHeight));
}
diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx
index c0090fa582bd..ddf871e5e752 100644
--- a/extensions/source/propctrlr/inspectorhelpwindow.cxx
+++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx
@@ -81,8 +81,8 @@ namespace pcr
long InspectorHelpWindow::impl_getSpaceAboveTextWindow()
{
- Size aSeparatorSize( LogicToPixel( Size( 0, 8 ), MAP_APPFONT ) );
- Size a3AppFontSize( LogicToPixel( Size( 3, 3 ), MAP_APPFONT ) );
+ Size aSeparatorSize( LogicToPixel( Size( 0, 8 ), MapUnit::MapAppFont ) );
+ Size a3AppFontSize( LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ) );
return aSeparatorSize.Height() + a3AppFontSize.Height();
}
@@ -125,12 +125,12 @@ namespace pcr
void InspectorHelpWindow::Resize()
{
- Size a3AppFont( LogicToPixel( Size( 3, 3 ), MAP_APPFONT ) );
+ Size a3AppFont( LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ) );
Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() );
Rectangle aSeparatorArea( aPlayground );
- aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel( Size( 0, 8 ), MAP_APPFONT ).Height();
+ aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel( Size( 0, 8 ), MapUnit::MapAppFont ).Height();
m_aSeparator->SetPosSizePixel( aSeparatorArea.TopLeft(), aSeparatorArea.GetSize() );
Rectangle aTextArea( aPlayground );
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx
index 73afae7f3649..41fc4b57d982 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -39,7 +39,7 @@ namespace pcr
OSL_PRECOND( m_xListBox.is(), "ListSelectionDialog::ListSelectionDialog: invalid list box!" );
get(m_pEntries, "treeview");
- Size aSize(LogicToPixel(Size(85, 97), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(85, 97), MapUnit::MapAppFont));
m_pEntries->set_width_request(aSize.Width());
m_pEntries->set_height_request(aSize.Height());
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 6a1cb1b5a9ad..90faba32e8fc 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -153,7 +153,7 @@ GridWindow::GridWindow(vcl::Window* pParent)
, m_aHandles()
, m_nDragIndex(0xffffffff)
{
- SetMapMode(MapMode(MAP_PIXEL));
+ SetMapMode(MapMode(MapUnit::MapPixel));
}
void GridWindow::Init(double* pXValues, double* pYValues, int nValues, bool bCutValues, const BitmapEx &rMarkerBitmap)
@@ -197,7 +197,7 @@ void GridWindow::onResize()
Size GridWindow::GetOptimalSize() const
{
- return LogicToPixel(Size(240, 200), MAP_APPFONT);
+ return LogicToPixel(Size(240, 200), MapUnit::MapAppFont);
}
GridDialog::GridDialog(double* pXValues, double* pYValues, int nValues, vcl::Window* pParent )
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 80cdbdadd379..386bd3ef3eb5 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -192,7 +192,7 @@ public:
}
virtual Size GetOptimalSize() const override
{
- Size aSize(LogicToPixel(Size(PREVIEW_WIDTH, PREVIEW_HEIGHT), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(PREVIEW_WIDTH, PREVIEW_HEIGHT), MapUnit::MapAppFont));
aSize.setWidth(aSize.getWidth()+1);
aSize.setHeight(aSize.getHeight()+1);
return aSize;
@@ -226,7 +226,7 @@ SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) :
get(mpScanButton, "scanButton");
get(mpButtonOption, "optionsButton");
get(mpOptionTitle, "optionTitleLabel");
- Size aSize(LogicToPixel(Size(130, 102), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(130, 102), MapUnit::MapAppFont));
mpOptionTitle->set_width_request(aSize.Width());
mpOptionTitle->set_height_request(aSize.Height() / 2);
get(mpOptionDescTxt, "optionsDescLabel");
@@ -952,12 +952,12 @@ void ScanPreview::UpdatePreviewBounds()
void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
{
Window::Paint(rRenderContext, rRect);
- rRenderContext.SetMapMode(MAP_APPFONT);
+ rRenderContext.SetMapMode(MapUnit::MapAppFont);
rRenderContext.SetFillColor(Color(COL_WHITE));
rRenderContext.SetLineColor(Color(COL_WHITE));
rRenderContext.DrawRect(Rectangle(Point(0, 0),
Size(PREVIEW_WIDTH, PREVIEW_HEIGHT)));
- rRenderContext.SetMapMode(MapMode(MAP_PIXEL));
+ rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
// check for sane values
rRenderContext.DrawBitmap(maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmap);
@@ -1244,7 +1244,7 @@ void ScanPreview::DrawDrag(vcl::RenderContext& rRenderContext)
RasterOp eROP = rRenderContext.GetRasterOp();
rRenderContext.SetRasterOp(RasterOp::Invert);
- rRenderContext.SetMapMode(MapMode(MAP_PIXEL));
+ rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
if (mbDragDrawn)
DrawRectangles(rRenderContext, aLastUL, aLastBR);
@@ -1255,7 +1255,7 @@ void ScanPreview::DrawDrag(vcl::RenderContext& rRenderContext)
mbDragDrawn = true;
rRenderContext.SetRasterOp(eROP);
- rRenderContext.SetMapMode(MAP_APPFONT);
+ rRenderContext.SetMapMode(MapUnit::MapAppFont);
}
Point ScanPreview::GetPixelPos( const Point& rIn) const
@@ -1268,12 +1268,12 @@ Point ScanPreview::GetPixelPos( const Point& rIn) const
/ ( maMaxBottomRight.Y() - maMinTopLeft.Y() ) )
);
- return LogicToPixel(aConvert, MAP_APPFONT);
+ return LogicToPixel(aConvert, MapUnit::MapAppFont);
}
Point ScanPreview::GetLogicPos(const Point& rIn) const
{
- Point aConvert = PixelToLogic(rIn, MAP_APPFONT);
+ Point aConvert = PixelToLogic(rIn, MapUnit::MapAppFont);
if( aConvert.X() < 0 )
aConvert.X() = 0;
if( aConvert.X() >= PREVIEW_WIDTH )
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 22841bf1787a..1cd87e5ac097 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -27,8 +27,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
-static MapMode aTWIPSMode( MAP_TWIP );
-static MapMode a100thmmMode( MAP_100TH_MM );
+static MapMode aTWIPSMode( MapUnit::MapTwip );
+static MapMode a100thmmMode( MapUnit::Map100thMM );
static sal_Int32 map100thmm( sal_Int32 n100thMM )
{
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 3db22ad9b8a6..720e8d7e920c 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -45,8 +45,8 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::beans;
-static MapMode aTWIPSMode( MAP_TWIP );
-static MapMode a100thmmMode( MAP_100TH_MM );
+static MapMode aTWIPSMode( MapUnit::MapTwip );
+static MapMode a100thmmMode( MapUnit::Map100thMM );
Point Writer::map( const Point& rPoint ) const
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 5955b8f1035f..29a75abf43d8 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -101,10 +101,10 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi
Size aSize100;
const MapMode aMap( rGraphic.GetPrefMapMode() );
- bool bLogSize = ( aMap.GetMapUnit() != MAP_PIXEL );
+ bool bLogSize = ( aMap.GetMapUnit() != MapUnit::MapPixel );
if( bLogSize )
- aSize100 = OutputDevice::LogicToLogic( rGraphic.GetPrefSize(), aMap, MAP_100TH_MM );
+ aSize100 = OutputDevice::LogicToLogic( rGraphic.GetPrefSize(), aMap, MapUnit::Map100thMM );
bStatus = true;
nLastPercent = 0;
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index cce464e2faff..f8908a680803 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -468,7 +468,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
ImplWriteLong( 0 );
ImplWriteLong( 0 );
Size aSizePoint = OutputDevice::LogicToLogic( pMTF->GetPrefSize(),
- pMTF->GetPrefMapMode(), MAP_POINT );
+ pMTF->GetPrefMapMode(), MapUnit::MapPoint );
ImplWriteLong( aSizePoint.Width() );
ImplWriteLong( aSizePoint.Height() ,PS_RET );
ImplWriteLine( "%%Pages: 0" );
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index b6421501529d..ed955cf947b3 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -199,10 +199,10 @@ bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, FilterConfigItem* pFilterCo
{
Size aDestMapSize( 300, 300 );
const MapMode aMapMode( aBmp.GetPrefMapMode() );
- if ( aMapMode.GetMapUnit() != MAP_PIXEL )
+ if ( aMapMode.GetMapUnit() != MapUnit::MapPixel )
{
const Size aPrefSize( rGraphic.GetPrefSize() );
- aDestMapSize = OutputDevice::LogicToLogic( aPrefSize, aMapMode, MAP_INCH );
+ aDestMapSize = OutputDevice::LogicToLogic( aPrefSize, aMapMode, MapUnit::MapInch );
}
ImplWriteResolution( mnXResPos, aDestMapSize.Width() );
ImplWriteResolution( mnYResPos, aDestMapSize.Height() );
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 43534f9e6629..8c2db883b9db 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -878,9 +878,9 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
// simply set map mode to 1/100-mm (1/10-mm) if the graphic
// does not get not too small (<0.5cm)
if( ( aPrefSize.Width() < 500 ) && ( aPrefSize.Height() < 500 ) )
- rMTF.SetPrefMapMode( MapMode( MAP_10TH_MM ) );
+ rMTF.SetPrefMapMode( MapMode( MapUnit::Map10thMM ) );
else
- rMTF.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
+ rMTF.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
}
pVirDev.disposeAndClear();
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 61906c89bfc7..b2899b543dee 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -129,17 +129,17 @@ static void MakeAsMeta(Graphic &rGraphic)
if( !aSize.Width() || !aSize.Height() )
aSize = Application::GetDefaultDevice()->PixelToLogic(
- aBmp.GetSizePixel(), MAP_100TH_MM );
+ aBmp.GetSizePixel(), MapUnit::Map100thMM );
else
aSize = OutputDevice::LogicToLogic( aSize,
- aBmp.GetPrefMapMode(), MAP_100TH_MM );
+ aBmp.GetPrefMapMode(), MapUnit::Map100thMM );
pVDev->EnableOutput( false );
aMtf.Record( pVDev );
pVDev->DrawBitmap( Point(), aSize, rGraphic.GetBitmap() );
aMtf.Stop();
aMtf.WindStart();
- aMtf.SetPrefMapMode( MAP_100TH_MM );
+ aMtf.SetPrefMapMode( MapUnit::Map100thMM );
aMtf.SetPrefSize( aSize );
rGraphic = aMtf;
}
@@ -514,7 +514,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
pVDev->Pop();
aMtf.Stop();
aMtf.WindStart();
- aMtf.SetPrefMapMode( MAP_POINT );
+ aMtf.SetPrefMapMode( MapUnit::MapPoint );
aMtf.SetPrefSize( Size( nWidth, nHeight ) );
rGraphic = aMtf;
}
@@ -680,13 +680,13 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
aMtf.Record( pVDev );
aSize = aBitmap.GetPrefSize();
if( !aSize.Width() || !aSize.Height() )
- aSize = Application::GetDefaultDevice()->PixelToLogic( aBitmap.GetSizePixel(), MAP_100TH_MM );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aBitmap.GetSizePixel(), MapUnit::Map100thMM );
else
- aSize = OutputDevice::LogicToLogic( aSize, aBitmap.GetPrefMapMode(), MAP_100TH_MM );
+ aSize = OutputDevice::LogicToLogic( aSize, aBitmap.GetPrefMapMode(), MapUnit::Map100thMM );
pVDev->DrawBitmap( Point(), aSize, aBitmap );
aMtf.Stop();
aMtf.WindStart();
- aMtf.SetPrefMapMode( MAP_100TH_MM );
+ aMtf.SetPrefMapMode( MapUnit::Map100thMM );
aMtf.SetPrefSize( aSize );
aGraphic = aMtf;
bHasPreview = bRetValue = true;
@@ -735,7 +735,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
aGfxLink, aGraphic.GetGDIMetaFile() ) ) );
CreateMtfReplacementAction( aMtf, rStream, nOrigPos, nPSSize, nPosWMF, nSizeWMF, nPosTIFF, nSizeTIFF );
aMtf.WindStart();
- aMtf.SetPrefMapMode( MAP_POINT );
+ aMtf.SetPrefMapMode( MapUnit::MapPoint );
aMtf.SetPrefSize( Size( nWidth, nHeight ) );
rGraphic = aMtf;
bRetValue = true;
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 20f367a6e2dc..6e09ee464b2b 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2162,9 +2162,9 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
ReadCoord(b32);
if (nUnitType==0x00 && xr>0 && yr>0)
- aGlobMapMode=MapMode(MAP_INCH,Point(0,0),Fraction(10,xr),Fraction(10,yr));
+ aGlobMapMode=MapMode(MapUnit::MapInch,Point(0,0),Fraction(10,xr),Fraction(10,yr));
else if (nUnitType==0x01 && xr>0 && yr>0)
- aGlobMapMode=MapMode(MAP_CM,Point(0,0),Fraction(10,xr),Fraction(10,yr));
+ aGlobMapMode=MapMode(MapUnit::MapCM,Point(0,0),Fraction(10,xr),Fraction(10,yr));
else
aGlobMapMode=MapMode();
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 2aa8c6f2a5df..9e10aad98498 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -132,7 +132,7 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
/*
// set resolution:
if (nResX!=0 && nResY!=0) {
- MapMode aMapMode(MAP_INCH,Point(0,0),Fraction(1,nResX),Fraction(1,nResY));
+ MapMode aMapMode(MapUnit::MapInch,Point(0,0),Fraction(1,nResX),Fraction(1,nResY));
rBitmap.SetPrefMapMode(aMapMode);
rBitmap.SetPrefSize(Size(nWidth,nHeight));
}
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index a5c5a96ea915..916258c344c2 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1965,7 +1965,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
rGDIMetaFile.Stop();
pVirDev.disposeAndClear();
- rGDIMetaFile.SetPrefMapMode( MapMode( MAP_INCH, Point(), aHRes, aVRes ) );
+ rGDIMetaFile.SetPrefMapMode( MapMode( MapUnit::MapInch, Point(), aHRes, aVRes ) );
rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() );
pPict->SetEndian(nOrigNumberFormat);
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 7f763836f614..a1cd3ab26007 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -151,10 +151,10 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
Point aEmptyPoint;
Fraction aFractX( 1, mnXResFixed >> 16 );
Fraction aFractY( 1, mnYResFixed >> 16 );
- MapMode aMapMode( MAP_INCH, aEmptyPoint, aFractX, aFractY );
- Size aPrefSize = OutputDevice::LogicToLogic( aBitmapSize, aMapMode, MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::MapInch, aEmptyPoint, aFractX, aFractY );
+ Size aPrefSize = OutputDevice::LogicToLogic( aBitmapSize, aMapMode, MapUnit::Map100thMM );
rGraphic.SetPrefSize( aPrefSize );
- rGraphic.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
+ rGraphic.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
}
}
else
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 39f733648247..f7956310a646 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1131,7 +1131,7 @@ void TIFFReader::MakePalCol()
nRX=(sal_uLong)(fXResolution*2.54+0.5);
nRY=(sal_uLong)(fYResolution*2.54+0.5);
}
- MapMode aMapMode(MAP_INCH,Point(0,0),Fraction(1,nRX),Fraction(1,nRY));
+ MapMode aMapMode(MapUnit::MapInch,Point(0,0),Fraction(1,nRX),Fraction(1,nRY));
aBitmap.SetPrefMapMode(aMapMode);
aBitmap.SetPrefSize(Size(nImageWidth,nImageLength));
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index f46aa331fc1a..da6a5cf1168d 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1131,10 +1131,10 @@ void EscherPropertyContainer::CreateLineProperties(
static Size lcl_SizeToEmu(Size aPrefSize, const MapMode& aPrefMapMode)
{
Size aRetSize;
- if (aPrefMapMode == MAP_PIXEL)
- aRetSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM );
+ if (aPrefMapMode == MapUnit::MapPixel)
+ aRetSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
else
- aRetSize = OutputDevice::LogicToLogic( aPrefSize, aPrefMapMode, MAP_100TH_MM );
+ aRetSize = OutputDevice::LogicToLogic( aPrefSize, aPrefMapMode, MapUnit::Map100thMM );
return aRetSize;
}
@@ -1384,7 +1384,7 @@ GraphicObject lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBac
pVDev->SetOutputSizePixel(Size(2, 2));
pVDev->EnableOutput(false);
- pVDev->SetMapMode(MapMode(MAP_100TH_MM));
+ pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
aMtf.Clear();
aMtf.Record(pVDev);
pVDev->SetLineColor();
@@ -1393,7 +1393,7 @@ GraphicObject lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBac
pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch((HatchStyle)rHatch.Style, Color(rHatch.Color), rHatch.Distance, (sal_uInt16)rHatch.Angle));
aMtf.Stop();
aMtf.WindStart();
- aMtf.SetPrefMapMode(MapMode(MAP_100TH_MM));
+ aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
aMtf.SetPrefSize(rRect.GetSize());
return GraphicObject(Graphic(aMtf));
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index c80b387e9aed..010fadfd57f8 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -63,9 +63,9 @@ using namespace ::com::sun::star::style;
ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
: mpEscherEx(&rEx)
- , maMapModeSrc(MAP_100TH_MM)
+ , maMapModeSrc(MapUnit::Map100thMM)
// PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
- , maMapModeDest( MAP_INCH, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) )
+ , maMapModeDest( MapUnit::MapInch, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) )
, mpPicStrm(nullptr)
, mpHostAppData(nullptr)
, mbIsTitlePossible(false)
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 77595942c545..4d0fa1222b50 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -189,15 +189,15 @@ void Impl_OlePres::Write( SvStream & rStm )
DBG_ASSERT( pMtf->GetPrefMapMode().GetOrigin() == Point(),
"Origin-Verschiebung im Mtf" );
MapUnit nMU = pMtf->GetPrefMapMode().GetMapUnit();
- if( MAP_100TH_MM != nMU )
+ if( MapUnit::Map100thMM != nMU )
{
Size aPrefS( pMtf->GetPrefSize() );
Size aS( aPrefS );
- aS = OutputDevice::LogicToLogic( aS, nMU, MAP_100TH_MM );
+ aS = OutputDevice::LogicToLogic( aS, nMU, MapUnit::Map100thMM );
pMtf->Scale( Fraction( aS.Width(), aPrefS.Width() ),
Fraction( aS.Height(), aPrefS.Height() ) );
- pMtf->SetPrefMapMode( MAP_100TH_MM );
+ pMtf->SetPrefMapMode( MapUnit::Map100thMM );
pMtf->SetPrefSize( aS );
}
WriteWindowMetafileBits( rStm, *pMtf );
@@ -1018,7 +1018,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
if ( nLineFlags & 0x10 )
{
- bool bScaleArrows = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP;
+ bool bScaleArrows = rManager.pSdrModel->GetScaleUnit() == MapUnit::MapTwip;
// LineStart
@@ -2628,7 +2628,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
if( eShadowType != mso_shadowOffset && !bNonZeroShadowOffset )
{
//0.12" == 173 twip == 302 100mm
- sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP ? 173: 302;
+ sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MapUnit::MapTwip ? 173: 302;
rSet.Put( makeSdrShadowXDistItem( nDist ) );
rSet.Put( makeSdrShadowYDistItem( nDist ) );
}
@@ -3138,7 +3138,7 @@ void SvxMSDffManager::ScaleEmu( sal_Int32& rVal ) const
sal_uInt32 SvxMSDffManager::ScalePt( sal_uInt32 nVal ) const
{
MapUnit eMap = pSdrModel->GetScaleUnit();
- Fraction aFact( GetMapFactor( MAP_POINT, eMap ).X() );
+ Fraction aFact( GetMapFactor( MapUnit::MapPoint, eMap ).X() );
long aMul = aFact.GetNumerator();
long aDiv = aFact.GetDenominator() * 65536;
aFact = Fraction( aMul, aDiv ); // try again to shorten it
@@ -3158,7 +3158,7 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
// PPT works in units of 576DPI
// WW on the other side uses twips, i.e. 1440DPI.
MapUnit eMap = pSdrModel->GetScaleUnit();
- Fraction aFact( GetMapFactor(MAP_INCH, eMap).X() );
+ Fraction aFact( GetMapFactor(MapUnit::MapInch, eMap).X() );
long nMul=aFact.GetNumerator();
long nDiv=aFact.GetDenominator()*nApplicationScale;
aFact=Fraction(nMul,nDiv); // try again to shorten it
@@ -3170,7 +3170,7 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
// MS-DFF-Properties are mostly given in EMU (English Metric Units)
// 1mm=36000emu, 1twip=635emu
- aFact=GetMapFactor(MAP_100TH_MM,eMap).X();
+ aFact=GetMapFactor(MapUnit::Map100thMM,eMap).X();
nMul=aFact.GetNumerator();
nDiv=aFact.GetDenominator()*360;
aFact=Fraction(nMul,nDiv); // try again to shorten it
@@ -3180,7 +3180,7 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
nEmuDiv=aFact.GetDenominator();
// And something for typographic Points
- aFact=GetMapFactor(MAP_POINT,eMap).X();
+ aFact=GetMapFactor(MapUnit::MapPoint,eMap).X();
nPntMul=aFact.GetNumerator();
nPntDiv=aFact.GetDenominator();
}
@@ -3691,7 +3691,7 @@ static Size lcl_GetPrefSize(const Graphic& rGraf, const MapMode& aWanted)
if (aPrefMapMode == aWanted)
return rGraf.GetPrefSize();
Size aRetSize;
- if (aPrefMapMode == MAP_PIXEL)
+ if (aPrefMapMode == MapUnit::MapPixel)
{
aRetSize = Application::GetDefaultDevice()->PixelToLogic(
rGraf.GetPrefSize(), aWanted);
@@ -3721,7 +3721,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra
sal_uInt32 nTop( 0 ), nBottom( 0 ), nLeft( 0 ), nRight( 0 );
if ( pSet ) // use crop attributes ?
- aCropSize = lcl_GetPrefSize( rGraf, MAP_100TH_MM );
+ aCropSize = lcl_GetPrefSize( rGraf, MapUnit::Map100thMM );
else
{
aCropBitmap = rGraf.GetBitmapEx();
@@ -4423,7 +4423,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
rOutliner.SetUpdateMode( false );
rOutliner.SetText( *pParaObj );
ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::BITMASK);
- pVirDev->SetMapMode( MAP_100TH_MM );
+ pVirDev->SetMapMode( MapUnit::Map100thMM );
sal_Int32 i, nParagraphs = rOutliner.GetParagraphCount();
if ( nParagraphs )
{
@@ -6479,7 +6479,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
aMtf.Scale( (double) aMtfSize100.Width() / aOldSize.Width(),
(double) aMtfSize100.Height() / aOldSize.Height() );
aMtf.SetPrefSize( aMtfSize100 );
- aMtf.SetPrefMapMode( MAP_100TH_MM );
+ aMtf.SetPrefMapMode( MapUnit::Map100thMM );
rData = aMtf;
}
}
@@ -6584,7 +6584,7 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile &
// SV tries to guess a best match for the right value
Size aSize = rMtf.GetPrefSize();
const MapMode& aMMSrc = rMtf.GetPrefMapMode();
- MapMode aMMDst( MAP_100TH_MM );
+ MapMode aMMDst( MapUnit::Map100thMM );
aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst );
aEle.SetSize( aSize );
aEle.SetAspect( nAspect );
@@ -7031,7 +7031,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
else
{
aSz = rVisArea.GetSize();
- aSz = OutputDevice::LogicToLogic( aSz, MapMode( MAP_100TH_MM ), aMapMode );
+ aSz = OutputDevice::LogicToLogic( aSz, MapMode( MapUnit::Map100thMM ), aMapMode );
}
// don't modify the object
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f9a2c19e21db..01b3366e2fd1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2503,7 +2503,7 @@ Size SdrPowerPointImport::GetPageSize() const
long nInchMul = 1, nInchDiv = 1;
if ( bInch )
{ // temporarily convert size (for rounding it) from inch to metric units
- Fraction aFact(GetMapFactor(eMap,MAP_100TH_MM).X());
+ Fraction aFact(GetMapFactor(eMap,MapUnit::Map100thMM).X());
nInchMul = aFact.GetNumerator();
nInchDiv = aFact.GetDenominator();
aRet.Width() = BigMulDiv( aRet.Width(), nInchMul, nInchDiv );
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index df7de8f45f9a..a4efda00bff6 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1621,7 +1621,7 @@ ImplErrorDialog::ImplErrorDialog(const std::set< vcl::PDFWriter::ErrorCode >& rE
get(m_pErrors, "errors");
get(m_pExplanation, "message");
- Size aSize(LogicToPixel(Size(100, 75), MapMode(MAP_APPFONT)));
+ Size aSize(LogicToPixel(Size(100, 75), MapMode(MapUnit::MapAppFont)));
m_pErrors->set_width_request(aSize.Width());
m_pErrors->set_height_request(aSize.Height());
m_pExplanation->set_width_request(aSize.Width());
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 14840bd92f3c..c36be38c62c9 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -199,7 +199,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
rPDFExtOutDevData.SetCurrentPageNumber( nCurrentPage );
GDIMetaFile aMtf;
- const MapMode aMapMode( MAP_100TH_MM );
+ const MapMode aMapMode( MapUnit::Map100thMM );
const Size aMtfSize( aPageSize.Width, aPageSize.Height );
pOut->Push();
@@ -241,7 +241,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
{
bRet = true; // #i18334# nPageCount == 0,
rPDFWriter.NewPage( 10000, 10000 ); // creating dummy page
- rPDFWriter.SetMapMode( MAP_100TH_MM );
+ rPDFWriter.SetMapMode( MapUnit::Map100thMM );
}
}
}
@@ -1014,7 +1014,7 @@ void PDFExport::showErrors( const std::set< vcl::PDFWriter::ErrorCode >& rErrors
bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& rPDFExtOutDevData, const GDIMetaFile& rMtf )
{
- const Size aSizePDF( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_POINT ) );
+ const Size aSizePDF( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapUnit::MapPoint ) );
Point aOrigin;
Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() );
bool bRet = true;
@@ -1071,7 +1071,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
OutputDevice* pDev = rWriter.GetReferenceDevice();
pDev->Push();
pDev->SetFont( aFont );
- pDev->SetMapMode( MapMode( MAP_POINT ) );
+ pDev->SetMapMode( MapMode( MapUnit::MapPoint ) );
int w = 0;
while( ( w = pDev->GetTextWidth( msWatermark ) ) > nTextWidth )
{
@@ -1094,7 +1094,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
pDev->Pop();
rWriter.Push();
- rWriter.SetMapMode( MapMode( MAP_POINT ) );
+ rWriter.SetMapMode( MapMode( MapUnit::MapPoint ) );
rWriter.SetFont( aFont );
rWriter.SetTextColor( COL_LIGHTGREEN );
Point aTextPoint;
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index cce9f68d88cd..1cd7fa3ddc9c 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1967,7 +1967,7 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
aMtf.AddAction( new MetaBmpExScaleAction( aNullPt, aSize, aGraphic.GetBitmapEx() ) );
aMtf.SetPrefSize( aSize );
- aMtf.SetPrefMapMode( MAP_100TH_MM );
+ aMtf.SetPrefMapMode( MapUnit::Map100thMM );
(*mpObjects)[ rxShape ] = ObjectRepresentation( rxShape, aMtf );
}
@@ -2032,14 +2032,14 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
pAction->Duplicate();
aEmbeddedBitmapMtf.AddAction( pAction );
aEmbeddedBitmapMtf.SetPrefSize( aSize );
- aEmbeddedBitmapMtf.SetPrefMapMode( MAP_100TH_MM );
+ aEmbeddedBitmapMtf.SetPrefMapMode( MapUnit::Map100thMM );
mEmbeddedBitmapActionSet.insert( ObjectRepresentation( rxShape, aEmbeddedBitmapMtf ) );
pAction->Duplicate();
aMtf.AddAction( pAction );
}
}
aMtf.SetPrefSize( aSize );
- aMtf.SetPrefMapMode( MAP_100TH_MM );
+ aMtf.SetPrefMapMode( MapUnit::Map100thMM );
mEmbeddedBitmapActionMap[ rxShape ] = ObjectRepresentation( rxShape, aMtf );
}
}
@@ -2324,7 +2324,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
void SVGExport::writeMtf( const GDIMetaFile& rMtf )
{
- const Size aSize( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_MM ) );
+ const Size aSize( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapUnit::MapMM ) );
rtl::OUString aAttr;
Reference< XExtendedDocumentHandler> xExtDocHandler( GetDocHandler(), UNO_QUERY );
@@ -2363,8 +2363,8 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
aObjects.push_back( ObjectRepresentation( Reference< XInterface >(), rMtf ) );
SVGFontExport aSVGFontExport( *this, aObjects );
- Point aPoint100thmm( OutputDevice::LogicToLogic( rMtf.GetPrefMapMode().GetOrigin(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) );
- Size aSize100thmm( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) );
+ Point aPoint100thmm( OutputDevice::LogicToLogic( rMtf.GetPrefMapMode().GetOrigin(), rMtf.GetPrefMapMode(), MapUnit::Map100thMM ) );
+ Size aSize100thmm( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapUnit::Map100thMM ) );
SVGActionWriter aWriter( *this, aSVGFontExport );
aWriter.WriteMetaFile( aPoint100thmm, aSize100thmm, rMtf,
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 366c673bbb79..39b7276f3f7f 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -190,7 +190,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
aFont.SetFontSize( Size( 0, nFontEM ) );
aFont.SetAlignment( ALIGN_BASELINE );
- pVDev->SetMapMode( MAP_100TH_MM );
+ pVDev->SetMapMode( MapUnit::Map100thMM );
pVDev->SetFont( aFont );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", aCurIdStr += OUString::number( ++mnCurFontId ) );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 4e6bb1d71677..e3c74c743ba5 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1768,7 +1768,7 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
{
mpVDev = VclPtr<VirtualDevice>::Create();
mpVDev->EnableOutput( false );
- maTargetMapMode = MAP_100TH_MM;
+ maTargetMapMode = MapUnit::Map100thMM;
maTextWriter.setVirtualDevice( mpVDev, maTargetMapMode );
}
@@ -3773,11 +3773,11 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm,
mpVDev->Push();
- Size aSize( OutputDevice::LogicToLogic( rSize100thmm, MAP_100TH_MM, aMapMode ) );
+ Size aSize( OutputDevice::LogicToLogic( rSize100thmm, MapUnit::Map100thMM, aMapMode ) );
aMapMode.SetScaleX( aFractionX *= Fraction( aSize.Width(), aPrefSize.Width() ) );
aMapMode.SetScaleY( aFractionY *= Fraction( aSize.Height(), aPrefSize.Height() ) );
- Point aOffset( OutputDevice::LogicToLogic( rPos100thmm, MAP_100TH_MM, aMapMode ) );
+ Point aOffset( OutputDevice::LogicToLogic( rPos100thmm, MapUnit::Map100thMM, aMapMode ) );
aMapMode.SetOrigin( aOffset += aMapMode.GetOrigin() );
mpVDev->SetMapMode( aMapMode );
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index d8a7aef7d3ca..1c5a411e567b 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1353,13 +1353,13 @@ void SvxPathControl::Resize()
m_pHeaderBar->SetItemSize(ITEMID_NAME, nFirstColumnWidth);
m_pHeaderBar->SetItemSize(ITEMID_TYPE, 0xFFFF);
long nTabs[] = {2, 0, nFirstColumnWidth};
- m_pFocusCtrl->SetTabs(&nTabs[0], MAP_PIXEL);
+ m_pFocusCtrl->SetTabs(&nTabs[0], MapUnit::MapPixel);
}
}
Size SvxPathControl::GetOptimalSize() const
{
- Size aDefSize(LogicToPixel(Size(150, 0), MapMode(MAP_APPFONT)));
+ Size aDefSize(LogicToPixel(Size(150, 0), MapMode(MapUnit::MapAppFont)));
Size aOptSize(m_pVBox->GetOptimalSize());
long nRowHeight(GetTextHeight());
aOptSize.Height() = nRowHeight * 10;
@@ -1413,7 +1413,7 @@ XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl
static long nTabs[] = {2, 0, nTabSize };
SetSelectionMode( SelectionMode::Multiple );
- SetTabs( &nTabs[0], MAP_PIXEL );
+ SetTabs( &nTabs[0], MapUnit::MapPixel );
SetScrolledHdl( LINK( this, XMLFilterListBox, TabBoxScrollHdl_Impl ) );
SetHighlightRange();
Show();
@@ -1464,7 +1464,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar, void )
long nW = m_pHeaderBar->GetItemSize(i);
aSz.Width() = nW + nTmpSz;
nTmpSz += nW;
- SetTab( i, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() );
+ SetTab( i, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
}
}
}
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 2ce0db903d7f..b961a320d638 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -345,12 +345,12 @@ namespace frm
::Size aSize = pControl->GetSizePixel();
const MapUnit eTargetUnit = pTargetDevice->GetMapMode().GetMapUnit();
- if ( eTargetUnit != MAP_PIXEL )
+ if ( eTargetUnit != MapUnit::MapPixel )
aSize = pTargetDevice->PixelToLogic( aSize );
::Point aPos( _nX, _nY );
// the XView::draw API talks about pixels, always ...
- if ( eTargetUnit != MAP_PIXEL )
+ if ( eTargetUnit != MapUnit::MapPixel )
aPos = pTargetDevice->PixelToLogic( aPos );
pControl->Draw( pTargetDevice, aPos, aSize, DrawFlags::NoControls );
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index 21fce972d948..4a9a217253ef 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -63,7 +63,7 @@ namespace frm
pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
// 12 pt font size
- MapMode aPointMapMode( MAP_POINT );
+ MapMode aPointMapMode( MapUnit::MapPoint );
Size a12PointSize( OutputDevice::LogicToLogic( Size( 12, 0 ), aPointMapMode, aDeviceMapMode ) );
pPool->SetPoolDefaultItem( SvxFontHeightItem( a12PointSize.Width(), 100, EE_CHAR_FONTHEIGHT ) );
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index ca1bda40792f..3bc77a4d52c4 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -581,7 +581,7 @@ namespace frm
// translate coordinates
Point aPos( _rPos );
Size aSize( _rSize );
- if ( aOriginalMapMode.GetMapUnit() == MAP_PIXEL )
+ if ( aOriginalMapMode.GetMapUnit() == MapUnit::MapPixel )
{
aPos = _pDev->PixelToLogic( _rPos, aNormalizedMapMode );
aSize = _pDev->PixelToLogic( _rSize, aNormalizedMapMode );
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 1e9998700cfa..19eaa93fc898 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -326,12 +326,12 @@ namespace frm
{
// by definition, the item should have the unit twip
sal_uLong nHeight = pFontHeightItem->GetHeight();
- if ( _rAttribs.GetPool()->GetMetric( getWhich() ) != MAP_TWIP )
+ if ( _rAttribs.GetPool()->GetMetric( getWhich() ) != MapUnit::MapTwip )
{
nHeight = OutputDevice::LogicToLogic(
Size( 0, nHeight ),
MapMode( (MapUnit)( _rAttribs.GetPool()->GetMetric( getWhich() ) ) ),
- MapMode( MAP_TWIP )
+ MapMode( MapUnit::MapTwip )
).Height();
}
@@ -354,11 +354,11 @@ namespace frm
// correct measurement units
MapUnit eItemMapUnit = pFontHeightItem->GetPropUnit(); (void)eItemMapUnit;
sal_uLong nHeight = pFontHeightItem->GetHeight();
- if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != MAP_TWIP )
+ if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != MapUnit::MapTwip )
{
nHeight = OutputDevice::LogicToLogic(
Size( 0, nHeight ),
- MapMode( (MapUnit)( MAP_TWIP ) ),
+ MapMode( (MapUnit)( MapUnit::MapTwip ) ),
MapMode( (MapUnit)( _rNewAttribs.GetPool()->GetMetric( getWhich() ) ) )
).Height();
}
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index b758523ae951..913106c07500 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -272,7 +272,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
m_pFtFuncName->SetText("");
pParent->get(m_pMEFormula, "ed_formula");
- Size aSize(pParent->LogicToPixel(Size(203, 43), MAP_APPFONT));
+ Size aSize(pParent->LogicToPixel(Size(203, 43), MapUnit::MapAppFont));
m_pMEFormula->set_height_request(aSize.Height());
m_pMEFormula->set_width_request(aSize.Width());
pParent->get(m_pBtnMatrix, "array");
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index 42dd5adc1656..9a20545c9228 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -65,7 +65,7 @@ FuncPage::FuncPage(vcl::Window* pParent,const IFunctionManager* _pFunctionManage
get(m_pLbCategory, "category");
get(m_pLbFunction, "function");
m_pLbFunction->SetStyle(m_pLbFunction->GetStyle() | WB_SORT);
- Size aSize(LogicToPixel(Size(86 , 162), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(86 , 162), MapUnit::MapAppFont));
m_pLbFunction->set_height_request(aSize.Height());
m_pLbFunction->set_width_request(aSize.Width());
m_aHelpId = m_pLbFunction->GetHelpId();
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 7b5c4bcd7ca0..f60862c5c6b5 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -87,7 +87,7 @@ StructPage::StructPage(vcl::Window* pParent):
pSelectedToken ( nullptr )
{
get(m_pTlbStruct, "struct");
- Size aSize(LogicToPixel(Size(86, 162), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(86, 162), MapUnit::MapAppFont));
m_pTlbStruct->set_height_request(aSize.Height());
m_pTlbStruct->set_width_request(aSize.Width());
m_pTlbStruct->SetStyle(m_pTlbStruct->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index c146c5756c06..e3a832bc7a09 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -28,7 +28,7 @@ PlacesListBox_Impl::PlacesListBox_Impl( PlacesListBox* pParent, const OUString&
mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), Size( 600, 16 ) );
long pTabs[] = { 2, 20, 600 };
- SetTabs( &pTabs[0], MAP_PIXEL );
+ SetTabs( &pTabs[0], MapUnit::MapPixel );
mpHeaderBar->InsertItem( COLUMN_NAME, rTitle, 600, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER );
Size aHeadSize = mpHeaderBar->GetSizePixel();
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 9eab3c15cd6f..10140e0d371d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -603,7 +603,7 @@ void SvtFileDialog::Init_Impl
_pImp->_bMultiSelection = true;
_pContainer.reset(VclPtr<CustomContainer>::Create(get<vcl::Window>("container")));
- Size aSize(LogicToPixel(Size(270, 85), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(270, 85), MapUnit::MapAppFont));
_pContainer->set_height_request(aSize.Height());
_pContainer->set_width_request(aSize.Width());
_pContainer->set_hexpand(true);
@@ -2542,7 +2542,7 @@ void SvtFileDialog::AddControls_Impl( )
_pImp->_pPlaces = VclPtr<PlacesListBox>::Create(_pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER);
_pImp->_pPlaces->SetHelpId("SVT_HID_FILESAVE_PLACES_LISTBOX");
- Size aSize(LogicToPixel(Size(50, 85), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(50, 85), MapUnit::MapAppFont));
_pImp->_pPlaces->set_height_request(aSize.Height());
_pImp->_pPlaces->set_width_request(aSize.Width());
_pImp->_pPlaces->SetSizePixel(aSize);
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 9cee811117a2..7d07f6e620f7 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -199,7 +199,7 @@ void SvtUpButton_Impl::Click()
Size SvtUpButton_Impl::GetOptimalSize() const
{
- return LogicToPixel(Size(12, 12), MAP_APPFONT);
+ return LogicToPixel(Size(12, 12), MapUnit::MapAppFont);
}
// SvtExpFileDlg_Impl
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index eef9ac9bf288..416c2f86e7da 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -139,7 +139,7 @@ ComboboxToolbarController::ComboboxToolbarController(
// default dropdown size
::Size aLogicalSize( 8, 160 );
- ::Size aPixelSize = m_pComboBox->LogicToPixel( aLogicalSize, MAP_APPFONT );
+ ::Size aPixelSize = m_pComboBox->LogicToPixel( aLogicalSize, MapUnit::MapAppFont );
m_pComboBox->SetSizePixel( ::Size( nWidth, aPixelSize.Height() ));
m_pToolbar->SetItemWindow( m_nID, m_pComboBox );
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 0831d254237a..fc8003ce58dd 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -271,7 +271,7 @@ sal_Int32 ComplexToolbarController::getFontSizePixel( const vcl::Window* pWindow
// Calculate height of the application font used by window
sal_Int32 nHeight = sal_Int32( rFont.GetFontHeight() );
- ::Size aPixelSize = pWindow->LogicToPixel( ::Size( 0, nHeight ), MAP_APPFONT );
+ ::Size aPixelSize = pWindow->LogicToPixel( ::Size( 0, nHeight ), MapUnit::MapAppFont );
return aPixelSize.Height();
}
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index e0de120fd08b..dc66c3a93e03 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -130,7 +130,7 @@ DropdownToolbarController::DropdownToolbarController(
// default dropdown size
::Size aLogicalSize( 0, 160 );
- ::Size aPixelSize = m_pListBoxControl->LogicToPixel( aLogicalSize, MAP_APPFONT );
+ ::Size aPixelSize = m_pListBoxControl->LogicToPixel( aLogicalSize, MapUnit::MapAppFont );
m_pListBoxControl->SetSizePixel( ::Size( nWidth, aPixelSize.Height() ));
m_pToolbar->SetItemWindow( m_nID, m_pListBoxControl );
diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx
index b27f9985ab06..552f7807b13a 100644
--- a/include/editeng/fhgtitem.hxx
+++ b/include/editeng/fhgtitem.hxx
@@ -74,7 +74,7 @@ public:
}
void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100,
- MapUnit eUnit = MAP_RELATIVE );
+ MapUnit eUnit = MapUnit::MapRelative );
void SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp,
MapUnit eUnit, MapUnit eCoreUnit );
diff --git a/include/editeng/paperinf.hxx b/include/editeng/paperinf.hxx
index 566e741b81e0..8b0d45469454 100644
--- a/include/editeng/paperinf.hxx
+++ b/include/editeng/paperinf.hxx
@@ -36,8 +36,8 @@ class Size;
class EDITENG_DLLPUBLIC SvxPaperInfo
{
public:
- static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP );
- static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP );
+ static Size GetDefaultPaperSize( MapUnit eUnit = MapUnit::MapTwip );
+ static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MapUnit::MapTwip );
static Size GetPaperSize( const Printer* pPrinter );
static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy = false );
static long GetSloppyPaperDimension( long nSize );
diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx
index 500d23868c89..3890e44b6784 100644
--- a/include/svtools/simptabl.hxx
+++ b/include/svtools/simptabl.hxx
@@ -99,7 +99,7 @@ public:
sal_uInt16 nCol=HEADERBAR_APPEND,
HeaderBarItemBits nBits = HeaderBarItemBits::STDSTYLE);
- void SetTabs(const long* pTabs, MapUnit = MAP_APPFONT);
+ void SetTabs(const long* pTabs, MapUnit = MapUnit::MapAppFont);
void ClearHeader();
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index c1cd12fcd1f9..b779494300a3 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -66,11 +66,11 @@ public:
SvTabListBox( vcl::Window* pParent, WinBits = WB_BORDER );
virtual ~SvTabListBox() override;
virtual void dispose() override;
- void SetTabs(const long* pTabs, MapUnit = MAP_APPFONT);
+ void SetTabs(const long* pTabs, MapUnit = MapUnit::MapAppFont);
sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; }
using SvTreeListBox::GetTab;
long GetTab( sal_uInt16 nTab ) const;
- void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MAP_APPFONT );
+ void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MapUnit::MapAppFont );
long GetLogicTab( sal_uInt16 nTab );
virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = nullptr,
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 0a1d716b4c03..e87b9b8fba72 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -186,7 +186,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
public:
NBOTypeMgrBase()
: pSet(nullptr)
- , eCoreUnit(MAP_TWIP)
+ , eCoreUnit(MapUnit::MapTwip)
, aNumCharFmtName(OUString())
, bIsLoading(false)
{}
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index 8b3c01e3054e..0ed14863454c 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -80,14 +80,14 @@ public:
// Default FontHeight is 847. The font height uses logical units (MapUnit/MapFraction
// see below for further details). The default setting 847/100mm corresponds to about
- // 24 Point. If e.g. one would use Twips (SetMapUnit(MAP_TWIP)) (20 Twip = 1 Point)
+ // 24 Point. If e.g. one would use Twips (SetMapUnit(MapUnit::MapTwip)) (20 Twip = 1 Point)
// instead, one would need to set the font height to 480, in order to get a 24 Point height.
static size_t GetFontHeight() { return GetDefaults().nFontHeight; }
// The MapMode is needed for the global Outliner.
// Incidentally, every newly instantiated SdrModel is assigned this MapMode by default.
- // Default MapUnit is MAP_100TH_MM
- static MapUnit GetMapUnit() { return MAP_100TH_MM; }
+ // Default MapUnit is MapUnit::Map100thMM
+ static MapUnit GetMapUnit() { return MapUnit::Map100thMM; }
// Default MapFraction is 1/1.
static Fraction GetMapFraction() { return GetDefaults().aMapFraction; }
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index e07d8e754883..4518a83d1a85 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -328,15 +328,15 @@ public:
void SetPersist( ::comphelper::IEmbeddedHelper *p ) { m_pEmbeddedHelper = p; }
// Unit for the symbol coordination
- // Default is 1 logical unit = 1/100mm (Unit=MAP_100TH_MM, Fract=(1,1)).
+ // Default is 1 logical unit = 1/100mm (Unit=MapUnit::Map100thMM, Fract=(1,1)).
// Examples:
- // MAP_POINT, Fraction(72,1) : 1 log Einh = 72 Point = 1 Inch
- // MAP_POINT, Fraction(1,20) : 1 log Einh = 1/20 Point = 1 Twip
- // MAP_TWIP, Fraction(1,1) : 1 log Einh = 1 Twip
- // MAP_100TH_MM, Fraction(1,10) : 1 log Einh = 1/1000mm
- // MAP_MM, Fraction(1000,1) : 1 log Einh = 1000mm = 1m
- // MAP_CM, Fraction(100,1) : 1 log Einh = 100cm = 1m
- // MAP_CM, Fraction(100000,1): 1 log Einh = 100000cm = 1km
+ // MapUnit::MapPoint, Fraction(72,1) : 1 log Einh = 72 Point = 1 Inch
+ // MapUnit::MapPoint, Fraction(1,20) : 1 log Einh = 1/20 Point = 1 Twip
+ // MapUnit::MapTwip, Fraction(1,1) : 1 log Einh = 1 Twip
+ // MapUnit::Map100thMM, Fraction(1,10) : 1 log Einh = 1/1000mm
+ // MapUnit::MapMM, Fraction(1000,1) : 1 log Einh = 1000mm = 1m
+ // MapUnit::MapCM, Fraction(100,1) : 1 log Einh = 100cm = 1m
+ // MapUnit::MapCM, Fraction(100000,1): 1 log Einh = 100000cm = 1km
// (FWIW: you cannot represent light years).
// The scaling unit is needed for the Engine to serve the Clipboard
// with the correct sizes.
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index 440c821ffcd5..2c96e13916b6 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -261,12 +261,12 @@ SVX_DLLPUBLIC FrPair GetMapFactor(MapUnit eS, MapUnit eD);
FrPair GetMapFactor(FieldUnit eS, FieldUnit eD);
inline bool IsMetric(MapUnit eU) {
- return (eU==MAP_100TH_MM || eU==MAP_10TH_MM || eU==MAP_MM || eU==MAP_CM);
+ return (eU==MapUnit::Map100thMM || eU==MapUnit::Map10thMM || eU==MapUnit::MapMM || eU==MapUnit::MapCM);
}
inline bool IsInch(MapUnit eU) {
- return (eU==MAP_1000TH_INCH || eU==MAP_100TH_INCH || eU==MAP_10TH_INCH || eU==MAP_INCH ||
- eU==MAP_POINT || eU==MAP_TWIP);
+ return (eU==MapUnit::Map1000thInch || eU==MapUnit::Map100thInch || eU==MapUnit::Map10thInch || eU==MapUnit::MapInch ||
+ eU==MapUnit::MapPoint || eU==MapUnit::MapTwip);
}
inline bool IsMetric(FieldUnit eU) {
diff --git a/include/tools/mapunit.hxx b/include/tools/mapunit.hxx
index 660db9183e6f..334e2f5202bf 100644
--- a/include/tools/mapunit.hxx
+++ b/include/tools/mapunit.hxx
@@ -22,10 +22,17 @@
#include <sal/types.h>
-enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM,
- MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH,
- MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT,
- MAP_RELATIVE, MAP_LASTENUMDUMMY };
+enum class MapUnit
+{
+ Map100thMM, Map10thMM, MapMM, MapCM,
+ Map1000thInch, Map100thInch, Map10thInch, MapInch,
+ MapPoint, MapTwip,
+ MapPixel,
+ MapSysFont, MapAppFont,
+ MapRelative,
+ LAST = MapRelative,
+ LASTENUMDUMMY // used as an error return
+};
inline sal_Int64 convertTwipToMm100(sal_Int64 n)
{
diff --git a/include/tools/rc.h b/include/tools/rc.h
index 4566203adeda..8a0428f35a60 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -23,11 +23,6 @@
#include <tools/rcid.h>
#include <o3tl/typed_flags_set.hxx>
-// Defines for all "Window" resources.
-// (Here are all window styles that are not in WinBits)
-#define RSC_EXTRAMAPUNIT 0xFFFF // do not change that value!
-
-
// Attributes in *.src files
enum class RSWND {
NONE = 0x00,
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 61d5a44feeb1..882f6fb3187a 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -114,7 +114,7 @@ public:
void Clear();
bool Mirror( BmpMirrorFlags nMirrorFlags );
void Move( long nX, long nY );
- // additional Move method getting specifics how to handle MapMode( MAP_PIXEL )
+ // additional Move method getting specifics how to handle MapMode( MapUnit::MapPixel )
void Move( long nX, long nY, long nDPIX, long nDPIY );
void Scale( double fScaleX, double fScaleY );
void Scale( const Fraction& rScaleX, const Fraction& rScaleY );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index f03822f142a1..9ccfb6700c2d 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1658,11 +1658,11 @@ public:
pixel, i.e. some output modes such as metafile recordings
might be completely unaffected by this method! Use with
care. Furthermore, if the OutputDevice's MapMode is the
- default (that's MAP_PIXEL), then any pixel offset set is
+ default (that's MapUnit::MapPixel), then any pixel offset set is
ignored also. This might be unintuitive for cases, but would
have been far more fragile to implement. What's more, the
reason why the pixel offset was introduced (avoiding rounding
- errors) does not apply for MAP_PIXEL, because one can always
+ errors) does not apply for MapUnit::MapPixel, because one can always
use the MapMode origin then.
@param rOffset
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 7775ba406f6c..6b0da676108c 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -608,7 +608,7 @@ The following structure describes the permissions used in PDF security
OUString SignReason;
OUString SignContact;
css::lang::Locale DocumentLocale; // defines the document default language
- sal_uInt32 DPIx, DPIy; // how to handle MapMode( MAP_PIXEL )
+ sal_uInt32 DPIx, DPIy; // how to handle MapMode( MapUnit::MapPixel )
// 0 here specifies a default handling
PDFWriter::ColorMode ColorMode;
css::uno::Reference< css::security::XCertificate> SignCertificate;
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx
index 3a0fd641a92f..ee2868f47ff3 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -644,7 +644,7 @@ void LwpPageLayout::GetWidthAndHeight(double& fWidth, double& fHeight)
if (!bScreen)//Printer available
{
Size aPaperSize = pPrinter->GetPaperSize();
- aPaperSize = pPrinter->PixelToLogic( aPaperSize, MapMode( MAP_10TH_MM ) );
+ aPaperSize = pPrinter->PixelToLogic( aPaperSize, MapMode( MapUnit::Map10thMM ) );
fWidth = static_cast<double>(aPaperSize.Width())/100; //cm unit
fHeight = static_cast<double>(aPaperSize.Height())/100;
}
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 3fbe3515bd1b..83a02d4d439b 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1231,7 +1231,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
// Size of the rendering
awt::Size aActualSize = mxShape->getSize();
- Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MAP_CM ) );
+ Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MapUnit::MapCM ) );
double fPixelsPer100thmm = static_cast < double > ( aResolution.Width() ) / 100000.0;
awt::Size aSize = awt::Size( static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Width ) + 0.5 ),
static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 3670664d7aac..a70b8d6f1dcf 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1090,8 +1090,8 @@ void DrawingML::WriteSrcRect( const Reference< XPropertySet >& rXPropSet, const
const MapMode& rMapMode = aGraphicObject.GetPrefMapMode();
// GraphicCrop is in mm100, so in case the original size is in pixels, convert it over.
- if (rMapMode.GetMapUnit() == MAP_PIXEL)
- aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, MapMode(MAP_100TH_MM));
+ if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
+ aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, MapMode(MapUnit::Map100thMM));
if ( GetProperty( rXPropSet, "GraphicCrop" ) )
{
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index d61635991cd6..62b8b34aa2c7 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -364,8 +364,8 @@ ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, ShapeHashMap
, mnPictureIdMax( 1 )
, mnXmlNamespace( nXmlNamespace )
, maFraction( 1, 576 )
- , maMapModeSrc( MAP_100TH_MM )
- , maMapModeDest( MAP_INCH, Point(), maFraction, maFraction )
+ , maMapModeSrc( MapUnit::Map100thMM )
+ , maMapModeDest( MapUnit::MapInch, Point(), maFraction, maFraction )
, mpShapeMap( pShapeMap ? pShapeMap : &maShapeMap )
{
mpURLTransformer.reset(new URLTransformer);
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index 5e9d43293b8a..f4ac89353b57 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -116,7 +116,7 @@ GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, c
// get the metric of the output device
OSL_ENSURE( xFrame.is(), "GraphicHelper::GraphicHelper - cannot get target frame" );
// some default just in case, 100 000 is 1 meter in MM100
- Size aDefault = Application::GetDefaultDevice()->LogicToPixel(Size(100000, 100000), MapMode(MAP_100TH_MM));
+ Size aDefault = Application::GetDefaultDevice()->LogicToPixel(Size(100000, 100000), MapMode(MapUnit::Map100thMM));
maDeviceInfo.PixelPerMeterX = aDefault.Width();
maDeviceInfo.PixelPerMeterY = aDefault.Height();
if( xFrame.is() ) try
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 925141580f18..9f4998fb7807 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -280,7 +280,7 @@ OStyle::OStyle()
:OStyle_PBASE(m_aBHelper)
,m_aSize(21000,29700)
{
- const ::Size aDefaultSize = SvxPaperInfo::GetDefaultPaperSize( MAP_100TH_MM );
+ const ::Size aDefaultSize = SvxPaperInfo::GetDefaultPaperSize( MapUnit::Map100thMM );
m_aSize.Height = aDefaultSize.Height();
m_aSize.Width = aDefaultSize.Width();
@@ -591,7 +591,7 @@ void OReportDefinition::init()
{
m_pImpl->m_pReportModel.reset(new OReportModel(this));
m_pImpl->m_pReportModel->GetItemPool().FreezeIdRanges();
- m_pImpl->m_pReportModel->SetScaleUnit( MAP_100TH_MM );
+ m_pImpl->m_pReportModel->SetScaleUnit( MapUnit::Map100thMM );
SdrLayerAdmin& rAdmin = m_pImpl->m_pReportModel->GetLayerAdmin();
rAdmin.NewStandardLayer(RPT_LAYER_FRONT);
rAdmin.NewLayer("back", RPT_LAYER_BACK);
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index b0a67b116efe..9907c4f6342f 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -518,7 +518,7 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat
{
vcl::Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() );
SvxFont aFont( VCLUnoHelper::CreateFont( _xReportControlFormat->getFontDescriptor(), aBaseFont ) );
- aFont.SetFontHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetFontHeight() ), MAP_POINT, MAP_TWIP ).Height());
+ aFont.SetFontHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetFontHeight() ), MapUnit::MapPoint, MapUnit::MapTwip ).Height());
aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) );
aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) );
aFont.SetColor( _xReportControlFormat->getCharColor() );
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx
index b8d8a1fa7d0c..1ebefd570628 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -156,12 +156,12 @@ short ODateTimeDialog::Execute()
if ( m_pDate->IsChecked() )
{
OUString sDateFormat = m_pDateListBox->GetSelectEntry();
- nWidth = LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MAP_100TH_MM);
+ nWidth = LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MapUnit::Map100thMM);
}
if ( m_pTime->IsChecked() )
{
OUString sDateFormat = m_pTimeListBox->GetSelectEntry();
- nWidth = ::std::max<sal_Int32>(LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MAP_100TH_MM),nWidth);
+ nWidth = ::std::max<sal_Int32>(LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MapUnit::Map100thMM),nWidth);
}
if ( nWidth > 4000 )
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index c3a6b2b84c83..5475a1977987 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -923,7 +923,7 @@ void OFieldExpressionControl::InsertRows( long nRow )
Size OFieldExpressionControl::GetOptimalSize() const
{
- return LogicToPixel(Size(106, 75), MAP_APPFONT);
+ return LogicToPixel(Size(106, 75), MapUnit::MapAppFont);
}
// class OGroupsSortingDialog
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 2b1290c7b578..082c544de07a 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -865,7 +865,7 @@ void NavigatorTree::UserData::_disposing(const lang::EventObject& _rSource)
Size NavigatorTree::GetOptimalSize() const
{
- return LogicToPixel(Size(100, 70), MAP_APPFONT);
+ return LogicToPixel(Size(100, 70), MapUnit::MapAppFont);
}
// class ONavigatorImpl
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 101b30173c7f..5ddd32dead06 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -239,7 +239,7 @@ namespace
aFontItem.PutValue( uno::makeAny( aControlFont ), 0 );
_rItemSet.Put(aFontItem);
- _rItemSet.Put(SvxFontHeightItem(OutputDevice::LogicToLogic(Size(0, (sal_Int32)aFont.GetFontHeight()), MAP_POINT, MAP_TWIP).Height(),100,_nFontHeight));
+ _rItemSet.Put(SvxFontHeightItem(OutputDevice::LogicToLogic(Size(0, (sal_Int32)aFont.GetFontHeight()), MapUnit::MapPoint, MapUnit::MapTwip).Height(),100,_nFontHeight));
lang::Locale aLocale;
switch(_nWhich)
{
@@ -390,7 +390,7 @@ namespace
if ( SfxItemState::SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && dynamic_cast< const SvxFontHeightItem *>( pItem ) != nullptr)
{
const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem);
- aNewFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MAP_TWIP, MAP_POINT).Height());
+ aNewFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MapUnit::MapTwip, MapUnit::MapPoint).Height());
}
if ( SfxItemState::SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && dynamic_cast< const SvxPostureItem *>( pItem ) != nullptr)
{
@@ -703,7 +703,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
};
SfxItemPool* pPool( new SfxItemPool(OUString("ReportCharProperties"), ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, pDefaults) );
- // not needed for font height pPool->SetDefaultMetric( MAP_100TH_MM ); // ripped, don't understand why
+ // not needed for font height pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
bool bSuccess = false;
try
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index eb4383f9a612..6b21aec80a9f 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -103,7 +103,7 @@ ODesignView::ODesignView( vcl::Window* pParent,
SetHelpId(UID_RPT_RPT_APP_VIEW);
ImplInitSettings();
- SetMapMode( MapMode( MAP_100TH_MM ) );
+ SetMapMode( MapMode( MapUnit::Map100thMM ) );
// now create the task pane on the right side :-)
m_pTaskPane = VclPtr<OTaskWindow>::Create(this);
@@ -161,7 +161,7 @@ void ODesignView::dispose()
void ODesignView::initialize()
{
- SetMapMode( MapMode( MAP_100TH_MM ) );
+ SetMapMode( MapMode( MapUnit::Map100thMM ) );
m_aScrollWindow->initialize();
m_aScrollWindow->Show();
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 453dce3c726a..dbdadccecd50 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2420,7 +2420,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
pPool->SetDefaults(pDefaults);
- pPool->SetDefaultMetric( MAP_100TH_MM ); // ripped, don't understand why
+ pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
try
@@ -4217,7 +4217,7 @@ void OReportController::openZoomDialog()
0
};
SfxItemPool* pPool( new SfxItemPool(OUString("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, pDefaults) );
- pPool->SetDefaultMetric( MAP_100TH_MM ); // ripped, don't understand why
+ pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
try
{
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 07c604f43971..ebc995e2b74a 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -90,7 +90,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
{
//EnableChildTransparentMode();
SetHelpId(HID_REPORTSECTION);
- SetMapMode(MapMode(MAP_100TH_MM));
+ SetMapMode(MapMode(MapUnit::Map100thMM));
SetParentClipMode(ParentClipMode::Clip);
EnableChildTransparentMode( false );
SetPaintTransparent( false );
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index b1bcc1429459..949a83289c3b 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -64,7 +64,7 @@ OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView)
,m_pObjFac( new DlgEdFactory() )
{
SetHelpId(UID_RPT_REPORTWINDOW);
- SetMapMode( MapMode( MAP_100TH_MM ) );
+ SetMapMode( MapMode( MapUnit::Map100thMM ) );
m_aViewsWindow->Show();
@@ -174,7 +174,7 @@ void OReportWindow::Resize()
const Size aTotalOutputSize = GetOutputSizePixel();
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100);
- const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, 0 ), MAP_APPFONT );
+ const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, 0 ), MapUnit::MapAppFont );
Point aStartPoint((long)aStartWidth + aOffset.X(),0);
uno::Reference<report::XReportDefinition> xReportDefinition = getReportView()->getController().getReportDefinition();
const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
@@ -397,7 +397,7 @@ void OReportWindow::fillControlModelSelection(::std::vector< uno::Reference< uno
sal_Int32 OReportWindow::impl_getRealPixelWidth() const
{
const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width;
- MapMode aMap( MAP_100TH_MM );
+ MapMode aMap( MapUnit::Map100thMM );
const Size aPageSize = LogicToPixel(Size(nPaperWidth,0),aMap);
return aPageSize.Width() + REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH + SECTION_OFFSET;
}
@@ -416,7 +416,7 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const
case SvxZoomType::WHOLEPAGE:
{
nZoom = (sal_uInt16)(long)Fraction(aSize.Width()*100,impl_getRealPixelWidth());
- MapMode aMap( MAP_100TH_MM );
+ MapMode aMap( MapUnit::Map100thMM );
const Size aHeight = m_aViewsWindow->LogicToPixel(m_aViewsWindow->PixelToLogic(Size(0,GetTotalHeight() + m_aHRuler->GetSizePixel().Height())),aMap);
nZoom = ::std::min(nZoom,(sal_uInt16)(long)Fraction(aSize.Height()*100,aHeight.Height()));
}
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index e80990dc0d80..55cf12a58eb8 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -53,12 +53,12 @@ OScrollWindowHelper::OScrollWindowHelper( ODesignView* _pDesignView)
,m_aReportWindow(VclPtr<rptui::OReportWindow>::Create(this,m_pParent))
,m_pReportDefinitionMultiPlexer(nullptr)
{
- SetMapMode( MapMode( MAP_100TH_MM ) );
+ SetMapMode( MapMode( MapUnit::Map100thMM ) );
impl_initScrollBar( *m_aHScroll.get() );
impl_initScrollBar( *m_aVScroll.get() );
- m_aReportWindow->SetMapMode( MapMode( MAP_100TH_MM ) );
+ m_aReportWindow->SetMapMode( MapMode( MapUnit::Map100thMM ) );
m_aReportWindow->Show();
// normally we should be SCROLL_PANE
@@ -170,7 +170,7 @@ Size OScrollWindowHelper::ResizeScrollBars()
else
m_aCornerWin->Hide();
- const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MAP_APPFONT );
+ const Point aOffset = LogicToPixel( Point( SECTION_OFFSET, SECTION_OFFSET ), MapUnit::MapAppFont );
// resize scrollbars and set their ranges
{
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100);
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index c94d04032432..9d9230c17835 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -57,7 +57,7 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep
SetMapMode( rMapMode );
ImplInitSettings();
// TRY
- m_aSplitter->SetMapMode( MapMode( MAP_100TH_MM ) );
+ m_aSplitter->SetMapMode( MapMode( MapUnit::Map100thMM ) );
m_aSplitter->SetStartSplitHdl(LINK(this, OSectionWindow,StartSplitHdl));
m_aSplitter->SetSplitHdl(LINK(this, OSectionWindow,SplitHdl));
m_aSplitter->SetEndSplitHdl(LINK(this, OSectionWindow,EndSplitHdl));
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 561676a843cd..6e2be36bc776 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -173,7 +173,7 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow)
, m_bInUnmark(false)
{
SetPaintTransparent(true);
- SetMapMode(MapMode(MAP_100TH_MM));
+ SetMapMode(MapMode(MapUnit::Map100thMM));
m_aColorConfig.AddListener(this);
ImplInitSettings();
}
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 4a31d1421a7c..4edcf4adf6f9 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -46,6 +46,7 @@ enum class ButtonType;
enum class WindowAlign;
enum class SfxStyleFamily;
enum class RSWND;
+enum class MapUnit;
struct WriteRcContext
{
@@ -154,6 +155,7 @@ class RscTypCont
inline void SETCONST( RscConst *p1, const char * p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, const char * p2, WindowAlign p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
+ inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
void InitLangType();
RscEnum * InitFieldUnitsType();
RscEnum * InitColor();
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index c397ae4ff823..e035ea97405d 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -228,20 +228,19 @@ RscEnum * RscTypCont::InitMapUnit()
RscEnum * pMapUnit;
pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
- SETCONST( pMapUnit, "MAP_PIXEL", MAP_PIXEL );
- SETCONST( pMapUnit, "MAP_SYSFONT", MAP_SYSFONT );
- SETCONST( pMapUnit, "MAP_100TH_MM", MAP_100TH_MM );
- SETCONST( pMapUnit, "MAP_10TH_MM", MAP_10TH_MM );
- SETCONST( pMapUnit, "MAP_MM", MAP_MM );
- SETCONST( pMapUnit, "MAP_CM", MAP_CM );
- SETCONST( pMapUnit, "MAP_1000TH_INCH", MAP_1000TH_INCH );
- SETCONST( pMapUnit, "MAP_100TH_INCH", MAP_100TH_INCH );
- SETCONST( pMapUnit, "MAP_10TH_INCH", MAP_10TH_INCH );
- SETCONST( pMapUnit, "MAP_INCH", MAP_INCH );
- SETCONST( pMapUnit, "MAP_POINT", MAP_POINT );
- SETCONST( pMapUnit, "MAP_TWIP", MAP_TWIP );
- SETCONST( pMapUnit, "MAP_APPFONT", MAP_APPFONT );
- SETCONST( pMapUnit, "MAP_SV", RSC_EXTRAMAPUNIT );
+ SETCONST( pMapUnit, "MAP_PIXEL", MapUnit::MapPixel );
+ SETCONST( pMapUnit, "MAP_SYSFONT", MapUnit::MapSysFont );
+ SETCONST( pMapUnit, "MAP_100TH_MM", MapUnit::Map100thMM );
+ SETCONST( pMapUnit, "MAP_10TH_MM", MapUnit::Map10thMM );
+ SETCONST( pMapUnit, "MAP_MM", MapUnit::MapMM );
+ SETCONST( pMapUnit, "MAP_CM", MapUnit::MapCM );
+ SETCONST( pMapUnit, "MAP_1000TH_INCH", MapUnit::Map1000thInch );
+ SETCONST( pMapUnit, "MAP_100TH_INCH", MapUnit::Map100thInch );
+ SETCONST( pMapUnit, "MAP_10TH_INCH", MapUnit::Map10thInch );
+ SETCONST( pMapUnit, "MAP_INCH", MapUnit::MapInch );
+ SETCONST( pMapUnit, "MAP_POINT", MapUnit::MapPoint );
+ SETCONST( pMapUnit, "MAP_TWIP", MapUnit::MapTwip );
+ SETCONST( pMapUnit, "MAP_APPFONT", MapUnit::MapAppFont );
return pMapUnit;
}
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 3cc09b014f2b..85ab7e6cb719 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -357,7 +357,7 @@ long ScColumn::GetNeededSize(
// the font is not reset each time with !bEditEngine
vcl::Font aOldFont = pDev->GetFont();
- MapMode aHMMMode( MAP_100TH_MM, Point(), rZoomX, rZoomY );
+ MapMode aHMMMode( MapUnit::Map100thMM, Point(), rZoomX, rZoomY );
// save in document ?
ScFieldEditEngine* pEngine = pDocument->CreateFieldEditEngine();
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 94d177cac43e..1dedbae775a9 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -920,9 +920,9 @@ MapUnit ScDocumentPool::GetMetric( sal_uInt16 nWhich ) const
{
// Own attributes in Twips, everything else in 1/100 mm
if ( nWhich >= ATTR_STARTINDEX && nWhich <= ATTR_ENDINDEX )
- return MAP_TWIP;
+ return MapUnit::MapTwip;
else
- return MAP_100TH_MM;
+ return MapUnit::Map100thMM;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index de91bf751f79..d2af6d209bd7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -504,7 +504,7 @@ ScFieldEditEngine& ScDocument::GetEditEngine()
pEditEngine = new ScFieldEditEngine(this, GetEnginePool(), GetEditPool());
pEditEngine->SetUpdateMode( false );
pEditEngine->EnableUndo( false );
- pEditEngine->SetRefMapMode( MAP_100TH_MM );
+ pEditEngine->SetRefMapMode( MapUnit::Map100thMM );
ApplyAsianEditSettings( *pEditEngine );
}
return *pEditEngine;
@@ -517,7 +517,7 @@ ScNoteEditEngine& ScDocument::GetNoteEngine()
pNoteEngine = new ScNoteEditEngine( GetEnginePool(), GetEditPool() );
pNoteEngine->SetUpdateMode( false );
pNoteEngine->EnableUndo( false );
- pNoteEngine->SetRefMapMode( MAP_100TH_MM );
+ pNoteEngine->SetRefMapMode( MapUnit::Map100thMM );
ApplyAsianEditSettings( *pNoteEngine );
const SfxItemSet& rItemSet = GetDefPattern()->GetItemSet();
SfxItemSet* pEEItemSet = new SfxItemSet( pNoteEngine->GetEmptyItemSet() );
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index e0992b534b6c..e99e32f9df70 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -137,7 +137,7 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist)
pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) );
pPrinter = VclPtr<SfxPrinter>::Create( pSet );
- pPrinter->SetMapMode( MAP_100TH_MM );
+ pPrinter->SetMapMode( MapUnit::Map100thMM );
UpdateDrawPrinter();
pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
}
@@ -197,7 +197,7 @@ VirtualDevice* ScDocument::GetVirtualDevice_100th_mm()
#endif
pVirtualDevice_100th_mm->SetReferenceDevice(VirtualDevice::RefDevMode::MSO1);
MapMode aMapMode( pVirtualDevice_100th_mm->GetMapMode() );
- aMapMode.SetMapUnit( MAP_100TH_MM );
+ aMapMode.SetMapUnit( MapUnit::Map100thMM );
pVirtualDevice_100th_mm->SetMapMode( aMapMode );
}
return pVirtualDevice_100th_mm;
@@ -591,9 +591,9 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
{
pDev = GetPrinter();
aScope.setOldMapMode(pDev->GetMapMode());
- pDev->SetMapMode( MAP_PIXEL ); // Important for GetNeededSize
+ pDev->SetMapMode( MapUnit::MapPixel ); // Important for GetNeededSize
- Point aPix1000 = pDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aPix1000 = pDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
nPPTX = aPix1000.X() / 1000.0;
nPPTY = aPix1000.Y() / 1000.0;
}
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 711d0a03c532..8cdf00e9eb47 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -505,7 +505,7 @@ bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
pThis->ExtendMerge( 0,nStartRow, nExtendCol,nTmpRow, nTab ); // no Refresh, incl. Attrs
OutputDevice* pDev = pThis->GetPrinter();
- pDev->SetMapMode( MAP_PIXEL ); // Important for GetNeededSize
+ pDev->SetMapMode( MapUnit::MapPixel ); // Important for GetNeededSize
ExtendPrintArea( pDev, nTab, 0, nStartRow, nExtendCol, nEndRow );
if ( nExtendCol >= nStartCol )
return false;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index d9ef0b5659a0..1396caa9861c 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -268,9 +268,9 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) :
SetSwapGraphics();
- SetScaleUnit(MAP_100TH_MM);
+ SetScaleUnit(MapUnit::Map100thMM);
SfxItemPool& rPool = GetItemPool();
- rPool.SetDefaultMetric(MAP_100TH_MM);
+ rPool.SetDefaultMetric(MapUnit::Map100thMM);
SvxFrameDirectionItem aModeItem( FRMDIR_ENVIRONMENT, EE_PARA_WRITINGDIR );
rPool.SetPoolDefaultItem( aModeItem );
@@ -2042,7 +2042,7 @@ ScIMapInfo* ScDrawLayer::GetIMapInfo( SdrObject* pObj )
IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
const Point& rWinPoint, const vcl::Window& rCmpWnd )
{
- const MapMode aMap100( MAP_100TH_MM );
+ const MapMode aMap100( MapUnit::Map100thMM );
MapMode aWndMode = rCmpWnd.GetMapMode();
Point aRelPoint( rCmpWnd.LogicToLogic( rWinPoint, &aWndMode, &aMap100 ) );
Rectangle aLogRect = rCmpWnd.LogicToLogic( pObj->GetLogicRect(), &aWndMode, &aMap100 );
@@ -2073,7 +2073,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
if ( rGeo.nShearAngle )
ShearPoint( aRelPoint, aLogRect.TopLeft(), -rGeo.nTan );
- if ( rGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ if ( rGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
aGraphSize = rCmpWnd.PixelToLogic( rGraphic.GetPrefSize(),
aMap100 );
else
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 9966874e313d..1436ecf2a587 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -530,7 +530,7 @@ void ScGlobal::Init()
void ScGlobal::InitPPT()
{
OutputDevice* pDev = Application::GetDefaultDevice();
- Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MAP_TWIP );
+ Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MapUnit::MapTwip );
nScreenPPTX = aPix1000.X() / 100000.0;
nScreenPPTY = aPix1000.Y() / 100000.0;
}
@@ -562,12 +562,12 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
OutputDevice* pDefaultDev = Application::GetDefaultDevice();
ScopedVclPtrInstance< VirtualDevice > pVirtWindow( *pDefaultDev );
- pVirtWindow->SetMapMode(MAP_PIXEL);
+ pVirtWindow->SetMapMode(MapUnit::MapPixel);
vcl::Font aDefFont;
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pVirtWindow); // Font color doesn't matter here
pVirtWindow->SetFont(aDefFont);
sal_uInt16 nTest = static_cast<sal_uInt16>(
- pVirtWindow->PixelToLogic(Size(0, pVirtWindow->GetTextHeight()), MAP_TWIP).Height());
+ pVirtWindow->PixelToLogic(Size(0, pVirtWindow->GetTextHeight()), MapUnit::MapTwip).Height());
if (nTest > nDefFontHeight)
nDefFontHeight = nTest;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 57e66f692a9a..449071a2cff7 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -391,8 +391,8 @@ void ScPatternAttr::GetFont(
aFraction = *pScale;
Size aSize( 0, (long) nFontHeight );
MapMode aDestMode = pOutDev->GetMapMode();
- MapMode aSrcMode( MAP_TWIP, Point(), aFraction, aFraction );
- if (aDestMode.GetMapUnit() == MAP_PIXEL && pOutDev->GetDPIX() > 0)
+ MapMode aSrcMode( MapUnit::MapTwip, Point(), aFraction, aFraction );
+ if (aDestMode.GetMapUnit() == MapUnit::MapPixel && pOutDev->GetDPIX() > 0)
aEffSize = pOutDev->LogicToPixel( aSize, aSrcMode );
else
{
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 02a29c377dae..28b5ae0a9cb8 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -51,7 +51,7 @@ SfxItemPool* ScPoolHelper::GetEditPool() const
if ( !pEditPool )
{
pEditPool = EditEngine::CreatePool();
- pEditPool->SetDefaultMetric( MAP_100TH_MM );
+ pEditPool->SetDefaultMetric( MapUnit::Map100thMM );
pEditPool->FreezeIdRanges();
pEditPool->SetFileFormatVersion( SOFFICE_FILEFORMAT_50 ); // used in ScGlobal::EETextObjEqual
}
@@ -62,7 +62,7 @@ SfxItemPool* ScPoolHelper::GetEnginePool() const
if ( !pEnginePool )
{
pEnginePool = EditEngine::CreatePool();
- pEnginePool->SetDefaultMetric( MAP_100TH_MM );
+ pEnginePool->SetDefaultMetric( MapUnit::Map100thMM );
pEnginePool->FreezeIdRanges();
} // ifg ( pEnginePool )
return pEnginePool;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index a38889d3a02f..1ad6ebe3c147 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1738,7 +1738,7 @@ void ScTable::ExtendPrintArea( OutputDevice* pDev,
return;
}
- Point aPix1000 = pDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aPix1000 = pDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
double nPPTX = aPix1000.X() / 1000.0;
double nPPTY = aPix1000.Y() / 1000.0;
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index c2d1d72ebfc4..0922d00741dd 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -331,7 +331,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT
else
{
MapMode aMode = pDev->GetMapMode();
- pDev->SetMapMode( MAP_PIXEL );
+ pDev->SetMapMode( MapUnit::MapPixel );
long nTextHeight = pDoc->GetNeededSize( nCol, nRow, nTab,
pDev, nPPTX, nPPTY, aZoomX, aZoomY, false );
@@ -711,7 +711,7 @@ ScTabEditEngine::ScTabEditEngine( const ScPatternAttr& rPattern,
void ScTabEditEngine::Init( const ScPatternAttr& rPattern )
{
- SetRefMapMode(MAP_100TH_MM);
+ SetRefMapMode(MapUnit::Map100thMM);
SfxItemSet* pEditDefaults = new SfxItemSet( GetEmptyItemSet() );
rPattern.FillEditItemSet( pEditDefaults );
SetDefaults( pEditDefaults );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 87da7230f60c..aca7342beeab 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2246,7 +2246,7 @@ void ScInterpreter::ScCell()
vcl::Font aOldFont( pPrinter->GetFont() );
vcl::Font aDefFont;
- pPrinter->SetMapMode( MAP_TWIP );
+ pPrinter->SetMapMode( MapUnit::MapTwip );
// font color doesn't matter here
pDok->GetDefPattern()->GetFont( aDefFont, SC_AUTOCOL_BLACK, pPrinter );
pPrinter->SetFont( aDefFont );
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 1c03ccec29d6..181eb60dc20e 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -3311,7 +3311,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
Reference< XChartDocument > const & xChartDoc, const Rectangle& rChartRect ) :
XclExpChGroupBase( XclExpChRoot( rRoot, *this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 )
{
- Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MAP_100TH_MM ), MapMode( MAP_POINT ) );
+ Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MapUnit::Map100thMM ), MapMode( MapUnit::MapPoint ) );
// rectangle is stored in 16.16 fixed-point format
maRect.mnX = maRect.mnY = 0;
maRect.mnWidth = static_cast< sal_Int32 >( aPtSize.Width() << 16 );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 6e2ee0622e64..c5a66a5a2e5b 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -258,7 +258,7 @@ void XclExpDffAnchorBase::SetFlags( const SdrObject& rSdrObj )
void XclExpDffAnchorBase::SetSdrObject( const SdrObject& rSdrObj )
{
ImplSetFlags( rSdrObj );
- ImplCalcAnchorRect( rSdrObj.GetCurrentBoundRect(), MAP_100TH_MM );
+ ImplCalcAnchorRect( rSdrObj.GetCurrentBoundRect(), MapUnit::Map100thMM );
}
void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const
@@ -271,7 +271,7 @@ void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const
void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const Rectangle& rRect )
{
// the passed rectangle is in twips
- ImplCalcAnchorRect( rRect, MAP_TWIP );
+ ImplCalcAnchorRect( rRect, MapUnit::MapTwip );
WriteDffData( rEscherEx );
}
@@ -327,7 +327,7 @@ void XclExpDffEmbeddedAnchor::ImplCalcAnchorRect( const Rectangle& rRect, MapUni
XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const Rectangle& rRect ) :
XclExpDffAnchorBase( rRoot, EXC_ESC_ANCHOR_SIZELOCKED )
{
- maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MAP_100TH_MM );
+ maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MapUnit::Map100thMM );
}
XclExpDffDropDownAnchor::XclExpDffDropDownAnchor( const XclExpRoot& rRoot, const ScAddress& rScPos ) :
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 0ae25f02a302..9a1484d0ac55 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1703,7 +1703,7 @@ SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const
inserted into the draw page. */
sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT;
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xEmbObj->getMapUnit( nAspect ) );
- Size aSize( vcl::Window::LogicToLogic( rAnchorRect.GetSize(), MapMode( MAP_100TH_MM ), MapMode( aUnit ) ) );
+ Size aSize( vcl::Window::LogicToLogic( rAnchorRect.GetSize(), MapMode( MapUnit::Map100thMM ), MapMode( aUnit ) ) );
css::awt::Size aAwtSize( aSize.Width(), aSize.Height() );
xEmbObj->setVisualAreaSize( nAspect, aAwtSize );
@@ -1766,7 +1766,7 @@ void XclImpChartObj::FinalizeTabChart()
// create the object anchor
XclObjAnchor aAnchor;
- aAnchor.SetRect( GetRoot(), GetCurrScTab(), Rectangle( 1000, 500, nWidth, nHeight ), MAP_100TH_MM );
+ aAnchor.SetRect( GetRoot(), GetCurrScTab(), Rectangle( 1000, 500, nWidth, nHeight ), MapUnit::Map100thMM );
SetAnchor( aAnchor );
}
@@ -4131,7 +4131,7 @@ void XclImpSheetDrawing::ConvertObjects( XclImpDffConverter& rDffConv )
Rectangle XclImpSheetDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool /*bDffAnchor*/ ) const
{
- return rAnchor.GetRect( GetRoot(), maScUsedArea.aStart.Tab(), MAP_100TH_MM );
+ return rAnchor.GetRect( GetRoot(), maScUsedArea.aStart.Tab(), MapUnit::Map100thMM );
}
void XclImpSheetDrawing::OnObjectInserted( const XclImpDrawObjBase& rDrawObj )
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index 70a4d79dcb15..de02aaab6ac0 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -45,13 +45,13 @@ double lclGetTwipsScale( MapUnit eMapUnit )
Calc's strange definition of a point (1 inch == 72.27 points, instead
of 72 points).
NOTE: Calc's definition changed from TeX points (72.27) to PS points
- (72), so the MAP_TWIP case now actually also delivers a scale of 1.0
+ (72), so the MapUnit::MapTwip case now actually also delivers a scale of 1.0
*/
double fScale = 1.0;
switch( eMapUnit )
{
- case MAP_TWIP: fScale = 1; break; // Calc twips <-> real twips
- case MAP_100TH_MM: fScale = HMM_PER_TWIPS; break; // Calc twips <-> 1/100mm
+ case MapUnit::MapTwip: fScale = 1; break; // Calc twips <-> real twips
+ case MapUnit::Map100thMM: fScale = HMM_PER_TWIPS; break; // Calc twips <-> 1/100mm
default: OSL_FAIL( "lclGetTwipsScale - map unit not implemented" );
}
return fScale;
@@ -183,8 +183,8 @@ void XclObjAnchor::SetRect( const Size& rPageSize, sal_Int32 nScaleX, sal_Int32
double fScale = 1.0;
switch( eMapUnit )
{
- case MAP_TWIP: fScale = HMM_PER_TWIPS; break; // Calc twips -> 1/100mm
- case MAP_100TH_MM: fScale = 1.0; break; // Calc 1/100mm -> 1/100mm
+ case MapUnit::MapTwip: fScale = HMM_PER_TWIPS; break; // Calc twips -> 1/100mm
+ case MapUnit::Map100thMM: fScale = 1.0; break; // Calc 1/100mm -> 1/100mm
default: OSL_FAIL( "XclObjAnchor::SetRect - map unit not implemented" );
}
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index a1d9a20cd703..97ece71e8236 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -344,7 +344,7 @@ ScEditEngineDefaulter& XclRoot::GetEditEngine() const
{
mrData.mxEditEngine.reset( new ScEditEngineDefaulter( GetDoc().GetEnginePool() ) );
ScEditEngineDefaulter& rEE = *mrData.mxEditEngine;
- rEE.SetRefMapMode( MAP_100TH_MM );
+ rEE.SetRefMapMode( MapUnit::Map100thMM );
rEE.SetEditTextObjectPool( GetDoc().GetEditPool() );
rEE.SetUpdateMode( false );
rEE.EnableUndo( false );
@@ -359,7 +359,7 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const
{
mrData.mxHFEditEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool() ) );
ScHeaderEditEngine& rEE = *mrData.mxHFEditEngine;
- rEE.SetRefMapMode( MAP_TWIP ); // headers/footers use twips as default metric
+ rEE.SetRefMapMode( MapUnit::MapTwip ); // headers/footers use twips as default metric
rEE.SetUpdateMode( false );
rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EEControlBits::ALLOWBIGOBJS );
@@ -386,7 +386,7 @@ EditEngine& XclRoot::GetDrawEditEngine() const
{
mrData.mxDrawEditEng.reset( new EditEngine( &GetDoc().GetDrawLayer()->GetItemPool() ) );
EditEngine& rEE = *mrData.mxDrawEditEng;
- rEE.SetRefMapMode( MAP_100TH_MM );
+ rEE.SetRefMapMode( MapUnit::Map100thMM );
rEE.SetUpdateMode( false );
rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EEControlBits::ALLOWBIGOBJS );
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index ac29f3d31184..d30ed4f0b7b8 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -284,7 +284,7 @@ sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal )
if( nVal )
{
nVal = (sal_uInt16)pAppWin->LogicToPixel(
- Size( nVal, nVal ), MapMode( MAP_TWIP ) ).Width();
+ Size( nVal, nVal ), MapMode( MapUnit::MapTwip ) ).Width();
if( !nVal ) // If there's a Twip there should also be a Pixel
nVal = 1;
}
@@ -294,7 +294,7 @@ sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal )
Size ScHTMLExport::MMToPixel( const Size& rSize )
{
Size aSize( rSize );
- aSize = pAppWin->LogicToPixel( rSize, MapMode( MAP_100TH_MM ) );
+ aSize = pAppWin->LogicToPixel( rSize, MapMode( MapUnit::Map100thMM ) );
// If there's something there should also be a Pixel
if ( !aSize.Width() && rSize.Width() )
aSize.Width() = 1;
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index f57b19734922..7af6d8fe928c 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -84,13 +84,13 @@ ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const S
}
aPageSize.Width() -= nLeftMargin + nRightMargin;
aPageSize.Height() -= nTopMargin + nBottomMargin;
- aPageSize = pDefaultDev->LogicToPixel( aPageSize, MapMode( MAP_TWIP ) );
+ aPageSize = pDefaultDev->LogicToPixel( aPageSize, MapMode( MapUnit::MapTwip ) );
}
else
{
OSL_FAIL("no StyleSheet?!?");
aPageSize = pDefaultDev->LogicToPixel(
- SvxPaperInfo::GetPaperSize( PAPER_A4 ), MapMode( MAP_TWIP ) );
+ SvxPaperInfo::GetPaperSize( PAPER_A4 ), MapMode( MapUnit::MapTwip ) );
}
if( bCalcWidthHeight )
mpParser = new ScHTMLLayoutParser( mpEngine, rBaseURL, aPageSize, pDocP );
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 11ce7137cb43..11e6fe9f131c 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -299,7 +299,7 @@ sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const OUString& rBaseURL
for ( sal_uInt16 j = 1; j < nCount; j++ )
{
aSize.Width() = (*pColOffset)[j] - nOff;
- aSize = pDefaultDev->PixelToLogic( aSize, MapMode( MAP_TWIP ) );
+ aSize = pDefaultDev->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) );
maColWidths[ j-1 ] = aSize.Width();
nOff = (*pColOffset)[j];
}
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index cc8bd240afa0..44425e3cdb13 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -577,7 +577,7 @@ void WorkbookGlobals::initialize()
// initialise edit engine
ScDocument& rDoc = getScDocument();
mxEditEngine.reset( new ScEditEngineDefaulter( rDoc.GetEnginePool() ) );
- mxEditEngine->SetRefMapMode( MAP_100TH_MM );
+ mxEditEngine->SetRefMapMode( MapUnit::Map100thMM );
mxEditEngine->SetEditTextObjectPool( rDoc.GetEditPool() );
mxEditEngine->SetUpdateMode( false );
mxEditEngine->EnableUndo( false );
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index bd03be374b5a..bb04088163fb 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1189,14 +1189,14 @@ sal_Int32 getColumnWidth(UnitConverter& rConverter, double nWidth)
double nCoeff = rConverter.getCoefficient(UNIT_DIGIT);
ScopedVclPtrInstance<VirtualDevice> aDev;
- long nPixel = aDev->LogicToPixel(Point(nCoeff, 0), MapMode(MAP_100TH_MM)).getX();
+ long nPixel = aDev->LogicToPixel(Point(nCoeff, 0), MapMode(MapUnit::Map100thMM)).getX();
// the 1.047 has been experimentally chosen based on measurements with a screen ruler
// TODO: fix the display of cells so that it no longer requires this hack
// algorithm from OOXML spec part1: 18.3.1.13
sal_Int32 nColWidthPixel= std::floor( ( ( 256 * nWidth + std::floor( 128.0 / nPixel ) ) / 256.0 ) * nPixel ) * 1.047;
- return aDev->PixelToLogic(Point(nColWidthPixel, 0), MapMode(MAP_100TH_MM)).getX();
+ return aDev->PixelToLogic(Point(nColWidthPixel, 0), MapMode(MapUnit::Map100thMM)).getX();
}
}
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 97b2e3204577..87018f11e8b5 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -496,7 +496,7 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseE
Size aSizePix = pI->aSize;
aSizePix.Width() += 2 * pI->aSpace.X();
aSizePix.Height() += 2 * pI->aSpace.Y();
- Size aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MAP_TWIP ) );
+ Size aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MapUnit::MapTwip ) );
if ( nDir & nHorizontal )
nWidth += aLogicSize.Width();
else if ( nWidth < aLogicSize.Width() )
@@ -580,11 +580,11 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
aInsertPos.Y() += aSpace.Y();
}
// Add offset of Spacing
- aSpace = pDefaultDev->PixelToLogic( pI->aSpace, MapMode( MAP_100TH_MM ) );
+ aSpace = pDefaultDev->PixelToLogic( pI->aSpace, MapMode( MapUnit::Map100thMM ) );
aInsertPos += aSpace;
Size aSizePix = pI->aSize;
- aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MAP_100TH_MM ) );
+ aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MapUnit::Map100thMM ) );
// Limit size
::ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 923e69d8ba9b..b6b7a70fad9a 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -43,7 +43,7 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
bNewDef( false )
{
// RTF default FontSize 12Pt
- long nMM = OutputDevice::LogicToLogic( 12, MAP_POINT, MAP_100TH_MM );
+ long nMM = OutputDevice::LogicToLogic( 12, MapUnit::MapPoint, MapUnit::Map100thMM );
pPool->SetPoolDefaultItem( SvxFontHeightItem( nMM, 100, EE_CHAR_FONTHEIGHT ) );
// Free-flying pInsDefault
pInsDefault = new ScRTFCellDefault( pPool );
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e972a15a0853..b68e5db3bf2b 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3430,7 +3430,7 @@ ScEditEngineDefaulter* ScXMLImport::GetEditEngine()
if (!mpEditEngine)
{
mpEditEngine.reset(new ScEditEngineDefaulter(pDoc->GetEnginePool()));
- mpEditEngine->SetRefMapMode(MAP_100TH_MM);
+ mpEditEngine->SetRefMapMode(MapUnit::Map100thMM);
mpEditEngine->SetEditTextObjectPool(pDoc->GetEditPool());
mpEditEngine->SetUpdateMode(false);
mpEditEngine->EnableUndo(false);
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 2b3fdcfa2b19..d8387a755ec0 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1096,7 +1096,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true);
mbEditEngineCreated = true;
mpEditEngine->EnableUndo( false );
- mpEditEngine->SetRefMapMode( MAP_100TH_MM );
+ mpEditEngine->SetRefMapMode( MapUnit::Map100thMM );
mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
mpEditEngine->SetText(pTxtWnd->GetTextString());
@@ -1309,7 +1309,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
if (pDocShell)
pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
else
- pEditEngine->SetRefMapMode( MAP_100TH_MM );
+ pEditEngine->SetRefMapMode( MapUnit::Map100thMM );
pForwarder = new SvxEditEngineForwarder(*pEditEngine);
}
@@ -1412,7 +1412,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder()
ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool );
pHdrEngine->EnableUndo( false );
- pHdrEngine->SetRefMapMode( MAP_TWIP );
+ pHdrEngine->SetRefMapMode( MapUnit::MapTwip );
// default font must be set, independently of document
// -> use global pool from module
@@ -1535,7 +1535,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
if (mpDocSh)
mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice());
else
- mpEditEngine->SetRefMapMode( MAP_100TH_MM );
+ mpEditEngine->SetRefMapMode( MapUnit::Map100thMM );
mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
}
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index e8deabcc36f0..83e9b922c30c 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -206,7 +206,7 @@ void ScClient::ViewChanged()
}
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( GetAspect() ) );
- Size aVisSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aMapUnit, MAP_100TH_MM );
+ Size aVisSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aMapUnit, MapUnit::Map100thMM );
// Take over position and size into document
SdrOle2Obj* pDrawObj = GetDrawObj();
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 43b3c5ed8210..834d4c4663ad 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -679,7 +679,7 @@ void ScInputHandler::SetRefScale( const Fraction& rX, const Fraction& rY )
aScaleY = rY;
if (pEngine)
{
- MapMode aMode( MAP_100TH_MM, Point(), aScaleX, aScaleY );
+ MapMode aMode( MapUnit::Map100thMM, Point(), aScaleX, aScaleY );
pEngine->SetRefMapMode( aMode );
}
}
@@ -703,7 +703,7 @@ void ScInputHandler::UpdateRefDevice()
else
pEngine->SetRefDevice( nullptr );
- MapMode aMode( MAP_100TH_MM, Point(), aScaleX, aScaleY );
+ MapMode aMode( MapUnit::Map100thMM, Point(), aScaleX, aScaleY );
pEngine->SetRefMapMode( aMode );
// SetRefDevice(NULL) uses VirtualDevice, SetRefMapMode forces creation of a local VDev,
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 7424fd3e70a0..5f875fb59d9d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1397,7 +1397,7 @@ ScTextWnd::ScTextWnd(ScInputBarGroup* pParent, ScTabViewShell* pViewSh)
// always use application font, so a font with cjk chars can be installed
vcl::Font aAppFont = GetFont();
aTextFont = aAppFont;
- aTextFont.SetFontSize(PixelToLogic(aAppFont.GetFontSize(), MAP_TWIP)); // AppFont is in pixels
+ aTextFont.SetFontSize(PixelToLogic(aAppFont.GetFontSize(), MapUnit::MapTwip)); // AppFont is in pixels
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
@@ -1417,7 +1417,7 @@ ScTextWnd::ScTextWnd(ScInputBarGroup* pParent, ScTabViewShell* pViewSh)
SetSizePixel(aSize);
SetBackground(aBgColor);
SetLineColor(COL_BLACK);
- SetMapMode(MAP_TWIP);
+ SetMapMode(MapUnit::MapTwip);
SetPointer(PointerStyle::Text);
SetFont(aTextFont);
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index be2db5a53571..b981f01d7570 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -95,9 +95,9 @@ MapUnit ScMessagePool::GetMetric( sal_uInt16 nWhich ) const
{
// Own attributes: Twips, everything else 1/100 mm
if ( nWhich >= ATTR_STARTINDEX && nWhich <= ATTR_ENDINDEX )
- return MAP_TWIP;
+ return MapUnit::MapTwip;
else
- return MAP_100TH_MM;
+ return MapUnit::Map100thMM;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 59d285f27dbb..138abae2fc52 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -348,11 +348,11 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt
aBlock.aEnd.Col(), aBlock.aEnd.Row(),
aBlock.aStart.Tab() );
ScopedVclPtrInstance< VirtualDevice > pVirtDev;
- pVirtDev->SetOutputSizePixel( pVirtDev->LogicToPixel( aMMRect.GetSize(), MAP_100TH_MM ) );
+ pVirtDev->SetOutputSizePixel( pVirtDev->LogicToPixel( aMMRect.GetSize(), MapUnit::Map100thMM ) );
PaintToDev( pVirtDev, pDoc, 1.0, aBlock );
- pVirtDev->SetMapMode( MapMode( MAP_PIXEL ) );
+ pVirtDev->SetMapMode( MapMode( MapUnit::MapPixel ) );
Bitmap aBmp = pVirtDev->GetBitmap( Point(), pVirtDev->GetOutputSize() );
bOK = SetBitmapEx( aBmp, rFlavor );
}
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index 5a5a7008bfa8..f7d9729512d2 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -43,7 +43,7 @@ void ScDDComboBoxButton::SetOutputDevice( OutputDevice* pOutputDevice )
void ScDDComboBoxButton::SetOptSizePixel()
{
- aBtnSize = pOut->LogicToPixel( Size(0,11), MAP_APPFONT );
+ aBtnSize = pOut->LogicToPixel( Size(0,11), MapUnit::MapAppFont );
//aBtnSize.Width() = GetSystemMetrics( SM_CXVSCROLL ) - 1; // Win SDK-Funktion
aBtnSize.Width() = pOut->GetSettings().GetStyleSettings().GetScrollBarSize();
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 71a4a94af0e0..a380905b55ee 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -224,7 +224,7 @@ ScZoomSliderWnd::ScZoomSliderWnd( vcl::Window* pParent,
mpImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) );
mpImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) );
mpImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) );
- Size aSliderSize = LogicToPixel( Size( aLogicalSize), MapMode( MAP_10TH_MM ) );
+ Size aSliderSize = LogicToPixel( Size( aLogicalSize), MapMode( MapUnit::Map10thMM ) );
SetSizePixel( Size( aSliderSize.Width() * nSliderWidth-1, aSliderSize.Height() + nSliderHeight ) );
}
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 98bcc4adf03d..82fb4068e576 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -158,7 +158,7 @@ VCL_BUILDER_DECL_FACTORY(ScCondFormatList)
Size ScCondFormatList::GetOptimalSize() const
{
- return LogicToPixel(Size(290, 185), MAP_APPFONT);
+ return LogicToPixel(Size(290, 185), MapUnit::MapAppFont);
}
void ScCondFormatList::Resize()
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 216a0ef82f93..921f57899d70 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -94,7 +94,7 @@ void ScCondFrmtEntry::SetIndex(sal_Int32 nIndex)
void ScCondFrmtEntry::SetHeight()
{
- long nPad = LogicToPixel(Size(42,2), MapMode(MAP_APPFONT)).getHeight();
+ long nPad = LogicToPixel(Size(42,2), MapMode(MapUnit::MapAppFont)).getHeight();
// Calculate maximum height we need from visible widgets
sal_uInt16 nChildren = GetChildCount();
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index ba9df607709c..f8d7447c3bdd 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -99,7 +99,7 @@ void ScCondFormatManagerWindow::setColSizes()
return;
long aStaticTabs[]= { 2, 0, 0 };
aStaticTabs[2] = rBar.GetSizePixel().Width() / 2;
- SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL);
+ SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
}
ScCondFormatManagerDlg::ScCondFormatManagerDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList):
@@ -109,7 +109,7 @@ ScCondFormatManagerDlg::ScCondFormatManagerDlg(vcl::Window* pParent, ScDocument*
mbModified(false)
{
SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("CONTAINER");
- Size aSize(LogicToPixel(Size(290, 220), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(290, 220), MapUnit::MapAppFont));
pContainer->set_width_request(aSize.Width());
pContainer->set_height_request(aSize.Height());
m_pCtrlManager = VclPtr<ScCondFormatManagerWindow>::Create(*pContainer, mpDoc, mpFormatList);
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index ad90f5da88ec..34cbd3222bd6 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -75,7 +75,7 @@ ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) :
mbMTSelecting( false )
{
mpEditEngine->SetRefDevice( mpBackgrDev.get() );
- mpEditEngine->SetRefMapMode( MapMode( MAP_PIXEL ) );
+ mpEditEngine->SetRefMapMode( MapMode( MapUnit::MapPixel ) );
maEdEngSize = mpEditEngine->GetPaperSize();
mpPopup->SetMenuFlags( mpPopup->GetMenuFlags() | MenuFlags::NoAutoMnemonics );
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index aef45567bf95..cb23052062f4 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -74,7 +74,7 @@ VCL_BUILDER_FACTORY_ARGS(ScCsvTableBox, WB_BORDER)
Size ScCsvTableBox::GetOptimalSize() const
{
- Size aDefault(LogicToPixel(Size(243, 82), MapMode(MAP_APPFONT)));
+ Size aDefault(LogicToPixel(Size(243, 82), MapMode(MapUnit::MapAppFont)));
return aDefault;
}
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 675fdce1d82b..3cd9044ca12d 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -45,7 +45,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
{
get(m_pEdName, "name");
get(m_pEdComment, "comment");
- Size aSize(m_pEdComment->LogicToPixel(Size(183, 46), MAP_APPFONT));
+ Size aSize(m_pEdComment->LogicToPixel(Size(183, 46), MapUnit::MapAppFont));
m_pEdComment->set_width_request(aSize.Width());
m_pEdComment->set_height_request(aSize.Height());
get(m_pCbShowFrame, "showframe");
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 8add8fcba032..3be6e95a88bc 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -338,7 +338,7 @@ ScTPValidationValue::ScTPValidationValue( vcl::Window* pParent, const SfxItemSet
get(m_pEdMin, "min");
m_pEdMin->SetReferences(nullptr, m_pFtMin);
get(m_pEdList, "minlist");
- Size aSize(LogicToPixel(Size(174, 105), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(174, 105), MapUnit::MapAppFont));
m_pEdList->set_width_request(aSize.Width());
m_pEdList->set_height_request(aSize.Height());
get(m_pFtMax, "maxft");
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 243fb2a61549..3cd86fac9b8b 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -28,7 +28,7 @@ SearchResultsDlg::SearchResultsDlg( SfxBindings* _pBindings, vcl::Window* pParen
{
SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("results");
Size aControlSize(150, 120);
- aControlSize = pContainer->LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = pContainer->LogicToPixel(aControlSize, MapUnit::MapAppFont);
pContainer->set_width_request(aControlSize.Width());
pContainer->set_height_request(aControlSize.Height());
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 880b2fb58abd..dcb08bad4ca6 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -377,15 +377,15 @@ void ScDocShell::CalcOutputFactor()
MapMode aOldMode = pRefDev->GetMapMode();
vcl::Font aOldFont = pRefDev->GetFont();
- pRefDev->SetMapMode(MAP_PIXEL);
+ pRefDev->SetMapMode(MapUnit::MapPixel);
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pRefDev); // font color doesn't matter here
pRefDev->SetFont(aDefFont);
- nPrinterWidth = pRefDev->PixelToLogic( Size( pRefDev->GetTextWidth(aTestString), 0 ), MAP_100TH_MM ).Width();
+ nPrinterWidth = pRefDev->PixelToLogic( Size( pRefDev->GetTextWidth(aTestString), 0 ), MapUnit::Map100thMM ).Width();
pRefDev->SetFont(aOldFont);
pRefDev->SetMapMode(aOldMode);
ScopedVclPtrInstance< VirtualDevice > pVirtWindow( *Application::GetDefaultDevice() );
- pVirtWindow->SetMapMode(MAP_PIXEL);
+ pVirtWindow->SetMapMode(MapUnit::MapPixel);
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pVirtWindow); // font color doesn't matter here
pVirtWindow->SetFont(aDefFont);
nWindowWidth = pVirtWindow->GetTextWidth(aTestString);
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index d4b1af7047f5..a33c47d486b5 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -111,7 +111,7 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea )
if (pEnv)
{
vcl::Window* pWin = pEnv->GetEditWin();
- pEnv->MakeScale( aArea.GetSize(), MAP_100TH_MM,
+ pEnv->MakeScale( aArea.GetSize(), MapUnit::Map100thMM,
pWin->LogicToPixel( aArea.GetSize() ) );
} */
diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx
index 90bca78f619f..aaa37e1971a2 100644
--- a/sc/source/ui/docshell/sizedev.cxx
+++ b/sc/source/ui/docshell/sizedev.cxx
@@ -34,7 +34,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
bOwner = false;
aOldMapMode = pDevice->GetMapMode();
- pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode
+ pDevice->SetMapMode( MapUnit::MapPixel ); // GetNeededSize needs pixel MapMode
// printer has right DigitLanguage already
}
else
@@ -44,7 +44,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
bOwner = true;
}
- Point aLogic = pDevice->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pDevice->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
nPPTX = aLogic.X() / 1000.0;
nPPTY = aLogic.Y() / 1000.0;
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 9b1c8d01392a..4ae82e783ae7 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -127,8 +127,8 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
// at 100% view scale (as in SetMarkedOriginalSize),
// instead of respecting the current view scale
MapMode aSourceMap = rGraphic.GetPrefMapMode();
- MapMode aDestMap( MAP_100TH_MM );
- if ( aSourceMap.GetMapUnit() == MAP_PIXEL && pDrawView )
+ MapMode aDestMap( MapUnit::Map100thMM );
+ if ( aSourceMap.GetMapUnit() == MapUnit::MapPixel && pDrawView )
{
Fraction aScaleX, aScaleY;
pDrawView->CalcNormScale( aScaleX, aScaleY );
@@ -186,9 +186,9 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
if( rPrefSize.Width() && rPrefSize.Height() )
{
if( pWindow )
- aSize = pWindow->PixelToLogic( rPrefSize, MAP_100TH_MM );
+ aSize = pWindow->PixelToLogic( rPrefSize, MapUnit::Map100thMM );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( rPrefSize, MAP_100TH_MM );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( rPrefSize, MapUnit::Map100thMM );
}
else
aSize = Size( 5000, 5000 );
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index bb949ce08ae2..2622d6102aec 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -273,8 +273,8 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
{
::svt::EmbeddedObjectRef aObjRef( xObj, nAspect );
Size aSize;
- MapMode aMap100( MAP_100TH_MM );
- MapUnit aMapUnit = MAP_100TH_MM;
+ MapMode aMap100( MapUnit::Map100thMM );
+ MapUnit aMapUnit = MapUnit::Map100thMM;
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
@@ -301,7 +301,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
// Rechteck mit ausgewogenem Kantenverhaeltnis
aSize.Width() = 5000;
aSize.Height() = 5000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aMapUnit );
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( nAspect, aSz );
@@ -340,7 +340,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
Size aNewSize( aSz.Width, aSz.Height );
- aNewSize = OutputDevice::LogicToLogic( aNewSize, aMapUnit, MAP_100TH_MM );
+ aNewSize = OutputDevice::LogicToLogic( aNewSize, aMapUnit, MapUnit::Map100thMM );
if ( aNewSize != aSize )
{
@@ -484,7 +484,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
}
if (bSizeCh)
{
- aSize = vcl::Window::LogicToLogic( aSize, MapMode( MAP_100TH_MM ), MapMode( aMapUnit ) );
+ aSize = vcl::Window::LogicToLogic( aSize, MapMode( MapUnit::Map100thMM ), MapMode( aMapUnit ) );
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
xObj->setVisualAreaSize( nAspect, aSz );
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index 30f6e4f5fc40..3c096623e296 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -38,7 +38,7 @@ SdrOutliner* FuText::MakeOutliner()
// so the device must be taken from the model here.
OutputDevice* pRef = pDrDoc->GetRefDevice();
if (pRef && pRef != pWindow)
- pRef->SetMapMode( MapMode(MAP_100TH_MM) );
+ pRef->SetMapMode( MapMode(MapUnit::Map100thMM) );
return pOutl;
}
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index c07e7c35e3f4..7180c3c05a3b 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1772,7 +1772,7 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
{
sal_Int32 n1 = aStr.indexOf(';');
aStr = aStr.copy( n1+1 );
- pTheView->SetTab(i, (sal_uInt16)aStr.toInt32(), MAP_PIXEL);
+ pTheView->SetTab(i, (sal_uInt16)aStr.toInt32(), MapUnit::MapPixel);
}
}
}
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index 9f128e5c42ff..1a9a8e166f33 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -40,7 +40,7 @@ ScRetypePassDlg::ScRetypePassDlg(vcl::Window* pParent) :
get(mpTextDocStatus, "docStatusLabel");
get(mpBtnRetypeDoc, "retypeDocButton");
vcl::Window *pScrolledWindow = get<vcl::Window>("scrolledwindow");
- Size aSize(LogicToPixel(Size(190, 90), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(190, 90), MapUnit::MapAppFont));
pScrolledWindow->set_width_request(aSize.Width());
pScrolledWindow->set_height_request(aSize.Height());
get(mpSheetsBox, "sheetsBox");
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 91b4de526591..4add1fb94faf 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -63,7 +63,7 @@ public:
GetSizePixel().Width() - nAccessedWidth);
long aStaticTabs[]= { 2, 0, 0 };
aStaticTabs[2] = nWebSiteWidth;
- SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL);
+ SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
}
};
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index a1ee00b1c441..99689657e747 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -44,7 +44,7 @@ ScRangeManagerTable::ScRangeManagerTable(SvSimpleTableContainer& rParent,
, mpInitListener(nullptr)
{
static long aStaticTabs[] = {3, 0, 0, 0 };
- SetTabs( &aStaticTabs[0], MAP_PIXEL );
+ SetTabs( &aStaticTabs[0], MapUnit::MapPixel );
OUString aNameStr(ScGlobal::GetRscString(STR_HEADER_NAME));
OUString aRangeStr(ScGlobal::GetRscString(STR_HEADER_RANGE_OR_EXPR));
@@ -99,7 +99,7 @@ void ScRangeManagerTable::setColWidths()
rHeaderBar.SetItemSize( ITEMID_RANGE, nTabSize);
rHeaderBar.SetItemSize( ITEMID_SCOPE, nTabSize);
static long aStaticTabs[] = {3, 0, nTabSize, 2*nTabSize };
- SetTabs( &aStaticTabs[0], MAP_PIXEL );
+ SetTabs( &aStaticTabs[0], MapUnit::MapPixel );
HeaderEndDragHdl(nullptr);
}
@@ -295,9 +295,9 @@ IMPL_LINK_NOARG(ScRangeManagerTable, HeaderEndDragHdl, HeaderBar*, void)
rHeaderBar.SetItemSize(ITEMID_SCOPE, nItemScopeSize);
SetTab(0, 0);
- SetTab(1, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() );
+ SetTab(1, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
aSz.Width() += nItemRangeSize;
- SetTab(2, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() );
+ SetTab(2, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
}
IMPL_LINK_NOARG(ScRangeManagerTable, ScrollHdl, SvTreeListBox*, void)
diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx
index 48bb5888301a..c47b56a14de2 100644
--- a/sc/source/ui/namedlg/namepast.cxx
+++ b/sc/source/ui/namedlg/namepast.cxx
@@ -49,7 +49,7 @@ ScNamePasteDlg::ScNamePasteDlg( vcl::Window * pParent, ScDocShell* pShell, bool
ScAddress aPos(pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo());
SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("ctrl");
Size aControlSize(210, 0);
- aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont);
pContainer->set_width_request(aControlSize.Width());
pContainer->set_height_request(10 * GetTextHeight());
mpTable = VclPtr<ScRangeManagerTable>::Create(*pContainer, m_RangeMap, aPos);
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index b1e2bdd6b534..67e3b226780d 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -130,7 +130,7 @@ ScHFEditPage::ScHFEditPage( vcl::Window* pParent,
m_pWndRight->SetFont( aPatAttr );
// Set size request for all 3 widgets
- Size aSize = LogicToPixel(Size(80, 120), MAP_APPFONT);
+ Size aSize = LogicToPixel(Size(80, 120), MapUnit::MapAppFont);
VclPtr<ScEditWindow> aEditWindows[] = {m_pWndLeft, m_pWndCenter, m_pWndRight};
for (auto &pEditWindow : aEditWindows)
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 248fae39f890..4face4a60e86 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -72,7 +72,7 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
Color aBgColor = rStyleSettings.GetWindowColor();
- SetMapMode( MAP_TWIP );
+ SetMapMode( MapUnit::MapTwip );
SetPointer( PointerStyle::Text );
SetBackground( aBgColor );
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index e1b0993ab03f..24f3f9538766 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -195,7 +195,7 @@ IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl, Edit&, void)
{
mpCBXWrapText->EnableTriState(false);
sal_uInt16 nVal = (sal_uInt16)mpMFLeftIndent->GetValue();
- SfxUInt16Item aItem( SID_ATTR_ALIGN_INDENT, (sal_uInt16)CalcToUnit( nVal, MAP_TWIP ) );
+ SfxUInt16Item aItem( SID_ATTR_ALIGN_INDENT, (sal_uInt16)CalcToUnit( nVal, MapUnit::MapTwip ) );
GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_ALIGN_INDENT,
SfxCallMode::RECORD, { &aItem });
@@ -297,7 +297,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
{
const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pState);
sal_uInt16 nVal = pItem->GetValue();
- mpMFLeftIndent->SetValue( CalcToPoint(nVal, MAP_TWIP, 1) );
+ mpMFLeftIndent->SetValue( CalcToPoint(nVal, MapUnit::MapTwip, 1) );
}
else
{
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index aaf2541462f7..a021422bdf25 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -91,7 +91,7 @@ static void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, bo
//! move to document or docshell
ScopedVclPtrInstance< VirtualDevice > pVDev;
- Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 8cb4a28ff5c2..f604e9dfc574 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -231,7 +231,7 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName,
sal_Int64 nAspect(embed::Aspects::MSOLE_CONTENT);
MapUnit aMapUnit(VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ));
Size aSize(aInsRect.GetSize());
- aSize = vcl::Window::LogicToLogic( aSize, MapMode( MAP_100TH_MM ), MapMode( aMapUnit ) );
+ aSize = vcl::Window::LogicToLogic( aSize, MapMode( MapUnit::Map100thMM ), MapMode( aMapUnit ) );
awt::Size aSz;
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 03679b621c7c..763ff041b097 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -744,7 +744,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
{
// wie ScViewFunc::RemoveStyleSheetInUse
ScopedVclPtrInstance< VirtualDevice > pVDev;
- Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
@@ -1084,7 +1084,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
// update lineheight
ScopedVclPtrInstance< VirtualDevice > pVDev;
- Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
@@ -1450,7 +1450,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
// row heights
ScopedVclPtrInstance< VirtualDevice > pVDev;
- Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
@@ -1830,7 +1830,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
{
// update lineheight
ScopedVclPtrInstance< VirtualDevice > pVDev;
- Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
Fraction aZoom(1,1);
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 041ac3d4e747..ddf83ee1b8cf 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -211,7 +211,7 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder()
ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool );
pHdrEngine->EnableUndo( false );
- pHdrEngine->SetRefMapMode( MAP_TWIP );
+ pHdrEngine->SetRefMapMode( MapUnit::MapTwip );
// default font must be set, independently of document
// -> use global pool from module
@@ -859,7 +859,7 @@ ScDrawTextCursor* ScDrawTextCursor::getImplementation(const uno::Reference<uno::
ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
- pEnginePool->SetDefaultMetric( MAP_100TH_MM );
+ pEnginePool->SetDefaultMetric( MapUnit::Map100thMM );
pEnginePool->FreezeIdRanges();
pEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true); // TRUE: become owner of pool
@@ -960,7 +960,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
if (pDocShell)
pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
else
- pEditEngine->SetRefMapMode( MAP_100TH_MM );
+ pEditEngine->SetRefMapMode( MapUnit::Map100thMM );
pForwarder = new SvxEditEngineForwarder(*pEditEngine);
}
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index ea4a83fa0d37..5f5c969c27ce 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -56,7 +56,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
nPixelY += ScViewData::ToPixel(nHeight, nPPTY);
}
- MapMode aHMMMode( MAP_100TH_MM, Point(), rZoomX, rZoomY );
+ MapMode aHMMMode( MapUnit::Map100thMM, Point(), rZoomX, rZoomY );
Point aPixelLog = pDev->PixelToLogic( Point( nPixelX,nPixelY ), aHMMMode );
// Fraction(double) ctor can be used here (and avoid overflows of PixelLog * Zoom)
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index d0f51dfeb725..839f47d7bc7c 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -472,7 +472,7 @@ void ScDrawView::SetMarkedOriginalSize()
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aOriginalSize = static_cast<SdrOle2Obj*>(pObj)->GetOrigObjSize( &aMapMode );
bDo = true;
}
@@ -485,7 +485,7 @@ void ScDrawView::SetMarkedOriginalSize()
aSz = xObj->getVisualAreaSize( static_cast<SdrOle2Obj*>(pObj)->GetAspect() );
aOriginalSize = OutputDevice::LogicToLogic(
Size( aSz.Width, aSz.Height ),
- aUnit, MAP_100TH_MM );
+ aUnit, MapUnit::Map100thMM );
bDo = true;
} catch( embed::NoVisualAreaSizeException& )
{
@@ -499,8 +499,8 @@ void ScDrawView::SetMarkedOriginalSize()
const Graphic& rGraphic = static_cast<SdrGrafObj*>(pObj)->GetGraphic();
MapMode aSourceMap = rGraphic.GetPrefMapMode();
- MapMode aDestMap( MAP_100TH_MM );
- if (aSourceMap.GetMapUnit() == MAP_PIXEL)
+ MapMode aDestMap( MapUnit::Map100thMM );
+ if (aSourceMap.GetMapUnit() == MapUnit::MapPixel)
{
// consider pixel correction, so that the bitmap is correct on the screen
Fraction aNormScaleX, aNormScaleY;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index f39da944547d..9bf969152c6b 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -313,7 +313,7 @@ void ScDrawView::RecalcScale()
}
else
{
- Point aLogic = pDev->LogicToPixel( Point(1000,1000), MAP_TWIP );
+ Point aLogic = pDev->LogicToPixel( Point(1000,1000), MapUnit::MapTwip );
nPPTX = aLogic.X() / 1000.0;
nPPTY = aLogic.Y() / 1000.0;
//! Zoom, handed over ???
@@ -559,8 +559,8 @@ bool ScDrawView::SdrBeginTextEdit(
if (OutlinerView* pView = GetTextEditOutlinerView())
{
Rectangle aRectangle = pView->GetOutputArea();
- if (pWinL && pWinL->GetMapMode().GetMapUnit() == MAP_100TH_MM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP);
+ if (pWinL && pWinL->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
OString sRectangle = aRectangle.toString();
SfxLokHelper::notifyOtherViews(pViewSh, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle);
}
diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx
index 6ccc18170f2f..c7cf899953f9 100644
--- a/sc/source/ui/view/gridmerg.cxx
+++ b/sc/source/ui/view/gridmerg.cxx
@@ -35,7 +35,7 @@ ScGridMerger::ScGridMerger( OutputDevice* pOutDev, long nOnePixelX, long nOnePix
// optimize (DrawGrid) only for pixel MapMode,
// to avoid rounding errors
- bOptimize = ( pDev->GetMapMode().GetMapUnit() == MAP_PIXEL );
+ bOptimize = ( pDev->GetMapMode().GetMapUnit() == MapUnit::MapPixel );
}
ScGridMerger::~ScGridMerger()
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5ffad27f03ec..667bc3eee40c 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -978,7 +978,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
vcl::Font aOldFont = GetFont();
SetFont(mpFilterBox->GetFont());
MapMode aOldMode = GetMapMode();
- SetMapMode( MAP_PIXEL );
+ SetMapMode( MapUnit::MapPixel );
nHeight = GetTextHeight();
nHeight *= SC_FILTERLISTBOX_LINES;
@@ -1104,7 +1104,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
vcl::Font aOldFont = GetFont();
SetFont(mpFilterBox->GetFont());
MapMode aOldMode = GetMapMode();
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
nHeight = GetTextHeight();
nHeight *= SC_FILTERLISTBOX_LINES;
@@ -1584,7 +1584,7 @@ bool ScGridWindow::IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, S
&aZoomX, &aZoomY);
MapMode aCurrentMapMode(GetMapMode());
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
// obtain the bounding box of the text in first non-empty cell
// to the left
@@ -4614,7 +4614,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
bIsInScroll = true;
- SetMapMode(MAP_PIXEL);
+ SetMapMode(MapUnit::MapPixel);
Scroll( nDifX, nDifY, ScrollFlags::Children );
SetMapMode( GetDrawMapMode() ); // generated shifted MapMode
@@ -5194,7 +5194,7 @@ std::shared_ptr<ScFieldEditEngine> createEditEngine( ScDocShell* pDocSh, const S
std::shared_ptr<ScFieldEditEngine> pEngine(new ScFieldEditEngine(&rDoc, rDoc.GetEditPool()));
ScSizeDeviceProvider aProv(pDocSh);
pEngine->SetRefDevice(aProv.GetDevice());
- pEngine->SetRefMapMode(MAP_100TH_MM);
+ pEngine->SetRefMapMode(MapUnit::Map100thMM);
SfxItemSet aDefault = pEngine->GetEmptyItemSet();
rPat.FillEditItemSet(&aDefault);
aDefault.Put( SvxAdjustItem(toSvxAdjust(rPat), EE_PARA_JUST) );
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 2e66fef6464f..27a7d24d4359 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -498,7 +498,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
// use a virtual device with 1/100th mm as text formatting reference
xFmtVirtDev.disposeAndReset( VclPtr<VirtualDevice>::Create() );
- xFmtVirtDev->SetMapMode( MAP_100TH_MM );
+ xFmtVirtDev->SetMapMode( MapUnit::Map100thMM );
aOutputData.SetFmtDevice( xFmtVirtDev.get() );
bLogicText = true; // use logic MapMode
@@ -670,7 +670,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
{
// save MapMode and set to pixel
MapMode aCurrentMapMode(pContentDev->GetMapMode());
- pContentDev->SetMapMode(MAP_PIXEL);
+ pContentDev->SetMapMode(MapUnit::MapPixel);
Rectangle aPixRect = Rectangle( Point(), GetOutputSizePixel() );
pContentDev->SetFillColor( rColorCfg.GetColorValue(svtools::APPBACKGROUND).nColor );
@@ -707,7 +707,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
if ( rDoc.HasBackgroundDraw( nTab, aDrawingRectLogic ) )
{
- pContentDev->SetMapMode(MAP_PIXEL);
+ pContentDev->SetMapMode(MapUnit::MapPixel);
aOutputData.DrawClear();
// drawing background
@@ -728,7 +728,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
if ( !bGridFirst && ( bGrid || bPage ) )
aOutputData.DrawGrid(*pContentDev, bGrid, bPage);
- pContentDev->SetMapMode(MAP_PIXEL);
+ pContentDev->SetMapMode(MapUnit::MapPixel);
if ( bPageMode )
{
@@ -762,18 +762,18 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
if (bIsTiledRendering)
{
// Tiled offset nScrX, nScrY
- MapMode aMap( MAP_PIXEL );
+ MapMode aMap( MapUnit::MapPixel );
aMap.SetOrigin(Point(nScrX, nScrY));
pContentDev->SetMapMode(aMap);
}
else
- pContentDev->SetMapMode(MAP_PIXEL);
+ pContentDev->SetMapMode(MapUnit::MapPixel);
// Autofilter- and Pivot-Buttons
DrawButtons(nX1, nX2, rTableInfo, pContentDev); // Pixel
- pContentDev->SetMapMode(MAP_PIXEL);
+ pContentDev->SetMapMode(MapUnit::MapPixel);
aOutputData.DrawClipMarks();
@@ -847,7 +847,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
}
}
- pContentDev->SetMapMode(MAP_PIXEL);
+ pContentDev->SetMapMode(MapUnit::MapPixel);
if ( pViewData->IsRefMode() && nTab >= pViewData->GetRefStartZ() && nTab <= pViewData->GetRefEndZ() )
{
@@ -965,7 +965,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
// paint the editeng text
Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH()));
pEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice);
- rDevice.SetMapMode(MAP_PIXEL);
+ rDevice.SetMapMode(MapUnit::MapPixel);
// restore the cursor it was originally visible
if (bVisCursor)
@@ -1036,7 +1036,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
Rectangle aEditRect(Point(nScreenX, nScreenY), Size(nScreenW, nScreenH));
pOtherEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice);
- rDevice.SetMapMode(MAP_PIXEL);
+ rDevice.SetMapMode(MapUnit::MapPixel);
}
}
}
@@ -1226,11 +1226,11 @@ void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle)
// When dragging shapes the map mode is disabled.
if (IsMapModeEnabled())
{
- if (GetMapMode().GetMapUnit() == MAP_100TH_MM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP);
+ if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
}
else
- aRectangle = PixelToLogic(aRectangle, MapMode(MAP_TWIP));
+ aRectangle = PixelToLogic(aRectangle, MapMode(MapUnit::MapTwip));
sRectangle = aRectangle.toString();
}
diff --git a/sc/source/ui/view/gridwin_dbgutil.cxx b/sc/source/ui/view/gridwin_dbgutil.cxx
index 10b67ca1aa1f..42762835f100 100644
--- a/sc/source/ui/view/gridwin_dbgutil.cxx
+++ b/sc/source/ui/view/gridwin_dbgutil.cxx
@@ -46,7 +46,7 @@ void ScGridWindow::dumpColumnInformationPixel()
for (SCCOL nCol = 0; nCol <= 20; ++nCol)
{
sal_uInt16 nWidth = pDoc->GetColWidth(nCol, nTab);
- long nPixel = LogicToPixel(Point(nWidth, 0), MapMode(MAP_TWIP)).getX();
+ long nPixel = LogicToPixel(Point(nWidth, 0), MapMode(MapUnit::MapTwip)).getX();
std::cout << "Column: " << nCol << ", Width: " << nPixel << "px" << std::endl;
}
}
@@ -58,7 +58,7 @@ void ScGridWindow::dumpColumnInformationHmm()
for (SCCOL nCol = 0; nCol <= 20; ++nCol)
{
sal_uInt16 nWidth = pDoc->GetColWidth(nCol, nTab);
- long nPixel = LogicToLogic(Point(nWidth, 0), MAP_TWIP, MAP_100TH_MM).getX();
+ long nPixel = LogicToLogic(Point(nWidth, 0), MapUnit::MapTwip, MapUnit::Map100thMM).getX();
std::cout << "Column: " << nCol << ", Width: " << nPixel << "hmm" << std::endl;
}
}
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 41bce2332042..32f71131717c 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -44,7 +44,7 @@ ScOverlayHint::ScOverlayHint(const OUString& rTit, const OUString& rMsg, const C
, m_aTitle(rTit)
, m_aMessage(convertLineEnd(rMsg, LINEEND_CR))
, m_aTextFont(rFont)
- , m_aMapMode(MAP_PIXEL)
+ , m_aMapMode(MapUnit::MapPixel)
, m_nLeft(0)
, m_nTop(0)
{
@@ -158,7 +158,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlayObje
Size ScOverlayHint::GetSizePixel() const
{
basegfx::B2DRange aRange;
- createOverlaySequence(0, 0, MAP_PIXEL, aRange);
+ createOverlaySequence(0, 0, MapUnit::MapPixel, aRange);
return Size(aRange.getWidth(), aRange.getHeight());
}
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 818f9fc76a12..9d5282e58a77 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -78,9 +78,9 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
SvtPathOptions aPathOpt;
OUString aPath = aPathOpt.GetPalettePath();
pModel = new SdrModel(aPath, nullptr, nullptr, false);
- pModel->SetScaleUnit(MAP_100TH_MM);
+ pModel->SetScaleUnit(MapUnit::Map100thMM);
SfxItemPool& rPool = pModel->GetItemPool();
- rPool.SetDefaultMetric(MAP_100TH_MM);
+ rPool.SetDefaultMetric(MapUnit::Map100thMM);
rPool.FreezeIdRanges();
OutputDevice* pPrinter = pDoc->GetRefDevice();
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index b9a5e462dce1..5c8a05ff2ee9 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -339,7 +339,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
//
// This is where all the confusion comes from, ultimately we want them
// always in the logic units (100th of millimiters), but we need to get
- // there gradually (get rid of setting MAP_PIXEL first), otherwise we'd
+ // there gradually (get rid of setting MapUnit::MapPixel first), otherwise we'd
// break all the drawing by one change.
// So until that happens, we need to special case.
bool bWorksInPixels = bMetaFile;
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 42eeeace7160..56a360e3e8b2 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -82,7 +82,7 @@ Point ScOutputData::PrePrintDrawingLayer(long nLogStX, long nLogStY )
// #i76114# MapMode has to be set because BeginDrawLayers uses GetPaintRegion
MapMode aOldMode = mpDev->GetMapMode();
if (!bMetaFile)
- mpDev->SetMapMode( MapMode( MAP_100TH_MM, aMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
+ mpDev->SetMapMode( MapMode( MapUnit::Map100thMM, aMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
// #i74769# work with SdrPaintWindow directly
// #i76114# pass bDisableIntersect = true, because the intersection of the table area
@@ -108,7 +108,7 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
if (!bMetaFile)
{
- mpDev->SetMapMode( MapMode( MAP_100TH_MM, rMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
+ mpDev->SetMapMode( MapMode( MapUnit::Map100thMM, rMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
}
if(pViewShell || pDrawView)
@@ -155,7 +155,7 @@ void ScOutputData::PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOf
if (!bMetaFile)
{
- mpDev->SetMapMode( MapMode( MAP_100TH_MM, rMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
+ mpDev->SetMapMode( MapMode( MapUnit::Map100thMM, rMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
}
DrawSelectiveObjects( nLayer );
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 1e916697ae2f..7099142c5dc9 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -354,7 +354,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ MapMode aMMMode( MapUnit::Map100thMM, Point(), aHorPrevZoom, aPreviewZoom );
bool bDoPrint = ( pFillLocation == nullptr );
bool bValidPage = ( nPageNo < nTotalPages );
@@ -559,7 +559,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
DrawInvert( nPageEndY - nFooterHeight, PointerStyle::VSizeBar );
}
- SetMapMode( MapMode( MAP_PIXEL ) );
+ SetMapMode( MapMode( MapUnit::MapPixel ) );
for( int i= aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
{
Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) ,aMMMode );
@@ -742,7 +742,7 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ MapMode aMMMode( MapUnit::Map100thMM, Point(), aHorPrevZoom, aPreviewZoom );
SetMapMode( aMMMode );
bInSetZoom = true; // don't scroll during SetYOffset in UpdateScrollBars
@@ -817,7 +817,7 @@ sal_uInt16 ScPreview::GetOptimalZoom(bool bWidthOnly)
// desired margin is 0.25cm in default MapMode (like Writer),
// but some additional margin is introduced by integer scale values
// -> add only 0.10cm, so there is some margin in all cases.
- Size aMarginSize( LogicToPixel( Size( 100, 100 ), MAP_100TH_MM ) );
+ Size aMarginSize( LogicToPixel( Size( 100, 100 ), MapUnit::Map100thMM ) );
aWinSize.Width() -= 2 * aMarginSize.Width();
aWinSize.Height() -= 2 * aMarginSize.Height();
@@ -853,7 +853,7 @@ void ScPreview::SetXOffset( long nX )
aOffset.X() = nX;
if (nDif && !bInSetZoom)
{
- MapMode aOldMode = GetMapMode(); SetMapMode(MAP_PIXEL);
+ MapMode aOldMode = GetMapMode(); SetMapMode(MapUnit::MapPixel);
Scroll( nDif, 0 );
SetMapMode(aOldMode);
}
@@ -879,7 +879,7 @@ void ScPreview::SetYOffset( long nY )
aOffset.Y() = nY;
if (nDif && !bInSetZoom)
{
- MapMode aOldMode = GetMapMode(); SetMapMode(MAP_PIXEL);
+ MapMode aOldMode = GetMapMode(); SetMapMode(MapUnit::MapPixel);
Scroll( 0, nDif );
SetMapMode(aOldMode);
}
@@ -968,7 +968,7 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
{
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ MapMode aMMMode( MapUnit::Map100thMM, Point(), aHorPrevZoom, aPreviewZoom );
aButtonDownChangePoint = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
aButtonDownPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
@@ -1051,7 +1051,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ MapMode aMMMode( MapUnit::Map100thMM, Point(), aHorPrevZoom, aPreviewZoom );
aButtonUpPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
@@ -1301,7 +1301,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
{
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ MapMode aMMMode( MapUnit::Map100thMM, Point(), aHorPrevZoom, aPreviewZoom );
Point aMouseMovePoint = PixelToLogic( rMEvt.GetPosPixel(), aMMMode );
long nLeftMargin = 0;
@@ -1538,7 +1538,7 @@ void ScPreview::DragMove( long nDragMovePos, PointerStyle nFlags )
{
Fraction aPreviewZoom( nZoom, 100 );
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ MapMode aMMMode( MapUnit::Map100thMM, Point(), aHorPrevZoom, aPreviewZoom );
SetMapMode( aMMMode );
long nPos = nDragMovePos;
if( nFlags == PointerStyle::HSizeBar || nFlags == PointerStyle::HSplit )
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 300affff95f9..83d763432837 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -191,7 +191,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
// unified MapMode for all calls (e.g. Repaint!!!)
// else, EditEngine outputs different text heights
- pDev->SetMapMode(MAP_PIXEL);
+ pDev->SetMapMode(MapUnit::MapPixel);
pBorderItem = nullptr;
pBackgroundItem = nullptr;
@@ -248,7 +248,7 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa
pPageData ( pData )
{
pDev = pPrinter.get();
- aSrcOffset = pPrinter->PixelToLogic( pPrinter->GetPageOffsetPixel(), MAP_100TH_MM );
+ aSrcOffset = pPrinter->PixelToLogic( pPrinter->GetPageOffsetPixel(), MapUnit::Map100thMM );
Construct( pOptions );
}
@@ -547,7 +547,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
if ( bMetaFile && pDev->GetOutDevType() == OUTDEV_VIRDEV )
aOutputData.SetSnapPixel();
- Point aLogStart = pDev->PixelToLogic( Point(nScrX,nScrY), MAP_100TH_MM );
+ Point aLogStart = pDev->PixelToLogic( Point(nScrX,nScrY), MapUnit::Map100thMM );
long nLogStX = aLogStart.X();
long nLogStY = aLogStart.Y();
@@ -713,7 +713,7 @@ bool ScPrintFunc::AdjustPrintArea( bool bNew )
if ( bChangeCol )
{
OutputDevice* pRefDev = pDoc->GetPrinter(); // use the printer also for Preview
- pRefDev->SetMapMode( MAP_PIXEL ); // important for GetNeededSize
+ pRefDev->SetMapMode( MapUnit::MapPixel ); // important for GetNeededSize
pDoc->ExtendPrintArea( pRefDev,
nPrintTab, nStartCol, nStartRow, nEndCol, nEndRow );
@@ -1114,8 +1114,8 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu
SvxGraphicPosition ePos;
if ( pGraphic && pGraphic->IsSupportedGraphic() )
{
- const MapMode aMapMM( MAP_100TH_MM );
- if ( pGraphic->GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ const MapMode aMapMM( MapUnit::Map100thMM );
+ if ( pGraphic->GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
aGrfSize = pRefDev->PixelToLogic( pGraphic->GetPrefSize(), aMapMM );
else
aGrfSize = OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
@@ -1519,7 +1519,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
aMMOffset.X() = (long)(aMMOffset.X() * HMM_PER_TWIPS);
aMMOffset.Y() = (long)(aMMOffset.Y() * HMM_PER_TWIPS);
aMMOffset += Point( nLogStX, nLogStY );
- MapMode aDrawMapMode( MAP_100TH_MM, aMMOffset, aLogicMode.GetScaleX(), aLogicMode.GetScaleY() );
+ MapMode aDrawMapMode( MapUnit::Map100thMM, aMMOffset, aLogicMode.GetScaleX(), aLogicMode.GetScaleY() );
// get pixel rectangle
@@ -1609,7 +1609,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
OutputDevice* pRefDev = pDoc->GetPrinter(); // use the printer also for Preview
Fraction aPrintFrac( nZoom, 100 ); // without nManualZoom
// MapMode, as it would arrive at the printer:
- pRefDev->SetMapMode( MapMode( MAP_100TH_MM, Point(), aPrintFrac, aPrintFrac ) );
+ pRefDev->SetMapMode( MapMode( MapUnit::Map100thMM, Point(), aPrintFrac, aPrintFrac ) );
// when rendering (PDF), don't use printer as ref device, but printer's MapMode
// has to be set anyway, as charts still use it (#106409#)
@@ -2569,13 +2569,13 @@ void ScPrintFunc::InitModes() // set MapModes from nZoom etc.
aHorFract = Fraction( (long)( nEffZoom / nFact ), 10000 );
}
- aLogicMode = MapMode( MAP_100TH_MM, Point(), aHorFract, aZoomFract );
+ aLogicMode = MapMode( MapUnit::Map100thMM, Point(), aHorFract, aZoomFract );
Point aLogicOfs( -aOffset.X(), -aOffset.Y() );
- aOffsetMode = MapMode( MAP_100TH_MM, aLogicOfs, aHorFract, aZoomFract );
+ aOffsetMode = MapMode( MapUnit::Map100thMM, aLogicOfs, aHorFract, aZoomFract );
Point aTwipsOfs( (long) ( -aOffset.X() / nScaleX + 0.5 ), (long) ( -aOffset.Y() / nScaleY + 0.5 ) );
- aTwipMode = MapMode( MAP_TWIP, aTwipsOfs, aHorFract, aZoomFract );
+ aTwipMode = MapMode( MapUnit::MapTwip, aTwipsOfs, aHorFract, aZoomFract );
}
void ScPrintFunc::ApplyPrintSettings()
@@ -2597,14 +2597,14 @@ void ScPrintFunc::ApplyPrintSettings()
aEnumSize.Width() = aEnumSize.Height();
aEnumSize.Height() = nTemp;
}
- Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, true );
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MapUnit::MapTwip, true );
sal_uInt16 nPaperBin = static_cast<const SvxPaperBinItem&>(pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue();
pPrinter->SetPaper( ePaper );
if ( PAPER_USER == ePaper )
{
MapMode aPrinterMode = pPrinter->GetMapMode();
- MapMode aLocalMode( MAP_TWIP );
+ MapMode aLocalMode( MapUnit::MapTwip );
pPrinter->SetMapMode( aLocalMode );
pPrinter->SetPaperSizeUser( aEnumSize );
pPrinter->SetMapMode( aPrinterMode );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index c6b1673a0464..c83ddd442d30 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1841,7 +1841,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL
pWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) );
Rectangle aDesktop = pWin->GetDesktopRectPixel();
- Size aSpace = pWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
+ Size aSpace = pWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont );
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 3b1e33411b0b..f574b0988949 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1819,7 +1819,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
if ( pDrawObj )
{
Rectangle aRect = pDrawObj->GetLogicRect();
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
Size aOleSize = pDrawObj->GetOrigObjSize( &aMapMode );
aRect.SetSize( aOleSize );
aObjArea = aRect;
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 160dc436c9d5..892b7c71d354 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -332,7 +332,7 @@ void ScTabViewShell::UpdateOleZoom()
if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
{
vcl::Window* pWin = GetActiveWin();
- Size aWinHMM = pWin->PixelToLogic( pWin->GetOutputSizePixel(), MAP_100TH_MM );
+ Size aWinHMM = pWin->PixelToLogic( pWin->GetOutputSizePixel(), MapUnit::Map100thMM );
SetZoomFactor( Fraction( aWinHMM.Width(),aObjSize.Width() ),
Fraction( aWinHMM.Height(),aObjSize.Height() ) );
}
@@ -361,7 +361,7 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
{
- Size aLogicSize = GetWindow()->PixelToLogic( aSize, MAP_100TH_MM );
+ Size aLogicSize = GetWindow()->PixelToLogic( aSize, MapUnit::Map100thMM );
SfxViewShell::SetZoomFactor( Fraction( aLogicSize.Width(),aObjSize.Width() ),
Fraction( aLogicSize.Height(),aObjSize.Height() ) );
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index d16e7e84caf3..35ca636fcd77 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -127,7 +127,7 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
Size aDrawSize = aRect.GetSize();
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
Size aOleSize = pObj->GetOrigObjSize( &aMapMode );
if ( pClient->GetAspect() != embed::Aspects::MSOLE_ICON
@@ -139,7 +139,7 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
{
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( pClient->GetAspect() ) );
aOleSize = OutputDevice::LogicToLogic( aDrawSize,
- MAP_100TH_MM, aUnit );
+ MapUnit::Map100thMM, aUnit );
awt::Size aSz( aOleSize.Width(), aOleSize.Height() );
xObj->setVisualAreaSize( pClient->GetAspect(), aSz );
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 8e2dd1592d00..34aa647f7da0 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -330,7 +330,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
pViewShell ( pViewSh ),
pOptions ( new ScViewOptions ),
pSpellingView ( nullptr ),
- aLogicMode ( MAP_100TH_MM ),
+ aLogicMode ( MapUnit::Map100thMM ),
eDefZoomType( SvxZoomType::PERCENT ),
aDefZoomX ( 1,1 ),
aDefZoomY ( 1,1 ),
@@ -2473,7 +2473,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
{
Point& rSplitPos = rTabSett.maSplitPos;
rSplitPos = Point( bHSplit ? pViewTab->nHSplitPos : 0, bVSplit ? pViewTab->nVSplitPos : 0 );
- rSplitPos = Application::GetDefaultDevice()->PixelToLogic( rSplitPos, MapMode( MAP_TWIP ) );
+ rSplitPos = Application::GetDefaultDevice()->PixelToLogic( rSplitPos, MapMode( MapUnit::MapTwip ) );
if( pDocShell )
rSplitPos.X() = (long)((double)rSplitPos.X() / pDocShell->GetOutputFactor());
}
@@ -2609,7 +2609,7 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
else
{
Point aPixel = Application::GetDefaultDevice()->LogicToPixel(
- rTabSett.maSplitPos, MapMode( MAP_TWIP ) ); //! Zoom?
+ rTabSett.maSplitPos, MapMode( MapUnit::MapTwip ) ); //! Zoom?
// the test for use of printer metrics for text formatting here
// effectively results in the nFactor = 1.0 regardless of the Option setting.
if( pDocShell && SC_MOD()->GetInputOptions().GetTextWysiwyg())
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 5e769f87c7bd..680fcb77e9fd 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -88,7 +88,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if (pRef)
{
aOldMapMode = pRef->GetMapMode();
- pRef->SetMapMode( MapMode(MAP_100TH_MM) );
+ pRef->SetMapMode( MapMode(MapUnit::Map100thMM) );
}
bool bNegativePage = GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() );
@@ -301,14 +301,14 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
Size aSize;
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aSize = aObjRef.GetSize( &aMapMode );
}
else
{
// working with visual area can switch object to running state
MapUnit aMapObj = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
- MapUnit aMap100 = MAP_100TH_MM;
+ MapUnit aMap100 = MapUnit::Map100thMM;
if ( pDescSize && pDescSize->Width() && pDescSize->Height() )
{
@@ -413,9 +413,9 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
Point aPos( rPos );
vcl::Window* pWin = GetActiveWin();
MapMode aSourceMap = rGraphic.GetPrefMapMode();
- MapMode aDestMap( MAP_100TH_MM );
+ MapMode aDestMap( MapUnit::Map100thMM );
- if (aSourceMap.GetMapUnit() == MAP_PIXEL)
+ if (aSourceMap.GetMapUnit() == MapUnit::MapPixel)
{
// consider pixel correction, so bitmap fits to screen
Fraction aScaleX, aScaleY;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index efedb2e0803b..23d738f45c69 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1404,7 +1404,7 @@ void ScViewFunc::RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
ScDocShellModificator aModificator( *pDocSh );
ScopedVclPtrInstance< VirtualDevice > pVirtDev;
- pVirtDev->SetMapMode(MAP_PIXEL);
+ pVirtDev->SetMapMode(MapUnit::MapPixel);
pDoc->StyleSheetChanged( pStyleSheet, true, pVirtDev,
rViewData.GetPPTX(),
rViewData.GetPPTY(),
@@ -1430,7 +1430,7 @@ void ScViewFunc::UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
ScDocShellModificator aModificator( *pDocSh );
ScopedVclPtrInstance< VirtualDevice > pVirtDev;
- pVirtDev->SetMapMode(MAP_PIXEL);
+ pVirtDev->SetMapMode(MapUnit::MapPixel);
pDoc->StyleSheetChanged( pStyleSheet, false, pVirtDev,
rViewData.GetPPTX(),
rViewData.GetPPTY(),
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 435e81b58254..bbadc7f03704 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -78,7 +78,7 @@ ScXMLSourceDlg::ScXMLSourceDlg(
get(mpFtSourceFile, "sourcefile");
get(mpMapGrid, "mapgrid");
get(mpLbTree, "tree");
- Size aTreeSize(mpLbTree->LogicToPixel(Size(130, 120), MAP_APPFONT));
+ Size aTreeSize(mpLbTree->LogicToPixel(Size(130, 120), MapUnit::MapAppFont));
mpLbTree->set_width_request(aTreeSize.Width());
mpLbTree->set_height_request(aTreeSize.Height());
get(mpRefEdit, "edit");
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 3df30906acf2..6726f3736d9e 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -200,11 +200,11 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
else
SetUIUnit( (FieldUnit)pOptions->GetMetric(), Fraction( 1, 1 ) ); // default
- SetScaleUnit(MAP_100TH_MM);
+ SetScaleUnit(MapUnit::Map100thMM);
SetScaleFraction(Fraction(1, 1));
SetDefaultFontHeight(847); // 24p
- pItemPool->SetDefaultMetric(MAP_100TH_MM);
+ pItemPool->SetDefaultMetric(MapUnit::Map100thMM);
pItemPool->FreezeIdRanges();
SetTextDefaults();
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 601b4bb90939..3ee8be97e24b 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -492,7 +492,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
if (nPageCount <= 1)
{
// #i57181# Paper size depends on Language, like in Writer
- Size aDefSize = SvxPaperInfo::GetDefaultPaperSize( MAP_100TH_MM );
+ Size aDefSize = SvxPaperInfo::GetDefaultPaperSize( MapUnit::Map100thMM );
// Insert handout page
SdPage* pHandoutPage = AllocSdPage(false);
@@ -579,7 +579,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
else
{
// Impress: always use screen format, landscape.
- Size aSz( SvxPaperInfo::GetPaperSize(PAPER_SCREEN_4_3, MAP_100TH_MM) );
+ Size aSz( SvxPaperInfo::GetPaperSize(PAPER_SCREEN_4_3, MapUnit::Map100thMM) );
pPage->SetSize( Size( aSz.Height(), aSz.Width() ) );
pPage->SetBorder(0, 0, 0, 0);
}
@@ -1008,7 +1008,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
if ( pIMapInfo )
{
- const MapMode aMap100( MAP_100TH_MM );
+ const MapMode aMap100( MapUnit::Map100thMM );
Size aGraphSize;
Point aRelPoint( rWinPoint );
ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap();
@@ -1034,7 +1034,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
if ( rGeo.nShearAngle )
ShearPoint( aRelPoint, rRect.TopLeft(), -rGeo.nTan );
- if ( pGrafObj->GetGrafPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ if ( pGrafObj->GetGrafPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
aGraphSize = Application::GetDefaultDevice()->PixelToLogic( pGrafObj->GetGrafPrefSize(), aMap100 );
else
aGraphSize = OutputDevice::LogicToLogic( pGrafObj->GetGrafPrefSize(),
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 733ab02a982d..801016472376 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -303,7 +303,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
aOutDev.SetMapMode( aGraphic.GetPrefMapMode() );
Size aSizePix = aOutDev.LogicToPixel( aGraphic.GetPrefSize() );
- aOutDev.SetMapMode(MAP_100TH_MM);
+ aOutDev.SetMapMode(MapUnit::Map100thMM);
Size aSize = aOutDev.PixelToLogic(aSizePix);
Point aPnt (0, 0);
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 380e0bc3afbc..8d6cf4d51988 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1080,9 +1080,9 @@ void ImplExportComments( const uno::Reference< drawing::XDrawPage >& xPage, SvMe
uno::Reference< office::XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement() );
geometry::RealPoint2D aRealPoint2D( xAnnotation->getPosition() );
- MapMode aMapDest( MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) );
+ MapMode aMapDest( MapUnit::MapInch, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) );
Point aPoint( OutputDevice::LogicToLogic( Point( static_cast< sal_Int32 >( aRealPoint2D.X * 100.0 ),
- static_cast< sal_Int32 >( aRealPoint2D.Y * 100.0 ) ), MAP_100TH_MM, aMapDest ) );
+ static_cast< sal_Int32 >( aRealPoint2D.Y * 100.0 ) ), MapUnit::Map100thMM, aMapDest ) );
OUString sAuthor( xAnnotation->getAuthor() );
uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index 350337653598..bd4b23235550 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -128,8 +128,8 @@ PPTWriterBase::PPTWriterBase()
, mnPages(0)
, mnMasterPages(0)
, maFraction(1, 576)
- , maMapModeSrc(MAP_100TH_MM)
- , maMapModeDest(MAP_INCH, Point(), maFraction, maFraction)
+ , maMapModeSrc(MapUnit::Map100thMM)
+ , maMapModeDest(MapUnit::MapInch, Point(), maFraction, maFraction)
, meLatestPageType(NORMAL)
, mpStyleSheet(nullptr)
{
@@ -148,8 +148,8 @@ PPTWriterBase::PPTWriterBase( const Reference< XModel > & rXModel,
, mnPages(0)
, mnMasterPages(0)
, maFraction(1, 576)
- , maMapModeSrc(MAP_100TH_MM)
- , maMapModeDest(MAP_INCH, Point(), maFraction, maFraction)
+ , maMapModeSrc(MapUnit::Map100thMM)
+ , maMapModeDest(MapUnit::MapInch, Point(), maFraction, maFraction)
, meLatestPageType (NORMAL)
, mpStyleSheet(nullptr)
{
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 9e4bb2f706ca..f0137e847837 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -194,7 +194,7 @@ bool SdGRFFilter::Import()
Point aPos;
Size aPagSize( pPage->GetSize() );
Size aGrfSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(),
- aGraphic.GetPrefMapMode(), MAP_100TH_MM ) );
+ aGraphic.GetPrefMapMode(), MapUnit::Map100thMM ) );
aPagSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder();
aPagSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder();
diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx
index 1eed38115361..2aff0cd214b4 100644
--- a/sd/source/filter/html/buttonset.cxx
+++ b/sd/source/filter/html/buttonset.cxx
@@ -197,7 +197,7 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
std::vector< Graphic > aGraphics;
ScopedVclPtrInstance< VirtualDevice > pDev;
- pDev->SetMapMode(MapMode(MAP_PIXEL));
+ pDev->SetMapMode(MapMode(MapUnit::MapPixel));
Size aSize;
std::vector< OUString >::const_iterator aIter( rButtons.begin() );
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index cb7dbd6d5e93..74d691031dba 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -366,7 +366,7 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
m_bImpress = eDocType == DOCUMENT_TYPE_IMPRESS;
- Size aSize(LogicToPixel(Size(60, 50), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(60, 50), MapUnit::MapAppFont));
get(pPage2_Standard_FB, "standardFBImage");
pPage2_Standard_FB->set_width_request(aSize.Width());
pPage2_Standard_FB->set_height_request(aSize.Height());
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 2cbac3ec54cd..2baffb241b46 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -434,7 +434,7 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD
// draw the category title
int nVertBorder = ((aSize.Height() - rDev.GetTextHeight()) >> 1);
- int nHorzBorder = rRenderContext.LogicToPixel(Size(3, 3), MAP_APPFONT).Width();
+ int nHorzBorder = rRenderContext.LogicToPixel(Size(3, 3), MapUnit::MapAppFont).Width();
aOutRect.Left() += nHorzBorder;
aOutRect.Right() -= nHorzBorder;
@@ -969,7 +969,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan
{
Color aOldColor(rRenderContext.GetTextColor());
rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor());
- ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MAP_APPFONT));
+ ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MapUnit::MapAppFont));
Rectangle aRect(Point(0,0), GetOutputSizePixel());
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 8da6e5a3e2a8..9689c54b1834 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -387,7 +387,7 @@ public:
virtual Size GetOptimalSize() const override
{
- return LogicToPixel(Size(70, 88), MAP_APPFONT);
+ return LogicToPixel(Size(70, 88), MapUnit::MapAppFont);
}
};
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 90e5b78d6fc7..21cf13b5499c 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -368,7 +368,7 @@ void AnnotationWindow::StartEdit()
void AnnotationWindow::Rescale()
{
- MapMode aMode(MAP_100TH_MM);
+ MapMode aMode(MapUnit::Map100thMM);
aMode.SetOrigin( Point() );
mpOutliner->SetRefMapMode( aMode );
SetMapMode( aMode );
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 5ecdd8dfa36c..2d6b184b7a64 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -93,7 +93,7 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
// set its resolution to 600 DPI. This leads to a visually better
// formatting of text in small sizes (6 point and below.)
mpVirtualRefDevice.reset(VclPtr<VirtualDevice>::Create());
- mpVirtualRefDevice->SetMapMode( MAP_100TH_MM );
+ mpVirtualRefDevice->SetMapMode( MapUnit::Map100thMM );
mpVirtualRefDevice->SetReferenceDevice ( VirtualDevice::RefDevMode::Dpi600 );
}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index c61ebf90874c..fc4f5e76eb21 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -436,7 +436,7 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot )
// Pool has by default MapUnit Twips (Awgh!)
SfxItemPool& rPool = GetPool();
- rPool.SetDefaultMetric( MAP_100TH_MM );
+ rPool.SetDefaultMetric( MapUnit::Map100thMM );
SfxItemSet* pRet = new SfxItemSet( rPool,
SID_ATTR_METRIC, SID_ATTR_METRIC,
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index a76a2fe4afc5..2dbe88d41039 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -43,7 +43,7 @@ PaneDockingWindow::PaneDockingWindow(
: TitledDockingWindow(_pBindings, pChildWindow, pParent)
{
SetTitle(rsTitle);
- SetSizePixel(LogicToPixel(Size(80,200), MAP_APPFONT));
+ SetSizePixel(LogicToPixel(Size(80,200), MapUnit::MapAppFont));
}
PaneDockingWindow::~PaneDockingWindow()
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index e20fdec12faa..b1c466f8bc5e 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -119,7 +119,7 @@ VCL_BUILDER_DECL_FACTORY(ClientBox)
Size ClientBox::GetOptimalSize() const
{
- return LogicToPixel(Size(200, 140), MAP_APPFONT);
+ return LogicToPixel(Size(200, 140), MapUnit::MapAppFont);
}
ClientBox::~ClientBox()
@@ -167,7 +167,7 @@ void ClientBox::CalcActiveHeight( const long nPos )
aSize.Width() -= ICON_OFFSET;
aSize = LogicToPixel( Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ),
- MapMode( MAP_APPFONT ) );
+ MapMode( MapUnit::MapAppFont ) );
aTextHeight += aSize.Height();
if ( aTextHeight < m_nStdHeight )
@@ -356,7 +356,7 @@ void ClientBox::RecalcAll()
Size aPBSize = LogicToPixel(
Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ),
- MapMode( MAP_APPFONT ) );
+ MapMode( MapUnit::MapAppFont ) );
m_aPinBox->SetSizePixel( aPBSize );
m_aDeauthoriseButton->SetSizePixel( m_aDeauthoriseButton->GetOptimalSize() );
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index e7f2a837b49d..b40f032492c8 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -59,7 +59,7 @@ SdDisplay::SdDisplay(vcl::Window* pWin)
: Control(pWin, 0)
, aScale(1, 1)
{
- SetMapMode( MAP_PIXEL );
+ SetMapMode( MapUnit::MapPixel );
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) );
}
@@ -105,7 +105,7 @@ void SdDisplay::SetScale( const Fraction& rFrac )
Size SdDisplay::GetOptimalSize() const
{
- return LogicToPixel(Size(147, 87), MAP_APPFONT);
+ return LogicToPixel(Size(147, 87), MapUnit::MapAppFont);
}
void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt )
@@ -534,7 +534,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
Size aObjSize( aObjRect.GetSize() );
Point aOrigin( Point( -aObjRect.Left(), -aObjRect.Top() ) );
MapMode aMap( pVD->GetMapMode() );
- aMap.SetMapUnit( MAP_100TH_MM );
+ aMap.SetMapUnit( MapUnit::Map100thMM );
aMap.SetOrigin( aOrigin );
pVD->SetMapMode( aMap );
pVD->SetOutputSize( aObjSize );
@@ -896,7 +896,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
DBG_ASSERT( pOutWin, "Window does not exist!" );
// find window center
- const MapMode aMap100( MAP_100TH_MM );
+ const MapMode aMap100( MapUnit::Map100thMM );
Size aMaxSizeLog;
Size aMaxSizePix;
Size aTemp( pOutWin->GetOutputSizePixel() );
@@ -913,7 +913,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
Size aTmpSizeLog;
const Size aTmpSizePix( rBmpEx.GetSizePixel() );
- if ( aGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ if ( aGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
aTmpSizeLog = pDefDev->PixelToLogic( aGraphic.GetPrefSize(), aMap100 );
else
aTmpSizeLog = OutputDevice::LogicToLogic( aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), aMap100 );
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index e4ed8df8241d..f68e06c38293 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -118,12 +118,12 @@ void CopyDlg::Reset()
long nMoveX = 500L;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) )
nMoveX = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
- SetMetricValue( *m_pMtrFldMoveX, Fraction(nMoveX) / maUIScale, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldMoveX, Fraction(nMoveX) / maUIScale, MapUnit::Map100thMM);
long nMoveY = 500L;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) )
nMoveY = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
- SetMetricValue( *m_pMtrFldMoveY, Fraction(nMoveY) / maUIScale, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldMoveY, Fraction(nMoveY) / maUIScale, MapUnit::Map100thMM);
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) )
m_pMtrFldAngle->SetValue( static_cast<const SfxInt32Item*>( pPoolItem )->GetValue() );
@@ -133,12 +133,12 @@ void CopyDlg::Reset()
long nWidth = 0L;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) )
nWidth = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
- SetMetricValue( *m_pMtrFldWidth, Fraction(nWidth) / maUIScale, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldWidth, Fraction(nWidth) / maUIScale, MapUnit::Map100thMM);
long nHeight = 0L;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) )
nHeight = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue();
- SetMetricValue( *m_pMtrFldHeight, Fraction(nHeight) / maUIScale, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldHeight, Fraction(nHeight) / maUIScale, MapUnit::Map100thMM);
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) )
{
@@ -189,10 +189,10 @@ void CopyDlg::Reset()
*/
void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
{
- long nMoveX = Fraction( GetCoreValue( *m_pMtrFldMoveX, MAP_100TH_MM) ) * maUIScale;
- long nMoveY = Fraction( GetCoreValue( *m_pMtrFldMoveY, MAP_100TH_MM) ) * maUIScale;
- long nHeight = Fraction( GetCoreValue( *m_pMtrFldHeight, MAP_100TH_MM) ) * maUIScale;
- long nWidth = Fraction( GetCoreValue( *m_pMtrFldWidth, MAP_100TH_MM) ) * maUIScale;
+ long nMoveX = Fraction( GetCoreValue( *m_pMtrFldMoveX, MapUnit::Map100thMM) ) * maUIScale;
+ long nMoveY = Fraction( GetCoreValue( *m_pMtrFldMoveY, MapUnit::Map100thMM) ) * maUIScale;
+ long nHeight = Fraction( GetCoreValue( *m_pMtrFldHeight, MapUnit::Map100thMM) ) * maUIScale;
+ long nWidth = Fraction( GetCoreValue( *m_pMtrFldWidth, MapUnit::Map100thMM) ) * maUIScale;
rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, (sal_uInt16) m_pNumFldCopies->GetValue() ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_X, nMoveX ) );
@@ -239,9 +239,9 @@ IMPL_LINK_NOARG(CopyDlg, SetViewData, Button*, void)
Rectangle aRect = mpView->GetAllMarkedRect();
SetMetricValue( *m_pMtrFldMoveX, Fraction( aRect.GetWidth() ) /
- maUIScale, MAP_100TH_MM);
+ maUIScale, MapUnit::Map100thMM);
SetMetricValue( *m_pMtrFldMoveY, Fraction( aRect.GetHeight() ) /
- maUIScale, MAP_100TH_MM);
+ maUIScale, MapUnit::Map100thMM);
// sets color attribute
const SfxPoolItem* pPoolItem = nullptr;
@@ -260,13 +260,13 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault, Button*, void)
m_pNumFldCopies->SetValue( 1L );
long nValue = 500L;
- SetMetricValue( *m_pMtrFldMoveX, Fraction(nValue) / maUIScale, MAP_100TH_MM);
- SetMetricValue( *m_pMtrFldMoveY, Fraction(nValue) / maUIScale, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldMoveX, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
+ SetMetricValue( *m_pMtrFldMoveY, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
nValue = 0L;
m_pMtrFldAngle->SetValue( nValue );
- SetMetricValue( *m_pMtrFldWidth, Fraction(nValue) / maUIScale, MAP_100TH_MM);
- SetMetricValue( *m_pMtrFldHeight, Fraction(nValue) / maUIScale, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldWidth, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
+ SetMetricValue( *m_pMtrFldHeight, Fraction(nValue) / maUIScale, MapUnit::Map100thMM);
// set color attribute
const SfxPoolItem* pPoolItem = nullptr;
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index aa0d30375cde..1b9a51655c5a 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -105,8 +105,8 @@ SdSnapLineDlg::SdSnapLineDlg(
nYValue = static_cast<const SfxInt32Item&>( rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
nXValue = Fraction(nXValue) / aUIScale;
nYValue = Fraction(nYValue) / aUIScale;
- SetMetricValue( *m_pMtrFldX, nXValue, MAP_100TH_MM);
- SetMetricValue( *m_pMtrFldY, nYValue, MAP_100TH_MM);
+ SetMetricValue( *m_pMtrFldX, nXValue, MapUnit::Map100thMM);
+ SetMetricValue( *m_pMtrFldY, nYValue, MapUnit::Map100thMM);
m_pRbPoint->Check();
}
@@ -152,8 +152,8 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs)
else if ( m_pRbVert->IsChecked() ) eKind = SK_VERTICAL;
else eKind = SK_POINT;
- nXValue = Fraction( GetCoreValue( *m_pMtrFldX, MAP_100TH_MM) ) * aUIScale;
- nYValue = Fraction( GetCoreValue( *m_pMtrFldY, MAP_100TH_MM) ) * aUIScale;
+ nXValue = Fraction( GetCoreValue( *m_pMtrFldX, MapUnit::Map100thMM) ) * aUIScale;
+ nYValue = Fraction( GetCoreValue( *m_pMtrFldY, MapUnit::Map100thMM) ) * aUIScale;
rOutAttrs.Put(SfxAllEnumItem(ATTR_SNAPLINE_KIND, (sal_uInt16)eKind));
rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_X, nXValue));
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index e141119de251..3158d48f47b5 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -89,7 +89,7 @@ void SdDocPreviewWin::dispose()
Size SdDocPreviewWin::GetOptimalSize() const
{
- return LogicToPixel(Size(122, 96), MAP_APPFONT);
+ return LogicToPixel(Size(122, 96), MapUnit::MapAppFont);
}
void SdDocPreviewWin::Resize()
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index e021b59a16e7..f369a613986d 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -703,7 +703,7 @@ PresLayoutPreview::~PresLayoutPreview()
Size PresLayoutPreview::GetOptimalSize() const
{
- return LogicToPixel(Size(80, 80), MAP_APPFONT);
+ return LogicToPixel(Size(80, 80), MapUnit::MapAppFont);
}
void PresLayoutPreview::init( SdPage *pMaster )
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index a39c9fdc9fd9..8b9fba0396ad 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -40,7 +40,7 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
, maStrNone(SD_RESSTR(STR_NULL))
{
get(m_pVS, "select");
- Size aPref(LogicToPixel(Size(144 , 141), MAP_APPFONT));
+ Size aPref(LogicToPixel(Size(144 , 141), MapUnit::MapAppFont));
m_pVS->set_width_request(aPref.Width());
m_pVS->set_height_request(aPref.Height());
get(m_pCbxMasterPage, "masterpage");
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 685658ae26db..54818e24a3be 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -45,7 +45,7 @@ SdVectorizeDlg::SdVectorizeDlg(vcl::Window* pParent, const Bitmap& rBmp, ::sd::D
get(m_pBmpWin, "source");
get(m_pMtfWin, "vectorized");
- Size aSize(LogicToPixel(Size(92, 100), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(92, 100), MapUnit::MapAppFont));
m_pBmpWin->set_width_request(aSize.Width());
m_pMtfWin->set_width_request(aSize.Width());
m_pBmpWin->set_height_request(aSize.Height());
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index c10dbc1c2b34..058851baea1c 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -128,10 +128,10 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
if( ( ASPECT_THUMBNAIL == nAspect ) || ( ASPECT_DOCPRINT == nAspect ) )
{
// provide size of first page
- MapMode aSrcMapMode(MAP_PIXEL);
- MapMode aDstMapMode(MAP_100TH_MM);
+ MapMode aSrcMapMode(MapUnit::MapPixel);
+ MapMode aDstMapMode(MapUnit::Map100thMM);
Size aSize = mpDoc->GetSdPage(0, PK_STANDARD)->GetSize();
- aSrcMapMode.SetMapUnit(MAP_100TH_MM);
+ aSrcMapMode.SetMapUnit(MapUnit::Map100thMM);
aSize = Application::GetDefaultDevice()->LogicToLogic(aSize, &aSrcMapMode, &aDstMapMode);
aVisArea.SetSize(aSize);
@@ -190,7 +190,7 @@ Size DrawDocShell::GetFirstPageSize()
Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage)
{
const sal_uInt16 nMaxEdgePixel = 90;
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
const Size aSize( pPage->GetSize() );
const Point aNullPt;
ScopedVclPtrInstance< VirtualDevice > pVDev( *Application::GetDefaultDevice() );
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 63696aa45269..b6467f2dcd7e 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -126,7 +126,7 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
mpPrinter->SetDrawMode( nMode );
MapMode aMM (mpPrinter->GetMapMode());
- aMM.SetMapUnit(MAP_100TH_MM);
+ aMM.SetMapUnit(MapUnit::Map100thMM);
mpPrinter->SetMapMode(aMM);
UpdateRefDevice();
}
diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx
index 1588c9f94a03..dfe544d35671 100644
--- a/sd/source/ui/docshell/sdclient.cxx
+++ b/sd/source/ui/docshell/sdclient.cxx
@@ -163,7 +163,7 @@ void Client::ViewChanged()
// TODO/LEAN: maybe we can do this without requesting the VisualArea?
// working with the visual area might need running state, so the object may switch itself to this state
- MapMode aMap100( MAP_100TH_MM );
+ MapMode aMap100( MapUnit::Map100thMM );
Rectangle aVisArea;
Size aSize = pSdrOle2Obj->GetOrigObjSize( &aMap100 );
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 720b1681f170..68a6f320218c 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -370,14 +370,14 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// rectangle with balanced edge ratio
aSize.Width() = 14100;
aSize.Height() = 10000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
+ Size aTmp = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aUnit );
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( nAspect, aSz );
}
else
{
- aSize = OutputDevice::LogicToLogic(aSize, aUnit, MAP_100TH_MM);
+ aSize = OutputDevice::LogicToLogic(aSize, aUnit, MapUnit::Map100thMM);
}
Point aPos;
@@ -433,7 +433,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
}
pOleObj->SetLogicRect(aRect);
- Size aTmp( OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aUnit ) );
+ Size aTmp( OutputDevice::LogicToLogic( aRect.GetSize(), MapUnit::Map100thMM, aUnit ) );
awt::Size aVisualSize;
aVisualSize.Width = aTmp.Width();
aVisualSize.Height = aTmp.Height();
@@ -529,7 +529,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
bool bInsertNewObject = true;
Size aSize;
- MapUnit aMapUnit = MAP_100TH_MM;
+ MapUnit aMapUnit = MapUnit::Map100thMM;
if ( nAspect != embed::Aspects::MSOLE_ICON )
{
awt::Size aSz;
@@ -550,14 +550,14 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// rectangle with balanced edge ratio
aSize.Width() = 14100;
aSize.Height() = 10000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aMapUnit );
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( nAspect, aSz );
}
else
{
- aSize = OutputDevice::LogicToLogic(aSize, aMapUnit, MAP_100TH_MM);
+ aSize = OutputDevice::LogicToLogic(aSize, aMapUnit, MapUnit::Map100thMM);
}
}
@@ -593,7 +593,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
}
else
{
- Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MapUnit::Map100thMM, aMapUnit );
awt::Size aSz( aTmp.Width(), aTmp.Height() );
xObj->setVisualAreaSize( nAspect, aSz );
}
@@ -613,7 +613,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
aObjRef.SetGraphicStream( xIconMetaFile, aIconMediaType );
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aSize = aObjRef.GetSize( &aMapMode );
}
@@ -636,7 +636,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
Size aNewSize = Window::LogicToLogic( Size( aSz.Width, aSz.Height ),
- MapMode( aMapUnit ), MapMode( MAP_100TH_MM ) );
+ MapMode( aMapUnit ), MapMode( MapUnit::Map100thMM ) );
if ( aNewSize != aSize )
{
aRect.SetSize( aNewSize );
@@ -653,7 +653,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
if ( nAspect != embed::Aspects::MSOLE_ICON )
{
- Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aMapUnit );
+ Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MapUnit::Map100thMM, aMapUnit );
awt::Size aSz( aTmp.Width(), aTmp.Height() );
xObj->setVisualAreaSize( nAspect, aSz );
}
@@ -737,9 +737,9 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
if( aPrefSize.Width() && aPrefSize.Height() )
{
if( mpWindow )
- aSize = mpWindow->PixelToLogic( aPrefSize, MAP_100TH_MM );
+ aSize = mpWindow->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
}
else
aSize = Size( 5000, 5000 );
@@ -816,9 +816,9 @@ void FuInsert3DModel::DoExecute( SfxRequest& )
Size aSize(480,360);
if( mpWindow )
- aSize = mpWindow->PixelToLogic( aSize, MAP_100TH_MM );
+ aSize = mpWindow->PixelToLogic( aSize, MapUnit::Map100thMM );
else
- aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, MAP_100TH_MM );
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, MapUnit::Map100thMM );
if( mpWindow )
{
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 8d7ffc8e3630..d103a84fa0db 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -97,7 +97,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
pWindow->Show(bInitiallyVisible);
- pWindow->SetMapMode(MAP_PIXEL);
+ pWindow->SetMapMode(MapUnit::MapPixel);
pWindow->SetBackground();
if ( ! bEnableParentClip)
{
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 39fec898ad74..62cb7141cdb4 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -252,7 +252,7 @@ PresenterTextView::Implementation::Implementation()
mnTop(0),
mnTotalHeight(-1)
{
- mpOutputDevice->SetMapMode(MAP_PIXEL);
+ mpOutputDevice->SetMapMode(MapUnit::MapPixel);
GetEditEngine();
}
@@ -330,7 +330,7 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine()
EEControlBits(~EEControlBits::PASTESPECIAL) );
pEditEngine->SetWordDelimiters (" .=+-*/(){}[];\"");
- pEditEngine->SetRefMapMode (MAP_PIXEL);
+ pEditEngine->SetRefMapMode (MapUnit::MapPixel);
pEditEngine->SetPaperSize (Size(800, 0));
pEditEngine->EraseVirtualDevice();
pEditEngine->ClearModifyFlag();
@@ -387,7 +387,7 @@ void PresenterTextView::Implementation::SetFontDescriptor (
SvxFontHeightItem aFontHeight(
Application::GetDefaultDevice()->LogicToPixel(
- Size(0, nFontHeight), MapMode (MAP_POINT)).Height(),
+ Size(0, nFontHeight), MapMode (MapUnit::MapPoint)).Height(),
100,
EE_CHAR_FONTHEIGHT);
mpEditEngineItemPool->SetPoolDefaultItem( aFontHeight);
@@ -454,7 +454,7 @@ Reference<rendering::XBitmap> const & PresenterTextView::Implementation::GetBitm
mpOutputDevice.disposeAndClear();
mpOutputDevice = VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(),
DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
- mpOutputDevice->SetMapMode(MAP_PIXEL);
+ mpOutputDevice->SetMapMode(MapUnit::MapPixel);
mpOutputDevice->SetOutputSizePixel(maSize);
mpOutputDevice->SetLineColor();
mpOutputDevice->SetFillColor();
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index ab7c1fb68fc1..fcf4bf45e37a 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -718,7 +718,7 @@ void SlideBackground::NotifyItemUpdate(
if(mpPaperOrientation->GetSelectEntryPos() == 0)
Swap(aPaperSize);
- Paper ePaper = SvxPaperInfo::GetSvxPaper(aPaperSize, static_cast<MapUnit>(meUnit),true);
+ Paper ePaper = SvxPaperInfo::GetSvxPaper(aPaperSize, meUnit, true);
mpPaperSizeBox->SetSelection( ePaper );
}
}
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index ba757dc4b0a8..11d2ae362039 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -59,7 +59,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, vc
EnableRTL (false);
MapMode aMap(GetMapMode());
- aMap.SetMapUnit(MAP_100TH_MM);
+ aMap.SetMapUnit(MapUnit::Map100thMM);
SetMapMode(aMap);
// set HelpId
@@ -462,8 +462,8 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
const MapMode& rMap = GetMapMode();
const Point aOutOrg( PixelToLogic( Point() ) );
const Size aOutSize( GetOutputSize() );
- const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, rMap ) );
- const Size aOffset( LogicToLogic( Size( 1000, 1000 ), MAP_100TH_MM, rMap ) );
+ const Size aTextSize( LogicToLogic( Size( 0, 14 ), MapUnit::MapPoint, rMap ) );
+ const Size aOffset( LogicToLogic( Size( 1000, 1000 ), MapUnit::Map100thMM, rMap ) );
OUString aText( SdResId( STR_PRES_PAUSE ) );
bool bDrawn = false;
@@ -479,7 +479,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
{
Size aGrfSize;
- if( maLogo.GetPrefMapMode() == MAP_PIXEL )
+ if( maLogo.GetPrefMapMode() == MapUnit::MapPixel )
aGrfSize = PixelToLogic( maLogo.GetPrefSize() );
else
aGrfSize = LogicToLogic( maLogo.GetPrefSize(), maLogo.GetPrefMapMode(), rMap );
@@ -536,7 +536,7 @@ void ShowWindow::DrawEndScene()
vcl::Font aFont( GetSettings().GetStyleSettings().GetMenuFont() );
const Point aOutOrg( PixelToLogic( Point() ) );
- const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, GetMapMode() ) );
+ const Size aTextSize( LogicToLogic( Size( 0, 14 ), MapUnit::MapPoint, GetMapMode() ) );
const OUString aText( SdResId( STR_PRES_SOFTEND ) );
aFont.SetFontSize( aTextSize );
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index b762a68cd172..0b36058aadb4 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -133,7 +133,7 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
// class.
pWindow->SetBackground(Wallpaper());
pWindow->SetCenterAllowed(false);
- pWindow->SetMapMode(MapMode(MAP_PIXEL));
+ pWindow->SetMapMode(MapMode(MapUnit::MapPixel));
pWindow->SetViewSize(mrView.GetModelArea().GetSize());
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index 45806df08f0e..86bf11a0b81d 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -156,7 +156,7 @@ std::shared_ptr<vcl::Font> Theme::GetFont (
if (pFont)
{
// Transform the point size to pixel size.
- const MapMode aFontMapMode (MAP_POINT);
+ const MapMode aFontMapMode (MapUnit::MapPoint);
const Size aFontSize (rDevice.LogicToPixel(pFont->GetFontSize(), aFontMapMode));
// Transform the font size to the logical coordinates of the device.
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index d4b8aca487cf..8a2cf3f8d3d7 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -160,7 +160,7 @@ Image PreviewRenderer::RenderSubstitution (
// Set a map mode that makes a typical substitution text completely
// visible.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
- aMapMode.SetMapUnit(MAP_100TH_MM);
+ aMapMode.SetMapUnit(MapUnit::Map100thMM);
Fraction aFinalScale(25 * rPreviewPixelSize.Width(), 28000);
aMapMode.SetScaleX(aFinalScale);
aMapMode.SetScaleY(aFinalScale);
@@ -365,7 +365,7 @@ void PreviewRenderer::SetupOutputSize (
// First set the map mode to some arbitrary scale that is numerically
// stable.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
- aMapMode.SetMapUnit(MAP_PIXEL);
+ aMapMode.SetMapUnit(MapUnit::MapPixel);
// Adapt it to the desired width.
const Size aPageModelSize (rPage.GetSize());
@@ -449,7 +449,7 @@ Image PreviewRenderer::ScaleBitmap (
(long)((nWidth*1.0 * aSize.Height()) / aSize.Width() + 0.5));
Size aPreviewSize (aFrameSize.Width()-2,aFrameSize.Height()-2);
MapMode aMapMode (mpPreviewDevice->GetMapMode());
- aMapMode.SetMapUnit(MAP_PIXEL);
+ aMapMode.SetMapUnit(MapUnit::MapPixel);
aMapMode.SetOrigin (Point());
aMapMode.SetScaleX (1.0);
aMapMode.SetScaleY (1.0);
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index afd08350bc90..125684283896 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -766,7 +766,7 @@ throw (UnknownPropertyException, PropertyVetoException,
pPrinter = SfxPrinter::Create ( aStream, pItemSet );
MapMode aMM (pPrinter->GetMapMode());
- aMM.SetMapUnit(MAP_100TH_MM);
+ aMM.SetMapUnit(MapUnit::Map100thMM);
pPrinter->SetMapMode(aMM);
pDocSh->SetPrinter( pPrinter );
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 72d53f7375e5..f4037ce1dbb1 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1925,7 +1925,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
pView->SetPageVisible( false );
pView->SetGlueVisible( false );
- pOut->SetMapMode( MAP_100TH_MM );
+ pOut->SetMapMode( MapUnit::Map100thMM );
pOut->IntersectClipRegion( aVisArea );
uno::Reference< frame::XModel > xModel;
@@ -2268,7 +2268,7 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice,
nTilePosY = convertTwipToMm100( nTilePosY );
MapMode aMapMode = rDevice.GetMapMode();
- aMapMode.SetMapUnit( MAP_100TH_MM );
+ aMapMode.SetMapUnit( MapUnit::Map100thMM );
aMapMode.SetOrigin( Point( -nTilePosX,
-nTilePosY) );
aMapMode.SetScaleX( scaleX );
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 206cc01f233b..3033a115369e 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1135,7 +1135,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
Size aSize( GetPage()->GetSize() );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaFillColorAction( COL_WHITE, true )), 0 );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( Rectangle( aPoint, aSize ) )), 1 );
- xMetaFile->SetPrefMapMode( MAP_100TH_MM );
+ xMetaFile->SetPrefMapMode( MapUnit::Map100thMM );
xMetaFile->SetPrefSize( aSize );
SvMemoryStream aDestStrm( 65535, 65535 );
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 5361f5abc725..359906e911f3 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1432,7 +1432,7 @@ private:
{
MapMode aMap (aInfo.mpPrinter->GetMapMode());
- aMap.SetMapUnit(MAP_100TH_MM);
+ aMap.SetMapUnit(MapUnit::Map100thMM);
aInfo.maMap = aMap;
mpPrinter->SetMapMode(aMap);
@@ -1623,7 +1623,7 @@ private:
Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize());
if( aOutRect.GetWidth() > aOutRect.GetHeight() )
{
- Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) ) );
maPrintSize.Width = aPaperSize.Height();
maPrintSize.Height = aPaperSize.Width();
const long nRotatedWidth = aOutRect.GetHeight();
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 97c6b502b949..8aee92b7e04d 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -478,7 +478,7 @@ void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize)
Size aSize( rSize );
aSize.Width() -= (aBorder.Left() + aBorder.Right());
aSize.Height() -= (aBorder.Top() + aBorder.Bottom());
- Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel( aObjSize, MAP_100TH_MM );
+ Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel( aObjSize, MapUnit::Map100thMM );
SfxViewShell::SetZoomFactor(
Fraction( aSize.Width(), std::max( aObjSizePixel.Width(), (long int)1 ) ),
Fraction( aSize.Height(), std::max( aObjSizePixel.Height(), (long int)1) ) );
@@ -550,7 +550,7 @@ sal_uInt16 ViewShellBase::SetPrinter (
nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE) && pNewPrinter )
{
MapMode aMap = pNewPrinter->GetMapMode();
- aMap.SetMapUnit(MAP_100TH_MM);
+ aMap.SetMapUnit(MapUnit::Map100thMM);
MapMode aOldMap = pNewPrinter->GetMapMode();
pNewPrinter->SetMapMode(aMap);
Size aNewSize = pNewPrinter->GetOutputSize();
@@ -1064,8 +1064,8 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const
{
Rectangle aRectangle = pOutlinerView->GetOutputArea();
vcl::Window* pWin = pThisShell->GetActiveWindow();
- if (pWin && pWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP);
+ if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
OString sRectangle = aRectangle.toString();
SfxLokHelper::notifyOtherView(&pDrawViewShell->GetViewShellBase(), pOtherShell, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle);
}
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index 4ef3dce4e7f1..f1c07f6102ed 100644
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
@@ -65,12 +65,12 @@ void DrawViewShell::ScannerEvent( const css::lang::EventObject& )
const SolarMutexGuard aGuard;
SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage();
Size aBmpSize( aScanBmp.GetPrefSize() ), aPageSize( pPage->GetSize() );
- const MapMode aMap100( MAP_100TH_MM );
+ const MapMode aMap100( MapUnit::Map100thMM );
if( !aBmpSize.Width() || !aBmpSize.Height() )
aBmpSize = aScanBmp.GetSizePixel();
- if( aScanBmp.GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ if( aScanBmp.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
aBmpSize = GetActiveWindow()->PixelToLogic( aBmpSize, aMap100 );
else
aBmpSize = OutputDevice::LogicToLogic( aBmpSize, aScanBmp.GetPrefMapMode(), aMap100 );
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 6b3b0606b5ca..25899a943c03 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -91,7 +91,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
ScopedVclPtrInstance< Window > aWindow(GetActiveWindow());
aWindow->SetMapMode(aGraphic.GetPrefMapMode());
Size aSizePix = aWindow->LogicToPixel(aGraphic.GetPrefSize());
- aWindow->SetMapMode( MapMode(MAP_100TH_MM) );
+ aWindow->SetMapMode( MapMode(MapUnit::Map100thMM) );
Size aSize = aWindow->PixelToLogic(aSizePix);
// constrain size to page size if necessary
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 061b28aecb2e..b98f8009db0d 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -719,8 +719,8 @@ bool View::SdrBeginTextEdit(
if (OutlinerView* pView = GetTextEditOutlinerView())
{
Rectangle aRectangle = pView->GetOutputArea();
- if (pWin && pWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP);
+ if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
OString sRectangle = aRectangle.toString();
SfxLokHelper::notifyOtherViews(&mpViewSh->GetViewShellBase(), LOK_CALLBACK_VIEW_LOCK, "rectangle", sRectangle);
}
@@ -886,7 +886,7 @@ void View::SetMarkedOriginalSize()
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
- MapMode aMap100( MAP_100TH_MM );
+ MapMode aMap100( MapUnit::Map100thMM );
aOleSize = static_cast<SdrOle2Obj*>(pObj)->GetOrigObjSize( &aMap100 );
bOK = true;
}
@@ -896,7 +896,7 @@ void View::SetMarkedOriginalSize()
try
{
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
- aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MAP_100TH_MM );
+ aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MapUnit::Map100thMM );
bOK = true;
}
catch( embed::NoVisualAreaSizeException& )
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index ec2764825c76..452a7e4bc5da 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -948,7 +948,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
aSize = aObjDesc.maSize;
else
{
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aSize = aObjRef.GetSize( &aMapMode );
}
}
@@ -958,7 +958,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) );
if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() )
{
- Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MAP_100TH_MM, aMapUnit ) );
+ Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MapUnit::Map100thMM, aMapUnit ) );
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
@@ -979,13 +979,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
aSize.Width() = 14100;
aSize.Height() = 10000;
- aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MAP_100TH_MM, aMapUnit );
+ aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MapUnit::Map100thMM, aMapUnit );
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
}
- aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM );
+ aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM );
}
Size aMaxSize( mrDoc.GetMaxObjSize() );
@@ -1117,7 +1117,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
aSize = aObjDesc.maSize;
else
{
- MapMode aMapMode( MAP_100TH_MM );
+ MapMode aMapMode( MapUnit::Map100thMM );
aSize = aObjRef.GetSize( &aMapMode );
}
}
@@ -1136,7 +1136,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() )
{
- Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MAP_100TH_MM, aMapUnit ) );
+ Size aTmp( OutputDevice::LogicToLogic( aObjDesc.maSize, MapUnit::Map100thMM, aMapUnit ) );
if ( aSz.Width != aTmp.Width() || aSz.Height != aTmp.Height() )
{
aSz.Width = aTmp.Width();
@@ -1149,13 +1149,13 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !aSize.Width() || !aSize.Height() )
{
- aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MAP_100TH_MM, aMapUnit );
+ aSize = OutputDevice::LogicToLogic( Size(14100, 10000), MapUnit::Map100thMM, aMapUnit );
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
}
- aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM );
+ aSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MapUnit::Map100thMM );
}
Size aMaxSize( mrDoc.GetMaxObjSize() );
@@ -1226,7 +1226,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// restrict movement to WorkArea
Size aImageMapSize = OutputDevice::LogicToLogic(aGraphic.GetPrefSize(),
- aGraphic.GetPrefMapMode(), MapMode(MAP_100TH_MM));
+ aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM));
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
@@ -1523,7 +1523,7 @@ bool View::PasteRTFTable( const ::tools::SvRef<SotStorageStream>& xStm, SdrPage*
{
std::unique_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh ));
pModel->NewOrLoadCompleted(NEW_DOC);
- pModel->GetItemPool().SetDefaultMetric(MAP_100TH_MM);
+ pModel->GetItemPool().SetDefaultMetric(MapUnit::Map100thMM);
pModel->InsertPage(pModel->AllocPage(false));
Reference< XComponent > xComponent( new SdXImpressDocument( pModel.get(), true ) );
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 6ad4b1d7901c..756f2fff2963 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -173,7 +173,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
// create new object
Size aSize;
- if ( rGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ if ( rGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
{
::OutputDevice* pOutDev = nullptr;
if( mpViewSh )
@@ -183,13 +183,13 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
pOutDev = Application::GetDefaultDevice();
if( pOutDev )
- aSize = pOutDev->PixelToLogic( rGraphic.GetPrefSize(), MAP_100TH_MM );
+ aSize = pOutDev->PixelToLogic( rGraphic.GetPrefSize(), MapUnit::Map100thMM );
}
else
{
aSize = OutputDevice::LogicToLogic( rGraphic.GetPrefSize(),
rGraphic.GetPrefMapMode(),
- MapMode( MAP_100TH_MM ) );
+ MapMode( MapUnit::Map100thMM ) );
}
pNewGrafObj = new SdrGrafObj( rGraphic, Rectangle( rPos, aSize ) );
@@ -489,9 +489,9 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Idle *, void)
::sd::Window* pWin = mpViewSh->GetActiveWindow();
if( pWin )
- aPrefSize = pWin->PixelToLogic( aPrefSize, MAP_100TH_MM );
+ aPrefSize = pWin->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
else
- aPrefSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM );
+ aPrefSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM );
}
else
aPrefSize = Size( 5000, 5000 );
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 728d40a89a55..abcaaeecea6c 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -74,7 +74,7 @@ Window::Window(vcl::Window* pParent)
SetDialogControlFlags( DialogControlFlags::Return | DialogControlFlags::WantFocus );
MapMode aMap(GetMapMode());
- aMap.SetMapUnit(MAP_100TH_MM);
+ aMap.SetMapUnit(MapUnit::Map100thMM);
SetMapMode(aMap);
// whit it, the vcl::WindowColor is used in the slide mode
@@ -1004,8 +1004,8 @@ void Window::LogicInvalidate(const Rectangle* pRectangle)
else
{
Rectangle aRectangle(*pRectangle);
- if (GetMapMode().GetMapUnit() == MAP_100TH_MM)
- aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP);
+ if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
sRectangle = aRectangle.toString();
}
SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index d2d4f64a0836..afafe4c8a5d5 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -205,7 +205,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
}
sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
- bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP );
+ bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip );
pItem->SetWhich( nWhich );
sal_uInt16 nSubCount = pType->nAttribs;
@@ -322,7 +322,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
}
sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
- bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP );
+ bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip );
pItem->SetWhich( nWhich );
const SfxType* pType = rArg.pType;
sal_uInt16 nSubCount = pType->nAttribs;
@@ -1273,7 +1273,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
{
// slot is a property
sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
- bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP );
+ bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip );
const SfxPoolItem* pItem = rSet.GetItem<SfxPoolItem>(nWhich, false);
if ( pItem ) //???
{
@@ -1325,7 +1325,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
{
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
- bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MAP_TWIP );
+ bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == MapUnit::MapTwip );
const SfxPoolItem* pItem = rSet.GetItem<SfxPoolItem>(nWhich, false);
if ( pItem ) //???
{
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 0242633f5658..e7b7dd4ed3d2 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -437,7 +437,7 @@ ContentTabPage_Impl::ContentTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindo
"sfx/ui/helpcontentpage.ui")
{
get(m_pContentBox, "content");
- Size aSize(LogicToPixel(Size(108 , 188), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(108 , 188), MapUnit::MapAppFont));
m_pContentBox->set_width_request(aSize.Width());
m_pContentBox->set_height_request(aSize.Height());
}
@@ -545,7 +545,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im
, bIsActivated(false)
{
get(m_pIndexCB, "terms");
- Size aSize(LogicToPixel(Size(108, 97), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(108, 97), MapUnit::MapAppFont));
m_pIndexCB->set_width_request(aSize.Width());
m_pIndexCB->set_height_request(aSize.Height());
get(m_pOpenBtn, "display");
@@ -918,7 +918,7 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_
get(m_pFullWordsCB, "completewords");
get(m_pScopeCB, "headings");
get(m_pResultsLB, "results");
- Size aSize(LogicToPixel(Size(128 , 30), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(128 , 30), MapUnit::MapAppFont));
m_pResultsLB->set_width_request(aSize.Width());
m_pResultsLB->set_height_request(aSize.Height());
get(m_pOpenBtn, "display");
@@ -1268,7 +1268,7 @@ BookmarksTabPage_Impl::BookmarksTabPage_Impl(vcl::Window* pParent, SfxHelpIndexW
{
get(m_pBookmarksPB, "display");
get(m_pBookmarksBox, "bookmarks");
- Size aSize(LogicToPixel(Size(120 , 200), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(120 , 200), MapUnit::MapAppFont));
m_pBookmarksBox->set_width_request(aSize.Width());
m_pBookmarksBox->set_height_request(aSize.Height());
@@ -2072,7 +2072,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox()
}
// set position of the checkbox
- Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
+ Size a3Size = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont );
Size aTBSize = aToolBox->GetSizePixel();
Size aCBSize = aOnStartupCB->GetSizePixel();
Point aPnt = aToolBox->GetPosPixel();
@@ -2957,7 +2957,7 @@ SfxHelpWindow_Impl::SfxHelpWindow_Impl(
pIndexWin = VclPtr<SfxHelpIndexWindow_Impl>::Create( this );
pIndexWin->SetDoubleClickHdl( LINK( this, SfxHelpWindow_Impl, OpenHdl ) );
pIndexWin->SetSelectFactoryHdl( LINK( this, SfxHelpWindow_Impl, SelectFactoryHdl ) );
- pIndexWin->SetSizePixel(LogicToPixel(Size(120, 200), MAP_APPFONT));
+ pIndexWin->SetSizePixel(LogicToPixel(Size(120, 200), MapUnit::MapAppFont));
pIndexWin->Show();
pTextWin = VclPtr<SfxHelpTextWindow_Impl>::Create( this );
Reference < XFrames > xFrames = rFrame->getFrames();
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 29e6eaf28d6a..94c412faa17b 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -341,7 +341,7 @@ MapUnit SfxControllerItem::GetCoreMetric() const
}
SAL_INFO( "sfx.control", "W1: Can not find ItemPool!" );
- return MAP_100TH_MM;
+ return MapUnit::Map100thMM;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 9aee901870cd..34619467da70 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -2135,7 +2135,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, css::uno::Any& rAny )
sal_uInt16 nSubId( 0 );
SfxItemPool& rPool = pShell->GetPool();
sal_uInt16 nWhich = rPool.GetWhich( nSID );
- if ( rPool.GetMetric( nWhich ) == MAP_TWIP )
+ if ( rPool.GetMetric( nWhich ) == MapUnit::MapTwip )
nSubId |= CONVERT_TWIPS;
pItem->QueryValue( aState, (sal_uInt8)nSubId );
}
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 49d9c40a1858..4deb98744156 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -665,7 +665,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
bool bSuccess = false;
const SfxPoolItem* pItem = nullptr;
- MapUnit eMapUnit( MAP_100TH_MM );
+ MapUnit eMapUnit( MapUnit::Map100thMM );
// Extra scope so that aInternalSet is destroyed before
// rListener->dispatchFinished potentially calls
@@ -775,7 +775,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
if ( bSuccess && pItem && dynamic_cast< const SfxVoidItem *>( pItem ) == nullptr )
{
sal_uInt16 nSubId( 0 );
- if ( eMapUnit == MAP_TWIP )
+ if ( eMapUnit == MapUnit::MapTwip )
nSubId |= CONVERT_TWIPS;
pItem->QueryValue( aEvent.Result, (sal_uInt8)nSubId );
}
@@ -892,7 +892,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
{
// Retrieve metric from pool to have correct sub ID when calling QueryValue
sal_uInt16 nSubId( 0 );
- MapUnit eMapUnit( MAP_100TH_MM );
+ MapUnit eMapUnit( MapUnit::Map100thMM );
// retrieve the core metric
// it's enough to check the objectshell, the only shell that does not use the pool of the document
@@ -906,7 +906,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
eMapUnit = GetCoreMetric( pShell->GetPool(), nSID );
}
- if ( eMapUnit == MAP_TWIP )
+ if ( eMapUnit == MapUnit::MapTwip )
nSubId |= CONVERT_TWIPS;
pState->QueryValue( aState, (sal_uInt8)nSubId );
diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx
index fe0044eb91cf..a5657d8b9e6a 100644
--- a/sfx2/source/dialog/dialoghelper.cxx
+++ b/sfx2/source/dialog/dialoghelper.cxx
@@ -55,22 +55,22 @@ void setPreviewsToSamePlace(vcl::Window *pParent, VclBuilderContainer *pPage)
Size getParagraphPreviewOptimalSize(const vcl::Window *pReference)
{
- return pReference->LogicToPixel(Size(68 , 112), MAP_APPFONT);
+ return pReference->LogicToPixel(Size(68 , 112), MapUnit::MapAppFont);
}
Size getDrawPreviewOptimalSize(const vcl::Window *pReference)
{
- return pReference->LogicToPixel(Size(88, 42), MAP_APPFONT);
+ return pReference->LogicToPixel(Size(88, 42), MapUnit::MapAppFont);
}
Size getPreviewStripSize(const vcl::Window *pReference)
{
- return pReference->LogicToPixel(Size(70 , 40), MapMode(MAP_APPFONT));
+ return pReference->LogicToPixel(Size(70 , 40), MapMode(MapUnit::MapAppFont));
}
Size getPreviewOptionsSize(const vcl::Window *pReference)
{
- return pReference->LogicToPixel(Size(70 , 27), MapMode(MAP_APPFONT));
+ return pReference->LogicToPixel(Size(70 , 27), MapMode(MapUnit::MapAppFont));
}
OUString getWidestTime(const LocaleDataWrapper& rWrapper)
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 6164b5edbb83..3d28a70c59ce 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1387,7 +1387,7 @@ IMPL_LINK_NOARG(CustomPropertiesEditButton, ClickHdl, Button*, void)
void CustomPropertiesYesNoButton::Resize()
{
const long nWidth = GetSizePixel().Width();
- const long n3Width = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ).Width();
+ const long n3Width = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ).Width();
const long nNewWidth = ( nWidth / 2 ) - n3Width - 2;
Size aSize = m_aYesButton->GetSizePixel();
const long nDelta = aSize.Width() - nNewWidth;
@@ -1461,14 +1461,14 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
m_aNumberFormatter( ::comphelper::getProcessComponentContext(),
Application::GetSettings().GetLanguageTag().getLanguageType() )
{
- Point aPos(LogicToPixel(Point(159, 2), MAP_APPFONT));
+ Point aPos(LogicToPixel(Point(159, 2), MapUnit::MapAppFont));
m_aEditButton->SetPosSizePixel(aPos,
- LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT));
+ LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont));
- m_aRemoveButton->SetSizePixel(LogicToPixel(Size(RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT), MAP_APPFONT));
+ m_aRemoveButton->SetSizePixel(LogicToPixel(Size(RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT), MapUnit::MapAppFont));
- Size aSize(LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT));
+ Size aSize(LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont));
m_aValueEdit->SetPosSizePixel(aPos, aSize);
m_aDurationField->SetPosSizePixel(aPos, aSize);
m_aDateField->SetPosSizePixel(aPos, aSize);
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 6c8a29f9069c..978cf37ff0c8 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -311,7 +311,7 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl()
*/
{
- MapUnit eUnit = MAP_CM;
+ MapUnit eUnit = MapUnit::MapCM;
FieldUnit eFieldUnit( FUNIT_CM );
SfxModule* pModule = SfxModule::GetActiveModule();
if ( pModule )
@@ -323,15 +323,15 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl()
switch ( eFieldUnit )
{
- case FUNIT_MM: eUnit = MAP_MM; break;
+ case FUNIT_MM: eUnit = MapUnit::MapMM; break;
case FUNIT_CM:
case FUNIT_M:
- case FUNIT_KM: eUnit = MAP_CM; break;
+ case FUNIT_KM: eUnit = MapUnit::MapCM; break;
case FUNIT_POINT:
- case FUNIT_PICA: eUnit = MAP_POINT; break;
+ case FUNIT_PICA: eUnit = MapUnit::MapPoint; break;
case FUNIT_INCH:
case FUNIT_FOOT:
- case FUNIT_MILE: eUnit = MAP_INCH; break;
+ case FUNIT_MILE: eUnit = MapUnit::MapInch; break;
default:
OSL_FAIL( "non supported field unit" );
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index cb4dd57062a0..1044c61861a9 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -188,7 +188,7 @@ void SfxVersionsTabListBox_Impl::setColSizes()
long aStaticTabs[] = { 3, 0, 0, 0 };
aStaticTabs[2] = nMax;
aStaticTabs[3] = nMax + nMaxAuthorWidth;
- SvSimpleTable::SetTabs(aStaticTabs, MAP_PIXEL);
+ SvSimpleTable::SetTabs(aStaticTabs, MapUnit::MapPixel);
}
SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose )
@@ -207,7 +207,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion
SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("versions");
Size aControlSize(260, 114);
- aControlSize = pContainer->LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = pContainer->LogicToPixel(aControlSize, MapUnit::MapAppFont);
pContainer->set_width_request(aControlSize.Width());
pContainer->set_height_request(aControlSize.Height());
@@ -540,7 +540,7 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame )
SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("versions");
Size aControlSize(260, 114);
- aControlSize = pContainer->LogicToPixel(aControlSize, MAP_APPFONT);
+ aControlSize = pContainer->LogicToPixel(aControlSize, MapUnit::MapAppFont);
pContainer->set_width_request(aControlSize.Width());
pContainer->set_height_request(aControlSize.Height());
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index ac9999a95437..ba871c15a84c 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -142,7 +142,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co
pMF->mm = MM_ANISOTROPIC;
MapMode aMetaMode = pGDIMeta->GetPrefMapMode();
- MapMode aWinMode( MAP_100TH_MM );
+ MapMode aWinMode( MapUnit::Map100thMM );
if ( aWinMode == pGDIMeta->GetPrefMapMode() )
{
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 085421d81cf4..0a7f60b219e0 100644
--- a/