summaryrefslogtreecommitdiff
path: root/drivers/net/phy/Kconfig
blob: 5078a0d0db644d6cef785294660557045bd1935b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
#
# PHY Layer Configuration
#

menuconfig PHYLIB
	tristate "PHY Device support and infrastructure"
	depends on NETDEVICES
	help
	  Ethernet controllers are usually attached to PHY
	  devices.  This option provides infrastructure for
	  managing PHY devices.

if PHYLIB

config SWPHY
	bool

comment "MDIO bus device drivers"

config MDIO_BCM_IPROC
	tristate "Broadcom iProc MDIO bus controller"
	depends on ARCH_BCM_IPROC || COMPILE_TEST
	depends on HAS_IOMEM && OF_MDIO
	help
	  This module provides a driver for the MDIO busses found in the
	  Broadcom iProc SoC's.

config MDIO_BCM_UNIMAC
	tristate "Broadcom UniMAC MDIO bus controller"
	depends on HAS_IOMEM
	help
	  This module provides a driver for the Broadcom UniMAC MDIO busses.
	  This hardware can be found in the Broadcom GENET Ethernet MAC
	  controllers as well as some Broadcom Ethernet switches such as the
	  Starfighter 2 switches.

config MDIO_BITBANG
	tristate "Bitbanged MDIO buses"
	help
	  This module implements the MDIO bus protocol in software,
	  for use by low level drivers that export the ability to
	  drive the relevant pins.

	  If in doubt, say N.

config MDIO_BUS_MUX
	tristate
	depends on OF_MDIO
	help
	  This module provides a driver framework for MDIO bus
	  multiplexers which connect one of several child MDIO busses
	  to a parent bus.  Switching between child busses is done by
	  device specific drivers.

config MDIO_BUS_MUX_BCM_IPROC
	tristate "Broadcom iProc based MDIO bus multiplexers"
	depends on OF && OF_MDIO && (ARCH_BCM_IPROC || COMPILE_TEST)
	select MDIO_BUS_MUX
	default ARCH_BCM_IPROC
	help
	  This module provides a driver for MDIO bus multiplexers found in
	  iProc based Broadcom SoCs. This multiplexer connects one of several
	  child MDIO bus to a parent bus. Buses could be internal as well as
	  external and selection logic lies inside the same multiplexer.

config MDIO_BUS_MUX_GPIO
	tristate "GPIO controlled MDIO bus multiplexers"
	depends on OF_GPIO && OF_MDIO
	select MDIO_BUS_MUX
	help
	  This module provides a driver for MDIO bus multiplexers that
	  are controlled via GPIO lines.  The multiplexer connects one of
	  several child MDIO busses to a parent bus.  Child bus
	  selection is under the control of GPIO lines.

config MDIO_BUS_MUX_MMIOREG
	tristate "MMIO device-controlled MDIO bus multiplexers"
	depends on OF_MDIO && HAS_IOMEM
	select MDIO_BUS_MUX
	help
	  This module provides a driver for MDIO bus multiplexers that
	  are controlled via a simple memory-mapped device, like an FPGA.
	  The multiplexer connects one of several child MDIO busses to a
	  parent bus.  Child bus selection is under the control of one of
	  the FPGA's registers.

	  Currently, only 8-bit registers are supported.

config MDIO_CAVIUM
	tristate

config MDIO_GPIO
	tristate "GPIO lib-based bitbanged MDIO buses"
	depends on MDIO_BITBANG && GPIOLIB
	---help---
	  Supports GPIO lib-based MDIO busses.

	  To compile this driver as a module, choose M here: the module
	  will be called mdio-gpio.

config MDIO_HISI_FEMAC
	tristate "Hisilicon FEMAC MDIO bus controller"
	depends on HAS_IOMEM && OF_MDIO
	help
	  This module provides a driver for the MDIO busses found in the
	  Hisilicon SoC that have an Fast Ethernet MAC.

config MDIO_MOXART
        tristate "MOXA ART MDIO interface support"
        depends on ARCH_MOXART
        help
          This driver supports the MDIO interface found in the network
          interface units of the MOXA ART SoC

config MDIO_OCTEON
	tristate "Octeon and some ThunderX SOCs MDIO buses"
	depends on 64BIT
	depends on HAS_IOMEM
	select MDIO_CAVIUM
	help
	  This module provides a driver for the Octeon and ThunderX MDIO
	  buses. It is required by the Octeon and ThunderX ethernet device
	  drivers on some systems.

config MDIO_SUN4I
	tristate "Allwinner sun4i MDIO interface support"
	depends on ARCH_SUNXI
	help
	  This driver supports the MDIO interface found in the network
	  interface units of the Allwinner SoC that have an EMAC (A10,
	  A12, A10s, etc.)

config MDIO_THUNDER
	tristate "ThunderX SOCs MDIO buses"
	depends on 64BIT
	depends on PCI
	select MDIO_CAVIUM
	help
	  This driver supports the MDIO interfaces found on Cavium
	  ThunderX SoCs when the MDIO bus device appears as a PCI
	  device.

config MDIO_XGENE
	tristate "APM X-Gene SoC MDIO bus controller"
	help
	  This module provides a driver for the MDIO busses found in the
	  APM X-Gene SoC's.

comment "MII PHY device drivers"

config AMD_PHY
	tristate "AMD PHYs"
	---help---
	  Currently supports the am79c874

config AQUANTIA_PHY
        tristate "Aquantia PHYs"
        ---help---
          Currently supports the Aquantia AQ1202, AQ2104, AQR105, AQR405

config AT803X_PHY
	tristate "AT803X PHYs"
	---help---
	  Currently supports the AT8030 and AT8035 model

config BCM63XX_PHY
	tristate "Broadcom 63xx SOCs internal PHY"
	depends on BCM63XX
	select BCM_NET_PHYLIB
	---help---
	  Currently supports the 6348 and 6358 PHYs.

config BCM7XXX_PHY
	tristate "Broadcom 7xxx SOCs internal PHYs"
	select BCM_NET_PHYLIB
	---help---
	  Currently supports the BCM7366, BCM7439, BCM7445, and
	  40nm and 65nm generation of BCM7xxx Set Top Box SoCs.

config BCM87XX_PHY
	tristate "Broadcom BCM8706 and BCM8727 PHYs"
	help
	  Currently supports the BCM8706 and BCM8727 10G Ethernet PHYs.

config BCM_CYGNUS_PHY
	tristate "Broadcom Cygnus SoC internal PHY"
	depends on ARCH_BCM_CYGNUS || COMPILE_TEST
	depends on MDIO_BCM_IPROC
	select BCM_NET_PHYLIB
	---help---
	  This PHY driver is for the 1G internal PHYs of the Broadcom
	  Cygnus Family SoC.

	  Currently supports internal PHY's used in the BCM11300,
	  BCM11320, BCM11350, BCM11360, BCM58300, BCM58302,
	  BCM58303 & BCM58305 Broadcom Cygnus SoCs.

config BCM_NET_PHYLIB
	tristate

config BROADCOM_PHY
	tristate "Broadcom PHYs"
	select BCM_NET_PHYLIB
	---help---
	  Currently supports the BCM5411, BCM5421, BCM5461, BCM54616S, BCM5464,
	  BCM5481 and BCM5482 PHYs.

config CICADA_PHY
	tristate "Cicada PHYs"
	---help---
	  Currently supports the cis8204

config DAVICOM_PHY
	tristate "Davicom PHYs"
	---help---
	  Currently supports dm9161e and dm9131

config DP83848_PHY
	tristate "Texas Instruments DP83848 PHY"
	---help---
	  Supports the DP83848 PHY.

config DP83867_PHY
	tristate "Texas Instruments DP83867 Gigabit PHY"
	---help---
	  Currently supports the DP83867 PHY.

config FIXED_PHY
	tristate "MDIO Bus/PHY emulation with fixed speed/link PHYs"
	depends on PHYLIB
	select SWPHY
	---help---
	  Adds the platform "fixed" MDIO Bus to cover the boards that use
	  PHYs that are not connected to the real MDIO bus.

	  Currently tested with mpc866ads and mpc8349e-mitx.

config ICPLUS_PHY
	tristate "ICPlus PHYs"
	---help---
	  Currently supports the IP175C and IP1001 PHYs.

config INTEL_XWAY_PHY
	tristate "Intel XWAY PHYs"
	---help---
	  Supports the Intel XWAY (former Lantiq) 11G and 22E PHYs.
	  These PHYs are marked as standalone chips under the names
	  PEF 7061, PEF 7071 and PEF 7072 or integrated into the Intel
	  SoCs xRX200, xRX300, xRX330, xRX350 and xRX550.

config LSI_ET1011C_PHY
	tristate "LSI ET1011C PHY"
	---help---
	  Supports the LSI ET1011C PHY.

config LXT_PHY
	tristate "Intel LXT PHYs"
	---help---
	  Currently supports the lxt970, lxt971

config MARVELL_PHY
	tristate "Marvell PHYs"
	---help---
	  Currently has a driver for the 88E1011S

config MICREL_PHY
	tristate "Micrel PHYs"
	---help---
	  Supports the KSZ9021, VSC8201, KS8001 PHYs.

config MICROCHIP_PHY
	tristate "Microchip PHYs"
	help
	  Supports the LAN88XX PHYs.

config MICROSEMI_PHY
	tristate "Microsemi PHYs"
	---help---
	  Currently supports the VSC8531 and VSC8541 PHYs

config NATIONAL_PHY
	tristate "National Semiconductor PHYs"
	---help---
	  Currently supports the DP83865 PHY.

config QSEMI_PHY
	tristate "Quality Semiconductor PHYs"
	---help---
	  Currently supports the qs6612

config REALTEK_PHY
	tristate "Realtek PHYs"
	---help---
	  Supports the Realtek 821x PHY.

config SMSC_PHY
	tristate "SMSC PHYs"
	---help---
	  Currently supports the LAN83C185, LAN8187 and LAN8700 PHYs

config STE10XP
	tristate "STMicroelectronics STe10Xp PHYs"
	---help---
	  This is the driver for the STe100p and STe101p PHYs.

config TERANETICS_PHY
        tristate "Teranetics PHYs"
        ---help---
          Currently supports the Teranetics TN2020

config VITESSE_PHY
        tristate "Vitesse PHYs"
        ---help---
          Currently supports the vsc8244

config XILINX_GMII2RGMII
       tristate "Xilinx GMII2RGMII converter driver"
       ---help---
         This driver support xilinx GMII to RGMII IP core it provides
         the Reduced Gigabit Media Independent Interface(RGMII) between
         Ethernet physical media devices and the Gigabit Ethernet controller.

config MDIO_XGENE
	tristate "APM X-Gene SoC MDIO bus controller"
	depends on ARCH_XGENE || COMPILE_TEST
	help
	  This module provides a driver for the MDIO busses found in the
	  APM X-Gene SoC's.

endif # PHYLIB

config MICREL_KS8995MA
	tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch"
	depends on SPI
| 2 +- svx/source/dialog/pagectrl.cxx | 4 +- svx/source/dialog/paraprev.cxx | 2 +- svx/source/dialog/rubydialog.cxx | 4 +- svx/source/dialog/srchdlg.cxx | 14 ++-- svx/source/dialog/swframeexample.cxx | 4 +- svx/source/engine3d/float3d.cxx | 4 +- svx/source/fmcomp/fmgridcl.cxx | 8 +- svx/source/fmcomp/fmgridif.cxx | 10 +-- svx/source/fmcomp/gridctrl.cxx | 4 +- svx/source/form/datanavi.cxx | 14 ++-- svx/source/form/filtnav.cxx | 6 +- svx/source/form/fmexpl.cxx | 6 +- svx/source/form/fmvwimp.cxx | 4 +- svx/source/gallery2/GalleryControl.cxx | 2 +- svx/source/gallery2/galbrws1.cxx | 2 +- svx/source/gallery2/galctrl.cxx | 2 +- svx/source/gallery2/galmisc.cxx | 2 +- svx/source/gallery2/galobj.cxx | 4 +- svx/source/gallery2/galtheme.cxx | 2 +- svx/source/items/grfitem.cxx | 8 +- svx/source/sdr/contact/viewcontactofgraphic.cxx | 12 +-- svx/source/sdr/overlay/overlayobjectlist.cxx | 4 +- svx/source/sdr/primitive2d/sdrattributecreator.cxx | 6 +- .../sdr/primitive2d/sdrolecontentprimitive2d.cxx | 6 +- .../area/AreaTransparencyGradientControl.cxx | 40 ++++----- svx/source/sidebar/line/LinePropertyPanelBase.cxx | 4 +- svx/source/sidebar/line/LineWidthPopup.cxx | 10 +-- svx/source/sidebar/line/LineWidthValueSet.cxx | 2 +- svx/source/sidebar/nbdtmg.cxx | 6 +- .../sidebar/paragraph/ParaLineSpacingControl.cxx | 6 +- svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 40 ++++----- svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 4 +- .../sidebar/possize/PosSizePropertyPanel.cxx | 10 +-- svx/source/sidebar/possize/SidebarDialControl.cxx | 2 +- .../sidebar/text/TextCharacterSpacingControl.cxx | 4 +- svx/source/svdraw/svddrgmt.cxx | 4 +- svx/source/svdraw/svdedxv.cxx | 2 +- svx/source/svdraw/svdibrow.cxx | 2 +- svx/source/svdraw/svdmodel.cxx | 28 +++---- svx/source/svdraw/svdmrkv.cxx | 8 +- svx/source/svdraw/svdoashp.cxx | 8 +- svx/source/svdraw/svdobj.cxx | 8 +- svx/source/svdraw/svdocapt.cxx | 4 +- svx/source/svdraw/svdograf.cxx | 8 +- svx/source/svdraw/svdomeas.cxx | 8 +- svx/source/svdraw/svdomedia.cxx | 2 +- svx/source/svdraw/svdoole2.cxx | 6 +- svx/source/svdraw/svdopath.cxx | 8 +- svx/source/svdraw/svdotext.cxx | 8 +- svx/source/svdraw/svdtrans.cxx | 84 +++++++++---------- svx/source/table/tablecontroller.cxx | 8 +- svx/source/table/tablertfexporter.cxx | 2 +- svx/source/table/tablertfimporter.cxx | 2 +- svx/source/tbxctrls/bulletsnumbering.cxx | 2 +- svx/source/tbxctrls/colrctrl.cxx | 6 +- svx/source/tbxctrls/fillctrl.cxx | 2 +- svx/source/tbxctrls/fontworkgallery.cxx | 2 +- svx/source/tbxctrls/grafctrl.cxx | 6 +- svx/source/tbxctrls/itemwin.cxx | 14 ++-- svx/source/tbxctrls/layctrl.cxx | 2 +- svx/source/tbxctrls/lboxctrl.cxx | 2 +- svx/source/tbxctrls/linectrl.cxx | 2 +- svx/source/tbxctrls/tbcontrl.cxx | 6 +- svx/source/tbxctrls/tbunocontroller.cxx | 2 +- .../chinese_dictionarydialog.cxx | 4 +- svx/source/unodraw/UnoGraphicExporter.cxx | 6 +- svx/source/unodraw/unopool.cxx | 8 +- svx/source/unodraw/unoprov.cxx | 44 +++++----- svx/source/unodraw/unoshap4.cxx | 4 +- svx/source/unodraw/unoshape.cxx | 24 +++--- svx/source/xoutdev/_xoutbmp.cxx | 4 +- svx/source/xoutdev/xattr.cxx | 2 +- svx/source/xoutdev/xtabdash.cxx | 2 +- svx/source/xoutdev/xtabhtch.cxx | 2 +- sw/qa/extras/rtfimport/rtfimport.cxx | 2 +- sw/source/core/access/accmap.cxx | 12 +-- sw/source/core/bastyp/swtypes.cxx | 4 +- sw/source/core/crsr/crstrvl.cxx | 2 +- sw/source/core/doc/DocumentDeviceManager.cxx | 4 +- sw/source/core/doc/fmtcol.cxx | 2 +- sw/source/core/docnode/ndnotxt.cxx | 18 ++-- sw/source/core/draw/dflyobj.cxx | 4 +- sw/source/core/draw/dpage.cxx | 2 +- sw/source/core/draw/drawdoc.cxx | 2 +- sw/source/core/frmedt/fecopy.cxx | 2 +- sw/source/core/frmedt/fefly1.cxx | 6 +- sw/source/core/layout/atrfrm.cxx | 8 +- sw/source/core/layout/fly.cxx | 6 +- sw/source/core/ole/ndole.cxx | 6 +- sw/source/core/text/EnhancedPDFExportHelper.cxx | 2 +- sw/source/core/text/itratr.cxx | 4 +- sw/source/core/text/noteurl.cxx | 2 +- sw/source/core/text/porrst.cxx | 2 +- sw/source/core/text/txtdrop.cxx | 4 +- sw/source/core/txtnode/fntcache.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 10 +-- sw/source/core/unocore/unoparagraph.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 8 +- sw/source/core/view/pagepreviewlayout.cxx | 2 +- sw/source/core/view/viewpg.cxx | 2 +- sw/source/core/view/viewsh.cxx | 2 +- sw/source/core/view/vprint.cxx | 2 +- sw/source/filter/html/css1atr.cxx | 2 +- sw/source/filter/html/htmlatr.cxx | 2 +- sw/source/filter/html/htmldrawreader.cxx | 4 +- sw/source/filter/html/htmldrawwriter.cxx | 4 +- sw/source/filter/html/htmlflywriter.cxx | 16 ++-- sw/source/filter/html/htmlform.cxx | 8 +- sw/source/filter/html/htmlforw.cxx | 2 +- sw/source/filter/html/htmlgrin.cxx | 2 +- sw/source/filter/html/htmlnumreader.cxx | 2 +- sw/source/filter/html/htmlplug.cxx | 4 +- sw/source/filter/html/htmlsect.cxx | 4 +- sw/source/filter/html/htmltab.cxx | 4 +- sw/source/filter/html/htmltabw.cxx | 10 +-- sw/source/filter/html/svxcss1.cxx | 2 +- sw/source/filter/html/swhtml.cxx | 6 +- sw/source/filter/html/wrthtml.cxx | 2 +- sw/source/filter/ww8/docxattributeoutput.cxx | 4 +- sw/source/filter/ww8/writerhelper.cxx | 4 +- sw/source/filter/ww8/wrtw8esh.cxx | 16 ++-- sw/source/filter/ww8/wrtww8.cxx | 4 +- sw/source/filter/ww8/ww8par3.cxx | 6 +- sw/source/filter/ww8/ww8par4.cxx | 10 +-- sw/source/filter/xml/xmlexp.cxx | 2 +- sw/source/filter/xml/xmlimp.cxx | 4 +- sw/source/filter/xml/xmltexte.cxx | 2 +- sw/source/filter/xml/xmltexti.cxx | 10 +-- sw/source/ui/chrdlg/drpcps.cxx | 2 +- sw/source/ui/config/optload.cxx | 2 +- sw/source/ui/config/optpage.cxx | 36 ++++---- sw/source/ui/dbui/addresslistdialog.cxx | 4 +- sw/source/ui/dbui/createaddresslistdialog.cxx | 16 ++-- sw/source/ui/dbui/dbtablepreviewdialog.cxx | 2 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 12 +-- sw/source/ui/dbui/mmdocselectpage.cxx | 2 +- sw/source/ui/dbui/mmgreetingspage.cxx | 4 +- sw/source/ui/dbui/mmlayoutpage.cxx | 2 +- sw/source/ui/dbui/mmoutputtypepage.cxx | 4 +- sw/source/ui/dbui/selectdbtabledialog.cxx | 4 +- sw/source/ui/envelp/envfmt.cxx | 4 +- sw/source/ui/envelp/envlop1.cxx | 4 +- sw/source/ui/envelp/labfmt.cxx | 4 +- sw/source/ui/fldui/flddb.cxx | 2 +- sw/source/ui/fldui/flddinf.cxx | 2 +- sw/source/ui/fldui/flddok.cxx | 2 +- sw/source/ui/fldui/fldfunc.cxx | 2 +- sw/source/ui/fldui/fldref.cxx | 2 +- sw/source/ui/fldui/fldvar.cxx | 2 +- sw/source/ui/frmdlg/column.cxx | 4 +- sw/source/ui/frmdlg/frmpage.cxx | 2 +- sw/source/ui/index/cnttab.cxx | 8 +- sw/source/ui/misc/bookmark.cxx | 2 +- sw/source/ui/misc/glosbib.cxx | 2 +- sw/source/ui/misc/glossary.cxx | 2 +- sw/source/ui/misc/pgfnote.cxx | 6 +- sw/source/uibase/app/appenv.cxx | 2 +- sw/source/uibase/app/docshini.cxx | 4 +- sw/source/uibase/dbui/dbtree.cxx | 2 +- .../uibase/dialog/SwSpellDialogChildWindow.cxx | 2 +- sw/source/uibase/dochdl/swdtflvr.cxx | 14 ++-- sw/source/uibase/docvw/HeaderFooterWin.cxx | 2 +- sw/source/uibase/docvw/PageBreakWin.cxx | 2 +- sw/source/uibase/docvw/SidebarScrollBar.cxx | 2 +- sw/source/uibase/docvw/SidebarWin.cxx | 2 +- sw/source/uibase/docvw/edtwin.cxx | 2 +- sw/source/uibase/docvw/srcedtw.cxx | 2 +- sw/source/uibase/frmdlg/colex.cxx | 4 +- sw/source/uibase/lingu/sdrhhcwrap.cxx | 2 +- sw/source/uibase/misc/redlndlg.cxx | 2 +- sw/source/uibase/shells/grfshex.cxx | 4 +- sw/source/uibase/shells/textsh.cxx | 2 +- sw/source/uibase/sidebar/PageFormatPanel.cxx | 2 +- sw/source/uibase/sidebar/PageMarginControl.cxx | 4 +- sw/source/uibase/table/chartins.cxx | 2 +- sw/source/uibase/uiview/pview.cxx | 2 +- sw/source/uibase/uiview/srcview.cxx | 4 +- sw/source/uibase/uiview/swcli.cxx | 2 +- sw/source/uibase/uiview/view2.cxx | 2 +- sw/source/uibase/uiview/viewdraw.cxx | 4 +- sw/source/uibase/uiview/viewmdi.cxx | 2 +- sw/source/uibase/uiview/viewport.cxx | 2 +- sw/source/uibase/uno/unotxdoc.cxx | 4 +- sw/source/uibase/utlui/attrdesc.cxx | 2 +- sw/source/uibase/utlui/shdwcrsr.cxx | 2 +- sw/source/uibase/utlui/unotools.cxx | 2 +- sw/source/uibase/wrtsh/wrtsh1.cxx | 8 +- toolkit/source/awt/vclxcontainer.cxx | 2 +- toolkit/source/awt/vclxdevice.cxx | 2 +- .../source/controls/controlmodelcontainerbase.cxx | 2 +- toolkit/source/controls/dialogcontrol.cxx | 6 +- toolkit/source/controls/tabpagemodel.cxx | 6 +- toolkit/source/helper/vclunohelper.cxx | 72 ++++++++-------- uui/source/fltdlg.cxx | 2 +- vcl/README.GDIMetaFile | 2 +- vcl/osx/salprn.cxx | 2 +- vcl/qa/cppunit/mapmode.cxx | 50 +++++------ vcl/source/app/settings.cxx | 2 +- vcl/source/app/svapp.cxx | 2 +- vcl/source/control/button.cxx | 10 +-- vcl/source/control/field.cxx | 36 ++++---- vcl/source/control/morebtn.cxx | 2 +- vcl/source/control/scrbar.cxx | 8 +- vcl/source/control/tabctrl.cxx | 2 +- vcl/source/filter/graphicfilter.cxx | 16 ++-- vcl/source/filter/graphicfilter2.cxx | 12 +-- vcl/source/filter/igif/gifread.cxx | 2 +- vcl/source/filter/jpeg/JpegReader.cxx | 6 +- vcl/source/filter/sgfbram.cxx | 2 +- vcl/source/filter/sgvmain.cxx | 2 +- vcl/source/filter/sgvtext.cxx | 2 +- vcl/source/filter/wmf/emfwr.cxx | 4 +- vcl/source/filter/wmf/winmtf.cxx | 8 +- vcl/source/filter/wmf/winwmf.cxx | 4 +- vcl/source/filter/wmf/wmfwr.cxx | 6 +- vcl/source/gdi/bitmap.cxx | 4 +- vcl/source/gdi/bitmap3.cxx | 2 +- vcl/source/gdi/dibtools.cxx | 6 +- vcl/source/gdi/gdimetafiletools.cxx | 6 +- vcl/source/gdi/gdimtf.cxx | 4 +- vcl/source/gdi/graph.cxx | 2 +- vcl/source/gdi/impgraph.cxx | 4 +- vcl/source/gdi/impvect.cxx | 2 +- vcl/source/gdi/mapmod.cxx | 30 +++---- vcl/source/gdi/oldprintadaptor.cxx | 2 +- vcl/source/gdi/pdfwriter_impl.cxx | 22 ++--- vcl/source/gdi/pdfwriter_impl2.cxx | 4 +- vcl/source/gdi/pngread.cxx | 6 +- vcl/source/gdi/pngwrite.cxx | 2 +- vcl/source/gdi/print.cxx | 6 +- vcl/source/gdi/print2.cxx | 2 +- vcl/source/gdi/print3.cxx | 26 +++--- vcl/source/gdi/svgdata.cxx | 2 +- vcl/source/gdi/svmconverter.cxx | 2 +- vcl/source/gdi/textlayout.cxx | 8 +- vcl/source/outdev/bitmap.cxx | 6 +- vcl/source/outdev/font.cxx | 2 +- vcl/source/outdev/map.cxx | 92 +++++++++++---------- vcl/source/outdev/text.cxx | 2 +- vcl/source/window/decoview.cxx | 2 +- vcl/source/window/dockwin.cxx | 2 +- vcl/source/window/menubarwindow.cxx | 2 +- vcl/source/window/paint.cxx | 6 +- vcl/source/window/printdlg.cxx | 28 +++---- vcl/source/window/resource.cxx | 4 +- vcl/source/window/window.cxx | 2 +- vcl/source/window/window2.cxx | 4 +- vcl/unx/generic/print/genprnpsp.cxx | 2 +- vcl/workben/svptest.cxx | 2 +- writerfilter/source/dmapper/SdtHelper.cxx | 2 +- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 +- xmlsecurity/source/dialogs/certificatechooser.cxx | 2 +- xmlsecurity/source/dialogs/certificateviewer.cxx | 2 +- .../source/dialogs/digitalsignaturesdialog.cxx | 2 +- xmlsecurity/source/dialogs/macrosecurity.cxx | 2 +- 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 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::Create(this, WB_LEFT | WB_BORDER) ), aOk( VclPtr::Create(this) ), aCancel( VclPtr::Create(this) ), aPromptText( VclPtr::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::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 { 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 m_pRefDevice.disposeAndClear(); m_pRefDevice = VclPtr::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("eventft")->GetText(); mpImpl->sAssignedMacro = get("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("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("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("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("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::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("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::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("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::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("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::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("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::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(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(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(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(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(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(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(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(m_pKerningMF->Normalize( static_cast(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(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(m_pWidthMF->Denormalize(m_pWidthMF->GetValue(FUNIT_100TH_MM))); long nHeightVal = static_cast(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(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(pItem)->GetValue()), eUnit, MAP_100TH_MM); + nDefDist = LogicToLogic(long(static_cast(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(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(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(pItem)->GetValue() : 0.0, 1.0 ); - double fTmpWidth((OutputDevice::LogicToLogic(static_cast(m_fObjectWidth),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale); + double fTmpWidth((OutputDevice::LogicToLogic(static_cast(m_fObjectWidth), mePoolUnit, MapUnit::Map100thMM )) / fUIScale); m_fObjectWidth = fTmpWidth; pItem = GetItem( rGeoAttr, SID_ATTR_TRANSFORM_HEIGHT ); m_fObjectHeight = std::max( pItem ? (double)static_cast(pItem)->GetValue() : 0.0, 1.0 ); - double fTmpHeight((OutputDevice::LogicToLogic(static_cast(m_fObjectHeight),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale); + double fTmpHeight((OutputDevice::LogicToLogic(static_cast(m_fObjectHeight), mePoolUnit, MapUnit::Map100thMM )) / fUIScale); m_fObjectHeight = fTmpHeight; XFillBitmapItem aItem( static_cast(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(aTempBitmapSize.Width()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale); - rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast(aTempBitmapSize.Height()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale); + rBitmapSize.Width() = ((OutputDevice::LogicToLogic(static_cast(aTempBitmapSize.Width()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale); + rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast(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(nWidth),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale; - nHeight = (OutputDevice::LogicToLogic(static_cast(nHeight),(MapUnit)mePoolUnit, MAP_100TH_MM )) / fUIScale; + nWidth = (OutputDevice::LogicToLogic(static_cast(nWidth), mePoolUnit, MapUnit::Map100thMM )) / fUIScale; + nHeight = (OutputDevice::LogicToLogic(static_cast(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(aTempBitmapSize.Width()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale); - rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast(aTempBitmapSize.Height()),MAP_PIXEL, MAP_100TH_MM )) / fUIScale); + rBitmapSize.Width() = ((OutputDevice::LogicToLogic(static_cast(aTempBitmapSize.Width()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale); + rBitmapSize.Height() = ((OutputDevice::LogicToLogic(static_cast(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 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 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(m_pSymbolWidthMF->Denormalize(m_pSymbolWidthMF->GetValue(FUNIT_100TH_MM))); long nHeightVal= static_cast(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(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(m_pMtrWidth->Denormalize( lWidth )); // get Height double nHeight = static_cast(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(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(pItem)->GetValue() : 0.0, 1.0 ); - double fTmpWidth((OutputDevice::LogicToLogic(static_cast(mfOldWidth), (MapUnit)mePoolUnit, MAP_100TH_MM)) / fUIScale); + double fTmpWidth((OutputDevice::LogicToLogic(static_cast(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(pItem)->GetValue() : 0.0, 1.0 ); - double fTmpHeight((OutputDevice::LogicToLogic(static_cast(mfOldHeight), (MapUnit)mePoolUnit, MAP_100TH_MM)) / fUIScale); + double fTmpHeight((OutputDevice::LogicToLogic(static_cast(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(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(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::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((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& 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& 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("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 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::Create(this, WB_TABSTOP)); AddButton( m_pbFinish = VclPtr::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 ), M