summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/a11y/atkaction.cxx36
-rw-r--r--vcl/unx/gtk/a11y/atkbridge.cxx14
-rw-r--r--vcl/unx/gtk/a11y/atkcomponent.cxx46
-rw-r--r--vcl/unx/gtk/a11y/atkeditabletext.cxx8
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.cxx26
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.hxx4
-rw-r--r--vcl/unx/gtk/a11y/atkhypertext.cxx18
-rw-r--r--vcl/unx/gtk/a11y/atkimage.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atklistener.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atklistener.hxx18
-rw-r--r--vcl/unx/gtk/a11y/atkregistry.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkregistry.hxx2
-rw-r--r--vcl/unx/gtk/a11y/atkselection.cxx18
-rw-r--r--vcl/unx/gtk/a11y/atktable.cxx98
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atkutil.hxx4
-rw-r--r--vcl/unx/gtk/a11y/atkvalue.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.cxx64
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.hxx4
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.hxx8
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx22
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx18
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx956
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx582
-rw-r--r--vcl/unx/gtk/window/gtkobject.cxx42
-rw-r--r--vcl/unx/headless/svpbmp.cxx18
-rw-r--r--vcl/unx/headless/svpbmp.hxx30
-rw-r--r--vcl/unx/headless/svpdummies.cxx22
-rw-r--r--vcl/unx/headless/svpdummies.hxx28
-rw-r--r--vcl/unx/headless/svpelement.cxx14
-rw-r--r--vcl/unx/headless/svpelement.hxx4
-rw-r--r--vcl/unx/headless/svpframe.cxx42
-rw-r--r--vcl/unx/headless/svpframe.hxx90
-rw-r--r--vcl/unx/headless/svpgdi.cxx16
-rw-r--r--vcl/unx/headless/svpgdi.hxx104
-rw-r--r--vcl/unx/headless/svpinst.cxx28
-rw-r--r--vcl/unx/headless/svpinst.hxx86
-rw-r--r--vcl/unx/headless/svpprn.cxx84
-rw-r--r--vcl/unx/headless/svpprn.hxx68
-rw-r--r--vcl/unx/headless/svppspgraphics.cxx144
-rw-r--r--vcl/unx/headless/svppspgraphics.hxx130
-rw-r--r--vcl/unx/headless/svptext.cxx6
-rw-r--r--vcl/unx/headless/svpvd.cxx6
-rw-r--r--vcl/unx/headless/svpvd.hxx12
-rw-r--r--vcl/unx/inc/XIM.h26
-rw-r--r--vcl/unx/inc/Xproto.h2
-rw-r--r--vcl/unx/inc/cdeint.hxx2
-rw-r--r--vcl/unx/inc/dtint.hxx22
-rw-r--r--vcl/unx/inc/i18n_cb.hxx18
-rw-r--r--vcl/unx/inc/i18n_ic.hxx24
-rw-r--r--vcl/unx/inc/i18n_im.hxx28
-rw-r--r--vcl/unx/inc/i18n_keysym.hxx52
-rw-r--r--vcl/unx/inc/i18n_status.hxx14
-rw-r--r--vcl/unx/inc/i18n_xkb.hxx80
-rw-r--r--vcl/unx/inc/plugins/gtk/atkbridge.hxx2
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkdata.hxx10
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkframe.hxx118
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkgdi.hxx36
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkinst.hxx26
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkobject.hxx40
-rw-r--r--vcl/unx/inc/plugins/kde/kdedata.hxx14
-rw-r--r--vcl/unx/inc/pspgraphics.h140
-rw-r--r--vcl/unx/inc/salbmp.h126
-rw-r--r--vcl/unx/inc/saldata.hxx50
-rw-r--r--vcl/unx/inc/saldisp.hxx380
-rw-r--r--vcl/unx/inc/salfont.h156
-rw-r--r--vcl/unx/inc/salframe.h300
-rw-r--r--vcl/unx/inc/salgdi.h216
-rw-r--r--vcl/unx/inc/salinst.h74
-rw-r--r--vcl/unx/inc/salmenu.h2
-rw-r--r--vcl/unx/inc/salobj.h68
-rw-r--r--vcl/unx/inc/salprn.h68
-rw-r--r--vcl/unx/inc/salstd.hxx60
-rw-r--r--vcl/unx/inc/salsys.h4
-rw-r--r--vcl/unx/inc/saltimer.h6
-rw-r--r--vcl/unx/inc/salunx.h4
-rw-r--r--vcl/unx/inc/salvd.h52
-rw-r--r--vcl/unx/inc/sm.hxx20
-rw-r--r--vcl/unx/inc/soicon.hxx4
-rw-r--r--vcl/unx/inc/strhelper.hxx2
-rw-r--r--vcl/unx/inc/svsys.h2
-rw-r--r--vcl/unx/inc/svunx.h2
-rw-r--r--vcl/unx/inc/wmadaptor.hxx54
-rw-r--r--vcl/unx/inc/xfont.hxx50
-rw-r--r--vcl/unx/kde/kdedata.cxx10
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx155
-rw-r--r--vcl/unx/kde4/KDEData.cxx4
-rw-r--r--vcl/unx/kde4/KDEData.hxx4
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx2
-rw-r--r--vcl/unx/kde4/KDESalDisplay.hxx2
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx71
-rw-r--r--vcl/unx/kde4/KDESalFrame.hxx6
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx222
-rw-r--r--vcl/unx/kde4/KDESalGraphics.hxx24
-rw-r--r--vcl/unx/kde4/KDESalInstance.cxx2
-rw-r--r--vcl/unx/kde4/KDESalInstance.hxx2
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx22
-rw-r--r--vcl/unx/kde4/KDEXLib.hxx8
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.cxx6
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.hxx8
-rw-r--r--vcl/unx/kde4/main.cxx8
-rw-r--r--vcl/unx/source/app/i18n_cb.cxx18
-rw-r--r--vcl/unx/source/app/i18n_ic.cxx28
-rw-r--r--vcl/unx/source/app/i18n_im.cxx30
-rw-r--r--vcl/unx/source/app/i18n_keysym.cxx136
-rw-r--r--vcl/unx/source/app/i18n_status.cxx30
-rw-r--r--vcl/unx/source/app/i18n_wrp.cxx34
-rw-r--r--vcl/unx/source/app/i18n_xkb.cxx8
-rw-r--r--vcl/unx/source/app/keysymnames.cxx42
-rw-r--r--vcl/unx/source/app/randrwrapper.cxx30
-rw-r--r--vcl/unx/source/app/saldata.cxx100
-rw-r--r--vcl/unx/source/app/saldisp.cxx110
-rw-r--r--vcl/unx/source/app/salinst.cxx38
-rw-r--r--vcl/unx/source/app/salsys.cxx6
-rw-r--r--vcl/unx/source/app/saltimer.cxx8
-rw-r--r--vcl/unx/source/app/sm.cxx148
-rw-r--r--vcl/unx/source/app/soicon.cxx12
-rw-r--r--vcl/unx/source/app/wmadaptor.cxx305
-rw-r--r--vcl/unx/source/desktopdetect/desktopdetector.cxx46
-rw-r--r--vcl/unx/source/dtrans/X11_clipboard.cxx6
-rw-r--r--vcl/unx/source/dtrans/X11_clipboard.hxx42
-rw-r--r--vcl/unx/source/dtrans/X11_dndcontext.cxx8
-rw-r--r--vcl/unx/source/dtrans/X11_dndcontext.hxx10
-rw-r--r--vcl/unx/source/dtrans/X11_droptarget.cxx4
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx706
-rw-r--r--vcl/unx/source/dtrans/X11_selection.hxx214
-rw-r--r--vcl/unx/source/dtrans/X11_service.cxx16
-rw-r--r--vcl/unx/source/dtrans/X11_transferable.cxx2
-rw-r--r--vcl/unx/source/dtrans/X11_transferable.hxx20
-rw-r--r--vcl/unx/source/dtrans/bmp.cxx88
-rw-r--r--vcl/unx/source/dtrans/bmp.hxx26
-rw-r--r--vcl/unx/source/dtrans/config.cxx4
-rw-r--r--vcl/unx/source/dtrans/copydata_curs.h2
-rw-r--r--vcl/unx/source/dtrans/copydata_mask.h2
-rw-r--r--vcl/unx/source/dtrans/linkdata_curs.h2
-rw-r--r--vcl/unx/source/dtrans/linkdata_mask.h2
-rw-r--r--vcl/unx/source/dtrans/movedata_curs.h2
-rw-r--r--vcl/unx/source/dtrans/movedata_mask.h2
-rw-r--r--vcl/unx/source/dtrans/nodrop_curs.h2
-rw-r--r--vcl/unx/source/dtrans/nodrop_mask.h2
-rw-r--r--vcl/unx/source/fontmanager/adobeenc.tab8
-rw-r--r--vcl/unx/source/fontmanager/fontcache.cxx118
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx214
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx186
-rw-r--r--vcl/unx/source/fontmanager/helper.cxx14
-rw-r--r--vcl/unx/source/fontmanager/parseAFM.cxx440
-rw-r--r--vcl/unx/source/fontmanager/parseAFM.hxx122
-rw-r--r--vcl/unx/source/gdi/cdeint.cxx26
-rw-r--r--vcl/unx/source/gdi/dtint.cxx2
-rw-r--r--vcl/unx/source/gdi/dtsetenum.hxx2
-rw-r--r--vcl/unx/source/gdi/gcach_xpeer.cxx8
-rw-r--r--vcl/unx/source/gdi/gcach_xpeer.hxx2
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx168
-rw-r--r--vcl/unx/source/gdi/salbmp.cxx134
-rw-r--r--vcl/unx/source/gdi/salcvt.cxx186
-rw-r--r--vcl/unx/source/gdi/salcvt.hxx32
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx342
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx256
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx118
-rw-r--r--vcl/unx/source/gdi/salprnpsp.cxx114
-rw-r--r--vcl/unx/source/gdi/salvd.cxx18
-rw-r--r--vcl/unx/source/gdi/xfont.cxx40
-rw-r--r--vcl/unx/source/gdi/xlfd_attr.cxx132
-rw-r--r--vcl/unx/source/gdi/xlfd_attr.hxx112
-rw-r--r--vcl/unx/source/gdi/xlfd_extd.cxx24
-rw-r--r--vcl/unx/source/gdi/xlfd_extd.hxx110
-rw-r--r--vcl/unx/source/gdi/xlfd_smpl.cxx12
-rw-r--r--vcl/unx/source/gdi/xlfd_smpl.hxx42
-rw-r--r--vcl/unx/source/gdi/xrender_peer.cxx4
-rw-r--r--vcl/unx/source/gdi/xrender_peer.hxx6
-rw-r--r--vcl/unx/source/inc/airbrush_curs.h2
-rw-r--r--vcl/unx/source/inc/airbrush_mask.h2
-rw-r--r--vcl/unx/source/inc/ase_curs.h2
-rw-r--r--vcl/unx/source/inc/ase_mask.h4
-rw-r--r--vcl/unx/source/inc/asn_curs.h2
-rw-r--r--vcl/unx/source/inc/asn_mask.h2
-rw-r--r--vcl/unx/source/inc/asne_curs.h2
-rw-r--r--vcl/unx/source/inc/asne_mask.h2
-rw-r--r--vcl/unx/source/inc/asns_curs.h2
-rw-r--r--vcl/unx/source/inc/asns_mask.h2
-rw-r--r--vcl/unx/source/inc/asnswe_curs.h2
-rw-r--r--vcl/unx/source/inc/asnswe_mask.h2
-rw-r--r--vcl/unx/source/inc/asnw_curs.h2
-rw-r--r--vcl/unx/source/inc/asnw_mask.h2
-rw-r--r--vcl/unx/source/inc/ass_curs.h2
-rw-r--r--vcl/unx/source/inc/ass_mask.h2
-rw-r--r--vcl/unx/source/inc/asse_curs.h2
-rw-r--r--vcl/unx/source/inc/asse_mask.h2
-rw-r--r--vcl/unx/source/inc/assw_curs.h2
-rw-r--r--vcl/unx/source/inc/assw_mask.h2
-rw-r--r--vcl/unx/source/inc/asw_curs.h2
-rw-r--r--vcl/unx/source/inc/asw_mask.h2
-rw-r--r--vcl/unx/source/inc/aswe_curs.h2
-rw-r--r--vcl/unx/source/inc/aswe_mask.h2
-rw-r--r--vcl/unx/source/inc/chain_curs.h2
-rw-r--r--vcl/unx/source/inc/chain_mask.h2
-rw-r--r--vcl/unx/source/inc/chainnot_curs.h2
-rw-r--r--vcl/unx/source/inc/chainnot_mask.h2
-rw-r--r--vcl/unx/source/inc/chart_curs.h2
-rw-r--r--vcl/unx/source/inc/chart_mask.h2
-rw-r--r--vcl/unx/source/inc/copydata_curs.h2
-rw-r--r--vcl/unx/source/inc/copydata_mask.h2
-rw-r--r--vcl/unx/source/inc/copydlnk_curs.h2
-rw-r--r--vcl/unx/source/inc/copydlnk_mask.h2
-rw-r--r--vcl/unx/source/inc/copyfile_curs.h2
-rw-r--r--vcl/unx/source/inc/copyfile_mask.h2
-rw-r--r--vcl/unx/source/inc/copyfiles_curs.h2
-rw-r--r--vcl/unx/source/inc/copyfiles_mask.h2
-rw-r--r--vcl/unx/source/inc/copyflnk_curs.h2
-rw-r--r--vcl/unx/source/inc/copyflnk_mask.h2
-rw-r--r--vcl/unx/source/inc/crook_curs.h2
-rw-r--r--vcl/unx/source/inc/crook_mask.h2
-rw-r--r--vcl/unx/source/inc/crop_curs.h2
-rw-r--r--vcl/unx/source/inc/crop_mask.h2
-rw-r--r--vcl/unx/source/inc/detective_curs.h2
-rw-r--r--vcl/unx/source/inc/detective_mask.h2
-rw-r--r--vcl/unx/source/inc/drawarc_curs.h2
-rw-r--r--vcl/unx/source/inc/drawarc_mask.h2
-rw-r--r--vcl/unx/source/inc/drawbezier_curs.h2
-rw-r--r--vcl/unx/source/inc/drawbezier_mask.h2
-rw-r--r--vcl/unx/source/inc/drawcaption_curs.h2
-rw-r--r--vcl/unx/source/inc/drawcaption_mask.h2
-rw-r--r--vcl/unx/source/inc/drawcirclecut_curs.h2
-rw-r--r--vcl/unx/source/inc/drawcirclecut_mask.h2
-rw-r--r--vcl/unx/source/inc/drawconnect_curs.h2
-rw-r--r--vcl/unx/source/inc/drawconnect_mask.h2
-rw-r--r--vcl/unx/source/inc/drawcrook_curs.h2
-rw-r--r--vcl/unx/source/inc/drawcrook_mask.h2
-rw-r--r--vcl/unx/source/inc/drawcrop_curs.h2
-rw-r--r--vcl/unx/source/inc/drawcrop_mask.h2
-rw-r--r--vcl/unx/source/inc/drawellipse_curs.h2
-rw-r--r--vcl/unx/source/inc/drawellipse_mask.h2
-rw-r--r--vcl/unx/source/inc/drawfreehand_curs.h2
-rw-r--r--vcl/unx/source/inc/drawfreehand_mask.h2
-rw-r--r--vcl/unx/source/inc/drawline_curs.h2
-rw-r--r--vcl/unx/source/inc/drawline_mask.h2
-rw-r--r--vcl/unx/source/inc/drawmirror_curs.h2
-rw-r--r--vcl/unx/source/inc/drawmirror_mask.h2
-rw-r--r--vcl/unx/source/inc/drawpie_curs.h2
-rw-r--r--vcl/unx/source/inc/drawpie_mask.h2
-rw-r--r--vcl/unx/source/inc/drawpolygon_curs.h2
-rw-r--r--vcl/unx/source/inc/drawpolygon_mask.h2
-rw-r--r--vcl/unx/source/inc/drawrect_curs.h2
-rw-r--r--vcl/unx/source/inc/drawrect_mask.h2
-rw-r--r--vcl/unx/source/inc/drawtext_curs.h2
-rw-r--r--vcl/unx/source/inc/drawtext_mask.h2
-rw-r--r--vcl/unx/source/inc/fill_curs.h2
-rw-r--r--vcl/unx/source/inc/fill_mask.h2
-rw-r--r--vcl/unx/source/inc/hshear_curs.h2
-rw-r--r--vcl/unx/source/inc/hshear_mask.h2
-rw-r--r--vcl/unx/source/inc/invert50.h2
-rw-r--r--vcl/unx/source/inc/linkdata_curs.h2
-rw-r--r--vcl/unx/source/inc/linkdata_mask.h2
-rw-r--r--vcl/unx/source/inc/linkfile_curs.h2
-rw-r--r--vcl/unx/source/inc/linkfile_mask.h2
-rw-r--r--vcl/unx/source/inc/magnify_curs.h2
-rw-r--r--vcl/unx/source/inc/magnify_mask.h2
-rw-r--r--vcl/unx/source/inc/mirror_curs.h2
-rw-r--r--vcl/unx/source/inc/mirror_mask.h2
-rw-r--r--vcl/unx/source/inc/movebezierweight_curs.h2
-rw-r--r--vcl/unx/source/inc/movebezierweight_mask.h2
-rw-r--r--vcl/unx/source/inc/movedata_curs.h2
-rw-r--r--vcl/unx/source/inc/movedata_mask.h2
-rw-r--r--vcl/unx/source/inc/movedlnk_curs.h2
-rw-r--r--vcl/unx/source/inc/movedlnk_mask.h2
-rw-r--r--vcl/unx/source/inc/movefile_curs.h2
-rw-r--r--vcl/unx/source/inc/movefile_mask.h2
-rw-r--r--vcl/unx/source/inc/movefiles_curs.h2
-rw-r--r--vcl/unx/source/inc/movefiles_mask.h2
-rw-r--r--vcl/unx/source/inc/moveflnk_curs.h2
-rw-r--r--vcl/unx/source/inc/moveflnk_mask.h2
-rw-r--r--vcl/unx/source/inc/movepoint_curs.h2
-rw-r--r--vcl/unx/source/inc/movepoint_mask.h2
-rw-r--r--vcl/unx/source/inc/nodrop_curs.h2
-rw-r--r--vcl/unx/source/inc/nodrop_mask.h2
-rw-r--r--vcl/unx/source/inc/null_curs.h4
-rw-r--r--vcl/unx/source/inc/null_mask.h2
-rw-r--r--vcl/unx/source/inc/pivotcol_curs.h2
-rw-r--r--vcl/unx/source/inc/pivotcol_mask.h2
-rw-r--r--vcl/unx/source/inc/pivotdel_curs.h2
-rw-r--r--vcl/unx/source/inc/pivotdel_mask.h2
-rw-r--r--vcl/unx/source/inc/pivotfld_curs.h2
-rw-r--r--vcl/unx/source/inc/pivotfld_mask.h2
-rw-r--r--vcl/unx/source/inc/pivotrow_curs.h2
-rw-r--r--vcl/unx/source/inc/pivotrow_mask.h2
-rw-r--r--vcl/unx/source/inc/rotate_curs.h2
-rw-r--r--vcl/unx/source/inc/rotate_mask.h2
-rw-r--r--vcl/unx/source/inc/salcursors.h2
-rw-r--r--vcl/unx/source/inc/timemove_curs.h2
-rw-r--r--vcl/unx/source/inc/timemove_mask.h2
-rw-r--r--vcl/unx/source/inc/timesize_curs.h2
-rw-r--r--vcl/unx/source/inc/timesize_mask.h2
-rw-r--r--vcl/unx/source/inc/vertcurs_curs.h2
-rw-r--r--vcl/unx/source/inc/vertcurs_mask.h2
-rw-r--r--vcl/unx/source/inc/vshear_curs.h2
-rw-r--r--vcl/unx/source/inc/vshear_mask.h2
-rw-r--r--vcl/unx/source/plugadapt/salplug.cxx44
-rw-r--r--vcl/unx/source/printer/cupsmgr.cxx196
-rw-r--r--vcl/unx/source/printer/jobdata.cxx26
-rw-r--r--vcl/unx/source/printer/ppdparser.cxx68
-rw-r--r--vcl/unx/source/printer/printerinfomanager.cxx230
-rw-r--r--vcl/unx/source/printergfx/bitmap_gfx.cxx60
-rw-r--r--vcl/unx/source/printergfx/common_gfx.cxx142
-rw-r--r--vcl/unx/source/printergfx/glyphset.cxx200
-rw-r--r--vcl/unx/source/printergfx/glyphset.hxx56
-rw-r--r--vcl/unx/source/printergfx/printerjob.cxx98
-rw-r--r--vcl/unx/source/printergfx/psputil.cxx36
-rw-r--r--vcl/unx/source/printergfx/psputil.hxx14
-rw-r--r--vcl/unx/source/printergfx/text_gfx.cxx140
-rw-r--r--vcl/unx/source/window/FWS.cxx2
-rw-r--r--vcl/unx/source/window/FWS.hxx8
-rw-r--r--vcl/unx/source/window/salframe.cxx738
-rw-r--r--vcl/unx/source/window/salmenu.cxx4
-rw-r--r--vcl/unx/source/window/salobj.cxx100
315 files changed, 6807 insertions, 6754 deletions
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 4329dd345d14..c2be009f0b7d 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,7 +60,7 @@ static accessibility::XAccessibleAction*
getAction( AtkAction *action ) throw (uno::RuntimeException)
{
AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( action );
-
+
if( pWrap )
{
if( !pWrap->mpAction && pWrap->mpContext )
@@ -133,7 +133,7 @@ action_wrapper_get_name (AtkAction *action,
gint i)
{
static std::map< rtl::OUString, const gchar * > aNameMap;
-
+
if( aNameMap.empty() )
{
aNameMap.insert( ACTION_NAME_PAIR( "click", "click" ) );
@@ -146,16 +146,16 @@ action_wrapper_get_name (AtkAction *action,
if( pAction )
{
std::map< rtl::OUString, const gchar * >::iterator iter;
-
+
rtl::OUString aDesc( pAction->getAccessibleActionDescription( i ) );
-
+
iter = aNameMap.find( aDesc );
if( iter != aNameMap.end() )
return iter->second;
-
- std::pair< const rtl::OUString, const gchar * > aNewVal( aDesc,
+
+ std::pair< const rtl::OUString, const gchar * > aNewVal( aDesc,
g_strdup( OUStringToConstGChar(aDesc) ) );
-
+
if( aNameMap.insert( aNewVal ).second )
return aNewVal.second;
}
@@ -167,11 +167,11 @@ action_wrapper_get_name (AtkAction *action,
return "";
}
-/*
+/*
* GNOME Expects a string in the format:
-*
+*
* <nmemonic>;<full-path>;<accelerator>
-*
+*
* The keybindings in <full-path> should be separated by ":"
*/
@@ -186,13 +186,13 @@ appendKeyStrokes(rtl::OStringBuffer& rBuffer, const uno::Sequence< awt::KeyStrok
rBuffer.append("<Control>");
if( rKeyStrokes[i].Modifiers & awt::KeyModifier::MOD2 )
rBuffer.append("<Alt>");
-
+
if( ( rKeyStrokes[i].KeyCode >= awt::Key::A ) && ( rKeyStrokes[i].KeyCode <= awt::Key::Z ) )
rBuffer.append( (sal_Char) ( 'a' + ( rKeyStrokes[i].KeyCode - awt::Key::A ) ) );
else
{
sal_Char c = '\0';
-
+
switch( rKeyStrokes[i].KeyCode )
{
case awt::Key::TAB: c = '\t'; break;
@@ -212,7 +212,7 @@ appendKeyStrokes(rtl::OStringBuffer& rBuffer, const uno::Sequence< awt::KeyStrok
g_warning( "Unmapped KeyCode: %d", rKeyStrokes[i].KeyCode );
break;
}
-
+
if( c != '\0' )
rBuffer.append( c );
}
@@ -229,20 +229,20 @@ action_wrapper_get_keybinding (AtkAction *action,
if( pAction )
{
uno::Reference< accessibility::XAccessibleKeyBinding > xBinding( pAction->getAccessibleActionKeyBinding( i ));
-
+
if( xBinding.is() )
{
rtl::OStringBuffer aRet;
-
+
sal_Int32 nmax = std::min( xBinding->getAccessibleKeyBindingCount(), (sal_Int32) 3 );
for( sal_Int32 n = 0; n < nmax; n++ )
{
appendKeyStrokes( aRet, xBinding->getAccessibleKeyBinding( n ) );
-
+
if( n < 2 )
aRet.append( (sal_Char) ';' );
}
-
+
// !! FIXME !! remember keystroke in wrapper object ?
return getAsConst( aRet.makeStringAndClear() );
}
diff --git a/vcl/unx/gtk/a11y/atkbridge.cxx b/vcl/unx/gtk/a11y/atkbridge.cxx
index 25add8e0dd18..3f5d00fe050a 100644
--- a/vcl/unx/gtk/a11y/atkbridge.cxx
+++ b/vcl/unx/gtk/a11y/atkbridge.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,16 +41,16 @@ bool InitAtkBridge(void)
const char* pVersion = atk_get_toolkit_version();
if( ! pVersion )
return false;
-
+
unsigned int major, minor, micro;
-
+
/* check gail minimum version requirements */
if( sscanf( pVersion, "%u.%u.%u", &major, &minor, &micro) < 3 )
{
// g_warning( "unable to parse gail version number" );
return false;
}
-
+
if( ( (major << 16) | (minor << 8) | micro ) < ( (1 << 16) | 8 << 8 | 6 ) )
{
g_warning( "libgail >= 1.8.6 required for accessibility support" );
@@ -59,15 +59,15 @@ bool InitAtkBridge(void)
/* Initialize the AtkUtilityWrapper class */
g_type_class_unref( g_type_class_ref( OOO_TYPE_ATK_UTIL ) );
-
+
/* Initialize the GailWindow wrapper class */
g_type_class_unref( g_type_class_ref( OOO_TYPE_WINDOW_WRAPPER ) );
-
+
/* Register AtkObject wrapper factory */
AtkRegistry * registry = atk_get_default_registry();
if( registry )
atk_registry_set_factory_type( registry, OOO_TYPE_FIXED, OOO_TYPE_WRAPPER_FACTORY );
-
+
return true;
}
diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx
index 24cf335ebeb0..b859c2230f70 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,17 +50,17 @@ static accessibility::XAccessibleComponent*
pWrap->mpComponent = reinterpret_cast< accessibility::XAccessibleComponent * > (any.pReserved);
pWrap->mpComponent->acquire();
}
-
+
return pWrap->mpComponent;
}
-
+
return NULL;
}
/*****************************************************************************/
static awt::Point
-translatePoint( accessibility::XAccessibleComponent *pComponent,
+translatePoint( accessibility::XAccessibleComponent *pComponent,
gint x, gint y, AtkCoordType t)
{
awt::Point aOrigin( 0, 0 );
@@ -68,7 +68,7 @@ translatePoint( accessibility::XAccessibleComponent *pComponent,
aOrigin = pComponent->getLocationOnScreen();
#ifdef ENABLE_TRACING
- fprintf(stderr, "coordinates ( %u, %u ) translated to: ( %u, %u )\n",
+ fprintf(stderr, "coordinates ( %u, %u ) translated to: ( %u, %u )\n",
x, y, x - aOrigin.X, y - aOrigin.Y);
#endif
@@ -95,7 +95,7 @@ component_wrapper_grab_focus (AtkComponent *component)
{
g_warning( "Exception in grabFocus()" );
}
-
+
return FALSE;
}
@@ -117,7 +117,7 @@ component_wrapper_contains (AtkComponent *component,
{
g_warning( "Exception in containsPoint()" );
}
-
+
return FALSE;
}
@@ -132,20 +132,20 @@ component_wrapper_ref_accessible_at_point (AtkComponent *component,
try
{
accessibility::XAccessibleComponent* pComponent = getComponent( component );
-
+
if( pComponent )
{
uno::Reference< accessibility::XAccessible > xAccessible;
xAccessible = pComponent->getAccessibleAtPoint(
translatePoint( pComponent, x, y, coord_type ) );
-
+
#ifdef ENABLE_TRACING
fprintf(stderr, "getAccessibleAtPoint( %u, %u ) returned %p\n",
x, y, xAccessible.get());
-
+
uno::Reference< accessibility::XAccessibleComponent > xComponent(
xAccessible->getAccessibleContext(), uno::UNO_QUERY );
-
+
if( xComponent.is() )
{
awt::Rectangle rect = xComponent->getBounds();
@@ -157,11 +157,11 @@ component_wrapper_ref_accessible_at_point (AtkComponent *component,
return atk_object_wrapper_ref( xAccessible );
}
}
- catch( const uno::Exception &e )
+ catch( const uno::Exception &e )
{
g_warning( "Exception in getAccessibleAtPoint()" );
}
-
+
return NULL;
}
@@ -179,21 +179,21 @@ component_wrapper_get_position (AtkComponent *component,
if( pComponent )
{
awt::Point aPos;
-
+
if( coord_type == ATK_XY_SCREEN )
aPos = pComponent->getLocationOnScreen();
else
aPos = pComponent->getLocation();
-
+
*x = aPos.X;
*y = aPos.Y;
-
+
#ifdef ENABLE_TRACING
fprintf(stderr, "getLocation[OnScreen]() returned: ( %u, %u )\n", *x, *y );
#endif
}
}
- catch( const uno::Exception &e )
+ catch( const uno::Exception &e )
{
g_warning( "Exception in getLocation[OnScreen]()" );
}
@@ -214,13 +214,13 @@ component_wrapper_get_size (AtkComponent *component,
awt::Size aSize = pComponent->getSize();
*width = aSize.Width;
*height = aSize.Height;
-
+
#ifdef ENABLE_TRACING
fprintf(stderr, "getSize() returned: ( %u, %u )\n", *width, *height );
#endif
}
}
- catch( const uno::Exception &e )
+ catch( const uno::Exception &e )
{
g_warning( "Exception in getSize()" );
}
@@ -274,7 +274,7 @@ component_wrapper_get_layer (AtkComponent *component)
{
AtkRole role = atk_object_get_role( ATK_OBJECT( component ) );
AtkLayer layer = ATK_LAYER_WIDGET;
-
+
switch (role)
{
case ATK_ROLE_POPUP_MENU:
@@ -291,7 +291,7 @@ component_wrapper_get_layer (AtkComponent *component)
layer = ATK_LAYER_POPUP;
}
break;
-
+
case ATK_ROLE_LIST:
{
AtkObject * parent = atk_object_get_parent( ATK_OBJECT( component ) );
@@ -299,11 +299,11 @@ component_wrapper_get_layer (AtkComponent *component)
layer = ATK_LAYER_POPUP;
}
break;
-
+
default:
;
}
-
+
return layer;
}
diff --git a/vcl/unx/gtk/a11y/atkeditabletext.cxx b/vcl/unx/gtk/a11y/atkeditabletext.cxx
index c0399145b07c..7673b21c6783 100644
--- a/vcl/unx/gtk/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk/a11y/atkeditabletext.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,17 +54,17 @@ static accessibility::XAccessibleEditableText*
pWrap->mpEditableText = reinterpret_cast< accessibility::XAccessibleEditableText * > (any.pReserved);
pWrap->mpEditableText->acquire();
}
-
+
return pWrap->mpEditableText;
}
-
+
return NULL;
}
/*****************************************************************************/
-extern "C" {
+extern "C" {
static gboolean
editable_text_wrapper_set_run_attributes( AtkEditableText *text,
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx
index d2574f616539..f2760383a44e 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,11 +39,11 @@ using namespace ::com::sun::star;
extern "C" {
/*
- * Instances of this dummy object class are returned whenever we have to
+ * Instances of this dummy object class are returned whenever we have to
* create an AtkObject, but can't touch the OOo object anymore since it
* is already disposed.
*/
-
+
static AtkStateSet *
noop_wrapper_ref_state_set( AtkObject * )
{
@@ -79,12 +79,12 @@ atk_noop_object_wrapper_get_type(void)
(GInstanceInitFunc) NULL,
NULL
} ;
-
+
type = g_type_register_static (ATK_TYPE_OBJECT, "OOoAtkNoOpObj", &typeInfo, (GTypeFlags)0) ;
}
return type;
}
-
+
AtkObject*
atk_noop_object_wrapper_new()
{
@@ -113,22 +113,22 @@ static AtkObject*
wrapper_factory_create_accessible( GObject *obj )
{
GtkWidget* parent_widget = gtk_widget_get_parent( GTK_WIDGET( obj ) );
-
+
// gail_container_real_remove_gtk tries to re-instanciate an accessible
// for a widget that is about to vanish ..
if( ! parent_widget )
return atk_noop_object_wrapper_new();
-
+
GtkSalFrame* pFrame = GtkSalFrame::getFromWindow( GTK_WINDOW( parent_widget ) );
g_return_val_if_fail( pFrame != NULL, NULL );
-
+
Window* pFrameWindow = pFrame->GetWindow();
if( pFrameWindow )
{
Window* pWindow = pFrameWindow;
// skip accessible objects already exposed by the frame objects
- if( WINDOW_BORDERWINDOW == pWindow->GetType() )
+ if( WINDOW_BORDERWINDOW == pWindow->GetType() )
pWindow = pFrameWindow->GetAccessibleChildWindow(0);
if( pWindow )
@@ -147,7 +147,7 @@ wrapper_factory_create_accessible( GObject *obj )
}
}
}
-
+
return NULL;
}
@@ -174,9 +174,9 @@ wrapper_factory_get_type (void)
t = g_type_register_static (
ATK_TYPE_OBJECT_FACTORY, "OOoAtkObjectWrapperFactory",
&tinfo, (GTypeFlags) 0);
- }
-
- return t;
+ }
+
+ return t;
}
} // extern C
diff --git a/vcl/unx/gtk/a11y/atkfactory.hxx b/vcl/unx/gtk/a11y/atkfactory.hxx
index 82be08cfad1b..9a3d3014b4d4 100644
--- a/vcl/unx/gtk/a11y/atkfactory.hxx
+++ b/vcl/unx/gtk/a11y/atkfactory.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@
#define OOO_TYPE_WRAPPER_FACTORY wrapper_factory_get_type()
extern "C" {
-
+
GType wrapper_factory_get_type (void);
} // extern "C"
diff --git a/vcl/unx/gtk/a11y/atkhypertext.cxx b/vcl/unx/gtk/a11y/atkhypertext.cxx
index 90d735890655..b2eeb80a8c21 100644
--- a/vcl/unx/gtk/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk/a11y/atkhypertext.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@
using namespace ::com::sun::star;
-
+
// ---------------------- AtkHyperlink ----------------------
typedef struct {
@@ -98,7 +98,7 @@ hyper_link_get_end_index( AtkHyperlink *pLink )
{
try {
return getHyperlink( pLink )->getEndIndex();
- }
+ }
catch(const uno::Exception& e) {
}
return -1;
@@ -108,7 +108,7 @@ hyper_link_get_start_index( AtkHyperlink *pLink )
{
try {
return getHyperlink( pLink )->getStartIndex();
- }
+ }
catch(const uno::Exception& e) {
}
return -1;
@@ -215,10 +215,10 @@ static accessibility::XAccessibleHypertext*
pWrap->mpHypertext = reinterpret_cast< accessibility::XAccessibleHypertext * > (any.pReserved);
pWrap->mpHypertext->acquire();
}
-
+
return pWrap->mpHypertext;
}
-
+
return NULL;
}
@@ -243,7 +243,7 @@ hypertext_get_link( AtkHypertext *hypertext,
catch(const uno::Exception& e) {
g_warning( "Exception in getHyperLink()" );
}
-
+
return NULL;
}
@@ -258,7 +258,7 @@ hypertext_get_n_links( AtkHypertext *hypertext )
catch(const uno::Exception& e) {
g_warning( "Exception in getHyperLinkCount()" );
}
-
+
return 0;
}
@@ -274,7 +274,7 @@ hypertext_get_link_index( AtkHypertext *hypertext,
catch(const uno::Exception& e) {
g_warning( "Exception in getHyperLinkIndex()" );
}
-
+
return 0;
}
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index b48c59555a29..44147bead26d 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,10 +60,10 @@ static accessibility::XAccessibleImage*
pWrap->mpImage = reinterpret_cast< accessibility::XAccessibleImage * > (any.pReserved);
pWrap->mpImage->acquire();
}
-
+
return pWrap->mpImage;
}
-
+
return NULL;
}
@@ -74,13 +74,13 @@ image_get_image_description( AtkImage *image )
{
try {
accessibility::XAccessibleImage* pImage = getImage( image );
- if( pImage )
+ if( pImage )
return getAsConst( pImage->getAccessibleImageDescription() );
}
catch(const uno::Exception& e) {
g_warning( "Exception in getAccessibleImageDescription()" );
}
-
+
return NULL;
}
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index e02478ac8ad8..7b63d25e5474 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/gtk/a11y/atklistener.hxx b/vcl/unx/gtk/a11y/atklistener.hxx
index d2889caa3e24..5f4c47a38dcb 100644
--- a/vcl/unx/gtk/a11y/atklistener.hxx
+++ b/vcl/unx/gtk/a11y/atklistener.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,15 +41,15 @@ class AtkListener : public ::cppu::WeakImplHelper1< ::com::sun::star::accessibil
{
public:
AtkListener(AtkObjectWrapper * pWrapper);
-
+
// XEventListener
- virtual void disposing( const ::com::sun::star::lang::EventObject& Source )
+ virtual void disposing( const ::com::sun::star::lang::EventObject& Source )
throw (::com::sun::star::uno::RuntimeException);
// XAccessibleEventListener
- virtual void notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+ virtual void notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
throw( ::com::sun::star::uno::RuntimeException );
-
+
AtkObjectWrapper *mpWrapper;
AccessibleVector m_aChildList;
@@ -59,20 +59,20 @@ private:
// Updates the child list held to provide the old IndexInParent on children_changed::remove
void updateChildList(::com::sun::star::accessibility::XAccessibleContext* pContext);
-
+
// Process CHILD_EVENT notifications with a new child added
void handleChildAdded(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxChild);
-
+
// Process CHILD_EVENT notifications with a child removed
void handleChildRemoved(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxChild);
-
+
// Process INVALIDATE_ALL_CHILDREN notification
void handleInvalidateChildren(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& rxParent);
};
#endif /* _ATK_LISTENER_HXX_ */
diff --git a/vcl/unx/gtk/a11y/atkregistry.cxx b/vcl/unx/gtk/a11y/atkregistry.cxx
index 81ec22dc4ce1..d8ecf4917cc4 100644
--- a/vcl/unx/gtk/a11y/atkregistry.cxx
+++ b/vcl/unx/gtk/a11y/atkregistry.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,7 @@ static GHashTable *uno_to_gobject = NULL;
/*****************************************************************************/
-AtkObject *
+AtkObject *
ooo_wrapper_registry_get(const Reference< XAccessible >& rxAccessible)
{
if( uno_to_gobject )
@@ -51,7 +51,7 @@ ooo_wrapper_registry_get(const Reference< XAccessible >& rxAccessible)
/*****************************************************************************/
-void
+void
ooo_wrapper_registry_add(const Reference< XAccessible >& rxAccessible, AtkObject *obj)
{
if( !uno_to_gobject )
diff --git a/vcl/unx/gtk/a11y/atkregistry.hxx b/vcl/unx/gtk/a11y/atkregistry.hxx
index f4de3b2e4c1e..ef7a1b1f3cc2 100644
--- a/vcl/unx/gtk/a11y/atkregistry.hxx
+++ b/vcl/unx/gtk/a11y/atkregistry.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/gtk/a11y/atkselection.cxx b/vcl/unx/gtk/a11y/atkselection.cxx
index 172faac4c704..bed81a8db734 100644
--- a/vcl/unx/gtk/a11y/atkselection.cxx
+++ b/vcl/unx/gtk/a11y/atkselection.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,10 +48,10 @@ static accessibility::XAccessibleSelection*
pWrap->mpSelection = reinterpret_cast< accessibility::XAccessibleSelection * > (any.pReserved);
pWrap->mpSelection->acquire();
}
-
+
return pWrap->mpSelection;
}
-
+
return NULL;
}
@@ -72,7 +72,7 @@ selection_add_selection( AtkSelection *selection,
catch(const uno::Exception& e) {
g_warning( "Exception in selectAccessibleChild()" );
}
-
+
return FALSE;
}
@@ -90,7 +90,7 @@ selection_clear_selection( AtkSelection *selection )
catch(const uno::Exception& e) {
g_warning( "Exception in selectAccessibleChild()" );
}
-
+
return FALSE;
}
@@ -106,7 +106,7 @@ selection_ref_selection( AtkSelection *selection,
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChild()" );
}
-
+
return NULL;
}
@@ -121,7 +121,7 @@ selection_get_selection_count( AtkSelection *selection)
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChildCount()" );
}
-
+
return -1;
}
@@ -156,7 +156,7 @@ selection_remove_selection( AtkSelection *selection,
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChildCount()" );
}
-
+
return FALSE;
}
@@ -174,7 +174,7 @@ selection_select_all_selection( AtkSelection *selection)
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChildCount()" );
}
-
+
return FALSE;
}
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index 78571ff11c34..189abe4a3387 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +44,10 @@ atk_object_wrapper_conditional_ref( const uno::Reference< accessibility::XAccess
#ifdef ENABLE_TRACING
fprintf( stderr, ": %p\n", rxAccessible.get() );
#endif
-
+
if( rxAccessible.is() )
return atk_object_wrapper_ref( rxAccessible );
-
+
return NULL;
}
@@ -79,10 +79,10 @@ static accessibility::XAccessibleTable*
pWrap->mpTable = reinterpret_cast< accessibility::XAccessibleTable * > (any.pReserved);
pWrap->mpTable->acquire();
}
-
+
return pWrap->mpTable;
}
-
+
return NULL;
}
@@ -97,20 +97,20 @@ table_wrapper_ref_at (AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getAccessibleCellAt( %u, %u ) returns", row, column );
-
+
if( column >= 255 )
fprintf(stderr, "getAccessibleCellAt( %u, %u ) returns", row, column );
-
+
#endif
if( pTable )
return atk_object_wrapper_conditional_ref( pTable->getAccessibleCellAt( row, column ) );
}
-
+
catch(const uno::Exception& e) {
g_warning( "Exception in getAccessibleCellAt()" );
}
@@ -127,13 +127,13 @@ table_wrapper_get_index_at (AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleIndex( %u, %u ) returns %u\n",
+ fprintf(stderr, "getAccessibleIndex( %u, %u ) returns %u\n",
row, column, pTable->getAccessibleIndex( row, column ) );
#endif
-
+
if( pTable )
return pTable->getAccessibleIndex( row, column );
}
@@ -152,13 +152,13 @@ table_wrapper_get_column_at_index (AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleColumn( %u ) returns %u\n",
+ fprintf(stderr, "getAccessibleColumn( %u ) returns %u\n",
nIndex, pTable->getAccessibleColumn( nIndex ) );
#endif
-
+
if( pTable )
return pTable->getAccessibleColumn( nIndex );
}
@@ -177,10 +177,10 @@ table_wrapper_get_row_at_index( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleRow( %u ) returns %u\n",
+ fprintf(stderr, "getAccessibleRow( %u ) returns %u\n",
nIndex, pTable->getAccessibleRow( nIndex ) );
#endif
@@ -204,7 +204,7 @@ table_wrapper_get_n_columns( AtkTable *table )
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "XAccessibleTable::getAccessibleColumnCount returns %u\n",
+ fprintf(stderr, "XAccessibleTable::getAccessibleColumnCount returns %u\n",
pTable->getAccessibleColumnCount() );
#endif
@@ -225,10 +225,10 @@ table_wrapper_get_n_rows( AtkTable *table )
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleRowCount() returns %u\n",
+ fprintf(stderr, "getAccessibleRowCount() returns %u\n",
pTable->getAccessibleRowCount() );
#endif
@@ -251,10 +251,10 @@ table_wrapper_get_column_extent_at( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleColumnExtentAt( %u, %u ) returns %u\n",
+ fprintf(stderr, "getAccessibleColumnExtentAt( %u, %u ) returns %u\n",
row, column, pTable->getAccessibleColumnExtentAt( row, column ) );
#endif
@@ -277,10 +277,10 @@ table_wrapper_get_row_extent_at( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleRowExtentAt( %u, %u ) returns %u\n",
+ fprintf(stderr, "getAccessibleRowExtentAt( %u, %u ) returns %u\n",
row, column, pTable->getAccessibleRowExtentAt( row, column ) );
#endif
@@ -301,7 +301,7 @@ table_wrapper_get_caption( AtkTable *table )
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getAccessibleCaption() returns" );
@@ -310,7 +310,7 @@ table_wrapper_get_caption( AtkTable *table )
if( pTable )
return atk_object_wrapper_conditional_ref( pTable->getAccessibleCaption() );
}
-
+
catch(const uno::Exception& e) {
g_warning( "Exception in getAccessibleCaption()" );
}
@@ -329,7 +329,7 @@ table_wrapper_get_row_description( AtkTable *table,
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleRowDescription( %u ) returns %s\n",
+ fprintf(stderr, "getAccessibleRowDescription( %u ) returns %s\n",
row, getAsConst( pTable->getAccessibleRowDescription( row ) ) );
#endif
@@ -351,10 +351,10 @@ table_wrapper_get_column_description( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "getAccessibleColumnDescription( %u ) returns %s\n",
+ fprintf(stderr, "getAccessibleColumnDescription( %u ) returns %s\n",
column, getAsConst( pTable->getAccessibleColumnDescription( column ) ) );
#endif
@@ -407,7 +407,7 @@ table_wrapper_get_column_header( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
if( pTable )
{
uno::Reference< accessibility::XAccessibleTable > xColumnHeaders( pTable->getAccessibleColumnHeaders() );
@@ -438,7 +438,7 @@ table_wrapper_get_summary( AtkTable *table )
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getAccessibleSummary() returns" );
@@ -483,12 +483,12 @@ table_wrapper_get_selected_columns( AtkTable *table,
*pSelected = NULL;
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getSelectedAccessibleColumns() \n" );
#endif
-
+
if( pTable )
return convertToGIntArray( pTable->getSelectedAccessibleColumns(), pSelected );
}
@@ -508,12 +508,12 @@ table_wrapper_get_selected_rows( AtkTable *table,
*pSelected = NULL;
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getSelectedAccessibleRows() \n" );
#endif
-
+
if( pTable )
return convertToGIntArray( pTable->getSelectedAccessibleRows(), pSelected );
}
@@ -532,13 +532,13 @@ table_wrapper_is_column_selected( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "isAccessibleColumnSelected( %u ) returns %s\n",
+ fprintf(stderr, "isAccessibleColumnSelected( %u ) returns %s\n",
column, pTable->isAccessibleColumnSelected( column ) ? "true" : "false" );
#endif
-
+
if( pTable )
return pTable->isAccessibleColumnSelected( column );
}
@@ -557,13 +557,13 @@ table_wrapper_is_row_selected( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "isAccessibleRowSelected( %u ) returns %s\n",
+ fprintf(stderr, "isAccessibleRowSelected( %u ) returns %s\n",
row, pTable->isAccessibleRowSelected( row ) ? "true" : "false" );
#endif
-
+
if( pTable )
return pTable->isAccessibleRowSelected( row );
}
@@ -583,13 +583,13 @@ table_wrapper_is_selected( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
- fprintf(stderr, "isAccessibleSelected( %u, %u ) returns %s\n",
+ fprintf(stderr, "isAccessibleSelected( %u, %u ) returns %s\n",
row, column, pTable->isAccessibleSelected( row , column ) ? "true" : "false" );
#endif
-
+
if( pTable )
return pTable->isAccessibleSelected( row, column );
}
@@ -690,11 +690,11 @@ tableIfaceInit (AtkTableIface *iface)
g_return_if_fail (iface != NULL);
iface->ref_at = table_wrapper_ref_at;
- iface->get_n_rows = table_wrapper_get_n_rows;
- iface->get_n_columns = table_wrapper_get_n_columns;
- iface->get_index_at = table_wrapper_get_index_at;
- iface->get_column_at_index = table_wrapper_get_column_at_index;
- iface->get_row_at_index = table_wrapper_get_row_at_index;
+ iface->get_n_rows = table_wrapper_get_n_rows;
+ iface->get_n_columns = table_wrapper_get_n_columns;
+ iface->get_index_at = table_wrapper_get_index_at;
+ iface->get_column_at_index = table_wrapper_get_column_at_index;
+ iface->get_row_at_index = table_wrapper_get_row_at_index;
iface->is_row_selected = table_wrapper_is_row_selected;
iface->is_selected = table_wrapper_is_selected;
iface->get_selected_rows = table_wrapper_get_selected_rows;
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 13492f3d4a5c..0aa063318741 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -92,7 +92,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
// also emit state-changed:focused event under the same condition.
{
AtkObjectWrapper* wrapper_obj = ATK_OBJECT_WRAPPER (atk_obj);
- if( !wrapper_obj->mpText && wrapper_obj->mpContext )
+ if( wrapper_obj && !wrapper_obj->mpText && wrapper_obj->mpContext )
{
uno::Any any = wrapper_obj->mpContext->queryInterface( accessibility::XAccessibleText::static_type(NULL) );
if ( typelib_TypeClass_INTERFACE == any.pType->eTypeClass &&
diff --git a/vcl/unx/gtk/a11y/atkutil.hxx b/vcl/unx/gtk/a11y/atkutil.hxx
index 8c8ddf59c65f..1f2519feea0c 100644
--- a/vcl/unx/gtk/a11y/atkutil.hxx
+++ b/vcl/unx/gtk/a11y/atkutil.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,7 @@
************************************************************************/
#ifndef __ATK_UTIL_HXX__
-#define __ATK_UTIL_HXX__
+#define __ATK_UTIL_HXX__
#include <atk/atk.h>
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 9b8e9743eb18..d8ec910b3591 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,10 +49,10 @@ static accessibility::XAccessibleValue*
pWrap->mpValue = reinterpret_cast< accessibility::XAccessibleValue * > (any.pReserved);
pWrap->mpValue->acquire();
}
-
+
return pWrap->mpValue;
}
-
+
return NULL;
}
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index 5448235998e8..bcc00bc344c5 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,7 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-
+
#include <plugins/gtk/gtkframe.hxx>
#include <vcl/window.hxx>
#include "vcl/popupmenuwindow.hxx"
@@ -45,19 +45,19 @@ extern "C" {
static void (* window_real_initialize) (AtkObject *obj, gpointer data) = NULL;
static void (* window_real_finalize) (GObject *obj) = NULL;
-
+
static void
init_from_window( AtkObject *accessible, Window *pWindow )
{
static AtkRole aDefaultRole = ATK_ROLE_INVALID;
-
+
// Special role for sub-menu and combo-box popups that are exposed directly
// by their parents already.
if( aDefaultRole == ATK_ROLE_INVALID )
aDefaultRole = atk_role_register( "redundant object" );
-
+
AtkRole role = aDefaultRole;
-
+
// Determine the appropriate role for the GtkWindow
switch( pWindow->GetAccessibleRole() )
{
@@ -72,7 +72,7 @@ init_from_window( AtkObject *accessible, Window *pWindow )
case AccessibleRole::FRAME:
role = ATK_ROLE_FRAME;
break;
-
+
/* Ignore window objects for sub-menus, combo- and list boxes,
* which are exposed as children of their parents.
*/
@@ -80,13 +80,13 @@ init_from_window( AtkObject *accessible, Window *pWindow )
{
USHORT type = WINDOW_WINDOW;
bool parentIsMenuFloatingWindow = false;
-
+
Window *pParent = pWindow->GetParent();
if( pParent ) {
type = pParent->GetType();
parentIsMenuFloatingWindow = ( TRUE == pParent->IsMenuFloatingWindow() );
}
-
+
if( (WINDOW_LISTBOX != type) && (WINDOW_COMBOBOX != type) &&
(WINDOW_MENUBARWINDOW != type) && ! parentIsMenuFloatingWindow )
{
@@ -94,7 +94,7 @@ init_from_window( AtkObject *accessible, Window *pWindow )
}
}
break;
-
+
default:
{
Window *pChild = pWindow->GetChild( 0 );
@@ -124,10 +124,10 @@ init_from_window( AtkObject *accessible, Window *pWindow )
accessible->role = role;
}
-
-/*****************************************************************************/
-
-static gint
+
+/*****************************************************************************/
+
+static gint
ooo_window_wrapper_clear_focus(gpointer)
{
atk_focus_tracker_notify( NULL );
@@ -136,7 +136,7 @@ ooo_window_wrapper_clear_focus(gpointer)
/*****************************************************************************/
-static gboolean
+static gboolean
ooo_window_wrapper_real_focus_gtk (GtkWidget *, GdkEventFocus *)
{
g_idle_add( ooo_window_wrapper_clear_focus, NULL );
@@ -190,7 +190,7 @@ ooo_window_wrapper_real_initialize(AtkObject *obj, gpointer data)
if( pWindow )
{
init_from_window( obj, pWindow );
-
+
Reference< XAccessible > xAccessible( pWindow->GetAccessible(true) );
/* We need the wrapper object for the top-level XAccessible to be
@@ -220,11 +220,11 @@ ooo_window_wrapper_real_initialize(AtkObject *obj, gpointer data)
}
}
}
-
+
g_signal_connect_after( GTK_WIDGET( data ), "focus-out-event",
G_CALLBACK (ooo_window_wrapper_real_focus_gtk),
NULL);
-
+
if( obj->role == ATK_ROLE_TOOL_TIP )
{
g_signal_connect_after( GTK_WIDGET( data ), "map-event",
@@ -253,18 +253,18 @@ ooo_window_wrapper_class_init (AtkObjectClass *klass, gpointer)
AtkObjectClass *atk_class;
GObjectClass *gobject_class;
gpointer data;
-
- /*
+
+ /*
* Patch the gobject vtable of GailWindow to refer to our instance of
* "initialize".
*/
-
+
data = g_type_class_peek_parent( klass );
atk_class = ATK_OBJECT_CLASS (data);
-
+
window_real_initialize = atk_class->initialize;
atk_class->initialize = ooo_window_wrapper_real_initialize;
-
+
gobject_class = G_OBJECT_CLASS (data);
window_real_finalize = gobject_class->finalize;
@@ -275,7 +275,7 @@ ooo_window_wrapper_class_init (AtkObjectClass *klass, gpointer)
/*****************************************************************************/
-GType
+GType
ooo_window_wrapper_get_type (void)
{
static GType type = 0;
@@ -283,16 +283,16 @@ ooo_window_wrapper_get_type (void)
if (!type)
{
GType parent_type = g_type_from_name( "GailWindow" );
-
+
if( ! parent_type )
{
g_warning( "Unknown type: GailWindow" );
parent_type = ATK_TYPE_OBJECT;
}
-
+
GTypeQuery type_query;
g_type_query( parent_type, &type_query );
-
+
static const GTypeInfo typeInfo =
{
type_query.class_size,
@@ -306,10 +306,10 @@ ooo_window_wrapper_get_type (void)
(GInstanceInitFunc) NULL,
NULL
} ;
-
+
type = g_type_register_static (parent_type, "OOoWindowAtkObject", &typeInfo, (GTypeFlags)0) ;
}
-
+
return type;
}
@@ -319,13 +319,13 @@ void restore_gail_window_vtable (void)
gpointer data;
GType type = g_type_from_name( "GailWindow" );
-
+
if( type == G_TYPE_INVALID )
return;
-
+
data = g_type_class_peek( type );
atk_class = ATK_OBJECT_CLASS (data);
-
+
atk_class->initialize = window_real_initialize;
}
diff --git a/vcl/unx/gtk/a11y/atkwindow.hxx b/vcl/unx/gtk/a11y/atkwindow.hxx
index 6a9862256999..4981cf09adec 100644
--- a/vcl/unx/gtk/a11y/atkwindow.hxx
+++ b/vcl/unx/gtk/a11y/atkwindow.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,7 @@
************************************************************************/
#ifndef __ATK_WINDOW_HXX__
-#define __ATK_WINDOW_HXX__
+#define __ATK_WINDOW_HXX__
#include <atk/atk.h>
diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx
index 4252c0404833..2ce5afd73a27 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -70,7 +70,7 @@ struct _AtkObjectWrapper
::com::sun::star::accessibility::XAccessibleTextMarkup *mpTextMarkup;
::com::sun::star::accessibility::XAccessibleTextAttributes *mpTextAttributes;
::com::sun::star::accessibility::XAccessibleValue *mpValue;
-
+
AtkObject *child_about_to_be_removed;
gint index_of_child_about_to_be_removed;
// ::rtl::OString * m_pKeyBindings
@@ -85,7 +85,7 @@ GType atk_object_wrapper_get_type (void) G_GNUC_CONST;
AtkObject * atk_object_wrapper_ref(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
bool create = true );
-
+
AtkObject * atk_object_wrapper_new(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
AtkObject* parent = NULL );
@@ -120,6 +120,6 @@ OUStringToGChar(const rtl::OUString& rString )
return g_strdup( aUtf8 );
}
-#define OUStringToConstGChar( string ) rtl::OUStringToOString( string, RTL_TEXTENCODING_UTF8 ).getStr()
+#define OUStringToConstGChar( string ) rtl::OUStringToOString( string, RTL_TEXTENCODING_UTF8 ).getStr()
#endif /* __ATK_WRAPPER_HXX__ */
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 2679f4a29c02..4743aa972dc9 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -242,7 +242,7 @@ void GtkSalDisplay::initScreen( int nScreen ) const
ScreenData& rSD = const_cast<ScreenData&>(m_aScreens[nScreen]);
if( rSD.m_bInit )
return;
-
+
// choose visual for screen
SalDisplay::initScreen( nScreen );
// now set a gdk default colormap matching the chosen visual to the screen
@@ -486,7 +486,7 @@ class GtkXLib : public SalXLib
GtkSalDisplay *m_pGtkSalDisplay;
std::list<GSource *> m_aSources;
GSource *m_pTimeout;
- GSource *m_pUserEvent;
+ GSource *m_pUserEvent;
oslMutex m_aDispatchMutex;
oslCondition m_aDispatchCondition;
@@ -500,9 +500,9 @@ public:
virtual void Init();
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual void Insert( int fd, void* data,
- YieldFunc pending,
- YieldFunc queued,
- YieldFunc handle );
+ YieldFunc pending,
+ YieldFunc queued,
+ YieldFunc handle );
virtual void Remove( int fd );
virtual void StartTimer( ULONG nMS );
@@ -592,7 +592,7 @@ void GtkXLib::Init()
rtl::OString aPrgName = rtl::OUStringToOString(aAppName, aEnc);
g_set_prgname(aPrgName);
}
-
+
// init gtk/gdk
gtk_init_check( &nParams, &pCmdLineAry );
@@ -650,7 +650,7 @@ void GtkXLib::Init()
m_pGtkSalDisplay->SetKbdExtension( pKbdExtension );
g_signal_connect( G_OBJECT(gdk_keymap_get_default()), "keys_changed", G_CALLBACK(signalKeysChanged), m_pGtkSalDisplay );
-
+
// add signal handler to notify screen size changes
int nScreens = gdk_display_get_n_screens( pGdkDisp );
for( int n = 0; n < nScreens; n++ )
@@ -714,7 +714,7 @@ void GtkXLib::StartTimer( ULONG nMS )
g_source_set_callback (m_pTimeout, call_timeoutFn,
(gpointer) this, NULL);
g_source_attach (m_pTimeout, g_main_context_default ());
-
+
SalXLib::StartTimer( nMS );
}
@@ -795,7 +795,7 @@ void GtkXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
* another thread in in there. Having only one yieldin thread actually dispatch
* fits the vcl event model (see e.g. the generic plugin).
*/
-
+
bool bDispatchThread = false;
gboolean wasEvent = FALSE;
{
@@ -806,7 +806,7 @@ void GtkXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
else if( ! bWait )
return; // someone else is waiting already, return
-
+
if( bDispatchThread )
{
int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 68617c8c16be..970c63916b13 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -95,7 +95,7 @@ void GtkHookedYieldMutex::release()
SalYieldMutex::release();
}
-extern "C"
+extern "C"
{
#define GET_YIELD_MUTEX() static_cast<GtkHookedYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())
static void GdkThreadsEnter( void )
@@ -160,7 +160,7 @@ extern "C"
pYieldMutex = new GtkHookedYieldMutex();
else
pYieldMutex = new GtkYieldMutex();
-
+
gdk_threads_init();
GtkInstance* pInstance = new GtkInstance( pYieldMutex );
@@ -204,7 +204,7 @@ SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWind
// so we need the X11SalObject in that case
if( pWindowData )
return X11SalObject::CreateObject( pParent, pWindowData, bShow );
-
+
return new GtkSalObject( static_cast<GtkSalFrame*>(pParent), bShow );
}
@@ -223,8 +223,8 @@ void GtkInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
#else
static getDefaultFnc sym_gtk_recent_manager_get_default =
(getDefaultFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_get_default" );
-
- static addItemFnc sym_gtk_recent_manager_add_item =
+
+ static addItemFnc sym_gtk_recent_manager_add_item =
(addItemFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_add_item");
if (sym_gtk_recent_manager_get_default && sym_gtk_recent_manager_add_item)
{
@@ -252,7 +252,7 @@ void GtkYieldMutex::acquire()
return;
}
OMutex::release();
-
+
// obtain gdk mutex
gdk_threads_enter();
@@ -306,13 +306,13 @@ sal_Bool GtkYieldMutex::tryToAcquire()
// how to we do a try_lock without having a gdk_threads_try_enter ?
if( ! g_mutex_trylock( gdk_threads_mutex ) )
return sal_False;
-
+
// obtained gdk mutex, now lock count is one by definition
OMutex::acquire();
mnCount = 1;
mnThreadId = aCurrentThread;
OMutex::release();
-
+
return sal_True;
}
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 272af20d0886..c928b6f6d025 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9d3ce6b137cd..5ca3223f67ff 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,23 +68,23 @@ class NWPixmapCacheList;
class NWPixmapCache;
struct NWFWidgetData
{
- GtkWidget * gCacheWindow;
- GtkWidget * gDumbContainer;
-
- GtkWidget * gBtnWidget;
- GtkWidget * gRadioWidget;
- GtkWidget * gRadioWidgetSibling;
- GtkWidget * gCheckWidget;
- GtkWidget * gScrollHorizWidget;
- GtkWidget * gScrollVertWidget;
- GtkWidget * gArrowWidget;
- GtkWidget * gDropdownWidget;
- GtkWidget * gEditBoxWidget;
- GtkWidget * gSpinButtonWidget;
- GtkWidget * gNotebookWidget;
- GtkWidget * gOptionMenuWidget;
- GtkWidget * gComboWidget;
- GtkWidget * gScrolledWindowWidget;
+ GtkWidget * gCacheWindow;
+ GtkWidget * gDumbContainer;
+
+ GtkWidget * gBtnWidget;
+ GtkWidget * gRadioWidget;
+ GtkWidget * gRadioWidgetSibling;
+ GtkWidget * gCheckWidget;
+ GtkWidget * gScrollHorizWidget;
+ GtkWidget * gScrollVertWidget;
+ GtkWidget * gArrowWidget;
+ GtkWidget * gDropdownWidget;
+ GtkWidget * gEditBoxWidget;
+ GtkWidget * gSpinButtonWidget;
+ GtkWidget * gNotebookWidget;
+ GtkWidget * gOptionMenuWidget;
+ GtkWidget * gComboWidget;
+ GtkWidget * gScrolledWindowWidget;
GtkWidget * gToolbarWidget;
GtkWidget * gToolbarButtonWidget;
GtkWidget * gToolbarToggleWidget;
@@ -105,7 +105,7 @@ struct NWFWidgetData
NWPixmapCacheList* gNWPixmapCacheList;
NWPixmapCache* gCacheTabItems;
NWPixmapCache* gCacheTabPages;
-
+
NWFWidgetData() :
gCacheWindow( NULL ),
gDumbContainer( NULL ),
@@ -148,29 +148,29 @@ struct NWFWidgetData
// Keep a hash table of Widgets->default flags so that we can
// easily and quickly reset each to a default state before using
// them
-static std::hash_map<long, guint> gWidgetDefaultFlags;
+static std::hash_map<long, guint> gWidgetDefaultFlags;
static std::vector<NWFWidgetData> gWidgetData;
-static const GtkBorder aDefDefBorder = { 1, 1, 1, 1 };
+static const GtkBorder aDefDefBorder = { 1, 1, 1, 1 };
// Some GTK defaults
-#define MIN_ARROW_SIZE 11
-#define BTN_CHILD_SPACING 1
-#define MIN_SPIN_ARROW_WIDTH 6
-
-
-static void NWEnsureGTKRadio ( int nScreen );
-static void NWEnsureGTKButton ( int nScreen );
-static void NWEnsureGTKCheck ( int nScreen );
-static void NWEnsureGTKScrollbars ( int nScreen );
-static void NWEnsureGTKArrow ( int nScreen );
-static void NWEnsureGTKEditBox ( int nScreen );
-static void NWEnsureGTKSpinButton ( int nScreen );
-static void NWEnsureGTKNotebook ( int nScreen );
-static void NWEnsureGTKOptionMenu ( int nScreen );
-static void NWEnsureGTKCombo ( int nScreen );
-static void NWEnsureGTKScrolledWindow ( int nScreen );
-static void NWEnsureGTKToolbar ( int nScreen );
+#define MIN_ARROW_SIZE 11
+#define BTN_CHILD_SPACING 1
+#define MIN_SPIN_ARROW_WIDTH 6
+
+
+static void NWEnsureGTKRadio ( int nScreen );
+static void NWEnsureGTKButton ( int nScreen );
+static void NWEnsureGTKCheck ( int nScreen );
+static void NWEnsureGTKScrollbars ( int nScreen );
+static void NWEnsureGTKArrow ( int nScreen );
+static void NWEnsureGTKEditBox ( int nScreen );
+static void NWEnsureGTKSpinButton ( int nScreen );
+static void NWEnsureGTKNotebook ( int nScreen );
+static void NWEnsureGTKOptionMenu ( int nScreen );
+static void NWEnsureGTKCombo ( int nScreen );
+static void NWEnsureGTKScrolledWindow ( int nScreen );
+static void NWEnsureGTKToolbar ( int nScreen );
static void NWEnsureGTKMenubar ( int nScreen );
static void NWEnsureGTKMenu ( int nScreen );
static void NWEnsureGTKTooltip ( int nScreen );
@@ -197,7 +197,7 @@ static Rectangle NWGetButtonArea( int nScreen, ControlType nType, ControlPart nP
static Rectangle NWGetEditBoxPixmapRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
-static void NWPaintOneEditBox( int nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect,
+static void NWPaintOneEditBox( int nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect,
ControlType nType, ControlPart nPart, Rectangle aEditBoxRect,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
@@ -229,9 +229,9 @@ static Rectangle NWGetToolbarRect( int nScreen,
const OUString& rCaption );
//---
-static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect );
+static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect );
//---
-
+
/*********************************************************
* PixmapCache
*********************************************************/
@@ -248,7 +248,7 @@ public:
ControlState m_nState;
Rectangle m_pixmapRect;
GdkPixmap* m_pixmap;
-
+
NWPixmapCacheData() : m_nType(0), m_nState(0), m_pixmap(0) {}
~NWPixmapCacheData()
{ SetPixmap( NULL ); };
@@ -264,15 +264,15 @@ class NWPixmapCache
public:
NWPixmapCache( int nScreen );
~NWPixmapCache();
-
+
void SetSize( int n)
{ delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; }
int GetSize() { return m_size; }
-
+
BOOL Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap );
void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap );
-
- void ThemeChanged();
+
+ void ThemeChanged();
};
class NWPixmapCacheList
@@ -291,9 +291,9 @@ void NWPixmapCacheData::SetPixmap( GdkPixmap* pPixmap )
{
if( m_pixmap )
g_object_unref( m_pixmap );
-
+
m_pixmap = pPixmap;
-
+
if( m_pixmap )
g_object_ref( m_pixmap );
}
@@ -307,7 +307,7 @@ NWPixmapCache::NWPixmapCache( int nScreen )
pData = NULL;
if( gWidgetData[m_screen].gNWPixmapCacheList )
gWidgetData[m_screen].gNWPixmapCacheList->AddCache(this);
-}
+}
NWPixmapCache::~NWPixmapCache()
{
if( gWidgetData[m_screen].gNWPixmapCacheList )
@@ -329,9 +329,9 @@ BOOL NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang
for(i=0; i<m_size; i++)
{
if( pData[i].m_nType == aType &&
- pData[i].m_nState == aState &&
- pData[i].m_pixmapRect.GetWidth() == r_pixmapRect.GetWidth() &&
- pData[i].m_pixmapRect.GetHeight() == r_pixmapRect.GetHeight() &&
+ pData[i].m_nState == aState &&
+ pData[i].m_pixmapRect.GetWidth() == r_pixmapRect.GetWidth() &&
+ pData[i].m_pixmapRect.GetHeight() == r_pixmapRect.GetHeight() &&
pData[i].m_pixmap != NULL )
{
*pPixmap = pData[i].m_pixmap;
@@ -344,7 +344,7 @@ BOOL NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang
void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap )
{
if( !(aState & CTRL_CACHING_ALLOWED) )
- return;
+ return;
aState &= ~CTRL_CACHING_ALLOWED; // mask clipping flag
m_idx = (m_idx+1) % m_size; // just wrap
@@ -382,15 +382,15 @@ void NWPixmapCacheList::ThemeChanged( )
*********************************************************/
inline void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pSrc )
{
- aDst.left = pSrc->left;
- aDst.top = pSrc->top;
- aDst.right = pSrc->right;
- aDst.bottom = pSrc->bottom;
+ aDst.left = pSrc->left;
+ aDst.top = pSrc->top;
+ aDst.right = pSrc->right;
+ aDst.bottom = pSrc->bottom;
}
/*********************************************************
- * Initialize GTK and local stuff
+ * Initialize GTK and local stuff
*********************************************************/
void GtkData::initNWF( void )
{
@@ -401,22 +401,22 @@ void GtkData::initNWF( void )
// draw separate buttons for toolbox dropdown items
pSVData->maNWFData.mbToolboxDropDownSeparate = true;
-
+
// small extra border around menu items
pSVData->maNWFData.mnMenuFormatExtraBorder = 1;
-
+
// draw toolbars in separate lines
pSVData->maNWFData.mbDockingAreaSeparateTB = true;
-
+
// open first menu on F10
pSVData->maNWFData.mbOpenMenuOnF10 = true;
-
+
int nScreens = GetX11SalData()->GetDisplay()->GetScreenCount();
gWidgetData = std::vector<NWFWidgetData>( nScreens );
for( int i = 0; i < nScreens; i++ )
gWidgetData[i].gNWPixmapCacheList = new NWPixmapCacheList;
-
+
if( SalGetDesktopEnvironment().equalsAscii( "KDE" ) )
{
// #i97196# ensure a widget exists and the style engine was loaded
@@ -441,7 +441,7 @@ void GtkData::initNWF( void )
/*********************************************************
- * Release GTK and local stuff
+ * Release GTK and local stuff
*********************************************************/
void GtkData::deInitNWF( void )
{
@@ -536,40 +536,40 @@ void GtkSalGraphics::copyBits( const SalTwoRect* pPosAry,
BOOL GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
if (
- ((nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL)) ||
- ((nType==CTRL_RADIOBUTTON) && (nPart==PART_ENTIRE_CONTROL)) ||
- ((nType==CTRL_CHECKBOX) && (nPart==PART_ENTIRE_CONTROL)) ||
+ ((nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL)) ||
+ ((nType==CTRL_RADIOBUTTON) && (nPart==PART_ENTIRE_CONTROL)) ||
+ ((nType==CTRL_CHECKBOX) && (nPart==PART_ENTIRE_CONTROL)) ||
((nType==CTRL_SCROLLBAR) &&
( (nPart==PART_DRAW_BACKGROUND_HORZ)
|| (nPart==PART_DRAW_BACKGROUND_VERT)
|| (nPart==PART_ENTIRE_CONTROL)
- || (nPart==HAS_THREE_BUTTONS) ) ) ||
+ || (nPart==HAS_THREE_BUTTONS) ) ) ||
((nType==CTRL_EDITBOX) &&
( (nPart==PART_ENTIRE_CONTROL)
- || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
+ || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
((nType==CTRL_MULTILINE_EDITBOX) &&
( (nPart==PART_ENTIRE_CONTROL)
- || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
+ || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
((nType==CTRL_SPINBOX) &&
( (nPart==PART_ENTIRE_CONTROL)
|| (nPart==PART_ALL_BUTTONS)
- || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
+ || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
((nType==CTRL_SPINBUTTONS) &&
( (nPart==PART_ENTIRE_CONTROL)
- || (nPart==PART_ALL_BUTTONS) ) ) ||
+ || (nPart==PART_ALL_BUTTONS) ) ) ||
((nType==CTRL_COMBOBOX) &&
( (nPart==PART_ENTIRE_CONTROL)
- || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
+ || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
(((nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) ||
(nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER)) &&
( (nPart==PART_ENTIRE_CONTROL)
- || (nPart==PART_TABS_DRAW_RTL) ) ) ||
+ || (nPart==PART_TABS_DRAW_RTL) ) ) ||
((nType==CTRL_LISTBOX) &&
( (nPart==PART_ENTIRE_CONTROL)
|| (nPart==PART_WINDOW)
- || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
+ || (nPart==HAS_BACKGROUND_TEXTURE) ) ) ||
((nType == CTRL_TOOLBAR) &&
- ( (nPart==PART_ENTIRE_CONTROL)
+ ( (nPart==PART_ENTIRE_CONTROL)
|| (nPart==PART_DRAW_BACKGROUND_HORZ)
|| (nPart==PART_DRAW_BACKGROUND_VERT)
|| (nPart==PART_THUMB_HORZ)
@@ -615,11 +615,11 @@ BOOL GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
*
* returns whether bIsInside was really set.
*/
-BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
- ControlPart nPart,
- const Rectangle& rControlRegion,
- const Point& aPos,
- BOOL& rIsInside )
+BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
+ ControlPart nPart,
+ const Rectangle& rControlRegion,
+ const Point& aPos,
+ BOOL& rIsInside )
{
if ( ( nType == CTRL_SCROLLBAR ) &&
( ( nPart == PART_BUTTON_UP ) ||
@@ -634,7 +634,7 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
gboolean has_forward2;
gboolean has_backward;
gboolean has_backward2;
-
+
gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
"has-secondary-forward-stepper", &has_forward2,
"has-backward-stepper", &has_backward,
@@ -721,11 +721,11 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
*
* Draws the requested control described by nPart/nState.
*
- * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
- * aValue: An optional value (tristate/numerical/string)
- * rCaption: A caption or title string (like button text etc)
+ * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
+ * aValue: An optional value (tristate/numerical/string)
+ * rCaption: A caption or title string (like button text etc)
*/
-BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
+BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -738,11 +738,11 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
return drawNativeMixedStateCheck( nType, nPart, rControlRegion, nState, aValue, rCaption );
}
- BOOL returnVal = FALSE;
+ BOOL returnVal = FALSE;
// get a GC with current clipping region set
SelectFont();
-
-
+
+
// theme changed ?
if( GtkSalGraphics::bThemeChanged )
{
@@ -750,15 +750,15 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
for( unsigned int i = 0; i < gWidgetData.size(); i++ )
if( gWidgetData[i].gNWPixmapCacheList )
gWidgetData[i].gNWPixmapCacheList->ThemeChanged();
- GtkSalGraphics::bThemeChanged = FALSE;
+ GtkSalGraphics::bThemeChanged = FALSE;
}
-
+
Rectangle aCtrlRect( rControlRegion );
Region aClipRegion( m_aClipRegion );
if( aClipRegion.IsNull() )
aClipRegion = aCtrlRect;
-
- clipList aClip;
+
+ clipList aClip;
GdkDrawable* gdkDrawable = GDK_DRAWABLE( GetGdkWindow() );
GdkPixmap* pixmap = NULL;
Rectangle aPixmapRect;
@@ -769,7 +769,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
&& nType != CTRL_TAB_PANE
&& nType != CTRL_PROGRESS
&& ! (bToolbarGripWorkaround && nType == CTRL_TOOLBAR && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
- )
+ )
{
// make pixmap a little larger since some themes draw decoration
// outside the rectangle, see e.g. checkbox
@@ -795,7 +795,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
}
aClipRegion.EndEnumRects( aHdl );
}
-
+
if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) )
{
returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
@@ -885,7 +885,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
{
returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
-
+
if( pixmap )
{
returnVal = NWRenderPixmapToScreen( pixmap, aPixmapRect ) && returnVal;
@@ -895,7 +895,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
return( returnVal );
}
-BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
+BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -907,7 +907,7 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
// do this via pixmap since some themes don't care for regions
bool bOldNeedPixmapPaint = bNeedPixmapPaint;
bNeedPixmapPaint = true;
-
+
Rectangle aCtrlRect = rControlRegion;
BOOL returnVal = FALSE;
SelectFont();
@@ -921,9 +921,9 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
XUnionRectWithRegion( &aXRect, aRegion, aRegion );
SetClipRegion( pFontGC_, aRegion );
XDestroyRegion( aRegion );
-
+
returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
-
+
if( returnVal )
{
// draw lower half in on state
@@ -935,7 +935,7 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
XDestroyRegion( aRegion );
returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
}
-
+
// clean up
bNeedPixmapPaint = bOldNeedPixmapPaint;
const_cast<ImplControlValue&>(aValue).setTristateVal( BUTTONVALUE_MIXED );
@@ -950,11 +950,11 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
* OPTIONAL. Draws the requested text for the control described by nPart/nState.
* Used if text not drawn by DrawNativeControl().
*
- * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
- * aValue: An optional value (tristate/numerical/string)
- * rCaption: A caption or title string (like button text etc)
+ * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
+ * aValue: An optional value (tristate/numerical/string)
+ * rCaption: A caption or title string (like button text etc)
*/
-BOOL GtkSalGraphics::drawNativeControlText( ControlType,
+BOOL GtkSalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -974,9 +974,9 @@ BOOL GtkSalGraphics::drawNativeControlText( ControlType,
* within the control that can be safely drawn into without drawing over
* the borders of the control.
*
- * rControlRegion: The bounding region of the control in VCL frame coordinates.
- * aValue: An optional value (tristate/numerical/string)
- * rCaption: A caption or title string (like button text etc)
+ * rControlRegion: The bounding region of the control in VCL frame coordinates.
+ * aValue: An optional value (tristate/numerical/string)
+ * rCaption: A caption or title string (like button text etc)
*/
BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
@@ -996,7 +996,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeBoundingRegion = NWGetButtonArea( m_nScreen, nType, nPart, rControlRegion,
nState, aValue, rCaption );
rNativeContentRegion = rControlRegion;
-
+
returnVal = TRUE;
}
if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
@@ -1004,16 +1004,16 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
-
+
returnVal = TRUE;
}
if ( (nType==CTRL_SPINBOX) && ((nPart==PART_BUTTON_UP) || (nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
{
-
+
rNativeBoundingRegion = NWGetSpinButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
-
+
returnVal = TRUE;
}
if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
@@ -1021,13 +1021,13 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeBoundingRegion = NWGetListBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
-
+
returnVal = TRUE;
}
if ( (nType==CTRL_TOOLBAR) &&
- ((nPart==PART_DRAW_BACKGROUND_HORZ) ||
- (nPart==PART_DRAW_BACKGROUND_VERT) ||
- (nPart==PART_THUMB_HORZ) ||
+ ((nPart==PART_DRAW_BACKGROUND_HORZ) ||
+ (nPart==PART_DRAW_BACKGROUND_VERT) ||
+ (nPart==PART_THUMB_HORZ) ||
(nPart==PART_THUMB_VERT) ||
(nPart==PART_BUTTON)
))
@@ -1041,7 +1041,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
{
rNativeBoundingRegion = NWGetScrollButtonRect( m_nScreen, nPart, rControlRegion );
rNativeContentRegion = rNativeBoundingRegion;
-
+
returnVal = TRUE;
}
if( (nType == CTRL_MENUBAR) && (nPart == PART_ENTIRE_CONTROL) )
@@ -1132,7 +1132,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeBoundingRegion = rNativeContentRegion = aRect;
returnVal = TRUE;
}
-
+
return( returnVal );
}
@@ -1143,22 +1143,22 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
BOOL GtkSalGraphics::NWPaintGTKButton(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
+ const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
const OUString& )
{
- GtkStateType stateType;
- GtkShadowType shadowType;
- gboolean interiorFocus;
- gint focusWidth;
- gint focusPad;
- BOOL bDrawFocus = TRUE;
- gint x, y, w, h;
- GtkBorder aDefBorder;
- GtkBorder* pBorder;
- GdkRectangle clipRect;
-
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ gboolean interiorFocus;
+ gint focusWidth;
+ gint focusPad;
+ BOOL bDrawFocus = TRUE;
+ gint x, y, w, h;
+ GtkBorder aDefBorder;
+ GtkBorder* pBorder;
+ GdkRectangle clipRect;
+
NWEnsureGTKButton( m_nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
@@ -1168,10 +1168,10 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
h = rControlRectangle.GetHeight();
// Grab some button style attributes
- gtk_widget_style_get( gWidgetData[m_nScreen].gBtnWidget, "focus-line-width", &focusWidth,
- "focus-padding", &focusPad,
- "interior_focus", &interiorFocus,
- "default_border", &pBorder,
+ gtk_widget_style_get( gWidgetData[m_nScreen].gBtnWidget, "focus-line-width", &focusWidth,
+ "focus-padding", &focusPad,
+ "interior_focus", &interiorFocus,
+ "default_border", &pBorder,
(char *)NULL );
// Make sure the border values exist, otherwise use some defaults
@@ -1211,17 +1211,17 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
// Buttons must paint opaque since some themes have alpha-channel enabled buttons
- gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+ gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&clipRect, m_pWindow, "base", x, y, w, h );
-
+
if ( (nState & CTRL_STATE_DEFAULT) && (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief == GTK_RELIEF_NORMAL) )
{
- gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
+ gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
&clipRect, gWidgetData[m_nScreen].gBtnWidget, "buttondefault", x, y, w, h );
}
-
+
if ( (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief != GTK_RELIEF_NONE)
|| (nState & CTRL_STATE_PRESSED)
|| (nState & CTRL_STATE_ROLLOVER) )
@@ -1261,21 +1261,21 @@ static Rectangle NWGetButtonArea( int nScreen,
ControlType, ControlPart, Rectangle aAreaRect, ControlState nState,
const ImplControlValue&, const OUString& )
{
- gboolean interiorFocus;
- gint focusWidth;
- gint focusPad;
- GtkBorder aDefBorder;
- GtkBorder * pBorder;
- BOOL bDrawFocus = TRUE;
- Rectangle aRect;
- gint x, y, w, h;
+ gboolean interiorFocus;
+ gint focusWidth;
+ gint focusPad;
+ GtkBorder aDefBorder;
+ GtkBorder * pBorder;
+ BOOL bDrawFocus = TRUE;
+ Rectangle aRect;
+ gint x, y, w, h;
NWEnsureGTKButton( nScreen );
gtk_widget_style_get( gWidgetData[nScreen].gBtnWidget,
- "focus-line-width", &focusWidth,
- "focus-padding", &focusPad,
- "interior_focus", &interiorFocus,
- "default_border", &pBorder,
+ "focus-line-width", &focusWidth,
+ "focus-padding", &focusPad,
+ "interior_focus", &interiorFocus,
+ "default_border", &pBorder,
(char *)NULL );
// Make sure the border values exist, otherwise use some defaults
@@ -1314,16 +1314,16 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& )
{
- GtkStateType stateType;
- GtkShadowType shadowType;
- BOOL isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ BOOL isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
gint x, y;
- GdkRectangle clipRect;
-
+ GdkRectangle clipRect;
+
NWEnsureGTKButton( m_nScreen );
NWEnsureGTKRadio( m_nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
@@ -1333,7 +1333,7 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
x = rControlRectangle.Left() + (rControlRectangle.GetWidth()-indicator_size)/2;
y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
-
+
// Set the shadow based on if checked or not so we get a freakin checkmark.
shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
NWSetWidgetState( gWidgetData[m_nScreen].gRadioWidget, nState, stateType );
@@ -1341,7 +1341,7 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
// GTK enforces radio groups, so that if we don't have 2 buttons in the group,
// the single button will always be active. So we have to have 2 buttons.
-
+
// #i59666# set the members directly where we should use
// gtk_toggle_button_set_active. reason: there are animated themes
// which are in active state only after a while leading to painting
@@ -1357,12 +1357,12 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
- gtk_paint_option( gWidgetData[m_nScreen].gRadioWidget->style, gdkDrawable, stateType, shadowType,
+
+ gtk_paint_option( gWidgetData[m_nScreen].gRadioWidget->style, gdkDrawable, stateType, shadowType,
&clipRect, gWidgetData[m_nScreen].gRadioWidget, "radiobutton",
x, y, indicator_size, indicator_size );
}
-
+
return( TRUE );
}
@@ -1372,15 +1372,15 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& )
{
- GtkStateType stateType;
- GtkShadowType shadowType;
- BOOL isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON) ? TRUE : FALSE;
- GdkRectangle clipRect;
- gint x,y;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ BOOL isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON) ? TRUE : FALSE;
+ GdkRectangle clipRect;
+ gint x,y;
NWEnsureGTKButton( m_nScreen );
NWEnsureGTKCheck( m_nScreen );
@@ -1391,7 +1391,7 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
x = rControlRectangle.Left() + (rControlRectangle.GetWidth()-indicator_size)/2;
y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
-
+
// Set the shadow based on if checked or not so we get a checkmark.
shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
NWSetWidgetState( gWidgetData[m_nScreen].gCheckWidget, nState, stateType );
@@ -1403,8 +1403,8 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
- gtk_paint_check( gWidgetData[m_nScreen].gCheckWidget->style, gdkDrawable, stateType, shadowType,
+
+ gtk_paint_check( gWidgetData[m_nScreen].gCheckWidget->style, gdkDrawable, stateType, shadowType,
&clipRect, gWidgetData[m_nScreen].gCheckWidget, "checkbutton",
x, y, indicator_size, indicator_size );
}
@@ -1428,40 +1428,40 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList&,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& )
{
OSL_ASSERT( aValue.getType() == CTRL_SCROLLBAR );
const ScrollbarValue* pScrollbarVal = static_cast<const ScrollbarValue *>(&aValue);
GdkPixmap* pixmap = NULL;
- Rectangle pixmapRect, scrollbarRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
- GtkScrollbar * scrollbarWidget;
- GtkStyle * style;
+ Rectangle pixmapRect, scrollbarRect;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ GtkScrollbar * scrollbarWidget;
+ GtkStyle * style;
GtkAdjustment* scrollbarValues = NULL;
- GtkOrientation scrollbarOrientation;
- Rectangle thumbRect = pScrollbarVal->maThumbRect;
- Rectangle button11BoundRect = pScrollbarVal->maButton1Rect; // backward
- Rectangle button22BoundRect = pScrollbarVal->maButton2Rect; // forward
- Rectangle button12BoundRect = pScrollbarVal->maButton1Rect; // secondary forward
- Rectangle button21BoundRect = pScrollbarVal->maButton2Rect; // secondary backward
- GtkArrowType button1Type; // backward
- GtkArrowType button2Type; // forward
- gchar * scrollbarTagH = (gchar *) "hscrollbar";
- gchar * scrollbarTagV = (gchar *) "vscrollbar";
- gchar * scrollbarTag = NULL;
- Rectangle arrowRect;
- gint slider_width = 0;
- gint stepper_size = 0;
- gint stepper_spacing = 0;
- gint trough_border = 0;
- gint min_slider_length = 0;
- gint vShim = 0;
- gint hShim = 0;
- gint x,y,w,h;
-
+ GtkOrientation scrollbarOrientation;
+ Rectangle thumbRect = pScrollbarVal->maThumbRect;
+ Rectangle button11BoundRect = pScrollbarVal->maButton1Rect; // backward
+ Rectangle button22BoundRect = pScrollbarVal->maButton2Rect; // forward
+ Rectangle button12BoundRect = pScrollbarVal->maButton1Rect; // secondary forward
+ Rectangle button21BoundRect = pScrollbarVal->maButton2Rect; // secondary backward
+ GtkArrowType button1Type; // backward
+ GtkArrowType button2Type; // forward
+ gchar * scrollbarTagH = (gchar *) "hscrollbar";
+ gchar * scrollbarTagV = (gchar *) "vscrollbar";
+ gchar * scrollbarTag = NULL;
+ Rectangle arrowRect;
+ gint slider_width = 0;
+ gint stepper_size = 0;
+ gint stepper_spacing = 0;
+ gint trough_border = 0;
+ gint min_slider_length = 0;
+ gint vShim = 0;
+ gint hShim = 0;
+ gint x,y,w,h;
+
// make controlvalue rectangles relative to area
thumbRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() );
button11BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() );
@@ -1472,7 +1472,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
NWEnsureGTKButton( m_nScreen );
NWEnsureGTKScrollbars( m_nScreen );
NWEnsureGTKArrow( m_nScreen );
-
+
// Find the overall bounding rect of the control
pixmapRect = rControlRectangle;
pixmapRect.SetSize( Size( pixmapRect.GetWidth() + 1,
@@ -1493,7 +1493,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
gboolean has_forward2;
gboolean has_backward;
gboolean has_backward2;
-
+
gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
"has-secondary-forward-stepper", &has_forward2,
"has-backward-stepper", &has_backward,
@@ -1626,19 +1626,19 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
scrollbarValues->page_size = scrollbarRect.GetHeight() / 2;
}
gtk_adjustment_changed( scrollbarValues );
-
+
// as multiple paints are required for the scrollbar
// painting them directly to the window flickers
pixmap = NWGetPixmapFromScreen( pixmapRect );
if( ! pixmap )
return FALSE;
x = y = 0;
-
+
w = pixmapRect.GetWidth();
- h = pixmapRect.GetHeight();
+ h = pixmapRect.GetHeight();
GdkDrawable* const &gdkDrawable = GDK_DRAWABLE( pixmap );
- GdkRectangle* gdkRect = NULL;
+ GdkRectangle* gdkRect = NULL;
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
@@ -1646,18 +1646,18 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
style = GTK_WIDGET( scrollbarWidget )->style;
// ----------------- TROUGH
- gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable,
+ gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable,
GTK_STATE_NORMAL, GTK_SHADOW_NONE, gdkRect,
- m_pWindow, "base", x, y,
+ m_pWindow, "base", x, y,
w, h );
- gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN,
+ gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN,
gdkRect, GTK_WIDGET(scrollbarWidget), "trough",
x, y,
scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
if ( nState & CTRL_STATE_FOCUSED )
{
- gtk_paint_focus( style, gdkDrawable, GTK_STATE_ACTIVE,
+ gtk_paint_focus( style, gdkDrawable, GTK_STATE_ACTIVE,
gdkRect, GTK_WIDGET(scrollbarWidget), "trough",
x, y,
scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
@@ -1668,71 +1668,71 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnThumbState, &stateType, &shadowType );
if ( pScrollbarVal->mnThumbState & CTRL_STATE_PRESSED ) stateType = GTK_STATE_PRELIGHT;
- gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT,
+ gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT,
gdkRect, GTK_WIDGET(scrollbarWidget), "slider",
- x+hShim+thumbRect.Left(), y+vShim+thumbRect.Top(),
+ x+hShim+thumbRect.Left(), y+vShim+thumbRect.Top(),
thumbRect.GetWidth(), thumbRect.GetHeight(), scrollbarOrientation );
}
// ----------------- BUTTON 1 //
if ( has_backward )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
- gtk_paint_box( style, gdkDrawable, stateType, shadowType,
+ if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ gtk_paint_box( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), "stepper",
- x+hShim+button11BoundRect.Left(), y+vShim+button11BoundRect.Top(),
+ x+hShim+button11BoundRect.Left(), y+vShim+button11BoundRect.Top(),
button11BoundRect.GetWidth(), button11BoundRect.GetHeight() );
// ----------------- ARROW 1
NWCalcArrowRect( button11BoundRect, arrowRect );
- gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
+ gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
- x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
+ x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
if ( has_forward2 )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
- gtk_paint_box( style, gdkDrawable, stateType, shadowType,
+ if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ gtk_paint_box( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), "stepper",
- x+hShim+button12BoundRect.Left(), y+vShim+button12BoundRect.Top(),
+ x+hShim+button12BoundRect.Left(), y+vShim+button12BoundRect.Top(),
button12BoundRect.GetWidth(), button12BoundRect.GetHeight() );
// ----------------- ARROW 1
NWCalcArrowRect( button12BoundRect, arrowRect );
- gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
+ gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
- x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
+ x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
// ----------------- BUTTON 2
if ( has_backward2 )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
- gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
+ if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
GTK_WIDGET(scrollbarWidget), "stepper",
- x+hShim+button21BoundRect.Left(), y+vShim+button21BoundRect.Top(),
+ x+hShim+button21BoundRect.Left(), y+vShim+button21BoundRect.Top(),
button21BoundRect.GetWidth(), button21BoundRect.GetHeight() );
// ----------------- ARROW 2
NWCalcArrowRect( button21BoundRect, arrowRect );
- gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
+ gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
- x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
+ x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
if ( has_forward )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
- gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
+ if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
GTK_WIDGET(scrollbarWidget), "stepper",
- x+hShim+button22BoundRect.Left(), y+vShim+button22BoundRect.Top(),
+ x+hShim+button22BoundRect.Left(), y+vShim+button22BoundRect.Top(),
button22BoundRect.GetWidth(), button22BoundRect.GetHeight() );
// ----------------- ARROW 2
NWCalcArrowRect( button22BoundRect, arrowRect );
- gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
+ gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
- x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
+ x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
@@ -1742,13 +1742,13 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
return( FALSE );
}
g_object_unref( pixmap );
-
+
return( TRUE );
}
//---
-static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect )
+static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect )
{
gint slider_width;
gint stepper_size;
@@ -1780,7 +1780,7 @@ static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangl
gint nFirst = 0;
gint nSecond = 0;
-
+
if ( has_forward ) nSecond += 1;
if ( has_forward2 ) nFirst += 1;
if ( has_backward ) nFirst += 1;
@@ -1796,7 +1796,7 @@ static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangl
buttonWidth = stepper_size + trough_border + stepper_spacing;
buttonHeight = slider_width + 2 * trough_border;
}
-
+
if ( nPart == PART_BUTTON_UP )
{
buttonHeight *= nFirst;
@@ -1835,13 +1835,13 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- Rectangle pixmapRect;
+ Rectangle pixmapRect;
GdkRectangle clipRect;
-
+
// Find the overall bounding rect of the buttons's drawing area,
// plus its actual draw rect excluding adornment
pixmapRect = NWGetEditBoxPixmapRect( m_nScreen, nType, nPart, rControlRectangle,
@@ -1852,7 +1852,7 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rCaption );
}
@@ -1872,16 +1872,16 @@ static Rectangle NWGetEditBoxPixmapRect(int nScreen,
const ImplControlValue&,
const OUString& )
{
- Rectangle pixmapRect = aAreaRect;
- gboolean interiorFocus;
- gint focusWidth;
+ Rectangle pixmapRect = aAreaRect;
+ gboolean interiorFocus;
+ gint focusWidth;
NWEnsureGTKEditBox( nScreen );
// Grab some entry style attributes
gtk_widget_style_get( gWidgetData[nScreen].gEditBoxWidget,
- "focus-line-width", &focusWidth,
- "interior-focus", &interiorFocus, (char *)NULL );
+ "focus-line-width", &focusWidth,
+ "interior-focus", &interiorFocus, (char *)NULL );
if ( !interiorFocus )
{
@@ -1898,18 +1898,18 @@ static Rectangle NWGetEditBoxPixmapRect(int nScreen,
* All coordinates should be local to the Pixmap, NOT
* screen/window coordinates.
*/
-static void NWPaintOneEditBox( int nScreen,
+static void NWPaintOneEditBox( int nScreen,
GdkDrawable * gdkDrawable,
- GdkRectangle * gdkRect,
- ControlType nType,
+ GdkRectangle * gdkRect,
+ ControlType nType,
ControlPart,
- Rectangle aEditBoxRect,
- ControlState nState,
+ Rectangle aEditBoxRect,
+ ControlState nState,
const ImplControlValue&,
const OUString& )
{
- GtkStateType stateType;
- GtkShadowType shadowType;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
GtkWidget *widget;
NWEnsureGTKButton( nScreen );
@@ -1922,7 +1922,7 @@ static void NWPaintOneEditBox( int nScreen,
/* border's shadowType for gtk entries is always GTK_SHADOW_IN (see gtkentry.c)
shadowType = GTK_SHADOW_IN;
*/
-
+
switch ( nType )
{
case CTRL_SPINBOX:
@@ -1954,13 +1954,13 @@ static void NWPaintOneEditBox( int nScreen,
}
NWSetWidgetState( widget, nState, stateType );
- gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
+ gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
gdkRect, pBGWidget, "entry_bg",
- aEditBoxRect.Left(), aEditBoxRect.Top(),
+ aEditBoxRect.Left(), aEditBoxRect.Top(),
aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
- gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
+ gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
gdkRect, widget, "entry",
- aEditBoxRect.Left(), aEditBoxRect.Top(),
+ aEditBoxRect.Left(), aEditBoxRect.Top(),
aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
}
@@ -1972,21 +1972,21 @@ static void NWPaintOneEditBox( int nScreen,
BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList&,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- GdkPixmap * pixmap;
- Rectangle pixmapRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
- const SpinbuttonValue * pSpinVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&aValue) : NULL;
- Rectangle upBtnRect;
- ControlPart upBtnPart = PART_BUTTON_UP;
- ControlState upBtnState = CTRL_STATE_ENABLED;
- Rectangle downBtnRect;
- ControlPart downBtnPart = PART_BUTTON_DOWN;
- ControlState downBtnState = CTRL_STATE_ENABLED;
+ GdkPixmap * pixmap;
+ Rectangle pixmapRect;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ const SpinbuttonValue * pSpinVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&aValue) : NULL;
+ Rectangle upBtnRect;
+ ControlPart upBtnPart = PART_BUTTON_UP;
+ ControlState upBtnState = CTRL_STATE_ENABLED;
+ Rectangle downBtnRect;
+ ControlPart downBtnPart = PART_BUTTON_DOWN;
+ ControlState downBtnState = CTRL_STATE_ENABLED;
NWEnsureGTKButton( m_nScreen );
NWEnsureGTKSpinButton( m_nScreen );
@@ -2041,7 +2041,7 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
if ( shadowType != GTK_SHADOW_NONE )
{
- Rectangle shadowRect( upBtnRect );
+ Rectangle shadowRect( upBtnRect );
shadowRect.Union( downBtnRect );
gtk_paint_box( gWidgetData[m_nScreen].gSpinButtonWidget->style, pixmap, GTK_STATE_NORMAL, shadowType, NULL,
@@ -2067,14 +2067,14 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
static Rectangle NWGetSpinButtonRect( int nScreen,
ControlType,
- ControlPart nPart,
- Rectangle aAreaRect,
+ ControlPart nPart,
+ Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- gint buttonSize;
- Rectangle buttonRect;
+ gint buttonSize;
+ Rectangle buttonRect;
NWEnsureGTKSpinButton( nScreen );
@@ -2108,19 +2108,19 @@ static Rectangle NWGetSpinButtonRect( int nScreen,
//---
static void NWPaintOneSpinButton( int nScreen,
- GdkPixmap* pixmap,
- ControlType nType,
- ControlPart nPart,
- Rectangle aAreaRect,
- ControlState nState,
- const ImplControlValue& aValue,
- const OUString& rCaption )
+ GdkPixmap* pixmap,
+ ControlType nType,
+ ControlPart nPart,
+ Rectangle aAreaRect,
+ ControlState nState,
+ const ImplControlValue& aValue,
+ const OUString& rCaption )
{
- Rectangle buttonRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
- Rectangle arrowRect;
- gint arrowSize;
+ Rectangle buttonRect;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ Rectangle arrowRect;
+ gint arrowSize;
NWEnsureGTKSpinButton( nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
@@ -2155,17 +2155,17 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- Rectangle pixmapRect;
- Rectangle buttonRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
- Rectangle arrowRect;
- gint x,y;
- GdkRectangle clipRect;
+ Rectangle pixmapRect;
+ Rectangle buttonRect;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ Rectangle arrowRect;
+ gint x,y;
+ GdkRectangle clipRect;
NWEnsureGTKButton( m_nScreen );
NWEnsureGTKArrow( m_nScreen );
@@ -2186,10 +2186,10 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
if( nPart == PART_BUTTON_DOWN )
buttonRect.Left() += 1;
- Rectangle aEditBoxRect( pixmapRect );
+ Rectangle aEditBoxRect( pixmapRect );
aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) );
- #define ARROW_EXTENT 0.7
+ #define ARROW_EXTENT 0.7
arrowRect.SetSize( Size( (gint)(MIN_ARROW_SIZE * ARROW_EXTENT),
(gint)(MIN_ARROW_SIZE * ARROW_EXTENT) ) );
arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2),
@@ -2201,20 +2201,20 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
if( nPart == PART_ENTIRE_CONTROL )
- NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, aEditBoxRect,
+ NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, aEditBoxRect,
nState, aValue, rCaption );
-
+
// Buttons must paint opaque since some themes have alpha-channel enabled buttons
- gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
- &clipRect, m_pWindow, "base",
- x+(buttonRect.Left() - pixmapRect.Left()),
+ gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+ &clipRect, m_pWindow, "base",
+ x+(buttonRect.Left() - pixmapRect.Left()),
y+(buttonRect.Top() - pixmapRect.Top()),
buttonRect.GetWidth(), buttonRect.GetHeight() );
gtk_paint_box( GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button->style, gdkDrawable, stateType, shadowType,
&clipRect, GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button, "button",
- x+(buttonRect.Left() - pixmapRect.Left()),
+ x+(buttonRect.Left() - pixmapRect.Left()),
y+(buttonRect.Top() - pixmapRect.Top()),
buttonRect.GetWidth(), buttonRect.GetHeight() );
@@ -2223,7 +2223,7 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
-
+
return( TRUE );
}
@@ -2232,23 +2232,23 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
static Rectangle NWGetComboBoxButtonRect( int nScreen,
ControlType,
ControlPart nPart,
- Rectangle aAreaRect,
+ Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- Rectangle aButtonRect;
- gint nArrowWidth;
+ Rectangle aButtonRect;
+ gint nArrowWidth;
gint nButtonWidth;
- gint nFocusWidth;
- gint nFocusPad;
+ gint nFocusWidth;
+ gint nFocusPad;
NWEnsureGTKArrow( nScreen );
// Grab some button style attributes
gtk_widget_style_get( gWidgetData[nScreen].gDropdownWidget,
- "focus-line-width", &nFocusWidth,
- "focus-padding", &nFocusPad, (char *)NULL );
+ "focus-line-width", &nFocusWidth,
+ "focus-padding", &nFocusPad, (char *)NULL );
nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gArrowWidget)->xpad * 2);
nButtonWidth = nArrowWidth +
@@ -2263,7 +2263,7 @@ static Rectangle NWGetComboBoxButtonRect( int nScreen,
else if( nPart == PART_SUB_EDIT )
{
NWEnsureGTKCombo( nScreen );
-
+
gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboWidget)->border_width +
nFocusWidth +
nFocusPad;
@@ -2283,21 +2283,21 @@ static Rectangle NWGetComboBoxButtonRect( int nScreen,
//-------------------------------------
-
+
BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const Rectangle& rControlRectangle,
const clipList&,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& )
{
OSL_ASSERT( aValue.getType() == CTRL_TAB_ITEM );
- GdkPixmap * pixmap;
- Rectangle pixmapRect;
- Rectangle tabRect;
- const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
- GtkStateType stateType;
- GtkShadowType shadowType;
+ GdkPixmap * pixmap;
+ Rectangle pixmapRect;
+ Rectangle tabRect;
+ const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
+ GtkStateType stateType;
+ GtkShadowType shadowType;
if( ! gWidgetData[ m_nScreen ].gCacheTabItems )
{
gWidgetData[ m_nScreen ].gCacheTabItems = new NWPixmapCache( m_nScreen );
@@ -2310,7 +2310,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
aCacheItems.SetSize( 20 );
if( !aCachePage.GetSize() )
aCachePage.SetSize( 1 );
-
+
if ( !pTabitemValue && (nType==CTRL_TAB_ITEM) )
{
std::fprintf( stderr, "NWPaintGTKTabItem() received a NULL TabitemValue. Cannot draw native tab\n" );
@@ -2348,7 +2348,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
// Allow the tab to draw a right border if needed
tabRect.Right() -= 1;
-
+
// #129732# avoid degenerate cases which might lead to crashes
if( tabRect.GetWidth() <= 1 || tabRect.GetHeight() <= 1 )
return false;
@@ -2365,21 +2365,21 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
return NWRenderPixmapToScreen( pixmap, pixmapRect );
}
+
+// gtk_widget_set_state( gWidgetData[m_nScreen].gNotebookWidget, stateType );
-// gtk_widget_set_state( gWidgetData[m_nScreen].gNotebookWidget, stateType );
-
- pixmap = gdk_pixmap_new( NULL, pixmapRect.GetWidth(), pixmapRect.GetHeight(),
+ pixmap = gdk_pixmap_new( NULL, pixmapRect.GetWidth(), pixmapRect.GetHeight(),
GetX11SalData()->GetDisplay()->GetVisual( m_nScreen ).GetDepth() );
GdkRectangle paintRect;
paintRect.x = paintRect.y = 0;
paintRect.width = pixmapRect.GetWidth();
paintRect.height = pixmapRect.GetHeight();
-
- gtk_paint_flat_box( m_pWindow->style, pixmap, GTK_STATE_NORMAL,
+
+ gtk_paint_flat_box( m_pWindow->style, pixmap, GTK_STATE_NORMAL,
GTK_SHADOW_NONE, &paintRect, m_pWindow, "base", 0, 0, -1, -1);
NWSetWidgetState( gWidgetData[m_nScreen].gNotebookWidget, nState, stateType );
-
+
switch( nType )
{
case CTRL_TAB_BODY:
@@ -2418,7 +2418,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
aCacheItems.Fill( nType, nState, pixmapRect, pixmap );
else
aCachePage.Fill( nType, nState, pixmapRect, pixmap );
-
+
BOOL bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect);
g_object_unref( pixmap );
return bSuccess;
@@ -2430,19 +2430,19 @@ BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
- ControlState nState,
+ ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- Rectangle pixmapRect;
- Rectangle widgetRect;
- Rectangle aIndicatorRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
- gint bInteriorFocus;
- gint nFocusLineWidth;
- gint nFocusPadding;
- gint x,y;
+ Rectangle pixmapRect;
+ Rectangle widgetRect;
+ Rectangle aIndicatorRect;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ gint bInteriorFocus;
+ gint nFocusLineWidth;
+ gint nFocusPadding;
+ gint x,y;
GdkRectangle clipRect;
NWEnsureGTKButton( m_nScreen );
@@ -2474,49 +2474,49 @@ BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
if ( nPart != PART_WINDOW )
{
gtk_widget_style_get( gWidgetData[m_nScreen].gOptionMenuWidget,
- "interior_focus", &bInteriorFocus,
- "focus_line_width", &nFocusLineWidth,
- "focus_padding", &nFocusPadding,
+ "interior_focus", &bInteriorFocus,
+ "focus_line_width", &nFocusLineWidth,
+ "focus_padding", &nFocusPadding,
(char *)NULL);
}
-
+
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
if ( nPart != PART_WINDOW )
{
// Listboxes must paint opaque since some themes have alpha-channel enabled bodies
- gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
- &clipRect, m_pWindow, "base", x, y,
+ gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+ &clipRect, m_pWindow, "base", x, y,
pixmapRect.GetWidth(), pixmapRect.GetHeight() );
gtk_paint_box( gWidgetData[m_nScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect,
gWidgetData[m_nScreen].gOptionMenuWidget, "optionmenu",
- x+(widgetRect.Left() - pixmapRect.Left()),
+ x+(widgetRect.Left() - pixmapRect.Left()),
y+(widgetRect.Top() - pixmapRect.Top()),
widgetRect.GetWidth(), widgetRect.GetHeight() );
- aIndicatorRect = NWGetListBoxIndicatorRect( m_nScreen, nType, nPart, widgetRect, nState,
+ aIndicatorRect = NWGetListBoxIndicatorRect( m_nScreen, nType, nPart, widgetRect, nState,
aValue, rCaption );
gtk_paint_tab( gWidgetData[m_nScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect,
gWidgetData[m_nScreen].gOptionMenuWidget, "optionmenutab",
- x+(aIndicatorRect.Left() - pixmapRect.Left()),
+ x+(aIndicatorRect.Left() - pixmapRect.Left()),
y+(aIndicatorRect.Top() - pixmapRect.Top()),
aIndicatorRect.GetWidth(), aIndicatorRect.GetHeight() );
}
else
{
shadowType = GTK_SHADOW_IN;
-
+
gtk_paint_shadow( gWidgetData[m_nScreen].gScrolledWindowWidget->style, gdkDrawable, GTK_STATE_NORMAL, shadowType,
&clipRect, gWidgetData[m_nScreen].gScrolledWindowWidget, "scrolled_window",
x+(widgetRect.Left() - pixmapRect.Left()), y+(widgetRect.Top() - pixmapRect.Top()),
widgetRect.GetWidth(), widgetRect.GetHeight() );
}
}
-
+
return( TRUE );
}
@@ -2528,20 +2528,20 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
ControlState nState, const ImplControlValue& aValue,
const OUString& )
{
- GtkStateType stateType;
- GtkShadowType shadowType;
- gint x, y, w, h;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
+ gint x, y, w, h;
gint g_x=0, g_y=0, g_w=10, g_h=10;
bool bPaintButton = true;
GtkWidget* pButtonWidget = gWidgetData[m_nScreen].gToolbarButtonWidget;
const gchar* pButtonDetail = "button";
- GdkRectangle clipRect;
-
+ GdkRectangle clipRect;
+
NWEnsureGTKToolbar( m_nScreen );
if( nPart == PART_BUTTON ) // toolbar buttons cannot focus in gtk
nState &= ~CTRL_STATE_FOCUSED;
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
-
+
x = rControlRectangle.Left();
y = rControlRectangle.Top();
w = rControlRectangle.GetWidth();
@@ -2560,7 +2560,7 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
gtk_toolbar_set_orientation( GTK_TOOLBAR(gWidgetData[m_nScreen].gToolbarWidget), GTK_ORIENTATION_HORIZONTAL );
else
gtk_toolbar_set_orientation( GTK_TOOLBAR(gWidgetData[m_nScreen].gToolbarWidget), GTK_ORIENTATION_VERTICAL );
- }
+ }
// handle grip
else if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
{
@@ -2588,7 +2588,7 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
bPaintButton =
(GTK_BUTTON(pButtonWidget)->relief != GTK_RELIEF_NONE)
|| (nState & CTRL_STATE_PRESSED)
- || (nState & CTRL_STATE_ROLLOVER);
+ || (nState & CTRL_STATE_ROLLOVER);
if( aValue.getTristateVal() == BUTTONVALUE_ON )
{
pButtonWidget = gWidgetData[m_nScreen].gToolbarToggleWidget;
@@ -2600,25 +2600,25 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
pButtonDetail = "togglebutton";
bPaintButton = true;
}
-
+
NWSetWidgetState( pButtonWidget, nState, stateType );
- gtk_widget_ensure_style( pButtonWidget );
- }
-
+ gtk_widget_ensure_style( pButtonWidget );
+ }
+
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
// draw toolbar
if( nPart == PART_DRAW_BACKGROUND_HORZ || nPart == PART_DRAW_BACKGROUND_VERT )
{
gtk_paint_flat_box( gWidgetData[m_nScreen].gToolbarWidget->style,
gdkDrawable,
(GtkStateType)GTK_STATE_NORMAL,
- GTK_SHADOW_NONE,
+ GTK_SHADOW_NONE,
&clipRect,
gWidgetData[m_nScreen].gToolbarWidget,
"base",
@@ -2658,10 +2658,10 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
shadowType,
&clipRect,
pButtonWidget, pButtonDetail, x, y, w, h );
- }
+ }
}
}
-
+
return( TRUE );
}
@@ -2675,15 +2675,15 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
ControlState nState, const ImplControlValue&,
const OUString& )
{
- GtkStateType stateType;
- GtkShadowType shadowType;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
GtkShadowType selected_shadow_type = GTK_SHADOW_OUT;
- gint x, y, w, h;
- GdkRectangle clipRect;
-
+ gint x, y, w, h;
+ GdkRectangle clipRect;
+
NWEnsureGTKMenubar( m_nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
-
+
x = rControlRectangle.Left();
y = rControlRectangle.Top();
w = rControlRectangle.GetWidth();
@@ -2698,19 +2698,19 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
(char *)NULL);
}
}
-
+
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
// handle Menubar
if( nPart == PART_ENTIRE_CONTROL )
{
NWSetWidgetState( gWidgetData[m_nScreen].gMenubarWidget, nState, stateType );
-
+
GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gMenubarWidget, GTK_SENSITIVE );
if ( nState & CTRL_STATE_ENABLED )
GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gMenubarWidget, GTK_SENSITIVE );
@@ -2719,10 +2719,10 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
gtk_paint_flat_box( gWidgetData[m_nScreen].gMenubarWidget->style,
gdkDrawable,
GTK_STATE_NORMAL,
- GTK_SHADOW_NONE,
+ GTK_SHADOW_NONE,
&clipRect,
GTK_WIDGET(m_pWindow),
- "base",
+ "base",
x, y, w, h );
gtk_paint_box( gWidgetData[m_nScreen].gMenubarWidget->style,
gdkDrawable,
@@ -2748,7 +2748,7 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
}
}
}
-
+
return( TRUE );
}
@@ -2764,16 +2764,16 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
// even crashes), draw them using vcl functionality.
if( nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) )
return FALSE;
-
- GtkStateType stateType;
- GtkShadowType shadowType;
+
+ GtkStateType stateType;
+ GtkShadowType shadowType;
GtkShadowType selected_shadow_type = GTK_SHADOW_OUT;
- gint x, y, w, h;
- GdkRectangle clipRect;
-
+ gint x, y, w, h;
+ GdkRectangle clipRect;
+
NWEnsureGTKMenu( m_nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
-
+
x = rControlRectangle.Left();
y = rControlRectangle.Top();
w = rControlRectangle.GetWidth();
@@ -2799,17 +2799,17 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
if( nPart == PART_ENTIRE_CONTROL )
{
// #118704# for translucent menubar styles paint background first
gtk_paint_flat_box( gWidgetData[m_nScreen].gMenuWidget->style,
gdkDrawable,
GTK_STATE_NORMAL,
- GTK_SHADOW_NONE,
+ GTK_SHADOW_NONE,
&clipRect,
GTK_WIDGET(m_pWindow),
- "base",
+ "base",
x, y, w, h );
gtk_paint_box( gWidgetData[m_nScreen].gMenuWidget->style,
gdkDrawable,
@@ -2878,7 +2878,7 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
}
}
}
-
+
return( TRUE );
}
@@ -2891,10 +2891,10 @@ BOOL GtkSalGraphics::NWPaintGTKTooltip(
const OUString& )
{
NWEnsureGTKTooltip( m_nScreen );
-
- gint x, y, w, h;
- GdkRectangle clipRect;
-
+
+ gint x, y, w, h;
+ GdkRectangle clipRect;
+
x = rControlRectangle.Left();
y = rControlRectangle.Top();
w = rControlRectangle.GetWidth();
@@ -2906,17 +2906,17 @@ BOOL GtkSalGraphics::NWPaintGTKTooltip(
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
-
+
gtk_paint_flat_box( gWidgetData[m_nScreen].gTooltipPopup->style,
gdkDrawable,
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
&clipRect,
gWidgetData[m_nScreen].gTooltipPopup,
- "tooltip",
+ "tooltip",
x, y, w, h );
}
-
+
return( TRUE );
}
@@ -2935,12 +2935,12 @@ BOOL GtkSalGraphics::NWPaintGTKListNode(
aRect.Right() += 2;
aRect.Top() -= 2;
aRect.Bottom() += 2;
- gint w, h;
+ gint w, h;
w = aRect.GetWidth();
h = aRect.GetHeight();
- GtkStateType stateType;
- GtkShadowType shadowType;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
ButtonValue aButtonValue = rValue.getTristateVal();
@@ -2953,11 +2953,11 @@ BOOL GtkSalGraphics::NWPaintGTKListNode(
default:
break;
}
-
+
GdkPixmap* pixmap = NWGetPixmapFromScreen( aRect );
if( ! pixmap )
return FALSE;
-
+
GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
gtk_paint_expander( gWidgetData[m_nScreen].gTreeView->style,
pixDrawable,
@@ -2983,17 +2983,17 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
const OUString& )
{
NWEnsureGTKProgressBar( m_nScreen );
-
- gint w, h;
+
+ gint w, h;
w = rControlRectangle.GetWidth();
h = rControlRectangle.GetHeight();
long nProgressWidth = rValue.getNumericVal();
-
+
GdkPixmap* pixmap = NWGetPixmapFromScreen( Rectangle( Point( 0, 0 ), Size( w, h ) ) );
if( ! pixmap )
return FALSE;
-
+
GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
// paint background
@@ -3003,7 +3003,7 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
GTK_SHADOW_NONE,
NULL,
gWidgetData[m_nScreen].gProgressBar,
- "trough",
+ "trough",
0, 0, w, h );
if( nProgressWidth > 0 )
{
@@ -3048,17 +3048,17 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
{
OSL_ASSERT( rValue.getType() == CTRL_SLIDER );
NWEnsureGTKSlider( m_nScreen );
-
- gint w, h;
+
+ gint w, h;
w = rControlRectangle.GetWidth();
h = rControlRectangle.GetHeight();
const SliderValue* pVal = static_cast<const SliderValue*>(&rValue);
-
+
GdkPixmap* pixmap = NWGetPixmapFromScreen( rControlRectangle );
if( ! pixmap )
return FALSE;
-
+
GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
GtkWidget* pWidget = (nPart == PART_TRACK_HORZ_AREA)
? GTK_WIDGET(gWidgetData[m_nScreen].gHScale)
@@ -3128,7 +3128,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
GTK_SHADOW_NONE,
NULL,
gWidgetData[m_nScreen].gProgressBar,
- "trough",
+ "trough",
0, 0, w, h );
if( nProgressWidth > 0 )
{
@@ -3177,17 +3177,17 @@ static Rectangle NWGetListBoxButtonRect( int nScreen,
Rectangle aPartRect;
GtkRequisition *pIndicatorSize = NULL;
GtkBorder *pIndicatorSpacing = NULL;
- gint width = 13; // GTK+ default
- gint right = 5; // GTK+ default
+ gint width = 13; // GTK+ default
+ gint right = 5; // GTK+ default
gint nButtonAreaWidth = 0;
gint xthickness = 0;
NWEnsureGTKOptionMenu( nScreen );
gtk_widget_style_get( gWidgetData[nScreen].gOptionMenuWidget,
- "indicator_size", &pIndicatorSize,
+ "indicator_size", &pIndicatorSize,
"indicator_spacing",&pIndicatorSpacing, (char *)NULL);
-
+
if ( pIndicatorSize )
width = pIndicatorSize->width;
@@ -3212,7 +3212,7 @@ static Rectangle NWGetListBoxButtonRect( int nScreen,
break;
default:
- aPartSize.Width() = aAreaRect.GetWidth();
+ aPartSize.Width() = aAreaRect.GetWidth();
aPartPos.X() = aAreaRect.Left();
break;
}
@@ -3231,7 +3231,7 @@ static Rectangle NWGetListBoxButtonRect( int nScreen,
static Rectangle NWGetListBoxIndicatorRect( int nScreen,
ControlType,
ControlPart,
- Rectangle aAreaRect,
+ Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
@@ -3239,16 +3239,16 @@ static Rectangle NWGetListBoxIndicatorRect( int nScreen,
Rectangle aIndicatorRect;
GtkRequisition *pIndicatorSize = NULL;
GtkBorder *pIndicatorSpacing = NULL;
- gint width = 13; // GTK+ default
- gint height = 13; // GTK+ default
- gint right = 5; // GTK+ default
+ gint width = 13; // GTK+ default
+ gint height = 13; // GTK+ default
+ gint right = 5; // GTK+ default
NWEnsureGTKOptionMenu( nScreen );
gtk_widget_style_get( gWidgetData[nScreen].gOptionMenuWidget,
- "indicator_size", &pIndicatorSize,
+ "indicator_size", &pIndicatorSize,
"indicator_spacing",&pIndicatorSpacing, (char *)NULL);
-
+
if ( pIndicatorSize )
{
width = pIndicatorSize->width;
@@ -3276,8 +3276,8 @@ static Rectangle NWGetListBoxIndicatorRect( int nScreen,
static Rectangle NWGetToolbarRect( int nScreen,
ControlType,
- ControlPart nPart,
- Rectangle aAreaRect,
+ ControlPart nPart,
+ Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
@@ -3294,9 +3294,9 @@ static Rectangle NWGetToolbarRect( int nScreen,
else if( nPart == PART_BUTTON )
{
aRet = aAreaRect;
-
+
NWEnsureGTKToolbar( nScreen );
-
+
gint nMinWidth =
2*gWidgetData[nScreen].gToolbarButtonWidget->style->xthickness
+ 1 // CHILD_SPACING constant, found in gtk_button.c
@@ -3304,8 +3304,8 @@ static Rectangle NWGetToolbarRect( int nScreen,
gint nMinHeight =
2*gWidgetData[nScreen].gToolbarButtonWidget->style->ythickness
+ 1 // CHILD_SPACING constant, found in gtk_button.c
- + 3*gWidgetData[nScreen].gToolbarButtonWidget->style->ythickness; // Murphy factor
-
+ + 3*gWidgetData[nScreen].gToolbarButtonWidget->style->ythickness; // Murphy factor
+
gtk_widget_ensure_style( gWidgetData[nScreen].gToolbarButtonWidget );
if( aAreaRect.GetWidth() < nMinWidth )
aRet.Right() = aRet.Left() + nMinWidth;
@@ -3340,14 +3340,14 @@ void printStyleColors( GtkStyle* pStyle )
for( int i = 0; i < 5; i++ )
{
std::fprintf( stderr, "state %s colors:\n", pStates[i] );
- printColor( "bg ", pStyle->bg[i] );
- printColor( "fg ", pStyle->fg[i] );
- printColor( "light ", pStyle->light[i] );
- printColor( "dark ", pStyle->dark[i] );
- printColor( "mid ", pStyle->mid[i] );
- printColor( "text ", pStyle->text[i] );
- printColor( "base ", pStyle->base[i] );
- printColor( "text_aa", pStyle->text_aa[i] );
+ printColor( "bg ", pStyle->bg[i] );
+ printColor( "fg ", pStyle->fg[i] );
+ printColor( "light ", pStyle->light[i] );
+ printColor( "dark ", pStyle->dark[i] );
+ printColor( "mid ", pStyle->mid[i] );
+ printColor( "text ", pStyle->text[i] );
+ printColor( "base ", pStyle->base[i] );
+ printColor( "text_aa", pStyle->text_aa[i] );
}
}
#endif
@@ -3360,16 +3360,16 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
NWEnsureGTKScrollbars( m_nScreen );
NWEnsureGTKEditBox( m_nScreen );
NWEnsureGTKTooltip( m_nScreen );
-
+
gtk_widget_ensure_style( m_pWindow );
GtkStyle* pStyle = gtk_widget_get_style( m_pWindow );
-
+
StyleSettings aStyleSet = rSettings.GetStyleSettings();
#if OSL_DEBUG_LEVEL > 2
printStyleColors( pStyle );
#endif
-
+
// text colors
Color aTextColor = getColor( pStyle->text[GTK_STATE_NORMAL] );
aStyleSet.SetDialogTextColor( aTextColor );
@@ -3385,12 +3385,12 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GtkStyle* pTooltipStyle = gtk_widget_get_style( gWidgetData[m_nScreen].gTooltipPopup );
aTextColor = getColor( pTooltipStyle->fg[ GTK_STATE_NORMAL ] );
aStyleSet.SetHelpTextColor( aTextColor );
-
+
// mouse over text colors
aTextColor = getColor( pStyle->fg[ GTK_STATE_PRELIGHT ] );
aStyleSet.SetButtonRolloverTextColor( aTextColor );
aStyleSet.SetFieldRolloverTextColor( aTextColor );
-
+
// background colors
Color aBackColor = getColor( pStyle->bg[GTK_STATE_NORMAL] );
Color aBackFieldColor = getColor( pStyle->base[ GTK_STATE_NORMAL ] );
@@ -3451,7 +3451,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GtkStyle* pMenuItemStyle = gtk_rc_get_style( gWidgetData[m_nScreen].gMenuItemMenuWidget );
GtkStyle* pMenubarStyle = gtk_rc_get_style( gWidgetData[m_nScreen].gMenubarWidget );
GtkStyle* pMenuTextStyle = gtk_rc_get_style( gtk_bin_get_child( GTK_BIN(gWidgetData[m_nScreen].gMenuItemMenuWidget) ) );
-
+
aBackColor = getColor( pMenubarStyle->bg[GTK_STATE_NORMAL] );
aStyleSet.SetMenuBarColor( aBackColor );
aBackColor = getColor( pMenuStyle->bg[GTK_STATE_NORMAL] );
@@ -3461,7 +3461,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aTextColor = getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] );
aStyleSet.SetMenuBarTextColor( aTextColor );
-
+
#if OSL_DEBUG_LEVEL > 1
std::fprintf( stderr, "==\n" );
std::fprintf( stderr, "MenuColor = %x (%d)\n", (int)aStyleSet.GetMenuColor().GetColor(), aStyleSet.GetMenuColor().GetLuminance() );
@@ -3486,30 +3486,30 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
temp.DecreaseLuminance( 16 );
aStyleSet.SetShadowColor( temp );
}
-
+
aHighlightColor = getColor( pMenuItemStyle->bg[ GTK_STATE_SELECTED ] );
aHighlightTextColor = getColor( pMenuTextStyle->fg[ GTK_STATE_PRELIGHT ] );
if( aHighlightColor == aHighlightTextColor )
aHighlightTextColor = (aHighlightColor.GetLuminance() < 128) ? Color( COL_WHITE ) : Color( COL_BLACK );
aStyleSet.SetMenuHighlightColor( aHighlightColor );
aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor );
-
+
// UI font
- OString aFamily = pango_font_description_get_family( pStyle->font_desc );
- int nPangoHeight = pango_font_description_get_size( pStyle->font_desc );
- PangoStyle eStyle = pango_font_description_get_style( pStyle->font_desc );
- PangoWeight eWeight = pango_font_description_get_weight( pStyle->font_desc );
+ OString aFamily = pango_font_description_get_family( pStyle->font_desc );
+ int nPangoHeight = pango_font_description_get_size( pStyle->font_desc );
+ PangoStyle eStyle = pango_font_description_get_style( pStyle->font_desc );
+ PangoWeight eWeight = pango_font_description_get_weight( pStyle->font_desc );
PangoStretch eStretch = pango_font_description_get_stretch( pStyle->font_desc );
-
+
psp::FastPrintFontInfo aInfo;
// set family name
aInfo.m_aFamilyName = OStringToOUString( aFamily, RTL_TEXTENCODING_UTF8 );
// set italic
switch( eStyle )
{
- case PANGO_STYLE_NORMAL: aInfo.m_eItalic = psp::italic::Upright;break;
- case PANGO_STYLE_ITALIC: aInfo.m_eItalic = psp::italic::Italic;break;
- case PANGO_STYLE_OBLIQUE: aInfo.m_eItalic = psp::italic::Oblique;break;
+ case PANGO_STYLE_NORMAL: aInfo.m_eItalic = psp::italic::Upright;break;
+ case PANGO_STYLE_ITALIC: aInfo.m_eItalic = psp::italic::Italic;break;
+ case PANGO_STYLE_OBLIQUE: aInfo.m_eItalic = psp::italic::Oblique;break;
}
// set weight
if( eWeight <= PANGO_WEIGHT_ULTRALIGHT )
@@ -3525,15 +3525,15 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// set width
switch( eStretch )
{
- case PANGO_STRETCH_ULTRA_CONDENSED: aInfo.m_eWidth = psp::width::UltraCondensed;break;
- case PANGO_STRETCH_EXTRA_CONDENSED: aInfo.m_eWidth = psp::width::ExtraCondensed;break;
- case PANGO_STRETCH_CONDENSED: aInfo.m_eWidth = psp::width::Condensed;break;
- case PANGO_STRETCH_SEMI_CONDENSED: aInfo.m_eWidth = psp::width::SemiCondensed;break;
- case PANGO_STRETCH_NORMAL: aInfo.m_eWidth = psp::width::Normal;break;
- case PANGO_STRETCH_SEMI_EXPANDED: aInfo.m_eWidth = psp::width::SemiExpanded;break;
- case PANGO_STRETCH_EXPANDED: aInfo.m_eWidth = psp::width::Expanded;break;
- case PANGO_STRETCH_EXTRA_EXPANDED: aInfo.m_eWidth = psp::width::ExtraExpanded;break;
- case PANGO_STRETCH_ULTRA_EXPANDED: aInfo.m_eWidth = psp::width::UltraExpanded;break;
+ case PANGO_STRETCH_ULTRA_CONDENSED: aInfo.m_eWidth = psp::width::UltraCondensed;break;
+ case PANGO_STRETCH_EXTRA_CONDENSED: aInfo.m_eWidth = psp::width::ExtraCondensed;break;
+ case PANGO_STRETCH_CONDENSED: aInfo.m_eWidth = psp::width::Condensed;break;
+ case PANGO_STRETCH_SEMI_CONDENSED: aInfo.m_eWidth = psp::width::SemiCondensed;break;
+ case PANGO_STRETCH_NORMAL: aInfo.m_eWidth = psp::width::Normal;break;
+ case PANGO_STRETCH_SEMI_EXPANDED: aInfo.m_eWidth = psp::width::SemiExpanded;break;
+ case PANGO_STRETCH_EXPANDED: aInfo.m_eWidth = psp::width::Expanded;break;
+ case PANGO_STRETCH_EXTRA_EXPANDED: aInfo.m_eWidth = psp::width::ExtraExpanded;break;
+ case PANGO_STRETCH_ULTRA_EXPANDED: aInfo.m_eWidth = psp::width::UltraExpanded;break;
}
#if OSL_DEBUG_LEVEL > 1
@@ -3548,7 +3548,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aInfo.m_nID != 0 ? "succeeded" : "failed",
OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
#endif
-
+
sal_Int32 nDispDPIY = GetDisplay()->GetResolution().B();
int nPointHeight = 0;
static gboolean(*pAbso)(const PangoFontDescription*) =
@@ -3558,7 +3558,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
nPointHeight = (nPangoHeight * 72 + nDispDPIY*PANGO_SCALE/2) / (nDispDPIY * PANGO_SCALE);
else
nPointHeight = nPangoHeight/PANGO_SCALE;
-
+
Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) );
if( aInfo.m_eWeight != psp::weight::Unknown )
aFont.SetWeight( PspGraphics::ToFontWeight( aInfo.m_eWeight ) );
@@ -3571,8 +3571,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetAppFont( aFont );
aStyleSet.SetHelpFont( aFont );
- aStyleSet.SetTitleFont( aFont );
- aStyleSet.SetFloatTitleFont( aFont );
aStyleSet.SetMenuFont( aFont );
aStyleSet.SetToolFont( aFont );
aStyleSet.SetLabelFont( aFont );
@@ -3583,6 +3581,10 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetIconFont( aFont );
aStyleSet.SetGroupFont( aFont );
+ aFont.SetWeight( WEIGHT_BOLD );
+ aStyleSet.SetTitleFont( aFont );
+ aStyleSet.SetFloatTitleFont( aFont );
+
// get cursor blink time
GtkSettings *pSettings = gtk_widget_get_settings( gWidgetData[m_nScreen].gEditBoxWidget );
gboolean blink = false;
@@ -3609,7 +3611,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
gint slider_width = 14;
gint trough_border = 1;
gint min_slider_length = 21;
-
+
// Grab some button style attributes
gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget,
"slider-width", &slider_width,
@@ -3627,14 +3629,14 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
g_free( pIconThemeName );
// FIXME: need some way of fetching toolbar icon size.
-// aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
+// aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
const cairo_font_options_t* pNewOptions = NULL;
if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
{
//#if !GTK_CHECK_VERSION(2,8,1)
#if !GTK_CHECK_VERSION(2,9,0)
- static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) =
+ static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) =
(cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
if( gdk_screen_get_font_options != NULL )
#endif
@@ -3646,7 +3648,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
rSettings.SetStyleSettings( aStyleSet );
#if OSL_DEBUG_LEVEL > 1
- {
+ {
GtkSettings* pGtkSettings = gtk_settings_get_default();
GValue aValue;
memset( &aValue, 0, sizeof(GValue) );
@@ -3698,8 +3700,8 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GdkPixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect )
{
// Create a new pixmap to hold the composite of the window background and the control
- GdkPixmap * pPixmap = gdk_pixmap_new( GDK_DRAWABLE(GetGdkWindow()), srcRect.GetWidth(), srcRect.GetHeight(), -1 );
- GdkGC * pPixmapGC = gdk_gc_new( pPixmap );
+ GdkPixmap * pPixmap = gdk_pixmap_new( GDK_DRAWABLE(GetGdkWindow()), srcRect.GetWidth(), srcRect.GetHeight(), -1 );
+ GdkGC * pPixmapGC = gdk_gc_new( pPixmap );
if( !pPixmap || !pPixmapGC )
{
@@ -3999,13 +4001,13 @@ static void NWEnsureGTKToolbar( int nScreen )
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gToolbarWidget, nScreen );
gWidgetData[nScreen].gToolbarButtonWidget = gtk_button_new();
gWidgetData[nScreen].gToolbarToggleWidget = gtk_toggle_button_new();
-
+
GtkReliefStyle aRelief = GTK_RELIEF_NORMAL;
gtk_widget_ensure_style( gWidgetData[nScreen].gToolbarWidget );
gtk_widget_style_get( gWidgetData[nScreen].gToolbarWidget,
"button_relief", &aRelief,
(char *)NULL);
-
+
gtk_button_set_relief( GTK_BUTTON(gWidgetData[nScreen].gToolbarButtonWidget), aRelief );
GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarButtonWidget, GTK_CAN_FOCUS );
GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarButtonWidget, GTK_CAN_DEFAULT );
@@ -4014,7 +4016,7 @@ static void NWEnsureGTKToolbar( int nScreen )
gtk_button_set_relief( GTK_BUTTON(gWidgetData[nScreen].gToolbarToggleWidget), aRelief );
GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarToggleWidget, GTK_CAN_FOCUS );
GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarToggleWidget, GTK_CAN_DEFAULT );
- NWAddWidgetToCacheWindow( gWidgetData[nScreen].gToolbarToggleWidget, nScreen );
+ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gToolbarToggleWidget, nScreen );
}
if( ! gWidgetData[nScreen].gHandleBoxWidget )
{
@@ -4035,7 +4037,7 @@ static void NWEnsureGTKMenubar( int nScreen )
gtk_widget_show( gWidgetData[nScreen].gMenuItemMenubarWidget );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gMenubarWidget, nScreen );
gtk_widget_show( gWidgetData[nScreen].gMenubarWidget );
-
+
// do what NWAddWidgetToCacheWindow does except adding to def container
gtk_widget_realize( gWidgetData[nScreen].gMenuItemMenubarWidget );
gtk_widget_ensure_style( gWidgetData[nScreen].gMenuItemMenubarWidget );
@@ -4053,12 +4055,12 @@ static void NWEnsureGTKMenu( int nScreen )
gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
gWidgetData[nScreen].gImageMenuItem = gtk_image_menu_item_new();
-
+
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemMenuWidget );
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemCheckMenuWidget );
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemRadioMenuWidget );
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gImageMenuItem );
-
+
// do what NWAddWidgetToCacheWindow does except adding to def container
gtk_widget_realize( gWidgetData[nScreen].gMenuWidget );
gtk_widget_ensure_style( gWidgetData[nScreen].gMenuWidget );
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index c6ff16f8395b..24e68e99e3f7 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -156,61 +156,61 @@ static USHORT GetKeyCode( guint keyval )
switch( keyval )
{
case GDK_KP_Down:
- case GDK_Down: nCode = KEY_DOWN; break;
+ case GDK_Down: nCode = KEY_DOWN; break;
case GDK_KP_Up:
- case GDK_Up: nCode = KEY_UP; break;
+ case GDK_Up: nCode = KEY_UP; break;
case GDK_KP_Left:
- case GDK_Left: nCode = KEY_LEFT; break;
+ case GDK_Left: nCode = KEY_LEFT; break;
case GDK_KP_Right:
- case GDK_Right: nCode = KEY_RIGHT; break;
+ case GDK_Right: nCode = KEY_RIGHT; break;
case GDK_KP_Begin:
case GDK_KP_Home:
case GDK_Begin:
- case GDK_Home: nCode = KEY_HOME; break;
+ case GDK_Home: nCode = KEY_HOME; break;
case GDK_KP_End:
- case GDK_End: nCode = KEY_END; break;
+ case GDK_End: nCode = KEY_END; break;
case GDK_KP_Page_Up:
- case GDK_Page_Up: nCode = KEY_PAGEUP; break;
+ case GDK_Page_Up: nCode = KEY_PAGEUP; break;
case GDK_KP_Page_Down:
- case GDK_Page_Down: nCode = KEY_PAGEDOWN; break;
+ case GDK_Page_Down: nCode = KEY_PAGEDOWN; break;
case GDK_KP_Enter:
- case GDK_Return: nCode = KEY_RETURN; break;
- case GDK_Escape: nCode = KEY_ESCAPE; break;
+ case GDK_Return: nCode = KEY_RETURN; break;
+ case GDK_Escape: nCode = KEY_ESCAPE; break;
case GDK_ISO_Left_Tab:
case GDK_KP_Tab:
- case GDK_Tab: nCode = KEY_TAB; break;
- case GDK_BackSpace: nCode = KEY_BACKSPACE; break;
+ case GDK_Tab: nCode = KEY_TAB; break;
+ case GDK_BackSpace: nCode = KEY_BACKSPACE; break;
case GDK_KP_Space:
- case GDK_space: nCode = KEY_SPACE; break;
+ case GDK_space: nCode = KEY_SPACE; break;
case GDK_KP_Insert:
- case GDK_Insert: nCode = KEY_INSERT; break;
+ case GDK_Insert: nCode = KEY_INSERT; break;
case GDK_KP_Delete:
- case GDK_Delete: nCode = KEY_DELETE; break;
+ case GDK_Delete: nCode = KEY_DELETE; break;
case GDK_plus:
- case GDK_KP_Add: nCode = KEY_ADD; break;
+ case GDK_KP_Add: nCode = KEY_ADD; break;
case GDK_minus:
- case GDK_KP_Subtract: nCode = KEY_SUBTRACT; break;
+ case GDK_KP_Subtract: nCode = KEY_SUBTRACT; break;
case GDK_asterisk:
- case GDK_KP_Multiply: nCode = KEY_MULTIPLY; break;
+ case GDK_KP_Multiply: nCode = KEY_MULTIPLY; break;
case GDK_slash:
- case GDK_KP_Divide: nCode = KEY_DIVIDE; break;
+ case GDK_KP_Divide: nCode = KEY_DIVIDE; break;
case GDK_period:
- case GDK_decimalpoint: nCode = KEY_POINT; break;
- case GDK_comma: nCode = KEY_COMMA; break;
- case GDK_less: nCode = KEY_LESS; break;
- case GDK_greater: nCode = KEY_GREATER; break;
+ case GDK_decimalpoint: nCode = KEY_POINT; break;
+ case GDK_comma: nCode = KEY_COMMA; break;
+ case GDK_less: nCode = KEY_LESS; break;
+ case GDK_greater: nCode = KEY_GREATER; break;
case GDK_KP_Equal:
- case GDK_equal: nCode = KEY_EQUAL; break;
- case GDK_Find: nCode = KEY_FIND; break;
- case GDK_Menu: nCode = KEY_CONTEXTMENU;break;
- case GDK_Help: nCode = KEY_HELP; break;
- case GDK_Undo: nCode = KEY_UNDO; break;
+ case GDK_equal: nCode = KEY_EQUAL; break;
+ case GDK_Find: nCode = KEY_FIND; break;
+ case GDK_Menu: nCode = KEY_CONTEXTMENU;break;
+ case GDK_Help: nCode = KEY_HELP; break;
+ case GDK_Undo: nCode = KEY_UNDO; break;
case GDK_Redo: nCode = KEY_REPEAT; break;
case GDK_KP_Decimal:
- case GDK_KP_Separator: nCode = KEY_DECIMAL; break;
- case GDK_asciitilde: nCode = KEY_TILDE; break;
+ case GDK_KP_Separator: nCode = KEY_DECIMAL; break;
+ case GDK_asciitilde: nCode = KEY_TILDE; break;
case GDK_leftsinglequotemark:
- case GDK_quoteleft: nCode = KEY_QUOTELEFT; break;
+ case GDK_quoteleft: nCode = KEY_QUOTELEFT; break;
// some special cases, also see saldisp.cxx
// - - - - - - - - - - - - - Apollo - - - - - - - - - - - - - 0x1000
case 0x1000FF02: // apXK_Copy
@@ -297,8 +297,8 @@ static USHORT GetKeyCode( guint keyval )
// in the independent part.
struct KeyAlternate
{
- USHORT nKeyCode;
- sal_Unicode nCharCode;
+ USHORT nKeyCode;
+ sal_Unicode nCharCode;
KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {}
KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
@@ -329,10 +329,10 @@ void GtkSalFrame::doKeyCallback( guint state,
{
SalKeyEvent aEvent;
- aEvent.mnTime = time;
- aEvent.mnCharCode = aOrigCode;
- aEvent.mnRepeat = 0;
-
+ aEvent.mnTime = time;
+ aEvent.mnCharCode = aOrigCode;
+ aEvent.mnRepeat = 0;
+
vcl::DeletionListener aDel( this );
/* #i42122# translate all keys with Ctrl and/or Alt to group 0
* else shortcuts (e.g. Ctrl-o) will not work but be inserted by
@@ -358,11 +358,11 @@ void GtkSalFrame::doKeyCallback( guint state,
&level,
&consumed ) )
{
- aEvent.mnCode = GetKeyCode( updated_keyval );
+ aEvent.mnCode = GetKeyCode( updated_keyval );
}
}
- aEvent.mnCode |= GetKeyModCode( state );
-
+ aEvent.mnCode |= GetKeyModCode( state );
+
if( bDown )
{
bool bHandled = CallCallback( SALEVENT_KEYINPUT, &aEvent );
@@ -396,8 +396,8 @@ GtkSalFrame::GtkSalFrame( SalFrame* pParent, ULONG nStyle )
{
m_nScreen = getDisplay()->GetDefaultScreenNumber();
getDisplay()->registerFrame( this );
- m_bDefaultPos = true;
- m_bDefaultSize = ( (nStyle & SAL_FRAME_STYLE_SIZEABLE) && ! pParent );
+ m_bDefaultPos = true;
+ m_bDefaultSize = ( (nStyle & SAL_FRAME_STYLE_SIZEABLE) && ! pParent );
m_bWindowIsGtkPlug = false;
Init( pParent, nStyle );
}
@@ -407,8 +407,8 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData )
m_nScreen = getDisplay()->GetDefaultScreenNumber();
getDisplay()->registerFrame( this );
getDisplay()->setHaveSystemChildFrame();
- m_bDefaultPos = true;
- m_bDefaultSize = true;
+ m_bDefaultPos = true;
+ m_bDefaultSize = true;
Init( pSysData );
}
@@ -424,9 +424,9 @@ GtkSalFrame::~GtkSalFrame()
if( m_pParent )
m_pParent->m_aChildren.remove( this );
-
+
getDisplay()->deregisterFrame( this );
-
+
if( m_pRegion )
gdk_region_destroy( m_pRegion );
@@ -474,13 +474,13 @@ void GtkSalFrame::resizeWindow( long nWidth, long nHeight )
else if( ! isChild( true, false ) )
gtk_window_resize( GTK_WINDOW(m_pWindow), nWidth, nHeight );
}
-
+
/*
* Always use a sub-class of GtkFixed we can tag for a11y. This allows us to
- * utilize GAIL for the toplevel window and toolkit implementation incl.
+ * utilize GAIL for the toplevel window and toolkit implementation incl.
* key event listener support ..
*/
-
+
GType
ooo_fixed_get_type()
{
@@ -501,11 +501,11 @@ ooo_fixed_get_type()
NULL /* value table */
};
- type = g_type_register_static( GTK_TYPE_FIXED, "OOoFixed",
+ type = g_type_register_static( GTK_TYPE_FIXED, "OOoFixed",
&tinfo, (GTypeFlags) 0);
}
- return type;
+ return type;
}
void GtkSalFrame::updateScreenNumber()
@@ -556,10 +556,10 @@ void GtkSalFrame::InitCommon()
m_nKeyModifiers = 0;
m_bSingleAltPress = false;
m_bFullscreen = false;
- m_nState = GDK_WINDOW_STATE_WITHDRAWN;
- m_nVisibility = GDK_VISIBILITY_FULLY_OBSCURED;
+ m_nState = GDK_WINDOW_STATE_WITHDRAWN;
+ m_nVisibility = GDK_VISIBILITY_FULLY_OBSCURED;
m_bSendModChangeOnRelease = false;
- m_pIMHandler = NULL;
+ m_pIMHandler = NULL;
m_hBackgroundPixmap = None;
m_nSavedScreenSaverTimeout = 0;
m_nGSMCookie = 0;
@@ -567,7 +567,7 @@ void GtkSalFrame::InitCommon()
m_pRegion = NULL;
m_ePointerStyle = 0xffff;
m_bSetFocusOnMap = false;
-
+
gtk_widget_set_app_paintable( m_pWindow, TRUE );
gtk_widget_set_double_buffered( m_pWindow, FALSE );
gtk_widget_set_redraw_on_allocate( m_pWindow, FALSE );
@@ -581,7 +581,7 @@ void GtkSalFrame::InitCommon()
// fixed is needed since we have to position plugin windows
m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), NULL ));
gtk_container_add( GTK_CONTAINER(m_pWindow), GTK_WIDGET(m_pFixedContainer) );
-
+
// show the widgets
gtk_widget_show( GTK_WIDGET(m_pFixedContainer) );
@@ -590,42 +590,42 @@ void GtkSalFrame::InitCommon()
//system data
SalDisplay* pDisp = GetX11SalData()->GetDisplay();
- m_aSystemData.nSize = sizeof( SystemChildData );
- m_aSystemData.pDisplay = pDisp->GetDisplay();
- m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(m_pWindow->window);
- m_aSystemData.pSalFrame = this;
- m_aSystemData.pWidget = m_pWindow;
- m_aSystemData.pVisual = pDisp->GetVisual( m_nScreen ).GetVisual();
- m_aSystemData.nScreen = m_nScreen;
- m_aSystemData.nDepth = pDisp->GetVisual( m_nScreen ).GetDepth();
- m_aSystemData.aColormap = pDisp->GetColormap( m_nScreen ).GetXColormap();
- m_aSystemData.pAppContext = NULL;
- m_aSystemData.aShellWindow = m_aSystemData.aWindow;
- m_aSystemData.pShellWidget = m_aSystemData.pWidget;
+ m_aSystemData.nSize = sizeof( SystemChildData );
+ m_aSystemData.pDisplay = pDisp->GetDisplay();
+ m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(m_pWindow->window);
+ m_aSystemData.pSalFrame = this;
+ m_aSystemData.pWidget = m_pWindow;
+ m_aSystemData.pVisual = pDisp->GetVisual( m_nScreen ).GetVisual();
+ m_aSystemData.nScreen = m_nScreen;
+ m_aSystemData.nDepth = pDisp->GetVisual( m_nScreen ).GetDepth();
+ m_aSystemData.aColormap = pDisp->GetColormap( m_nScreen ).GetXColormap();
+ m_aSystemData.pAppContext = NULL;
+ m_aSystemData.aShellWindow = m_aSystemData.aWindow;
+ m_aSystemData.pShellWidget = m_aSystemData.pWidget;
// fake an initial geometry, gets updated via configure event or SetPosSize
if( m_bDefaultPos || m_bDefaultSize )
{
Size aDefSize = calcDefaultSize();
- maGeometry.nX = -1;
- maGeometry.nY = -1;
- maGeometry.nWidth = aDefSize.Width();
- maGeometry.nHeight = aDefSize.Height();
+ maGeometry.nX = -1;
+ maGeometry.nY = -1;
+ maGeometry.nWidth = aDefSize.Width();
+ maGeometry.nHeight = aDefSize.Height();
if( m_pParent )
{
// approximation
- maGeometry.nTopDecoration = m_pParent->maGeometry.nTopDecoration;
- maGeometry.nBottomDecoration = m_pParent->maGeometry.nBottomDecoration;
- maGeometry.nLeftDecoration = m_pParent->maGeometry.nLeftDecoration;
- maGeometry.nRightDecoration = m_pParent->maGeometry.nRightDecoration;
+ maGeometry.nTopDecoration = m_pParent->maGeometry.nTopDecoration;
+ maGeometry.nBottomDecoration = m_pParent->maGeometry.nBottomDecoration;
+ maGeometry.nLeftDecoration = m_pParent->maGeometry.nLeftDecoration;
+ maGeometry.nRightDecoration = m_pParent->maGeometry.nRightDecoration;
}
else
{
- maGeometry.nTopDecoration = 0;
- maGeometry.nBottomDecoration = 0;
- maGeometry.nLeftDecoration = 0;
- maGeometry.nRightDecoration = 0;
+ maGeometry.nTopDecoration = 0;
+ maGeometry.nBottomDecoration = 0;
+ maGeometry.nLeftDecoration = 0;
+ maGeometry.nRightDecoration = 0;
}
}
else
@@ -660,7 +660,7 @@ extern "C" {
typedef void(*setAcceptFn)( GtkWindow*, gboolean );
static setAcceptFn p_gtk_window_set_accept_focus = NULL;
static bool bGetAcceptFocusFn = true;
-
+
typedef void(*setUserTimeFn)( GdkWindow*, guint32 );
static setUserTimeFn p_gdk_x11_window_set_user_time = NULL;
static bool bGetSetUserTimeFn = true;
@@ -745,7 +745,7 @@ static void lcl_set_user_time( GdkWindow* i_pWindow, guint32 i_nTime )
{
XChangeProperty( pDisplay, aWindow,
nUserTime, XA_CARDINAL, 32,
- PropModeReplace, (unsigned char*)&i_nTime, 1 );
+ PropModeReplace, (unsigned char*)&i_nTime, 1 );
}
}
};
@@ -809,7 +809,7 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
- eType = GDK_WINDOW_TYPE_HINT_DIALOG;
+ eType = GDK_WINDOW_TYPE_HINT_DIALOG;
if( (nStyle & SAL_FRAME_STYLE_INTRO) )
{
gtk_window_set_role( GTK_WINDOW(m_pWindow), "splashscreen" );
@@ -830,14 +830,14 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
{
eType = GDK_WINDOW_TYPE_HINT_UTILITY;
}
-
+
if( (nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN )
&& getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
}
-
+
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
if( bNoDecor )
gtk_window_set_decorated( GTK_WINDOW(m_pWindow), FALSE );
@@ -872,7 +872,7 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
if( ( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ) )
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), FALSE, false );
}
-
+
}
GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
@@ -912,7 +912,7 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow );
m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow );
gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK );
-
+
if( pSysData->nSize > sizeof(pSysData->nSize)+sizeof(pSysData->aWindow) && pSysData->bXEmbedSupport )
{
m_pWindow = gtk_plug_new( pSysData->aWindow );
@@ -951,7 +951,7 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
void GtkSalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
{
XEvent aEvent;
-
+
rtl_zeroMemory( &aEvent, sizeof(aEvent) );
aEvent.xclient.window = m_aForeignParentWindow;
aEvent.xclient.type = ClientMessage;
@@ -962,7 +962,7 @@ void GtkSalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
aEvent.xclient.data.l[2] = 0;
aEvent.xclient.data.l[3] = 0;
aEvent.xclient.data.l[4] = 0;
-
+
getDisplay()->GetXLib()->PushXErrorLevel( true );
XSendEvent( getDisplay()->GetDisplay(),
m_aForeignParentWindow,
@@ -1128,7 +1128,7 @@ void GtkSalFrame::SetIcon( USHORT nIcon )
nOffsets[0] = SV_ICON_LARGE_HC_START;
nOffsets[1] = SV_ICON_SMALL_HC_START;
}
-
+
for( nIndex = 0; nIndex < sizeof(nOffsets)/ sizeof(USHORT); nIndex++ )
{
// #i44723# workaround gcc temporary problem
@@ -1167,16 +1167,16 @@ void GtkSalFrame::SetIcon( USHORT nIcon )
aMask = aIcon.GetAlpha();
aIcon = BitmapEx( aBmp, aMask );
}
-
+
ImpBitmap *pIconImpBitmap = aIcon.ImplGetBitmapImpBitmap();
ImpBitmap *pIconImpMask = aIcon.ImplGetMaskImpBitmap();
-
+
if( pIconImpBitmap && pIconImpMask )
{
- SalBitmap *pIconBitmap =
+ SalBitmap *pIconBitmap =
pIconImpBitmap->ImplGetSalBitmap();
- SalBitmap *pIconMask =
+ SalBitmap *pIconMask =
pIconImpMask->ImplGetSalBitmap();
if( ( pBuf = bitmapToPixbuf( pIconBitmap, pIconMask ) ) )
@@ -1210,12 +1210,12 @@ void GtkSalFrame::Center()
}
else
{
- long nScreenWidth, nScreenHeight;
- long nScreenX = 0, nScreenY = 0;
+ long nScreenWidth, nScreenHeight;
+ long nScreenX = 0, nScreenY = 0;
- Size aScreenSize = GetX11SalData()->GetDisplay()->GetScreenSize( m_nScreen );
- nScreenWidth = aScreenSize.Width();
- nScreenHeight = aScreenSize.Height();
+ Size aScreenSize = GetX11SalData()->GetDisplay()->GetScreenSize( m_nScreen );
+ nScreenWidth = aScreenSize.Width();
+ nScreenHeight = aScreenSize.Height();
if( GetX11SalData()->GetDisplay()->IsXinerama() )
{
// get xinerama screen we are on
@@ -1230,10 +1230,10 @@ void GtkSalFrame::Center()
for( unsigned int i = 0; i < rScreens.size(); i++ )
if( rScreens[i].IsInside( Point( x, y ) ) )
{
- nScreenX = rScreens[i].Left();
- nScreenY = rScreens[i].Top();
- nScreenWidth = rScreens[i].GetWidth();
- nScreenHeight = rScreens[i].GetHeight();
+ nScreenX = rScreens[i].Left();
+ nScreenY = rScreens[i].Top();
+ nScreenWidth = rScreens[i].GetWidth();
+ nScreenHeight = rScreens[i].GetHeight();
break;
}
}
@@ -1245,7 +1245,7 @@ void GtkSalFrame::Center()
Size GtkSalFrame::calcDefaultSize()
{
- Size aScreenSize = GetX11SalData()->GetDisplay()->GetScreenSize( m_nScreen );
+ Size aScreenSize = GetX11SalData()->GetDisplay()->GetScreenSize( m_nScreen );
long w = aScreenSize.Width();
long h = aScreenSize.Height();
@@ -1292,7 +1292,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
{
if( m_pWindow )
{
- if( m_pParent && (m_pParent->m_nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN)
+ if( m_pParent && (m_pParent->m_nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN)
&& getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), bVisible );
if( bVisible )
@@ -1300,17 +1300,17 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
SessionManagerClient::open(); // will simply return after the first time
initClientId();
getDisplay()->startupNotificationCompleted();
-
+
if( m_bDefaultPos )
Center();
if( m_bDefaultSize )
SetDefaultSize();
setMinMaxSize();
-
+
// #i45160# switch to desktop where a dialog with parent will appear
if( m_pParent && m_pParent->m_nWorkArea != m_nWorkArea && GTK_WIDGET_MAPPED(m_pParent->m_pWindow) )
getDisplay()->getWMAdaptor()->switchToWorkArea( m_pParent->m_nWorkArea );
-
+
if( isFloatGrabWindow() &&
m_pParent &&
m_nFloats == 0 &&
@@ -1336,7 +1336,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
// metacity-2.24.0/src/core/window.c
//
// if ((focus_window != NULL) && XSERVER_TIME_IS_BEFORE (compare, focus_window->net_wm_user_time))
- // "compare" window focus prevented by other activity
+ // "compare" window focus prevented by other activity
//
// where "compare" is this window
@@ -1364,7 +1364,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
//nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
}
lcl_set_user_time( GTK_WIDGET(m_pWindow)->window, nUserTime );
-
+
if( bHack && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
m_bSetFocusOnMap = true;
@@ -1429,14 +1429,14 @@ void GtkSalFrame::setMinMaxSize()
{
if( m_aMinSize.Width() && m_aMinSize.Height() )
{
- aGeo.min_width = m_aMinSize.Width()+CONTAINER_ADJUSTMENT;
- aGeo.min_height = m_aMinSize.Height()+CONTAINER_ADJUSTMENT;
+ aGeo.min_width = m_aMinSize.Width()+CONTAINER_ADJUSTMENT;
+ aGeo.min_height = m_aMinSize.Height()+CONTAINER_ADJUSTMENT;
aHints |= GDK_HINT_MIN_SIZE;
}
if( m_aMaxSize.Width() && m_aMaxSize.Height() && ! m_bFullscreen )
{
- aGeo.max_width = m_aMaxSize.Width()+CONTAINER_ADJUSTMENT;
- aGeo.max_height = m_aMaxSize.Height()+CONTAINER_ADJUSTMENT;
+ aGeo.max_width = m_aMaxSize.Width()+CONTAINER_ADJUSTMENT;
+ aGeo.max_height = m_aMaxSize.Height()+CONTAINER_ADJUSTMENT;
aHints |= GDK_HINT_MAX_SIZE;
}
}
@@ -1452,12 +1452,6 @@ void GtkSalFrame::setMinMaxSize()
aHints |= GDK_HINT_MAX_SIZE;
}
}
- if( m_bFullscreen )
- {
- aGeo.max_width = m_aMaxSize.Width();
- aGeo.max_height = m_aMaxSize.Height();
- aHints |= GDK_HINT_MAX_SIZE;
- }
if( aHints )
gtk_window_set_geometry_hints( GTK_WINDOW(m_pWindow),
NULL,
@@ -1506,8 +1500,8 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHOR
if( (unsigned long)nWidth != maGeometry.nWidth || (unsigned long)nHeight != maGeometry.nHeight )
bSized = true;
- maGeometry.nWidth = nWidth;
- maGeometry.nHeight = nHeight;
+ maGeometry.nWidth = nWidth;
+ maGeometry.nHeight = nHeight;
if( isChild( false, true ) )
gtk_widget_set_size_request( m_pWindow, nWidth, nHeight );
@@ -1529,10 +1523,10 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHOR
nX += m_pParent->maGeometry.nX;
nY += m_pParent->maGeometry.nY;
}
-
+
// adjust position to avoid off screen windows
// but allow toolbars to be positioned partly off screen by the user
- Size aScreenSize = GetX11SalData()->GetDisplay()->GetScreenSize( m_nScreen );
+ Size aScreenSize = GetX11SalData()->GetDisplay()->GetScreenSize( m_nScreen );
if( ! (m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
{
if( nX < (long)maGeometry.nLeftDecoration )
@@ -1555,14 +1549,14 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHOR
if( nY > (long)aScreenSize.Height() - 10 )
nY = (long)aScreenSize.Height() - 10;
}
-
+
if( nX != maGeometry.nX || nY != maGeometry.nY )
bMoved = true;
maGeometry.nX = nX;
maGeometry.nY = nY;
-
+
m_bDefaultPos = false;
-
+
moveWindow( maGeometry.nX, maGeometry.nY );
updateScreenNumber();
@@ -1605,13 +1599,13 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
{
if( ! m_pWindow || ! pState || isChild( true, false ) )
return;
-
+
const ULONG nMaxGeometryMask =
SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_Y |
SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT |
SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
-
+
if( (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) &&
! ( m_nState & GDK_WINDOW_STATE_MAXIMIZED ) &&
(pState->mnState & SAL_FRAMESTATE_MAXIMIZED) &&
@@ -1620,7 +1614,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
resizeWindow( pState->mnWidth, pState->mnHeight );
moveWindow( pState->mnX, pState->mnY );
m_bDefaultPos = m_bDefaultSize = false;
-
+
maGeometry.nX = pState->mnMaximizedX;
maGeometry.nY = pState->mnMaximizedY;
maGeometry.nWidth = pState->mnMaximizedWidth;
@@ -1635,10 +1629,10 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT ) )
{
USHORT nPosSizeFlags = 0;
- long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0);
- long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0);
- long nWidth = pState->mnWidth;
- long nHeight = pState->mnHeight;
+ long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0);
+ long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0);
+ long nWidth = pState->mnWidth;
+ long nHeight = pState->mnHeight;
if( pState->mnMask & SAL_FRAMESTATE_MASK_X )
nPosSizeFlags |= SAL_FRAME_POSSIZE_X;
else
@@ -1697,22 +1691,22 @@ BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
pState->mnMaximizedY = maGeometry.nY;
pState->mnMaximizedWidth = maGeometry.nWidth;
pState->mnMaximizedHeight = maGeometry.nHeight;
- pState->mnMask |= SAL_FRAMESTATE_MASK_MAXIMIZED_X |
- SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
- SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH |
+ pState->mnMask |= SAL_FRAMESTATE_MASK_MAXIMIZED_X |
+ SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
+ SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH |
SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
}
else
{
-
- pState->mnX = maGeometry.nX;
- pState->mnY = maGeometry.nY;
- pState->mnWidth = maGeometry.nWidth;
- pState->mnHeight = maGeometry.nHeight;
+
+ pState->mnX = maGeometry.nX;
+ pState->mnY = maGeometry.nY;
+ pState->mnWidth = maGeometry.nWidth;
+ pState->mnHeight = maGeometry.nHeight;
}
- pState->mnMask |= SAL_FRAMESTATE_MASK_X |
- SAL_FRAMESTATE_MASK_Y |
- SAL_FRAMESTATE_MASK_WIDTH |
+ pState->mnMask |= SAL_FRAMESTATE_MASK_X |
+ SAL_FRAMESTATE_MASK_Y |
+ SAL_FRAMESTATE_MASK_WIDTH |
SAL_FRAMESTATE_MASK_HEIGHT;
return TRUE;
@@ -1722,12 +1716,12 @@ void GtkSalFrame::moveToScreen( int nScreen )
{
if( isChild() )
return;
-
+
if( nScreen < 0 || nScreen >= gdk_display_get_n_screens( getGdkDisplay() ) )
nScreen = m_nScreen;
if( nScreen == m_nScreen )
return;
-
+
GdkScreen* pScreen = gdk_display_get_screen( getGdkDisplay(), nScreen );
if( pScreen )
{
@@ -1737,13 +1731,13 @@ void GtkSalFrame::moveToScreen( int nScreen )
gtk_widget_realize( m_pWindow );
// update system data
GtkSalDisplay* pDisp = getDisplay();
- m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(m_pWindow->window);
- m_aSystemData.pVisual = pDisp->GetVisual( m_nScreen ).GetVisual();
- m_aSystemData.nScreen = nScreen;
- m_aSystemData.nDepth = pDisp->GetVisual( m_nScreen ).GetDepth();
- m_aSystemData.aColormap = pDisp->GetColormap( m_nScreen ).GetXColormap();
- m_aSystemData.pAppContext = NULL;
- m_aSystemData.aShellWindow = m_aSystemData.aWindow;
+ m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(m_pWindow->window);
+ m_aSystemData.pVisual = pDisp->GetVisual( m_nScreen ).GetVisual();
+ m_aSystemData.nScreen = nScreen;
+ m_aSystemData.nDepth = pDisp->GetVisual( m_nScreen ).GetDepth();
+ m_aSystemData.aColormap = pDisp->GetColormap( m_nScreen ).GetXColormap();
+ m_aSystemData.pAppContext = NULL;
+ m_aSystemData.aShellWindow = m_aSystemData.aWindow;
// update graphics if necessary
for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
{
@@ -1758,7 +1752,7 @@ void GtkSalFrame::moveToScreen( int nScreen )
std::list< GtkSalFrame* > aChildren = m_aChildren;
for( std::list< GtkSalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
(*it)->moveToScreen( m_nScreen );
-
+
// FIXME: SalObjects
}
@@ -1766,7 +1760,7 @@ void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
{
if( nNewScreen == maGeometry.nScreenNumber )
return;
-
+
if( m_pWindow && ! isChild() )
{
GtkSalDisplay* pDisp = getDisplay();
@@ -1774,7 +1768,7 @@ void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
{
if( nNewScreen >= pDisp->GetXineramaScreens().size() )
return;
-
+
Rectangle aOldScreenRect( pDisp->GetXineramaScreens()[maGeometry.nScreenNumber] );
Rectangle aNewScreenRect( pDisp->GetXineramaScreens()[nNewScreen] );
bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
@@ -1832,7 +1826,11 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
// workaround different legacy version window managers have different opinions about
// _NET_WM_STATE_FULLSCREEN (Metacity <-> KWin)
if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
+ {
+ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
gtk_window_fullscreen( GTK_WINDOW( m_pWindow ) );
+ }
if( bVisible )
Show( TRUE );
}
@@ -1863,14 +1861,11 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
{
if( bFullScreen )
{
- if( getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
- {
- if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
- }
+ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
gtk_window_fullscreen( GTK_WINDOW(m_pWindow) );
moveToScreen( nScreen );
- Size aScreenSize = pDisp->GetScreenSize( m_nScreen );
+ Size aScreenSize = pDisp->GetScreenSize( m_nScreen );
maGeometry.nX = 0;
maGeometry.nY = 0;
maGeometry.nWidth = aScreenSize.Width();
@@ -1879,11 +1874,8 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
else
{
gtk_window_unfullscreen( GTK_WINDOW(m_pWindow) );
- if( getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
- {
- if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), FALSE );
- }
+ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), FALSE );
moveToScreen( nScreen );
}
}
@@ -1902,7 +1894,7 @@ void GtkSalFrame::setAutoLock( bool bLock )
{
if( isChild() )
return;
-
+
GdkScreen *pScreen = gtk_window_get_screen( GTK_WINDOW(m_pWindow) );
GdkDisplay *pDisplay = gdk_screen_get_display( pScreen );
GdkWindow *pRootWin = gdk_screen_get_root_window( pScreen );
@@ -2051,7 +2043,7 @@ void GtkSalFrame::StartPresentation( BOOL bStart )
bPreferBlanking, bAllowExposures );
}
#ifdef ENABLE_DBUS
- m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation",
+ m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation",
GDK_WINDOW_XID(m_pWindow->window));
#endif
}
@@ -2120,7 +2112,7 @@ void GtkSalFrame::SetPointer( PointerStyle ePointerStyle )
GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
gdk_window_set_cursor( m_pWindow->window, pCursor );
m_pCurrentCursor = pCursor;
-
+
// #i80791# use grabPointer the same way as CaptureMouse, respective float grab
if( getDisplay()->MouseCaptured( this ) )
grabPointer( TRUE, FALSE );
@@ -2152,7 +2144,7 @@ void GtkSalFrame::grabPointer( BOOL bGrab, BOOL bOwnerEvents )
if( bUseGdkGrab )
{
const int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
-
+
gdk_pointer_grab( m_pWindow->window, bOwnerEvents,
(GdkEventMask) nMask, NULL, m_pCurrentCursor,
GDK_CURRENT_TIME );
@@ -2198,7 +2190,7 @@ void GtkSalFrame::SetPointerPos( long nX, long nY )
pFrame = pFrame->m_pParent;
if( ! pFrame )
return;
-
+
GdkScreen *pScreen = gtk_window_get_screen( GTK_WINDOW(pFrame->m_pWindow) );
GdkDisplay *pDisplay = gdk_screen_get_display( pScreen );
@@ -2323,8 +2315,8 @@ void GtkSalFrame::UpdateSettings( AllSettings& rSettings )
bFreeGraphics = true;
}
- pGraphics->updateSettings( rSettings );
-
+ pGraphics->updateSettings( rSettings );
+
if( bFreeGraphics )
ReleaseGraphics( pGraphics );
}
@@ -2365,7 +2357,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
bool bWasVisible = GTK_WIDGET_MAPPED(m_pWindow);
if( bWasVisible )
Show( FALSE );
-
+
if( nScreen < 0 || nScreen >= getDisplay()->GetScreenCount() )
nScreen = m_nScreen;
@@ -2439,18 +2431,18 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
m_aGraphics[i].pGraphics->SetWindow( m_pWindow );
}
}
-
+
if( m_aTitle.Len() )
SetTitle( m_aTitle );
-
+
if( bWasVisible )
Show( TRUE );
-
+
std::list< GtkSalFrame* > aChildren = m_aChildren;
m_aChildren.clear();
for( std::list< GtkSalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
(*it)->createNewWindow( None, false, m_nScreen );
-
+
// FIXME: SalObjects
}
@@ -2480,11 +2472,11 @@ void GtkSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
if( m_pRegion )
{
GdkRectangle aRect;
- aRect.x = nX;
- aRect.y = nY;
- aRect.width = nWidth;
- aRect.height = nHeight;
-
+ aRect.x = nX;
+ aRect.y = nY;
+ aRect.width = nWidth;
+ aRect.height = nHeight;
+
gdk_region_union_with_rect( m_pRegion, &aRect );
}
}
@@ -2498,7 +2490,7 @@ void GtkSalFrame::EndSetClipRegion()
bool GtkSalFrame::Dispatch( const XEvent* pEvent )
{
bool bContinueDispatch = true;
-
+
if( pEvent->type == PropertyNotify )
{
vcl_sal::WMAdaptor* pAdaptor = getDisplay()->getWMAdaptor();
@@ -2629,15 +2621,15 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
}
switch( pEvent->button )
{
- case 1: aEvent.mnButton = MOUSE_LEFT; break;
- case 2: aEvent.mnButton = MOUSE_MIDDLE; break;
- case 3: aEvent.mnButton = MOUSE_RIGHT; break;
+ case 1: aEvent.mnButton = MOUSE_LEFT; break;
+ case 2: aEvent.mnButton = MOUSE_MIDDLE; break;
+ case 3: aEvent.mnButton = MOUSE_RIGHT; break;
default: return FALSE;
}
- aEvent.mnTime = pEvent->time;
- aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
- aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
- aEvent.mnCode = GetMouseModCode( pEvent->state );
+ aEvent.mnTime = pEvent->time;
+ aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
+ aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
+ aEvent.mnCode = GetMouseModCode( pEvent->state );
bool bClosePopups = false;
if( pEvent->type == GDK_BUTTON_PRESS &&
@@ -2669,7 +2661,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
// --- RTL --- (mirror mouse pos)
if( Application::GetSettings().GetLayoutRTL() )
aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
-
+
vcl::DeletionListener aDel( pThis );
pThis->CallCallback( nEventType, &aEvent );
@@ -2708,7 +2700,7 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame
GtkSalFrame* pThis = (GtkSalFrame*)frame;
GdkEventScroll* pSEvent = (GdkEventScroll*)pEvent;
- static ULONG nLines = 0;
+ static ULONG nLines = 0;
if( ! nLines )
{
char* pEnv = getenv( "SAL_WHEELLINES" );
@@ -2719,14 +2711,14 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame
bool bNeg = (pSEvent->direction == GDK_SCROLL_DOWN || pSEvent->direction == GDK_SCROLL_RIGHT );
SalWheelMouseEvent aEvent;
- aEvent.mnTime = pSEvent->time;
- aEvent.mnX = (ULONG)pSEvent->x;
- aEvent.mnY = (ULONG)pSEvent->y;
- aEvent.mnDelta = bNeg ? -120 : 120;
- aEvent.mnNotchDelta = bNeg ? -1 : 1;
- aEvent.mnScrollLines = nLines;
- aEvent.mnCode = GetMouseModCode( pSEvent->state );
- aEvent.mbHorz = (pSEvent->direction == GDK_SCROLL_LEFT || pSEvent->direction == GDK_SCROLL_RIGHT);
+ aEvent.mnTime = pSEvent->time;
+ aEvent.mnX = (ULONG)pSEvent->x;
+ aEvent.mnY = (ULONG)pSEvent->y;
+ aEvent.mnDelta = bNeg ? -120 : 120;
+ aEvent.mnNotchDelta = bNeg ? -1 : 1;
+ aEvent.mnScrollLines = nLines;
+ aEvent.mnCode = GetMouseModCode( pSEvent->state );
+ aEvent.mbHorz = (pSEvent->direction == GDK_SCROLL_LEFT || pSEvent->direction == GDK_SCROLL_RIGHT);
GTK_YIELD_GRAB();
@@ -2744,15 +2736,15 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
GtkSalFrame* pThis = (GtkSalFrame*)frame;
SalMouseEvent aEvent;
- aEvent.mnTime = pEvent->time;
- aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
- aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
- aEvent.mnCode = GetMouseModCode( pEvent->state );
- aEvent.mnButton = 0;
+ aEvent.mnTime = pEvent->time;
+ aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
+ aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
+ aEvent.mnCode = GetMouseModCode( pEvent->state );
+ aEvent.mnButton = 0;
GTK_YIELD_GRAB();
-
+
// --- RTL --- (mirror mouse pos)
if( Application::GetSettings().GetLayoutRTL() )
aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
@@ -2788,11 +2780,11 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpoi
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
SalMouseEvent aEvent;
- aEvent.mnTime = pEvent->time;
- aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
- aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
- aEvent.mnCode = GetMouseModCode( pEvent->state );
- aEvent.mnButton = 0;
+ aEvent.mnTime = pEvent->time;
+ aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
+ aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
+ aEvent.mnCode = GetMouseModCode( pEvent->state );
+ aEvent.mnButton = 0;
GTK_YIELD_GRAB();
pThis->CallCallback( (pEvent->type == GDK_ENTER_NOTIFY) ? SALEVENT_MOUSEMOVE : SALEVENT_MOUSELEAVE, &aEvent );
@@ -2849,12 +2841,52 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
return FALSE;
}
+IMPL_LINK( GtkSalFrame, ImplDelayedFullScreenHdl, void*, EMPTYARG )
+{
+ Atom nStateAtom = getDisplay()->getWMAdaptor()->getAtom(vcl_sal::WMAdaptor::NET_WM_STATE);
+ Atom nFSAtom = getDisplay()->getWMAdaptor()->getAtom(vcl_sal::WMAdaptor::NET_WM_STATE_FULLSCREEN );
+ if( nStateAtom && nFSAtom )
+ {
+ /* #i110881# workaround a gtk issue (see https://bugzilla.redhat.com/show_bug.cgi?id=623191#c8)
+ gtk_window_fullscreen can fail due to a race condition, request an additional status change
+ to fullscreen to be safe
+ */
+ XEvent aEvent;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = getDisplay()->GetDisplay();
+ aEvent.xclient.window = GDK_WINDOW_XWINDOW(m_pWindow->window);
+ aEvent.xclient.message_type = nStateAtom;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = 1;
+ aEvent.xclient.data.l[1] = nFSAtom;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
+ XSendEvent( getDisplay()->GetDisplay(),
+ getDisplay()->GetRootWindow( m_nScreen ),
+ False,
+ SubstructureNotifyMask | SubstructureRedirectMask,
+ &aEvent
+ );
+ }
+
+ return 0;
+}
+
gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame )
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
GTK_YIELD_GRAB();
-
+
+ if( pThis->m_bFullscreen )
+ {
+ /* #i110881# workaorund a gtk issue (see https://bugzilla.redhat.com/show_bug.cgi?id=623191#c8)
+ gtk_window_fullscreen can run into a race condition with the window's showstate
+ */
+ Application::PostUserEvent( LINK( pThis, GtkSalFrame, ImplDelayedFullScreenHdl ) );
+ }
+
bool bSetFocus = pThis->m_bSetFocusOnMap;
pThis->m_bSetFocusOnMap = false;
if( ImplGetSVData()->mbIsTestTool )
@@ -2875,7 +2907,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame )
GDK_WINDOW_XWINDOW( GTK_WIDGET(pThis->m_pWindow)->window),
RevertToParent, CurrentTime );
}
-
+
pThis->CallCallback( SALEVENT_RESIZE, NULL );
return FALSE;
@@ -2929,8 +2961,8 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
if( x != pThis->maGeometry.nX || y != pThis->maGeometry.nY )
{
bMoved = true;
- pThis->maGeometry.nX = x;
- pThis->maGeometry.nY = y;
+ pThis->maGeometry.nX = x;
+ pThis->maGeometry.nY = y;
}
/* #i86302#
* for non sizeable windows we set the min and max hint for the window manager to
@@ -2945,20 +2977,20 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
if( pEvent->width != (int)pThis->maGeometry.nWidth || pEvent->height != (int)pThis->maGeometry.nHeight )
{
bSized = true;
- pThis->maGeometry.nWidth = pEvent->width;
- pThis->maGeometry.nHeight = pEvent->height;
+ pThis->maGeometry.nWidth = pEvent->width;
+ pThis->maGeometry.nHeight = pEvent->height;
}
}
-
+
// update decoration hints
if( ! (pThis->m_nStyle & SAL_FRAME_STYLE_PLUG) )
{
GdkRectangle aRect;
gdk_window_get_frame_extents( GTK_WIDGET(pThis->m_pWindow)->window, &aRect );
- pThis->maGeometry.nTopDecoration = y - aRect.y;
- pThis->maGeometry.nBottomDecoration = aRect.y + aRect.height - y - pEvent->height;
- pThis->maGeometry.nLeftDecoration = x - aRect.x;
- pThis->maGeometry.nRightDecoration = aRect.x + aRect.width - x - pEvent->width;
+ pThis->maGeometry.nTopDecoration = y - aRect.y;
+ pThis->maGeometry.nBottomDecoration = aRect.y + aRect.height - y - pEvent->height;
+ pThis->maGeometry.nLeftDecoration = x - aRect.x;
+ pThis->maGeometry.nRightDecoration = aRect.x + aRect.width - x - pEvent->width;
}
else
{
@@ -3054,7 +3086,7 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
// except Mac OS X
case GDK_Meta_L:
case GDK_Super_L:
- nExtModMask = MODKEY_LMOD3;
+ nExtModMask = MODKEY_LMOD3;
nModMask = KEY_MOD3;
break;
case GDK_Meta_R:
@@ -3092,9 +3124,9 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
{
SalKeyEvent aKeyEvt;
- aKeyEvt.mnCode = KEY_MENU | nModCode;
+ aKeyEvt.mnCode = KEY_MENU | nModCode;
aKeyEvt.mnRepeat = 0;
- aKeyEvt.mnTime = pEvent->time;
+ aKeyEvt.mnTime = pEvent->time;
aKeyEvt.mnCharCode = 0;
// simulate KEY_MENU
@@ -3174,7 +3206,7 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
aWin,
pThis->m_hBackgroundPixmap );
}
-
+
if( ! pThis->m_pParent )
{
// signalize theme changed for NWF caches
@@ -3188,7 +3220,7 @@ gboolean GtkSalFrame::signalState( GtkWidget*, GdkEvent* pEvent, gpointer frame
GtkSalFrame* pThis = (GtkSalFrame*)frame;
if( (pThis->m_nState & GDK_WINDOW_STATE_ICONIFIED) != (pEvent->window_state.new_window_state & GDK_WINDOW_STATE_ICONIFIED ) )
pThis->getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_RESIZE );
-
+
if( (pEvent->window_state.new_window_state & GDK_WINDOW_STATE_MAXIMIZED) &&
! (pThis->m_nState & GDK_WINDOW_STATE_MAXIMIZED) )
{
@@ -3315,15 +3347,15 @@ void GtkSalFrame::IMHandler::setInputContext( SalInputContext* )
void GtkSalFrame::IMHandler::sendEmptyCommit()
{
vcl::DeletionListener aDel( m_pFrame );
-
+
SalExtTextInputEvent aEmptyEv;
- aEmptyEv.mnTime = 0;
- aEmptyEv.mpTextAttr = 0;
- aEmptyEv.maText = String();
- aEmptyEv.mnCursorPos = 0;
- aEmptyEv.mnCursorFlags = 0;
- aEmptyEv.mnDeltaStart = 0;
- aEmptyEv.mbOnlyCursor = False;
+ aEmptyEv.mnTime = 0;
+ aEmptyEv.mpTextAttr = 0;
+ aEmptyEv.maText = String();
+ aEmptyEv.mnCursorPos = 0;
+ aEmptyEv.mnCursorFlags = 0;
+ aEmptyEv.mnDeltaStart = 0;
+ aEmptyEv.mbOnlyCursor = False;
m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aEmptyEv );
if( ! aDel.isDeleted() )
m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
@@ -3389,7 +3421,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
// for us.
m_aPrevKeyPresses.push_back( PreviousKeyPress(pEvent) );
m_nPrevKeyPresses++;
-
+
// Also pop off the earliest key press event if there are more than 10
// already.
while (m_nPrevKeyPresses > 10)
@@ -3397,7 +3429,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
m_aPrevKeyPresses.pop_front();
m_nPrevKeyPresses--;
}
-
+
GObject* pRef = G_OBJECT( g_object_ref( G_OBJECT( m_pIMContext ) ) );
// #i51353# update spot location on every key input since we cannot
@@ -3405,7 +3437,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
updateIMSpotLocation();
if( aDel.isDeleted() )
return true;
-
+
gboolean bResult = gtk_im_context_filter_keypress( m_pIMContext, pEvent );
g_object_unref( pRef );
@@ -3432,7 +3464,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
}
}
}
-
+
// Determine if we got an earlier key press event corresponding to this key release
if (pEvent->type == GDK_KEY_RELEASE)
{
@@ -3442,7 +3474,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
if( aDel.isDeleted() )
return true;
-
+
m_bPreeditJustChanged = false;
std::list<PreviousKeyPress>::iterator iter = m_aPrevKeyPresses.begin();
@@ -3463,7 +3495,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
if( bResult )
return true;
}
-
+
return false;
}
@@ -3507,17 +3539,17 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
// open a block that will end the GTK_YIELD_GRAB before calling preedit changed again
{
GTK_YIELD_GRAB();
-
- pThis->m_aInputEvent.mnTime = 0;
- pThis->m_aInputEvent.mpTextAttr = 0;
- pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
- pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.Len();
- pThis->m_aInputEvent.mnCursorFlags = 0;
- pThis->m_aInputEvent.mnDeltaStart = 0;
- pThis->m_aInputEvent.mbOnlyCursor = False;
-
+
+ pThis->m_aInputEvent.mnTime = 0;
+ pThis->m_aInputEvent.mpTextAttr = 0;
+ pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
+ pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.Len();
+ pThis->m_aInputEvent.mnCursorFlags = 0;
+ pThis->m_aInputEvent.mnDeltaStart = 0;
+ pThis->m_aInputEvent.mbOnlyCursor = False;
+
pThis->m_aInputFlags.clear();
-
+
/* necessary HACK: all keyboard input comes in here as soon as a IMContext is set
* which is logical and consequent. But since even simple input like
* <space> comes through the commit signal instead of signalKey
@@ -3541,7 +3573,7 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
{
const PreviousKeyPress& rKP = pThis->m_aPrevKeyPresses.back();
sal_Unicode aOrigCode = pThis->m_aInputEvent.maText.GetChar(0);
-
+
if( checkSingleKeyCommitHack( rKP.keyval, aOrigCode ) )
{
pThis->m_pFrame->doKeyCallback( rKP.state, rKP.keyval, rKP.hardware_keycode, rKP.group, rKP.time, aOrigCode, true, true );
@@ -3575,9 +3607,9 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
{
GtkSalFrame::IMHandler* pThis = (GtkSalFrame::IMHandler*)im_handler;
- char* pText = NULL;
- PangoAttrList* pAttrs = NULL;
- gint nCursorPos = 0;
+ char* pText = NULL;
+ PangoAttrList* pAttrs = NULL;
+ gint nCursorPos = 0;
gtk_im_context_get_preedit_string( pThis->m_pIMContext,
&pText,
@@ -3591,16 +3623,16 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
if( pThis->m_aInputEvent.maText.Len() == 0 )
{
g_free( pText );
- return;
+ return;
}
}
pThis->m_bPreeditJustChanged = true;
bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != NULL;
- pThis->m_aInputEvent.mnTime = 0;
- pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
- pThis->m_aInputEvent.mnCursorPos = nCursorPos;
+ pThis->m_aInputEvent.mnTime = 0;
+ pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
+ pThis->m_aInputEvent.mnCursorPos = nCursorPos;
pThis->m_aInputEvent.mnCursorFlags = 0;
pThis->m_aInputEvent.mnDeltaStart = 0;
pThis->m_aInputEvent.mbOnlyCursor = False;
@@ -3614,21 +3646,21 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
GSList *tmp_list = NULL;
gint start, end;
guint sal_attr = 0;
-
+
pango_attr_iterator_range (iter, &start, &end);
if (end == G_MAXINT)
end = pText ? strlen (pText) : 0;
if (end == start)
continue;
-
+
start = g_utf8_pointer_to_offset (pText, pText + start);
end = g_utf8_pointer_to_offset (pText, pText + end);
-
+
tmp_list = attr_list = pango_attr_iterator_get_attrs (iter);
while (tmp_list)
{
PangoAttribute *pango_attr = (PangoAttribute *)(tmp_list->data);
-
+
switch (pango_attr->klass->type)
{
case PANGO_ATTR_BACKGROUND:
@@ -3649,21 +3681,21 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
if (sal_attr == 0)
sal_attr |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
g_slist_free (attr_list);
-
+
// Set the sal attributes on our text
for (int i = start; i < end; i++)
pThis->m_aInputFlags[i] |= sal_attr;
} while (pango_attr_iterator_next (iter));
- pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
+ pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
g_free( pText );
pango_attr_list_unref( pAttrs );
GTK_YIELD_GRAB();
-
+
vcl::DeletionListener aDel( pThis->m_pFrame );
-
+
pThis->m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pThis->m_aInputEvent);
if( bEndPreedit && ! aDel.isDeleted() )
pThis->doCallEndExtTextInput();
@@ -3681,14 +3713,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
GTK_YIELD_GRAB();
pThis->m_bPreeditJustChanged = true;
-
+
vcl::DeletionListener aDel( pThis->m_pFrame );
pThis->doCallEndExtTextInput();
if( ! aDel.isDeleted() )
pThis->updateIMSpotLocation();
}
-uno::Reference<accessibility::XAccessibleEditableText>
+uno::Reference<accessibility::XAccessibleEditableText>
FindFocus(uno::Reference< accessibility::XAccessibleContext > xContext)
{
if (!xContext.is())
@@ -3741,7 +3773,7 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon
return FALSE;
rtl::OString sUTF = rtl::OUStringToOString(sAllText, RTL_TEXTENCODING_UTF8);
rtl::OUString sCursorText(sAllText, nPosition);
- gtk_im_context_set_surrounding(pContext, sUTF.getStr(), sUTF.getLength(),
+ gtk_im_context_set_surrounding(pContext, sUTF.getStr(), sUTF.getLength(),
rtl::OUStringToOString(sCursorText, RTL_TEXTENCODING_UTF8).getLength());
return TRUE;
}
@@ -3749,7 +3781,7 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon
return FALSE;
}
-gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
+gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
gpointer /*im_handler*/ )
{
uno::Reference<accessibility::XAccessibleEditableText> xText = lcl_GetxText();
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index 2a2bbe78078a..59a4a8f2336a 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@
#include <plugins/gtk/gtkdata.hxx>
#include <plugins/gtk/gtkinst.hxx>
-GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
+GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
: m_pSocket( NULL ),
m_pRegion( NULL )
{
@@ -56,25 +56,25 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
//system data
SalDisplay* pDisp = GetX11SalData()->GetDisplay();
- m_aSystemData.nSize = sizeof( SystemChildData );
- m_aSystemData.pDisplay = pDisp->GetDisplay();
- m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(m_pSocket->window);
- m_aSystemData.pSalFrame = NULL;
- m_aSystemData.pWidget = m_pSocket;
- m_aSystemData.pVisual = pDisp->GetVisual(pParent->getScreenNumber()).GetVisual();
- m_aSystemData.nScreen = pParent->getScreenNumber();
- m_aSystemData.nDepth = pDisp->GetVisual(pParent->getScreenNumber()).GetDepth();
- m_aSystemData.aColormap = pDisp->GetColormap(pParent->getScreenNumber()).GetXColormap();
- m_aSystemData.pAppContext = NULL;
- m_aSystemData.aShellWindow = GDK_WINDOW_XWINDOW(GTK_WIDGET(pParent->getWindow())->window);
- m_aSystemData.pShellWidget = GTK_WIDGET(pParent->getWindow());
+ m_aSystemData.nSize = sizeof( SystemChildData );
+ m_aSystemData.pDisplay = pDisp->GetDisplay();
+ m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(m_pSocket->window);
+ m_aSystemData.pSalFrame = NULL;
+ m_aSystemData.pWidget = m_pSocket;
+ m_aSystemData.pVisual = pDisp->GetVisual(pParent->getScreenNumber()).GetVisual();
+ m_aSystemData.nScreen = pParent->getScreenNumber();
+ m_aSystemData.nDepth = pDisp->GetVisual(pParent->getScreenNumber()).GetDepth();
+ m_aSystemData.aColormap = pDisp->GetColormap(pParent->getScreenNumber()).GetXColormap();
+ m_aSystemData.pAppContext = NULL;
+ m_aSystemData.aShellWindow = GDK_WINDOW_XWINDOW(GTK_WIDGET(pParent->getWindow())->window);
+ m_aSystemData.pShellWidget = GTK_WIDGET(pParent->getWindow());
g_signal_connect( G_OBJECT(m_pSocket), "button-press-event", G_CALLBACK(signalButton), this );
g_signal_connect( G_OBJECT(m_pSocket), "button-release-event", G_CALLBACK(signalButton), this );
g_signal_connect( G_OBJECT(m_pSocket), "focus-in-event", G_CALLBACK(signalFocus), this );
g_signal_connect( G_OBJECT(m_pSocket), "focus-out-event", G_CALLBACK(signalFocus), this );
g_signal_connect( G_OBJECT(m_pSocket), "destroy", G_CALLBACK(signalDestroy), this );
-
+
// #i59255# necessary due to sync effects with java child windows
pParent->Sync();
}
@@ -119,11 +119,11 @@ void GtkSalObject::BeginSetClipRegion( ULONG )
void GtkSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
{
GdkRectangle aRect;
- aRect.x = nX;
- aRect.y = nY;
- aRect.width = nWidth;
- aRect.height = nHeight;
-
+ aRect.x = nX;
+ aRect.y = nY;
+ aRect.width = nWidth;
+ aRect.height = nHeight;
+
gdk_region_union_with_rect( m_pRegion, &aRect );
}
@@ -176,7 +176,7 @@ const SystemEnvData* GtkSalObject::GetSystemData() const
return &m_aSystemData;
}
-
+
gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer object )
{
GtkSalObject* pThis = (GtkSalObject*)object;
diff --git a/vcl/unx/headless/svpbmp.cxx b/vcl/unx/headless/svpbmp.cxx
index 7c84c4a7a579..193700cf8081 100644
--- a/vcl/unx/headless/svpbmp.cxx
+++ b/vcl/unx/headless/svpbmp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,8 +42,8 @@ SvpSalBitmap::~SvpSalBitmap()
{
}
-bool SvpSalBitmap::Create( const Size& rSize,
- USHORT nBitCount,
+bool SvpSalBitmap::Create( const Size& rSize,
+ USHORT nBitCount,
const BitmapPalette& rPalette )
{
sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT;
@@ -129,7 +129,7 @@ Size SvpSalBitmap::GetSize() const
B2IVector aVec( m_aBitmap->getSize() );
aSize = Size( aVec.getX(), aVec.getY() );
}
-
+
return aSize;
}
@@ -140,7 +140,7 @@ USHORT SvpSalBitmap::GetBitCount() const
nDepth = getBitCountFromScanlineFormat( m_aBitmap->getScanlineFormat() );
return nDepth;
}
-
+
BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
{
BitmapBuffer* pBuf = NULL;
@@ -293,7 +293,7 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
sal_uInt32 nEntries = 1U << nBitCount;
boost::shared_ptr< std::vector<basebmp::Color> > pPal(
- new std::vector<basebmp::Color>( nEntries,
+ new std::vector<basebmp::Color>( nEntries,
basebmp::Color(COL_WHITE)));
const sal_uInt32 nColors = std::min(
(sal_uInt32)pBuffer->maPalette.GetEntryCount(),
@@ -303,9 +303,9 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
const BitmapColor& rCol = pBuffer->maPalette[i];
(*pPal)[i] = basebmp::Color( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() );
}
-
- m_aBitmap = basebmp::createBitmapDevice( m_aBitmap->getSize(),
- m_aBitmap->isTopDown(),
+
+ m_aBitmap = basebmp::createBitmapDevice( m_aBitmap->getSize(),
+ m_aBitmap->isTopDown(),
m_aBitmap->getScanlineFormat(),
m_aBitmap->getBuffer(),
pPal );
diff --git a/vcl/unx/headless/svpbmp.hxx b/vcl/unx/headless/svpbmp.hxx
index dc775e66aaf1..1b568c5dc789 100644
--- a/vcl/unx/headless/svpbmp.hxx
+++ b/vcl/unx/headless/svpbmp.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,28 +37,28 @@ class SvpSalBitmap : public SalBitmap, public SvpElement
public:
SvpSalBitmap() {}
virtual ~SvpSalBitmap();
-
+
const basebmp::BitmapDeviceSharedPtr& getBitmap() const { return m_aBitmap; }
void setBitmap( const basebmp::BitmapDeviceSharedPtr& rSrc ) { m_aBitmap = rSrc; }
-
+
// SvpElement
virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aBitmap; }
-
+
// SalBitmap
- virtual bool Create( const Size& rSize,
- USHORT nBitCount,
+ virtual bool Create( const Size& rSize,
+ USHORT nBitCount,
const BitmapPalette& rPal );
- virtual bool Create( const SalBitmap& rSalBmp );
- virtual bool Create( const SalBitmap& rSalBmp,
+ virtual bool Create( const SalBitmap& rSalBmp );
+ virtual bool Create( const SalBitmap& rSalBmp,
SalGraphics* pGraphics );
- virtual bool Create( const SalBitmap& rSalBmp,
+ virtual bool Create( const SalBitmap& rSalBmp,
USHORT nNewBitCount );
- virtual void Destroy();
- virtual Size GetSize() const;
- virtual USHORT GetBitCount() const;
-
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
- virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+ virtual void Destroy();
+ virtual Size GetSize() const;
+ virtual USHORT GetBitCount() const;
+
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
virtual bool GetSystemData( BitmapSystemData& rData );
};
diff --git a/vcl/unx/headless/svpdummies.cxx b/vcl/unx/headless/svpdummies.cxx
index 5983ff18c34f..1d26086ed05e 100644
--- a/vcl/unx/headless/svpdummies.cxx
+++ b/vcl/unx/headless/svpdummies.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,17 +32,17 @@
// SalObject
SvpSalObject::SvpSalObject()
{
- m_aSystemChildData.nSize = sizeof( SystemChildData );
- m_aSystemChildData.pDisplay = NULL;
- m_aSystemChildData.aWindow = 0;
+ m_aSystemChildData.nSize = sizeof( SystemChildData );
+ m_aSystemChildData.pDisplay = NULL;
+ m_aSystemChildData.aWindow = 0;
m_aSystemChildData.pSalFrame = 0;
- m_aSystemChildData.pWidget = 0;
- m_aSystemChildData.pVisual = 0;
- m_aSystemChildData.nDepth = 0;
- m_aSystemChildData.aColormap = 0;
- m_aSystemChildData.pAppContext = NULL;
- m_aSystemChildData.aShellWindow = 0;
- m_aSystemChildData.pShellWidget = NULL;
+ m_aSystemChildData.pWidget = 0;
+ m_aSystemChildData.pVisual = 0;
+ m_aSystemChildData.nDepth = 0;
+ m_aSystemChildData.aColormap = 0;
+ m_aSystemChildData.pAppContext = NULL;
+ m_aSystemChildData.aShellWindow = 0;
+ m_aSystemChildData.pShellWidget = NULL;
}
SvpSalObject::~SvpSalObject()
diff --git a/vcl/unx/headless/svpdummies.hxx b/vcl/unx/headless/svpdummies.hxx
index febf7eef6bbe..3717d99d3cab 100644
--- a/vcl/unx/headless/svpdummies.hxx
+++ b/vcl/unx/headless/svpdummies.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,21 +43,21 @@ public:
virtual ~SvpSalObject();
// overload all pure virtual methods
- virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual void EndSetClipRegion();
+ virtual void ResetClipRegion();
+ virtual USHORT GetClipRegionType();
+ virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
- virtual void Show( BOOL bVisible );
- virtual void Enable( BOOL nEnable );
- virtual void GrabFocus();
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
- virtual void SetBackground();
- virtual void SetBackground( SalColor nSalColor );
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
- virtual const SystemEnvData* GetSystemData() const;
+ virtual const SystemEnvData* GetSystemData() const;
};
class SvpImeStatus : public SalI18NImeStatus
@@ -83,7 +83,7 @@ class SvpSalSystem : public SalSystem
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
virtual rtl::OUString GetScreenName( unsigned int nScreen );
-
+
virtual int ShowNativeMessageBox( const String& rTitle,
const String& rMessage,
int nButtonCombination,
diff --git a/vcl/unx/headless/svpelement.cxx b/vcl/unx/headless/svpelement.cxx
index 4041e2f7739a..e16c8c9eb97a 100644
--- a/vcl/unx/headless/svpelement.cxx
+++ b/vcl/unx/headless/svpelement.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,16 +57,16 @@ class SvpElementContainer
std::list< SvpElement* > m_aElements;
int m_nSocket;
oslThread m_aThread;
-
+
SvpElementContainer();
~SvpElementContainer();
public:
void registerElement( SvpElement* pElement ) { m_aElements.push_back(pElement); }
void deregisterElement( SvpElement* pElement ) { m_aElements.remove(pElement); }
-
+
void run();
DECL_LINK(processRequest,void*);
-
+
static SvpElementContainer& get();
};
@@ -86,7 +86,7 @@ SvpElementContainer::SvpElementContainer()
if( m_nSocket >= 0)
{
int nOn = 1;
- if( setsockopt(m_nSocket, SOL_SOCKET, SO_REUSEADDR,
+ if( setsockopt(m_nSocket, SOL_SOCKET, SO_REUSEADDR,
(char*)&nOn, sizeof(nOn)) )
{
perror( "SvpElementContainer: changing socket options failed" );
@@ -165,7 +165,7 @@ static const char* matchType( SvpElement* pEle )
IMPL_LINK( SvpElementContainer, processRequest, void*, pSocket )
{
int nFile = (int)pSocket;
-
+
rtl::OStringBuffer aBuf( 256 ), aAnswer( 256 );
char c;
while( read( nFile, &c, 1 ) && c != '\n' )
@@ -228,7 +228,7 @@ IMPL_LINK( SvpElementContainer, processRequest, void*, pSocket )
}
write( nFile, aAnswer.getStr(), aAnswer.getLength() );
close( nFile );
-
+
return 0;
}
diff --git a/vcl/unx/headless/svpelement.hxx b/vcl/unx/headless/svpelement.hxx
index 0706e75af9fe..cbc37b3f620d 100644
--- a/vcl/unx/headless/svpelement.hxx
+++ b/vcl/unx/headless/svpelement.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ class SvpElement
protected:
SvpElement();
virtual ~SvpElement();
- public:
+ public:
virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const = 0;
static sal_uInt32 getBitCountFromScanlineFormat( sal_Int32 nFormat );
diff --git a/vcl/unx/headless/svpframe.cxx b/vcl/unx/headless/svpframe.cxx
index 1adf9a51cce4..7f304178cee4 100644
--- a/vcl/unx/headless/svpframe.cxx
+++ b/vcl/unx/headless/svpframe.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ using namespace basegfx;
SvpSalFrame* SvpSalFrame::s_pFocusFrame = NULL;
-SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
+SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
ULONG nSalFrameStyle,
SystemParentData* ) :
@@ -50,24 +50,24 @@ SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
m_nMaxWidth( 0 ),
m_nMaxHeight( 0 )
{
- m_aSystemChildData.nSize = sizeof( SystemChildData );
- m_aSystemChildData.pDisplay = NULL;
- m_aSystemChildData.aWindow = 0;
- m_aSystemChildData.pSalFrame = this;
- m_aSystemChildData.pWidget = NULL;
- m_aSystemChildData.pVisual = NULL;
- m_aSystemChildData.nDepth = 24;
- m_aSystemChildData.aColormap = 0;
- m_aSystemChildData.pAppContext = NULL;
- m_aSystemChildData.aShellWindow = 0;
- m_aSystemChildData.pShellWidget = NULL;
-
+ m_aSystemChildData.nSize = sizeof( SystemChildData );
+ m_aSystemChildData.pDisplay = NULL;
+ m_aSystemChildData.aWindow = 0;
+ m_aSystemChildData.pSalFrame = this;
+ m_aSystemChildData.pWidget = NULL;
+ m_aSystemChildData.pVisual = NULL;
+ m_aSystemChildData.nDepth = 24;
+ m_aSystemChildData.aColormap = 0;
+ m_aSystemChildData.pAppContext = NULL;
+ m_aSystemChildData.aShellWindow = 0;
+ m_aSystemChildData.pShellWidget = NULL;
+
if( m_pParent )
m_pParent->m_aChildren.push_back( this );
-
+
if( m_pInstance )
m_pInstance->registerFrame( this );
-
+
SetPosSize( 0, 0, 800, 600, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
}
@@ -75,14 +75,14 @@ SvpSalFrame::~SvpSalFrame()
{
if( m_pInstance )
m_pInstance->deregisterFrame( this );
-
+
std::list<SvpSalFrame*> Children = m_aChildren;
for( std::list<SvpSalFrame*>::iterator it = Children.begin();
it != Children.end(); ++it )
(*it)->SetParent( m_pParent );
if( m_pParent )
m_pParent->m_aChildren.remove( this );
-
+
if( s_pFocusFrame == this )
{
s_pFocusFrame = NULL;
@@ -304,7 +304,7 @@ void SvpSalFrame::SetWindowState( const SalFrameState *pState )
nWidth = pState->mnWidth;
if (pState->mnMask & SAL_FRAMESTATE_MASK_HEIGHT)
nHeight = pState->mnHeight;
-
+
SetPosSize( nX, nY, nWidth, nHeight,
SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y |
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
@@ -314,8 +314,8 @@ void SvpSalFrame::SetWindowState( const SalFrameState *pState )
BOOL SvpSalFrame::GetWindowState( SalFrameState* pState )
{
pState->mnState = SAL_FRAMESTATE_NORMAL;
- pState->mnX = maGeometry.nX;
- pState->mnY = maGeometry.nY;
+ pState->mnX = maGeometry.nX;
+ pState->mnY = maGeometry.nY;
pState->mnWidth = maGeometry.nWidth;
pState->mnHeight = maGeometry.nHeight;
pState->mnMask = _FRAMESTATE_MASK_GEOMETRY | SAL_FRAMESTATE_MASK_STATE;
diff --git a/vcl/unx/headless/svpframe.hxx b/vcl/unx/headless/svpframe.hxx
index de968bbf7a4a..9e5fb6066be3 100644
--- a/vcl/unx/headless/svpframe.hxx
+++ b/vcl/unx/headless/svpframe.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#ifndef _SVP_SVPFRAME_HXX
#include <vcl/salframe.hxx>
@@ -40,7 +40,7 @@ class SvpSalGraphics;
class SvpSalFrame : public SalFrame, public SvpElement
{
SvpSalInstance* m_pInstance;
- SvpSalFrame* m_pParent; // pointer to parent frame
+ SvpSalFrame* m_pParent; // pointer to parent frame
std::list< SvpSalFrame* > m_aChildren; // List of child frames
ULONG m_nStyle;
bool m_bVisible;
@@ -50,10 +50,10 @@ class SvpSalFrame : public SalFrame, public SvpElement
long m_nMaxHeight;
SystemEnvData m_aSystemChildData;
-
+
basebmp::BitmapDeviceSharedPtr m_aFrame;
std::list< SvpSalGraphics* > m_aGraphics;
-
+
static SvpSalFrame* s_pFocusFrame;
public:
SvpSalFrame( SvpSalInstance* pInstance,
@@ -61,64 +61,64 @@ public:
ULONG nSalFrameStyle,
SystemParentData* pSystemParent = NULL );
virtual ~SvpSalFrame();
-
+
void GetFocus();
void LoseFocus();
void PostPaint() const;
-
+
// SvpElement
virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
// SalFrame
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL PostEvent( void* pData );
+ virtual BOOL PostEvent( void* pData );
- virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
- virtual void SetMenu( SalMenu* pMenu );
+ virtual void SetTitle( const XubString& rTitle );
+ virtual void SetIcon( USHORT nIcon );
+ virtual void SetMenu( SalMenu* pMenu );
virtual void DrawMenuBar();
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
- virtual void Enable( BOOL bEnable );
+ virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
+ virtual void Enable( BOOL bEnable );
virtual void SetMinClientSize( long nWidth, long nHeight );
virtual void SetMaxClientSize( long nWidth, long nHeight );
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
- virtual void GetClientSize( long& rWidth, long& rHeight );
- virtual void GetWorkArea( Rectangle& rRect );
- virtual SalFrame* GetParent() const;
- virtual void SetWindowState( const SalFrameState* pState );
- virtual BOOL GetWindowState( SalFrameState* pState );
- virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay );
- virtual void StartPresentation( BOOL bStart );
- virtual void SetAlwaysOnTop( BOOL bOnTop );
- virtual void ToTop( USHORT nFlags );
- virtual void SetPointer( PointerStyle ePointerStyle );
- virtual void CaptureMouse( BOOL bMouse );
- virtual void SetPointerPos( long nX, long nY );
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
+ virtual void GetClientSize( long& rWidth, long& rHeight );
+ virtual void GetWorkArea( Rectangle& rRect );
+ virtual SalFrame* GetParent() const;
+ virtual void SetWindowState( const SalFrameState* pState );
+ virtual BOOL GetWindowState( SalFrameState* pState );
+ virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay );
+ virtual void StartPresentation( BOOL bStart );
+ virtual void SetAlwaysOnTop( BOOL bOnTop );
+ virtual void ToTop( USHORT nFlags );
+ virtual void SetPointer( PointerStyle ePointerStyle );
+ virtual void CaptureMouse( BOOL bMouse );
+ virtual void SetPointerPos( long nX, long nY );
using SalFrame::Flush;
- virtual void Flush();
- virtual void Sync();
- virtual void SetInputContext( SalInputContext* pContext );
- virtual void EndExtTextInput( USHORT nFlags );
- virtual String GetKeyName( USHORT nKeyCode );
- virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode );
+ virtual void Flush();
+ virtual void Sync();
+ virtual void SetInputContext( SalInputContext* pContext );
+ virtual void EndExtTextInput( USHORT nFlags );
+ virtual String GetKeyName( USHORT nKeyCode );
+ virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode );
virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
- virtual LanguageType GetInputLanguage();
- virtual SalBitmap* SnapShot();
- virtual void UpdateSettings( AllSettings& rSettings );
- virtual void Beep( SoundType eSoundType );
- virtual const SystemEnvData* GetSystemData() const;
+ virtual LanguageType GetInputLanguage();
+ virtual SalBitmap* SnapShot();
+ virtual void UpdateSettings( AllSettings& rSettings );
+ virtual void Beep( SoundType eSoundType );
+ virtual const SystemEnvData* GetSystemData() const;
virtual SalPointerState GetPointerState();
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
+ virtual void SetParent( SalFrame* pNewParent );
+ virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetBackgroundBitmap( SalBitmap* pBitmap );
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nRects );
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual void EndSetClipRegion();
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
/*TODO: functional implementation */
virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx
index 68d8be7cb4eb..b757164ad1fa 100644
--- a/vcl/unx/headless/svpgdi.cxx
+++ b/vcl/unx/headless/svpgdi.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,7 +110,7 @@ void SvpSalGraphics::setDevice( BitmapDeviceSharedPtr& rDevice )
// determine matching bitmap format for masks
sal_uInt32 nDeviceFmt = m_aDevice->getScanlineFormat();
- DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)Format::MAX), "SVP::setDevice() with invalid bitmap format" );
+ DBG_ASSERT( (nDeviceFmt <= (sal_uInt32)Format::MAX), "SVP::setDevice() with invalid bitmap format" );
switch( nDeviceFmt )
{
case Format::EIGHT_BIT_GREY:
@@ -172,7 +172,7 @@ BOOL SvpSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeigh
if( m_aClipMap )
{
B2DPolyPolygon aFull;
- aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) ) );
+ aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) ) );
m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT );
}
else
@@ -278,7 +278,7 @@ void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
aColor,
m_aDrawMode,
m_aClipMap
- );
+ );
dbgOut( m_aDevice );
}
@@ -433,7 +433,7 @@ void SvpSalGraphics::copyArea( long nDestX,
void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics )
{
- SvpSalGraphics* pSrc = pSrcGraphics ?
+ SvpSalGraphics* pSrc = pSrcGraphics ?
static_cast<SvpSalGraphics*>(pSrcGraphics) : this;
B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
pPosAry->mnSrcX+pPosAry->mnSrcWidth,
@@ -441,7 +441,7 @@ void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
pPosAry->mnDestX+pPosAry->mnDestWidth,
pPosAry->mnDestY+pPosAry->mnDestHeight );
- m_aDevice->drawBitmap( pSrc->m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
+ m_aDevice->drawBitmap( pSrc->m_aOrigDevice, aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
dbgOut( m_aDevice );
}
@@ -455,7 +455,7 @@ void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
pPosAry->mnDestX+pPosAry->mnDestWidth,
pPosAry->mnDestY+pPosAry->mnDestHeight );
- m_aDevice->drawBitmap( rSrc.getBitmap(), aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
+ m_aDevice->drawBitmap( rSrc.getBitmap(), aSrcRect, aDestRect, DrawMode_PAINT, m_aClipMap );
dbgOut( m_aDevice );
}
@@ -561,7 +561,7 @@ SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
if (nFallbacklevel < 0 ) nFallbacklevel = 0;
-
+
aSysFontData.nSize = sizeof( SystemFontData );
aSysFontData.nFontId = 0;
aSysFontData.nFontFlags = 0;
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index ca1af87f8862..41f5c13b4401 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ class SvpSalGraphics : public SalGraphics
bool m_bUseLineColor;
basebmp::Color m_aLineColor;
bool m_bUseFillColor;
- basebmp::Color m_aFillColor;
+ basebmp::Color m_aFillColor;
basebmp::Color m_aTextColor;
basebmp::DrawMode m_aDrawMode;
@@ -57,42 +57,42 @@ protected:
public:
SvpSalGraphics();
- virtual ~SvpSalGraphics();
+ virtual ~SvpSalGraphics();
const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aDevice; }
void setDevice( basebmp::BitmapDeviceSharedPtr& rDevice );
// overload all pure virtual methods
- virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
- virtual long GetGraphicsWidth() const;
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
+ virtual USHORT GetBitCount();
+ virtual long GetGraphicsWidth() const;
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( ULONG nCount );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual void EndSetClipRegion();
- virtual void SetLineColor();
- virtual void SetLineColor( SalColor nSalColor );
- virtual void SetFillColor();
+ virtual void SetLineColor();
+ virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetFillColor();
- virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetFillColor( SalColor nSalColor );
- virtual void SetXORMode( bool bSet, bool );
+ virtual void SetXORMode( bool bSet, bool );
- virtual void SetROPLineColor( SalROPColor nROPColor );
- virtual void SetROPFillColor( SalROPColor nROPColor );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
- virtual void SetTextColor( SalColor nSalColor );
+ virtual void SetTextColor( SalColor nSalColor );
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual void GetFontMetric( ImplFontMetricData* );
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
virtual ImplFontCharMap* GetImplFontCharMap() const;
- virtual void GetDevFontList( ImplDevFontList* );
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -101,69 +101,69 @@ public:
FontSubsetInfo& rInfo
);
virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
virtual void GetGlyphWidths( const ImplFontData*,
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
- virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
+ virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
- virtual void drawPixel( long nX, long nY );
- virtual void drawPixel( long nX, long nY, SalColor nSalColor );
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
+ virtual void drawPixel( long nX, long nY );
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor );
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolyPolygon( sal_uInt32 nPoly,
+ virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry );
- virtual void copyArea( long nDestX,
+ virtual void copyArea( long nDestX,
long nDestY,
long nSrcX,
long nSrcY,
long nSrcWidth,
long nSrcHeight,
USHORT nFlags );
- virtual void copyBits( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
const SalBitmap& rTransparentBitmap );
- virtual void drawMask( const SalTwoRect* pPosAry,
+ virtual void drawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor );
- virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
- virtual SalColor getPixel( long nX, long nY );
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
+ virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
virtual SystemGraphicsData GetGraphicsData() const;
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 466b56868900..01e9a39bb178 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,9 +72,9 @@ SvpSalInstance* SvpSalInstance::s_pDefaultInstance = NULL;
SvpSalInstance::SvpSalInstance()
{
- m_aTimeout.tv_sec = 0;
- m_aTimeout.tv_usec = 0;
- m_nTimeoutMS = 0;
+ m_aTimeout.tv_sec = 0;
+ m_aTimeout.tv_usec = 0;
+ m_nTimeoutMS = 0;
m_pTimeoutFDS[0] = m_pTimeoutFDS[1] = -1;
if (pipe (m_pTimeoutFDS) != -1)
@@ -115,7 +115,7 @@ SvpSalInstance::~SvpSalInstance()
{
if( s_pDefaultInstance == this )
s_pDefaultInstance = NULL;
-
+
// close 'wakeup' pipe.
close (m_pTimeoutFDS[0]);
close (m_pTimeoutFDS[1]);
@@ -158,7 +158,7 @@ void SvpSalInstance::CancelEvent( const SalFrame* pFrame, void* pData, USHORT nE
void SvpSalInstance::deregisterFrame( SalFrame* pFrame )
{
m_aFrames.remove( pFrame );
-
+
if( osl_acquireMutex( m_aEventGuard ) )
{
// cancel outstanding events for this frame
@@ -389,7 +389,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
}
else
nTimeoutMS = -1; // wait until something happens
-
+
// release yield mutex
nAcquireCount = ReleaseYieldMutex();
// poll
@@ -398,10 +398,10 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
aPoll.events = POLLIN;
aPoll.revents = 0;
poll( &aPoll, 1, nTimeoutMS );
-
+
// acquire yield mutex again
AcquireYieldMutex( nAcquireCount );
-
+
// clean up pipe
if( (aPoll.revents & POLLIN) != 0 )
{
@@ -457,8 +457,8 @@ void* SvpSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
SvpSalYieldMutex::SvpSalYieldMutex()
{
- mnCount = 0;
- mnThreadId = 0;
+ mnCount = 0;
+ mnThreadId = 0;
}
void SvpSalYieldMutex::acquire()
@@ -497,9 +497,9 @@ sal_Bool SvpSalYieldMutex::tryToAcquire()
void SvpSalInstance::StopTimer()
{
- m_aTimeout.tv_sec = 0;
- m_aTimeout.tv_usec = 0;
- m_nTimeoutMS = 0;
+ m_aTimeout.tv_sec = 0;
+ m_aTimeout.tv_usec = 0;
+ m_nTimeoutMS = 0;
}
void SvpSalInstance::StartTimer( ULONG nMS )
diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
index 284a2d11cd82..c92ccb910c3b 100644
--- a/vcl/unx/headless/svpinst.hxx
+++ b/vcl/unx/headless/svpinst.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,18 +49,18 @@
class SvpSalYieldMutex : public NAMESPACE_VOS(OMutex)
{
protected:
- ULONG mnCount;
- NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
+ ULONG mnCount;
+ NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
public:
SvpSalYieldMutex();
- virtual void acquire();
- virtual void release();
- virtual sal_Bool tryToAcquire();
+ virtual void acquire();
+ virtual void release();
+ virtual sal_Bool tryToAcquire();
- ULONG GetAcquireCount() const { return mnCount; }
- NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
+ ULONG GetAcquireCount() const { return mnCount; }
+ NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// ---------------
@@ -85,7 +85,7 @@ public:
class SvpSalFrame;
class SvpSalInstance : public SalInstance
{
- timeval m_aTimeout;
+ timeval m_aTimeout;
ULONG m_nTimeoutMS;
int m_pTimeoutFDS[2];
SvpSalYieldMutex m_aYieldMutex;
@@ -93,11 +93,11 @@ class SvpSalInstance : public SalInstance
// internal event queue
struct SalUserEvent
{
- const SalFrame* m_pFrame;
- void* m_pData;
- USHORT m_nEvent;
-
- SalUserEvent( const SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT )
+ const SalFrame* m_pFrame;
+ void* m_pData;
+ USHORT m_nEvent;
+
+ SalUserEvent( const SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT )
: m_pFrame( pFrame ),
m_pData( pData ),
m_nEvent( nEvent )
@@ -106,7 +106,7 @@ class SvpSalInstance : public SalInstance
oslMutex m_aEventGuard;
std::list< SalUserEvent > m_aUserEvents;
-
+
std::list< SalFrame* > m_aFrames;
bool isFrameAlive( const SalFrame* pFrame ) const;
@@ -116,72 +116,72 @@ public:
SvpSalInstance();
virtual ~SvpSalInstance();
-
+
void PostEvent( const SalFrame* pFrame, void* pData, USHORT nEvent );
void CancelEvent( const SalFrame* pFrame, void* pData, USHORT nEvent );
-
+
void StartTimer( ULONG nMS );
void StopTimer();
void Wakeup();
-
+
void registerFrame( SalFrame* pFrame ) { m_aFrames.push_back( pFrame ); }
void deregisterFrame( SalFrame* pFrame );
const std::list< SalFrame* >& getFrames() const { return m_aFrames; }
-
+
bool CheckTimeout( bool bExecuteTimers = true );
// Frame
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
- virtual void DestroyFrame( SalFrame* pFrame );
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual void DestroyFrame( SalFrame* pFrame );
// Object (System Child Window)
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
- virtual void DestroyObject( SalObject* pObject );
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual void DestroyObject( SalObject* pObject );
// VirtualDevice
// nDX and nDY in Pixel
// nBitCount: 0 == Default(=as window) / 1 == Mono
// pData allows for using a system dependent graphics or device context
- virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
USHORT nBitCount, const SystemGraphicsData *pData = NULL );
- virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
+ virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
// Printer
// pSetupData->mpDriverData can be 0
// pSetupData must be updatet with the current
// JobSetup
- virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
+ virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData );
- virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
- virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
- virtual void DestroyPrinter( SalPrinter* pPrinter );
+ virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
+ virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
+ virtual void DestroyPrinter( SalPrinter* pPrinter );
- virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
+ virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
+ virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
+ virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
virtual String GetDefaultPrinter();
// SalTimer
- virtual SalTimer* CreateSalTimer();
+ virtual SalTimer* CreateSalTimer();
// SalI18NImeStatus
virtual SalI18NImeStatus* CreateI18NImeStatus();
// SalSystem
- virtual SalSystem* CreateSalSystem();
+ virtual SalSystem* CreateSalSystem();
// SalBitmap
- virtual SalBitmap* CreateSalBitmap();
+ virtual SalBitmap* CreateSalBitmap();
// YieldMutex
- virtual vos::IMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ virtual vos::IMutex* GetYieldMutex();
+ virtual ULONG ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( ULONG nCount );
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
// and timer
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual bool AnyInput( USHORT nType );
// Menues
virtual SalMenu* CreateMenu( BOOL bMenuBar );
@@ -190,9 +190,9 @@ public:
virtual void DestroyMenuItem( SalMenuItem* pItem );
// may return NULL to disable session management
- virtual SalSession* CreateSalSession();
+ virtual SalSession* CreateSalSession();
- virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
};
diff --git a/vcl/unx/headless/svpprn.cxx b/vcl/unx/headless/svpprn.cxx
index 5b461bb996ef..fcc669c8801e 100644
--- a/vcl/unx/headless/svpprn.cxx
+++ b/vcl/unx/headless/svpprn.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ using namespace psp;
using namespace rtl;
/*
- * static helpers
+ * static helpers
*/
static String getPdfDir( const PrinterInfo& rInfo )
@@ -75,30 +75,30 @@ inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)
static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
{
- pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
+ pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
// copy page size
String aPaper;
int width, height;
rData.m_aContext.getPageSize( aPaper, width, height );
- pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 ));
- pJobSetup->mnPaperWidth = 0;
- pJobSetup->mnPaperHeight = 0;
+ pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 ));
+ pJobSetup->mnPaperWidth = 0;
+ pJobSetup->mnPaperHeight = 0;
if( pJobSetup->mePaperFormat == PAPER_USER )
{
// transform to 100dth mm
- width = PtTo10Mu( width );
- height = PtTo10Mu( height );
+ width = PtTo10Mu( width );
+ height = PtTo10Mu( height );
if( rData.m_eOrientation == psp::orientation::Portrait )
{
- pJobSetup->mnPaperWidth = width;
+ pJobSetup->mnPaperWidth = width;
pJobSetup->mnPaperHeight= height;
}
else
{
- pJobSetup->mnPaperWidth = height;
+ pJobSetup->mnPaperWidth = height;
pJobSetup->mnPaperHeight= width;
}
}
@@ -109,9 +109,9 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->mnPaperBin = 0xffff;
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
+ pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
if( pKey )
- pValue = rData.m_aContext.getValue( pKey );
+ pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
{
for( pJobSetup->mnPaperBin = 0;
@@ -126,7 +126,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
// copy duplex
pKey = NULL;
pValue = NULL;
-
+
pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
if( rData.m_pParser )
pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
@@ -307,13 +307,13 @@ static bool createPdf( const String& rToFile, const String& rFromFile, const Str
}
/*
- * SalInstance
+ * SalInstance
*/
// -----------------------------------------------------------------------
-SalInfoPrinter* SvpSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pJobSetup )
+SalInfoPrinter* SvpSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
+ ImplJobSetup* pJobSetup )
{
// create and initialize SalInfoPrinter
PspSalInfoPrinter* pPrinter = new PspSalInfoPrinter;
@@ -328,9 +328,9 @@ SalInfoPrinter* SvpSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
if( pJobSetup->mpDriverData )
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo );
- pJobSetup->mnSystem = JOBSETUP_SYSTEM_UNIX;
- pJobSetup->maPrinterName = pQueueInfo->maPrinterName;
- pJobSetup->maDriver = aInfo.m_aDriverName;
+ pJobSetup->mnSystem = JOBSETUP_SYSTEM_UNIX;
+ pJobSetup->maPrinterName = pQueueInfo->maPrinterName;
+ pJobSetup->maDriver = aInfo.m_aDriverName;
copyJobDataToJobSetup( pJobSetup, aInfo );
// set/clear backwards compatibility flag
@@ -393,11 +393,11 @@ void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
const PrinterInfo& rInfo( rManager.getPrinterInfo( *it ) );
// Neuen Eintrag anlegen
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
- pInfo->maPrinterName = *it;
- pInfo->maDriver = rInfo.m_aDriverName;
- pInfo->maLocation = rInfo.m_aLocation;
- pInfo->maComment = rInfo.m_aComment;
- pInfo->mpSysData = NULL;
+ pInfo->maPrinterName = *it;
+ pInfo->maDriver = rInfo.m_aDriverName;
+ pInfo->maLocation = rInfo.m_aLocation;
+ pInfo->maComment = rInfo.m_aComment;
+ pInfo->mpSysData = NULL;
sal_Int32 nIndex = 0;
while( nIndex != -1 )
@@ -575,13 +575,13 @@ BOOL PspSalInfoPrinter::SetData(
int nWidth, nHeight;
if( pJobSetup->meOrientation == ORIENTATION_PORTRAIT )
{
- nWidth = pJobSetup->mnPaperWidth;
- nHeight = pJobSetup->mnPaperHeight;
+ nWidth = pJobSetup->mnPaperWidth;
+ nHeight = pJobSetup->mnPaperHeight;
}
else
{
- nWidth = pJobSetup->mnPaperHeight;
- nHeight = pJobSetup->mnPaperWidth;
+ nWidth = pJobSetup->mnPaperHeight;
+ nHeight = pJobSetup->mnPaperWidth;
}
String aPaper;
@@ -621,7 +621,7 @@ BOOL PspSalInfoPrinter::SetData(
// merge orientation if necessary
if( nSetDataFlags & SAL_JOBSET_ORIENTATION )
aData.m_eOrientation = pJobSetup->meOrientation == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait;
-
+
// merge duplex if necessary
if( nSetDataFlags & SAL_JOBSET_DUPLEXMODE )
{
@@ -696,12 +696,12 @@ void PspSalInfoPrinter::GetPageInfo(
aData.m_pParser->getMargins( aPaper, top, bottom, right, left );
}
- rPageWidth = width * nDPI / 72;
- rPageHeight = height * nDPI / 72;
- rPageOffX = left * nDPI / 72;
- rPageOffY = top * nDPI / 72;
- rOutWidth = ( width - left - right ) * nDPI / 72;
- rOutHeight = ( height - top - bottom ) * nDPI / 72;
+ rPageWidth = width * nDPI / 72;
+ rPageHeight = height * nDPI / 72;
+ rPageOffX = left * nDPI / 72;
+ rPageOffY = top * nDPI / 72;
+ rOutWidth = ( width - left - right ) * nDPI / 72;
+ rOutHeight = ( height - top - bottom ) * nDPI / 72;
}
}
@@ -810,7 +810,7 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
// =======================================================================
/*
- * SalPrinter
+ * SalPrinter
*/
PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter )
@@ -852,10 +852,10 @@ BOOL PspSalPrinter::StartJob(
{
vcl_sal::PrinterUpdate::jobStarted();
- m_bFax = false;
- m_bPdf = false;
- m_aFileName = pFileName ? *pFileName : String();
- m_aTmpFile = String();
+ m_bFax = false;
+ m_bPdf = false;
+ m_aFileName = pFileName ? *pFileName : String();
+ m_aTmpFile = String();
m_nCopies = nCopies;
m_bCollate = bCollate;
@@ -1037,7 +1037,7 @@ void vcl_sal::PrinterUpdate::update()
if( Application::GetSettings().GetMiscSettings().GetDisablePrinting() )
return;
- static bool bOnce = false;
+ static bool bOnce = false;
if( ! bOnce )
{
bOnce = true;
@@ -1045,7 +1045,7 @@ void vcl_sal::PrinterUpdate::update()
psp::PrinterInfoManager::get();
return;
}
-
+
if( nActiveJobs < 1 )
doUpdate();
else if( ! pPrinterUpdateTimer )
diff --git a/vcl/unx/headless/svpprn.hxx b/vcl/unx/headless/svpprn.hxx
index 0da506076908..5077a39de293 100644
--- a/vcl/unx/headless/svpprn.hxx
+++ b/vcl/unx/headless/svpprn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,44 +38,44 @@ class PspGraphics;
class PspSalInfoPrinter : public SalInfoPrinter
{
public:
- PspGraphics* m_pGraphics;
- psp::JobData m_aJobData;
- psp::PrinterGfx m_aPrinterGfx;
+ PspGraphics* m_pGraphics;
+ psp::JobData m_aJobData;
+ psp::PrinterGfx m_aPrinterGfx;
PspSalInfoPrinter();
virtual ~PspSalInfoPrinter();
// overload all pure virtual methods
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
- virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
- virtual void GetPageInfo( const ImplJobSetup* pSetupData,
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
+ virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
+ virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
+ virtual void GetPageInfo( const ImplJobSetup* pSetupData,
long& rOutWidth, long& rOutHeight,
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight );
- virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
- virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
- virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
- virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
- virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
+ virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
+ virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
+ virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
+ virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
};
class PspSalPrinter : public SalPrinter
{
public:
- String m_aFileName;
- String m_aTmpFile;
- String m_aFaxNr;
- bool m_bFax:1;
- bool m_bPdf:1;
- bool m_bSwallowFaxNo:1;
- PspGraphics* m_pGraphics;
- psp::PrinterJob m_aPrintJob;
- psp::JobData m_aJobData;
- psp::PrinterGfx m_aPrinterGfx;
- ULONG m_nCopies;
+ String m_aFileName;
+ String m_aTmpFile;
+ String m_aFaxNr;
+ bool m_bFax:1;
+ bool m_bPdf:1;
+ bool m_bSwallowFaxNo:1;
+ PspGraphics* m_pGraphics;
+ psp::PrinterJob m_aPrintJob;
+ psp::JobData m_aJobData;
+ psp::PrinterGfx m_aPrinterGfx;
+ ULONG m_nCopies;
bool m_bCollate;
SalInfoPrinter* m_pInfoPrinter;
@@ -84,18 +84,18 @@ public:
// overload all pure virtual methods
using SalPrinter::StartJob;
- virtual BOOL StartJob( const XubString* pFileName,
+ virtual BOOL StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
ULONG nCopies,
bool bCollate,
bool bDirect,
ImplJobSetup* pSetupData );
- virtual BOOL EndJob();
- virtual BOOL AbortJob();
- virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
- virtual BOOL EndPage();
- virtual ULONG GetErrorCode();
+ virtual BOOL EndJob();
+ virtual BOOL AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
+ virtual BOOL EndPage();
+ virtual ULONG GetErrorCode();
};
class Timer;
@@ -103,8 +103,8 @@ class Timer;
namespace vcl_sal {
class VCL_DLLPUBLIC PrinterUpdate
{
- static Timer* pPrinterUpdateTimer;
- static int nActiveJobs;
+ static Timer* pPrinterUpdateTimer;
+ static int nActiveJobs;
static void doUpdate();
DECL_STATIC_LINK( PrinterUpdate, UpdateTimerHdl, void* );
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index 6da09b38023c..73227d63b2d1 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,19 +71,19 @@ class SalPrinterBmp : public psp::PrinterBmp
public:
SalPrinterBmp (const BitmapDeviceSharedPtr& rDevice);
- virtual ~SalPrinterBmp ();
- virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const;
- virtual sal_uInt32 GetPaletteEntryCount () const;
- virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt32 GetWidth () const;
- virtual sal_uInt32 GetHeight() const;
- virtual sal_uInt32 GetDepth () const;
-
+ virtual ~SalPrinterBmp ();
+ virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const;
+ virtual sal_uInt32 GetPaletteEntryCount () const;
+ virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const;
+ virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const;
+ virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const;
+ virtual sal_uInt32 GetWidth () const;
+ virtual sal_uInt32 GetHeight() const;
+ virtual sal_uInt32 GetDepth () const;
+
static sal_uInt32 getRGBFromColor( const basebmp::Color& rCol )
{
- return ((rCol.getBlue()) & 0x000000ff)
+ return ((rCol.getBlue()) & 0x000000ff)
| ((rCol.getGreen() << 8) & 0x0000ff00)
| ((rCol.getRed() << 16) & 0x00ff0000);
}
@@ -316,7 +316,7 @@ void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry);
}
-void PspGraphics::drawPolyPolygon( sal_uInt32 nPoly,
+void PspGraphics::drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32 *pPoints,
PCONSTSALPOINT *pPtAry )
{
@@ -431,11 +431,11 @@ SalColor PspGraphics::getPixel( long /*nX*/, long /*nY*/ )
}
void PspGraphics::invert(
- long /*nX*/,
- long /*nY*/,
- long /*nDX*/,
- long /*nDY*/,
- SalInvert /*nFlags*/ )
+ long /*nX*/,
+ long /*nY*/,
+ long /*nDX*/,
+ long /*nDY*/,
+ SalInvert /*nFlags*/ )
{
DBG_ERROR ("Warning: PrinterGfx::Invert() not implemented");
}
@@ -499,8 +499,8 @@ PspFontLayout::PspFontLayout( ::psp::PrinterGfx& rGfx )
mnFontHeight = mrPrinterGfx.GetFontHeight();
mnFontWidth = mrPrinterGfx.GetFontWidth();
mbVertical = mrPrinterGfx.GetFontVertical();
- mbArtItalic = mrPrinterGfx.GetArtificialItalic();
- mbArtBold = mrPrinterGfx.GetArtificialBold();
+ mbArtItalic = mrPrinterGfx.GetArtificialItalic();
+ mbArtBold = mrPrinterGfx.GetArtificialBold();
}
//--------------------------------------------------------------------------
@@ -588,19 +588,19 @@ public:
PspServerFontLayout( psp::PrinterGfx&, ServerFont& rFont, const ImplLayoutArgs& rArgs );
virtual void InitFont() const;
- const sal_Unicode* getTextPtr() const { return maText.getStr() - mnMinCharPos; }
- int getMinCharPos() const { return mnMinCharPos; }
- int getMaxCharPos() const { return mnMinCharPos+maText.getLength()-1; }
+ const sal_Unicode* getTextPtr() const { return maText.getStr() - mnMinCharPos; }
+ int getMinCharPos() const { return mnMinCharPos; }
+ int getMaxCharPos() const { return mnMinCharPos+maText.getLength()-1; }
private:
::psp::PrinterGfx& mrPrinterGfx;
sal_IntPtr mnFontID;
int mnFontHeight;
int mnFontWidth;
bool mbVertical;
- bool mbArtItalic;
- bool mbArtBold;
- rtl::OUString maText;
- int mnMinCharPos;
+ bool mbArtItalic;
+ bool mbArtBold;
+ rtl::OUString maText;
+ int mnMinCharPos;
};
PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& rFont, const ImplLayoutArgs& rArgs )
@@ -611,9 +611,9 @@ PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& r
mnFontHeight = mrPrinterGfx.GetFontHeight();
mnFontWidth = mrPrinterGfx.GetFontWidth();
mbVertical = mrPrinterGfx.GetFontVertical();
- mbArtItalic = mrPrinterGfx.GetArtificialItalic();
- mbArtBold = mrPrinterGfx.GetArtificialBold();
- maText = OUString( rArgs.mpStr + rArgs.mnMinCharPos, rArgs.mnEndCharPos - rArgs.mnMinCharPos+1 );
+ mbArtItalic = mrPrinterGfx.GetArtificialItalic();
+ mbArtBold = mrPrinterGfx.GetArtificialBold();
+ maText = OUString( rArgs.mpStr + rArgs.mnMinCharPos, rArgs.mnEndCharPos - rArgs.mnMinCharPos+1 );
mnMinCharPos = rArgs.mnMinCharPos;
}
@@ -632,7 +632,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
sal_Int32 aWidthAry[ nMaxGlyphs ];
sal_Int32 aIdxAry [ nMaxGlyphs ];
sal_Ucs aUnicodes[ nMaxGlyphs ];
- int aCharPosAry [ nMaxGlyphs ];
+ int aCharPosAry [ nMaxGlyphs ];
Point aPos;
long nUnitsPerPixel = rLayout.GetUnitsPerPixel();
@@ -804,19 +804,19 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric )
pMetric->mbDevice = aDFA.mbDevice;
pMetric->mbScalableFont = true;
- pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle();
- pMetric->mnSlant = 0;
+ pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle();
+ pMetric->mnSlant = 0;
- sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight();
- sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth();
+ sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight();
+ sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth();
if( ! nTextWidth )
nTextWidth = nTextHeight;
- pMetric->mnWidth = nTextWidth;
- pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000;
- pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000;
- pMetric->mnIntLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000;
- pMetric->mnExtLeading = 0;
+ pMetric->mnWidth = nTextWidth;
+ pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000;
+ pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000;
+ pMetric->mnIntLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000;
+ pMetric->mnExtLeading = 0;
}
}
@@ -833,9 +833,9 @@ ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
nTextScale = m_pPrinterGfx->GetFontHeight();
for( i = 0, it = rPairs.begin(); i < nPairs && i < nHavePairs; i++, ++it )
{
- pKernPairs[i].mnChar1 = it->first;
- pKernPairs[i].mnChar2 = it->second;
- pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000;
+ pKernPairs[i].mnChar1 = it->first;
+ pKernPairs[i].mnChar2 = it->second;
+ pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000;
}
}
@@ -986,9 +986,9 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
return NULL;
// fill in font info
- rInfo.m_nAscent = aFontInfo.m_nAscend;
- rInfo.m_nDescent = aFontInfo.m_nDescend;
- rInfo.m_aPSName = rMgr.getPSName( aFont );
+ rInfo.m_nAscent = aFontInfo.m_nAscend;
+ rInfo.m_nDescent = aFontInfo.m_nDescend;
+ rInfo.m_aPSName = rMgr.getPSName( aFont );
int xMin, yMin, xMax, yMax;
rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax );
@@ -1018,8 +1018,8 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
*pDataLen = aStat.st_size;
- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
- rInfo.m_nCapHeight = yMax; // Well ...
+ rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
+ rInfo.m_nCapHeight = yMax; // Well ...
for( int i = 0; i < 256; i++ )
pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0);
@@ -1079,13 +1079,13 @@ FontWidth PspGraphics::ToFontWidth (psp::width::type eWidth)
{
case psp::width::UltraCondensed: return WIDTH_ULTRA_CONDENSED;
case psp::width::ExtraCondensed: return WIDTH_EXTRA_CONDENSED;
- case psp::width::Condensed: return WIDTH_CONDENSED;
- case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED;
- case psp::width::Normal: return WIDTH_NORMAL;
- case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED;
- case psp::width::Expanded: return WIDTH_EXPANDED;
- case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED;
- case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED;
+ case psp::width::Condensed: return WIDTH_CONDENSED;
+ case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED;
+ case psp::width::Normal: return WIDTH_NORMAL;
+ case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED;
+ case psp::width::Expanded: return WIDTH_EXPANDED;
+ case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED;
+ case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED;
default: break;
}
return WIDTH_DONTKNOW;
@@ -1095,16 +1095,16 @@ FontWeight PspGraphics::ToFontWeight (psp::weight::type eWeight)
{
switch (eWeight)
{
- case psp::weight::Thin: return WEIGHT_THIN;
+ case psp::weight::Thin: return WEIGHT_THIN;
case psp::weight::UltraLight: return WEIGHT_ULTRALIGHT;
- case psp::weight::Light: return WEIGHT_LIGHT;
+ case psp::weight::Light: return WEIGHT_LIGHT;
case psp::weight::SemiLight: return WEIGHT_SEMILIGHT;
- case psp::weight::Normal: return WEIGHT_NORMAL;
- case psp::weight::Medium: return WEIGHT_MEDIUM;
- case psp::weight::SemiBold: return WEIGHT_SEMIBOLD;
- case psp::weight::Bold: return WEIGHT_BOLD;
+ case psp::weight::Normal: return WEIGHT_NORMAL;
+ case psp::weight::Medium: return WEIGHT_MEDIUM;
+ case psp::weight::SemiBold: return WEIGHT_SEMIBOLD;
+ case psp::weight::Bold: return WEIGHT_BOLD;
case psp::weight::UltraBold: return WEIGHT_ULTRABOLD;
- case psp::weight::Black: return WEIGHT_BLACK;
+ case psp::weight::Black: return WEIGHT_BLACK;
default: break;
}
return WEIGHT_DONTKNOW;
@@ -1114,8 +1114,8 @@ FontPitch PspGraphics::ToFontPitch (psp::pitch::type ePitch)
{
switch (ePitch)
{
- case psp::pitch::Fixed: return PITCH_FIXED;
- case psp::pitch::Variable: return PITCH_VARIABLE;
+ case psp::pitch::Fixed: return PITCH_FIXED;
+ case psp::pitch::Variable: return PITCH_VARIABLE;
default: break;
}
return PITCH_DONTKNOW;
@@ -1125,9 +1125,9 @@ FontItalic PspGraphics::ToFontItalic (psp::italic::type eItalic)
{
switch (eItalic)
{
- case psp::italic::Upright: return ITALIC_NONE;
- case psp::italic::Oblique: return ITALIC_OBLIQUE;
- case psp::italic::Italic: return ITALIC_NORMAL;
+ case psp::italic::Upright: return ITALIC_NONE;
+ case psp::italic::Oblique: return ITALIC_OBLIQUE;
+ case psp::italic::Italic: return ITALIC_NORMAL;
default: break;
}
return ITALIC_DONTKNOW;
@@ -1138,11 +1138,11 @@ FontFamily PspGraphics::ToFontFamily (psp::family::type eFamily)
switch (eFamily)
{
case psp::family::Decorative: return FAMILY_DECORATIVE;
- case psp::family::Modern: return FAMILY_MODERN;
- case psp::family::Roman: return FAMILY_ROMAN;
- case psp::family::Script: return FAMILY_SCRIPT;
- case psp::family::Swiss: return FAMILY_SWISS;
- case psp::family::System: return FAMILY_SYSTEM;
+ case psp::family::Modern: return FAMILY_MODERN;
+ case psp::family::Roman: return FAMILY_ROMAN;
+ case psp::family::Script: return FAMILY_SCRIPT;
+ case psp::family::Swiss: return FAMILY_SWISS;
+ case psp::family::System: return FAMILY_SYSTEM;
default: break;
}
return FAMILY_DONTKNOW;
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index 063dff34c3c2..87cbb4948137 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,15 +41,15 @@ class SalInfoPrinter;
class PspGraphics : public SalGraphics
{
- psp::JobData* m_pJobData;
- psp::PrinterGfx* m_pPrinterGfx;
- String* m_pPhoneNr;
- bool m_bSwallowFaxNo;
- String m_aPhoneCollection;
- bool m_bPhoneCollectionActive;
-
- ServerFont* m_pServerFont[ MAX_FALLBACK ];
- bool m_bFontVertical;
+ psp::JobData* m_pJobData;
+ psp::PrinterGfx* m_pPrinterGfx;
+ String* m_pPhoneNr;
+ bool m_bSwallowFaxNo;
+ String m_aPhoneCollection;
+ bool m_bPhoneCollectionActive;
+
+ ServerFont* m_pServerFont[ MAX_FALLBACK ];
+ bool m_bFontVertical;
SalInfoPrinter* m_pInfoPrinter;
protected:
@@ -78,40 +78,40 @@ public:
Ucs2UIntMap& rUnicodeEnc );
static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& );
static void AnnounceFonts( ImplDevFontList*, const psp::FastPrintFontInfo& );
- static FontWidth ToFontWidth (psp::width::type eWidth);
- static FontWeight ToFontWeight (psp::weight::type eWeight);
- static FontPitch ToFontPitch (psp::pitch::type ePitch);
- static FontItalic ToFontItalic (psp::italic::type eItalic);
- static FontFamily ToFontFamily (psp::family::type eFamily);
+ static FontWidth ToFontWidth (psp::width::type eWidth);
+ static FontWeight ToFontWeight (psp::weight::type eWeight);
+ static FontPitch ToFontPitch (psp::pitch::type ePitch);
+ static FontItalic ToFontItalic (psp::italic::type eItalic);
+ static FontFamily ToFontFamily (psp::family::type eFamily);
// overload all pure virtual methods
- virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
- virtual long GetGraphicsWidth() const;
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
+ virtual USHORT GetBitCount();
+ virtual long GetGraphicsWidth() const;
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( ULONG nCount );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual void EndSetClipRegion();
- virtual void SetLineColor();
- virtual void SetLineColor( SalColor nSalColor );
- virtual void SetFillColor();
- virtual void SetFillColor( SalColor nSalColor );
- virtual void SetXORMode( bool bSet, bool );
- virtual void SetROPLineColor( SalROPColor nROPColor );
- virtual void SetROPFillColor( SalROPColor nROPColor );
+ virtual void SetLineColor();
+ virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetFillColor();
+ virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetXORMode( bool bSet, bool );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
- virtual void SetTextColor( SalColor nSalColor );
+ virtual void SetTextColor( SalColor nSalColor );
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual void GetFontMetric( ImplFontMetricData* );
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
virtual ImplFontCharMap* GetImplFontCharMap() const;
- virtual void GetDevFontList( ImplDevFontList* );
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -120,72 +120,72 @@ public:
FontSubsetInfo& rInfo
);
virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
virtual void GetGlyphWidths( const ImplFontData*,
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
- virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
+ virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
- virtual void drawPixel( long nX, long nY );
- virtual void drawPixel( long nX, long nY, SalColor nSalColor );
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPixel( long nX, long nY );
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor );
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
+ virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
- virtual void drawPolyPolygon( sal_uInt32 nPoly,
+ virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry );
- virtual void copyArea( long nDestX,
+ virtual void copyArea( long nDestX,
long nDestY,
long nSrcX,
long nSrcY,
long nSrcWidth,
long nSrcHeight,
USHORT nFlags );
- virtual void copyBits( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
const SalBitmap& rTransparentBitmap );
- virtual void drawMask( const SalTwoRect* pPosAry,
+ virtual void drawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor );
- virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
- virtual SalColor getPixel( long nX, long nY );
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
+ virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
-
- virtual SystemGraphicsData GetGraphicsData() const;
+
+ virtual SystemGraphicsData GetGraphicsData() const;
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx
index ecb8b11b7e04..5d2f48b88664 100644
--- a/vcl/unx/headless/svptext.cxx
+++ b/vcl/unx/headless/svptext.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -88,7 +88,7 @@ SvpGlyphCache& SvpGlyphCache::GetInstance()
{
static SvpGlyphPeer aSvpGlyphPeer;
static SvpGlyphCache aGC( aSvpGlyphPeer );
- return aGC;
+ return aGC;
}
// ===========================================================================
@@ -161,7 +161,7 @@ void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int /*nGly
if( rGlyphData.ExtDataRef().mpData != Format::NONE )
{
// release the glyph related resources
- DBG_ASSERT( (rGlyphData.ExtDataRef().meInfo <= Format::MAX), "SVP::RG() invalid alpha format" );
+ DBG_ASSERT( (rGlyphData.ExtDataRef().meInfo <= Format::MAX), "SVP::RG() invalid alpha format" );
SvpGcpHelper* pGcpHelper = (SvpGcpHelper*)rGlyphData.ExtDataRef().mpData;
delete[] pGcpHelper->maRawBitmap.mpBits;
delete pGcpHelper;
diff --git a/vcl/unx/headless/svpvd.cxx b/vcl/unx/headless/svpvd.cxx
index 1c2ab01ccca2..44d192b14b3e 100644
--- a/vcl/unx/headless/svpvd.cxx
+++ b/vcl/unx/headless/svpvd.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -86,12 +86,12 @@ BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
m_aDevice = aDevPal.empty()
? createBitmapDevice( aDevSize, false, nFormat )
: createBitmapDevice( aDevSize, false, nFormat, PaletteMemorySharedVector( new std::vector< basebmp::Color >(aDevPal) ) );
-
+
// update device in existing graphics
for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();
it != m_aGraphics.end(); ++it )
(*it)->setDevice( m_aDevice );
-
+
}
return true;
}
diff --git a/vcl/unx/headless/svpvd.hxx b/vcl/unx/headless/svpvd.hxx
index 083547cf19a9..072982b253a6 100644
--- a/vcl/unx/headless/svpvd.hxx
+++ b/vcl/unx/headless/svpvd.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,16 +44,16 @@ class SvpSalVirtualDevice : public SalVirtualDevice, public SvpElement
public:
SvpSalVirtualDevice( USHORT nBitCount ) : SvpElement(), m_nBitCount(nBitCount) {}
virtual ~SvpSalVirtualDevice();
-
+
// SvpElement
virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aDevice; }
// SalVirtualDevice
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL SetSize( long nNewDX, long nNewDY );
- virtual void GetSize( long& rWidth, long& rHeight );
+ virtual BOOL SetSize( long nNewDX, long nNewDY );
+ virtual void GetSize( long& rWidth, long& rHeight );
};
#endif // _SVP_SVPVD_HXX
diff --git a/vcl/unx/inc/XIM.h b/vcl/unx/inc/XIM.h
index b00634090b5d..79260cb22a9e 100644
--- a/vcl/unx/inc/XIM.h
+++ b/vcl/unx/inc/XIM.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,9 +62,9 @@ typedef struct _XIMUnicodeText {
char *multi_byte;
wchar_t *wide_char;
unsigned short *utf16_char;
- } string;
+ } string;
unsigned int count_annotations;
- XIMAnnotation *annotations;
+ XIMAnnotation *annotations;
} XIMUnicodeText;
/* lookup choice */
@@ -74,11 +74,11 @@ typedef enum {
} XIMDrawUpDirection ;
typedef struct _XIMLookupStartCallbackStruct {
- int choice_per_window; /* Number of choices can be display
+ int choice_per_window; /* Number of choices can be display
* in the region
*/
- int nrows;
- int ncolumns;
+ int nrows;
+ int ncolumns;
XIMDrawUpDirection draw_up_direction;
} XIMLookupStartCallbackStruct;
@@ -101,19 +101,19 @@ typedef enum {
XIMKatakana, XIMHanzi
} XIMUnicodeCharacterSubsetID;
-typedef struct _XIMUncodeSubset {
- XIMUnicodeCharacterSubsetID index;
- XIMUnicodeCharacterSubsetID subset_id;
- char *name;
- Bool is_active;
+typedef struct _XIMUncodeSubset {
+ XIMUnicodeCharacterSubsetID index;
+ XIMUnicodeCharacterSubsetID subset_id;
+ char *name;
+ Bool is_active;
} XIMUnicodeCharacterSubset;
-typedef struct _XIMUncodeSubsets {
+typedef struct _XIMUncodeSubsets {
unsigned short count_subsets;
XIMUnicodeCharacterSubset *supported_subsets;
} XIMUnicodeCharacterSubsets;
-typedef struct _XIMSwitchIMNotifyCallbackStruct {
+typedef struct _XIMSwitchIMNotifyCallbackStruct {
XIMUnicodeCharacterSubset *from;
XIMUnicodeCharacterSubset *to;
} XIMSwitchIMNotifyCallbackStruct;
diff --git a/vcl/unx/inc/Xproto.h b/vcl/unx/inc/Xproto.h
index 804b3ffa98cc..3702bdbce1c4 100644
--- a/vcl/unx/inc/Xproto.h
+++ b/vcl/unx/inc/Xproto.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/cdeint.hxx b/vcl/unx/inc/cdeint.hxx
index 91cbf33caf47..f6c0f3822aa1 100644
--- a/vcl/unx/inc/cdeint.hxx
+++ b/vcl/unx/inc/cdeint.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/dtint.hxx b/vcl/unx/inc/dtint.hxx
index 75f197c81e13..5a39b60e076b 100644
--- a/vcl/unx/inc/dtint.hxx
+++ b/vcl/unx/inc/dtint.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,27 +52,27 @@ enum DtType {
class DtIntegrator
{
protected:
- DtType meType;
- Display* mpDisplay;
- SalDisplay* mpSalDisplay;
- int mnSystemLookCommandProcess;
+ DtType meType;
+ Display* mpDisplay;
+ SalDisplay* mpSalDisplay;
+ int mnSystemLookCommandProcess;
DtIntegrator();
- static String aHomeDir;
+ static String aHomeDir;
public:
static DtIntegrator* CreateDtIntegrator();
-
+
virtual ~DtIntegrator();
// SystemLook
virtual void GetSystemLook( AllSettings& rSettings );
-
- DtType GetDtType() { return meType; }
- SalDisplay* GetSalDisplay() { return mpSalDisplay; }
- Display* GetDisplay() { return mpDisplay; }
+
+ DtType GetDtType() { return meType; }
+ SalDisplay* GetSalDisplay() { return mpSalDisplay; }
+ Display* GetDisplay() { return mpDisplay; }
};
#endif
diff --git a/vcl/unx/inc/i18n_cb.hxx b/vcl/unx/inc/i18n_cb.hxx
index d2301c26a3b0..943e0ef3d9c9 100644
--- a/vcl/unx/inc/i18n_cb.hxx
+++ b/vcl/unx/inc/i18n_cb.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,18 +41,18 @@ int CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data);
void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data);
int PreeditStartCallback( XIC ic, XPointer client_data, XPointer call_data);
void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data);
-void PreeditDrawCallback ( XIC ic, XPointer client_data,
+void PreeditDrawCallback ( XIC ic, XPointer client_data,
XIMPreeditDrawCallbackStruct *call_data );
-void PreeditCaretCallback( XIC ic, XPointer client_data,
+void PreeditCaretCallback( XIC ic, XPointer client_data,
XIMPreeditCaretCallbackStruct *call_data );
void GetPreeditSpotLocation(XIC ic, XPointer client_data);
-// private hook to prevent from sending further edit events
+// private hook to prevent from sending further edit events
void PreeditCancelCallback( XPointer client_data );
void StatusStartCallback (XIC ic, XPointer client_data, XPointer call_data);
void StatusDoneCallback (XIC ic, XPointer client_data, XPointer call_data);
-void StatusDrawCallback (XIC ic, XPointer client_data,
+void StatusDrawCallback (XIC ic, XPointer client_data,
XIMStatusDrawCallbackStruct *call_data);
void SwitchIMCallback (XIC ix, XPointer client_data, XPointer call_data );
@@ -84,10 +84,10 @@ typedef enum {
} preedit_status_t;
typedef struct {
- SalFrame* pFrame;
- Bool bIsMultilingual;
- preedit_status_t eState;
- preedit_text_t aText;
+ SalFrame* pFrame;
+ Bool bIsMultilingual;
+ preedit_status_t eState;
+ preedit_text_t aText;
SalExtTextInputEvent aInputEv;
std::vector< USHORT > aInputFlags;
} preedit_data_t;
diff --git a/vcl/unx/inc/i18n_ic.hxx b/vcl/unx/inc/i18n_ic.hxx
index 2fb97a00b6f2..eabdac94d194 100644
--- a/vcl/unx/inc/i18n_ic.hxx
+++ b/vcl/unx/inc/i18n_ic.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,9 +36,9 @@ class SalI18N_InputContext
private:
- Bool mbUseable; // system supports current locale ?
- Bool mbMultiLingual; // system supports iiimp ?
- XIC maContext;
+ Bool mbUseable; // system supports current locale ?
+ Bool mbMultiLingual; // system supports iiimp ?
+ XIC maContext;
XIMStyle mnSupportedStatusStyle;
XIMStyle mnSupportedPreeditStyle;
@@ -57,17 +57,17 @@ private:
XVaNestedList mpAttributes;
XVaNestedList mpStatusAttributes;
XVaNestedList mpPreeditAttributes;
-
- Bool SupportInputMethodStyle( XIMStyles *pIMStyles );
+
+ Bool SupportInputMethodStyle( XIMStyles *pIMStyles );
unsigned int GetWeightingOfIMStyle( XIMStyle n_style ) const ;
- Bool IsSupportedIMStyle( XIMStyle n_style ) const ;
+ Bool IsSupportedIMStyle( XIMStyle n_style ) const ;
public:
- Bool UseContext() { return mbUseable; }
- Bool IsMultiLingual() { return mbMultiLingual; }
- Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; }
- XIC GetContext() { return maContext; }
+ Bool UseContext() { return mbUseable; }
+ Bool IsMultiLingual() { return mbMultiLingual; }
+ Bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; }
+ XIC GetContext() { return maContext; }
void ExtendEventMask( XLIB_Window aFocusWindow );
void SetICFocus( SalFrame* pFocusFrame );
@@ -75,7 +75,7 @@ public:
void HandleDestroyIM();
int HandleKeyEvent( XKeyEvent *pEvent, SalFrame *pFrame ); // unused
- void EndExtTextInput( USHORT nFlags ); // unused
+ void EndExtTextInput( USHORT nFlags ); // unused
int CommitStringCallback( sal_Unicode* pText, sal_Size nLength );
int CommitKeyEvent( sal_Unicode* pText, sal_Size nLength );
int UpdateSpotLocation();
diff --git a/vcl/unx/inc/i18n_im.hxx b/vcl/unx/inc/i18n_im.hxx
index 297bc8edec17..212b734e8ae6 100644
--- a/vcl/unx/inc/i18n_im.hxx
+++ b/vcl/unx/inc/i18n_im.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,26 +36,26 @@ extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize);
class VCL_DLLPUBLIC SalI18N_InputMethod
{
- Bool mbUseable; // system supports locale as well as status
- // and preedit style ?
- Bool mbMultiLingual; // system supports iiimp
- XIM maMethod;
+ Bool mbUseable; // system supports locale as well as status
+ // and preedit style ?
+ Bool mbMultiLingual; // system supports iiimp
+ XIM maMethod;
XIMCallback maDestroyCallback;
XIMStyles *mpStyles;
public:
- Bool IsMultiLingual() { return mbMultiLingual; }
+ Bool IsMultiLingual() { return mbMultiLingual; }
Bool PosixLocale();
- Bool UseMethod() { return mbUseable; }
- XIM GetMethod() { return maMethod; }
+ Bool UseMethod() { return mbUseable; }
+ XIM GetMethod() { return maMethod; }
void HandleDestroyIM();
- Bool CreateMethod( Display *pDisplay );
- XIMStyles *GetSupportedStyles() { return mpStyles; }
- Bool SetLocale( const char* pLocale = "" );
- Bool FilterEvent( XEvent *pEvent, XLIB_Window window );
- Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler);
-
+ Bool CreateMethod( Display *pDisplay );
+ XIMStyles *GetSupportedStyles() { return mpStyles; }
+ Bool SetLocale( const char* pLocale = "" );
+ Bool FilterEvent( XEvent *pEvent, XLIB_Window window );
+ Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler);
+
#ifdef _USE_PRINT_EXTENSION_
void Invalidate() { mbUseable = False; }
#endif
diff --git a/vcl/unx/inc/i18n_keysym.hxx b/vcl/unx/inc/i18n_keysym.hxx
index 641d00dc02c0..16b0b4861dba 100644
--- a/vcl/unx/inc/i18n_keysym.hxx
+++ b/vcl/unx/inc/i18n_keysym.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,36 +30,36 @@
/*
convert a keysym as defined in /usr/{X11R6|openwin}/include/X11/keysymdef.h
- to unicode
+ to unicode
supported charsets: (byte1 and byte2 are always 0x0)
-
- Latin-1 Byte 3 = 0x00
- Latin-2 Byte 3 = 0x01
- Latin-3 Byte 3 = 0x02
- Latin-4 Byte 3 = 0x03
- Kana Byte 3 = 0x04
- Arabic Byte 3 = 0x05
- Cyrillic Byte 3 = 0x06
- Greek Byte 3 = 0x07
- Technical Byte 3 = 0x08
- Special Byte 3 = 0x09
- Publishing Byte 3 = 0x0a = 10
- APL Byte 3 = 0x0b = 11
- Hebrew Byte 3 = 0x0c = 12
- Thai Byte 3 = 0x0d = 13
- Korean Byte 3 = 0x0e = 14
- Latin-9 Byte 3 = 0x13 = 19
- Currency Byte 3 = 0x20 = 32
- Keyboard Byte 3 = 0xff = 255
+
+ Latin-1 Byte 3 = 0x00
+ Latin-2 Byte 3 = 0x01
+ Latin-3 Byte 3 = 0x02
+ Latin-4 Byte 3 = 0x03
+ Kana Byte 3 = 0x04
+ Arabic Byte 3 = 0x05
+ Cyrillic Byte 3 = 0x06
+ Greek Byte 3 = 0x07
+ Technical Byte 3 = 0x08
+ Special Byte 3 = 0x09
+ Publishing Byte 3 = 0x0a = 10
+ APL Byte 3 = 0x0b = 11
+ Hebrew Byte 3 = 0x0c = 12
+ Thai Byte 3 = 0x0d = 13
+ Korean Byte 3 = 0x0e = 14
+ Latin-9 Byte 3 = 0x13 = 19
+ Currency Byte 3 = 0x20 = 32
+ Keyboard Byte 3 = 0xff = 255
missing charsets:
- Latin-8 Byte 3 = 0x12 = 18
- Armenian Byte 3 = 0x14 = 20
- Georgian Byte 3 = 0x15 = 21
- Azeri Byte 3 = 0x16 = 22
- Vietnamese Byte 3 = 0x1e = 30
+ Latin-8 Byte 3 = 0x12 = 18
+ Armenian Byte 3 = 0x14 = 20
+ Georgian Byte 3 = 0x15 = 21
+ Azeri Byte 3 = 0x16 = 22
+ Vietnamese Byte 3 = 0x1e = 30
of course not all keysyms can be mapped to a unicode code point
*/
diff --git a/vcl/unx/inc/i18n_status.hxx b/vcl/unx/inc/i18n_status.hxx
index 7202cf6e0eef..40f08acf747a 100644
--- a/vcl/unx/inc/i18n_status.hxx
+++ b/vcl/unx/inc/i18n_status.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ class X11ImeStatus : public SalI18NImeStatus
public:
X11ImeStatus() {}
virtual ~X11ImeStatus();
-
+
virtual bool canToggle();
virtual void toggle();
};
@@ -66,13 +66,13 @@ class I18NStatus
public:
struct ChoiceData
{
- String aString;
- void* pData;
+ String aString;
+ void* pData;
};
private:
- SalFrame* m_pParent;
- StatusWindow* m_pStatusWindow;
- String m_aCurrentIM;
+ SalFrame* m_pParent;
+ StatusWindow* m_pStatusWindow;
+ String m_aCurrentIM;
::std::vector< ChoiceData > m_aChoices;
I18NStatus();
diff --git a/vcl/unx/inc/i18n_xkb.hxx b/vcl/unx/inc/i18n_xkb.hxx
index db6517cbea0b..748e99cd28b7 100644
--- a/vcl/unx/inc/i18n_xkb.hxx
+++ b/vcl/unx/inc/i18n_xkb.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,83 +26,83 @@
************************************************************************/
#ifndef _SAL_I18N_XKBDEXTENSION_HXX
-#define _SAL_I18N_XKBDEXTENSION_HXX
+#define _SAL_I18N_XKBDEXTENSION_HXX
#include <sal/types.h>
#include <vcl/dllapi.h>
-class VCL_DLLPUBLIC SalI18N_KeyboardExtension
+class VCL_DLLPUBLIC SalI18N_KeyboardExtension
{
private:
- sal_Bool mbUseExtension;
- sal_uInt32 mnDefaultGroup;
- sal_uInt32 mnGroup;
- int mnEventBase;
+ sal_Bool mbUseExtension;
+ sal_uInt32 mnDefaultGroup;
+ sal_uInt32 mnGroup;
+ int mnEventBase;
int mnErrorBase;
- Display* mpDisplay;
+ Display* mpDisplay;
public:
SalI18N_KeyboardExtension( Display *pDisplay );
- inline ~SalI18N_KeyboardExtension();
+ inline ~SalI18N_KeyboardExtension();
- inline sal_Bool UseExtension() const ; // server and client support the
- // extension
- inline void UseExtension( sal_Bool bState );// used to disable the Extension
+ inline sal_Bool UseExtension() const ; // server and client support the
+ // extension
+ inline void UseExtension( sal_Bool bState );// used to disable the Extension
- void Dispatch( XEvent *pEvent ); // keep track of group changes
+ void Dispatch( XEvent *pEvent ); // keep track of group changes
- sal_uInt32 LookupKeysymInGroup( sal_uInt32 nKeyCode,
- sal_uInt32 nShiftState,
+ sal_uInt32 LookupKeysymInGroup( sal_uInt32 nKeyCode,
+ sal_uInt32 nShiftState,
sal_uInt32 nGroup ) const ;
- inline sal_uInt32 LookupKeysymInDefaultGroup(
- sal_uInt32 nKeyCode,
+ inline sal_uInt32 LookupKeysymInDefaultGroup(
+ sal_uInt32 nKeyCode,
sal_uInt32 nShiftState ) const ;
- inline sal_uInt32 GetGroup() const ; // the current keyboard group
- inline sal_uInt32 GetDefaultGroup() const ; // base group, usually group 1
- inline int GetEventBase() const ;
+ inline sal_uInt32 GetGroup() const ; // the current keyboard group
+ inline sal_uInt32 GetDefaultGroup() const ; // base group, usually group 1
+ inline int GetEventBase() const ;
protected:
-
- SalI18N_KeyboardExtension(); // disabled
+
+ SalI18N_KeyboardExtension(); // disabled
};
-inline
+inline
SalI18N_KeyboardExtension::~SalI18N_KeyboardExtension()
{
}
-inline sal_Bool
+inline sal_Bool
SalI18N_KeyboardExtension::UseExtension() const
-{
- return mbUseExtension;
+{
+ return mbUseExtension;
}
inline void
-SalI18N_KeyboardExtension::UseExtension( sal_Bool bState )
-{
+SalI18N_KeyboardExtension::UseExtension( sal_Bool bState )
+{
mbUseExtension = mbUseExtension && bState;
}
-inline sal_uInt32
-SalI18N_KeyboardExtension::LookupKeysymInDefaultGroup( sal_uInt32 nKeyCode,
+inline sal_uInt32
+SalI18N_KeyboardExtension::LookupKeysymInDefaultGroup( sal_uInt32 nKeyCode,
sal_uInt32 nShiftState ) const
-{
- return LookupKeysymInGroup( nKeyCode, nShiftState, mnDefaultGroup );
+{
+ return LookupKeysymInGroup( nKeyCode, nShiftState, mnDefaultGroup );
}
-inline sal_uInt32
-SalI18N_KeyboardExtension::GetGroup() const
-{
+inline sal_uInt32
+SalI18N_KeyboardExtension::GetGroup() const
+{
return mnGroup;
-}
-
-inline sal_uInt32
+}
+
+inline sal_uInt32
SalI18N_KeyboardExtension::GetDefaultGroup() const
-{
- return mnDefaultGroup;
+{
+ return mnDefaultGroup;
}
inline int
diff --git a/vcl/unx/inc/plugins/gtk/atkbridge.hxx b/vcl/unx/inc/plugins/gtk/atkbridge.hxx
index 959b3aec1fb1..7763629d15f4 100644
--- a/vcl/unx/inc/plugins/gtk/atkbridge.hxx
+++ b/vcl/unx/inc/plugins/gtk/atkbridge.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/plugins/gtk/gtkdata.hxx b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
index d4dec957a6b3..3ce837c1417f 100644
--- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,9 +45,9 @@ class GtkData : public X11SalData
public:
GtkData() {}
virtual ~GtkData();
-
+
virtual void Init();
-
+
virtual void initNWF();
virtual void deInitNWF();
};
@@ -56,7 +56,7 @@ class GtkSalFrame;
class GtkSalDisplay : public SalDisplay
{
- GdkDisplay* m_pGdkDisplay;
+ GdkDisplay* m_pGdkDisplay;
GdkCursor *m_aCursors[ POINTER_COUNT ];
bool m_bStartupCompleted;
GdkCursor* getFromXPM( const char *pBitmap, const char *pMask,
@@ -80,7 +80,7 @@ public:
inline void EventGuardAcquire() { osl_acquireMutex( hEventGuard_ ); }
inline void EventGuardRelease() { osl_releaseMutex( hEventGuard_ ); }
void startupNotificationCompleted() { m_bStartupCompleted = true; }
-
+
void screenSizeChanged( GdkScreen* );
void monitorsChanged( GdkScreen* );
};
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index 18dd476fc2c4..508eb861b694 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,6 +38,8 @@
#include <vcl/salframe.hxx>
#include <vcl/sysdata.hxx>
+#include "tools/link.hxx"
+
#include <list>
#include <vector>
@@ -58,7 +60,7 @@ class GtkSalFrame : public SalFrame
{}
~GraphicsHolder();
};
-
+
struct IMHandler
{
//--------------------------------------------------------
@@ -78,7 +80,7 @@ class GtkSalFrame : public SalFrame
guint keyval;
guint16 hardware_keycode;
guint8 group;
-
+
PreviousKeyPress (GdkEventKey *event)
: window (NULL),
send_event (0),
@@ -99,7 +101,7 @@ class GtkSalFrame : public SalFrame
group = event->group;
}
}
-
+
PreviousKeyPress( const PreviousKeyPress& rPrev )
: window( rPrev.window ),
send_event( rPrev.send_event ),
@@ -109,7 +111,7 @@ class GtkSalFrame : public SalFrame
hardware_keycode( rPrev.hardware_keycode ),
group( rPrev.group )
{}
-
+
bool operator== (GdkEventKey *event) const
{
return (event != NULL)
@@ -123,8 +125,8 @@ class GtkSalFrame : public SalFrame
;
}
};
-
-
+
+
GtkSalFrame* m_pFrame;
std::list< PreviousKeyPress > m_aPrevKeyPresses;
int m_nPrevKeyPresses; // avoid using size()
@@ -133,7 +135,7 @@ class GtkSalFrame : public SalFrame
bool m_bPreeditJustChanged;
SalExtTextInputEvent m_aInputEvent;
std::vector< USHORT > m_aInputFlags;
-
+
IMHandler( GtkSalFrame* );
~IMHandler();
@@ -144,17 +146,17 @@ class GtkSalFrame : public SalFrame
void endExtTextInput( USHORT nFlags );
bool handleKeyEvent( GdkEventKey* pEvent );
void focusChanged( bool bFocusIn );
-
+
void doCallEndExtTextInput();
void sendEmptyCommit();
-
-
- static void signalIMCommit( GtkIMContext*, gchar*, gpointer );
- static gboolean signalIMDeleteSurrounding( GtkIMContext*, gint, gint, gpointer );
- static void signalIMPreeditChanged( GtkIMContext*, gpointer );
- static void signalIMPreeditEnd( GtkIMContext*, gpointer );
- static void signalIMPreeditStart( GtkIMContext*, gpointer );
- static gboolean signalIMRetrieveSurrounding( GtkIMContext*, gpointer );
+
+
+ static void signalIMCommit( GtkIMContext*, gchar*, gpointer );
+ static gboolean signalIMDeleteSurrounding( GtkIMContext*, gint, gint, gpointer );
+ static void signalIMPreeditChanged( GtkIMContext*, gpointer );
+ static void signalIMPreeditEnd( GtkIMContext*, gpointer );
+ static void signalIMPreeditStart( GtkIMContext*, gpointer );
+ static gboolean signalIMRetrieveSurrounding( GtkIMContext*, gpointer );
};
friend struct IMHandler;
@@ -188,40 +190,40 @@ class GtkSalFrame : public SalFrame
bool m_bWindowIsGtkPlug;
bool m_bSetFocusOnMap;
String m_aTitle;
-
+
IMHandler* m_pIMHandler;
-
+
Size m_aMaxSize;
Size m_aMinSize;
- Rectangle m_aRestorePosSize;
-
- GdkRegion* m_pRegion;
+ Rectangle m_aRestorePosSize;
+
+ GdkRegion* m_pRegion;
void Init( SalFrame* pParent, ULONG nStyle );
void Init( SystemParentData* pSysData );
void InitCommon();
// signals
- static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer );
- static void signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer );
- static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer );
- static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
- static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer );
- static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer );
- static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, gpointer );
- static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer );
- static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer );
- static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer );
- static gboolean signalState( GtkWidget*, GdkEvent*, gpointer );
- static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer );
- static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, gpointer );
- static gboolean signalVisibility( GtkWidget*, GdkEventVisibility*, gpointer );
- static void signalDestroy( GtkObject*, gpointer );
-
- void Center();
- void SetDefaultSize();
- void setAutoLock( bool bLock );
- void setScreenSaverTimeout( int nTimeout );
+ static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer );
+ static void signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer );
+ static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer );
+ static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
+ static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer );
+ static gboolean signalUnmap( GtkWidget*, GdkEvent*, gpointer );
+ static gboolean signalConfigure( GtkWidget*, GdkEventConfigure*, gpointer );
+ static gboolean signalMotion( GtkWidget*, GdkEventMotion*, gpointer );
+ static gboolean signalKey( GtkWidget*, GdkEventKey*, gpointer );
+ static gboolean signalDelete( GtkWidget*, GdkEvent*, gpointer );
+ static gboolean signalState( GtkWidget*, GdkEvent*, gpointer );
+ static gboolean signalScroll( GtkWidget*, GdkEvent*, gpointer );
+ static gboolean signalCrossing( GtkWidget*, GdkEventCrossing*, gpointer );
+ static gboolean signalVisibility( GtkWidget*, GdkEventVisibility*, gpointer );
+ static void signalDestroy( GtkObject*, gpointer );
+
+ void Center();
+ void SetDefaultSize();
+ void setAutoLock( bool bLock );
+ void setScreenSaverTimeout( int nTimeout );
void doKeyCallback( guint state,
guint keyval,
@@ -246,7 +248,7 @@ class GtkSalFrame : public SalFrame
!(m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) && // toolbars are also not
!(m_nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE); // focusable floats are not
}
-
+
bool isChild( bool bPlug = true, bool bSysChild = true )
{
ULONG nMask = 0;
@@ -256,7 +258,7 @@ class GtkSalFrame : public SalFrame
nMask |= SAL_FRAME_STYLE_SYSTEMCHILD;
return (m_nStyle & nMask) != 0;
}
-
+
void resizeWindow( long nWidth, long nHeight );
void moveWindow( long nX, long nY );
@@ -265,6 +267,8 @@ class GtkSalFrame : public SalFrame
void setMinMaxSize();
void createNewWindow( XLIB_Window aParent, bool bXEmbed, int nScreen );
void askForXEmbedFocus( sal_Int32 nTimecode );
+
+ DECL_LINK( ImplDelayedFullScreenHdl, void* );
public:
GtkSalFrame( SalFrame* pParent, ULONG nStyle );
GtkSalFrame( SystemParentData* pSysData );
@@ -275,20 +279,20 @@ public:
bool Dispatch( const XEvent* pEvent );
void grabPointer( BOOL bGrab, BOOL bOwnerEvents = FALSE );
- GtkSalDisplay* getDisplay();
- GdkDisplay* getGdkDisplay();
- GtkWidget* getWindow() const { return m_pWindow; }
- GtkFixed* getFixedContainer() const { return m_pFixedContainer; }
- GdkWindow* getForeignParent() const { return m_pForeignParent; }
- GdkNativeWindow getForeignParentWindow() const { return m_aForeignParentWindow; }
- GdkWindow* getForeignTopLevel() const { return m_pForeignTopLevel; }
- GdkNativeWindow getForeignTopLevelWindow() const { return m_aForeignTopLevelWindow; }
+ GtkSalDisplay* getDisplay();
+ GdkDisplay* getGdkDisplay();
+ GtkWidget* getWindow() const { return m_pWindow; }
+ GtkFixed* getFixedContainer() const { return m_pFixedContainer; }
+ GdkWindow* getForeignParent() const { return m_pForeignParent; }
+ GdkNativeWindow getForeignParentWindow() const { return m_aForeignParentWindow; }
+ GdkWindow* getForeignTopLevel() const { return m_pForeignTopLevel; }
+ GdkNativeWindow getForeignTopLevelWindow() const { return m_aForeignTopLevelWindow; }
GdkVisibilityState getVisibilityState() const
{ return m_nVisibility; }
Pixmap getBackgroundPixmap() const { return m_hBackgroundPixmap; }
int getScreenNumber() const { return m_nScreen; }
void updateScreenNumber();
-
+
void moveToScreen( int nScreen );
virtual ~GtkSalFrame();
@@ -380,13 +384,13 @@ public:
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
- virtual void ResetClipRegion();
+ virtual void ResetClipRegion();
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( ULONG nRects );
// add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
// done setting up the clipregion
- virtual void EndSetClipRegion();
+ virtual void EndSetClipRegion();
static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
};
diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
index 7544a566d8ae..0dc2b8ba61e4 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,34 +33,34 @@
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
#include <tools/postx.h>
-
+
#include <salgdi.h>
class GtkSalGraphics : public X11SalGraphics
{
GtkWidget *m_pWindow;
Region m_aClipRegion;
-
+
public:
GtkSalGraphics( GtkWidget *window )
: m_pWindow( window ),
m_aClipRegion( REGION_NULL )
{}
virtual ~GtkSalGraphics();
-
+
inline GtkWidget* GetGtkWidget() const { return m_pWindow; }
inline GdkWindow* GetGdkWindow() const { return m_pWindow->window; }
inline GtkSalFrame* GetGtkFrame() const { return static_cast<GtkSalFrame*>(m_pFrame); }
- void SetWindow( GtkWidget* window ) { m_pWindow = window; }
-
-
+ void SetWindow( GtkWidget* window ) { m_pWindow = window; }
+
+
// will be set when UI theme was changed
static BOOL bThemeChanged;
static BOOL bNeedPixmapPaint;
static BOOL bGlobalNeedPixmapPaint;
static BOOL bToolbarGripWorkaround;
static BOOL bNeedButtonStyleAsEditBackgroundWorkaround;
-
+
// native widget methods
virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
@@ -74,28 +74,28 @@ public:
virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& rCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
-
+
//helper methods for frame's UpdateSettings
void updateSettings( AllSettings& rSettings );
-
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( ULONG nCount );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual void EndSetClipRegion();
// some themes set the background pixmap of our window EVERY time
// a control is painted; but presentation effects need
// the background set to None; workaround: set the background
// before copyBits
- virtual void copyBits( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
protected:
typedef std::list< Rectangle > clipList;
GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect );
- BOOL NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
+ BOOL NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
BOOL NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
@@ -142,7 +142,7 @@ protected:
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
-
+
BOOL NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
diff --git a/vcl/unx/inc/plugins/gtk/gtkinst.hxx b/vcl/unx/inc/plugins/gtk/gtkinst.hxx
index ee07199cb266..bf9b49843e23 100644
--- a/vcl/unx/inc/plugins/gtk/gtkinst.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkinst.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,19 +35,19 @@ class GtkYieldMutex : public SalYieldMutex
{
public:
GtkYieldMutex();
- virtual void acquire();
- virtual void release();
- virtual sal_Bool tryToAcquire();
+ virtual void acquire();
+ virtual void release();
+ virtual sal_Bool tryToAcquire();
virtual int Grab();
virtual void Ungrab( int );
class GtkYieldGuard
{
- GtkYieldMutex* m_pMutex;
- int m_nGrab;
+ GtkYieldMutex* m_pMutex;
+ int m_nGrab;
public:
- GtkYieldGuard( GtkYieldMutex* pMutex )
+ GtkYieldGuard( GtkYieldMutex* pMutex )
: m_pMutex( pMutex )
{
m_nGrab = m_pMutex->Grab();
@@ -61,8 +61,8 @@ public:
class GtkHookedYieldMutex : public GtkYieldMutex
{
- virtual int Grab() { return 0; };
- virtual void Ungrab(int ) {};
+ virtual int Grab() { return 0; };
+ virtual void Ungrab(int ) {};
std::list<ULONG> aYieldStack;
public:
GtkHookedYieldMutex();
@@ -79,15 +79,15 @@ public:
class GtkInstance : public X11SalInstance
{
public:
- GtkInstance( SalYieldMutex* pMutex )
+ GtkInstance( SalYieldMutex* pMutex )
: X11SalInstance( pMutex )
{}
virtual ~GtkInstance();
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
- virtual SalSystem* CreateSalSystem();
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual SalSystem* CreateSalSystem();
virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
};
diff --git a/vcl/unx/inc/plugins/gtk/gtkobject.hxx b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
index ea740249f1c6..f801ffd641f8 100644
--- a/vcl/unx/inc/plugins/gtk/gtkobject.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,35 +35,35 @@
class GtkSalObject : public SalObject
{
- SystemChildData m_aSystemData;
- GtkWidget* m_pSocket;
- GdkRegion* m_pRegion;
+ SystemChildData m_aSystemData;
+ GtkWidget* m_pSocket;
+ GdkRegion* m_pRegion;
// signals
- static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer );
- static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
- static void signalDestroy( GtkObject*, gpointer );
+ static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer );
+ static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
+ static void signalDestroy( GtkObject*, gpointer );
public:
GtkSalObject( GtkSalFrame* pParent, BOOL bShow = TRUE );
virtual ~GtkSalObject();
// overload all pure virtual methods
- virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual void EndSetClipRegion();
-
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
- virtual void Show( BOOL bVisible );
- virtual void Enable( BOOL nEnable );
- virtual void GrabFocus();
+ virtual void ResetClipRegion();
+ virtual USHORT GetClipRegionType();
+ virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
- virtual void SetBackground();
- virtual void SetBackground( SalColor nSalColor );
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
- virtual const SystemEnvData* GetSystemData() const;
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+ virtual const SystemEnvData* GetSystemData() const;
+
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/unx/inc/plugins/kde/kdedata.hxx b/vcl/unx/inc/plugins/kde/kdedata.hxx
index a55471901283..2a2733a6f65c 100644
--- a/vcl/unx/inc/plugins/kde/kdedata.hxx
+++ b/vcl/unx/inc/plugins/kde/kdedata.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ class KDEData : public X11SalData
public:
KDEData() {}
virtual ~KDEData();
-
+
virtual void Init();
virtual void initNWF();
virtual void deInitNWF();
@@ -56,9 +56,9 @@ class KDESalFrame : public X11SalFrame
struct GraphicsHolder
{
- X11SalGraphics* pGraphics;
- bool bInUse;
- GraphicsHolder()
+ X11SalGraphics* pGraphics;
+ bool bInUse;
+ GraphicsHolder()
: pGraphics( NULL ),
bInUse( false )
{}
@@ -80,7 +80,7 @@ public:
class KDESalInstance : public X11SalInstance
{
public:
- KDESalInstance( SalYieldMutex* pMutex )
+ KDESalInstance( SalYieldMutex* pMutex )
: X11SalInstance( pMutex ) {}
virtual ~KDESalInstance() {}
virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
@@ -103,7 +103,7 @@ public:
{}
virtual ~KDEXLib();
virtual void Init();
-
+
void doStartup();
};
diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h
index 4b1ac12116a3..179e9a4349f2 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,15 +42,15 @@ class SalInfoPrinter;
class VCL_DLLPUBLIC PspGraphics : public SalGraphics
{
- psp::JobData* m_pJobData;
- psp::PrinterGfx* m_pPrinterGfx;
- String* m_pPhoneNr;
- bool m_bSwallowFaxNo;
- String m_aPhoneCollection;
- bool m_bPhoneCollectionActive;
-
- ServerFont* m_pServerFont[ MAX_FALLBACK ];
- bool m_bFontVertical;
+ psp::JobData* m_pJobData;
+ psp::PrinterGfx* m_pPrinterGfx;
+ String* m_pPhoneNr;
+ bool m_bSwallowFaxNo;
+ String m_aPhoneCollection;
+ bool m_bPhoneCollectionActive;
+
+ ServerFont* m_pServerFont[ MAX_FALLBACK ];
+ bool m_bFontVertical;
SalInfoPrinter* m_pInfoPrinter;
public:
PspGraphics( psp::JobData* pJob, psp::PrinterGfx* pGfx, String* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter )
@@ -75,40 +75,40 @@ public:
static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& );
static void AnnounceFonts( ImplDevFontList*, const psp::FastPrintFontInfo& );
- static FontWidth ToFontWidth (psp::width::type eWidth);
- static FontWeight ToFontWeight (psp::weight::type eWeight);
- static FontPitch ToFontPitch (psp::pitch::type ePitch);
- static FontItalic ToFontItalic (psp::italic::type eItalic);
- static FontFamily ToFontFamily (psp::family::type eFamily);
+ static FontWidth ToFontWidth (psp::width::type eWidth);
+ static FontWeight ToFontWeight (psp::weight::type eWeight);
+ static FontPitch ToFontPitch (psp::pitch::type ePitch);
+ static FontItalic ToFontItalic (psp::italic::type eItalic);
+ static FontFamily ToFontFamily (psp::family::type eFamily);
// overload all pure virtual methods
- virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
- virtual long GetGraphicsWidth() const;
-
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
-
- virtual void SetLineColor();
- virtual void SetLineColor( SalColor nSalColor );
- virtual void SetFillColor();
- virtual void SetFillColor( SalColor nSalColor );
- virtual void SetXORMode( bool bSet, bool );
- virtual void SetROPLineColor( SalROPColor nROPColor );
- virtual void SetROPFillColor( SalROPColor nROPColor );
-
- virtual void SetTextColor( SalColor nSalColor );
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
+ virtual USHORT GetBitCount();
+ virtual long GetGraphicsWidth() const;
+
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( ULONG nCount );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual void EndSetClipRegion();
+
+ virtual void SetLineColor();
+ virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetFillColor();
+ virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetXORMode( bool bSet, bool );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
+
+ virtual void SetTextColor( SalColor nSalColor );
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
- virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
+ virtual void GetFontMetric( ImplFontMetricData* );
+ virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
virtual ImplFontCharMap* GetImplFontCharMap() const;
- virtual void GetDevFontList( ImplDevFontList* );
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -117,76 +117,76 @@ public:
FontSubsetInfo& rInfo
);
virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
virtual void GetGlyphWidths( const ImplFontData*,
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
- virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
+ virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
- virtual void drawPixel( long nX, long nY );
- virtual void drawPixel( long nX, long nY, SalColor nSalColor );
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolyPolygon( sal_uInt32 nPoly,
+ virtual void drawPixel( long nX, long nY );
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor );
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
+ virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
virtual bool drawPolyLine( const basegfx::B2DPolygon&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin);
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry );
- virtual void copyArea( long nDestX,
+ virtual void copyArea( long nDestX,
long nDestY,
long nSrcX,
long nSrcY,
long nSrcWidth,
long nSrcHeight,
USHORT nFlags );
- virtual void copyBits( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
const SalBitmap& rTransparentBitmap );
- virtual void drawMask( const SalTwoRect* pPosAry,
+ virtual void drawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor );
- virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
- virtual SalColor getPixel( long nX, long nY );
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
+ virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
-
+
virtual bool drawAlphaBitmap( const SalTwoRect&,
const SalBitmap& rSourceBitmap,
const SalBitmap& rAlphaBitmap );
virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
- virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemGraphicsData GetGraphicsData() const;
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
};
diff --git a/vcl/unx/inc/salbmp.h b/vcl/unx/inc/salbmp.h
index 23e038f30ab1..74c5c390d4c8 100644
--- a/vcl/unx/inc/salbmp.h
+++ b/vcl/unx/inc/salbmp.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,11 +36,11 @@
#include <vcl/salbmp.hxx>
#include <vcl/dllapi.h>
-struct BitmapBuffer;
-class BitmapPalette;
-class SalGraphics;
-class ImplSalDDB;
-class ImplSalBitmapCache;
+struct BitmapBuffer;
+class BitmapPalette;
+class SalGraphics;
+class ImplSalDDB;
+class ImplSalBitmapCache;
// -------------
// - SalBitmap -
@@ -50,10 +50,10 @@ class VCL_DLLPUBLIC X11SalBitmap : public SalBitmap
{
private:
- static BitmapBuffer* ImplCreateDIB( const Size& rSize,
- USHORT nBitCount,
+ static BitmapBuffer* ImplCreateDIB( const Size& rSize,
+ USHORT nBitCount,
const BitmapPalette& rPal );
- static BitmapBuffer* ImplCreateDIB( Drawable aDrawable,
+ static BitmapBuffer* ImplCreateDIB( Drawable aDrawable,
int nScreen,
long nDrawableDepth,
long nX, long nY,
@@ -61,12 +61,12 @@ private:
public:
- static ImplSalBitmapCache* mpCache;
- static ULONG mnCacheInstCount;
+ static ImplSalBitmapCache* mpCache;
+ static ULONG mnCacheInstCount;
- static void ImplCreateCache();
- static void ImplDestroyCache();
- void ImplRemovedFromCache();
+ static void ImplCreateCache();
+ static void ImplDestroyCache();
+ void ImplRemovedFromCache();
bool SnapShot (Display* pDisplay, XLIB_Window hWindow);
bool ImplCreateFromXImage( Display* pDisplay,
@@ -76,48 +76,48 @@ public:
private:
- BitmapBuffer* mpDIB;
- ImplSalDDB* mpDDB;
-
+ BitmapBuffer* mpDIB;
+ ImplSalDDB* mpDDB;
+
public:
SAL_DLLPRIVATE bool ImplCreateFromDrawable( Drawable aDrawable,
int nScreen,
long nDrawableDepth,
- long nX, long nY,
+ long nX, long nY,
long nWidth, long nHeight );
SAL_DLLPRIVATE XImage* ImplCreateXImage( SalDisplay* pSalDisp,
- int nScreen, long nDepth,
+ int nScreen, long nDepth,
const SalTwoRect& rTwoRect ) const;
SAL_DLLPRIVATE ImplSalDDB* ImplGetDDB( Drawable, int nScreen, long nDrawableDepth,
const SalTwoRect& ) const;
- void ImplDraw( Drawable aDrawable, int nScreen, long nDrawableDepth,
+ void ImplDraw( Drawable aDrawable, int nScreen, long nDrawableDepth,
const SalTwoRect& rTwoRect, const GC& rGC ) const;
-
-public:
-
+
+public:
+
X11SalBitmap();
virtual ~X11SalBitmap();
// overload pure virtual methods
- virtual bool Create( const Size& rSize,
- USHORT nBitCount,
+ virtual bool Create( const Size& rSize,
+ USHORT nBitCount,
const BitmapPalette& rPal );
- virtual bool Create( const SalBitmap& rSalBmp );
- virtual bool Create( const SalBitmap& rSalBmp,
+ virtual bool Create( const SalBitmap& rSalBmp );
+ virtual bool Create( const SalBitmap& rSalBmp,
SalGraphics* pGraphics );
- virtual bool Create( const SalBitmap& rSalBmp,
+ virtual bool Create( const SalBitmap& rSalBmp,
USHORT nNewBitCount );
-
- virtual void Destroy();
-
- virtual Size GetSize() const;
- virtual USHORT GetBitCount() const;
-
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
- virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+
+ virtual void Destroy();
+
+ virtual Size GetSize() const;
+ virtual USHORT GetBitCount() const;
+
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
virtual bool GetSystemData( BitmapSystemData& rData );
};
@@ -129,23 +129,23 @@ class ImplSalDDB
{
private:
- Pixmap maPixmap;
- SalTwoRect maTwoRect;
- long mnDepth;
+ Pixmap maPixmap;
+ SalTwoRect maTwoRect;
+ long mnDepth;
int mnScreen;
ImplSalDDB() {}
- static void ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
+ static void ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
Drawable aDstDrawable, long nDstDrawableDepth,
- long nSrcX, long nSrcY,
- long nDestWidth, long nDestHeight,
+ long nSrcX, long nSrcY,
+ long nDestWidth, long nDestHeight,
long nDestX, long nDestY, const GC& rGC );
-
-public:
-
+
+public:
+
ImplSalDDB( XImage* pImage,
- Drawable aDrawable, int nScreen,
+ Drawable aDrawable, int nScreen,
const SalTwoRect& rTwoRect );
ImplSalDDB( Drawable aDrawable,
int nScreen,
@@ -154,18 +154,18 @@ public:
ImplSalDDB( Display* pDisplay,
XLIB_Window hWindow,
int nScreen,
- XImage* pImage);
+ XImage* pImage);
~ImplSalDDB();
-
- Pixmap ImplGetPixmap() const { return maPixmap; }
- long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
- long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
- long ImplGetDepth() const { return mnDepth; }
- ULONG ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); }
+
+ Pixmap ImplGetPixmap() const { return maPixmap; }
+ long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
+ long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
+ long ImplGetDepth() const { return mnDepth; }
+ ULONG ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); }
int ImplGetScreen() const { return mnScreen; }
-
- bool ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const;
- void ImplDraw( Drawable aDrawable, long nDrawableDepth,
+
+ bool ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const;
+ void ImplDraw( Drawable aDrawable, long nDrawableDepth,
const SalTwoRect& rTwoRect, const GC& rGC ) const;
};
@@ -177,17 +177,17 @@ class ImplSalBitmapCache
{
private:
- List maBmpList;
- ULONG mnTotalSize;
-
-public:
+ List maBmpList;
+ ULONG mnTotalSize;
+public:
+
ImplSalBitmapCache();
~ImplSalBitmapCache();
- void ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize = 0UL, ULONG nFlags = 0UL );
- void ImplRemove( X11SalBitmap* pBmp );
- void ImplClear();
+ void ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize = 0UL, ULONG nFlags = 0UL );
+ void ImplRemove( X11SalBitmap* pBmp );
+ void ImplClear();
};
#endif // _SV_SALBMP_HXX
diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index 7e38e0a89bf2..c31cd4838bd4 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,43 +51,43 @@ DECLARE_LIST( SalDisplays, SalDisplay* )
#if defined SCO || defined LINUX || defined NETBSD || defined AIX || defined HPUX || defined FREEBSD
#include <pthread.h>
#else
-typedef unsigned int pthread_t;
+typedef unsigned int pthread_t;
#endif
// -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class VCL_DLLPUBLIC X11SalData : public SalData
{
protected:
- BOOL bNoExceptions_;
- SalXLib *pXLib_;
- SalDisplay *m_pSalDisplay;
- pthread_t hMainThread_;
+ BOOL bNoExceptions_;
+ SalXLib *pXLib_;
+ SalDisplay *m_pSalDisplay;
+ pthread_t hMainThread_;
rtl::OUString maLocalHostName;
public:
X11SalData();
virtual ~X11SalData();
-
- virtual void Init();
- virtual void initNWF();
- virtual void deInitNWF();
-
- inline void XError( Display *pDisplay, XErrorEvent *pEvent ) const;
-
- SalDisplay* GetDisplay() const
+
+ virtual void Init();
+ virtual void initNWF();
+ virtual void deInitNWF();
+
+ inline void XError( Display *pDisplay, XErrorEvent *pEvent ) const;
+
+ SalDisplay* GetDisplay() const
{ return m_pSalDisplay; }
- void SetSalDisplay( SalDisplay* pDisplay )
+ void SetSalDisplay( SalDisplay* pDisplay )
{ m_pSalDisplay = pDisplay; }
- void DeleteDisplay(); // for shutdown
-
- inline SalXLib* GetLib() const { return pXLib_; }
- inline pthread_t GetMainThread() const { return hMainThread_; }
-
- void StartTimer( ULONG nMS );
- inline void StopTimer();
- void Timeout() const;
+ void DeleteDisplay(); // for shutdown
+
+ inline SalXLib* GetLib() const { return pXLib_; }
+ inline pthread_t GetMainThread() const { return hMainThread_; }
+ void StartTimer( ULONG nMS );
+ inline void StopTimer();
+ void Timeout() const;
+
const rtl::OUString& GetLocalHostName() const
{ return maLocalHostName; }
@@ -106,13 +106,13 @@ inline X11SalData* GetX11SalData()
#ifdef _SV_SALDISP_HXX
-inline void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent ) const
+inline void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent ) const
{ pXLib_->XError( pDisplay, pEvent ); }
#endif
class YieldMutexReleaser
{
- ULONG m_nYieldCount;
+ ULONG m_nYieldCount;
public:
inline YieldMutexReleaser();
inline ~YieldMutexReleaser();
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 3734cbec6ef7..58f33023588d 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,10 +29,10 @@
#define _SV_SALDISP_HXX
// -=-= exports =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class SalDisplay;
-class SalColormap;
-class SalVisual;
-class SalXLib;
+class SalDisplay;
+class SalColormap;
+class SalVisual;
+class SalXLib;
// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include <salunx.h>
@@ -52,37 +52,37 @@ class SalXLib;
#include <vcl/dllapi.h>
// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class BitmapPalette;
-class SalFrame;
-class ColorMask;
+class BitmapPalette;
+class SalFrame;
+class ColorMask;
namespace vcl_sal { class WMAdaptor; }
class DtIntegrator;
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define PROPERTY_SUPPORT_WM_SetPos 0x00000001
-#define PROPERTY_SUPPORT_WM_Screen 0x00000002
-#define PROPERTY_SUPPORT_WM_Parent_Pixmap_None 0x00000004
-#define PROPERTY_SUPPORT_WM_ClientPos 0x00000008
-#define PROPERTY_SUPPORT_XSetClipMask 0x00000010 // for bitmap ops.
-#define PROPERTY_SUPPORT_3ButtonMouse 0x00000020
-
-#define PROPERTY_BUG_XA_FAMILY_NAME_nil 0x00001000
-#define PROPERTY_BUG_XCopyArea_GXxor 0x00002000 // from window
-#define PROPERTY_BUG_Stipple 0x00004000 // 0/1 inverted
+#define PROPERTY_SUPPORT_WM_SetPos 0x00000001
+#define PROPERTY_SUPPORT_WM_Screen 0x00000002
+#define PROPERTY_SUPPORT_WM_Parent_Pixmap_None 0x00000004
+#define PROPERTY_SUPPORT_WM_ClientPos 0x00000008
+#define PROPERTY_SUPPORT_XSetClipMask 0x00000010 // for bitmap ops.
+#define PROPERTY_SUPPORT_3ButtonMouse 0x00000020
+
+#define PROPERTY_BUG_XA_FAMILY_NAME_nil 0x00001000
+#define PROPERTY_BUG_XCopyArea_GXxor 0x00002000 // from window
+#define PROPERTY_BUG_Stipple 0x00004000 // 0/1 inverted
#define PROPERTY_BUG_Tile 0x00008000 // Recreate the
// dither brush each time
#define PROPERTY_BUG_FillPolygon_Tile 0x00010000 // always Toggle Fillstyle
-#define PROPERTY_BUG_DrawLine 0x00020000 // a DrawLine is one point to short
-#define PROPERTY_BUG_CopyPlane_RevertBWPixel 0x00040000 // revert fg and bg for xcopyplane
-#define PROPERTY_BUG_CopyArea_OnlySmallSlices 0x00080000
-#define PROPERTY_BUG_Bitmap_Bit_Order 0x00100000
+#define PROPERTY_BUG_DrawLine 0x00020000 // a DrawLine is one point to short
+#define PROPERTY_BUG_CopyPlane_RevertBWPixel 0x00040000 // revert fg and bg for xcopyplane
+#define PROPERTY_BUG_CopyArea_OnlySmallSlices 0x00080000
+#define PROPERTY_BUG_Bitmap_Bit_Order 0x00100000
-#define PROPERTY_FEATURE_Maximize 0x01000000
+#define PROPERTY_FEATURE_Maximize 0x01000000
#define PROPERTY_FEATURE_SharedMemory 0x02000000
#define PROPERTY_FEATURE_TrustedSolaris 0x04000000
-#define PROPERTY_DEFAULT 0x00000FCB
+#define PROPERTY_DEFAULT 0x00000FCB
// ------------------------------------------------------------------------
// server vendor
@@ -106,16 +106,16 @@ typedef enum {
extern "C" srv_vendor_t sal_GetServerVendor( Display *p_display );
// -=-= SalWM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-enum SalWM { olwm, // Open Look
- mwm, // Motif
- kwm, // KDE Desktop Environment
- FourDwm, // SGI
- vuewm, // HP
- dtwm, // CDE
- winmgr, // Oracle NC
+enum SalWM { olwm, // Open Look
+ mwm, // Motif
+ kwm, // KDE Desktop Environment
+ FourDwm, // SGI
+ vuewm, // HP
+ dtwm, // CDE
+ winmgr, // Oracle NC
twm,
- fvwm, // ...
- pmwm, // SCO
+ fvwm, // ...
+ pmwm, // SCO
otherwm };
// -=-= SalRGB -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -124,7 +124,7 @@ enum SalWM { olwm, // Open Look
enum SalRGB { RGB, RBG,
GBR, GRB,
BGR, BRG,
- RGBA, RBGA,
+ RGBA, RBGA,
GBRA, GRBA,
BGRA, BRGA,
other };
@@ -132,28 +132,28 @@ enum SalRGB { RGB, RBG,
// -=-= SalVisual =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class SalVisual : public XVisualInfo
{
- SalRGB eRGBMode_;
- int nRedShift_;
- int nGreenShift_;
- int nBlueShift_;
- int nRedBits_;
- int nGreenBits_;
- int nBlueBits_;
+ SalRGB eRGBMode_;
+ int nRedShift_;
+ int nGreenShift_;
+ int nBlueShift_;
+ int nRedBits_;
+ int nGreenBits_;
+ int nBlueBits_;
public:
SalVisual();
~SalVisual();
SalVisual( const XVisualInfo* pXVI );
- inline VisualID GetVisualId() const { return visualid; }
- inline Visual *GetVisual() const { return visual; }
- inline int GetClass() const { return c_class; }
- inline int GetDepth() const { return depth; }
- inline SalRGB GetMode() const { return eRGBMode_; }
-
- Pixel GetTCPixel( SalColor nColor ) const;
- SalColor GetTCColor( Pixel nPixel ) const;
- BOOL Convert( int &n0, int &n1, int &n2, int &n3 ); // 32bit
- BOOL Convert( int &n0, int &n1, int &n2 ); // 24bit
+ inline VisualID GetVisualId() const { return visualid; }
+ inline Visual *GetVisual() const { return visual; }
+ inline int GetClass() const { return c_class; }
+ inline int GetDepth() const { return depth; }
+ inline SalRGB GetMode() const { return eRGBMode_; }
+
+ Pixel GetTCPixel( SalColor nColor ) const;
+ SalColor GetTCColor( Pixel nPixel ) const;
+ BOOL Convert( int &n0, int &n1, int &n2, int &n3 ); // 32bit
+ BOOL Convert( int &n0, int &n1, int &n2 ); // 24bit
};
// -=-= SalColormap =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -161,16 +161,16 @@ class SalColormap
{
const SalDisplay* m_pDisplay;
Colormap m_hColormap;
- std::vector<SalColor> m_aPalette; // Pseudocolor
+ std::vector<SalColor> m_aPalette; // Pseudocolor
SalVisual m_aVisual;
- std::vector<USHORT> m_aLookupTable; // Pseudocolor: 12bit reduction
+ std::vector<USHORT> m_aLookupTable; // Pseudocolor: 12bit reduction
Pixel m_nWhitePixel;
Pixel m_nBlackPixel;
- Pixel m_nUsed; // Pseudocolor
+ Pixel m_nUsed; // Pseudocolor
int m_nScreen;
- void GetPalette();
- void GetLookupTable();
+ void GetPalette();
+ void GetLookupTable();
public:
SalColormap( const SalDisplay* pSalDisplay,
Colormap hColormap,
@@ -180,28 +180,28 @@ public:
SalColormap();
~SalColormap();
- inline Colormap GetXColormap() const { return m_hColormap; }
- inline const SalDisplay* GetDisplay() const { return m_pDisplay; }
- inline Display* GetXDisplay() const;
- inline const SalVisual& GetVisual() const { return m_aVisual; }
- inline Visual* GetXVisual() const { return m_aVisual.GetVisual(); }
- inline Pixel GetWhitePixel() const { return m_nWhitePixel; }
- inline Pixel GetBlackPixel() const { return m_nBlackPixel; }
- inline Pixel GetUsed() const { return m_nUsed; }
- inline int GetClass() const { return m_aVisual.GetClass(); }
+ inline Colormap GetXColormap() const { return m_hColormap; }
+ inline const SalDisplay* GetDisplay() const { return m_pDisplay; }
+ inline Display* GetXDisplay() const;
+ inline const SalVisual& GetVisual() const { return m_aVisual; }
+ inline Visual* GetXVisual() const { return m_aVisual.GetVisual(); }
+ inline Pixel GetWhitePixel() const { return m_nWhitePixel; }
+ inline Pixel GetBlackPixel() const { return m_nBlackPixel; }
+ inline Pixel GetUsed() const { return m_nUsed; }
+ inline int GetClass() const { return m_aVisual.GetClass(); }
inline int GetScreenNumber() const { return m_nScreen; }
- BOOL GetXPixels( XColor &rColor,
+ BOOL GetXPixels( XColor &rColor,
int r,
int g,
int b ) const;
- inline BOOL GetXPixel( XColor &rColor,
+ inline BOOL GetXPixel( XColor &rColor,
int r,
int g,
int b ) const;
- Pixel GetPixel( SalColor nColor ) const;
- SalColor GetColor( Pixel nPixel ) const;
- void SetPalette( const BitmapPalette &rPalette );
+ Pixel GetPixel( SalColor nColor ) const;
+ SalColor GetColor( Pixel nPixel ) const;
+ void SetPalette( const BitmapPalette &rPalette );
};
// -=-= SalXLib =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -211,18 +211,18 @@ struct YieldEntry;
class VCL_DLLPUBLIC SalXLib
{
protected:
- timeval m_aTimeout;
+ timeval m_aTimeout;
ULONG m_nTimeoutMS;
int m_pTimeoutFDS[2];
- bool m_bHaveSystemChildFrames;
-
- int nFDs_;
- fd_set aReadFDS_;
- fd_set aExceptionFDS_;
- YieldEntry *pYieldEntries_;
+ bool m_bHaveSystemChildFrames;
+ int nFDs_;
+ fd_set aReadFDS_;
+ fd_set aExceptionFDS_;
+ YieldEntry *pYieldEntries_;
+
struct XErrorStackEntry
{
bool m_bIgnore;
@@ -234,32 +234,32 @@ protected:
XIOErrorHandler m_aOrigXIOErrorHandler;
public:
SalXLib();
- virtual ~SalXLib();
- virtual void Init();
+ virtual ~SalXLib();
+ virtual void Init();
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual void Wakeup();
- virtual void PostUserEvent();
+ virtual void PostUserEvent();
virtual void Insert( int fd, void* data,
- YieldFunc pending,
- YieldFunc queued,
- YieldFunc handle );
+ YieldFunc pending,
+ YieldFunc queued,
+ YieldFunc handle );
virtual void Remove( int fd );
- void XError( Display *pDisp, XErrorEvent *pEvent );
+ void XError( Display *pDisp, XErrorEvent *pEvent );
bool HasXErrorOccured() const { return m_aXErrorHandlerStack.back().m_bWas; }
unsigned int GetLastXErrorRequestCode() const { return m_aXErrorHandlerStack.back().m_nLastErrorRequest; }
void ResetXErrorOccured() { m_aXErrorHandlerStack.back().m_bWas = false; }
void PushXErrorLevel( bool bIgnore );
void PopXErrorLevel();
- virtual void StartTimer( ULONG nMS );
- virtual void StopTimer();
+ virtual void StartTimer( ULONG nMS );
+ virtual void StopTimer();
bool CheckTimeout( bool bExecuteTimers = true );
- void setHaveSystemChildFrame()
+ void setHaveSystemChildFrame()
{ m_bHaveSystemChildFrames = true; }
bool getHaveSystemChildFrame() const
{ return m_bHaveSystemChildFrames; }
@@ -306,13 +306,13 @@ public:
Size m_aSize;
SalVisual m_aVisual;
SalColormap m_aColormap;
- GC m_aMonoGC;
- GC m_aCopyGC;
- GC m_aAndInvertedGC;
- GC m_aAndGC;
- GC m_aOrGC;
- GC m_aStippleGC;
- Pixmap m_hInvert50;
+ GC m_aMonoGC;
+ GC m_aCopyGC;
+ GC m_aAndInvertedGC;
+ GC m_aAndGC;
+ GC m_aOrGC;
+ GC m_aStippleGC;
+ Pixmap m_hInvert50;
mutable RenderEntryMap m_aRenderData;
ScreenData() :
@@ -332,83 +332,83 @@ public:
// -=-= UserEvent =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
struct SalUserEvent
{
- SalFrame* m_pFrame;
- void* m_pData;
- USHORT m_nEvent;
+ SalFrame* m_pFrame;
+ void* m_pData;
+ USHORT m_nEvent;
- SalUserEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT )
+ SalUserEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT )
: m_pFrame( pFrame ),
m_pData( pData ),
m_nEvent( nEvent )
{}
};
-protected:
- SalXLib *pXLib_;
- SalI18N_InputMethod *mpInputMethod;
- SalI18N_KeyboardExtension *mpKbdExtension;
+protected:
+ SalXLib *pXLib_;
+ SalI18N_InputMethod *mpInputMethod;
+ SalI18N_KeyboardExtension *mpKbdExtension;
- AttributeProvider *mpFactory;
- XlfdStorage *mpFontList;
- const ExtendedXlfd *mpFallbackFactory;
+ AttributeProvider *mpFactory;
+ XlfdStorage *mpFontList;
+ const ExtendedXlfd *mpFallbackFactory;
- Display *pDisp_; // X Display
- int m_nDefaultScreen; // XDefaultScreen
+ Display *pDisp_; // X Display
+ int m_nDefaultScreen; // XDefaultScreen
std::vector< ScreenData > m_aScreens;
ScreenData m_aInvalidScreenData;
- Pair aResolution_; // [dpi]
- bool mbExactResolution;
- ULONG nMaxRequestSize_; // [byte]
-
- srv_vendor_t meServerVendor;
- SalWM eWindowManager_;
- ULONG nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE
- BOOL bLocal_; // Server==Client? Init
+ Pair aResolution_; // [dpi]
+ bool mbExactResolution;
+ ULONG nMaxRequestSize_; // [byte]
+
+ srv_vendor_t meServerVendor;
+ SalWM eWindowManager_;
+ ULONG nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE
+ BOOL bLocal_; // Server==Client? Init
// in SalDisplay::IsLocal()
- BOOL mbLocalIsValid; // bLocal_ is valid ?
+ BOOL mbLocalIsValid; // bLocal_ is valid ?
// until x bytes
oslMutex hEventGuard_;
std::list< SalUserEvent > m_aUserEvents;
- XLIB_Cursor aPointerCache_[POINTER_COUNT];
- SalFrame* m_pCapture;
+ XLIB_Cursor aPointerCache_[POINTER_COUNT];
+ SalFrame* m_pCapture;
mutable SalFontCache* m_pFontCache;
// Keyboard
- BOOL bNumLockFromXS_; // Num Lock handled by X Server
- int nNumLockIndex_; // modifier index in modmap
- int nNumLockMask_; // keyevent state mask for
- KeySym nShiftKeySym_; // first shift modifier
- KeySym nCtrlKeySym_; // first control modifier
- KeySym nMod1KeySym_; // first mod1 modifier
- ByteString m_aKeyboardName;
-
- vcl_sal::WMAdaptor* m_pWMAdaptor;
+ BOOL bNumLockFromXS_; // Num Lock handled by X Server
+ int nNumLockIndex_; // modifier index in modmap
+ int nNumLockMask_; // keyevent state mask for
+ KeySym nShiftKeySym_; // first shift modifier
+ KeySym nCtrlKeySym_; // first control modifier
+ KeySym nMod1KeySym_; // first mod1 modifier
+ ByteString m_aKeyboardName;
+
+ vcl_sal::WMAdaptor* m_pWMAdaptor;
DtIntegrator* m_pDtIntegrator;
- bool m_bXinerama;
+ bool m_bXinerama;
std::vector< Rectangle > m_aXineramaScreens;
std::list<SalFrame*> m_aFrames;
std::list<SalObject*> m_aSalObjects;
-
+
bool m_bUseRandRWrapper; // don't use randr on gtk, use gdk signals there
-
+
mutable XLIB_Time m_nLastUserEventTime; // mutable because changed on first access
- void DestroyFontCache();
- virtual long Dispatch( XEvent *pEvent ) = 0;
- void InitXinerama();
+ void DestroyFontCache();
+ virtual long Dispatch( XEvent *pEvent ) = 0;
+ void InitXinerama();
void InitRandR( XLIB_Window aRoot ) const;
void DeInitRandR();
int processRandREvent( XEvent* );
- void doDestruct();
+ void doDestruct();
void addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
public:
- static SalDisplay *GetSalDisplay( Display* display );
- static BOOL BestVisual( Display *pDisp,
+ static SalDisplay *GetSalDisplay( Display* display );
+ static BOOL BestVisual( Display *pDisp,
int nScreen,
XVisualInfo &rVI );
@@ -417,50 +417,50 @@ public:
virtual ~SalDisplay();
- virtual void registerFrame( SalFrame* pFrame );
- virtual void deregisterFrame( SalFrame* pFrame );
- void setHaveSystemChildFrame() const
+ virtual void registerFrame( SalFrame* pFrame );
+ virtual void deregisterFrame( SalFrame* pFrame );
+ void setHaveSystemChildFrame() const
{ pXLib_->setHaveSystemChildFrame(); }
bool getHaveSystemChildFrame() const
{ return pXLib_->getHaveSystemChildFrame(); }
- void Init();
+ void Init();
- void SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT );
+ void SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT );
void CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent );
- bool DispatchInternalEvent();
- void PrintInfo() const;
+ bool DispatchInternalEvent();
+ void PrintInfo() const;
- void PrintEvent( const ByteString &rComment,
+ void PrintEvent( const ByteString &rComment,
XEvent *pEvent ) const;
- XlfdStorage* GetXlfdList() const;
+ XlfdStorage* GetXlfdList() const;
ExtendedFontStruct*
- GetFont( const ExtendedXlfd *pFont,
+ GetFont( const ExtendedXlfd *pFont,
const Size& rPixelSize, sal_Bool bVertical ) const;
const ExtendedXlfd*
GetFallbackFactory()
{ return mpFallbackFactory; }
- void Beep() const;
+ void Beep() const;
- void ModifierMapping();
- String GetKeyNameFromKeySym( KeySym keysym ) const;
- XubString GetKeyName( USHORT nKeyCode ) const;
- USHORT GetKeyCode( KeySym keysym, char*pcPrintable ) const;
- KeySym GetKeySym( XKeyEvent *pEvent,
+ void ModifierMapping();
+ String GetKeyNameFromKeySym( KeySym keysym ) const;
+ XubString GetKeyName( USHORT nKeyCode ) const;
+ USHORT GetKeyCode( KeySym keysym, char*pcPrintable ) const;
+ KeySym GetKeySym( XKeyEvent *pEvent,
unsigned char *pPrintable,
- int *pLen,
+ int *pLen,
KeySym *pUnmodifiedKeySym,
Status *pStatus,
XIC = NULL ) const;
- XLIB_Cursor GetPointer( int ePointerStyle );
- virtual int CaptureMouse( SalFrame *pCapture );
+ XLIB_Cursor GetPointer( int ePointerStyle );
+ virtual int CaptureMouse( SalFrame *pCapture );
- BOOL IsLocal();
+ BOOL IsLocal();
- void Remove( XEvent *pEvent );
+ void Remove( XEvent *pEvent );
virtual void initScreen( int nScreen ) const;
const ScreenData& getDataForScreen( int nScreen ) const
@@ -472,48 +472,48 @@ public:
return m_aScreens[nScreen];
}
- XLIB_Window GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; }
- Display *GetDisplay() const { return pDisp_; }
- int GetDefaultScreenNumber() const { return m_nDefaultScreen; }
+ XLIB_Window GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; }
+ Display *GetDisplay() const { return pDisp_; }
+ int GetDefaultScreenNumber() const { return m_nDefaultScreen; }
const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; }
- srv_vendor_t GetServerVendor() const { return meServerVendor; }
- void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
- BOOL IsDisplay() const { return !!pXLib_; }
- GC GetMonoGC( int nScreen ) const { return getDataForScreen(nScreen).m_aMonoGC; }
- GC GetCopyGC( int nScreen ) const { return getDataForScreen(nScreen).m_aCopyGC; }
- GC GetAndInvertedGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndInvertedGC; }
- GC GetAndGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndGC; }
- GC GetOrGC( int nScreen ) const { return getDataForScreen(nScreen).m_aOrGC; }
- GC GetStippleGC( int nScreen ) const { return getDataForScreen(nScreen).m_aStippleGC; }
- GC GetGC( USHORT nDepth, int nScreen ) const;
- Pixmap GetInvert50( int nScreen ) const { return getDataForScreen(nScreen).m_hInvert50; }
+ srv_vendor_t GetServerVendor() const { return meServerVendor; }
+ void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
+ BOOL IsDisplay() const { return !!pXLib_; }
+ GC GetMonoGC( int nScreen ) const { return getDataForScreen(nScreen).m_aMonoGC; }
+ GC GetCopyGC( int nScreen ) const { return getDataForScreen(nScreen).m_aCopyGC; }
+ GC GetAndInvertedGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndInvertedGC; }
+ GC GetAndGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndGC; }
+ GC GetOrGC( int nScreen ) const { return getDataForScreen(nScreen).m_aOrGC; }
+ GC GetStippleGC( int nScreen ) const { return getDataForScreen(nScreen).m_aStippleGC; }
+ GC GetGC( USHORT nDepth, int nScreen ) const;
+ Pixmap GetInvert50( int nScreen ) const { return getDataForScreen(nScreen).m_hInvert50; }
const SalColormap& GetColormap( int nScreen ) const { return getDataForScreen(nScreen).m_aColormap; }
const SalVisual& GetVisual( int nScreen ) const { return getDataForScreen(nScreen).m_aVisual; }
RenderEntryMap& GetRenderEntries( int nScreen ) const { return getDataForScreen(nScreen).m_aRenderData; }
- const Pair &GetResolution() const { return aResolution_; }
- bool GetExactResolution() const { return mbExactResolution; }
- ULONG GetProperties() const { return nProperties_; }
- ULONG GetMaxRequestSize() const { return nMaxRequestSize_; }
+ const Pair &GetResolution() const { return aResolution_; }
+ bool GetExactResolution() const { return mbExactResolution; }
+ ULONG GetProperties() const { return nProperties_; }
+ ULONG GetMaxRequestSize() const { return nMaxRequestSize_; }
XLIB_Time GetLastUserEventTime( bool bAlwaysReget = false ) const;
-
+
bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate, long i_nTimeout = 1000 ) const;
- BOOL MouseCaptured( const SalFrame *pFrameData ) const
+ BOOL MouseCaptured( const SalFrame *pFrameData ) const
{ return m_pCapture == pFrameData; }
- SalFrame* GetCaptureFrame() const
+ SalFrame* GetCaptureFrame() const
{ return m_pCapture; }
SalXLib* GetXLib() const { return pXLib_; }
- SalI18N_InputMethod* GetInputMethod() const { return mpInputMethod; }
- SalI18N_KeyboardExtension* GetKbdExtension() const { return mpKbdExtension; }
- void SetInputMethod( SalI18N_InputMethod *pInputMethod )
+ SalI18N_InputMethod* GetInputMethod() const { return mpInputMethod; }
+ SalI18N_KeyboardExtension* GetKbdExtension() const { return mpKbdExtension; }
+ void SetInputMethod( SalI18N_InputMethod *pInputMethod )
{ mpInputMethod = pInputMethod; }
- void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
- { mpKbdExtension = pKbdExtension; }
- const char* GetKeyboardName( BOOL bRefresh = FALSE );
+ void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
+ { mpKbdExtension = pKbdExtension; }
+ const char* GetKeyboardName( BOOL bRefresh = FALSE );
::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; }
DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; }
- bool IsXinerama() const { return m_bXinerama; }
+ bool IsXinerama() const { return m_bXinerama; }
const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; }
XLIB_Window GetRootWindow( int nScreen ) const
{ return getDataForScreen( nScreen ).m_aRoot; }
@@ -538,7 +538,7 @@ inline GC SalDisplay::GetGC( USHORT nDepth, int nScreen ) const
? GetCopyGC( nScreen )
: None; }
-inline Display *SalColormap::GetXDisplay() const
+inline Display *SalColormap::GetXDisplay() const
{ return m_pDisplay->GetDisplay(); }
class VCL_DLLPUBLIC SalX11Display : public SalDisplay
@@ -547,10 +547,10 @@ public:
SalX11Display( Display* pDisp );
virtual ~SalX11Display();
- virtual long Dispatch( XEvent *pEvent );
- virtual void Yield();
+ virtual long Dispatch( XEvent *pEvent );
+ virtual void Yield();
- BOOL IsEvent();
+ BOOL IsEvent();
};
/*----------------------------------------------------------
diff --git a/vcl/unx/inc/salfont.h b/vcl/unx/inc/salfont.h
index b3fbe93137f3..ff158623ffd1 100644
--- a/vcl/unx/inc/salfont.h
+++ b/vcl/unx/inc/salfont.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,13 +29,13 @@
#define _SV_SALFONT_H
// -=-= exports =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class SalFontCache;
-struct SalFontDimension;
-class SalFontFamily;
-class SalFontFamilyList;
-class SalFontStruct;
-class SalFontStructList;
-class SalFonts;
+class SalFontCache;
+struct SalFontDimension;
+class SalFontFamily;
+class SalFontFamilyList;
+class SalFontStruct;
+class SalFontStructList;
+class SalFonts;
// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include <salstd.hxx>
@@ -44,8 +44,8 @@ class SalFonts;
// -=-= forwards =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
typedef ULONG XFP_FLAGS;
-class SalDisplay;
-class SalFontCacheItem;
+class SalDisplay;
+class SalFontCacheItem;
// -=-= SalFontCache -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DECLARE_LIST( SalFontCache, SalFontCacheItem* )
@@ -53,49 +53,49 @@ DECLARE_LIST( SalFontCache, SalFontCacheItem* )
// -=-= SalFontDimension -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
struct SalFontDimension
{
- USHORT nHeight_; // [pixel]
- USHORT nPtHeight_; // [point/10]
- USHORT nAverage_; // [pixel/10]
- USHORT nXRes_; // [dpi]
- USHORT nYRes_; // [dpi]
- USHORT nSlant_; // [pixel]
-// size_t nUnderlineThickness_; // [pixel]
-// size_t nUnderlinePosition_; // [pixel]
-// size_t nStrikeoutAscent_; // [pixel]
-// size_t nStrikeoutDescent_; // [pixel]
-// Subscript, Superscript, Capital, Space ...
-
- inline SalFontDimension( USHORT nA = 0, USHORT nH = 0 );
-
- inline BOOL IsScalable() const;
- inline USHORT GetWidth() const { return (nAverage_ + 5) / 10; }
- inline Size GetSize() const;
- inline void SetSize( const Size & rSize );
- inline BOOL operator == ( const SalFontDimension &r ) const;
- inline BOOL operator != ( const SalFontDimension &r ) const;
- inline BOOL operator >= ( const SalFontDimension &r ) const;
+ USHORT nHeight_; // [pixel]
+ USHORT nPtHeight_; // [point/10]
+ USHORT nAverage_; // [pixel/10]
+ USHORT nXRes_; // [dpi]
+ USHORT nYRes_; // [dpi]
+ USHORT nSlant_; // [pixel]
+// size_t nUnderlineThickness_; // [pixel]
+// size_t nUnderlinePosition_; // [pixel]
+// size_t nStrikeoutAscent_; // [pixel]
+// size_t nStrikeoutDescent_; // [pixel]
+// Subscript, Superscript, Capital, Space ...
+
+ inline SalFontDimension( USHORT nA = 0, USHORT nH = 0 );
+
+ inline BOOL IsScalable() const;
+ inline USHORT GetWidth() const { return (nAverage_ + 5) / 10; }
+ inline Size GetSize() const;
+ inline void SetSize( const Size & rSize );
+ inline BOOL operator == ( const SalFontDimension &r ) const;
+ inline BOOL operator != ( const SalFontDimension &r ) const;
+ inline BOOL operator >= ( const SalFontDimension &r ) const;
};
inline SalFontDimension::SalFontDimension( USHORT nA, USHORT nH )
: nHeight_( nH ), nAverage_( nA )
{ nPtHeight_ = nXRes_ = nYRes_ = nSlant_ = 0; }
-inline BOOL SalFontDimension::IsScalable() const
+inline BOOL SalFontDimension::IsScalable() const
{ return !nHeight_ && !nPtHeight_ && !nAverage_; }
-inline Size SalFontDimension::GetSize() const
+inline Size SalFontDimension::GetSize() const
{ return Size( (nAverage_ + 5) / 10, nHeight_ ); }
-inline void SalFontDimension::SetSize( const Size & rSize )
+inline void SalFontDimension::SetSize( const Size & rSize )
{ nAverage_ = (USHORT)rSize.Width() * 10; nHeight_ = (USHORT)rSize.Height(); }
-inline BOOL SalFontDimension::operator == ( const SalFontDimension &r ) const
+inline BOOL SalFontDimension::operator == ( const SalFontDimension &r ) const
{ return nHeight_ == r.nHeight_ && (!r.nAverage_ || nAverage_ == r.nAverage_); }
-inline BOOL SalFontDimension::operator != ( const SalFontDimension &r ) const
+inline BOOL SalFontDimension::operator != ( const SalFontDimension &r ) const
{ return !(*this == r); }
-inline BOOL SalFontDimension::operator >= ( const SalFontDimension &r ) const
+inline BOOL SalFontDimension::operator >= ( const SalFontDimension &r ) const
{ return nHeight_ > r.nHeight_
|| (nHeight_ == r.nHeight_ && nAverage_ >= r.nAverage_); }
@@ -108,63 +108,63 @@ class SalFontStruct : public ImplFontMetricData
SalFontCacheItem*pCache_;
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
- ByteString aFontName_;
+ ByteString aFontName_;
#endif
- USHORT nHeightCount_; // Anzahl der Hoehen-Eintraege
- SalFontDimension*pDimensions_; // Hoehen-Array
- USHORT nWeight_;
-
- USHORT nFoundry_; // properties indexies
- USHORT nFamily_;
- USHORT nWeightName_;
- USHORT nSlant_;
- USHORT nSetWidthName_;
- ByteString aAddStyleName_;
- USHORT nSpacing_;
- USHORT nCharSet_;
- USHORT nFaceName_;
- BOOL mbValidFontDescription; // valid xlfd entries
-
- void Init();
- BOOL Init( SalDisplay* pDisp,
- const char* pFontName,
- SalFontDimension& rDim );
-
- ByteString GetXFontName( const SalFontDimension& );
-
- inline void SetFoundry( USHORT n )
+ USHORT nHeightCount_; // Anzahl der Hoehen-Eintraege
+ SalFontDimension*pDimensions_; // Hoehen-Array
+ USHORT nWeight_;
+
+ USHORT nFoundry_; // properties indexies
+ USHORT nFamily_;
+ USHORT nWeightName_;
+ USHORT nSlant_;
+ USHORT nSetWidthName_;
+ ByteString aAddStyleName_;
+ USHORT nSpacing_;
+ USHORT nCharSet_;
+ USHORT nFaceName_;
+ BOOL mbValidFontDescription; // valid xlfd entries
+
+ void Init();
+ BOOL Init( SalDisplay* pDisp,
+ const char* pFontName,
+ SalFontDimension& rDim );
+
+ ByteString GetXFontName( const SalFontDimension& );
+
+ inline void SetFoundry( USHORT n )
{ nFoundry_ = n; }
- inline void SetFamily( USHORT n )
+ inline void SetFamily( USHORT n )
{ meFamily = sal_FamilyToSal( nFamily_ = n ); }
- inline void SetWeightName( USHORT n )
+ inline void SetWeightName( USHORT n )
{ meWeight = sal_WeightToSal( nWeightName_ = n ); }
- inline void SetSlant( USHORT n )
+ inline void SetSlant( USHORT n )
{ meItalic = sal_ItalicToSal( nSlant_ = n ); }
- inline void SetSetWidthName( USHORT n )
+ inline void SetSetWidthName( USHORT n )
{ nSetWidthName_ = n; }
- inline void SetAddStyleName( const ByteString& rAddStyle )
+ inline void SetAddStyleName( const ByteString& rAddStyle )
{ aAddStyleName_ = rAddStyle; aAddStyleName_.ToLowerAscii(); }
- inline void SetSpacing( USHORT n )
+ inline void SetSpacing( USHORT n )
{ mePitch = sal_PitchToSal( nSpacing_ = n ); }
- inline void SetAverage( long n )
+ inline void SetAverage( long n )
{ mnWidth = (n + 5) / 10; }
- void SetCharSet( USHORT n );
+ void SetCharSet( USHORT n );
SalFontStruct( const SalFontStruct& rFont );
public:
- SalFontStruct( SalDisplay* pDisp,
- const char* pFontName,
- SalFontDimension& rDim );
+ SalFontStruct( SalDisplay* pDisp,
+ const char* pFontName,
+ SalFontDimension& rDim );
~SalFontStruct();
- inline void Cache( SalFontCacheItem *p ) { pCache_ = p; }
- inline SalFontCacheItem*IsCache() const { return pCache_; }
- inline BOOL IsScalable() const { return TYPE_SCALABLE==meType; }
- inline SalFontDimension*GetDim() const { return pDimensions_; }
- inline BOOL IsValid() const { return mbValidFontDescription; }
+ inline void Cache( SalFontCacheItem *p ) { pCache_ = p; }
+ inline SalFontCacheItem*IsCache() const { return pCache_; }
+ inline BOOL IsScalable() const { return TYPE_SCALABLE==meType; }
+ inline SalFontDimension*GetDim() const { return pDimensions_; }
+ inline BOOL IsValid() const { return mbValidFontDescription; }
#ifdef DBG_UTIL
- const ByteString& GetName() const { return aFontName_; }
+ const ByteString& GetName() const { return aFontName_; }
#endif
ImplFontData *GetDevFontData();
diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h
index ed173e61fe61..5902dea76f78 100644
--- a/vcl/unx/inc/salframe.h
+++ b/vcl/unx/inc/salframe.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,232 +43,232 @@
#include <list>
// -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class SalDisplay;
-class X11SalGraphics;
+class SalDisplay;
+class X11SalGraphics;
class SalGraphicsLayout;
class SalI18N_InputContext;
namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; }
// -=-= X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-#define SHOWSTATE_UNKNOWN -1
-#define SHOWSTATE_MINIMIZED 0
-#define SHOWSTATE_NORMAL 1
-#define SHOWSTATE_HIDDEN 2
+#define SHOWSTATE_UNKNOWN -1
+#define SHOWSTATE_MINIMIZED 0
+#define SHOWSTATE_NORMAL 1
+#define SHOWSTATE_HIDDEN 2
class VCL_DLLPUBLIC X11SalFrame : public SalFrame
{
friend class vcl_sal::WMAdaptor;
friend class vcl_sal::NetWMAdaptor;
friend class vcl_sal::GnomeWMAdaptor;
-
+
static X11SalFrame* s_pSaveYourselfFrame;
-
- X11SalFrame* mpParent; // pointer to parent frame
+
+ X11SalFrame* mpParent; // pointer to parent frame
// which should never obscur this frame
- bool mbTransientForRoot;
+ bool mbTransientForRoot;
std::list< X11SalFrame* > maChildren; // List of child frames
-
- SalDisplay *pDisplay_;
+
+ SalDisplay *pDisplay_;
int m_nScreen;
- XLIB_Window mhWindow;
- XLIB_Window mhShellWindow;
- XLIB_Window mhForeignParent;
+ XLIB_Window mhWindow;
+ XLIB_Window mhShellWindow;
+ XLIB_Window mhForeignParent;
// window to fall back to when no longer in fullscreen mode
- XLIB_Window mhStackingWindow;
+ XLIB_Window mhStackingWindow;
// window to listen for CirculateNotify events
-
+
Pixmap mhBackgroundPixmap;
-
- XLIB_Cursor hCursor_;
- int nCaptured_; // is captured
-
- X11SalGraphics *pGraphics_; // current frame graphics
- X11SalGraphics *pFreeGraphics_; // first free frame graphics
-
- XLIB_Time nReleaseTime_; // timestamp of last key release
- USHORT nKeyCode_; // last key code
- USHORT nKeyState_; // last key state
- int nCompose_; // compose state
- bool mbKeyMenu;
- bool mbSendExtKeyModChange;
- USHORT mnExtKeyMod;
-
- int nShowState_; // show state
- int nWidth_; // client width
- int nHeight_; // client height
- Rectangle maRestorePosSize;
- ULONG nStyle_;
+
+ XLIB_Cursor hCursor_;
+ int nCaptured_; // is captured
+
+ X11SalGraphics *pGraphics_; // current frame graphics
+ X11SalGraphics *pFreeGraphics_; // first free frame graphics
+
+ XLIB_Time nReleaseTime_; // timestamp of last key release
+ USHORT nKeyCode_; // last key code
+ USHORT nKeyState_; // last key state
+ int nCompose_; // compose state
+ bool mbKeyMenu;
+ bool mbSendExtKeyModChange;
+ USHORT mnExtKeyMod;
+
+ int nShowState_; // show state
+ int nWidth_; // client width
+ int nHeight_; // client height
+ Rectangle maRestorePosSize;
+ ULONG nStyle_;
SalExtStyle mnExtStyle;
- BOOL bAlwaysOnTop_;
- BOOL bViewable_;
- BOOL bMapped_;
- BOOL mbInShow;
- BOOL bDefaultPosition_; // client is centered initially
+ BOOL bAlwaysOnTop_;
+ BOOL bViewable_;
+ BOOL bMapped_;
+ BOOL mbInShow;
+ BOOL bDefaultPosition_; // client is centered initially
bool m_bXEmbed;
- int nVisibility_;
+ int nVisibility_;
int m_nWorkArea;
bool m_bSetFocusOnMap;
+
+ int nScreenSaversTimeout_;
+ Rectangle maPaintRegion;
- int nScreenSaversTimeout_;
- Rectangle maPaintRegion;
-
- Timer maAlwaysOnTopRaiseTimer;
-
+ Timer maAlwaysOnTopRaiseTimer;
+
// data for WMAdaptor
- int meWindowType;
- int mnDecorationFlags;
- bool mbMaximizedVert;
- bool mbMaximizedHorz;
- bool mbShaded;
- bool mbFullScreen;
-
+ int meWindowType;
+ int mnDecorationFlags;
+ bool mbMaximizedVert;
+ bool mbMaximizedHorz;
+ bool mbShaded;
+ bool mbFullScreen;
+
// icon id
- int mnIconID;
-
+ int mnIconID;
+
String m_aTitle;
-
+
SystemChildData maSystemChildData;
-
+
SalI18N_InputContext *mpInputContext;
- Bool mbInputFocus;
-
+ Bool mbInputFocus;
+
XRectangle* m_pClipRectangles;
int m_nCurClipRect;
int m_nMaxClipRect;
-
-
- void GetPosSize( Rectangle &rPosSize );
- void SetSize ( const Size &rSize );
+
+
+ void GetPosSize( Rectangle &rPosSize );
+ void SetSize ( const Size &rSize );
void Center();
- void SetPosSize( const Rectangle &rPosSize );
- void Minimize();
- void Maximize();
- void Restore();
+ void SetPosSize( const Rectangle &rPosSize );
+ void Minimize();
+ void Maximize();
+ void Restore();
void SetWindowGravity (int nGravity ) const;
-
- void RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows );
- void RestackChildren();
-
- long HandleKeyEvent ( XKeyEvent *pEvent );
- long HandleMouseEvent ( XEvent *pEvent );
- long HandleFocusEvent ( XFocusChangeEvent *pEvent );
- long HandleExposeEvent ( XEvent *pEvent );
- long HandleSizeEvent ( XConfigureEvent *pEvent );
- long HandleColormapEvent ( XColormapEvent *pEvent );
- long HandleMapUnmapEvent ( XEvent *pEvent );
- long HandleStateEvent ( XPropertyEvent *pEvent );
- long HandleReparentEvent ( XReparentEvent *pEvent );
- long HandleClientMessage ( XClientMessageEvent*pEvent );
-
+
+ void RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows );
+ void RestackChildren();
+
+ long HandleKeyEvent ( XKeyEvent *pEvent );
+ long HandleMouseEvent ( XEvent *pEvent );
+ long HandleFocusEvent ( XFocusChangeEvent *pEvent );
+ long HandleExposeEvent ( XEvent *pEvent );
+ long HandleSizeEvent ( XConfigureEvent *pEvent );
+ long HandleColormapEvent ( XColormapEvent *pEvent );
+ long HandleMapUnmapEvent ( XEvent *pEvent );
+ long HandleStateEvent ( XPropertyEvent *pEvent );
+ long HandleReparentEvent ( XReparentEvent *pEvent );
+ long HandleClientMessage ( XClientMessageEvent*pEvent );
+
DECL_LINK( HandleAlwaysOnTopRaise, void* );
- void passOnSaveYourSelf();
-
+ void passOnSaveYourSelf();
+
void createNewWindow( XLIB_Window aParent, int nScreen = -1 );
void updateScreenNumber();
-
+
void setXEmbedInfo();
void askForXEmbedFocus( sal_Int32 i_nTimeCode );
public:
X11SalFrame( SalFrame* pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent = NULL );
virtual ~X11SalFrame();
- long Dispatch( XEvent *pEvent );
- void Init( ULONG nSalFrameStyle, int nScreen = -1,
+ long Dispatch( XEvent *pEvent );
+ void Init( ULONG nSalFrameStyle, int nScreen = -1,
SystemParentData* pParentData = NULL, bool bUseGeometry = false );
- SalDisplay* GetDisplay() const { return pDisplay_; }
- Display* GetXDisplay() const;
- XLIB_Window GetDrawable() const;
+ SalDisplay* GetDisplay() const { return pDisplay_; }
+ Display* GetXDisplay() const;
+ XLIB_Window GetDrawable() const;
int GetScreenNumber() const { return m_nScreen; }
- XLIB_Window GetWindow() const { return mhWindow; }
- XLIB_Window GetShellWindow() const { return mhShellWindow; }
- XLIB_Window GetForeignParent() const { return mhForeignParent; }
- XLIB_Window GetStackingWindow() const { return mhStackingWindow; }
- long ShutDown() const { return CallCallback( SALEVENT_SHUTDOWN, 0 ); }
- long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); }
+ XLIB_Window GetWindow() const { return mhWindow; }
+ XLIB_Window GetShellWindow() const { return mhShellWindow; }
+ XLIB_Window GetForeignParent() const { return mhForeignParent; }
+ XLIB_Window GetStackingWindow() const { return mhStackingWindow; }
+ long ShutDown() const { return CallCallback( SALEVENT_SHUTDOWN, 0 ); }
+ long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); }
ULONG GetStyle() const { return nStyle_; }
-
- inline XLIB_Cursor GetCursor() const { return hCursor_; }
- inline BOOL IsCaptured() const { return nCaptured_ == 1; }
+
+ inline XLIB_Cursor GetCursor() const { return hCursor_; }
+ inline BOOL IsCaptured() const { return nCaptured_ == 1; }
#if !defined(__synchronous_extinput__)
- void HandleExtTextEvent (XClientMessageEvent *pEvent);
- void PostExtTextEvent (sal_uInt16 nExtTextEventType,
+ void HandleExtTextEvent (XClientMessageEvent *pEvent);
+ void PostExtTextEvent (sal_uInt16 nExtTextEventType,
void *pExtTextEvent);
#endif
- bool IsOverrideRedirect() const;
+ bool IsOverrideRedirect() const;
bool IsChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_PLUG|SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; }
bool IsSysChildWindow() const { return (nStyle_ & (SAL_FRAME_STYLE_SYSTEMCHILD)) != 0; }
- bool IsFloatGrabWindow() const;
+ bool IsFloatGrabWindow() const;
SalI18N_InputContext* getInputContext() const { return mpInputContext; }
- void getPosSize( Rectangle& rRect ) { GetPosSize( rRect ); }
- void setPosSize( const Rectangle& rRect ) { SetPosSize( rRect ); }
- bool isMapped() const { return bMapped_; }
+ void getPosSize( Rectangle& rRect ) { GetPosSize( rRect ); }
+ void setPosSize( const Rectangle& rRect ) { SetPosSize( rRect ); }
+ bool isMapped() const { return bMapped_; }
bool hasFocus() const { return mbInputFocus; }
-
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
-
+
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+
// call with true to clear graphics (setting None as drawable)
// call with false to setup graphics with window (GetWindow())
virtual void updateGraphics( bool bClear );
- virtual BOOL PostEvent( void* pData );
+ virtual BOOL PostEvent( void* pData );
- virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
- virtual void SetMenu( SalMenu* pMenu );
+ virtual void SetTitle( const XubString& rTitle );
+ virtual void SetIcon( USHORT nIcon );
+ virtual void SetMenu( SalMenu* pMenu );
virtual void DrawMenuBar();
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
- virtual void Enable( BOOL bEnable );
+ virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
+ virtual void Enable( BOOL bEnable );
virtual void SetMinClientSize( long nWidth, long nHeight );
virtual void SetMaxClientSize( long nWidth, long nHeight );
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
- virtual void GetClientSize( long& rWidth, long& rHeight );
- virtual void GetWorkArea( Rectangle& rRect );
- virtual SalFrame* GetParent() const;
- virtual void SetWindowState( const SalFrameState* pState );
- virtual BOOL GetWindowState( SalFrameState* pState );
- virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nMonitor );
- virtual void StartPresentation( BOOL bStart );
- virtual void SetAlwaysOnTop( BOOL bOnTop );
- virtual void ToTop( USHORT nFlags );
- virtual void SetPointer( PointerStyle ePointerStyle );
- virtual void CaptureMouse( BOOL bMouse );
- virtual void SetPointerPos( long nX, long nY );
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
+ virtual void GetClientSize( long& rWidth, long& rHeight );
+ virtual void GetWorkArea( Rectangle& rRect );
+ virtual SalFrame* GetParent() const;
+ virtual void SetWindowState( const SalFrameState* pState );
+ virtual BOOL GetWindowState( SalFrameState* pState );
+ virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nMonitor );
+ virtual void StartPresentation( BOOL bStart );
+ virtual void SetAlwaysOnTop( BOOL bOnTop );
+ virtual void ToTop( USHORT nFlags );
+ virtual void SetPointer( PointerStyle ePointerStyle );
+ virtual void CaptureMouse( BOOL bMouse );
+ virtual void SetPointerPos( long nX, long nY );
using SalFrame::Flush;
- virtual void Flush();
- virtual void Sync();
- virtual void SetInputContext( SalInputContext* pContext );
- virtual void EndExtTextInput( USHORT nFlags );
- virtual String GetKeyName( USHORT nKeyCode );
- virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode );
+ virtual void Flush();
+ virtual void Sync();
+ virtual void SetInputContext( SalInputContext* pContext );
+ virtual void EndExtTextInput( USHORT nFlags );
+ virtual String GetKeyName( USHORT nKeyCode );
+ virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode );
virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
- virtual LanguageType GetInputLanguage();
- virtual SalBitmap* SnapShot();
- virtual void UpdateSettings( AllSettings& rSettings );
- virtual void Beep( SoundType eSoundType );
- virtual const SystemEnvData* GetSystemData() const;
+ virtual LanguageType GetInputLanguage();
+ virtual SalBitmap* SnapShot();
+ virtual void UpdateSettings( AllSettings& rSettings );
+ virtual void Beep( SoundType eSoundType );
+ virtual const SystemEnvData* GetSystemData() const;
virtual SalPointerState GetPointerState();
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
+ virtual void SetParent( SalFrame* pNewParent );
+ virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetBackgroundBitmap( SalBitmap* pBitmap );
virtual void SetScreenNumber( unsigned int );
-
+
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
- virtual void ResetClipRegion();
+ virtual void ResetClipRegion();
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( ULONG nRects );
// add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
// done setting up the clipregion
- virtual void EndSetClipRegion();
+ virtual void EndSetClipRegion();
static void SaveYourselfDone( SalFrame* );
static Bool checkKeyReleaseForRepeat( Display*, XEvent*, XPointer pX11SalFrame );
diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h
index 42d9c5592317..2d2911f069ae 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -81,8 +81,8 @@ class VCL_DLLPUBLIC X11SalGraphics : public SalGraphics
friend class X11FontLayout;
friend class ServerFontLayout;
protected:
- SalFrame* m_pFrame; // the SalFrame which created this Graphics or NULL
- X11SalVirtualDevice* m_pVDev; // the SalVirtualDevice which created this Graphics or NULL
+ SalFrame* m_pFrame; // the SalFrame which created this Graphics or NULL
+ X11SalVirtualDevice* m_pVDev; // the SalVirtualDevice which created this Graphics or NULL
const SalColormap* m_pColormap;
SalColormap *m_pDeleteColormap;
@@ -114,64 +114,64 @@ protected:
Pixel nBrushPixel_;
Pixmap hBrush_; // Dither
- GC pMonoGC_;
- GC pCopyGC_;
- GC pMaskGC_;
- GC pInvertGC_;
- GC pInvert50GC_;
- GC pStippleGC_;
- GC pTrackingGC_;
-
- BOOL bWindow_ : 1; // is Window
- BOOL bPrinter_ : 1; // is Printer
- BOOL bVirDev_ : 1; // is VirDev
- BOOL bPenGC_ : 1; // is Pen GC valid
- BOOL bFontGC_ : 1; // is Font GC valid
- BOOL bBrushGC_ : 1; // is Brush GC valid
- BOOL bMonoGC_ : 1; // is Mono GC valid
- BOOL bCopyGC_ : 1; // is Copy GC valid
- BOOL bInvertGC_ : 1; // is Invert GC valid
- BOOL bInvert50GC_ : 1; // is Invert50 GC valid
- BOOL bStippleGC_ : 1; // is Stipple GC valid
+ GC pMonoGC_;
+ GC pCopyGC_;
+ GC pMaskGC_;
+ GC pInvertGC_;
+ GC pInvert50GC_;
+ GC pStippleGC_;
+ GC pTrackingGC_;
+
+ BOOL bWindow_ : 1; // is Window
+ BOOL bPrinter_ : 1; // is Printer
+ BOOL bVirDev_ : 1; // is VirDev
+ BOOL bPenGC_ : 1; // is Pen GC valid
+ BOOL bFontGC_ : 1; // is Font GC valid
+ BOOL bBrushGC_ : 1; // is Brush GC valid
+ BOOL bMonoGC_ : 1; // is Mono GC valid
+ BOOL bCopyGC_ : 1; // is Copy GC valid
+ BOOL bInvertGC_ : 1; // is Invert GC valid
+ BOOL bInvert50GC_ : 1; // is Invert50 GC valid
+ BOOL bStippleGC_ : 1; // is Stipple GC valid
BOOL bTrackingGC_ : 1; // is Tracking GC valid
- bool bXORMode_ : 1; // is ROP XOR Mode set
- BOOL bDitherBrush_ : 1; // is solid or tile
+ bool bXORMode_ : 1; // is ROP XOR Mode set
+ BOOL bDitherBrush_ : 1; // is solid or tile
- void SetClipRegion( GC pGC,
+ void SetClipRegion( GC pGC,
XLIB_Region pXReg = NULL ) const;
- GC GetTrackingGC();
- GC GetInvertGC();
- GC GetInvert50GC();
- GC CreateGC( Drawable hDrawable,
+ GC GetTrackingGC();
+ GC GetInvertGC();
+ GC GetInvert50GC();
+ GC CreateGC( Drawable hDrawable,
unsigned long nMask = GCGraphicsExposures );
- GC SelectPen();
- GC SelectBrush();
- void DrawLines( ULONG nPoints,
+ GC SelectPen();
+ GC SelectBrush();
+ void DrawLines( ULONG nPoints,
const SalPolyLine &rPoints,
- GC pGC,
+ GC pGC,
bool bClose
);
- BOOL GetDitherPixmap ( SalColor nSalColor );
+ BOOL GetDitherPixmap ( SalColor nSalColor );
- inline GC GetMonoGC( Pixmap hPixmap );
- inline GC GetCopyGC();
- inline GC GetStippleGC();
+ inline GC GetMonoGC( Pixmap hPixmap );
+ inline GC GetCopyGC();
+ inline GC GetStippleGC();
- int Clip ( XLIB_Region pRegion,
+ int Clip ( XLIB_Region pRegion,
int &nX,
int &nY,
unsigned int &nDX,
unsigned int &nDY,
int &nSrcX,
int &nSrcY ) const;
- int Clip ( int &nX,
+ int Clip ( int &nX,
int &nY,
unsigned int &nDX,
unsigned int &nDY,
int &nSrcX,
int &nSrcY ) const;
- GC SetMask ( int &nX,
+ GC SetMask ( int &nX,
int &nY,
unsigned int &nDX,
unsigned int &nDY,
@@ -203,11 +203,11 @@ protected:
void DrawServerAAFontString( const ServerFontLayout& );
bool DrawServerAAForcedString( const ServerFontLayout& );
void DrawCairoAAFontString( const ServerFontLayout& );
-
+
void freeResources();
public:
X11SalGraphics();
- virtual ~X11SalGraphics();
+ virtual ~X11SalGraphics();
void Init( SalFrame *pFrame, Drawable aDrawable, int nScreen );
void Init( X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = NULL, bool bDeleteColormap = false );
@@ -229,37 +229,37 @@ public:
int GetScreenNumber() const { return m_nScreen; }
// overload all pure virtual methods
- virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
- virtual long GetGraphicsWidth() const;
- virtual long GetGraphicsHeight() const;
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
+ virtual USHORT GetBitCount();
+ virtual long GetGraphicsWidth() const;
+ virtual long GetGraphicsHeight() const;
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( ULONG nCount );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual void EndSetClipRegion();
- virtual void SetLineColor();
- virtual void SetLineColor( SalColor nSalColor );
- virtual void SetFillColor();
+ virtual void SetLineColor();
+ virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetFillColor();
- virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetFillColor( SalColor nSalColor );
- virtual void SetXORMode( bool bSet, bool );
+ virtual void SetXORMode( bool bSet, bool );
- virtual void SetROPLineColor( SalROPColor nROPColor );
- virtual void SetROPFillColor( SalROPColor nROPColor );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
- virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
- virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
+ virtual void SetTextColor( SalColor nSalColor );
+ virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData* );
+ virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
virtual ImplFontCharMap* GetImplFontCharMap() const;
- virtual void GetDevFontList( ImplDevFontList* );
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -268,80 +268,80 @@ public:
FontSubsetInfo& rInfo
);
virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
virtual void GetGlyphWidths( const ImplFontData*,
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
- virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
+ virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
- virtual void drawPixel( long nX, long nY );
- virtual void drawPixel( long nX, long nY, SalColor nSalColor );
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
+ virtual void drawPixel( long nX, long nY );
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor );
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry, bool bClose );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolyPolygon( sal_uInt32 nPoly,
+ virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
- virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin );
- virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency );
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
+ virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin );
+ virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency );
#if 1 // TODO: remove these obselete methods
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry );
#endif
- virtual void copyArea( long nDestX,
+ virtual void copyArea( long nDestX,
long nDestY,
long nSrcX,
long nSrcY,
long nSrcWidth,
long nSrcHeight,
USHORT nFlags );
- virtual void copyBits( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
const SalBitmap& rMaskBitmap );
- virtual void drawMask( const SalTwoRect* pPosAry,
+ virtual void drawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor );
- virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
- virtual SalColor getPixel( long nX, long nY );
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
+ virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
- virtual bool drawAlphaBitmap( const SalTwoRect&,
+ virtual bool drawAlphaBitmap( const SalTwoRect&,
const SalBitmap& rSourceBitmap,
const SalBitmap& rAlphaBitmap );
- virtual bool drawAlphaRect( long nX, long nY, long nWidth,
+ virtual bool drawAlphaRect( long nX, long nY, long nWidth,
long nHeight, sal_uInt8 nTransparency );
virtual SystemGraphicsData GetGraphicsData() const;
@@ -385,20 +385,20 @@ inline Pixel X11SalGraphics::GetPixel( SalColor nSalColor ) const
// -=-= Shortcuts =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#ifdef DBG_UTIL
-#define stderr0( s ) fprintf( stderr, s )
-#define stderr1( s, a ) fprintf( stderr, s, a )
-#define stderr2( s, a, b ) fprintf( stderr, s, a, b )
-#define stderr3( s, a, b, c ) fprintf( stderr, s, a, b, c )
-#define stdass0( b ) (void)( !(b) \
+#define stderr0( s ) fprintf( stderr, s )
+#define stderr1( s, a ) fprintf( stderr, s, a )
+#define stderr2( s, a, b ) fprintf( stderr, s, a, b )
+#define stderr3( s, a, b, c ) fprintf( stderr, s, a, b, c )
+#define stdass0( b ) (void)( !(b) \
? fprintf( stderr, "\"%s\" (%s line %d)\n", \
#b, __FILE__, __LINE__ ) \
: 0 )
#else
-#define stderr0( s ) ;
-#define stderr1( s, a ) ;
-#define stderr2( s, a, b ) ;
-#define stderr3( s, a, b, c ) ;
-#define stdass0( b ) ;
+#define stderr0( s ) ;
+#define stderr1( s, a ) ;
+#define stderr2( s, a, b ) ;
+#define stderr3( s, a, b, c ) ;
+#define stdass0( b ) ;
#endif
#endif // _SV_SALGDI_H
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
index d73d67f81425..45846b165016 100644
--- a/vcl/unx/inc/salinst.h
+++ b/vcl/unx/inc/salinst.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,75 +42,75 @@
class VCL_DLLPUBLIC SalYieldMutex : public NAMESPACE_VOS(OMutex)
{
protected:
- ULONG mnCount;
- NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
+ ULONG mnCount;
+ NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId;
public:
SalYieldMutex();
- virtual void acquire();
- virtual void release();
- virtual sal_Bool tryToAcquire();
+ virtual void acquire();
+ virtual void release();
+ virtual sal_Bool tryToAcquire();
- ULONG GetAcquireCount() const { return mnCount; }
- NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
+ ULONG GetAcquireCount() const { return mnCount; }
+ NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class VCL_DLLPUBLIC X11SalInstance : public SalInstance
{
protected:
- SalYieldMutex* mpSalYieldMutex;
- bool mbPrinterInit;
+ SalYieldMutex* mpSalYieldMutex;
+ bool mbPrinterInit;
public:
- X11SalInstance( SalYieldMutex* pMutex )
+ X11SalInstance( SalYieldMutex* pMutex )
: mpSalYieldMutex( pMutex ),
mbPrinterInit( false )
{}
virtual ~X11SalInstance();
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
- virtual void DestroyFrame( SalFrame* pFrame );
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual void DestroyFrame( SalFrame* pFrame );
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
- virtual void DestroyObject( SalObject* pObject );
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual void DestroyObject( SalObject* pObject );
- virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
USHORT nBitCount, const SystemGraphicsData *pData = NULL );
- virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
+ virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
- virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
+ virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData );
- virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
- virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
- virtual void DestroyPrinter( SalPrinter* pPrinter );
+ virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
+ virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
+ virtual void DestroyPrinter( SalPrinter* pPrinter );
- virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
+ virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
+ virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
+ virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
virtual String GetDefaultPrinter();
- virtual SalTimer* CreateSalTimer();
- virtual SalI18NImeStatus* CreateI18NImeStatus();
- virtual SalSystem* CreateSalSystem();
- virtual SalBitmap* CreateSalBitmap();
- virtual SalSession* CreateSalSession();
+ virtual SalTimer* CreateSalTimer();
+ virtual SalI18NImeStatus* CreateI18NImeStatus();
+ virtual SalSystem* CreateSalSystem();
+ virtual SalBitmap* CreateSalBitmap();
+ virtual SalSession* CreateSalSession();
- virtual vos::IMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ virtual vos::IMutex* GetYieldMutex();
+ virtual ULONG ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( ULONG nCount );
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual bool AnyInput( USHORT nType );
virtual SalMenu* CreateMenu( BOOL bMenuBar );
virtual void DestroyMenu( SalMenu* pMenu);
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* pItem );
- virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
void FillFontPathList( std::list< rtl::OString >& o_rFontPaths );
// dtrans implementation
@@ -121,7 +121,7 @@ public:
virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
- bool isPrinterInit() const
+ bool isPrinterInit() const
{
return mbPrinterInit;
}
diff --git a/vcl/unx/inc/salmenu.h b/vcl/unx/inc/salmenu.h
index 09a753ff1d98..086e395624ec 100644
--- a/vcl/unx/inc/salmenu.h
+++ b/vcl/unx/inc/salmenu.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/salobj.h b/vcl/unx/inc/salobj.h
index fa9f1309c8ca..760dead29ce8 100644
--- a/vcl/unx/inc/salobj.h
+++ b/vcl/unx/inc/salobj.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,26 +41,26 @@ public:
SalClipRegion();
~SalClipRegion();
- void BeginSetClipRegion( ULONG nRects );
- void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ void BeginSetClipRegion( ULONG nRects );
+ void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- XRectangle *EndSetClipRegion() {
- return ClipRectangleList; }
- void ResetClipRegion() {
- numClipRectangles = 0; }
- USHORT GetClipRegionType() {
- return nClipRegionType; }
- void SetClipRegionType( USHORT nType ) {
- nClipRegionType = nType; }
- int GetRectangleCount() {
- return numClipRectangles; }
+ XRectangle *EndSetClipRegion() {
+ return ClipRectangleList; }
+ void ResetClipRegion() {
+ numClipRectangles = 0; }
+ USHORT GetClipRegionType() {
+ return nClipRegionType; }
+ void SetClipRegionType( USHORT nType ) {
+ nClipRegionType = nType; }
+ int GetRectangleCount() {
+ return numClipRectangles; }
private:
XRectangle* ClipRectangleList;
int numClipRectangles;
int maxClipRectangles;
- USHORT nClipRegionType;
+ USHORT nClipRegionType;
};
@@ -69,11 +69,11 @@ class X11SalObject : public SalObject
public:
SystemChildData maSystemChildData;
SalFrame* mpParent;
- XLIB_Window maPrimary;
- XLIB_Window maSecondary;
+ XLIB_Window maPrimary;
+ XLIB_Window maSecondary;
Colormap maColormap;
- SalClipRegion maClipRegion;
- BOOL mbVisible;
+ SalClipRegion maClipRegion;
+ BOOL mbVisible;
static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent );
static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
@@ -82,22 +82,22 @@ public:
virtual ~X11SalObject();
// overload all pure virtual methods
- virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual void EndSetClipRegion();
-
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
- virtual void Show( BOOL bVisible );
- virtual void Enable( BOOL nEnable );
- virtual void GrabFocus();
-
- virtual void SetBackground();
- virtual void SetBackground( SalColor nSalColor );
-
- virtual const SystemEnvData* GetSystemData() const;
-
+ virtual void ResetClipRegion();
+ virtual USHORT GetClipRegionType();
+ virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
+
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
+ virtual void Show( BOOL bVisible );
+ virtual void Enable( BOOL nEnable );
+ virtual void GrabFocus();
+
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+
+ virtual const SystemEnvData* GetSystemData() const;
+
};
#endif // _SV_SALOBJ_H
diff --git a/vcl/unx/inc/salprn.h b/vcl/unx/inc/salprn.h
index fa68f1b38e73..efb280a35106 100644
--- a/vcl/unx/inc/salprn.h
+++ b/vcl/unx/inc/salprn.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,44 +38,44 @@ class PspGraphics;
class PspSalInfoPrinter : public SalInfoPrinter
{
public:
- PspGraphics* m_pGraphics;
- psp::JobData m_aJobData;
- psp::PrinterGfx m_aPrinterGfx;
+ PspGraphics* m_pGraphics;
+ psp::JobData m_aJobData;
+ psp::PrinterGfx m_aPrinterGfx;
PspSalInfoPrinter();
virtual ~PspSalInfoPrinter();
// overload all pure virtual methods
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
- virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
- virtual void GetPageInfo( const ImplJobSetup* pSetupData,
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
+ virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
+ virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
+ virtual void GetPageInfo( const ImplJobSetup* pSetupData,
long& rOutWidth, long& rOutHeight,
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight );
- virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
- virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
- virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
- virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
- virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
+ virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
+ virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
+ virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
+ virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
};
class PspSalPrinter : public SalPrinter
{
public:
- String m_aFileName;
- String m_aTmpFile;
- String m_aFaxNr;
- bool m_bFax:1;
- bool m_bPdf:1;
- bool m_bSwallowFaxNo:1;
- PspGraphics* m_pGraphics;
- psp::PrinterJob m_aPrintJob;
- psp::JobData m_aJobData;
- psp::PrinterGfx m_aPrinterGfx;
- ULONG m_nCopies;
+ String m_aFileName;
+ String m_aTmpFile;
+ String m_aFaxNr;
+ bool m_bFax:1;
+ bool m_bPdf:1;
+ bool m_bSwallowFaxNo:1;
+ PspGraphics* m_pGraphics;
+ psp::PrinterJob m_aPrintJob;
+ psp::JobData m_aJobData;
+ psp::PrinterGfx m_aPrinterGfx;
+ ULONG m_nCopies;
bool m_bCollate;
SalInfoPrinter* m_pInfoPrinter;
@@ -84,18 +84,18 @@ public:
// overload all pure virtual methods
using SalPrinter::StartJob;
- virtual BOOL StartJob( const XubString* pFileName,
+ virtual BOOL StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
ULONG nCopies,
bool bCollate,
bool bDirect,
ImplJobSetup* pSetupData );
- virtual BOOL EndJob();
- virtual BOOL AbortJob();
- virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
- virtual BOOL EndPage();
- virtual ULONG GetErrorCode();
+ virtual BOOL EndJob();
+ virtual BOOL AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
+ virtual BOOL EndPage();
+ virtual ULONG GetErrorCode();
};
class Timer;
@@ -103,8 +103,8 @@ class Timer;
namespace vcl_sal {
class VCL_DLLPUBLIC PrinterUpdate
{
- static Timer* pPrinterUpdateTimer;
- static int nActiveJobs;
+ static Timer* pPrinterUpdateTimer;
+ static int nActiveJobs;
static void doUpdate();
DECL_STATIC_LINK( PrinterUpdate, UpdateTimerHdl, void* );
diff --git a/vcl/unx/inc/salstd.hxx b/vcl/unx/inc/salstd.hxx
index cc03b3fb35a4..8db4c9d9ae0e 100644
--- a/vcl/unx/inc/salstd.hxx
+++ b/vcl/unx/inc/salstd.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,41 +36,41 @@
// -=-= X-Lib forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#ifndef _SVUNX_H
-typedef unsigned long Pixel;
-typedef unsigned long XID;
-typedef unsigned long XLIB_Time;
-typedef unsigned long XtIntervalId;
+typedef unsigned long Pixel;
+typedef unsigned long XID;
+typedef unsigned long XLIB_Time;
+typedef unsigned long XtIntervalId;
-typedef XID Colormap;
-typedef XID Drawable;
-typedef XID Pixmap;
-typedef XID XLIB_Cursor;
-typedef XID XLIB_Font;
-typedef XID XLIB_Window;
+typedef XID Colormap;
+typedef XID Drawable;
+typedef XID Pixmap;
+typedef XID XLIB_Cursor;
+typedef XID XLIB_Font;
+typedef XID XLIB_Window;
-typedef struct _XDisplay Display;
-typedef struct _XGC *GC;
-typedef struct _XImage XImage;
-typedef struct _XRegion *XLIB_Region;
+typedef struct _XDisplay Display;
+typedef struct _XGC *GC;
+typedef struct _XImage XImage;
+typedef struct _XRegion *XLIB_Region;
-typedef union _XEvent XEvent;
+typedef union _XEvent XEvent;
-typedef struct _XConfigureEvent XConfigureEvent;
-typedef struct _XReparentEvent XReparentEvent;
-typedef struct _XClientMessageEvent XClientMessageEvent;
-typedef struct _XErrorEvent XErrorEvent;
+typedef struct _XConfigureEvent XConfigureEvent;
+typedef struct _XReparentEvent XReparentEvent;
+typedef struct _XClientMessageEvent XClientMessageEvent;
+typedef struct _XErrorEvent XErrorEvent;
-struct Screen;
-struct Visual;
-struct XColormapEvent;
-struct XFocusChangeEvent;
-struct XFontStruct;
-struct XKeyEvent;
-struct XPropertyEvent;
-struct XTextItem;
-struct XWindowChanges;
+struct Screen;
+struct Visual;
+struct XColormapEvent;
+struct XFocusChangeEvent;
+struct XFontStruct;
+struct XKeyEvent;
+struct XPropertyEvent;
+struct XTextItem;
+struct XWindowChanges;
-#define None 0L
+#define None 0L
#endif
#endif
diff --git a/vcl/unx/inc/salsys.h b/vcl/unx/inc/salsys.h
index 1da7cae8564a..22c1275a6aad 100644
--- a/vcl/unx/inc/salsys.h
+++ b/vcl/unx/inc/salsys.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,7 @@ class VCL_DLLPUBLIC X11SalSystem : public SalSystem
public:
X11SalSystem() {}
virtual ~X11SalSystem();
-
+
// overload pure virtual methods
virtual unsigned int GetDisplayScreenCount();
virtual bool IsMultiDisplay();
diff --git a/vcl/unx/inc/saltimer.h b/vcl/unx/inc/saltimer.h
index 132107d705f8..6a8a0e6cc74d 100644
--- a/vcl/unx/inc/saltimer.h
+++ b/vcl/unx/inc/saltimer.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,8 +37,8 @@ public:
virtual ~X11SalTimer();
// overload all pure virtual methods
- void Start( ULONG nMS );
- void Stop();
+ void Start( ULONG nMS );
+ void Stop();
};
#endif
diff --git a/vcl/unx/inc/salunx.h b/vcl/unx/inc/salunx.h
index ef53273b60b4..beb08f653031 100644
--- a/vcl/unx/inc/salunx.h
+++ b/vcl/unx/inc/salunx.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@
#include <salstd.hxx>
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define capacityof(a) (sizeof(a)/sizeof(*a))
+#define capacityof(a) (sizeof(a)/sizeof(*a))
// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
inline long Divide( long nDividend, long nDivisor )
diff --git a/vcl/unx/inc/salvd.h b/vcl/unx/inc/salvd.h
index 3d8c681c4e22..aef096c3ab25 100644
--- a/vcl/unx/inc/salvd.h
+++ b/vcl/unx/inc/salvd.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,46 +39,46 @@ class X11SalGraphics;
// -=-= SalVirDevData -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
class X11SalVirtualDevice : public SalVirtualDevice
{
- SalDisplay *pDisplay_;
- X11SalGraphics *pGraphics_;
-
-
- Pixmap hDrawable_;
+ SalDisplay *pDisplay_;
+ X11SalGraphics *pGraphics_;
+
+
+ Pixmap hDrawable_;
int m_nScreen;
-
- int nDX_;
- int nDY_;
- USHORT nDepth_;
- BOOL bGraphics_; // is Graphics used
+
+ int nDX_;
+ int nDY_;
+ USHORT nDepth_;
+ BOOL bGraphics_; // is Graphics used
BOOL bExternPixmap_;
-
+
public:
X11SalVirtualDevice();
virtual ~X11SalVirtualDevice();
- BOOL Init( SalDisplay *pDisplay,
+ BOOL Init( SalDisplay *pDisplay,
long nDX, long nDY,
USHORT nBitCount,
int nScreen,
Pixmap hDrawable = None,
void* pRenderFormat = NULL );
- inline void InitGraphics( X11SalVirtualDevice *pVD );
-
- inline Display *GetXDisplay() const;
- inline SalDisplay *GetDisplay() const;
- inline BOOL IsDisplay() const;
- inline Pixmap GetDrawable() const { return hDrawable_; }
- inline USHORT GetDepth() const { return nDepth_; }
- int GetWidth() const { return nDX_; }
- int GetHeight() const { return nDY_; }
+ inline void InitGraphics( X11SalVirtualDevice *pVD );
+
+ inline Display *GetXDisplay() const;
+ inline SalDisplay *GetDisplay() const;
+ inline BOOL IsDisplay() const;
+ inline Pixmap GetDrawable() const { return hDrawable_; }
+ inline USHORT GetDepth() const { return nDepth_; }
+ int GetWidth() const { return nDX_; }
+ int GetHeight() const { return nDY_; }
int GetScreenNumber() const { return m_nScreen; }
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
// Set new size, without saving the old contents
- virtual BOOL SetSize( long nNewDX, long nNewDY );
- virtual void GetSize( long& rWidth, long& rHeight );
+ virtual BOOL SetSize( long nNewDX, long nNewDY );
+ virtual void GetSize( long& rWidth, long& rHeight );
};
#ifdef _SV_SALDISP_HXX
diff --git a/vcl/unx/inc/sm.hxx b/vcl/unx/inc/sm.hxx
index b4339bb8567e..8e4bc3f710e8 100644
--- a/vcl/unx/inc/sm.hxx
+++ b/vcl/unx/inc/sm.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,23 +34,23 @@
class SessionManagerClient
{
- static SmcConn aSmcConnection;
- static ByteString aClientID;
- static bool bDocSaveDone;
+ static SmcConn aSmcConnection;
+ static ByteString aClientID;
+ static bool bDocSaveDone;
- static void SaveYourselfProc( SmcConn connection,
+ static void SaveYourselfProc( SmcConn connection,
SmPointer client_data,
int save_type,
Bool shutdown,
int interact_style,
Bool fast );
- static void DieProc( SmcConn connection,
+ static void DieProc( SmcConn connection,
SmPointer client_data );
- static void SaveCompleteProc( SmcConn connection,
+ static void SaveCompleteProc( SmcConn connection,
SmPointer client_data );
- static void ShutdownCanceledProc( SmcConn connection,
+ static void ShutdownCanceledProc( SmcConn connection,
SmPointer client_data );
- static void InteractProc( SmcConn connection,
+ static void InteractProc( SmcConn connection,
SmPointer clientData );
static const ByteString& getPreviousSessionID();
@@ -79,7 +79,7 @@ class IceSalSession : public SalSession
public:
IceSalSession();
virtual ~IceSalSession();
-
+
virtual void queryInteraction();
virtual void interactionDone();
virtual void saveDone();
diff --git a/vcl/unx/inc/soicon.hxx b/vcl/unx/inc/soicon.hxx
index 419f9b2cc54a..21d884a37f4d 100644
--- a/vcl/unx/inc/soicon.hxx
+++ b/vcl/unx/inc/soicon.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,6 +32,6 @@ class SalBitmap;
class Bitmap;
BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,
- USHORT nIcon, USHORT iconSize,
+ USHORT nIcon, USHORT iconSize,
Pixmap& icon_pixmap, Pixmap& icon_mask );
#endif
diff --git a/vcl/unx/inc/strhelper.hxx b/vcl/unx/inc/strhelper.hxx
index cd0220b77e05..712c30520c55 100644
--- a/vcl/unx/inc/strhelper.hxx
+++ b/vcl/unx/inc/strhelper.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/svsys.h b/vcl/unx/inc/svsys.h
index d4077d0998e9..50feade8ad9d 100644
--- a/vcl/unx/inc/svsys.h
+++ b/vcl/unx/inc/svsys.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/svunx.h b/vcl/unx/inc/svunx.h
index e7d6150b79f4..87498ec408a4 100644
--- a/vcl/unx/inc/svunx.h
+++ b/vcl/unx/inc/svunx.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/inc/wmadaptor.hxx b/vcl/unx/inc/wmadaptor.hxx
index cbedede2cc99..18c96ae55012 100644
--- a/vcl/unx/inc/wmadaptor.hxx
+++ b/vcl/unx/inc/wmadaptor.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -100,7 +100,7 @@ public:
WIN_ICONS,
WIN_WORKSPACE_NAMES,
WIN_CLIENT_LIST,
-
+
// atoms for general WM hints
WM_STATE,
MOTIF_WM_HINTS,
@@ -129,13 +129,13 @@ public:
/*
* flags for frame decoration
*/
- static const int decoration_Title = 0x00000001;
- static const int decoration_Border = 0x00000002;
- static const int decoration_Resize = 0x00000004;
- static const int decoration_MinimizeBtn = 0x00000008;
- static const int decoration_MaximizeBtn = 0x00000010;
- static const int decoration_CloseBtn = 0x00000020;
- static const int decoration_All = 0x10000000;
+ static const int decoration_Title = 0x00000001;
+ static const int decoration_Border = 0x00000002;
+ static const int decoration_Resize = 0x00000004;
+ static const int decoration_MinimizeBtn = 0x00000008;
+ static const int decoration_MaximizeBtn = 0x00000010;
+ static const int decoration_CloseBtn = 0x00000020;
+ static const int decoration_All = 0x10000000;
/*
* window type
@@ -152,19 +152,19 @@ public:
};
protected:
- SalDisplay* m_pSalDisplay; // Display to use
- Display* m_pDisplay; // X Display of SalDisplay
- String m_aWMName;
- Atom m_aWMAtoms[ NetAtomMax];
- int m_nDesktops;
- bool m_bEqualWorkAreas;
+ SalDisplay* m_pSalDisplay; // Display to use
+ Display* m_pDisplay; // X Display of SalDisplay
+ String m_aWMName;
+ Atom m_aWMAtoms[ NetAtomMax];
+ int m_nDesktops;
+ bool m_bEqualWorkAreas;
::std::vector< Rectangle >
m_aWMWorkAreas;
- bool m_bTransientBehaviour;
- bool m_bEnableAlwaysOnTopWorks;
+ bool m_bTransientBehaviour;
+ bool m_bEnableAlwaysOnTopWorks;
bool m_bLegacyPartialFullscreen;
- int m_nWinGravity;
- int m_nInitWinGravity;
+ int m_nWinGravity;
+ int m_nInitWinGravity;
WMAdaptor( SalDisplay * )
;
@@ -211,17 +211,17 @@ public:
*/
const Rectangle& getWorkArea( int n ) const
{ return m_aWMWorkAreas[n]; }
-
+
/*
* attemp to switch the desktop to a certain workarea
*/
void switchToWorkArea( int nWorkArea ) const;
-
+
/*
* sets window title
*/
virtual void setWMName( X11SalFrame* pFrame, const String& rWMName ) const;
-
+
/*
* set NET_WM_PID
*/
@@ -231,7 +231,7 @@ public:
* set WM_CLIENT_MACHINE
*/
virtual void setClientMachine( X11SalFrame* pFrame ) const;
-
+
virtual void answerPing( X11SalFrame*, XClientMessageEvent* ) const;
/*
@@ -267,7 +267,7 @@ public:
* set _NET_WM_USER_TIME property, if NetWM
*/
virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const;
-
+
/*
* tells whether fullscreen mode is supported by WM
*/
@@ -303,12 +303,12 @@ public:
* tells whether enableAlwaysOnTop actually works with this WM
*/
bool isAlwaysOnTopOK() const { return m_bEnableAlwaysOnTopWorks; }
-
+
/*
* handle WM messages (especially WM state changes)
*/
virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const;
-
+
/*
* called by SalFrame::Show: time to update state properties
*/
@@ -342,7 +342,7 @@ public:
* changes the transient hint of a window to reference frame
* if reference frame is NULL the root window is used instead
*/
- void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const;
+ void changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferenceFrame ) const;
};
} // namespace
diff --git a/vcl/unx/inc/xfont.hxx b/vcl/unx/inc/xfont.hxx
index 4041ed7ce67d..0b60b90e1355 100644
--- a/vcl/unx/inc/xfont.hxx
+++ b/vcl/unx/inc/xfont.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,14 +44,14 @@ class ExtendedXlfd;
struct VerticalTextItem
{
- BOOL mbFixed;
- XFontStruct* mpXFontStruct;
- const sal_Unicode* mpString;
- int mnLength;
- int mnTransX;
- int mnTransY;
- int mnFixedAdvance;
- int* mpAdvanceAry;
+ BOOL mbFixed;
+ XFontStruct* mpXFontStruct;
+ const sal_Unicode* mpString;
+ int mnLength;
+ int mnTransX;
+ int mnTransY;
+ int mnFixedAdvance;
+ int* mpAdvanceAry;
VerticalTextItem( XFontStruct* pXFontStruct,
const sal_Unicode* pString,
@@ -111,38 +111,38 @@ class ExtendedFontStruct : public SvRefBase
mutable sal_uInt32* mpRangeCodes;
mutable int mnRangeCount;
- int LoadEncoding( rtl_TextEncoding nEncoding );
- FontPitch GetSpacing( rtl_TextEncoding nEncoding );
- bool GetFontBoundingBox( XCharStruct *pCharStruct,
+ int LoadEncoding( rtl_TextEncoding nEncoding );
+ FontPitch GetSpacing( rtl_TextEncoding nEncoding );
+ bool GetFontBoundingBox( XCharStruct *pCharStruct,
int *pAscent, int *pDescent ) ;
- sal_Size GetDefaultWidth();
- sal_Size GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo,
- sal_Int32 *pWidthArray,
+ sal_Size GetDefaultWidth();
+ sal_Size GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo,
+ sal_Int32 *pWidthArray,
rtl_TextEncoding nEncoding );
- sal_Size GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo,
+ sal_Size GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo,
sal_Int32 *pWidthArray );
- sal_Size GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo,
+ sal_Size GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo,
sal_Int32 *pWidthArray, ExtendedFontStruct *pFallback );
public:
- ExtendedFontStruct( Display* pDisplay,
+ ExtendedFontStruct( Display* pDisplay,
const Size& rPixelSize, sal_Bool bVertical,
ExtendedXlfd* pXlfd );
~ExtendedFontStruct();
- bool Match( const ExtendedXlfd *pXlfd,
+ bool Match( const ExtendedXlfd *pXlfd,
const Size& rPixelSize, sal_Bool bVertical ) const;
- XFontStruct* GetFontStruct( rtl_TextEncoding nEncoding );
- XFontStruct* GetFontStruct( sal_Unicode nChar,
+ XFontStruct* GetFontStruct( rtl_TextEncoding nEncoding );
+ XFontStruct* GetFontStruct( sal_Unicode nChar,
rtl_TextEncoding *pEncoding );
- bool ToImplFontMetricData( ImplFontMetricData *pMetric );
- rtl_TextEncoding GetAsciiEncoding( int *pAsciiRange = NULL ) const;
- sal_Size GetCharWidth( sal_Unicode,
+ bool ToImplFontMetricData( ImplFontMetricData *pMetric );
+ rtl_TextEncoding GetAsciiEncoding( int *pAsciiRange = NULL ) const;
+ sal_Size GetCharWidth( sal_Unicode,
sal_Int32* pPhysWidth, sal_Int32* pLogWidth );
int GetFontCodeRanges( sal_uInt32* pCodePairs ) const;
bool HasUnicodeChar( sal_Unicode ) const;
};
-// Declaration and Implementation for ExtendedFontStructRef: Add RefCounting
+// Declaration and Implementation for ExtendedFontStructRef: Add RefCounting
// to ExtendedFontStruct (it's not possible to separate decl and impl into
// a separate source file: all ref member functions are inline
SV_DECL_IMPL_REF( ExtendedFontStruct );
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index 34b0ff652cde..56b1975e322e 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,7 +65,7 @@ class VCLKDEApplication : public KApplication
{
public:
VCLKDEApplication() : KApplication() {}
-
+
virtual void commitData(QSessionManager &sm);
};
@@ -143,7 +143,7 @@ void KDEXLib::Init()
rtl::OString aDisplay;
rtl::OUString aParam, aBin;
- for ( nIdx = 0; nIdx < nParams; ++nIdx )
+ for ( nIdx = 0; nIdx < nParams; ++nIdx )
{
aCommandLine.getCommandArg( nIdx, aParam );
if ( !m_pFreeCmdLineArgs && aParam.equalsAscii( "-display" ) && nIdx + 1 < nParams )
@@ -177,7 +177,7 @@ void KDEXLib::Init()
KApplication::disableAutoDcopRegistration();
m_pApplication = new VCLKDEApplication();
kapp->disableSessionManagement();
-
+
Display* pDisp = QPaintDevice::x11AppDisplay();
SalDisplay *pSalDisplay = new SalKDEDisplay( pDisp );
@@ -256,7 +256,7 @@ extern "C" {
#endif
return NULL;
}
-
+
KDESalInstance* pInstance = new KDESalInstance( new SalYieldMutex() );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "created KDESalInstance 0x%p\n", pInstance );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 29d79f88ffb3..a9c3f6905b94 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@
using namespace ::rtl;
/** Cached native widgets.
-
+
A class which caches and paints the native widgets.
*/
class WidgetPainter
@@ -194,7 +194,7 @@ class WidgetPainter
/** Identifiers of popup menu items.
*/
int m_nPopupMenuEnabledItem, m_nPopupMenuDisabledItem;
-
+
/** cached progress bar
*/
QProgressBar *m_pProgressBar;
@@ -338,9 +338,9 @@ class WidgetPainter
@see pushButton()
*/
QPopupMenu *popupMenu( const Rectangle& rControlRegion );
-
+
/** 'Get' method for progress bar
-
+
@see pushButton()
*/
QProgressBar *progressBar( const Rectangle& rControlRegion );
@@ -452,13 +452,13 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
// Use the background of the widget
qPixmap.fill( pWidget, QPoint(0, 0) );
-
+
// Convert the flags
QStyle::SFlags nStyle = vclStateValue2SFlags( nState, aValue );
-
+
// Store the widget class
const char *pClassName = pWidget->className();
-
+
// Draw the widget to the pixmap
if ( strcmp( "QPushButton", pClassName ) == 0 )
{
@@ -471,7 +471,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
pPushButton->setOn ( nStyle & QStyle::Style_On );
pPushButton->setEnabled( nStyle & QStyle::Style_Enabled );
}
-
+
kapp->style().drawControl( QStyle::CE_PushButton,
&qPainter, pWidget, qRect,
pWidget->colorGroup(), nStyle );
@@ -504,15 +504,15 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
kapp->style().drawComplexControl( QStyle::CC_ComboBox,
&qPainter, pWidget, qRect,
pWidget->colorGroup(), nStyle );
-
+
// Editable combo box uses the background of the associated edit box
QComboBox *pComboBox = static_cast<QComboBox *>( pWidget->qt_cast( "QComboBox" ) );
if ( pComboBox && pComboBox->editable() && pComboBox->lineEdit() )
{
QColorGroup::ColorRole eColorRole = ( pComboBox->isEnabled() )?
QColorGroup::Base: QColorGroup::Background;
- qPainter.fillRect(
- kapp->style().querySubControlMetrics( QStyle::CC_ComboBox,
+ qPainter.fillRect(
+ kapp->style().querySubControlMetrics( QStyle::CC_ComboBox,
pComboBox, QStyle::SC_ComboBoxEditField ),
pComboBox->lineEdit()->colorGroup().brush( eColorRole ) );
}
@@ -526,7 +526,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
else if ( strcmp( "QSpinWidget", pClassName ) == 0 )
{
const SpinbuttonValue *pValue = static_cast<const SpinbuttonValue *> ( &aValue );
-
+
// Is any of the buttons pressed?
QStyle::SCFlags eActive = QStyle::SC_None;
if ( pValue )
@@ -559,8 +559,8 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
{
QColorGroup::ColorRole eColorRole = ( pSpinWidget->isEnabled() )?
QColorGroup::Base: QColorGroup::Background;
- qPainter.fillRect(
- kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget,
+ qPainter.fillRect(
+ kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget,
pSpinWidget, QStyle::SC_SpinWidgetEditField ),
pSpinWidget->editWidget()->colorGroup().brush( eColorRole ) );
}
@@ -568,7 +568,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
// Adjust the frame (needed for Motif Plus style)
QRect qFrameRect = kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget,
pWidget, QStyle::SC_SpinWidgetFrame );
-
+
kapp->style().drawComplexControl( QStyle::CC_SpinWidget,
&qPainter, pWidget, qFrameRect,
pWidget->colorGroup(), nStyle,
@@ -577,7 +577,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
else if ( strcmp( "QTabBar", pClassName ) == 0 )
{
const TabitemValue *pValue = static_cast<const TabitemValue *> ( &aValue );
-
+
QTab *pTab = NULL;
if ( pValue )
{
@@ -592,9 +592,9 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
}
if ( !pTab )
return FALSE;
-
+
pTab->setRect( qRect );
-
+
kapp->style().drawControl( QStyle::CE_TabBarTab,
&qPainter, pWidget, qRect,
pWidget->colorGroup(), nStyle,
@@ -664,7 +664,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
else
pWidget->setEnabled( false );
}
-
+
// Is it a horizontal scroll bar?
QScrollBar *pScrollBar = static_cast<QScrollBar *> ( pWidget->qt_cast( "QScrollBar" ) );
QStyle::StyleFlags eHoriz = QStyle::Style_Default;
@@ -692,11 +692,11 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
kapp->style().drawPrimitive( QStyle::PE_PanelDockWindow,
&qPainter, qRect, pWidget->colorGroup(), nStyle );
-
+
if ( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
{
const ToolbarValue *pValue = static_cast< const ToolbarValue * >( &aValue );
-
+
QRect qThumbRect = region2QRect( pValue->maGripRect );
qThumbRect.moveBy( -qWidgetPos.x(), -qWidgetPos.y() );
if ( bIsHorizontal )
@@ -816,7 +816,7 @@ QPushButton *WidgetPainter::pushButton( const Rectangle& rControlRegion,
m_pPushButton->setDefault( true );
QSize qDefSize = kapp->style().sizeFromContents( QStyle::CT_PushButton,
m_pPushButton, qContentsSize );
-
+
int nIndicatorSize = kapp->style().pixelMetric(
QStyle::PM_ButtonDefaultIndicator, m_pPushButton );
if ( qNormalSize.width() == qDefSize.width() )
@@ -824,7 +824,7 @@ QPushButton *WidgetPainter::pushButton( const Rectangle& rControlRegion,
if ( qNormalSize.height() == qDefSize.height() )
qRect.addCoords( 0, nIndicatorSize, 0, -nIndicatorSize );
}
-
+
m_pPushButton->move( qRect.topLeft() );
m_pPushButton->resize( qRect.size() );
m_pPushButton->setDefault( bDefault );
@@ -845,19 +845,19 @@ QRadioButton *WidgetPainter::radioButton( const Rectangle& rControlRegion )
if ( strcmp( "KThemeStyle", pStyleName ) == 0 )
{
QRect qOldRect( qRect );
-
+
qRect.setWidth( kapp->style().pixelMetric(
QStyle::PM_ExclusiveIndicatorWidth, m_pRadioButton ) );
qRect.setHeight( kapp->style().pixelMetric(
QStyle::PM_ExclusiveIndicatorHeight, m_pRadioButton ) );
-
+
qRect.moveBy( ( qOldRect.width() - qRect.width() ) / 2,
( qOldRect.height() - qRect.height() ) / 2 );
}
m_pRadioButton->move( qRect.topLeft() );
m_pRadioButton->resize( qRect.size() );
-
+
return m_pRadioButton;
}
@@ -874,12 +874,12 @@ QCheckBox *WidgetPainter::checkBox( const Rectangle& rControlRegion )
if ( strcmp( "KThemeStyle", pStyleName ) == 0 )
{
QRect qOldRect( qRect );
-
+
qRect.setWidth( kapp->style().pixelMetric(
QStyle::PM_IndicatorWidth, m_pCheckBox ) );
qRect.setHeight( kapp->style().pixelMetric(
QStyle::PM_IndicatorHeight, m_pCheckBox ) );
-
+
qRect.moveBy( ( qOldRect.width() - qRect.width() ) / 2,
( qOldRect.height() - qRect.height() ) / 2 );
}
@@ -908,7 +908,7 @@ QComboBox *WidgetPainter::comboBox( const Rectangle& rControlRegion,
}
QRect qRect = region2QRect( rControlRegion );
-
+
pComboBox->move( qRect.topLeft() );
pComboBox->resize( qRect.size() );
@@ -921,7 +921,7 @@ QLineEdit *WidgetPainter::lineEdit( const Rectangle& rControlRegion )
m_pLineEdit = new QLineEdit( NULL, "line_edit" );
QRect qRect = region2QRect( rControlRegion );
-
+
m_pLineEdit->move( qRect.topLeft() );
m_pLineEdit->resize( qRect.size() );
@@ -933,13 +933,13 @@ QSpinWidget *WidgetPainter::spinWidget( const Rectangle& rControlRegion )
if ( !m_pSpinWidget )
{
m_pSpinWidget = new QSpinWidget( NULL, "spin_widget" );
-
+
m_pSpinEdit = new QLineEdit( NULL, "line_edit_spin" );
m_pSpinWidget->setEditWidget( m_pSpinEdit );
}
QRect qRect = region2QRect( rControlRegion );
-
+
m_pSpinWidget->move( qRect.topLeft() );
m_pSpinWidget->resize( qRect.size() );
m_pSpinWidget->arrange();
@@ -955,7 +955,7 @@ QTabBar *WidgetPainter::tabBar( const Rectangle& rControlRegion )
m_pTabBarParent = new QWidget( NULL, "tab_bar_parent" );
m_pTabBar = new QTabBar( m_pTabBarParent, "tab_bar" );
-
+
m_pTabLeft = new QTab();
m_pTabMiddle = new QTab();
m_pTabRight = new QTab();
@@ -970,7 +970,7 @@ QTabBar *WidgetPainter::tabBar( const Rectangle& rControlRegion )
m_pTabBar->move( qRect.topLeft() );
m_pTabBar->resize( qRect.size() );
-
+
m_pTabBar->setShape( QTabBar::RoundedAbove );
return m_pTabBar;
@@ -983,10 +983,10 @@ QTabWidget *WidgetPainter::tabWidget( const Rectangle& rControlRegion )
QRect qRect = region2QRect( rControlRegion );
--qRect.rTop();
-
+
m_pTabWidget->move( qRect.topLeft() );
m_pTabWidget->resize( qRect.size() );
-
+
return m_pTabWidget;
}
@@ -996,7 +996,7 @@ QListView *WidgetPainter::listView( const Rectangle& rControlRegion )
m_pListView = new QListView( NULL, "list_view" );
QRect qRect = region2QRect( rControlRegion );
-
+
m_pListView->move( qRect.topLeft() );
m_pListView->resize( qRect.size() );
@@ -1014,7 +1014,7 @@ QScrollBar *WidgetPainter::scrollBar( const Rectangle& rControlRegion,
}
QRect qRect = region2QRect( rControlRegion );
-
+
m_pScrollBar->move( qRect.topLeft() );
m_pScrollBar->resize( qRect.size() );
m_pScrollBar->setOrientation( bHorizontal? Qt::Horizontal: Qt::Vertical );
@@ -1123,9 +1123,9 @@ QProgressBar *WidgetPainter::progressBar( const Rectangle& rControlRegion )
{
if ( !m_pProgressBar )
m_pProgressBar = new QProgressBar( NULL, "progress_bar" );
-
+
QRect qRect = region2QRect( rControlRegion );
-
+
m_pProgressBar->move( qRect.topLeft() );
m_pProgressBar->resize( qRect.size() );
@@ -1195,10 +1195,10 @@ class KDESalGraphics : public X11SalGraphics
@param nType
Type of the widget.
-
+
@param nPart
Specification of the widget's part if it consists of more than one.
-
+
@return TRUE if the platform supports native drawing of the widget nType
defined by nPart.
*/
@@ -1249,7 +1249,7 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
rIsInside = FALSE;
BOOL bHorizontal = ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT );
-
+
QScrollBar *pScrollBar = pWidgetPainter->scrollBar( rControlRegion,
bHorizontal, ImplControlValue() );
QRect qRectSubLine = kapp->style().querySubControlMetrics(
@@ -1297,7 +1297,7 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() );
}
break;
-
+
case PART_BUTTON_UP:
if ( !bPlatinumStyle && qRectSubLine.contains( aPos.getX(), aPos.getY() ) )
rIsInside = TRUE;
@@ -1307,21 +1307,21 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() );
}
break;
-
+
case PART_BUTTON_RIGHT:
if ( bTwoSubButtons )
qRectAddLine.setLeft( qRectAddLine.left() + qRectAddLine.width() / 2 );
rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() );
break;
-
+
case PART_BUTTON_DOWN:
if ( bTwoSubButtons )
qRectAddLine.setTop( qRectAddLine.top() + qRectAddLine.height() / 2 );
rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() );
break;
-
+
// cases PART_TRACK_HORZ_AREA and PART_TRACK_VERT_AREA
default:
return FALSE;
@@ -1335,13 +1335,13 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
/** Draw the requested control described by nPart/nState.
-
+
@param rControlRegion
The bounding region of the complete control in VCL frame coordinates.
-
+
@param aValue
An optional value (tristate/numerical/string).
-
+
@param aCaption
A caption or title string (like button text etc.)
*/
@@ -1355,7 +1355,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
Display *dpy = GetXDisplay();
XLIB_Window drawable = GetDrawable();
GC gc = SelectPen(); //SelectFont(); // GC with current clipping region set
-
+
if ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) )
{
bReturn = pWidgetPainter->drawStyledWidget(
@@ -1474,16 +1474,16 @@ BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
/** Draw text on the widget.
-
+
OPTIONAL. Draws the requested text for the control described by nPart/nState.
Used if text is not drawn by DrawNativeControl().
-
+
@param rControlRegion
The bounding region of the complete control in VCL frame coordinates.
-
+
@param aValue
An optional value (tristate/numerical/string)
-
+
@param aCaption
A caption or title string (like button text etc.)
*/
@@ -1505,10 +1505,10 @@ BOOL KDESalGraphics::drawNativeControlText( ControlType, ControlPart,
@param rControlRegion
The bounding region of the control in VCL frame coordinates.
-
+
@param aValue
An optional value (tristate/numerical/string)
-
+
@param aCaption
A caption or title string (like button text etc.)
*/
@@ -1521,7 +1521,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
BOOL bReturn = FALSE;
QRect qBoundingRect = WidgetPainter::region2QRect( rControlRegion );
QRect qRect;
-
+
QWidget *pWidget = NULL;
switch ( nType )
{
@@ -1659,7 +1659,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect.setBottom( 0 );
}
}
-
+
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
bReturn = TRUE;
@@ -1702,7 +1702,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
Size aSize( qRect.width(), qRect.height() );
rNativeContentRegion = Rectangle( aPoint, aSize );
}
-
+
return bReturn;
}
@@ -1754,13 +1754,13 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
{
psp::FastPrintFontInfo aInfo;
QFontInfo qFontInfo( rQFont );
-
+
// set family name
aInfo.m_aFamilyName = String( rQFont.family().utf8(), RTL_TEXTENCODING_UTF8 );
// set italic
aInfo.m_eItalic = ( qFontInfo.italic()? psp::italic::Italic: psp::italic::Upright );
-
+
// set weight
int nWeight = qFontInfo.weight();
if ( nWeight <= QFont::Light )
@@ -1773,7 +1773,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
aInfo.m_eWeight = psp::weight::Bold;
else
aInfo.m_eWeight = psp::weight::UltraBold;
-
+
// set width
int nStretch = rQFont.stretch();
if ( nStretch <= QFont::UltraCondensed )
@@ -1794,7 +1794,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
aInfo.m_eWidth = psp::width::ExtraExpanded;
else
aInfo.m_eWidth = psp::width::UltraExpanded;
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "font name BEFORE system match: \"%s\"\n", OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
#endif
@@ -1812,7 +1812,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
int nPointHeight = qFontInfo.pointSize();
if ( nPointHeight <= 0 )
nPointHeight = rQFont.pointSize();
-
+
// Create the font
Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) );
if( aInfo.m_eWeight != psp::weight::Unknown )
@@ -1887,7 +1887,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
Color aBack = toColor( qColorGroup.background() );
Color aText = toColor( qColorGroup.text() );
Color aBase = toColor( qColorGroup.base() );
-
+
// Foreground
aStyleSettings.SetRadioCheckTextColor( aFore );
aStyleSettings.SetLabelTextColor( aFore );
@@ -1906,7 +1906,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetHelpColor( aBase );
aStyleSettings.SetWindowColor( aBase );
aStyleSettings.SetActiveTabColor( aBase );
-
+
// Buttons
aStyleSettings.SetButtonTextColor( toColor( qColorGroup.buttonText() ) );
aStyleSettings.SetButtonRolloverTextColor( toColor( qColorGroup.buttonText() ) );
@@ -1943,9 +1943,6 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetAppFont( aFont );
aStyleSettings.SetHelpFont( aFont );
- if( !bSetTitleFont )
- aStyleSettings.SetTitleFont( aFont );
- aStyleSettings.SetFloatTitleFont( aFont );
aStyleSettings.SetMenuFont( aFont ); // will be changed according to pMenuBar
aStyleSettings.SetToolFont( aFont ); // will be changed according to pToolBar
aStyleSettings.SetLabelFont( aFont );
@@ -1955,6 +1952,12 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetFieldFont( aFont );
aStyleSettings.SetIconFont( aFont );
aStyleSettings.SetGroupFont( aFont );
+
+ aFont.SetWeight( WEIGHT_BOLD );
+ if( !bSetTitleFont )
+ aStyleSettings.SetTitleFont( aFont );
+ aStyleSettings.SetFloatTitleFont( aFont );
+
int flash_time = QApplication::cursorFlashTime();
aStyleSettings.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME );
@@ -1968,7 +1971,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
// Color
QColorGroup qMenuCG = pMenuBar->colorGroup();
-
+
// Menu text and background color, theme specific
Color aMenuFore = toColor( qMenuCG.foreground() );
Color aMenuBack = toColor( qMenuCG.background() );
@@ -1980,7 +1983,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aMenuFore = toColor( qMenuCG.buttonText() );
aMenuBack = toColor( qMenuCG.button() );
}
-
+
aStyleSettings.SetMenuTextColor( aMenuFore );
aStyleSettings.SetMenuBarTextColor( aMenuFore );
aStyleSettings.SetMenuColor( aMenuBack );
@@ -1999,7 +2002,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
}
else
aStyleSettings.SetMenuHighlightTextColor( aMenuFore );
-
+
// set special menubar higlight text color
if ( kapp->style().inherits( "HighContrastStyle" ) )
ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = toColor( qMenuCG.highlightedText() );
@@ -2021,7 +2024,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// Scroll bar size
aStyleSettings.SetScrollBarSize( kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
-
+
rSettings.SetStyleSettings( aStyleSettings );
}
@@ -2043,7 +2046,7 @@ SalGraphics* KDESalFrame::GetGraphics()
}
}
}
-
+
return NULL;
}
diff --git a/vcl/unx/kde4/KDEData.cxx b/vcl/unx/kde4/KDEData.cxx
index 99871edadae3..e8482d4060b7 100644
--- a/vcl/unx/kde4/KDEData.cxx
+++ b/vcl/unx/kde4/KDEData.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ void KDEData::Init()
void KDEData::initNWF()
{
ImplSVData *pSVData = ImplGetSVData();
-
+
// draw toolbars on separate lines
pSVData->maNWFData.mbDockingAreaSeparateTB = true;
// no borders for menu, theming does that
diff --git a/vcl/unx/kde4/KDEData.hxx b/vcl/unx/kde4/KDEData.hxx
index 7cf5836c9688..0ff2039f21bc 100644
--- a/vcl/unx/kde4/KDEData.hxx
+++ b/vcl/unx/kde4/KDEData.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@ class KDEData : public X11SalData
public:
KDEData() {}
virtual ~KDEData();
-
+
virtual void Init();
virtual void initNWF();
virtual void deInitNWF();
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index d67399528a7c..061b4c3e519a 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/kde4/KDESalDisplay.hxx b/vcl/unx/kde4/KDESalDisplay.hxx
index 1ab966b1847b..025abaeb2609 100644
--- a/vcl/unx/kde4/KDESalDisplay.hxx
+++ b/vcl/unx/kde4/KDESalDisplay.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 0c8f04f9fe41..b348ac2f7162 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,7 +68,7 @@ void KDESalFrame::Show( BOOL bVisible, BOOL bNoActivate )
KDEXLib* pXLib = static_cast<KDEXLib*>(GetDisplay()->GetXLib());
pXLib->doStartup();
}
-
+
X11SalFrame::Show( bVisible, bNoActivate );
}
@@ -101,13 +101,13 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
{
psp::FastPrintFontInfo aInfo;
QFontInfo qFontInfo( rQFont );
-
+
// set family name
aInfo.m_aFamilyName = String( (const char *) rQFont.family().toUtf8(), RTL_TEXTENCODING_UTF8 );
// set italic
aInfo.m_eItalic = ( qFontInfo.italic()? psp::italic::Italic: psp::italic::Upright );
-
+
// set weight
int nWeight = qFontInfo.weight();
if ( nWeight <= QFont::Light )
@@ -120,7 +120,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
aInfo.m_eWeight = psp::weight::Bold;
else
aInfo.m_eWeight = psp::weight::UltraBold;
-
+
// set width
int nStretch = rQFont.stretch();
if ( nStretch <= QFont::UltraCondensed )
@@ -141,7 +141,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
aInfo.m_eWidth = psp::width::ExtraExpanded;
else
aInfo.m_eWidth = psp::width::UltraExpanded;
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "font name BEFORE system match: \"%s\"\n", OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
#endif
@@ -159,7 +159,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
int nPointHeight = qFontInfo.pointSize();
if ( nPointHeight <= 0 )
nPointHeight = rQFont.pointSize();
-
+
// Create the font
Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) );
if( aInfo.m_eWeight != psp::weight::Unknown )
@@ -180,26 +180,26 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings style( rSettings.GetStyleSettings() );
BOOL bSetTitleFont = false;
-
+
// General settings
QPalette pal = kapp->palette();
-
+
style.SetActiveColor(toColor(pal.color(QPalette::Active, QPalette::Window)));
style.SetDeactiveColor(toColor(pal.color(QPalette::Inactive, QPalette::Window)));
-
+
style.SetActiveColor2(toColor(pal.color(QPalette::Active, QPalette::Window)));
style.SetDeactiveColor2(toColor(pal.color(QPalette::Inactive, QPalette::Window)));
-
+
style.SetActiveTextColor(toColor(pal.color(QPalette::Active, QPalette::WindowText)));
style.SetDeactiveTextColor(toColor(pal.color(QPalette::Inactive, QPalette::WindowText)));
-
+
// WM settings
KConfig *pConfig = KGlobal::config().data();
if ( pConfig )
{
KConfigGroup aGroup = pConfig->group( "WM" );
const char *pKey;
-
+
pKey = "titleFont";
if ( aGroup.hasKey( pKey ) )
{
@@ -207,13 +207,13 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetTitleFont( aFont );
bSetTitleFont = true;
}
-
+
aGroup = pConfig->group( "Icons" );
pKey = "Theme";
if ( aGroup.hasKey( pKey ) )
style.SetPreferredSymbolsStyleName( readEntryUntranslated( &aGroup, pKey ) );
-
+
//toolbar
pKey = "toolbarFont";
if ( aGroup.hasKey( pKey ) )
@@ -222,7 +222,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetToolFont( aFont );
}
}
-
+
Color aFore = toColor( pal.color( QPalette::Active, QPalette::WindowText ) );
Color aBack = toColor( pal.color( QPalette::Active, QPalette::Window ) );
Color aText = toColor( pal.color( QPalette::Active, QPalette::Text ) );
@@ -249,7 +249,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetHelpColor( aBase );
style.SetWindowColor( aBase );
style.SetActiveTabColor( aBase );
-
+
// Buttons
style.SetButtonTextColor( aButn );
style.SetButtonRolloverTextColor( aButn );
@@ -265,7 +265,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetFaceColor( aBack );
style.SetInactiveTabColor( aBack );
style.SetDialogColor( aBack );
-
+
if( aBack == COL_LIGHTGRAY )
style.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) );
else
@@ -284,16 +284,10 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// Font
Font aFont = toFont( kapp->font(), rSettings.GetUILocale() );
-
+
style.SetAppFont( aFont );
style.SetHelpFont( aFont );
-
- if( !bSetTitleFont )
- {
- style.SetTitleFont( aFont );
- }
-
- style.SetFloatTitleFont( aFont );
+
style.SetMenuFont( aFont ); // will be changed according to pMenuBar
//style.SetToolFont( aFont ); //already set above
style.SetLabelFont( aFont );
@@ -304,6 +298,13 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetIconFont( aFont );
style.SetGroupFont( aFont );
+ aFont.SetWeight( WEIGHT_BOLD );
+ if( !bSetTitleFont )
+ {
+ style.SetTitleFont( aFont );
+ }
+ style.SetFloatTitleFont( aFont );
+
int flash_time = QApplication::cursorFlashTime();
style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME );
@@ -314,14 +315,14 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
// Color
QPalette qMenuCG = pMenuBar->palette();
-
+
// Menu text and background color, theme specific
Color aMenuFore = toColor( qMenuCG.color( QPalette::WindowText ) );
Color aMenuBack = toColor( qMenuCG.color( QPalette::Window ) );
-
+
aMenuFore = toColor( qMenuCG.color( QPalette::ButtonText ) );
aMenuBack = toColor( qMenuCG.color( QPalette::Button ) );
-
+
style.SetMenuTextColor( aMenuFore );
style.SetMenuBarTextColor( aMenuFore );
style.SetMenuColor( aMenuBack );
@@ -330,7 +331,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetMenuHighlightColor( toColor ( qMenuCG.color( QPalette::Highlight ) ) );
style.SetMenuHighlightTextColor( aMenuFore );
-
+
// set special menubar higlight text color
if ( kapp->style()->inherits( "HighContrastStyle" ) )
ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = toColor( qMenuCG.color( QPalette::HighlightedText ) );
@@ -341,12 +342,12 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aFont = toFont( pMenuBar->font(), rSettings.GetUILocale() );
style.SetMenuFont( aFont );
}
-
+
delete pMenuBar;
-
+
// Scroll bar size
style.SetScrollBarSize( kapp->style()->pixelMetric( QStyle::PM_ScrollBarExtent ) );
-
+
rSettings.SetStyleSettings( style );
}
@@ -400,6 +401,6 @@ SalGraphics* KDESalFrame::GetGraphics()
}
}
}
-
+
return NULL;
-} \ No newline at end of file
+}
diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx
index 643be72c27f3..e25d0d4ae950 100644
--- a/vcl/unx/kde4/KDESalFrame.hxx
+++ b/vcl/unx/kde4/KDESalFrame.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,11 +39,11 @@ class KDESalFrame : public X11SalFrame
{
X11SalGraphics* pGraphics;
bool bInUse;
-
+
GraphicsHolder() : pGraphics(0),bInUse( false ) {}
~GraphicsHolder();
};
-
+
GraphicsHolder m_aGraphics[ nMaxGraphics ];
public:
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 2c04af384c51..3a680014dbc3 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,7 @@
using namespace ::rtl;
-/**
+/**
Conversion function between VCL ControlState together with
ImplControlValue and Qt state flags.
@param nControlState State of the widget (default, focused, ...) in Native Widget Framework.
@@ -79,7 +79,7 @@ QStyle::State vclStateValue2StateFlag( ControlState nControlState,
return nState;
}
-/**
+/**
Convert VCL Rectangle to QRect.
@param rControlRegion The Rectangle to convert.
@return The matching QRect
@@ -89,7 +89,7 @@ QRect region2QRect( const Rectangle& rControlRegion )
return QRect(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
}
-KDESalGraphics::KDESalGraphics() :
+KDESalGraphics::KDESalGraphics() :
m_image(0)
{
}
@@ -103,54 +103,54 @@ KDESalGraphics::~KDESalGraphics()
BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
{
if (type == CTRL_PUSHBUTTON) return true;
-
+
if (type == CTRL_MENUBAR) return true;
-
+
if (type == CTRL_MENU_POPUP) return true;
-
+
if (type == CTRL_EDITBOX) return true;
-
+
if (type == CTRL_COMBOBOX) return true;
-
+
if (type == CTRL_TOOLBAR) return true;
-
+
if (type == CTRL_CHECKBOX) return true;
-
+
if (type == CTRL_LISTBOX) return true;
-
+
if (type == CTRL_LISTNODE) return true;
-
+
if (type == CTRL_FRAME) return true;
-
+
if (type == CTRL_SCROLLBAR) return true;
-
+
if (type == CTRL_WINDOW_BACKGROUND) return true;
-
+
if (type == CTRL_SPINBOX && (part == PART_ENTIRE_CONTROL || part == HAS_BACKGROUND_TEXTURE) ) return true;
// no spinbuttons for KDE, paint spinbox complete
//if (type == CTRL_SPINBUTTONS) return true;
-
+
if (type == CTRL_GROUPBOX) return true;
-
+
if (type == CTRL_FIXEDLINE) return true;
-
+
if (type == CTRL_FIXEDBORDER) return true;
-
+
if (type == CTRL_TOOLTIP) return true;
-
+
if (type == CTRL_RADIOBUTTON) return true;
-
+
if (type == CTRL_SLIDER && (part == PART_TRACK_HORZ_AREA || part == PART_TRACK_VERT_AREA) )
return true;
-
+
return false;
-
+
if ( (type == CTRL_TAB_ITEM) && (part == PART_ENTIRE_CONTROL) ) return true;
if ( (type == CTRL_TAB_PANE) && (part == PART_ENTIRE_CONTROL) ) return true;
// no CTRL_TAB_BODY for KDE
if ( (type == CTRL_PROGRESS) && (part == PART_ENTIRE_CONTROL) ) return true;
-
+
return false;
}
@@ -162,13 +162,13 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
}
/// helper drawing methods
-namespace
+namespace
{
void draw( QStyle::ControlElement element, QStyleOption* option, QImage* image, QStyle::State state )
{
option->state |= state;
option->rect = image->rect();
-
+
QPainter painter(image);
kapp->style()->drawControl(element, option, &painter);
}
@@ -179,7 +179,7 @@ namespace
option->rect = image->rect();
if( nAdjust )
option->rect.adjust( nAdjust, nAdjust, -nAdjust, -nAdjust );
-
+
QPainter painter(image);
kapp->style()->drawPrimitive(element, option, &painter);
}
@@ -188,11 +188,11 @@ namespace
{
option->state |= state;
option->rect = image->rect();
-
+
QPainter painter(image);
kapp->style()->drawComplexControl(element, option, &painter);
}
-
+
int getFrameWidth()
{
static int s_nFrameWidth = -1;
@@ -217,12 +217,12 @@ namespace
option.state = QStyle::State_Sunken;
#else
QStyleOptionFrame option;
-
+
QFrame aFrame( NULL );
aFrame.setFrameRect( QRect(0, 0, image->width(), image->height()) );
aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
aFrame.ensurePolished();
-
+
option.initFrom( &aFrame );
option.lineWidth = aFrame.lineWidth();
option.midLineWidth = aFrame.midLineWidth();
@@ -242,7 +242,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
return false;
}
-
+
BOOL returnVal = true;
QRect widgetRect = region2QRect(rControlRegion);
@@ -257,34 +257,34 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
widgetRect = QRect( aButtonRect.Left(), aButtonRect.Top(),
aButtonRect.Right(), aButtonRect.Bottom() );
}
-
+
//if no image, or resized, make a new image
if (!m_image || m_image->size() != widgetRect.size())
{
if (m_image)
delete m_image;
-
+
m_image = new QImage( widgetRect.width(),
- widgetRect.height(),
+ widgetRect.height(),
QImage::Format_ARGB32 );
}
m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
-
-
+
+
XLIB_Region pTempClipRegion = 0;
if (type == CTRL_PUSHBUTTON)
{
QStyleOptionButton option;
- draw( QStyle::CE_PushButton, &option, m_image,
+ draw( QStyle::CE_PushButton, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if ( (type == CTRL_MENUBAR))
{
- if (part == PART_MENU_ITEM)
+ if (part == PART_MENU_ITEM)
{
QStyleOptionMenuItem option;
- draw( QStyle::CE_MenuBarItem, &option, m_image,
+ draw( QStyle::CE_MenuBarItem, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (part == PART_ENTIRE_CONTROL)
@@ -296,17 +296,17 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
}
}
else if (type == CTRL_MENU_POPUP)
- {
+ {
if (part == PART_MENU_ITEM)
{
QStyleOptionMenuItem option;
- draw( QStyle::CE_MenuItem, &option, m_image,
+ draw( QStyle::CE_MenuItem, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (part == PART_MENU_ITEM_CHECK_MARK && (nControlState & CTRL_STATE_PRESSED) )
{
QStyleOptionButton option;
- draw( QStyle::PE_IndicatorMenuCheckMark, &option, m_image,
+ draw( QStyle::PE_IndicatorMenuCheckMark, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (part == PART_MENU_ITEM_RADIO_MARK && (nControlState & CTRL_STATE_PRESSED) )
@@ -323,44 +323,44 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
#else
QStyleOptionFrameV2 option;
#endif
- draw( QStyle::PE_FrameMenu, &option, m_image,
+ draw( QStyle::PE_FrameMenu, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
}
else if ( (type == CTRL_TOOLBAR) && (part == PART_BUTTON) )
{
QStyleOptionToolButton option;
-
+
option.arrowType = Qt::NoArrow;
option.subControls = QStyle::SC_ToolButton;
-
+
option.state = vclStateValue2StateFlag( nControlState, value );
option.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
-
- draw( QStyle::CC_ToolButton, &option, m_image,
+
+ draw( QStyle::CC_ToolButton, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if ( (type == CTRL_TOOLBAR) && (part == PART_ENTIRE_CONTROL) )
{
QStyleOptionToolBar option;
-
+
option.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
option.state = vclStateValue2StateFlag( nControlState, value );
-
- draw( QStyle::CE_ToolBar, &option, m_image,
+
+ draw( QStyle::CE_ToolBar, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if ( (type == CTRL_TOOLBAR) && (part == PART_THUMB_VERT) )
{
const int tw = widgetRect.width();
widgetRect.setWidth(kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent));
-
+
QStyleOption option;
option.state = QStyle::State_Horizontal;
-
- draw( QStyle::PE_IndicatorToolBarHandle, &option, m_image,
+
+ draw( QStyle::PE_IndicatorToolBarHandle, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
-
+
widgetRect.setWidth(tw);
}
else if (type == CTRL_EDITBOX)
@@ -368,7 +368,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
QStyleOptionFrameV2 option;
draw( QStyle::PE_PanelLineEdit, &option, m_image,
vclStateValue2StateFlag(nControlState, value), 2 );
-
+
draw( QStyle::PE_FrameLineEdit, &option, m_image,
vclStateValue2StateFlag(nControlState, value), 0 );
}
@@ -376,15 +376,15 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
QStyleOptionComboBox option;
option.editable = true;
-
- draw( QStyle::CC_ComboBox, &option, m_image,
+
+ draw( QStyle::CC_ComboBox, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_LISTBOX)
{
if( part == PART_WINDOW )
{
- lcl_drawFrame( QStyle::PE_Frame, m_image,
+ lcl_drawFrame( QStyle::PE_Frame, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else
@@ -392,12 +392,12 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
QStyleOptionComboBox option;
if (part == PART_SUB_EDIT)
{
- draw( QStyle::CE_ComboBoxLabel, &option, m_image,
+ draw( QStyle::CE_ComboBoxLabel, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else
{
- draw( QStyle::CC_ComboBox, &option, m_image,
+ draw( QStyle::CC_ComboBox, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
}
@@ -406,15 +406,15 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
QStyleOption option;
option.state = QStyle::State_Item | QStyle::State_Children;
-
+
if (nControlState & CTRL_STATE_PRESSED)
option.state |= QStyle::State_Open;
-
+
draw( QStyle::PE_IndicatorBranch, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_CHECKBOX)
- {
+ {
QStyleOptionButton option;
draw( QStyle::CE_CheckBox, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
@@ -426,29 +426,29 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
QStyleOptionSlider option;
OSL_ASSERT( value.getType() == CTRL_SCROLLBAR );
const ScrollbarValue* sbVal = static_cast<const ScrollbarValue *>(&value);
-
+
//if the scroll bar is active (aka not degenrate...allow for hover events
if (sbVal->mnVisibleSize < sbVal->mnMax)
option.state = QStyle::State_MouseOver;
-
+
//horizontal or vertical
if (part == PART_DRAW_BACKGROUND_VERT)
option.orientation = Qt::Vertical;
else
option.state |= QStyle::State_Horizontal;
-
+
//setup parameters from the OO values
option.minimum = sbVal->mnMin;
option.maximum = sbVal->mnMax - sbVal->mnVisibleSize;
option.sliderValue = sbVal->mnCur;
option.sliderPosition = sbVal->mnCur;
option.pageStep = sbVal->mnVisibleSize;
-
+
//setup the active control...always the slider
if (sbVal->mnThumbState & CTRL_STATE_ROLLOVER)
option.activeSubControls = QStyle::SC_ScrollBarSlider;
-
- draw( QStyle::CC_ScrollBar, &option, m_image,
+
+ draw( QStyle::CC_ScrollBar, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else
@@ -459,7 +459,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
else if (type == CTRL_SPINBOX)
{
QStyleOptionSpinBox option;
-
+
// determine active control
if( value.getType() == CTRL_SPINBUTTONS )
{
@@ -469,33 +469,33 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
if( (pSpinVal->mnLowerState & CTRL_STATE_PRESSED) )
option.activeSubControls |= QStyle::SC_SpinBoxDown;
}
-
- draw( QStyle::CC_SpinBox, &option, m_image,
+
+ draw( QStyle::CC_SpinBox, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_GROUPBOX)
{
QStyleOptionGroupBox option;
- draw( QStyle::CC_GroupBox, &option, m_image,
+ draw( QStyle::CC_GroupBox, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_RADIOBUTTON)
{
QStyleOptionButton option;
- draw( QStyle::CE_RadioButton, &option, m_image,
+ draw( QStyle::CE_RadioButton, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_TOOLTIP)
{
QStyleOption option;
- draw( QStyle::PE_PanelTipLabel, &option, m_image,
+ draw( QStyle::PE_PanelTipLabel, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_FRAME)
{
- lcl_drawFrame( QStyle::PE_Frame, m_image,
+ lcl_drawFrame( QStyle::PE_Frame, m_image,
vclStateValue2StateFlag(nControlState, value) );
-
+
// draw just the border, see http://qa.openoffice.org/issues/show_bug.cgi?id=107945
int nFrameWidth = getFrameWidth();
pTempClipRegion = XCreateRegion();
@@ -509,7 +509,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
xRect.width -= 2*nFrameWidth;
xRect.height -= 2*nFrameWidth;
-
+
XLIB_Region pSubtract = XCreateRegion();
XUnionRectWithRegion( &xRect, pSubtract, pSubtract );
XSubtractRegion( pTempClipRegion, pSubtract, pTempClipRegion );
@@ -518,7 +518,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
}
else if (type == CTRL_FIXEDBORDER)
{
- lcl_drawFrame( QStyle::PE_FrameWindow, m_image,
+ lcl_drawFrame( QStyle::PE_FrameWindow, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_WINDOW_BACKGROUND)
@@ -530,8 +530,8 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
QStyleOptionMenuItem option;
option.menuItemType = QStyleOptionMenuItem::Separator;
option.state |= QStyle::State_Item;
-
- draw( QStyle::CE_MenuItem, &option, m_image,
+
+ draw( QStyle::CE_MenuItem, &option, m_image,
vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_SLIDER && (part == PART_TRACK_HORZ_AREA || part == PART_TRACK_VERT_AREA))
@@ -539,25 +539,25 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
OSL_ASSERT( value.getType() == CTRL_SLIDER );
const SliderValue* slVal = static_cast<const SliderValue *>(&value);
QStyleOptionSlider option;
-
+
option.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
option.state = vclStateValue2StateFlag( nControlState, value );
option.maximum = slVal->mnMax;
option.minimum = slVal->mnMin;
option.sliderPosition = option.sliderValue = slVal->mnCur;
option.orientation = (part == PART_TRACK_HORZ_AREA) ? Qt::Horizontal : Qt::Vertical;
-
+
draw( QStyle::CC_Slider, &option, m_image, vclStateValue2StateFlag(nControlState, value) );
}
else
{
returnVal = false;
}
-
+
if (returnVal)
{
GC gc = SelectFont();
-
+
if( gc )
{
if( pTempClipRegion )
@@ -571,7 +571,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
pixmap.handle(), pixmap.x11Info().screen(), pixmap.x11Info().depth(),
GetDrawable(), GetScreenNumber(), GetVisual().GetDepth(),
gc, 0, 0, widgetRect.width(), widgetRect.height(), widgetRect.left(), widgetRect.top());
-
+
if( pTempClipRegion )
{
if( pClipRegion_ )
@@ -596,11 +596,11 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
Rectangle &nativeBoundingRegion, Rectangle &nativeContentRegion )
{
bool retVal = false;
-
+
QRect boundingRect = region2QRect( controlRegion );
QRect contentRect = boundingRect;
QStyleOptionComplex styleOption;
-
+
switch ( type )
{
// Metrics of the push button
@@ -613,9 +613,9 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
{
int size = kapp->style()->pixelMetric(
QStyle::PM_ButtonDefaultIndicator, &styleOption );
-
+
boundingRect.adjust( -size, -size, size, size );
-
+
retVal = true;
}
}
@@ -638,46 +638,46 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
contentRect = boundingRect;
contentRect.adjust( -nLayoutLeft+1, -nLayoutTop+1, nLayoutRight-1, nLayoutBottom-1 );
retVal = true;
-
+
break;
}
case CTRL_CHECKBOX:
if (part == PART_ENTIRE_CONTROL)
{
styleOption.state = vclStateValue2StateFlag(controlState, val);
-
+
contentRect.setWidth(kapp->style()->pixelMetric(
QStyle::PM_IndicatorWidth, &styleOption));
contentRect.setHeight(kapp->style()->pixelMetric(
QStyle::PM_IndicatorHeight, &styleOption));
-
+
contentRect.adjust(0, 0,
2 * kapp->style()->pixelMetric(
QStyle::PM_FocusFrameHMargin, &styleOption),
2 * kapp->style()->pixelMetric(
QStyle::PM_FocusFrameVMargin, &styleOption)
);
-
+
boundingRect = contentRect;
-
+
retVal = true;
-
+
break;
}
case CTRL_COMBOBOX:
case CTRL_LISTBOX:
{
QStyleOptionComboBox cbo;
-
+
cbo.rect = QRect(0, 0, contentRect.width(), contentRect.height());
cbo.state = vclStateValue2StateFlag(controlState, val);
-
+
switch ( part )
{
case PART_ENTIRE_CONTROL:
{
int size = kapp->style()->pixelMetric(QStyle::PM_ComboBoxFrameWidth) - 2;
-
+
// find out the minimum size that should be used
// assume contents is a text ling
int nHeight = kapp->fontMetrics().height();
@@ -702,9 +702,9 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
case PART_SUB_EDIT:
contentRect = kapp->style()->subControlRect(
QStyle::CC_ComboBox, &cbo, QStyle::SC_ComboBoxEditField );
-
+
contentRect.translate( boundingRect.left(), boundingRect.top() );
-
+
retVal = true;
break;
case PART_WINDOW:
@@ -719,7 +719,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
sbo.rect = QRect(0, 0, contentRect.width(), contentRect.height());
sbo.state = vclStateValue2StateFlag(controlState, val);
-
+
switch ( part )
{
case PART_BUTTON_UP:
@@ -729,7 +729,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
retVal = true;
boundingRect = QRect();
break;
-
+
case PART_BUTTON_DOWN:
contentRect = kapp->style()->subControlRect(
QStyle::CC_SpinBox, &sbo, QStyle::SC_SpinBoxDown );
@@ -785,7 +785,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
{
const int h = kapp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorHeight);
const int w = kapp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth);
-
+
contentRect = QRect(boundingRect.left(), boundingRect.top(), w, h);
contentRect.adjust(0, 0,
2 * kapp->style()->pixelMetric(
@@ -794,7 +794,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
QStyle::PM_FocusFrameVMargin, &styleOption)
);
boundingRect = contentRect;
-
+
retVal = true;
break;
}
@@ -819,7 +819,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
break;
}
#if 0
-
+
// Metrics of the scroll bar
case CTRL_SCROLLBAR:
@@ -857,7 +857,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
qRect.setBottom( 0 );
}
}
-
+
qRect.translate( qBoundingRect.left(), qBoundingRect.top() );
bReturn = TRUE;
@@ -887,7 +887,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
break;
}
#endif
-
+
if (retVal)
{
// Bounding region
@@ -900,6 +900,6 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
Size aSize( contentRect.width(), contentRect.height() );
nativeContentRegion = Rectangle( aPoint, aSize );
}
-
+
return retVal;
}
diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
index 0bce1700f1fc..35547bd76b98 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ class KDESalGraphics : public X11SalGraphics
public:
KDESalGraphics();
virtual ~KDESalGraphics();
-
+
/**
What widgets can be drawn the native way.
@param type Type of the widget.
@@ -51,7 +51,7 @@ class KDESalGraphics : public X11SalGraphics
@return true if the platform supports native drawing of the widget type defined by part.
*/
virtual BOOL IsNativeControlSupported( ControlType type, ControlPart part );
-
+
/** Test whether the position is in the native widget.
If the return value is TRUE, bIsInside contains information whether
aPos was or was not inside the native widget specified by the
@@ -61,13 +61,13 @@ class KDESalGraphics : public X11SalGraphics
const Rectangle& rControlRegion, const Point& aPos,
BOOL& rIsInside );
/** Draw the requested control described by part/nControlState.
-
+
@param rControlRegion
The bounding Rectangle of the complete control in VCL frame coordinates.
-
+
@param aValue
An optional value (tristate/numerical/string).
-
+
@param aCaption
A caption or title string (like button text etc.)
*/
@@ -75,21 +75,21 @@ class KDESalGraphics : public X11SalGraphics
const Rectangle& rControlRegion, ControlState nControlState,
const ImplControlValue& aValue,
const rtl::OUString& aCaption );
-
+
/** Draw text on the widget.
OPTIONAL. Draws the requested text for the control described by part/nControlState.
Used if text is not drawn by DrawNativeControl().
-
+
@param rControlRegion The bounding region of the complete control in VCL frame coordinates.
@param aValue An optional value (tristate/numerical/string)
- @param aCaption A caption or title string (like button text etc.)
+ @param aCaption A caption or title string (like button text etc.)
*/
virtual BOOL drawNativeControlText( ControlType, ControlPart,
const Rectangle&, ControlState,
const ImplControlValue&,
const rtl::OUString& ) { return false; }
/** Check if the bounding regions match.
-
+
If the return value is TRUE, rNativeBoundingRegion
contains the true bounding region covered by the control
including any adornment, while rNativeContentRegion contains the area
@@ -98,10 +98,10 @@ class KDESalGraphics : public X11SalGraphics
@param rControlRegion
The bounding region of the control in VCL frame coordinates.
-
+
@param aValue
An optional value (tristate/numerical/string)
-
+
@param aCaption
A caption or title string (like button text etc.)
*/
diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx
index 01c4723bd530..aafcb94bdc81 100644
--- a/vcl/unx/kde4/KDESalInstance.cxx
+++ b/vcl/unx/kde4/KDESalInstance.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx
index 7d050fe6819e..4a4c97fa927e 100644
--- a/vcl/unx/kde4/KDESalInstance.hxx
+++ b/vcl/unx/kde4/KDESalInstance.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 6a2793b8abe3..6f64cb8aca5a 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,8 +51,8 @@
#include <stdio.h>
#endif
-KDEXLib::KDEXLib() :
- SalXLib(), m_bStartupDone(false), m_pApplication(0),
+KDEXLib::KDEXLib() :
+ SalXLib(), m_bStartupDone(false), m_pApplication(0),
m_pFreeCmdLineArgs(0), m_pAppCmdLineArgs(0), m_nFakeCmdLineArgs( 0 )
{
}
@@ -60,13 +60,13 @@ KDEXLib::KDEXLib() :
KDEXLib::~KDEXLib()
{
delete (VCLKDEApplication*)m_pApplication;
-
+
// free the faked cmdline arguments no longer needed by KApplication
for( int i = 0; i < m_nFakeCmdLineArgs; i++ )
{
free( m_pFreeCmdLineArgs[i] );
}
-
+
delete [] m_pFreeCmdLineArgs;
delete [] m_pAppCmdLineArgs;
}
@@ -87,7 +87,7 @@ void KDEXLib::Init()
ki18n( "OpenOffice.org is an office suite.\n" ),
"http://kde.openoffice.org/index.html",
"dev@kde.openoffice.org" );
-
+
kAboutData->addAuthor( ki18n( "Jan Holesovsky" ),
ki18n( "Original author and maintainer of the KDE NWF." ),
"kendy@artax.karlin.mff.cuni.cz",
@@ -98,7 +98,7 @@ void KDEXLib::Init()
kAboutData->addAuthor( ki18n("Eric Bischoff"),
ki18n( "Accessibility fixes, porting to KDE 4." ),
"bischoff@kde.org" );
-
+
//kAboutData->setProgramIconName("OpenOffice");
m_nFakeCmdLineArgs = 1;
@@ -108,7 +108,7 @@ void KDEXLib::Init()
rtl::OString aDisplay;
rtl::OUString aParam, aBin;
- for ( nIdx = 0; nIdx < nParams; ++nIdx )
+ for ( nIdx = 0; nIdx < nParams; ++nIdx )
{
aCommandLine.getCommandArg( nIdx, aParam );
if ( !m_pFreeCmdLineArgs && aParam.equalsAscii( "-display" ) && nIdx + 1 < nParams )
@@ -138,14 +138,14 @@ void KDEXLib::Init()
m_pAppCmdLineArgs[i] = m_pFreeCmdLineArgs[i];
KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
-
+
m_pApplication = new VCLKDEApplication();
kapp->disableSessionManagement();
KApplication::setQuitOnLastWindowClosed(false);
-
+
Display* pDisp = QX11Info::display();
SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
-
+
((VCLKDEApplication*)m_pApplication)->disp = pSalDisplay;
pInputMethod->CreateMethod( pDisp );
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 985e0c3c6717..4672dee3fbb4 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,12 +37,12 @@ class KDEXLib : public SalXLib
char** m_pFreeCmdLineArgs;
char** m_pAppCmdLineArgs;
int m_nFakeCmdLineArgs;
-
+
public:
KDEXLib();
-
+
virtual ~KDEXLib();
virtual void Init();
-
+
void doStartup();
};
diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
index 2cfb071e96ae..bcebe4e52eb7 100644
--- a/vcl/unx/kde4/VCLKDEApplication.cxx
+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@
#include "KDESalDisplay.hxx"
-VCLKDEApplication::VCLKDEApplication() :
+VCLKDEApplication::VCLKDEApplication() :
KApplication()
{
disp = 0;
@@ -47,6 +47,6 @@ bool VCLKDEApplication::x11EventFilter(XEvent* event)
{
return true;
}
-
+
return false;
} \ No newline at end of file
diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx
index 2edfddd69a9c..f3d5afdf5312 100644
--- a/vcl/unx/kde4/VCLKDEApplication.hxx
+++ b/vcl/unx/kde4/VCLKDEApplication.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +44,10 @@ class VCLKDEApplication : public KApplication
{
public:
VCLKDEApplication();
-
+
virtual void commitData(QSessionManager&) {};
-
+
virtual bool x11EventFilter(XEvent* event);
-
+
SalKDEDisplay* disp;
}; \ No newline at end of file
diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index 962a882af26b..fecbb4719d90 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ extern "C" {
*/
if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
XInitThreads();
-
+
#if QT_VERSION < 0x050000
// Qt 4.x support needs >= 4.1.0
rtl::OString aVersion( qVersion() );
@@ -75,12 +75,12 @@ extern "C" {
return NULL;
}
#endif
-
+
KDESalInstance* pInstance = new KDESalInstance( new SalYieldMutex() );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "created KDESalInstance 0x%p\n", pInstance );
#endif
-
+
// initialize SalData
KDEData *salData = new KDEData();
SetSalData(salData);
diff --git a/vcl/unx/source/app/i18n_cb.cxx b/vcl/unx/source/app/i18n_cb.cxx
index d3a4f2b819ae..ecd6432a1947 100644
--- a/vcl/unx/source/app/i18n_cb.cxx
+++ b/vcl/unx/source/app/i18n_cb.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -412,7 +412,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
pPreeditData->aInputEv.mnCursorPos = call_data->caret;
pPreeditData->aInputEv.maText = String (pPreeditData->aText.pUnicodeBuffer,
pPreeditData->aText.nLength);
- pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible
+ pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible
pPreeditData->aInputEv.mnDeltaStart = 0; // call_data->chg_first;
pPreeditData->aInputEv.mbOnlyCursor = False;
@@ -537,13 +537,13 @@ CommitStringCallback( XIC ic, XPointer client_data, XPointer call_data )
{
if( pPreeditData->pFrame )
{
- pPreeditData->aInputEv.mnTime = 0;
- pPreeditData->aInputEv.mpTextAttr = 0;
- pPreeditData->aInputEv.mnCursorPos = cbtext->length;
- pPreeditData->aInputEv.maText = UniString(p_unicode_data, cbtext->length);
- pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible
- pPreeditData->aInputEv.mnDeltaStart = 0;
- pPreeditData->aInputEv.mbOnlyCursor = False;
+ pPreeditData->aInputEv.mnTime = 0;
+ pPreeditData->aInputEv.mpTextAttr = 0;
+ pPreeditData->aInputEv.mnCursorPos = cbtext->length;
+ pPreeditData->aInputEv.maText = UniString(p_unicode_data, cbtext->length);
+ pPreeditData->aInputEv.mnCursorFlags = 0; // default: make cursor visible
+ pPreeditData->aInputEv.mnDeltaStart = 0;
+ pPreeditData->aInputEv.mbOnlyCursor = False;
pPreeditData->pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pPreeditData->aInputEv);
pPreeditData->pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
index 3064be9367e1..d2a7943c46c6 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,15 +58,15 @@ using namespace vcl;
static void sendEmptyCommit( SalFrame* pFrame )
{
vcl::DeletionListener aDel( pFrame );
-
+
SalExtTextInputEvent aEmptyEv;
- aEmptyEv.mnTime = 0;
- aEmptyEv.mpTextAttr = 0;
- aEmptyEv.maText = String();
- aEmptyEv.mnCursorPos = 0;
- aEmptyEv.mnCursorFlags = 0;
- aEmptyEv.mnDeltaStart = 0;
- aEmptyEv.mbOnlyCursor = False;
+ aEmptyEv.mnTime = 0;
+ aEmptyEv.mpTextAttr = 0;
+ aEmptyEv.maText = String();
+ aEmptyEv.mnCursorPos = 0;
+ aEmptyEv.mnCursorFlags = 0;
+ aEmptyEv.mnDeltaStart = 0;
+ aEmptyEv.mbOnlyCursor = False;
pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aEmptyEv );
if( ! aDel.isDeleted() )
pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
@@ -685,10 +685,10 @@ SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame )
if ( mbUseable && (maContext != NULL) )
{
maClientData.pFrame = pFocusFrame;
-
- const SystemEnvData* pEnv = pFocusFrame->GetSystemData();
- XLIB_Window aClientWindow = pEnv->aShellWindow;
- XLIB_Window aFocusWindow = pEnv->aWindow;
+
+ const SystemEnvData* pEnv = pFocusFrame->GetSystemData();
+ XLIB_Window aClientWindow = pEnv->aShellWindow;
+ XLIB_Window aFocusWindow = pEnv->aWindow;
XSetICValues( maContext,
XNFocusWindow, aFocusWindow,
@@ -701,7 +701,7 @@ SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame )
// begin preedit again
GetX11SalData()->GetDisplay()->SendInternalEvent( pFocusFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT );
}
-
+
XSetICFocus( maContext );
}
}
diff --git a/vcl/unx/source/app/i18n_im.cxx b/vcl/unx/source/app/i18n_im.cxx
index 9f1ffee3d1c4..54a5e0e87d1c 100644
--- a/vcl/unx/source/app/i18n_im.cxx
+++ b/vcl/unx/source/app/i18n_im.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -186,14 +186,14 @@ SetSystemEnvironment( const char* p_locale )
char *p_buffer;
- if (p_locale != NULL)
+ if (p_locale != NULL)
{
p_buffer = (char*)alloca(10 + strlen(p_locale));
sprintf(p_buffer, lc_all, p_locale);
putenv(strdup(p_buffer));
sprintf(p_buffer, lang, p_locale);
putenv(strdup(p_buffer));
- }
+ }
}
#endif
@@ -227,10 +227,10 @@ IsXWindowCompatibleLocale( const char* p_locale )
return True;
}
-// Set the operating system locale prior to trying to open an
+// Set the operating system locale prior to trying to open an
// XIM InputMethod.
// Handle the cases where the current locale is either not supported by the
-// operating system (LANG=gaga) or by the XWindow system (LANG=aa_ER@saaho)
+// operating system (LANG=gaga) or by the XWindow system (LANG=aa_ER@saaho)
// by providing a fallback.
// Upgrade "C" or "POSIX" to "en_US" locale to allow umlauts and accents
// see i8988, i9188, i8930, i16318
@@ -261,7 +261,7 @@ SalI18N_InputMethod::SetLocale( const char* pLocale )
mbUseable = False;
}
}
-
+
// must not fail if mbUseable since XSupportsLocale() asserts success
if ( mbUseable && XSetLocaleModifiers("") == NULL )
{
@@ -327,15 +327,15 @@ GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize)
StyleName *pDescPtr;
static const StyleName pDescription[] = {
- { XIMPreeditArea, "PreeditArea ", sizeof("PreeditArea ") },
+ { XIMPreeditArea, "PreeditArea ", sizeof("PreeditArea ") },
{ XIMPreeditCallbacks, "PreeditCallbacks ",sizeof("PreeditCallbacks ")},
{ XIMPreeditPosition, "PreeditPosition ", sizeof("PreeditPosition ") },
{ XIMPreeditNothing, "PreeditNothing ", sizeof("PreeditNothing ") },
- { XIMPreeditNone, "PreeditNone ", sizeof("PreeditNone ") },
- { XIMStatusArea, "StatusArea ", sizeof("StatusArea ") },
+ { XIMPreeditNone, "PreeditNone ", sizeof("PreeditNone ") },
+ { XIMStatusArea, "StatusArea ", sizeof("StatusArea ") },
{ XIMStatusCallbacks, "StatusCallbacks ", sizeof("StatusCallbacks ") },
- { XIMStatusNothing, "StatusNothing ", sizeof("StatusNothing ") },
- { XIMStatusNone, "StatusNone ", sizeof("StatusNone ") },
+ { XIMStatusNothing, "StatusNothing ", sizeof("StatusNothing ") },
+ { XIMStatusNone, "StatusNone ", sizeof("StatusNone ") },
{ 0, "NULL", 0 }
};
@@ -468,7 +468,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
fprintf(stderr, "input method creation failed\n");
#endif
- maDestroyCallback.callback = (XIMProc)IM_IMDestroyCallback;
+ maDestroyCallback.callback = (XIMProc)IM_IMDestroyCallback;
maDestroyCallback.client_data = (XPointer)this;
if (mbUseable && maMethod != NULL)
XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, NULL);
@@ -481,7 +481,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
//
Bool
-SalI18N_InputMethod::FilterEvent( XEvent *pEvent, XLIB_Window window )
+SalI18N_InputMethod::FilterEvent( XEvent *pEvent, XLIB_Window window )
{
if (!mbUseable)
return False;
@@ -541,9 +541,9 @@ InputMethod_HasPendingEvent(int nFileDescriptor, void *pData)
struct pollfd aFileDescriptor;
#ifdef SOLARIS
- nfds_t nNumDescriptor = 1;
+ nfds_t nNumDescriptor = 1;
#else
- unsigned int nNumDescriptor = 1;
+ unsigned int nNumDescriptor = 1;
#endif
aFileDescriptor.fd = nFileDescriptor;
aFileDescriptor.events = POLLRDNORM;
diff --git a/vcl/unx/source/app/i18n_keysym.cxx b/vcl/unx/source/app/i18n_keysym.cxx
index 812e54aae937..1571dd872536 100644
--- a/vcl/unx/source/app/i18n_keysym.cxx
+++ b/vcl/unx/source/app/i18n_keysym.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,18 +33,18 @@
#include <i18n_keysym.hxx>
-// convert keysyms to unicode
+// convert keysyms to unicode
// for all keysyms with byte1 and byte2 equal zero, and of course only for
// keysyms that have a unicode counterpart
typedef const sal_Unicode unicode_t;
-typedef struct {
+typedef struct {
const int first; const int last;
- unicode_t *map;
+ unicode_t *map;
} keymap_t;
-// Latin-1 Byte 3 = 0x00
-unicode_t keymap00_map[] = {
+// Latin-1 Byte 3 = 0x00
+unicode_t keymap00_map[] = {
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
@@ -72,11 +72,11 @@ unicode_t keymap00_map[] = {
0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
- 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff };
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff };
const keymap_t keymap00 = { 32, 255, keymap00_map };
-// Latin-2 Byte 3 = 0x01
-unicode_t keymap01_map[] = {
+// Latin-2 Byte 3 = 0x01
+unicode_t keymap01_map[] = {
0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, 0x0000,
0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, 0x0000,
0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, 0x0000,
@@ -88,11 +88,11 @@ unicode_t keymap01_map[] = {
0x0000, 0x0000, 0x0103, 0x0000, 0x013a, 0x0107, 0x0000, 0x010d,
0x0000, 0x0119, 0x0000, 0x011b, 0x0000, 0x0000, 0x010f, 0x0111,
0x0144, 0x0148, 0x0000, 0x0000, 0x0151, 0x0000, 0x0000, 0x0159,
- 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9 };
+ 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9 };
const keymap_t keymap01 = { 161, 255, keymap01_map };
-// Latin-3 Byte 3 = 0x02
-unicode_t keymap02_map[] = {
+// Latin-3 Byte 3 = 0x02
+unicode_t keymap02_map[] = {
0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, 0x0000,
0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000,
0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, 0x0000,
@@ -104,11 +104,11 @@ unicode_t keymap02_map[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x010b, 0x0109, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0121, 0x0000, 0x0000, 0x011d,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d };
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d };
const keymap_t keymap02 = { 161, 254, keymap02_map };
-// Latin-4 Byte 3 = 0x03
-unicode_t keymap03_map[] = {
+// Latin-4 Byte 3 = 0x03
+unicode_t keymap03_map[] = {
0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, 0x0000, 0x0000,
0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, 0x0000, 0x0000,
@@ -120,11 +120,11 @@ unicode_t keymap03_map[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012f, 0x0000, 0x0000,
0x0000, 0x0000, 0x0117, 0x0000, 0x0000, 0x012b, 0x0000, 0x0146,
0x014d, 0x0137, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0173,
- 0x0000, 0x0000, 0x0000, 0x0169, 0x016b };
+ 0x0000, 0x0000, 0x0000, 0x0169, 0x016b };
const keymap_t keymap03 = { 162, 254, keymap03_map };
-// Kana Byte 3 = 0x04
-unicode_t keymap04_map[] = {
+// Kana Byte 3 = 0x04
+unicode_t keymap04_map[] = {
0x203e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -137,11 +137,11 @@ unicode_t keymap04_map[] = {
0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8,
0x30db, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e4, 0x30e6,
0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3,
- 0x309b, 0x309c };
+ 0x309b, 0x309c };
const keymap_t keymap04 = { 126, 223, keymap04_map };
-// Arabic Byte 3 = 0x05
-unicode_t keymap05_map[] = {
+// Arabic Byte 3 = 0x05
+unicode_t keymap05_map[] = {
0x060c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061b,
0x0000, 0x0000, 0x0000, 0x061f, 0x0000, 0x0621, 0x0622, 0x0623,
@@ -150,11 +150,11 @@ unicode_t keymap05_map[] = {
0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0640, 0x0641, 0x0642, 0x0643,
0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b,
- 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652 };
+ 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652 };
const keymap_t keymap05 = { 172, 242, keymap05_map };
-// Cyrillic Byte 3 = 0x06
-unicode_t keymap06_map[] = {
+// Cyrillic Byte 3 = 0x06
+unicode_t keymap06_map[] = {
0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458,
0x0459, 0x045a, 0x045b, 0x045c, 0x0000, 0x045e, 0x045f, 0x2116,
0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408,
@@ -166,11 +166,11 @@ unicode_t keymap06_map[] = {
0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425,
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c,
- 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a };
+ 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a };
const keymap_t keymap06 = { 161, 255, keymap06_map };
-// Greek Byte 3 = 0x07
-unicode_t keymap07_map[] = {
+// Greek Byte 3 = 0x07
+unicode_t keymap07_map[] = {
0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, 0x038e,
0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, 0x0000,
0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, 0x03cd,
@@ -182,11 +182,11 @@ unicode_t keymap07_map[] = {
0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8,
0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0,
0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8,
- 0x03c9 };
+ 0x03c9 };
const keymap_t keymap07 = { 161, 249, keymap07_map };
-// Technical Byte 3 = 0x08
-unicode_t keymap08_map[] = {
+// Technical Byte 3 = 0x08
+unicode_t keymap08_map[] = {
0x23b7, 0x250c, 0x2500, 0x2320, 0x2321, 0x2502, 0x23a1, 0x23a3,
0x23a4, 0x23a6, 0x239b, 0x239d, 0x239e, 0x23a0, 0x23a8, 0x23ac,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -198,19 +198,19 @@ unicode_t keymap08_map[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2202, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 };
+ 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 };
const keymap_t keymap08 = { 161, 254, keymap08_map };
-// Special Byte 3 = 0x09
-unicode_t keymap09_map[] = {
+// Special Byte 3 = 0x09
+unicode_t keymap09_map[] = {
0x25c6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000,
0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba,
0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c,
- 0x2502 };
+ 0x2502 };
const keymap_t keymap09 = { 224, 248, keymap09_map };
-// Publishing Byte 3 = 0x0a = 10
-unicode_t keymap10_map[] = {
+// Publishing Byte 3 = 0x0a = 10
+unicode_t keymap10_map[] = {
0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, 0x200a,
0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, 0x2153,
0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x2105,
@@ -222,11 +222,11 @@ unicode_t keymap10_map[] = {
0x25ab, 0x25ad, 0x25b3, 0x25bd, 0x2606, 0x2022, 0x25aa, 0x25b2,
0x25bc, 0x261c, 0x261e, 0x2663, 0x2666, 0x2665, 0x0000, 0x2720,
0x2020, 0x2021, 0x2713, 0x2717, 0x266f, 0x266d, 0x2642, 0x2640,
- 0x260e, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e };
+ 0x260e, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e };
const keymap_t keymap10 = { 161, 254, keymap10_map };
-// APL Byte 3 = 0x0b = 11
-unicode_t keymap11_map[] = {
+// APL Byte 3 = 0x0b = 11
+unicode_t keymap11_map[] = {
0x003c, 0x0000, 0x0000, 0x003e, 0x0000, 0x2228, 0x2227, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -238,19 +238,19 @@ unicode_t keymap11_map[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x22a3 };
+ 0x0000, 0x22a3 };
const keymap_t keymap11 = { 163, 252, keymap11_map };
-// Hebrew Byte 3 = 0x0c = 12
-unicode_t keymap12_map[] = {
+// Hebrew Byte 3 = 0x0c = 12
+unicode_t keymap12_map[] = {
0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6,
0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de,
0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6,
- 0x05e7, 0x05e8, 0x05e9, 0x05ea };
+ 0x05e7, 0x05e8, 0x05e9, 0x05ea };
const keymap_t keymap12 = { 223, 250, keymap12_map };
-// Thai Byte 3 = 0x0d = 13
-unicode_t keymap13_map[] = {
+// Thai Byte 3 = 0x0d = 13
+unicode_t keymap13_map[] = {
0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08,
0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10,
0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18,
@@ -262,11 +262,11 @@ unicode_t keymap13_map[] = {
0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48,
0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0000, 0x0000, 0x0e50,
0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58,
- 0x0e59 };
+ 0x0e59 };
const keymap_t keymap13 = { 161, 249, keymap13_map };
-// Korean Byte 3 = 0x0e = 14
-unicode_t keymap14_map[] = {
+// Korean Byte 3 = 0x0e = 14
+unicode_t keymap14_map[] = {
0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138,
0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140,
0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
@@ -278,31 +278,31 @@ unicode_t keymap14_map[] = {
0x11b5, 0x11b6, 0x11b7, 0x11b8, 0x11b9, 0x11ba, 0x11bb, 0x11bc,
0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x316d, 0x3171,
0x3178, 0x317f, 0x3181, 0x3184, 0x3186, 0x318d, 0x318e, 0x11eb,
- 0x11f0, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9 };
+ 0x11f0, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9 };
const keymap_t keymap14 = { 161, 255, keymap14_map };
// missing:
-// Latin-8 Byte 3 = 0x12 = 18
+// Latin-8 Byte 3 = 0x12 = 18
-// Latin-9 Byte 3 = 0x13 = 19
-unicode_t keymap19_map[] = {
- 0x0152, 0x0153, 0x0178 };
+// Latin-9 Byte 3 = 0x13 = 19
+unicode_t keymap19_map[] = {
+ 0x0152, 0x0153, 0x0178 };
const keymap_t keymap19 = { 188, 190, keymap19_map };
// missing:
-// Armenian Byte 3 = 0x14 = 20
-// Georgian Byte 3 = 0x15 = 21
-// Azeri Byte 3 = 0x16 = 22
-// Vietnamese Byte 3 = 0x1e = 30
+// Armenian Byte 3 = 0x14 = 20
+// Georgian Byte 3 = 0x15 = 21
+// Azeri Byte 3 = 0x16 = 22
+// Vietnamese Byte 3 = 0x1e = 30
-// Currency Byte 3 = 0x20 = 32
-unicode_t keymap32_map[] = {
+// Currency Byte 3 = 0x20 = 32
+unicode_t keymap32_map[] = {
0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7,
- 0x20a8, 0x0000, 0x20aa, 0x20ab, 0x20ac };
+ 0x20a8, 0x0000, 0x20aa, 0x20ab, 0x20ac };
const keymap_t keymap32 = { 160, 172, keymap32_map };
// Keyboard (Keypad mappings) Byte 3 = 0xff = 255
-unicode_t keymap255_map[] = {
+unicode_t keymap255_map[] = {
0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -310,20 +310,20 @@ unicode_t keymap255_map[] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- 0x0038, 0x0039, 0x0000, 0x0000, 0x0000, 0x003d };
+ 0x0038, 0x0039, 0x0000, 0x0000, 0x0000, 0x003d };
const keymap_t keymap255 = { 128, 189, keymap255_map };
#define INITIAL_KEYMAPS 33
const keymap_t* p_keymap[INITIAL_KEYMAPS] = {
- &keymap00, &keymap01, &keymap02, &keymap03, /* 00 -- 03 */
- &keymap04, &keymap05, &keymap06, &keymap07, /* 04 -- 07 */
- &keymap08, &keymap09, &keymap10, &keymap11, /* 08 -- 11 */
- &keymap12, &keymap13, &keymap14, (keymap_t*)NULL, /* 12 -- 15 */
- (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, &keymap19, /* 16 -- 19 */
+ &keymap00, &keymap01, &keymap02, &keymap03, /* 00 -- 03 */
+ &keymap04, &keymap05, &keymap06, &keymap07, /* 04 -- 07 */
+ &keymap08, &keymap09, &keymap10, &keymap11, /* 08 -- 11 */
+ &keymap12, &keymap13, &keymap14, (keymap_t*)NULL, /* 12 -- 15 */
+ (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, &keymap19, /* 16 -- 19 */
(keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 20 -- 23 */
(keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 24 -- 27 */
(keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, (keymap_t*)NULL, /* 28 -- 31 */
- &keymap32 /* 32 */
+ &keymap32 /* 32 */
};
sal_Unicode
diff --git a/vcl/unx/source/app/i18n_status.cxx b/vcl/unx/source/app/i18n_status.cxx
index 3a6ae26a2b0e..9891376d6d27 100644
--- a/vcl/unx/source/app/i18n_status.cxx
+++ b/vcl/unx/source/app/i18n_status.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -92,17 +92,17 @@ namespace vcl {
class XIMStatusWindow : public StatusWindow
{
- FixedText m_aStatusText;
- SalFrame* m_pLastParent;
- Size m_aWindowSize;
+ FixedText m_aStatusText;
+ SalFrame* m_pLastParent;
+ Size m_aWindowSize;
bool m_bAnchoredAtRight;
// true if the right edge (instead of the left edge) should stay at a
// fixed position when re-sizing the window
// for delayed showing
- bool m_bDelayedShow;
- I18NStatus::ShowReason m_eDelayedReason;
- ULONG m_nDelayedEvent;
+ bool m_bDelayedShow;
+ I18NStatus::ShowReason m_eDelayedReason;
+ ULONG m_nDelayedEvent;
// for toggling
bool m_bOn;
@@ -207,7 +207,7 @@ Point XIMStatusWindow::updatePosition()
if( checkLastParent() )
{
const SystemEnvData* pParentEnvData = m_pLastParent->GetSystemData();
-
+
SalExtTextInputPosEvent aPosEvent;
m_pLastParent->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent );
int x, y;
@@ -318,9 +318,9 @@ namespace vcl {
class IIIMPStatusWindow : public StatusWindow
{
- MenuButton m_aStatusBtn;
- PopupMenu m_aMenu;
- SalFrame* m_pResetFocus;
+ MenuButton m_aStatusBtn;
+ PopupMenu m_aMenu;
+ SalFrame* m_pResetFocus;
bool m_bShow;
bool m_bOn;
@@ -613,7 +613,7 @@ void I18NStatus::setStatusText( const String& rText )
String aText( pBuffer );
m_pStatusWindow->setText( aText );
m_pStatusWindow->setPosition( m_pParent );
-
+
bool bVisible = true;
if( m_pParent )
{
@@ -624,7 +624,7 @@ void I18NStatus::setStatusText( const String& rText )
bVisible = false;
}
}
-
+
m_pStatusWindow->show( bVisible, contextmap );
}
}
@@ -655,8 +655,8 @@ void I18NStatus::clearChoices()
void I18NStatus::addChoice( const String& rChoice, void* pData )
{
ChoiceData aData;
- aData.pData = pData;
- aData.aString = rChoice;
+ aData.pData = pData;
+ aData.aString = rChoice;
m_aChoices.push_back( aData );
}
diff --git a/vcl/unx/source/app/i18n_wrp.cxx b/vcl/unx/source/app/i18n_wrp.cxx
index eb48962a24d0..2eb1fbba1941 100644
--- a/vcl/unx/source/app/i18n_wrp.cxx
+++ b/vcl/unx/source/app/i18n_wrp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-struct XIMArg
+struct XIMArg
{
char *name;
char *value;
@@ -47,7 +47,7 @@ struct XIMArg
#include <X11/Xlibint.h>
#include "XIM.h"
-#define XIIIMP_LIB "xiiimp.so.2"
+#define XIIIMP_LIB "xiiimp.so.2"
#ifdef SOLARIS
#define XIIIMP_PATH "/usr/openwin/lib/locale/common/" XIIIMP_LIB
@@ -168,8 +168,8 @@ XvaGetArgs( va_list pInArgs, XIMArg *pOutArgs )
#ifdef __cplusplus
extern "C"
#endif
-XIM
-XvaOpenIM(Display *display, XrmDatabase rdb,
+XIM
+XvaOpenIM(Display *display, XrmDatabase rdb,
char *res_name, char *res_class, ...)
{
XIM xim = (XIM)0;
@@ -179,7 +179,7 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
/*
* so count the stuff dangling here
*/
-
+
#if defined(SOLARIS) && !defined(__GNUC__)
va_start(variable);
#else
@@ -188,8 +188,8 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
total_count = XvaCountArgs(variable);
va_end(variable);
- if (total_count > 0)
- {
+ if (total_count > 0)
+ {
/* call a new open IM method */
XIMArg* args = (XIMArg*)alloca( (total_count + 1) * sizeof(XIMArg) );
@@ -205,23 +205,23 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
XvaGetArgs( variable, args );
va_end(variable);
- if (!g_dlmodule)
+ if (!g_dlmodule)
{
g_dlmodule = dlopen(XIIIMP_LIB, RTLD_LAZY);
if(!g_dlmodule)
{
g_dlmodule = dlopen(XIIIMP_PATH, RTLD_LAZY);
- if (!g_dlmodule)
+ if (!g_dlmodule)
goto legacy_XIM;
}
g_open_im = (OpenFunction)(long)dlsym(g_dlmodule, "__XOpenIM");
- if (!g_open_im)
+ if (!g_open_im)
goto legacy_XIM;
xim = (*g_open_im)(display, (XrmDatabase)rdb,
(char*)res_name, (char *)res_class, (XIMArg*)args);
- }
- else
+ }
+ else
{
goto legacy_XIM;
}
@@ -229,10 +229,10 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
// in #if to prevent warning "warning: label 'legacy_XIM' defined but not used"
legacy_XIM:
-
+
if (!xim)
xim = XOpenIM(display, rdb, res_name, res_class);
-
+
return xim;
}
@@ -244,8 +244,8 @@ Status XvaCloseIM(XIM)
{
Status s = False;
- if (!g_dlmodule)
- {
+ if (!g_dlmodule)
+ {
/* assuming one XvaOpenIM call */
dlclose(g_dlmodule);
g_dlmodule = (void*)0;
diff --git a/vcl/unx/source/app/i18n_xkb.cxx b/vcl/unx/source/app/i18n_xkb.cxx
index e9a787eda667..fc6bdb6c4bc9 100644
--- a/vcl/unx/source/app/i18n_xkb.cxx
+++ b/vcl/unx/source/app/i18n_xkb.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,8 +49,8 @@ pDisplay
// allow user to set the default keyboard group idx or to disable the usage
// of x keyboard extension at all:
- // setenv SAL_XKEYBOARDGROUP disables keyboard extension
- // setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2
+ // setenv SAL_XKEYBOARDGROUP disables keyboard extension
+ // setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2
// keyboard group index must be in [1,4], may be specified in hex or decimal
static char *pUseKeyboardExtension = getenv( "SAL_XKEYBOARDGROUP" );
if ( pUseKeyboardExtension != NULL )
@@ -149,7 +149,7 @@ SalI18N_KeyboardExtension::LookupKeysymInGroup( sal_uInt32,sal_uInt32,sal_uInt32
nShiftState &= ShiftMask;
- KeySym nKeySymbol;
+ KeySym nKeySymbol;
nKeySymbol = XkbKeycodeToKeysym( mpDisplay, nKeyCode, nGroup, nShiftState );
return nKeySymbol;
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
index c9515f016433..2f483787fbcd 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,16 +38,16 @@
#include <X11/keysym.h>
#if !defined (SunXK_Undo)
-#define SunXK_Undo 0x0000FF65 // XK_Undo
-#define SunXK_Again 0x0000FF66 // XK_Redo
-#define SunXK_Find 0x0000FF68 // XK_Find
-#define SunXK_Stop 0x0000FF69 // XK_Cancel
-#define SunXK_Props 0x1005FF70
-#define SunXK_Front 0x1005FF71
-#define SunXK_Copy 0x1005FF72
-#define SunXK_Open 0x1005FF73
-#define SunXK_Paste 0x1005FF74
-#define SunXK_Cut 0x1005FF75
+#define SunXK_Undo 0x0000FF65 // XK_Undo
+#define SunXK_Again 0x0000FF66 // XK_Redo
+#define SunXK_Find 0x0000FF68 // XK_Find
+#define SunXK_Stop 0x0000FF69 // XK_Cancel
+#define SunXK_Props 0x1005FF70
+#define SunXK_Front 0x1005FF71
+#define SunXK_Copy 0x1005FF72
+#define SunXK_Open 0x1005FF73
+#define SunXK_Paste 0x1005FF74
+#define SunXK_Cut 0x1005FF75
#endif
#ifdef SOLARIS
@@ -68,17 +68,17 @@ namespace vcl_sal {
struct KeysymNameReplacement
{
- KeySym aSymbol;
- const char* pName;
+ KeySym aSymbol;
+ const char* pName;
};
struct KeyboardReplacements
{
- const char* pKeyboardName;
- const KeysymNameReplacement* pReplacements;
- int nReplacements;
+ const char* pKeyboardName;
+ const KeysymNameReplacement* pReplacements;
+ int nReplacements;
};
-
+
// ====================================================================
//
// CAUTION CAUTION CAUTION
@@ -91,7 +91,7 @@ namespace vcl_sal {
{
{ XK_Control_L, "Ctrl" },
{ XK_Control_R, "Ctrl" },
- { XK_Escape, "Esc" },
+ { XK_Escape, "Esc" },
{ XK_space, "Space" },
{ XK_minus, "-" },
{ XK_plus, "+" }
@@ -105,7 +105,7 @@ namespace vcl_sal {
{ XK_Left, "Sol" },
{ XK_Up, "Yukarı" },
{ XK_Down, "Aşağı" },
- { XK_space, "BoÅŸluk" }
+ { XK_space, "BoÅŸluk" }
};
static const struct KeysymNameReplacement aImplReplacements_Russian[] =
@@ -114,7 +114,7 @@ namespace vcl_sal {
{ XK_Left, "Влево" },
{ XK_Up, "Вверх" },
{ XK_Down, "Вниз" },
- { XK_space, "Пробел" }
+ { XK_space, "Пробел" }
};
static const struct KeysymNameReplacement aImplReplacements_German[] =
@@ -448,7 +448,7 @@ namespace vcl_sal {
#ifdef SOLARIS
typedef struct {
- int n_layout;
+ int n_layout;
const char* p_description;
} keyboard_layout;
diff --git a/vcl/unx/source/app/randrwrapper.cxx b/vcl/unx/source/app/randrwrapper.cxx
index 27f9b1d1b77c..7662e470da10 100644
--- a/vcl/unx/source/app/randrwrapper.cxx
+++ b/vcl/unx/source/app/randrwrapper.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@ namespace
class RandRWrapper
{
oslModule m_pRandRLib;
-
+
// function pointers
Bool(*m_pXRRQueryExtension)(Display*,int*,int*);
Status(*m_pXRRQueryVersion)(Display*,int*,int*);
@@ -54,17 +54,17 @@ class RandRWrapper
XRRScreenSize*(*m_pXRRConfigSizes)(XRRScreenConfiguration*,int*);
SizeID(*m_pXRRConfigCurrentConfiguration)(XRRScreenConfiguration*,Rotation*);
int(*m_pXRRRootToScreen)(Display*, XLIB_Window);
-
+
bool m_bValid;
-
+
void initFromModule();
-
+
RandRWrapper(Display*);
~RandRWrapper();
public:
static RandRWrapper& get(Display*);
static void releaseWrapper();
-
+
Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base )
{
Bool bRet = False;
@@ -124,7 +124,7 @@ void RandRWrapper::initFromModule()
m_pXRRConfigSizes = (XRRScreenSize*(*)(XRRScreenConfiguration*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigSizes" );
m_pXRRConfigCurrentConfiguration = (SizeID(*)(XRRScreenConfiguration*,Rotation*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigCurrentConfiguration" );
m_pXRRRootToScreen = (int(*)(Display*,XLIB_Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" );
-
+
m_bValid = m_pXRRQueryExtension &&
m_pXRRQueryVersion &&
m_pXRRGetScreenInfo &&
@@ -200,12 +200,12 @@ void RandRWrapper::releaseWrapper()
class RandRWrapper
{
bool m_bValid;
-
+
RandRWrapper(Display*);
public:
static RandRWrapper& get(Display*);
static void releaseWrapper();
-
+
Bool XRRQueryExtension(Display* i_pDisp, int* o_event_base, int* o_error_base )
{
Bool bRet = False;
@@ -281,7 +281,7 @@ void RandRWrapper::releaseWrapper()
} // namespace
#endif
-
+
#include "saldisp.hxx"
#include "salframe.h"
#if OSL_DEBUG_LEVEL > 1
@@ -305,7 +305,7 @@ void SalDisplay::DeInitRandR()
RandRWrapper::releaseWrapper();
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "SalDisplay::DeInitRandR()\n" );
-#endif
+#endif
#endif
}
@@ -330,18 +330,18 @@ int SalDisplay::processRandREvent( XEvent* pEvent )
int nSizes = 0;
Rotation nRot = 0;
SizeID nId = 0;
-
+
pConfig = pWrapper->XRRGetScreenInfo( GetDisplay(), m_aScreens[i].m_aRoot );
nId = pWrapper->XRRConfigCurrentConfiguration( pConfig, &nRot );
pSizes = pWrapper->XRRConfigSizes( pConfig, &nSizes );
XRRScreenSize *pTargetSize = pSizes + nId;
-
+
bNotify = bNotify ||
m_aScreens[i].m_aSize.Width() != pTargetSize->width ||
m_aScreens[i].m_aSize.Height() != pTargetSize->height;
-
+
m_aScreens[i].m_aSize = Size( pTargetSize->width, pTargetSize->height );
-
+
pWrapper->XRRFreeScreenConfigInfo( pConfig );
#if OSL_DEBUG_LEVEL > 1
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index 50ef71df8619..979a82d22bc1 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -95,7 +95,7 @@
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
static const struct timeval noyield__ = { 0, 0 };
-static const struct timeval yield__ = { 0, 10000 };
+static const struct timeval yield__ = { 0, 10000 };
static const char* XRequest[] = {
// see /usr/lib/X11/XErrorDB, /usr/openwin/lib/XErrorDB ...
@@ -239,7 +239,7 @@ int X11SalData::XErrorHdl( Display *pDisplay, XErrorEvent *pEvent )
}
int X11SalData::XIOErrorHdl( Display * )
-{
+{
/* #106197# hack: until a real shutdown procedure exists
* _exit ASAP
*/
@@ -268,14 +268,14 @@ int X11SalData::XIOErrorHdl( Display * )
X11SalData::X11SalData()
{
- bNoExceptions_ = !!getenv( "SAL_NOSEGV" );
+ bNoExceptions_ = !!getenv( "SAL_NOSEGV" );
- pXLib_ = NULL;
- m_pSalDisplay = NULL;
- m_pInstance = NULL;
- m_pPlugin = NULL;
+ pXLib_ = NULL;
+ m_pSalDisplay = NULL;
+ m_pInstance = NULL;
+ m_pPlugin = NULL;
- hMainThread_ = pthread_self();
+ hMainThread_ = pthread_self();
osl_getLocalHostname( &maLocalHostName.pData );
}
@@ -287,9 +287,9 @@ X11SalData::~X11SalData()
void X11SalData::DeleteDisplay()
{
delete m_pSalDisplay;
- m_pSalDisplay = NULL;
+ m_pSalDisplay = NULL;
delete pXLib_;
- pXLib_ = NULL;
+ pXLib_ = NULL;
}
void X11SalData::Init()
@@ -310,11 +310,11 @@ void X11SalData::deInitNWF( void )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SalXLib::SalXLib()
{
- m_aTimeout.tv_sec = 0;
- m_aTimeout.tv_usec = 0;
- m_nTimeoutMS = 0;
+ m_aTimeout.tv_sec = 0;
+ m_aTimeout.tv_usec = 0;
+ m_nTimeoutMS = 0;
- nFDs_ = 0;
+ nFDs_ = 0;
FD_ZERO( &aReadFDS_ );
FD_ZERO( &aExceptionFDS_ );
@@ -353,8 +353,8 @@ SalXLib::SalXLib()
nFDs_ = m_pTimeoutFDS[0] + 1;
}
- m_bHaveSystemChildFrames = false;
- m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
+ m_bHaveSystemChildFrames = false;
+ m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
}
@@ -363,7 +363,7 @@ SalXLib::~SalXLib()
// close 'wakeup' pipe.
close (m_pTimeoutFDS[0]);
close (m_pTimeoutFDS[1]);
-
+
PopXErrorLevel();
XSetIOErrorHandler (m_aOrigXIOErrorHandler);
}
@@ -400,7 +400,7 @@ void SalXLib::Init()
* o $DISPLAY environment variable
* o default display
*/
-
+
Display *pDisp = NULL;
// is there a -display command line parameter?
@@ -408,7 +408,7 @@ void SalXLib::Init()
sal_uInt32 nParams = aCommandLine.getCommandArgCount();
rtl::OUString aParam;
rtl::OString aDisplay;
- for (USHORT i=0; i<nParams; i++)
+ for (USHORT i=0; i<nParams; i++)
{
aCommandLine.getCommandArg(i, aParam);
if (aParam.equalsAscii("-display"))
@@ -421,8 +421,8 @@ void SalXLib::Init()
{
/*
* if a -display switch was used, we need
- * to set the environment accoringly since
- * the clipboard build another connection
+ * to set the environment accoringly since
+ * the clipboard build another connection
* to the xserver using $DISPLAY
*/
const char envpre[] = "DISPLAY=";
@@ -434,7 +434,7 @@ void SalXLib::Init()
}
}
- if (!pDisp && !aDisplay.getLength())
+ if (!pDisp && !aDisplay.getLength())
{
// Open $DISPLAY or default...
char *pDisplay = getenv("DISPLAY");
@@ -453,9 +453,9 @@ void SalXLib::Init()
aProgramSystemPath,
osl_getThreadTextEncoding() );
std::fprintf( stderr, "%s X11 error: Can't open display: %s\n",
- aProgramName.getStr(), aDisplay.getStr());
- std::fprintf( stderr, " Set DISPLAY environment variable, use -display option\n");
- std::fprintf( stderr, " or check permissions of your X-Server\n");
+ aProgramName.getStr(), aDisplay.getStr());
+ std::fprintf( stderr, " Set DISPLAY environment variable, use -display option\n");
+ std::fprintf( stderr, " or check permissions of your X-Server\n");
std::fprintf( stderr, " (See \"man X\" resp. \"man xhost\" for details)\n");
std::fflush( stderr );
exit(0);
@@ -523,7 +523,7 @@ static void PrintXError( Display *pDisplay, XErrorEvent *pEvent )
std::fprintf( stderr, "These errors are reported asynchronously,\n");
std::fprintf( stderr, "set environment variable SAL_SYNCHRONIZE to 1 to help debugging\n");
}
-
+
std::fflush( stdout );
std::fflush( stderr );
}
@@ -567,13 +567,13 @@ void SalXLib::XError( Display *pDisplay, XErrorEvent *pEvent )
oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
switch (eToDo)
{
- case osl_Signal_ActIgnore :
+ case osl_Signal_ActIgnore :
return;
- case osl_Signal_ActAbortApp :
+ case osl_Signal_ActAbortApp :
abort();
- case osl_Signal_ActKillApp :
+ case osl_Signal_ActKillApp :
exit(0);
- case osl_Signal_ActCallNextHdl :
+ case osl_Signal_ActCallNextHdl :
break;
default :
break;
@@ -586,16 +586,16 @@ void SalXLib::XError( Display *pDisplay, XErrorEvent *pEvent )
struct YieldEntry
{
- YieldEntry* next; // pointer to next entry
- int fd; // file descriptor for reading
- void* data; // data for predicate and callback
- YieldFunc pending; // predicate (determins pending events)
- YieldFunc queued; // read and queue up events
- YieldFunc handle; // handle pending events
-
- inline int HasPendingEvent() const { return pending( fd, data ); }
- inline int IsEventQueued() const { return queued( fd, data ); }
- inline void HandleNextEvent() const { handle( fd, data ); }
+ YieldEntry* next; // pointer to next entry
+ int fd; // file descriptor for reading
+ void* data; // data for predicate and callback
+ YieldFunc pending; // predicate (determins pending events)
+ YieldFunc queued; // read and queue up events
+ YieldFunc handle; // handle pending events
+
+ inline int HasPendingEvent() const { return pending( fd, data ); }
+ inline int IsEventQueued() const { return queued( fd, data ); }
+ inline void HandleNextEvent() const { handle( fd, data ); }
};
#define MAX_NUM_DESCRIPTORS 128
@@ -603,18 +603,18 @@ struct YieldEntry
static YieldEntry yieldTable[ MAX_NUM_DESCRIPTORS ];
void SalXLib::Insert( int nFD, void* data,
- YieldFunc pending,
- YieldFunc queued,
- YieldFunc handle )
+ YieldFunc pending,
+ YieldFunc queued,
+ YieldFunc handle )
{
DBG_ASSERT( nFD, "can not insert stdin descriptor" );
DBG_ASSERT( !yieldTable[nFD].fd, "SalXLib::Insert fd twice" );
- yieldTable[nFD].fd = nFD;
- yieldTable[nFD].data = data;
+ yieldTable[nFD].fd = nFD;
+ yieldTable[nFD].data = data;
yieldTable[nFD].pending = pending;
- yieldTable[nFD].queued = queued;
- yieldTable[nFD].handle = handle;
+ yieldTable[nFD].queued = queued;
+ yieldTable[nFD].handle = handle;
FD_SET( nFD, &aReadFDS_ );
FD_SET( nFD, &aExceptionFDS_ );
@@ -689,7 +689,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// #63862# da jetzt alle user-events ueber die interne
// queue kommen, wird die Kontrolle analog zum select
// gesteuerten Zweig einmal bei bWait abgegeben
-
+
/* #i9277# do not reschedule since performance gets down the
the drain under heavy load
YieldMutexReleaser aReleaser;
@@ -866,6 +866,6 @@ rtl::OString X11SalData::getFrameResName( SalExtStyle nStyle )
aBuf.append( getFrameResName() );
if( (nStyle & SAL_FRAME_EXT_STYLE_DOCUMENT) )
aBuf.append( ".DocumentWindow" );
-
+
return aBuf.makeStringAndClear();
}
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 13a0d1093c8e..8e4263d9ffa8 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -297,26 +297,26 @@ sal_IsLocalDisplay( Display *pDisplay )
return sal_IsDisplayNumber( pDisplayString + 1 );
// check for fixed token which all mean localhost:x.y
- const char pLocal[] = "localhost:";
- const int nLocalLen = sizeof(pLocal) - 1;
+ const char pLocal[] = "localhost:";
+ const int nLocalLen = sizeof(pLocal) - 1;
if ( strncmp(pDisplayString, pLocal, nLocalLen) == 0 )
return sal_IsDisplayNumber( pDisplayString + nLocalLen );
- const char pUnix[] = "unix:";
- const int nUnixLen = sizeof(pUnix) - 1;
- if ( strncmp(pDisplayString, pUnix, nUnixLen) == 0 )
+ const char pUnix[] = "unix:";
+ const int nUnixLen = sizeof(pUnix) - 1;
+ if ( strncmp(pDisplayString, pUnix, nUnixLen) == 0 )
return sal_IsDisplayNumber( pDisplayString + nUnixLen );
const char pLoopback[] = "127.0.0.1:";
const int nLoopbackLen= sizeof(pLoopback) - 1;
- if ( strncmp(pDisplayString, pLoopback, nLoopbackLen) == 0 )
+ if ( strncmp(pDisplayString, pLoopback, nLoopbackLen) == 0 )
return sal_IsDisplayNumber( pDisplayString + nLoopbackLen );
// compare local hostname to displaystring, both may be ip address or
// hostname
BOOL bEqual = FALSE;
- char *pDisplayHost = strdup( pDisplayString );
- char *pPtr = strrchr( pDisplayHost, ':' );
+ char *pDisplayHost = strdup( pDisplayString );
+ char *pPtr = strrchr( pDisplayHost, ':' );
if( pPtr != NULL )
{
@@ -354,25 +354,25 @@ extern "C" srv_vendor_t
sal_GetServerVendor( Display *p_display )
{
typedef struct {
- srv_vendor_t e_vendor; // vendor as enum
- const char *p_name; // vendor name as returned by VendorString()
- unsigned int n_len; // number of chars to compare
+ srv_vendor_t e_vendor; // vendor as enum
+ const char *p_name; // vendor name as returned by VendorString()
+ unsigned int n_len; // number of chars to compare
} vendor_t;
const vendor_t p_vendorlist[] = {
- { vendor_xfree, "The XFree86 Project, Inc", 13 },
- { vendor_sun, "Sun Microsystems, Inc.", 10 },
- { vendor_attachmate, "Attachmate Corporation", 10 },
+ { vendor_xfree, "The XFree86 Project, Inc", 13 },
+ { vendor_sun, "Sun Microsystems, Inc.", 10 },
+ { vendor_attachmate, "Attachmate Corporation", 10 },
{ vendor_excursion,
"DECWINDOWS DigitalEquipmentCorporation, eXcursion", 42 },
- { vendor_hp, "Hewlett-Packard Company", 17 },
+ { vendor_hp, "Hewlett-Packard Company", 17 },
{ vendor_hummingbird, "Hummingbird Communications Ltd.", 11 },
{ vendor_ibm, "International Business Machines", 24 },
{ vendor_sgi, "Silicon Graphics", 9 },
- { vendor_sco, "The Santa Cruz Operation", 16 },
- { vendor_xinside, "X Inside Inc.", 10 },
+ { vendor_sco, "The Santa Cruz Operation", 16 },
+ { vendor_xinside, "X Inside Inc.", 10 },
// allways the last entry: vendor_none to indicate eol
- { vendor_none, NULL, 0 },
+ { vendor_none, NULL, 0 },
};
#ifdef _USE_PRINT_EXTENSION_
@@ -614,7 +614,7 @@ fd
if( ! pDisplay->IsDisplay() )
return 0;
- vos::IMutex* pSalInstYieldMutex =
+ vos::IMutex* pSalInstYieldMutex =
GetSalData()->m_pInstance->GetYieldMutex();
::vos::OGuard aGuard( *pSalInstYieldMutex );
return pDisplay->IsEvent();
@@ -627,7 +627,7 @@ fd
{
DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
"wrong fd in DisplayHasEvent" );
- vos::IMutex* pSalInstYieldMutex =
+ vos::IMutex* pSalInstYieldMutex =
GetSalData()->m_pInstance->GetYieldMutex();
::vos::OGuard aGuard( *pSalInstYieldMutex );
return XEventsQueued( pDisplay->GetDisplay(),
@@ -641,7 +641,7 @@ fd
{
DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
"wrong fd in DisplayHasEvent" );
- vos::IMutex* pSalInstYieldMutex =
+ vos::IMutex* pSalInstYieldMutex =
GetSalData()->m_pInstance->GetYieldMutex();
::vos::OGuard aGuard( *pSalInstYieldMutex );
pDisplay->Yield();
@@ -683,8 +683,8 @@ void SalDisplay::initScreen( int nScreen ) const
rSD.m_bInit = true;
XVisualInfo aVI;
- Colormap aColMap;
-
+ Colormap aColMap;
+
if( SalDisplay::BestVisual( pDisp_, nScreen, aVI ) ) // DefaultVisual
aColMap = DefaultColormap( pDisp_, nScreen );
else
@@ -699,7 +699,7 @@ void SalDisplay::initScreen( int nScreen ) const
rSD.m_aRoot = RootWindow( pDisp_, nScreen );
rSD.m_aVisual = SalVisual( &aVI );
rSD.m_aColormap = SalColormap( this, aColMap, nScreen );
-
+
// we're interested in configure notification of root windows
InitRandR( rSD.m_aRoot );
@@ -742,9 +742,9 @@ void SalDisplay::initScreen( int nScreen ) const
XGCValues values;
values.graphics_exposures = False;
values.fill_style = FillOpaqueStippled;
- values.background = (1<<rSD.m_aVisual.GetDepth())-1;
- values.foreground = 0;
-
+ values.background = (1<<rSD.m_aVisual.GetDepth())-1;
+ values.foreground = 0;
+
rSD.m_aCopyGC = XCreateGC( pDisp_,
rSD.m_aRefWindow,
GCGraphicsExposures
@@ -776,13 +776,13 @@ void SalDisplay::initScreen( int nScreen ) const
| GCForeground
| GCBackground,
&values );
-
+
XSetFunction( pDisp_, rSD.m_aAndInvertedGC, GXandInverted );
XSetFunction( pDisp_, rSD.m_aAndGC, GXand );
// #44556# PowerPC Solaris 2.5 (XSun 3500) Bug: GXor = GXnop
//XSetFunction( pDisp_, pOrGC_, GXor );
XSetFunction( pDisp_, rSD.m_aOrGC, GXxor );
-
+
if( 1 == rSD.m_aVisual.GetDepth() )
{
XSetFunction( pDisp_, rSD.m_aCopyGC, GXcopyInverted );
@@ -815,11 +815,11 @@ void SalDisplay::Init()
nProperties_ = PROPERTY_DEFAULT;
hEventGuard_ = NULL;
m_pFontCache = NULL;
- mpFontList = (XlfdStorage*)NULL;
- mpFactory = (AttributeProvider*)NULL;
- m_pCapture = NULL;
- m_bXinerama = false;
-
+ mpFontList = (XlfdStorage*)NULL;
+ mpFactory = (AttributeProvider*)NULL;
+ m_pCapture = NULL;
+ m_bXinerama = false;
+
int nDisplayScreens = ScreenCount( pDisp_ );
m_aScreens = std::vector<ScreenData>(nDisplayScreens);
@@ -855,9 +855,9 @@ void SalDisplay::Init()
X11SalBitmap::ImplCreateCache();
hEventGuard_ = osl_createMutex();
- bLocal_ = FALSE; /* dont care, initialize later by
+ bLocal_ = FALSE; /* dont care, initialize later by
calling SalDisplay::IsLocal() */
- mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */
+ mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */
// - - - - - - - - - - Synchronize - - - - - - - - - - - - -
if( getenv( "SAL_SYNCHRONIZE" ) )
@@ -1040,7 +1040,7 @@ void SalDisplay::Beep() const
String SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const
{
String aRet;
-
+
// return an empty string for keysyms that are not bound to
// any key code
XLIB_KeyCode aKeyCode = XKeysymToKeycode( GetDisplay(), nKeySym );
@@ -1084,7 +1084,7 @@ void SalDisplay::ModifierMapping()
nMod1KeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, Mod1MapIndex );
// Auf Sun-Servern und SCO-Severn beruecksichtigt XLookupString
// nicht den NumLock Modifier.
- if( (GetServerVendor() == vendor_sun)
+ if( (GetServerVendor() == vendor_sun)
|| (GetServerVendor() == vendor_sco) )
{
XLIB_KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock );
@@ -1184,13 +1184,13 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
break;
#if !defined (SunXK_Undo)
- #define SunXK_Stop 0x0000FF69 // XK_Cancel
- #define SunXK_Props 0x1005FF70
- #define SunXK_Front 0x1005FF71
- #define SunXK_Copy 0x1005FF72
- #define SunXK_Open 0x1005FF73
- #define SunXK_Paste 0x1005FF74
- #define SunXK_Cut 0x1005FF75
+ #define SunXK_Stop 0x0000FF69 // XK_Cancel
+ #define SunXK_Props 0x1005FF70
+ #define SunXK_Front 0x1005FF71
+ #define SunXK_Copy 0x1005FF72
+ #define SunXK_Open 0x1005FF73
+ #define SunXK_Paste 0x1005FF74
+ #define SunXK_Cut 0x1005FF75
#endif
case KEY_REPEAT:
@@ -1676,8 +1676,8 @@ KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent,
unsigned char *pPrintable,
int *pLen,
KeySym *pUnmodifiedKeySym,
- Status *pStatusReturn,
- XIC aInputContext ) const
+ Status *pStatusReturn,
+ XIC aInputContext ) const
{
KeySym nKeySym = 0;
memset( pPrintable, 0, *pLen );
@@ -2228,9 +2228,9 @@ bool SalDisplay::DispatchInternalEvent()
{
if( m_aUserEvents.begin() != m_aUserEvents.end() )
{
- pFrame = m_aUserEvents.front().m_pFrame;
- pData = m_aUserEvents.front().m_pData;
- nEvent = m_aUserEvents.front().m_nEvent;
+ pFrame = m_aUserEvents.front().m_pFrame;
+ pData = m_aUserEvents.front().m_pData;
+ nEvent = m_aUserEvents.front().m_nEvent;
m_aUserEvents.pop_front();
}
@@ -2373,7 +2373,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
return pFrame->Dispatch( pEvent );
}
}
-
+
// dispatch to salobjects
X11SalObject::Dispatch( pEvent );
@@ -2787,9 +2787,9 @@ SalVisual::SalVisual( const XVisualInfo* pXVI )
nGreenShift_ = sal_Shift( green_mask );
nBlueShift_ = sal_Shift( blue_mask );
- nRedBits_ = sal_significantBits( red_mask );
- nGreenBits_ = sal_significantBits( green_mask );
- nBlueBits_ = sal_significantBits( blue_mask );
+ nRedBits_ = sal_significantBits( red_mask );
+ nGreenBits_ = sal_significantBits( green_mask );
+ nBlueBits_ = sal_significantBits( blue_mask );
if( GetDepth() == 24 )
if( red_mask == 0xFF0000 )
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index 8a8db44cefcd..dc32dd28fd88 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,8 +58,8 @@
SalYieldMutex::SalYieldMutex()
{
- mnCount = 0;
- mnThreadId = 0;
+ mnCount = 0;
+ mnThreadId = 0;
::tools::SolarMutex::SetSolarMutex( this );
}
@@ -112,7 +112,7 @@ extern "C"
*/
if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
XInitThreads();
-
+
X11SalInstance* pInstance = new X11SalInstance( new SalYieldMutex() );
// initialize SalData
@@ -149,8 +149,8 @@ X11SalInstance::~X11SalInstance()
struct PredicateReturn
{
- USHORT nType;
- BOOL bRet;
+ USHORT nType;
+ BOOL bRet;
};
extern "C" {
@@ -207,10 +207,10 @@ bool X11SalInstance::AnyInput(USHORT nType)
else if (XPending(pDisplay) )
{
PredicateReturn aInput;
- XEvent aEvent;
+ XEvent aEvent;
- aInput.bRet = FALSE;
- aInput.nType = nType;
+ aInput.bRet = FALSE;
+ aInput.nType = nType;
XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent,
(char *)&aInput );
@@ -265,8 +265,8 @@ void X11SalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
{
static const char* pDisplay = getenv( "DISPLAY" );
- rReturnedType = AsciiCString;
- rReturnedBytes = pDisplay ? strlen( pDisplay )+1 : 1;
+ rReturnedType = AsciiCString;
+ rReturnedBytes = pDisplay ? strlen( pDisplay )+1 : 1;
return pDisplay ? (void*)pDisplay : (void*)"";
}
@@ -342,14 +342,14 @@ static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths )
void X11SalInstance::FillFontPathList( std::list< rtl::OString >& o_rFontPaths )
{
Display *pDisplay = GetX11SalData()->GetDisplay()->GetDisplay();
-
+
DBG_ASSERT( pDisplay, "No Display !" );
if( pDisplay )
{
// get font paths to look for fonts
int nPaths = 0, i;
char** pPaths = XGetFontPath( pDisplay, &nPaths );
-
+
bool bServerDirs = false;
for( i = 0; i < nPaths; i++ )
{
@@ -368,33 +368,33 @@ void X11SalInstance::FillFontPathList( std::list< rtl::OString >& o_rFontPaths )
o_rFontPaths.push_back( aPath );
}
}
-
+
if( nPaths )
XFreeFontPath( pPaths );
}
-
+
// insert some standard directories
o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/TrueType" );
o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1" );
o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1/sun" );
o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/truetype" );
o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/Type1" );
-
+
#ifdef SOLARIS
/* cde specials, from /usr/dt/bin/Xsession: here are the good fonts,
the OWfontpath file may contain as well multiple lines as a comma
separated list of fonts in each line. to make it even more weird
environment variables are allowed as well */
-
+
const char* lang = getenv("LANG");
if ( lang != NULL )
{
String aOpenWinDir( String::CreateFromAscii( "/usr/openwin/lib/locale/" ) );
aOpenWinDir.AppendAscii( lang );
aOpenWinDir.AppendAscii( "/OWfontpath" );
-
+
SvFileStream aStream( aOpenWinDir, STREAM_READ );
-
+
// TODO: replace environment variables
while( aStream.IsOpen() && ! aStream.IsEof() )
{
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
index 1ccb214df4ed..82bf2ecc4a78 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -89,7 +89,7 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( nScreen );
aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize );
}
-
+
return aRet;
}
@@ -159,7 +159,7 @@ int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage
nButton++;
}
aWarn.SetFocusButton( (USHORT)nDefButton+1 );
-
+
nRet = ((int)aWarn.Execute()) - 1;
// normalize behaviour, actually this should never happen
diff --git a/vcl/unx/source/app/saltimer.cxx b/vcl/unx/source/app/saltimer.cxx
index 431470935d9e..72cda70b4bc1 100644
--- a/vcl/unx/source/app/saltimer.cxx
+++ b/vcl/unx/source/app/saltimer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,9 +53,9 @@ void X11SalData::Timeout() const
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void SalXLib::StopTimer()
{
- m_aTimeout.tv_sec = 0;
- m_aTimeout.tv_usec = 0;
- m_nTimeoutMS = 0;
+ m_aTimeout.tv_sec = 0;
+ m_aTimeout.tv_usec = 0;
+ m_nTimeoutMS = 0;
}
void SalXLib::StartTimer( ULONG nMS )
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx
index 959d6af5912d..898452d52134 100644
--- a/vcl/unx/source/app/sm.cxx
+++ b/vcl/unx/source/app/sm.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -139,7 +139,7 @@ void IceSalSession::handleOldX11SaveYourself( SalFrame* pFrame )
if( pOneInstance )
{
SalSessionSaveRequestEvent aEvent( true, false );
- pOneInstance->CallCallback( &aEvent );
+ pOneInstance->CallCallback( &aEvent );
}
}
}
@@ -173,15 +173,15 @@ public:
};
-SmcConn SessionManagerClient::aSmcConnection = NULL;
-ByteString SessionManagerClient::aClientID;
-BOOL ICEConnectionObserver::bIsWatching = FALSE;
-struct pollfd* ICEConnectionObserver::pFilehandles = NULL;
-IceConn* ICEConnectionObserver::pConnections = NULL;
-int ICEConnectionObserver::nConnections = 0;
-oslMutex ICEConnectionObserver::ICEMutex = NULL;
-oslThread ICEConnectionObserver::ICEThread = NULL;
-int ICEConnectionObserver::nWakeupFiles[2] = { 0, 0 };
+SmcConn SessionManagerClient::aSmcConnection = NULL;
+ByteString SessionManagerClient::aClientID;
+BOOL ICEConnectionObserver::bIsWatching = FALSE;
+struct pollfd* ICEConnectionObserver::pFilehandles = NULL;
+IceConn* ICEConnectionObserver::pConnections = NULL;
+int ICEConnectionObserver::nConnections = 0;
+oslMutex ICEConnectionObserver::ICEMutex = NULL;
+oslThread ICEConnectionObserver::ICEThread = NULL;
+int ICEConnectionObserver::nWakeupFiles[2] = { 0, 0 };
#ifdef USE_SM_EXTENSION
IceIOErrorHandler ICEConnectionObserver::origIOErrorHandler = NULL;
@@ -200,9 +200,9 @@ static void IgnoreIceIOErrors(IceConn)
bool SessionManagerClient::bDocSaveDone = false;
-static SmProp* pSmProps = NULL;
-static SmProp** ppSmProps = NULL;
-static int nSmProps = 0;
+static SmProp* pSmProps = NULL;
+static SmProp** ppSmProps = NULL;
+static int nSmProps = 0;
static unsigned char *pSmRestartHint = NULL;
@@ -215,33 +215,33 @@ static void BuildSmPropertyList()
nSmProps = 5;
pSmProps = new SmProp[ nSmProps ];
- pSmProps[ 0 ].name = const_cast<char*>(SmCloneCommand);
- pSmProps[ 0 ].type = const_cast<char*>(SmLISTofARRAY8);
- pSmProps[ 0 ].num_vals = 1;
- pSmProps[ 0 ].vals = new SmPropValue;
- pSmProps[ 0 ].vals->length = aExec.Len()+1;
- pSmProps[ 0 ].vals->value = strdup( aExec.GetBuffer() );
-
- pSmProps[ 1 ].name = const_cast<char*>(SmProgram);
- pSmProps[ 1 ].type = const_cast<char*>(SmARRAY8);
- pSmProps[ 1 ].num_vals = 1;
- pSmProps[ 1 ].vals = new SmPropValue;
- pSmProps[ 1 ].vals->length = aExec.Len()+1;
- pSmProps[ 1 ].vals->value = strdup( aExec.GetBuffer() );
-
- pSmProps[ 2 ].name = const_cast<char*>(SmRestartCommand);
- pSmProps[ 2 ].type = const_cast<char*>(SmLISTofARRAY8);
- pSmProps[ 2 ].num_vals = 3;
- pSmProps[ 2 ].vals = new SmPropValue[3];
- pSmProps[ 2 ].vals[0].length = aExec.Len()+1;
- pSmProps[ 2 ].vals[0].value = strdup( aExec.GetBuffer() );
+ pSmProps[ 0 ].name = const_cast<char*>(SmCloneCommand);
+ pSmProps[ 0 ].type = const_cast<char*>(SmLISTofARRAY8);
+ pSmProps[ 0 ].num_vals = 1;
+ pSmProps[ 0 ].vals = new SmPropValue;
+ pSmProps[ 0 ].vals->length = aExec.Len()+1;
+ pSmProps[ 0 ].vals->value = strdup( aExec.GetBuffer() );
+
+ pSmProps[ 1 ].name = const_cast<char*>(SmProgram);
+ pSmProps[ 1 ].type = const_cast<char*>(SmARRAY8);
+ pSmProps[ 1 ].num_vals = 1;
+ pSmProps[ 1 ].vals = new SmPropValue;
+ pSmProps[ 1 ].vals->length = aExec.Len()+1;
+ pSmProps[ 1 ].vals->value = strdup( aExec.GetBuffer() );
+
+ pSmProps[ 2 ].name = const_cast<char*>(SmRestartCommand);
+ pSmProps[ 2 ].type = const_cast<char*>(SmLISTofARRAY8);
+ pSmProps[ 2 ].num_vals = 3;
+ pSmProps[ 2 ].vals = new SmPropValue[3];
+ pSmProps[ 2 ].vals[0].length = aExec.Len()+1;
+ pSmProps[ 2 ].vals[0].value = strdup( aExec.GetBuffer() );
ByteString aRestartOption( "-session=" );
aRestartOption.Append( SessionManagerClient::getSessionID() );
- pSmProps[ 2 ].vals[1].length = aRestartOption.Len()+1;
- pSmProps[ 2 ].vals[1].value = strdup( aRestartOption.GetBuffer() );
+ pSmProps[ 2 ].vals[1].length = aRestartOption.Len()+1;
+ pSmProps[ 2 ].vals[1].value = strdup( aRestartOption.GetBuffer() );
ByteString aRestartOptionNoLogo( "-nologo" );
- pSmProps[ 2 ].vals[2].length = aRestartOptionNoLogo.Len()+1;
- pSmProps[ 2 ].vals[2].value = strdup( aRestartOptionNoLogo.GetBuffer() );
+ pSmProps[ 2 ].vals[2].length = aRestartOptionNoLogo.Len()+1;
+ pSmProps[ 2 ].vals[2].value = strdup( aRestartOptionNoLogo.GetBuffer() );
rtl::OUString aUserName;
rtl::OString aUser;
@@ -253,21 +253,21 @@ static void BuildSmPropertyList()
osl_freeSecurityHandle( aSec );
}
- pSmProps[ 3 ].name = const_cast<char*>(SmUserID);
- pSmProps[ 3 ].type = const_cast<char*>(SmARRAY8);
- pSmProps[ 3 ].num_vals = 1;
- pSmProps[ 3 ].vals = new SmPropValue;
- pSmProps[ 3 ].vals->value = strdup( aUser.getStr() );
- pSmProps[ 3 ].vals->length = strlen( (char *)pSmProps[ 3 ].vals->value )+1;
-
- pSmProps[ 4 ].name = const_cast<char*>(SmRestartStyleHint);
- pSmProps[ 4 ].type = const_cast<char*>(SmCARD8);
- pSmProps[ 4 ].num_vals = 1;
- pSmProps[ 4 ].vals = new SmPropValue;
- pSmProps[ 4 ].vals->value = malloc(1);
+ pSmProps[ 3 ].name = const_cast<char*>(SmUserID);
+ pSmProps[ 3 ].type = const_cast<char*>(SmARRAY8);
+ pSmProps[ 3 ].num_vals = 1;
+ pSmProps[ 3 ].vals = new SmPropValue;
+ pSmProps[ 3 ].vals->value = strdup( aUser.getStr() );
+ pSmProps[ 3 ].vals->length = strlen( (char *)pSmProps[ 3 ].vals->value )+1;
+
+ pSmProps[ 4 ].name = const_cast<char*>(SmRestartStyleHint);
+ pSmProps[ 4 ].type = const_cast<char*>(SmCARD8);
+ pSmProps[ 4 ].num_vals = 1;
+ pSmProps[ 4 ].vals = new SmPropValue;
+ pSmProps[ 4 ].vals->value = malloc(1);
pSmRestartHint = (unsigned char *)pSmProps[ 4 ].vals->value;
*pSmRestartHint = SmRestartIfRunning;
- pSmProps[ 4 ].vals->length = 1;
+ pSmProps[ 4 ].vals->length = 1;
ppSmProps = new SmProp*[ nSmProps ];
for( int i = 0; i < nSmProps; i++ )
@@ -291,8 +291,8 @@ IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
/*
If we have no actual frames open, e.g. we launched a quickstarter,
and then shutdown all our frames leaving just a quickstarter running,
- then we don't want to launch an empty toplevel frame on the next
- start. (The job of scheduling the restart of the quick-starter is a
+ then we don't want to launch an empty toplevel frame on the next
+ start. (The job of scheduling the restart of the quick-starter is a
task of the quick-starter)
*/
*pSmRestartHint = SmRestartNever;
@@ -311,7 +311,7 @@ IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
if( pOneInstance )
{
SalSessionSaveRequestEvent aEvent( pThis != 0, false );
- pOneInstance->CallCallback( &aEvent );
+ pOneInstance->CallCallback( &aEvent );
}
else
saveDone();
@@ -327,7 +327,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, InteractionHdl, void*, EMPTYA
SalSessionInteractionEvent aEvent( true );
pOneInstance->CallCallback( &aEvent );
}
-
+
return 0;
}
@@ -339,7 +339,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownCancelHdl, void*, EMP
SalSessionShutdownCancelEvent aEvent;
pOneInstance->CallCallback( &aEvent );
}
-
+
return 0;
}
@@ -464,22 +464,22 @@ void SessionManagerClient::open()
char* pClientID = NULL;
const ByteString& rPrevId( getPreviousSessionID() );
- aCallbacks.save_yourself.callback = SaveYourselfProc;
- aCallbacks.save_yourself.client_data = NULL;
- aCallbacks.die.callback = DieProc;
- aCallbacks.die.client_data = NULL;
- aCallbacks.save_complete.callback = SaveCompleteProc;
- aCallbacks.save_complete.client_data = NULL;
- aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc;
- aCallbacks.shutdown_cancelled.client_data = NULL;
+ aCallbacks.save_yourself.callback = SaveYourselfProc;
+ aCallbacks.save_yourself.client_data = NULL;
+ aCallbacks.die.callback = DieProc;
+ aCallbacks.die.client_data = NULL;
+ aCallbacks.save_complete.callback = SaveCompleteProc;
+ aCallbacks.save_complete.client_data = NULL;
+ aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc;
+ aCallbacks.shutdown_cancelled.client_data = NULL;
aSmcConnection = SmcOpenConnection( NULL,
NULL,
SmProtoMajor,
SmProtoMinor,
- SmcSaveYourselfProcMask |
- SmcDieProcMask |
- SmcSaveCompleteProcMask |
- SmcShutdownCancelledProcMask ,
+ SmcSaveYourselfProcMask |
+ SmcDieProcMask |
+ SmcSaveCompleteProcMask |
+ SmcShutdownCancelledProcMask ,
&aCallbacks,
rPrevId.Len() ? const_cast<char*>(rPrevId.GetBuffer()) : NULL,
&pClientID,
@@ -563,7 +563,7 @@ String SessionManagerClient::getExecName()
rtl::OUString aExec, aSysExec;
osl_getExecutableFile( &aExec.pData );
osl_getSystemPathFromFileURL( aExec.pData, &aSysExec.pData );
-
+
int nPos = aSysExec.indexOf( rtl::OUString::createFromAscii( ".bin" ) );
if( nPos != -1 )
aSysExec = aSysExec.copy( 0, nPos );
@@ -724,16 +724,16 @@ void ICEConnectionObserver::ICEWatchProc(
nConnections++;
pConnections = (IceConn*)rtl_reallocateMemory( pConnections, sizeof( IceConn )*nConnections );
pFilehandles = (struct pollfd*)rtl_reallocateMemory( pFilehandles, sizeof( struct pollfd )*(nConnections+1) );
- pConnections[ nConnections-1 ] = connection;
- pFilehandles[ nConnections ].fd = fd;
- pFilehandles[ nConnections ].events = POLLIN;
+ pConnections[ nConnections-1 ] = connection;
+ pFilehandles[ nConnections ].fd = fd;
+ pFilehandles[ nConnections ].events = POLLIN;
if( nConnections == 1 )
{
if( ! pipe( nWakeupFiles ) )
{
int flags;
- pFilehandles[0].fd = nWakeupFiles[0];
- pFilehandles[0].events = POLLIN;
+ pFilehandles[0].fd = nWakeupFiles[0];
+ pFilehandles[0].events = POLLIN;
// set close-on-exec and nonblock descriptor flag.
if ((flags = fcntl (nWakeupFiles[0], F_GETFD)) != -1)
{
diff --git a/vcl/unx/source/app/soicon.cxx b/vcl/unx/source/app/soicon.cxx
index 2bf9e55731d1..cadab6554d49 100644
--- a/vcl/unx/source/app/soicon.cxx
+++ b/vcl/unx/source/app/soicon.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
{
if( ! ImplGetResMgr() )
return FALSE;
-
+
USHORT nIconSizeOffset;
if( iconSize >= 48 )
@@ -70,7 +70,7 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
aRect.mnDestX = 0; aRect.mnDestY = 0;
aRect.mnDestWidth = iconSize; aRect.mnDestHeight = iconSize;
- X11SalBitmap *pBitmap = static_cast < X11SalBitmap * >
+ X11SalBitmap *pBitmap = static_cast < X11SalBitmap * >
(aIcon.ImplGetBitmapImpBitmap()->ImplGetSalBitmap());
icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(),
@@ -89,7 +89,7 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
if( TRANSPARENT_BITMAP == aIcon.GetTransparentType() )
{
- icon_mask = XCreatePixmap( pDisplay->GetDisplay(),
+ icon_mask = XCreatePixmap( pDisplay->GetDisplay(),
pDisplay->GetRootWindow( pDisplay->GetDefaultScreenNumber() ),
iconSize, iconSize, 1);
@@ -103,13 +103,13 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
Bitmap aMask = aIcon.GetMask();
aMask.Invert();
- X11SalBitmap *pMask = static_cast < X11SalBitmap * >
+ X11SalBitmap *pMask = static_cast < X11SalBitmap * >
(aMask.ImplGetImpBitmap()->ImplGetSalBitmap());
pMask->ImplDraw(icon_mask, nScreen, 1, aRect, aMonoGC);
XFreeGC( pDisplay->GetDisplay(), aMonoGC );
}
-
+
return TRUE;
}
diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx
index 1a116fcbe8d6..70802cc1cf56 100644
--- a/vcl/unx/source/app/wmadaptor.cxx
+++ b/vcl/unx/source/app/wmadaptor.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -103,8 +103,8 @@ using namespace vcl_sal;
struct WMAdaptorProtocol
{
- const char* pProtocol;
- int nProtocol;
+ const char* pProtocol;
+ int nProtocol;
};
@@ -194,7 +194,7 @@ static int compareProtocol( const void* pLeft, const void* pRight )
WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay )
{
- WMAdaptor* pAdaptor = NULL;
+ WMAdaptor* pAdaptor = NULL;
// try a NetWM
pAdaptor = new NetWMAdaptor( pSalDisplay );
@@ -240,11 +240,11 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
m_nWinGravity( StaticGravity ),
m_nInitWinGravity( StaticGravity )
{
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
// default desktops
m_nDesktops = 1;
@@ -426,12 +426,12 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
// currently all _NET WMs do transient like expected
m_bTransientBehaviour = true;
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
- bool bNetWM = false;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
+ bool bNetWM = false;
initAtoms();
@@ -485,7 +485,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
// #i80971# protect against invalid atoms
if( pAtomNames[i] == NULL )
continue;
-
+
int nProtocol = -1;
WMAdaptorProtocol aSearch;
aSearch.pProtocol = pAtomNames[i];
@@ -620,18 +620,18 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
// currently all Gnome WMs do transient like expected
m_bTransientBehaviour = true;
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
initAtoms();
// check for GnomeWM
if( m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ WIN_PROTOCOLS ] )
{
- XLIB_Window aWMChild = None;
+ XLIB_Window aWMChild = None;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ],
@@ -741,7 +741,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
// #i80971# protect against invalid atoms
if( pAtomNames[i] == NULL )
continue;
-
+
int nProtocol = -1;
WMAdaptorProtocol aSearch;
aSearch.pProtocol = pAtomNames[i];
@@ -825,16 +825,16 @@ GnomeWMAdaptor::~GnomeWMAdaptor()
*/
bool WMAdaptor::getNetWmName()
{
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
- bool bNetWM = false;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
+ bool bNetWM = false;
if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] )
{
- XLIB_Window aWMChild = None;
+ XLIB_Window aWMChild = None;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ],
@@ -1007,8 +1007,8 @@ void WMAdaptor::initAtoms()
// get basic atoms
for( unsigned int i = 0; i < sizeof( aAtomTab )/sizeof( aAtomTab[0] ); i++ )
m_aWMAtoms[ aAtomTab[i].nProtocol ] = XInternAtom( m_pDisplay, aAtomTab[i].pProtocol, False );
- m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_NET_SUPPORTING_WM_CHECK", True );
- m_aWMAtoms[ NET_WM_NAME ] = XInternAtom( m_pDisplay, "_NET_WM_NAME", True );
+ m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_NET_SUPPORTING_WM_CHECK", True );
+ m_aWMAtoms[ NET_WM_NAME ] = XInternAtom( m_pDisplay, "_NET_WM_NAME", True );
}
/*
@@ -1019,7 +1019,7 @@ void NetWMAdaptor::initAtoms()
{
WMAdaptor::initAtoms();
- m_aWMAtoms[ NET_SUPPORTED ] = XInternAtom( m_pDisplay, "_NET_SUPPORTED", True );
+ m_aWMAtoms[ NET_SUPPORTED ] = XInternAtom( m_pDisplay, "_NET_SUPPORTED", True );
}
/*
@@ -1030,8 +1030,8 @@ void GnomeWMAdaptor::initAtoms()
{
WMAdaptor::initAtoms();
- m_aWMAtoms[ WIN_PROTOCOLS ] = XInternAtom( m_pDisplay, "_WIN_PROTOCOLS", True );
- m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_WIN_SUPPORTING_WM_CHECK", True );
+ m_aWMAtoms[ WIN_PROTOCOLS ] = XInternAtom( m_pDisplay, "_WIN_PROTOCOLS", True );
+ m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_WIN_SUPPORTING_WM_CHECK", True );
}
/*
@@ -1043,7 +1043,7 @@ void GnomeWMAdaptor::initAtoms()
void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
{
ByteString aTitle( rWMName, osl_getThreadTextEncoding() );
-
+
if( ! rWMName.Len() && m_aWMName.EqualsAscii( "Dtwm" ) )
aTitle = " ";
@@ -1070,7 +1070,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
static const char* pLang = getenv( "LANG" );
aWMLocale = pLang ? pLang : "C";
}
-
+
static bool bTrustXmb = true;
#ifdef SOLARIS
/* #i64273# there are some weird cases when using IIIMP on Solaris
@@ -1118,10 +1118,10 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
&aProp );
}
- unsigned char* pData = aProp.nitems ? aProp.value : (unsigned char*)aTitle.GetBuffer();
- Atom nType = aProp.nitems ? aProp.encoding : XA_STRING;
- int nFormat = aProp.nitems ? aProp.format : 8;
- int nBytes = aProp.nitems ? aProp.nitems : aTitle.Len();
+ unsigned char* pData = aProp.nitems ? aProp.value : (unsigned char*)aTitle.GetBuffer();
+ Atom nType = aProp.nitems ? aProp.encoding : XA_STRING;
+ int nFormat = aProp.nitems ? aProp.format : 8;
+ int nBytes = aProp.nitems ? aProp.nitems : aTitle.Len();
const SystemEnvData* pEnv = pFrame->GetSystemData();
XChangeProperty( m_pDisplay,
(XLIB_Window)pEnv->aShellWindow,
@@ -1249,8 +1249,8 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const
/*
* for maximizing use NorthWestGravity (including decoration)
*/
- XSizeHints hints;
- long supplied;
+ XSizeHints hints;
+ long supplied;
bool bHint = false;
if( XGetWMNormalHints( m_pDisplay,
pFrame->GetShellWindow(),
@@ -1339,8 +1339,8 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
/*
* for maximizing use NorthWestGravity (including decoration)
*/
- XSizeHints hints;
- long supplied;
+ XSizeHints hints;
+ long supplied;
bool bHint = false;
if( XGetWMNormalHints( m_pDisplay,
pFrame->GetShellWindow(),
@@ -1399,13 +1399,13 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
/*
* WMAdaptor::setFrameDecoration
* sets _MOTIF_WM_HINTS
- * WM_TRANSIENT_FOR
+ * WM_TRANSIENT_FOR
*/
void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const
{
- pFrame->meWindowType = eType;
- pFrame->mnDecorationFlags = nDecorationFlags;
+ pFrame->meWindowType = eType;
+ pFrame->mnDecorationFlags = nDecorationFlags;
if( ! pFrame->mbFullScreen )
{
@@ -1415,13 +1415,13 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
long input_mode;
unsigned long status;
} aHint;
-
+
aHint.flags = 15; /* flags for functions, decoration, input mode and status */
aHint.deco = 0;
aHint.func = 1L << 2;
aHint.status = 0;
aHint.input_mode = 0;
-
+
// evaluate decoration flags
if( nDecorationFlags & decoration_All )
aHint.deco = 1, aHint.func = 1;
@@ -1449,7 +1449,7 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
default:
break;
}
-
+
// set the hint
XChangeProperty( m_pDisplay,
pFrame->GetShellWindow(),
@@ -1460,7 +1460,7 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
(unsigned char*)&aHint,
5 );
}
-
+
// set transientFor hint
/* #91030# dtwm will not map a dialogue if the transient
* window is iconified. This is deemed undesireable because
@@ -1489,7 +1489,7 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
* sets _MOTIF_WM_HINTS
* _NET_WM_WINDOW_TYPE
* _NET_WM_STATE
- * WM_TRANSIENT_FOR
+ * WM_TRANSIENT_FOR
*/
void NetWMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const
@@ -1656,8 +1656,8 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
pFrame->maRestorePosSize = aRestore;
pFrame->SetPosSize( aTarget );
- pFrame->nWidth_ = aTarget.GetWidth();
- pFrame->nHeight_ = aTarget.GetHeight();
+ pFrame->nWidth_ = aTarget.GetWidth();
+ pFrame->nHeight_ = aTarget.GetHeight();
XRaiseWindow( m_pDisplay,
pFrame->GetShellWindow()
);
@@ -1671,8 +1671,8 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
{
pFrame->SetPosSize( pFrame->maRestorePosSize );
pFrame->maRestorePosSize = Rectangle();
- pFrame->nWidth_ = rGeom.nWidth;
- pFrame->nHeight_ = rGeom.nHeight;
+ pFrame->nWidth_ = rGeom.nWidth;
+ pFrame->nHeight_ = rGeom.nHeight;
if( m_aWMName.EqualsAscii( "Dtwm" ) && pFrame->bMapped_ )
{
pFrame->maGeometry.nX += rGeom.nLeftDecoration;
@@ -1701,16 +1701,16 @@ void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bV
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = bHorizontal ? 1 : 0;
- aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ];
- aEvent.xclient.data.l[2] = bHorizontal == bVertical ? m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] : 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = bHorizontal ? 1 : 0;
+ aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ];
+ aEvent.xclient.data.l[2] = bHorizontal == bVertical ? m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] : 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -1766,18 +1766,18 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = (1<<2)|(1<<3);
- aEvent.xclient.data.l[1] =
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = (1<<2)|(1<<3);
+ aEvent.xclient.data.l[1] =
(bVertical ? (1<<2) : 0)
| (bHorizontal ? (1<<3) : 0);
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -1842,16 +1842,16 @@ void NetWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = bEnable ? 1 : 0;
- aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ];
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = bEnable ? 1 : 0;
+ aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ];
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -1876,16 +1876,16 @@ void GnomeWMAdaptor::enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) cons
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ WIN_LAYER ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = bEnable ? 6 : 4;
- aEvent.xclient.data.l[1] = 0;
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ WIN_LAYER ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = bEnable ? 6 : 4;
+ aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -2104,16 +2104,16 @@ void NetWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = bToShaded ? 1 : 0;
- aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_SHADED ];
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = bToShaded ? 1 : 0;
+ aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_SHADED ];
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -2141,16 +2141,16 @@ void GnomeWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = (1<<5);
- aEvent.xclient.data.l[1] = bToShaded ? (1<<5) : 0;
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = (1<<5);
+ aEvent.xclient.data.l[1] = bToShaded ? (1<<5) : 0;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -2180,20 +2180,29 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const
if( m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] )
{
pFrame->mbFullScreen = bFullScreen;
+ if( bFullScreen )
+ {
+ if( m_aWMAtoms[ MOTIF_WM_HINTS ] )
+ {
+ XDeleteProperty( m_pDisplay,
+ pFrame->GetShellWindow(),
+ m_aWMAtoms[ MOTIF_WM_HINTS ] );
+ }
+ }
if( pFrame->bMapped_ )
{
// window already mapped, send WM a message
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = pFrame->GetShellWindow();
- aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = bFullScreen ? 1 : 0;
- aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ];
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = pFrame->GetShellWindow();
+ aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = bFullScreen ? 1 : 0;
+ aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ];
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
False,
@@ -2255,11 +2264,11 @@ int WMAdaptor::getCurrentWorkArea() const
int nCurrent = -1;
if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] )
{
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
m_aWMAtoms[ NET_CURRENT_DESKTOP ],
@@ -2294,11 +2303,11 @@ int WMAdaptor::getWindowWorkArea( XLIB_Window aWindow ) const
int nCurrent = -1;
if( m_aWMAtoms[ NET_WM_DESKTOP ] )
{
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
if( XGetWindowProperty( m_pDisplay,
aWindow,
m_aWMAtoms[ NET_WM_DESKTOP ],
@@ -2334,16 +2343,16 @@ void WMAdaptor::switchToWorkArea( int nWorkArea ) const
if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] )
{
XEvent aEvent;
- aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() );
- aEvent.xclient.message_type = m_aWMAtoms[ NET_CURRENT_DESKTOP ];
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = nWorkArea;
- aEvent.xclient.data.l[1] = 0;
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() );
+ aEvent.xclient.message_type = m_aWMAtoms[ NET_CURRENT_DESKTOP ];
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = nWorkArea;
+ aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
XSendEvent( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
False,
@@ -2403,7 +2412,7 @@ void NetWMAdaptor::setFrameStruts( X11SalFrame* pFrame,
nData[11]= bottom_end_x;
Atom aProperty = None;
int nSetData = 0;
-
+
if( m_aWMAtoms[NET_WM_STRUT_PARTIAL] )
{
aProperty = m_aWMAtoms[NET_WM_STRUT_PARTIAL];
diff --git a/vcl/unx/source/desktopdetect/desktopdetector.cxx b/vcl/unx/source/desktopdetect/desktopdetector.cxx
index 74ab2e2c3ea2..1ec34cb1c21c 100644
--- a/vcl/unx/source/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/source/desktopdetect/desktopdetector.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,13 +58,13 @@ static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KD
static bool is_gnome_desktop( Display* pDisplay )
{
bool ret = false;
-
+
// warning: these checks are coincidental, GNOME does not
// explicitly advertise itself
-
+
if ( NULL != getenv( "GNOME_DESKTOP_SESSION_ID" ) )
ret = true;
-
+
if( ! ret )
{
Atom nAtom1 = XInternAtom( pDisplay, "GNOME_SM_PROXY", True );
@@ -85,11 +85,11 @@ static bool is_gnome_desktop( Display* pDisplay )
}
}
}
-
+
if( ! ret )
{
- Atom nUTFAtom = XInternAtom( pDisplay, "UTF8_STRING", True );
- Atom nNetWMNameAtom = XInternAtom( pDisplay, "_NET_WM_NAME", True );
+ Atom nUTFAtom = XInternAtom( pDisplay, "UTF8_STRING", True );
+ Atom nNetWMNameAtom = XInternAtom( pDisplay, "_NET_WM_NAME", True );
if( nUTFAtom && nNetWMNameAtom )
{
// another, more expensive check: search for a gnome-panel
@@ -149,7 +149,7 @@ extern "C"
bWasXError = true;
return 0;
}
-
+
typedef int(* XErrorHandler)(Display*,XErrorEvent*);
}
@@ -165,11 +165,11 @@ static int KDEVersion( Display* pDisplay )
if( !nKDEVersion )
return 3;
- Atom aRealType = None;
- int nFormat = 8;
- unsigned long nItems = 0;
- unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ Atom aRealType = None;
+ int nFormat = 8;
+ unsigned long nItems = 0;
+ unsigned long nBytesLeft = 0;
+ unsigned char* pProperty = NULL;
XGetWindowProperty( pDisplay,
DefaultRootWindow( pDisplay ),
nKDEVersion,
@@ -183,7 +183,7 @@ static int KDEVersion( Display* pDisplay )
&pProperty );
if( !WasXError() && nItems != 0 && pProperty )
{
- nRet = *reinterpret_cast< sal_Int32* >( pProperty );
+ nRet = *reinterpret_cast< sal_Int32* >( pProperty );
}
if( pProperty )
{
@@ -245,23 +245,23 @@ static bool is_cde_desktop( Display* pDisplay )
osl_unloadModule( (oslModule)pLibrary );
return true;
}
-
+
return false;
}
extern "C"
{
-
+
VCL_DLLPUBLIC rtl::OUString get_desktop_environment()
{
rtl::OUStringBuffer aRet( 8 );
static const char *pOverride = getenv( "OOO_FORCE_DESKTOP" );
-
+
if ( pOverride && *pOverride )
{
OString aOver( pOverride );
-
+
if ( aOver.equalsIgnoreAsciiCase( "cde" ) )
aRet.appendAscii( desktop_strings[DESKTOP_CDE] );
if ( aOver.equalsIgnoreAsciiCase( "kde4" ) )
@@ -297,7 +297,7 @@ VCL_DLLPUBLIC rtl::OUString get_desktop_environment()
break;
}
}
-
+
// no server at all
if( ! pDisplayStr || !*pDisplayStr )
aRet.appendAscii( desktop_strings[DESKTOP_NONE] );
@@ -312,12 +312,12 @@ VCL_DLLPUBLIC rtl::OUString get_desktop_environment()
*/
if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
XInitThreads();
-
+
Display* pDisplay = XOpenDisplay( pDisplayStr );
if( pDisplay )
{
XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler );
-
+
if ( is_kde4_desktop( pDisplay ) )
aRet.appendAscii( desktop_strings[DESKTOP_KDE4] );
else if ( is_gnome_desktop( pDisplay ) )
@@ -328,10 +328,10 @@ VCL_DLLPUBLIC rtl::OUString get_desktop_environment()
aRet.appendAscii( desktop_strings[DESKTOP_KDE] );
else
aRet.appendAscii( desktop_strings[DESKTOP_UNKNOWN] );
-
+
// set the default handler again
XSetErrorHandler( pOldHdl );
-
+
XCloseDisplay( pDisplay );
}
}
diff --git a/vcl/unx/source/dtrans/X11_clipboard.cxx b/vcl/unx/source/dtrans/X11_clipboard.cxx
index a08a9481b8e8..63e237afc353 100644
--- a/vcl/unx/source/dtrans/X11_clipboard.cxx
+++ b/vcl/unx/source/dtrans/X11_clipboard.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -136,7 +136,7 @@ void X11Clipboard::clearContents()
// clear members
m_aOwner.clear();
m_aContents.clear();
-
+
// release the mutex
aGuard.clear();
@@ -285,7 +285,7 @@ void SAL_CALL X11Clipboard::initialize( const Sequence< Any >& ) throw( ::com::s
// ------------------------------------------------------------------------
-Sequence< OUString > SAL_CALL X11Clipboard::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL X11Clipboard::getSupportedServiceNames( )
throw(RuntimeException)
{
return X11Clipboard_getSupportedServiceNames();
diff --git a/vcl/unx/source/dtrans/X11_clipboard.hxx b/vcl/unx/source/dtrans/X11_clipboard.hxx
index 21bf547a9cb7..77e5692a8fb8 100644
--- a/vcl/unx/source/dtrans/X11_clipboard.hxx
+++ b/vcl/unx/source/dtrans/X11_clipboard.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,10 +57,10 @@ namespace x11 {
Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents;
Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner;
- SelectionManager& m_rSelectionManager;
- Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager;
+ SelectionManager& m_rSelectionManager;
+ Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager;
::std::list< Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners;
- Atom m_aSelection;
+ Atom m_aSelection;
protected:
@@ -79,7 +79,7 @@ namespace x11 {
static X11Clipboard* get( const ::rtl::OUString& rDisplayName, Atom aSelection );
/*
- * XInitialization
+ * XInitialization
*/
virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
@@ -87,29 +87,29 @@ namespace x11 {
* XServiceInfo
*/
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(RuntimeException);
- virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(RuntimeException);
/*
* XClipboard
*/
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
+ virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
throw(RuntimeException);
- virtual void SAL_CALL setContents(
- const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+ virtual void SAL_CALL setContents(
+ const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
+ const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw(RuntimeException);
- virtual ::rtl::OUString SAL_CALL getName()
- throw(RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw(RuntimeException);
/*
* XClipboardEx
@@ -121,16 +121,16 @@ namespace x11 {
/*
* XClipboardNotifier
*/
- virtual void SAL_CALL addClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ virtual void SAL_CALL addClipboardListener(
+ const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw(RuntimeException);
- virtual void SAL_CALL removeClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
- throw(RuntimeException);
+ virtual void SAL_CALL removeClipboardListener(
+ const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ throw(RuntimeException);
/*
- * SelectionAdaptor
+ * SelectionAdaptor
*/
virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable();
virtual void clearTransferable();
@@ -141,7 +141,7 @@ namespace x11 {
// ------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL X11Clipboard_getSupportedServiceNames();
- Reference< XInterface > SAL_CALL X11Clipboard_createInstance(
+ Reference< XInterface > SAL_CALL X11Clipboard_createInstance(
const Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
// ------------------------------------------------------------------------
diff --git a/vcl/unx/source/dtrans/X11_dndcontext.cxx b/vcl/unx/source/dtrans/X11_dndcontext.cxx
index e6fc3dd8a532..23c976cd7713 100644
--- a/vcl/unx/source/dtrans/X11_dndcontext.cxx
+++ b/vcl/unx/source/dtrans/X11_dndcontext.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@ using namespace cppu;
using namespace x11;
/*
- * DropTargetDropContext
+ * DropTargetDropContext
*/
DropTargetDropContext::DropTargetDropContext(
@@ -70,7 +70,7 @@ void DropTargetDropContext::dropComplete( sal_Bool success ) throw()
/*
- * DropTargetDragContext
+ * DropTargetDragContext
*/
DropTargetDragContext::DropTargetDragContext(
@@ -99,7 +99,7 @@ void DropTargetDragContext::rejectDrag() throw()
}
/*
- * DragSourceContext
+ * DragSourceContext
*/
DragSourceContext::DragSourceContext(
diff --git a/vcl/unx/source/dtrans/X11_dndcontext.hxx b/vcl/unx/source/dtrans/X11_dndcontext.hxx
index 9b48d346f03b..16c12a9cc4c1 100644
--- a/vcl/unx/source/dtrans/X11_dndcontext.hxx
+++ b/vcl/unx/source/dtrans/X11_dndcontext.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -94,10 +94,10 @@ namespace x11 {
virtual ~DragSourceContext();
// XDragSourceContext
- virtual sal_Int32 SAL_CALL getCurrentCursor() throw();
- virtual void SAL_CALL setCursor( sal_Int32 cursorId ) throw();
- virtual void SAL_CALL setImage( sal_Int32 imageId ) throw();
- virtual void SAL_CALL transferablesFlavorsChanged() throw();
+ virtual sal_Int32 SAL_CALL getCurrentCursor() throw();
+ virtual void SAL_CALL setCursor( sal_Int32 cursorId ) throw();
+ virtual void SAL_CALL setImage( sal_Int32 imageId ) throw();
+ virtual void SAL_CALL transferablesFlavorsChanged() throw();
};
} // namespace
diff --git a/vcl/unx/source/dtrans/X11_droptarget.cxx b/vcl/unx/source/dtrans/X11_droptarget.cxx
index 5db23329abd8..b20a2781be26 100644
--- a/vcl/unx/source/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/source/dtrans/X11_droptarget.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -195,7 +195,7 @@ void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw()
// --------------------------------------------------------------------------
/*
- * XServiceInfo
+ * XServiceInfo
*/
// ------------------------------------------------------------------------
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index 403ee9707a94..c751ca847418 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,10 +74,10 @@
#include <comphelper/processfactory.hxx>
#include <vos/mutex.hxx>
-#define DRAG_EVENT_MASK ButtonPressMask |\
- ButtonReleaseMask |\
- PointerMotionMask |\
- EnterWindowMask |\
+#define DRAG_EVENT_MASK ButtonPressMask |\
+ ButtonReleaseMask |\
+ PointerMotionMask |\
+ EnterWindowMask |\
LeaveWindowMask
using namespace com::sun::star::datatransfer;
@@ -99,7 +99,7 @@ extern "C"
{
SelectionManager::run( pMgr );
}
-
+
static void call_SelectionManager_runDragExecute( void * pMgr )
{
SelectionManager::runDragExecute( pMgr );
@@ -113,10 +113,10 @@ static const long nXdndProtocolRevision = 5;
// and X convention types
struct NativeTypeEntry
{
- Atom nAtom;
- const char* pType; // Mime encoding on our side
- const char* pNativeType; // string corresponding to nAtom for the case of nAtom being uninitialized
- int nFormat; // the corresponding format
+ Atom nAtom;
+ const char* pType; // Mime encoding on our side
+ const char* pNativeType; // string corresponding to nAtom for the case of nAtom being uninitialized
+ int nFormat; // the corresponding format
};
// the convention for Xdnd is mime types as specified by the corresponding
@@ -281,7 +281,7 @@ SelectionManager::SelectionManager() :
m_nXdndActionAsk( None ),
m_nXdndActionPrivate( None )
{
- m_aDropEnterEvent.data.l[0] = None;
+ m_aDropEnterEvent.data.l[0] = None;
m_aDragRunning.reset();
}
@@ -329,11 +329,11 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
if( ! m_xDisplayConnection.is() )
{
/*
- * first argument must be a ::com::sun::star::awt::XDisplayConnection
- * from this we will get the XEvents of the vcl event loop by
- * registering us as XEventHandler on it.
+ * first argument must be a ::com::sun::star::awt::XDisplayConnection
+ * from this we will get the XEvents of the vcl event loop by
+ * registering us as XEventHandler on it.
*
- * implementor's note:
+ * implementor's note:
* FIXME:
* finally the clipboard and XDND service is back in the module it belongs
* now cleanup and sharing of resources with the normal vcl event loop
@@ -386,34 +386,34 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
XSynchronize( m_pDisplay, True );
#endif
// clipboard selection
- m_nCLIPBOARDAtom = getAtom( OUString::createFromAscii( "CLIPBOARD" ) );
+ m_nCLIPBOARDAtom = getAtom( OUString::createFromAscii( "CLIPBOARD" ) );
// special targets
- m_nTARGETSAtom = getAtom( OUString::createFromAscii( "TARGETS" ) );
+ m_nTARGETSAtom = getAtom( OUString::createFromAscii( "TARGETS" ) );
m_nTIMESTAMPAtom = getAtom( OUString::createFromAscii( "TIMESTAMP" ) );
- m_nTEXTAtom = getAtom( OUString::createFromAscii( "TEXT" ) );
- m_nINCRAtom = getAtom( OUString::createFromAscii( "INCR" ) );
- m_nCOMPOUNDAtom = getAtom( OUString::createFromAscii( "COMPOUND_TEXT" ) );
- m_nMULTIPLEAtom = getAtom( OUString::createFromAscii( "MULTIPLE" ) );
- m_nUTF16Atom = getAtom( OUString::createFromAscii( "ISO10646-1" ) );
-// m_nUTF16Atom = getAtom( OUString::createFromAscii( "text/plain;charset=ISO-10646-UCS-2" ) );
+ m_nTEXTAtom = getAtom( OUString::createFromAscii( "TEXT" ) );
+ m_nINCRAtom = getAtom( OUString::createFromAscii( "INCR" ) );
+ m_nCOMPOUNDAtom = getAtom( OUString::createFromAscii( "COMPOUND_TEXT" ) );
+ m_nMULTIPLEAtom = getAtom( OUString::createFromAscii( "MULTIPLE" ) );
+ m_nUTF16Atom = getAtom( OUString::createFromAscii( "ISO10646-1" ) );
+// m_nUTF16Atom = getAtom( OUString::createFromAscii( "text/plain;charset=ISO-10646-UCS-2" ) );
m_nImageBmpAtom = getAtom( OUString::createFromAscii( "image/bmp" ) );
// Atoms for Xdnd protocol
- m_nXdndAware = getAtom( OUString::createFromAscii( "XdndAware" ) );
- m_nXdndEnter = getAtom( OUString::createFromAscii( "XdndEnter" ) );
- m_nXdndLeave = getAtom( OUString::createFromAscii( "XdndLeave" ) );
- m_nXdndPosition = getAtom( OUString::createFromAscii( "XdndPosition" ) );
- m_nXdndStatus = getAtom( OUString::createFromAscii( "XdndStatus" ) );
- m_nXdndDrop = getAtom( OUString::createFromAscii( "XdndDrop" ) );
- m_nXdndFinished = getAtom( OUString::createFromAscii( "XdndFinished" ) );
- m_nXdndSelection = getAtom( OUString::createFromAscii( "XdndSelection" ) );
- m_nXdndTypeList = getAtom( OUString::createFromAscii( "XdndTypeList" ) );
- m_nXdndProxy = getAtom( OUString::createFromAscii( "XdndProxy" ) );
- m_nXdndActionCopy = getAtom( OUString::createFromAscii( "XdndActionCopy" ) );
- m_nXdndActionMove = getAtom( OUString::createFromAscii( "XdndActionMove" ) );
- m_nXdndActionLink = getAtom( OUString::createFromAscii( "XdndActionLink" ) );
- m_nXdndActionAsk = getAtom( OUString::createFromAscii( "XdndActionAsk" ) );
+ m_nXdndAware = getAtom( OUString::createFromAscii( "XdndAware" ) );
+ m_nXdndEnter = getAtom( OUString::createFromAscii( "XdndEnter" ) );
+ m_nXdndLeave = getAtom( OUString::createFromAscii( "XdndLeave" ) );
+ m_nXdndPosition = getAtom( OUString::createFromAscii( "XdndPosition" ) );
+ m_nXdndStatus = getAtom( OUString::createFromAscii( "XdndStatus" ) );
+ m_nXdndDrop = getAtom( OUString::createFromAscii( "XdndDrop" ) );
+ m_nXdndFinished = getAtom( OUString::createFromAscii( "XdndFinished" ) );
+ m_nXdndSelection = getAtom( OUString::createFromAscii( "XdndSelection" ) );
+ m_nXdndTypeList = getAtom( OUString::createFromAscii( "XdndTypeList" ) );
+ m_nXdndProxy = getAtom( OUString::createFromAscii( "XdndProxy" ) );
+ m_nXdndActionCopy = getAtom( OUString::createFromAscii( "XdndActionCopy" ) );
+ m_nXdndActionMove = getAtom( OUString::createFromAscii( "XdndActionMove" ) );
+ m_nXdndActionLink = getAtom( OUString::createFromAscii( "XdndActionLink" ) );
+ m_nXdndActionAsk = getAtom( OUString::createFromAscii( "XdndActionAsk" ) );
m_nXdndActionPrivate= getAtom( OUString::createFromAscii( "XdndActionPrivate" ) );
// initialize map with member none
@@ -496,7 +496,7 @@ SelectionManager::~SelectionManager()
break;
}
}
-
+
if( m_aThread )
{
osl_terminateThread( m_aThread );
@@ -571,10 +571,10 @@ OUString SelectionManager::convertFromCompound( const char* pText, int nLen )
int nTexts = 0;
XTextProperty aProp;
- aProp.value = (unsigned char*)pText;
- aProp.encoding = m_nCOMPOUNDAtom;
- aProp.format = 8;
- aProp.nitems = nLen;
+ aProp.value = (unsigned char*)pText;
+ aProp.encoding = m_nCOMPOUNDAtom;
+ aProp.format = 8;
+ aProp.nitems = nLen;
XmbTextPropertyToTextList( m_pDisplay,
&aProp,
&pTextList,
@@ -952,20 +952,20 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
XDeleteProperty( m_pDisplay, m_aWindow, selection );
XConvertSelection( m_pDisplay, selection, type, selection, m_aWindow, selection == m_nXdndSelection ? m_nDropTime : CurrentTime );
- it->second->m_eState = Selection::WaitingForResponse;
- it->second->m_aRequestedType = type;
- it->second->m_aData = Sequence< sal_Int8 >();
+ it->second->m_eState = Selection::WaitingForResponse;
+ it->second->m_aRequestedType = type;
+ it->second->m_aData = Sequence< sal_Int8 >();
it->second->m_aDataArrived.reset();
// really start the request; if we don't flush the
// queue the request won't leave it because there are no more
// X calls after this until the data arrived or timeout
XFlush( m_pDisplay );
-
+
// do a reschedule
struct timeval tv_last, tv_current;
gettimeofday( &tv_last, NULL );
tv_current = tv_last;
-
+
XEvent aEvent;
do
{
@@ -1111,8 +1111,8 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
for( int i = 0; i < rTypes.getLength(); i++ )
{
rtl_TextEncoding aEncoding = getTextPlainEncoding( rTypes.getConstArray()[i].MimeType );
- if( aEncoding != RTL_TEXTENCODING_DONTKNOW &&
- aEncoding != RTL_TEXTENCODING_UNICODE &&
+ if( aEncoding != RTL_TEXTENCODING_DONTKNOW &&
+ aEncoding != RTL_TEXTENCODING_UNICODE &&
getPasteData( selection,
rNativeTypes[i],
aData )
@@ -1147,14 +1147,14 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
{
Pixmap aPixmap = None;
Colormap aColormap = None;
-
+
// prepare property for MULTIPLE request
Sequence< sal_Int8 > aData;
Atom pTypes[4] = { XA_PIXMAP, XA_PIXMAP,
XA_COLORMAP, XA_COLORMAP };
{
MutexGuard aGuard(m_aMutex);
-
+
XChangeProperty( m_pDisplay,
m_aWindow,
selection,
@@ -1164,7 +1164,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
(unsigned char*)pTypes,
4 );
}
-
+
// try MULTIPLE request
if( getPasteData( selection, m_nMULTIPLEAtom, aData ) )
{
@@ -1172,7 +1172,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
if( pReturnedTypes[0] == XA_PIXMAP && pReturnedTypes[1] == XA_PIXMAP )
{
MutexGuard aGuard(m_aMutex);
-
+
Atom type = None;
int format = 0;
unsigned long nItems = 0;
@@ -1204,7 +1204,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
#endif
}
}
-
+
if( aPixmap == None )
{
// perhaps two normal requests will work
@@ -1215,12 +1215,12 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
aColormap = *(Colormap*)aData.getArray();
}
}
-
+
// convert data if possible
if( aPixmap != None )
{
MutexGuard aGuard(m_aMutex);
-
+
sal_Int32 nOutSize = 0;
sal_uInt8* pBytes = X11_getBmpFromPixmap( m_pDisplay, aPixmap, aColormap, nOutSize );
if( pBytes && nOutSize )
@@ -1269,8 +1269,8 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
MutexGuard aGuard(m_aMutex);
it = m_aSelections.find( selection );
- if( it != m_aSelections.end() &&
- it->second->m_aTypes.getLength() &&
+ if( it != m_aSelections.end() &&
+ it->second->m_aTypes.getLength() &&
abs( it->second->m_nLastTimestamp - time( NULL ) ) < 2
)
{
@@ -1435,21 +1435,21 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
{
if( bSuccess )
{
- it->second->m_aTypes = rTypes;
- it->second->m_aNativeTypes = aNativeTypes;
- it->second->m_nLastTimestamp = time( NULL );
- it->second->m_bHaveUTF16 = bHaveUTF16;
+ it->second->m_aTypes = rTypes;
+ it->second->m_aNativeTypes = aNativeTypes;
+ it->second->m_nLastTimestamp = time( NULL );
+ it->second->m_bHaveUTF16 = bHaveUTF16;
it->second->m_aUTF8Type = aUTF8Type;
- it->second->m_bHaveCompound = bHaveCompound;
+ it->second->m_bHaveCompound = bHaveCompound;
}
else
{
- it->second->m_aTypes = Sequence< DataFlavor >();
- it->second->m_aNativeTypes = std::vector< Atom >();
- it->second->m_nLastTimestamp = 0;
- it->second->m_bHaveUTF16 = false;
+ it->second->m_aTypes = Sequence< DataFlavor >();
+ it->second->m_aNativeTypes = std::vector< Atom >();
+ it->second->m_nLastTimestamp = 0;
+ it->second->m_bHaveUTF16 = false;
it->second->m_aUTF8Type = None;
- it->second->m_bHaveCompound = false;
+ it->second->m_bHaveCompound = false;
}
}
}
@@ -1481,7 +1481,7 @@ PixmapHolder* SelectionManager::getPixmapHolder( Atom selection )
static sal_Size GetTrueFormatSize(int nFormat)
{
// http://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html
- return nFormat == 32 ? sizeof(long) : nFormat/8;
+ return nFormat == 32 ? sizeof(long) : nFormat/8;
}
bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
@@ -1609,14 +1609,14 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
#endif
// insert IncrementalTransfer
- IncrementalTransfer& rInc = m_aIncrementals[ requestor ][ property ];
- rInc.m_aData = aData;
- rInc.m_nBufferPos = 0;
- rInc.m_aRequestor = requestor;
- rInc.m_aProperty = property;
- rInc.m_aTarget = target;
- rInc.m_nFormat = nFormat;
- rInc.m_nTransferStartTime = time( NULL );
+ IncrementalTransfer& rInc = m_aIncrementals[ requestor ][ property ];
+ rInc.m_aData = aData;
+ rInc.m_nBufferPos = 0;
+ rInc.m_aRequestor = requestor;
+ rInc.m_aProperty = property;
+ rInc.m_aTarget = target;
+ rInc.m_nFormat = nFormat;
+ rInc.m_nTransferStartTime = time( NULL );
// use incr protocol, signal start to requestor
long nMinSize = m_nIncrementalThreshold;
@@ -1825,23 +1825,23 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
}
XSendEvent( m_pDisplay, rRequest.requestor, False, 0, &aNotify );
- if( rRequest.selection == XA_PRIMARY &&
- m_bWaitingForPrimaryConversion &&
+ if( rRequest.selection == XA_PRIMARY &&
+ m_bWaitingForPrimaryConversion &&
m_xDragSourceListener.is() )
{
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, rRequest.time, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, rRequest.time, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
if( aNotify.xselection.property != None )
{
- dsde.DropAction = DNDConstants::ACTION_COPY;
- dsde.DropSuccess = sal_True;
+ dsde.DropAction = DNDConstants::ACTION_COPY;
+ dsde.DropSuccess = sal_True;
}
else
{
- dsde.DropAction = DNDConstants::ACTION_NONE;
- dsde.DropSuccess = sal_False;
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
}
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
@@ -1870,8 +1870,8 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify )
m_aSelections.find( rNotify.atom );
if( it != m_aSelections.end() &&
rNotify.state == PropertyNewValue &&
- ( it->second->m_eState == Selection::WaitingForResponse ||
- it->second->m_eState == Selection::WaitingForData ||
+ ( it->second->m_eState == Selection::WaitingForResponse ||
+ it->second->m_eState == Selection::WaitingForData ||
it->second->m_eState == Selection::IncrementalTransfer
)
)
@@ -1934,7 +1934,7 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify )
OUStringToOString( getString( nType ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
nFormat, nBytes );
#endif
-
+
sal_Size nUnitSize = GetTrueFormatSize(nFormat);
if( it->second->m_eState == Selection::WaitingForData ||
@@ -2040,7 +2040,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify )
#endif
sal_Size nUnitSize = GetTrueFormatSize(rInc.m_nFormat);
-
+
XChangeProperty( m_pDisplay,
rInc.m_aRequestor,
rInc.m_aProperty,
@@ -2138,9 +2138,9 @@ bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify )
&nItems, &nBytes,
&pData );
}
- it->second->m_eState = Selection::Inactive;
+ it->second->m_eState = Selection::Inactive;
sal_Size nUnitSize = GetTrueFormatSize(nFormat);
- it->second->m_aData = Sequence< sal_Int8 >((sal_Int8*)pData, nItems * nUnitSize);
+ it->second->m_aData = Sequence< sal_Int8 >((sal_Int8*)pData, nItems * nUnitSize);
it->second->m_aDataArrived.set();
if( pData )
XFree( pData );
@@ -2151,8 +2151,8 @@ bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify )
else if( rNotify.property == None )
{
// conversion failed, stop transfer
- it->second->m_eState = Selection::Inactive;
- it->second->m_aData = Sequence< sal_Int8 >();
+ it->second->m_eState = Selection::Inactive;
+ it->second->m_aData = Sequence< sal_Int8 >();
it->second->m_aDataArrived.set();
}
// get the bytes, by INCR if necessary
@@ -2219,10 +2219,10 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
if( rMessage.message_type == m_nXdndEnter )
{
bHandled = true;
- m_aDropEnterEvent = rMessage;
- m_bDropEnterSent = false;
- m_aCurrentDropWindow = aTarget;
- m_nCurrentProtocolVersion = m_aDropEnterEvent.data.l[1] >> 24;
+ m_aDropEnterEvent = rMessage;
+ m_bDropEnterSent = false;
+ m_aCurrentDropWindow = aTarget;
+ m_nCurrentProtocolVersion = m_aDropEnterEvent.data.l[1] >> 24;
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "received XdndEnter on 0x%lx\n", aTarget );
#endif
@@ -2250,10 +2250,10 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
fprintf( stderr, "received XdndPosition on 0x%lx (%d, %d)\n", aTarget, m_nLastX, m_nLastY );
#endif
DropTargetDragEnterEvent aEvent;
- aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget);
- aEvent.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
- aEvent.LocationX = m_nLastX;
- aEvent.LocationY = m_nLastY;
+ aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget);
+ aEvent.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
+ aEvent.LocationX = m_nLastX;
+ aEvent.LocationY = m_nLastY;
aEvent.SourceActions = m_nSourceActions;
if( m_nCurrentProtocolVersion < 2 )
aEvent.DropAction = DNDConstants::ACTION_COPY;
@@ -2269,7 +2269,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
else
aEvent.DropAction = DNDConstants::ACTION_NONE;
- m_nLastDropAction = aEvent.DropAction;
+ m_nLastDropAction = aEvent.DropAction;
if( ! m_bDropEnterSent )
{
m_bDropEnterSent = true;
@@ -2315,15 +2315,15 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
if( m_bLastDropAccepted )
{
DropTargetDropEvent aEvent;
- aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget);
- aEvent.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
- aEvent.LocationX = m_nLastX;
- aEvent.LocationY = m_nLastY;
- aEvent.DropAction = m_nLastDropAction;
+ aEvent.Source = static_cast< XDropTarget* >(it->second.m_pTarget);
+ aEvent.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
+ aEvent.LocationX = m_nLastX;
+ aEvent.LocationY = m_nLastY;
+ aEvent.DropAction = m_nLastDropAction;
// there is nothing corresponding to source supported actions
// every source can do link, copy and move
aEvent.SourceActions= m_nLastDropAction;
- aEvent.Transferable = m_xDropTransferable;
+ aEvent.Transferable = m_xDropTransferable;
m_bDropWaitingForCompletion = true;
aGuard.clear();
@@ -2347,7 +2347,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
}
/*
- * methods for XDropTargetDropContext
+ * methods for XDropTargetDropContext
*/
void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow, XLIB_Time )
@@ -2359,11 +2359,11 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
if( m_xDragSourceListener.is() )
{
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = getUserDragAction();
- dsde.DropSuccess = bSuccess;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = getUserDragAction();
+ dsde.DropSuccess = bSuccess;
Reference< XDragSourceListener > xListener = m_xDragSourceListener;
m_xDragSourceListener.clear();
@@ -2373,16 +2373,16 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
else if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow )
{
XEvent aEvent;
- aEvent.xclient.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = m_aDropEnterEvent.data.l[0];
- aEvent.xclient.message_type = m_nXdndFinished;
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = m_aCurrentDropWindow;
- aEvent.xclient.data.l[1] = bSuccess ? 1 : 0;
- aEvent.xclient.data.l[2] = 0;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
+ aEvent.xclient.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = m_aDropEnterEvent.data.l[0];
+ aEvent.xclient.message_type = m_nXdndFinished;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = m_aCurrentDropWindow;
+ aEvent.xclient.data.l[1] = bSuccess ? 1 : 0;
+ aEvent.xclient.data.l[2] = 0;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
if( bSuccess )
{
if( m_nLastDropAction & DNDConstants::ACTION_MOVE )
@@ -2402,9 +2402,9 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
XSendEvent( m_pDisplay, m_aDropEnterEvent.data.l[0],
False, NoEventMask, & aEvent );
- m_aDropEnterEvent.data.l[0] = None;
- m_aCurrentDropWindow = None;
- m_nCurrentProtocolVersion = nXdndProtocolRevision;
+ m_aDropEnterEvent.data.l[0] = None;
+ m_aCurrentDropWindow = None;
+ m_nCurrentProtocolVersion = nXdndProtocolRevision;
}
m_bDropWaitingForCompletion = false;
}
@@ -2413,7 +2413,7 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
}
/*
- * methods for XDropTargetDragContext
+ * methods for XDropTargetDragContext
*/
// ------------------------------------------------------------------------
@@ -2442,11 +2442,11 @@ void SelectionManager::sendDragStatus( Atom nDropAction )
}
DragSourceDragEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = m_nSourceActions;
- dsde.UserAction = getUserDragAction();
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = m_nSourceActions;
+ dsde.UserAction = getUserDragAction();
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
// caution: do not change anything after this
@@ -2457,15 +2457,15 @@ void SelectionManager::sendDragStatus( Atom nDropAction )
else if( m_aDropEnterEvent.data.l[0] && m_aCurrentDropWindow )
{
XEvent aEvent;
- aEvent.xclient.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.window = m_aDropEnterEvent.data.l[0];
- aEvent.xclient.message_type = m_nXdndStatus;
- aEvent.xclient.format = 32;
- aEvent.xclient.data.l[0] = m_aCurrentDropWindow;
- aEvent.xclient.data.l[1] = 2;
- if( nDropAction == m_nXdndActionMove ||
- nDropAction == m_nXdndActionLink ||
+ aEvent.xclient.type = ClientMessage;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.window = m_aDropEnterEvent.data.l[0];
+ aEvent.xclient.message_type = m_nXdndStatus;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.data.l[0] = m_aCurrentDropWindow;
+ aEvent.xclient.data.l[1] = 2;
+ if( nDropAction == m_nXdndActionMove ||
+ nDropAction == m_nXdndActionLink ||
nDropAction == m_nXdndActionCopy )
aEvent.xclient.data.l[1] |= 1;
aEvent.xclient.data.l[2] = 0;
@@ -2534,12 +2534,12 @@ bool SelectionManager::updateDragAction( int modifierState )
m_nUserDragAction = nNewDropAction;
DragSourceDragEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = m_nUserDragAction;
- dsde.UserAction = m_nUserDragAction;
- m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; // invalidate last accept
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = m_nUserDragAction;
+ dsde.UserAction = m_nUserDragAction;
+ m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT; // invalidate last accept
m_xDragSourceListener->dropActionChanged( dsde );
}
return bRet;
@@ -2564,12 +2564,12 @@ void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime )
XLIB_Window aChild;
XTranslateCoordinates( m_pDisplay, it->second.m_aRootWindow, m_aDropWindow, m_nLastDragX, m_nLastDragY, &x, &y, &aChild );
DropTargetDragEvent dtde;
- dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget );
- dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
- dtde.LocationX = x;
- dtde.LocationY = y;
- dtde.DropAction = getUserDragAction();
- dtde.SourceActions = m_nSourceActions;
+ dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget );
+ dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
+ dtde.LocationX = x;
+ dtde.LocationY = y;
+ dtde.DropAction = getUserDragAction();
+ dtde.SourceActions = m_nSourceActions;
aGuard.clear();
it->second->dragOver( dtde );
}
@@ -2583,14 +2583,14 @@ void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime )
// send XdndPosition
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.message_type = m_nXdndPosition;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
- aEvent.xclient.data.l[1] = 0;
- aEvent.xclient.data.l[2] = m_nLastDragX << 16 | (m_nLastDragY&0xffff);
- aEvent.xclient.data.l[3] = eventTime;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = m_nXdndPosition;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.data.l[2] = m_nLastDragX << 16 | (m_nLastDragY&0xffff);
+ aEvent.xclient.data.l[3] = eventTime;
if( m_nUserDragAction & DNDConstants::ACTION_COPY )
aEvent.xclient.data.l[4]=m_nXdndActionCopy;
@@ -2626,7 +2626,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
fprintf( stderr, "handleDragEvent: %s\n", OUStringToOString( getString( rMessage.xclient.message_type ), RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
break;
case MotionNotify:
-// fprintf( stderr, "handleDragEvent: MotionNotify\n" );
+// fprintf( stderr, "handleDragEvent: MotionNotify\n" );
break;
case EnterNotify:
fprintf( stderr, "handleDragEvent: EnterNotify\n" );
@@ -2659,9 +2659,9 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
{
bHandled = true;
DragSourceDragEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >( this );
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >( this );
dsde.UserAction = getUserDragAction();
dsde.DropAction = DNDConstants::ACTION_NONE;
m_bDropSuccess = rMessage.xclient.data.l[1] & 1 ? true : false;
@@ -2688,10 +2688,10 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
if( ! ( rMessage.xclient.data.l[1] & 2 ) )
{
- m_nNoPosX = rMessage.xclient.data.l[2] >> 16;
- m_nNoPosY = rMessage.xclient.data.l[2] & 0xffff;
- m_nNoPosWidth = rMessage.xclient.data.l[3] >> 16;
- m_nNoPosHeight = rMessage.xclient.data.l[3] & 0xffff;
+ m_nNoPosX = rMessage.xclient.data.l[2] >> 16;
+ m_nNoPosY = rMessage.xclient.data.l[2] & 0xffff;
+ m_nNoPosWidth = rMessage.xclient.data.l[3] >> 16;
+ m_nNoPosHeight = rMessage.xclient.data.l[3] & 0xffff;
}
else
m_nNoPosX = m_nNoPosY = m_nNoPosWidth = m_nNoPosHeight = 0;
@@ -2705,11 +2705,11 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
bHandled = true;
// notify the listener
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = m_nTargetAcceptAction;
- dsde.DropSuccess = m_bDropSuccess;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = m_nTargetAcceptAction;
+ dsde.DropSuccess = m_bDropSuccess;
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
@@ -2722,8 +2722,8 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
{
bHandled = true;
bool bForce = false;
- int root_x = rMessage.type == MotionNotify ? rMessage.xmotion.x_root : rMessage.xcrossing.x_root;
- int root_y = rMessage.type == MotionNotify ? rMessage.xmotion.y_root : rMessage.xcrossing.y_root;
+ int root_x = rMessage.type == MotionNotify ? rMessage.xmotion.x_root : rMessage.xcrossing.x_root;
+ int root_y = rMessage.type == MotionNotify ? rMessage.xmotion.y_root : rMessage.xcrossing.y_root;
XLIB_Window root = rMessage.type == MotionNotify ? rMessage.xmotion.root : rMessage.xcrossing.root;
m_nDragTimestamp = rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time;
@@ -2760,22 +2760,22 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
// send XdndLeave
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.message_type = m_nXdndLeave;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = m_nXdndLeave;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
memset( aEvent.xclient.data.l+1, 0, sizeof(long)*4);
m_aDropWindow = m_aDropProxy = None;
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
}
// notify the listener
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = DNDConstants::ACTION_NONE;
- dsde.DropSuccess = sal_False;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
@@ -2784,9 +2784,9 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
else
{
/*
- * man page says: state is state immediate PRIOR to the
- * event. It would seem that this is a somewhat arguable
- * design decision.
+ * man page says: state is state immediate PRIOR to the
+ * event. It would seem that this is a somewhat arguable
+ * design decision.
*/
int nState = rMessage.xkey.state;
int nNewState = 0;
@@ -2823,15 +2823,15 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
XLIB_Window aChild;
XTranslateCoordinates( m_pDisplay, rMessage.xbutton.root, m_aDropWindow, rMessage.xbutton.x_root, rMessage.xbutton.y_root, &x, &y, &aChild );
DropTargetDropEvent dtde;
- dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget );
- dtde.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
- dtde.LocationX = x;
- dtde.LocationY = y;
- dtde.DropAction = m_nUserDragAction;
- dtde.SourceActions = m_nSourceActions;
- dtde.Transferable = m_xDragSourceTransferable;
- m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget );
+ dtde.Context = new DropTargetDropContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
+ dtde.LocationX = x;
+ dtde.LocationY = y;
+ dtde.DropAction = m_nUserDragAction;
+ dtde.SourceActions = m_nSourceActions;
+ dtde.Transferable = m_xDragSourceTransferable;
+ m_bDropSent = true;
+ m_nDropTimeout = time( NULL );
m_bDropWaitingForCompletion = true;
aGuard.clear();
it->second->drop( dtde );
@@ -2845,18 +2845,18 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.message_type = m_nXdndDrop;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
- aEvent.xclient.data.l[1] = 0;
- aEvent.xclient.data.l[2] = rMessage.xbutton.time;
- aEvent.xclient.data.l[3] = 0;
- aEvent.xclient.data.l[4] = 0;
-
- m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = m_nXdndDrop;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.data.l[2] = rMessage.xbutton.time;
+ aEvent.xclient.data.l[3] = 0;
+ aEvent.xclient.data.l[4] = 0;
+
+ m_bDropSent = true;
+ m_nDropTimeout = time( NULL );
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
bCancel = false;
}
@@ -2873,16 +2873,16 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
XLIB_Window aDummy;
XEvent aEvent;
aEvent.type = ButtonPress;
- aEvent.xbutton.display = m_pDisplay;
- aEvent.xbutton.window = m_aDropWindow;
- aEvent.xbutton.root = rMessage.xbutton.root;
- aEvent.xbutton.subwindow = m_aDropWindow;
- aEvent.xbutton.time = rMessage.xbutton.time+1;
- aEvent.xbutton.x_root = rMessage.xbutton.x_root;
- aEvent.xbutton.y_root = rMessage.xbutton.y_root;
- aEvent.xbutton.state = rMessage.xbutton.state;
- aEvent.xbutton.button = Button2;
- aEvent.xbutton.same_screen = True;
+ aEvent.xbutton.display = m_pDisplay;
+ aEvent.xbutton.window = m_aDropWindow;
+ aEvent.xbutton.root = rMessage.xbutton.root;
+ aEvent.xbutton.subwindow = m_aDropWindow;
+ aEvent.xbutton.time = rMessage.xbutton.time+1;
+ aEvent.xbutton.x_root = rMessage.xbutton.x_root;
+ aEvent.xbutton.y_root = rMessage.xbutton.y_root;
+ aEvent.xbutton.state = rMessage.xbutton.state;
+ aEvent.xbutton.button = Button2;
+ aEvent.xbutton.same_screen = True;
XTranslateCoordinates( m_pDisplay,
rMessage.xbutton.root, m_aDropWindow,
rMessage.xbutton.x_root, rMessage.xbutton.y_root,
@@ -2894,12 +2894,12 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
aEvent.xbutton.state |= Button2Mask;
XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonReleaseMask, &aEvent );
- m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_bDropSent = true;
+ m_nDropTimeout = time( NULL );
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
- m_bWaitingForPrimaryConversion = true;
- m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_bWaitingForPrimaryConversion = true;
+ m_bDropSent = true;
+ m_nDropTimeout = time( NULL );
// HACK :-)
aGuard.clear();
static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
@@ -2912,11 +2912,11 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
{
// cancel drag
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = DNDConstants::ACTION_NONE;
- dsde.DropSuccess = sal_False;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
@@ -2963,11 +2963,11 @@ void SelectionManager::reject( XLIB_Window aDropWindow, XLIB_Time )
if( m_bDropSent && m_xDragSourceListener.is() )
{
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = DNDConstants::ACTION_NONE;
- dsde.DropSuccess = sal_False;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
m_xDragSourceListener->dragDropEnd( dsde );
m_xDragSourceListener.clear();
}
@@ -2975,7 +2975,7 @@ void SelectionManager::reject( XLIB_Window aDropWindow, XLIB_Time )
}
/*
- * XDragSource
+ * XDragSource
*/
sal_Bool SelectionManager::isDragImageSupported() throw()
@@ -3012,8 +3012,8 @@ int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy )
rProxy = None;
/*
- * XListProperties is used here to avoid unnecessary XGetWindowProperty calls
- * and therefore reducing latency penalty
+ * XListProperties is used here to avoid unnecessary XGetWindowProperty calls
+ * and therefore reducing latency penalty
*/
pProperties = XListProperties( m_pDisplay, aWindow, &nProperties );
// first look for proxy
@@ -3113,11 +3113,11 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
DragSourceDragEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY;
- dsde.UserAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY;
+ dsde.UserAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY;
::std::hash_map< XLIB_Window, DropTargetEntry >::const_iterator it;
if( aNewCurrentWindow != m_aDropWindow )
@@ -3133,7 +3133,7 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
// shortcut for own drop targets
{
DropTargetEvent dte;
- dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget );
+ dte.Source = static_cast< OWeakObject* >( it->second.m_pTarget );
aGuard.clear();
it->second.m_pTarget->dragExit( dte );
aGuard.reset();
@@ -3143,12 +3143,12 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
// send old drop target a XdndLeave
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.message_type = m_nXdndLeave;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
- aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = m_nXdndLeave;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.data.l[1] = 0;
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
}
if( xListener.is() )
@@ -3159,9 +3159,9 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
}
}
- m_nCurrentProtocolVersion = nNewProtocolVersion;
- m_aDropWindow = aNewCurrentWindow;
- m_aDropProxy = aNewProxy != None ? aNewProxy : m_aDropWindow;
+ m_nCurrentProtocolVersion = nNewProtocolVersion;
+ m_aDropWindow = aNewCurrentWindow;
+ m_aDropProxy = aNewProxy != None ? aNewProxy : m_aDropWindow;
it = m_aDropTargets.find( m_aDropWindow );
if( it != m_aDropTargets.end() && ! it->second.m_pTarget->m_bActive )
@@ -3181,13 +3181,13 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
{
XTranslateCoordinates( m_pDisplay, aRoot, m_aDropWindow, nX, nY, &nWinX, &nWinY, &aChild );
DropTargetDragEnterEvent dtde;
- dtde.Source = static_cast< OWeakObject* >( it->second.m_pTarget );
- dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
- dtde.LocationX = nWinX;
- dtde.LocationY = nWinY;
- dtde.DropAction = m_nUserDragAction;
- dtde.SourceActions = m_nSourceActions;
- dtde.SupportedDataFlavors = m_xDragSourceTransferable->getTransferDataFlavors();
+ dtde.Source = static_cast< OWeakObject* >( it->second.m_pTarget );
+ dtde.Context = new DropTargetDragContext( m_aCurrentDropWindow, m_nDropTimestamp, *this );
+ dtde.LocationX = nWinX;
+ dtde.LocationY = nWinY;
+ dtde.DropAction = m_nUserDragAction;
+ dtde.SourceActions = m_nSourceActions;
+ dtde.SupportedDataFlavors = m_xDragSourceTransferable->getTransferDataFlavors();
aGuard.clear();
it->second.m_pTarget->dragEnter( dtde );
aGuard.reset();
@@ -3196,12 +3196,12 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
{
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.message_type = m_nXdndEnter;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
- aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = m_nXdndEnter;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24;
memset( aEvent.xclient.data.l + 2, 0, sizeof( long )*3 );
// fill in data types
::std::list< Atom > aConversions;
@@ -3240,11 +3240,11 @@ void SelectionManager::startDrag(
#endif
DragSourceDropEvent aDragFailedEvent;
- aDragFailedEvent.Source = static_cast< OWeakObject* >(this);
- aDragFailedEvent.DragSource = static_cast< XDragSource* >(this);
- aDragFailedEvent.DragSourceContext = new DragSourceContext( None, CurrentTime, *this );
- aDragFailedEvent.DropAction = DNDConstants::ACTION_NONE;
- aDragFailedEvent.DropSuccess = sal_False;
+ aDragFailedEvent.Source = static_cast< OWeakObject* >(this);
+ aDragFailedEvent.DragSource = static_cast< XDragSource* >(this);
+ aDragFailedEvent.DragSourceContext = new DragSourceContext( None, CurrentTime, *this );
+ aDragFailedEvent.DropAction = DNDConstants::ACTION_NONE;
+ aDragFailedEvent.DropSuccess = sal_False;
if( m_aDragRunning.check() )
{
@@ -3334,7 +3334,7 @@ void SelectionManager::startDrag(
/* if we could not grab the pointer here, there is a chance
that the pointer is grabbed by the other vcl display (the main loop)
so let's break that grab an reset it later
-
+
remark: this whole code should really be molten into normal vcl so only
one display is used ....
*/
@@ -3392,10 +3392,10 @@ void SelectionManager::startDrag(
return;
}
- m_xDragSourceTransferable = transferable;
- m_xDragSourceListener = listener;
- m_aDragFlavors = transferable->getTransferDataFlavors();
- m_aCurrentCursor = None;
+ m_xDragSourceTransferable = transferable;
+ m_xDragSourceListener = listener;
+ m_aDragFlavors = transferable->getTransferDataFlavors();
+ m_aCurrentCursor = None;
requestOwnership( m_nXdndSelection );
@@ -3411,17 +3411,17 @@ void SelectionManager::startDrag(
XChangeProperty( m_pDisplay, m_aWindow, m_nXdndTypeList, XA_ATOM, 32, PropModeReplace, (unsigned char*)pTypes, nTypes );
- m_nSourceActions = sourceActions | DNDConstants::ACTION_DEFAULT;
- m_nUserDragAction = DNDConstants::ACTION_MOVE & m_nSourceActions;
+ m_nSourceActions = sourceActions | DNDConstants::ACTION_DEFAULT;
+ m_nUserDragAction = DNDConstants::ACTION_MOVE & m_nSourceActions;
if( ! m_nUserDragAction )
- m_nUserDragAction = DNDConstants::ACTION_COPY & m_nSourceActions;
+ m_nUserDragAction = DNDConstants::ACTION_COPY & m_nSourceActions;
if( ! m_nUserDragAction )
- m_nUserDragAction = DNDConstants::ACTION_LINK & m_nSourceActions;
- m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT;
- m_bDropSent = false;
- m_bDropSuccess = false;
- m_bWaitingForPrimaryConversion = false;
- m_nDragButton = Button1; // default to left button
+ m_nUserDragAction = DNDConstants::ACTION_LINK & m_nSourceActions;
+ m_nTargetAcceptAction = DNDConstants::ACTION_DEFAULT;
+ m_bDropSent = false;
+ m_bDropSuccess = false;
+ m_bWaitingForPrimaryConversion = false;
+ m_nDragButton = Button1; // default to left button
com::sun::star::awt::MouseEvent aEvent;
if( trigger.Event >>= aEvent )
{
@@ -3452,17 +3452,17 @@ void SelectionManager::startDrag(
m_xDragSourceListener.clear();
m_xDragSourceTransferable.clear();
- m_bDropSent = false;
- m_bDropSuccess = false;
- m_bWaitingForPrimaryConversion = false;
- m_aDropWindow = None;
- m_aDropProxy = None;
- m_nCurrentProtocolVersion = nXdndProtocolRevision;
- m_nNoPosX = 0;
- m_nNoPosY = 0;
- m_nNoPosWidth = 0;
- m_nNoPosHeight = 0;
- m_aCurrentCursor = None;
+ m_bDropSent = false;
+ m_bDropSuccess = false;
+ m_bWaitingForPrimaryConversion = false;
+ m_aDropWindow = None;
+ m_aDropProxy = None;
+ m_nCurrentProtocolVersion = nXdndProtocolRevision;
+ m_nNoPosX = 0;
+ m_nNoPosY = 0;
+ m_nNoPosWidth = 0;
+ m_nNoPosHeight = 0;
+ m_aCurrentCursor = None;
XUngrabPointer( m_pDisplay, CurrentTime );
XUngrabKeyboard( m_pDisplay, CurrentTime );
@@ -3522,27 +3522,27 @@ void SelectionManager::dragDoDispatch()
m_xDragSourceTransferable.clear();
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = DNDConstants::ACTION_NONE;
- dsde.DropSuccess = sal_False;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
// cleanup after drag
if( m_bWaitingForPrimaryConversion )
getAdaptor( XA_PRIMARY )->clearTransferable();
- m_bDropSent = false;
- m_bDropSuccess = false;
- m_bWaitingForPrimaryConversion = false;
- m_aDropWindow = None;
- m_aDropProxy = None;
- m_nCurrentProtocolVersion = nXdndProtocolRevision;
- m_nNoPosX = 0;
- m_nNoPosY = 0;
- m_nNoPosWidth = 0;
- m_nNoPosHeight = 0;
- m_aCurrentCursor = None;
+ m_bDropSent = false;
+ m_bDropSuccess = false;
+ m_bWaitingForPrimaryConversion = false;
+ m_aDropWindow = None;
+ m_aDropProxy = None;
+ m_nCurrentProtocolVersion = nXdndProtocolRevision;
+ m_nNoPosX = 0;
+ m_nNoPosY = 0;
+ m_nNoPosWidth = 0;
+ m_nNoPosHeight = 0;
+ m_aCurrentCursor = None;
XUngrabPointer( m_pDisplay, CurrentTime );
XUngrabKeyboard( m_pDisplay, CurrentTime );
@@ -3562,7 +3562,7 @@ void SelectionManager::dragDoDispatch()
}
/*
- * XDragSourceContext
+ * XDragSourceContext
*/
sal_Int32 SelectionManager::getCurrentCursor()
@@ -3619,17 +3619,17 @@ void SelectionManager::transferablesFlavorsChanged()
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
- aEvent.xclient.message_type = m_nXdndLeave;
- aEvent.xclient.data.l[1] = 0;
+ aEvent.xclient.message_type = m_nXdndLeave;
+ aEvent.xclient.data.l[1] = 0;
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
- aEvent.xclient.message_type = m_nXdndEnter;
- aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24;
+ aEvent.xclient.message_type = m_nXdndEnter;
+ aEvent.xclient.data.l[1] = m_nCurrentProtocolVersion << 24;
memset( aEvent.xclient.data.l + 2, 0, sizeof( long )*3 );
// fill in data types
if( nTypes > 3 )
@@ -3642,7 +3642,7 @@ void SelectionManager::transferablesFlavorsChanged()
}
/*
- * dispatch loop
+ * dispatch loop
*/
// ------------------------------------------------------------------------
@@ -3650,9 +3650,9 @@ void SelectionManager::transferablesFlavorsChanged()
bool SelectionManager::handleXEvent( XEvent& rEvent )
{
/*
- * since we are XConnectionListener to a second X display
- * to get client messages it is essential not to dispatch
- * events twice that we get on both connections
+ * since we are XConnectionListener to a second X display
+ * to get client messages it is essential not to dispatch
+ * events twice that we get on both connections
*
* #95201# between dispatching ButtonPress and startDrag
* the user can already have released the mouse. The ButtonRelease
@@ -3709,9 +3709,9 @@ bool SelectionManager::handleXEvent( XEvent& rEvent )
bHandled = handleDragEvent( rEvent );
// messages from drag source
else if(
- rEvent.xclient.message_type == m_nXdndEnter ||
- rEvent.xclient.message_type == m_nXdndLeave ||
- rEvent.xclient.message_type == m_nXdndPosition ||
+ rEvent.xclient.message_type == m_nXdndEnter ||
+ rEvent.xclient.message_type == m_nXdndLeave ||
+ rEvent.xclient.message_type == m_nXdndPosition ||
rEvent.xclient.message_type == m_nXdndDrop
)
bHandled = handleDropEvent( rEvent.xclient );
@@ -3846,12 +3846,12 @@ void SelectionManager::shutdown() throw()
* Allow thread to finish before app exits to avoid pulling the carpet
* out from under it if pasting is occuring during shutdown
*
- * a) allow it to have the Mutex and
+ * a) allow it to have the Mutex and
* b) reschedule to allow it to complete callbacks to any
* Application::GetSolarMutex protected regions, etc. e.g.
* TransferableHelper::getTransferDataFlavors (via
* SelectionManager::handleSelectionRequest) which it might
- * currently be trying to enter.
+ * currently be trying to enter.
*
* Otherwise the thread may be left still waiting on a GlobalMutex
* when that gets destroyed, letting the thread blow up and die
@@ -3889,14 +3889,14 @@ sal_Bool SelectionManager::handleEvent( const Any& event ) throw()
nTimestamp = pEvent->xmotion.time;
else if( pEvent->type == PropertyNotify )
nTimestamp = pEvent->xproperty.time;
-
+
if( nTimestamp != CurrentTime )
{
MutexGuard aGuard(m_aMutex);
-
+
m_nSelectionTimestamp = nTimestamp;
}
-
+
return sal_Bool( handleXEvent( *pEvent ) );
}
else
@@ -3942,10 +3942,10 @@ void SelectionManager::registerHandler( Atom selection, SelectionAdaptor& rAdapt
{
MutexGuard aGuard(m_aMutex);
- Selection* pNewSelection = new Selection();
- pNewSelection->m_pAdaptor = &rAdaptor;
- pNewSelection->m_aAtom = selection;
- m_aSelections[ selection ] = pNewSelection;
+ Selection* pNewSelection = new Selection();
+ pNewSelection->m_pAdaptor = &rAdaptor;
+ pNewSelection->m_aAtom = selection;
+ m_aSelections[ selection ] = pNewSelection;
}
// ------------------------------------------------------------------------
@@ -4044,22 +4044,22 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
// send XdndLeave
XEvent aEvent;
aEvent.type = ClientMessage;
- aEvent.xclient.display = m_pDisplay;
- aEvent.xclient.format = 32;
- aEvent.xclient.message_type = m_nXdndLeave;
- aEvent.xclient.window = m_aDropWindow;
- aEvent.xclient.data.l[0] = m_aWindow;
+ aEvent.xclient.display = m_pDisplay;
+ aEvent.xclient.format = 32;
+ aEvent.xclient.message_type = m_nXdndLeave;
+ aEvent.xclient.window = m_aDropWindow;
+ aEvent.xclient.data.l[0] = m_aWindow;
memset( aEvent.xclient.data.l+1, 0, sizeof(long)*4);
m_aDropWindow = m_aDropProxy = None;
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
}
// notify the listener
DragSourceDropEvent dsde;
- dsde.Source = static_cast< OWeakObject* >(this);
- dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
- dsde.DragSource = static_cast< XDragSource* >(this);
- dsde.DropAction = DNDConstants::ACTION_NONE;
- dsde.DropSuccess = sal_False;
+ dsde.Source = static_cast< OWeakObject* >(this);
+ dsde.DragSourceContext = new DragSourceContext( m_aDropWindow, m_nDragTimestamp, *this );
+ dsde.DragSource = static_cast< XDragSource* >(this);
+ dsde.DropAction = DNDConstants::ACTION_NONE;
+ dsde.DropSuccess = sal_False;
Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
@@ -4068,7 +4068,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
}
/*
- * SelectionAdaptor
+ * SelectionAdaptor
*/
Reference< XTransferable > SelectionManager::getTransferable() throw()
@@ -4099,7 +4099,7 @@ Reference< XInterface > SelectionManager::getReference() throw()
// ------------------------------------------------------------------------
/*
- * SelectionManagerHolder
+ * SelectionManagerHolder
*/
SelectionManagerHolder::SelectionManagerHolder() :
@@ -4139,7 +4139,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) thro
}
/*
- * XDragSource
+ * XDragSource
*/
sal_Bool SelectionManagerHolder::isDragImageSupported() throw()
@@ -4170,7 +4170,7 @@ void SelectionManagerHolder::startDrag(
// ------------------------------------------------------------------------
/*
- * XServiceInfo
+ * XServiceInfo
*/
// ------------------------------------------------------------------------
diff --git a/vcl/unx/source/dtrans/X11_selection.hxx b/vcl/unx/source/dtrans/X11_selection.hxx
index 47baa1776d1a..ba037e143c72 100644
--- a/vcl/unx/source/dtrans/X11_selection.hxx
+++ b/vcl/unx/source/dtrans/X11_selection.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,11 +82,11 @@ namespace x11 {
>
{
public:
- ::osl::Mutex m_aMutex;
- bool m_bActive;
- sal_Int8 m_nDefaultActions;
- XLIB_Window m_aTargetWindow;
- class SelectionManager* m_pSelectionManager;
+ ::osl::Mutex m_aMutex;
+ bool m_bActive;
+ sal_Int8 m_nDefaultActions;
+ XLIB_Window m_aTargetWindow;
+ class SelectionManager* m_pSelectionManager;
Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
m_xSelectionManager;
::std::list< Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > >
@@ -102,19 +102,19 @@ namespace x11 {
void drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw();
// XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception );
+ virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception );
// XDropTarget
- virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
- virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
- virtual sal_Bool SAL_CALL isActive() throw();
- virtual void SAL_CALL setActive( sal_Bool active ) throw();
- virtual sal_Int8 SAL_CALL getDefaultActions() throw();
- virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw();
+ virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual sal_Bool SAL_CALL isActive() throw();
+ virtual void SAL_CALL setActive( sal_Bool active ) throw();
+ virtual sal_Int8 SAL_CALL getDefaultActions() throw();
+ virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw();
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw();
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw();
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw();
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
SAL_CALL getSupportedServiceNames() throw();
};
@@ -135,17 +135,17 @@ namespace x11 {
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw();
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw();
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw();
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
SAL_CALL getSupportedServiceNames() throw();
// XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
+ virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
// XDragSource
- virtual sal_Bool SAL_CALL isDragImageSupported() throw();
- virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw();
- virtual void SAL_CALL startDrag(
+ virtual sal_Bool SAL_CALL isDragImageSupported() throw();
+ virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw();
+ virtual void SAL_CALL startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
@@ -153,8 +153,8 @@ namespace x11 {
) throw();
};
-
-
+
+
class SelectionManager :
public ::cppu::WeakImplHelper4<
::com::sun::star::datatransfer::dnd::XDragSource,
@@ -175,13 +175,13 @@ namespace x11 {
// property used to transfer the data
struct IncrementalTransfer
{
- Sequence< sal_Int8 > m_aData;
- int m_nBufferPos;
- XLIB_Window m_aRequestor;
- Atom m_aProperty;
- Atom m_aTarget;
- int m_nFormat;
- int m_nTransferStartTime;
+ Sequence< sal_Int8 > m_aData;
+ int m_nBufferPos;
+ XLIB_Window m_aRequestor;
+ Atom m_aProperty;
+ Atom m_aTarget;
+ int m_nFormat;
+ int m_nTransferStartTime;
};
int m_nIncrementalThreshold;
@@ -193,26 +193,26 @@ namespace x11 {
Inactive, WaitingForResponse, WaitingForData, IncrementalTransfer
};
- State m_eState;
- SelectionAdaptor* m_pAdaptor;
- Atom m_aAtom;
- ::osl::Condition m_aDataArrived;
- Sequence< sal_Int8 > m_aData;
+ State m_eState;
+ SelectionAdaptor* m_pAdaptor;
+ Atom m_aAtom;
+ ::osl::Condition m_aDataArrived;
+ Sequence< sal_Int8 > m_aData;
Sequence< ::com::sun::star::datatransfer::DataFlavor >
m_aTypes;
- std::vector< Atom > m_aNativeTypes;
+ std::vector< Atom > m_aNativeTypes;
// this is used for caching
// m_aTypes is invalid after 2 seconds
// m_aNativeTypes contains the corresponding original atom
- Atom m_aRequestedType;
+ Atom m_aRequestedType;
// m_aRequestedType is only valid while WaitingForResponse and WaitingFotData
- int m_nLastTimestamp;
- bool m_bHaveUTF16;
+ int m_nLastTimestamp;
+ bool m_bHaveUTF16;
Atom m_aUTF8Type;
- bool m_bHaveCompound;
- bool m_bOwner;
- XLIB_Window m_aLastOwner;
- PixmapHolder* m_pPixmap;
+ bool m_bHaveCompound;
+ bool m_bOwner;
+ XLIB_Window m_aLastOwner;
+ PixmapHolder* m_pPixmap;
// m_nOrigXLIB_Timestamp contains the XLIB_Timestamp at which the seclection
// was acquired; needed for XLIB_TimeSTAMP target
XLIB_Time m_nOrigTimestamp;
@@ -235,8 +235,8 @@ namespace x11 {
// a struct to hold data associated with a XDropTarget
struct DropTargetEntry
{
- DropTarget* m_pTarget;
- XLIB_Window m_aRootWindow;
+ DropTarget* m_pTarget;
+ XLIB_Window m_aRootWindow;
DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {}
DropTargetEntry( DropTarget* pTarget ) :
@@ -255,11 +255,11 @@ namespace x11 {
};
// internal data
- Display* m_pDisplay;
- oslThread m_aThread;
- oslThread m_aDragExecuteThread;
- ::osl::Condition m_aDragRunning;
- XLIB_Window m_aWindow;
+ Display* m_pDisplay;
+ oslThread m_aThread;
+ oslThread m_aDragExecuteThread;
+ ::osl::Condition m_aDragRunning;
+ XLIB_Window m_aWindow;
Reference< ::com::sun::star::awt::XDisplayConnection >
m_xDisplayConnection;
Reference< com::sun::star::script::XInvocation >
@@ -276,19 +276,19 @@ namespace x11 {
// with one of our targets. The data.l[0] member
// (conatining the drag source XLIB_Window) is set
// to None while that is not the case
- XClientMessageEvent m_aDropEnterEvent;
+ XClientMessageEvent m_aDropEnterEvent;
// set to false on XdndEnter
// set to true on first XdndPosition or XdndLeave
- bool m_bDropEnterSent;
- XLIB_Window m_aCurrentDropWindow;
+ bool m_bDropEnterSent;
+ XLIB_Window m_aCurrentDropWindow;
// XLIB_Time code of XdndDrop
- XLIB_Time m_nDropTime;
- sal_Int8 m_nLastDropAction;
+ XLIB_Time m_nDropTime;
+ sal_Int8 m_nLastDropAction;
// XTransferable for Xdnd with foreign drag source
Reference< ::com::sun::star::datatransfer::XTransferable >
m_xDropTransferable;
- int m_nLastX, m_nLastY;
- XLIB_Time m_nDropTimestamp;
+ int m_nLastX, m_nLastY;
+ XLIB_Time m_nDropTimestamp;
// set to true when calling drop()
// if another XdndEnter is received this shows that
// someone forgot to call dropComplete - we should reset
@@ -298,32 +298,32 @@ namespace x11 {
// drag only
// None if no Dnd action is running with us as source
- XLIB_Window m_aDropWindow;
+ XLIB_Window m_aDropWindow;
// either m_aDropXLIB_Window or its XdndProxy
- XLIB_Window m_aDropProxy;
- XLIB_Window m_aDragSourceWindow;
+ XLIB_Window m_aDropProxy;
+ XLIB_Window m_aDragSourceWindow;
// XTransferable for Xdnd when we are drag source
Reference< ::com::sun::star::datatransfer::XTransferable >
m_xDragSourceTransferable;
Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >
m_xDragSourceListener;
// root coordinates
- int m_nLastDragX, m_nLastDragY;
+ int m_nLastDragX, m_nLastDragY;
Sequence< ::com::sun::star::datatransfer::DataFlavor >
m_aDragFlavors;
// the rectangle the pointer must leave until a new XdndPosition should
// be sent. empty unless the drop target told to fill
- int m_nNoPosX, m_nNoPosY, m_nNoPosWidth, m_nNoPosHeight;
- unsigned int m_nDragButton;
- sal_Int8 m_nUserDragAction;
- sal_Int8 m_nTargetAcceptAction;
- sal_Int8 m_nSourceActions;
- bool m_bLastDropAccepted;
- bool m_bDropSuccess;
- bool m_bDropSent;
- time_t m_nDropTimeout;
- bool m_bWaitingForPrimaryConversion;
- XLIB_Time m_nDragTimestamp;
+ int m_nNoPosX, m_nNoPosY, m_nNoPosWidth, m_nNoPosHeight;
+ unsigned int m_nDragButton;
+ sal_Int8 m_nUserDragAction;
+ sal_Int8 m_nTargetAcceptAction;
+ sal_Int8 m_nSourceActions;
+ bool m_bLastDropAccepted;
+ bool m_bDropSuccess;
+ bool m_bDropSent;
+ time_t m_nDropTimeout;
+ bool m_bWaitingForPrimaryConversion;
+ XLIB_Time m_nDragTimestamp;
// drag cursors
XLIB_Cursor m_aMoveCursor;
@@ -335,36 +335,36 @@ namespace x11 {
// drag and drop
- int m_nCurrentProtocolVersion;
+ int m_nCurrentProtocolVersion;
::std::hash_map< XLIB_Window, DropTargetEntry >
m_aDropTargets;
// some special atoms that are needed often
- Atom m_nCLIPBOARDAtom;
- Atom m_nTARGETSAtom;
+ Atom m_nCLIPBOARDAtom;
+ Atom m_nTARGETSAtom;
Atom m_nTIMESTAMPAtom;
- Atom m_nTEXTAtom;
- Atom m_nINCRAtom;
- Atom m_nCOMPOUNDAtom;
- Atom m_nMULTIPLEAtom;
- Atom m_nUTF16Atom;
+ Atom m_nTEXTAtom;
+ Atom m_nINCRAtom;
+ Atom m_nCOMPOUNDAtom;
+ Atom m_nMULTIPLEAtom;
+ Atom m_nUTF16Atom;
Atom m_nImageBmpAtom;
- Atom m_nXdndAware;
- Atom m_nXdndEnter;
- Atom m_nXdndLeave;
- Atom m_nXdndPosition;
- Atom m_nXdndStatus;
- Atom m_nXdndDrop;
- Atom m_nXdndFinished;
- Atom m_nXdndSelection;
- Atom m_nXdndTypeList;
- Atom m_nXdndProxy;
- Atom m_nXdndActionCopy;
- Atom m_nXdndActionMove;
- Atom m_nXdndActionLink;
- Atom m_nXdndActionAsk;
- Atom m_nXdndActionPrivate;
+ Atom m_nXdndAware;
+ Atom m_nXdndEnter;
+ Atom m_nXdndLeave;
+ Atom m_nXdndPosition;
+ Atom m_nXdndStatus;
+ Atom m_nXdndDrop;
+ Atom m_nXdndFinished;
+ Atom m_nXdndSelection;
+ Atom m_nXdndTypeList;
+ Atom m_nXdndProxy;
+ Atom m_nXdndActionCopy;
+ Atom m_nXdndActionMove;
+ Atom m_nXdndActionLink;
+ Atom m_nXdndActionAsk;
+ Atom m_nXdndActionPrivate;
// caching for atoms
::std::hash_map< Atom, ::rtl::OUString >
@@ -378,12 +378,12 @@ namespace x11 {
// IncrementalTransfers in progress
std::hash_map< XLIB_Window, std::hash_map< Atom, IncrementalTransfer > >
m_aIncrementals;
-
+
// do not use X11 multithreading capabilities
// since this leads to deadlocks in different Xlib implentations
// (XFree as well as Xsun) use an own mutex instead
- ::osl::Mutex m_aMutex;
-
+ ::osl::Mutex m_aMutex;
+
SelectionManager();
~SelectionManager();
@@ -406,7 +406,7 @@ namespace x11 {
XLIB_Cursor createCursor( const char* pPointerData, const char* pMaskData, int width, int height, int hotX, int hotY );
// coordinates on root XLIB_Window
void updateDragWindow( int nX, int nY, XLIB_Window aRoot );
-
+
bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData );
// returns true if conversion was successful
bool convertData( const Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
@@ -442,14 +442,14 @@ namespace x11 {
Display * getDisplay() { return m_pDisplay; };
XLIB_Window getWindow() { return m_aWindow; };
-
+
void registerHandler( Atom selection, SelectionAdaptor& rAdaptor );
void deregisterHandler( Atom selection );
bool requestOwnership( Atom selection );
-
+
// allow for synchronization over one mutex for XClipboard
osl::Mutex& getMutex() { return m_aMutex; }
-
+
Atom getAtom( const ::rtl::OUString& rString );
const ::rtl::OUString& getString( Atom nAtom );
@@ -483,15 +483,15 @@ namespace x11 {
void shutdown() throw();
// XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
+ virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
// XEventHandler
- virtual sal_Bool SAL_CALL handleEvent( const Any& event ) throw();
+ virtual sal_Bool SAL_CALL handleEvent( const Any& event ) throw();
// XDragSource
- virtual sal_Bool SAL_CALL isDragImageSupported() throw();
- virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw();
- virtual void SAL_CALL startDrag(
+ virtual sal_Bool SAL_CALL isDragImageSupported() throw();
+ virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw();
+ virtual void SAL_CALL startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
@@ -517,11 +517,11 @@ namespace x11 {
// ------------------------------------------------------------------------
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Xdnd_getSupportedServiceNames();
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_createInstance(
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_createInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Xdnd_dropTarget_getSupportedServiceNames();
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_dropTarget_createInstance(
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_dropTarget_createInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
// ------------------------------------------------------------------------
diff --git a/vcl/unx/source/dtrans/X11_service.cxx b/vcl/unx/source/dtrans/X11_service.cxx
index e14d81643553..2f7b704bedad 100644
--- a/vcl/unx/source/dtrans/X11_service.cxx
+++ b/vcl/unx/source/dtrans/X11_service.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,29 +75,29 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
OUString aDisplayName;
Atom nSelection;
-
+
// extract display name from connection argument. An exception is thrown
- // by SelectionManager.initialize() if no display connection is given.
+ // by SelectionManager.initialize() if no display connection is given.
if( arguments.getLength() > 0 )
{
Reference< XDisplayConnection > xConn;
arguments.getConstArray()[0] >>= xConn;
-
+
if( xConn.is() )
{
Any aIdentifier = xConn->getIdentifier();
aIdentifier >>= aDisplayName;
}
}
-
+
SelectionManager& rManager = SelectionManager::get( aDisplayName );
rManager.initialize( arguments );
-
+
// check if any other selection than clipboard selection is specified
if( arguments.getLength() > 1 )
{
OUString aSelectionName;
-
+
arguments.getConstArray()[1] >>= aSelectionName;
nSelection = rManager.getAtom( aSelectionName );
}
@@ -106,7 +106,7 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
// default atom is clipboard selection
nSelection = rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) );
}
-
+
::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] );
::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection );
if( it != rMap.end() )
diff --git a/vcl/unx/source/dtrans/X11_transferable.cxx b/vcl/unx/source/dtrans/X11_transferable.cxx
index 16518f0b2864..6a09a891a7f9 100644
--- a/vcl/unx/source/dtrans/X11_transferable.cxx
+++ b/vcl/unx/source/dtrans/X11_transferable.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/X11_transferable.hxx b/vcl/unx/source/dtrans/X11_transferable.hxx
index 57f0d6682cab..ffa6a5ccdacd 100644
--- a/vcl/unx/source/dtrans/X11_transferable.hxx
+++ b/vcl/unx/source/dtrans/X11_transferable.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,10 +42,10 @@ namespace x11 {
::com::sun::star::datatransfer::XTransferable >
{
::osl::Mutex m_aMutex;
-
- SelectionManager& m_rManager;
- Reference< XInterface > m_xCreator;
- Atom m_aSelection;
+
+ SelectionManager& m_rManager;
+ Reference< XInterface > m_xCreator;
+ Atom m_aSelection;
public:
X11Transferable( SelectionManager& rManager, const Reference< XInterface >& xCreator, Atom selection = None );
virtual ~X11Transferable();
@@ -54,16 +54,16 @@ namespace x11 {
* XTransferable
*/
- virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
- throw(::com::sun::star::datatransfer::UnsupportedFlavorException,
- ::com::sun::star::io::IOException,
+ virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+ throw(::com::sun::star::datatransfer::UnsupportedFlavorException,
+ ::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException
);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( )
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( )
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+ virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
throw(::com::sun::star::uno::RuntimeException);
};
diff --git a/vcl/unx/source/dtrans/bmp.cxx b/vcl/unx/source/dtrans/bmp.cxx
index 1ccd04eba725..83647e9b02d1 100644
--- a/vcl/unx/source/dtrans/bmp.cxx
+++ b/vcl/unx/source/dtrans/bmp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,8 +87,8 @@ BmpTransporter::BmpTransporter( const Sequence<sal_Int8>& rBmp ) :
if( pData[0] == 'B' || pData[1] == 'M' )
{
pData = pData+14;
- m_aSize.Width = readLE32( pData+4 );
- m_aSize.Height = readLE32( pData+8 );
+ m_aSize.Width = readLE32( pData+4 );
+ m_aSize.Height = readLE32( pData+8 );
}
else
m_aSize.Width = m_aSize.Height = 0;
@@ -407,17 +407,17 @@ PixmapHolder::PixmapHolder( Display* pDisplay ) :
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "PixmapHolder reverting to default visual\n" );
#endif
- Visual* pVisual = DefaultVisual( m_pDisplay, DefaultScreen( m_pDisplay ) );
- m_aInfo.screen = DefaultScreen( m_pDisplay );
- m_aInfo.visual = pVisual;
- m_aInfo.visualid = pVisual->visualid;
- m_aInfo.c_class = pVisual->c_class;
- m_aInfo.red_mask = pVisual->red_mask;
- m_aInfo.green_mask = pVisual->green_mask;
- m_aInfo.blue_mask = pVisual->blue_mask;
- m_aInfo.depth = DefaultDepth( m_pDisplay, m_aInfo.screen );
+ Visual* pVisual = DefaultVisual( m_pDisplay, DefaultScreen( m_pDisplay ) );
+ m_aInfo.screen = DefaultScreen( m_pDisplay );
+ m_aInfo.visual = pVisual;
+ m_aInfo.visualid = pVisual->visualid;
+ m_aInfo.c_class = pVisual->c_class;
+ m_aInfo.red_mask = pVisual->red_mask;
+ m_aInfo.green_mask = pVisual->green_mask;
+ m_aInfo.blue_mask = pVisual->blue_mask;
+ m_aInfo.depth = DefaultDepth( m_pDisplay, m_aInfo.screen );
}
- m_aColormap = DefaultColormap( m_pDisplay, m_aInfo.screen );
+ m_aColormap = DefaultColormap( m_pDisplay, m_aInfo.screen );
#if OSL_DEBUG_LEVEL > 1
static const char* pClasses[] =
{ "StaticGray", "GrayScale", "StaticColor", "PseudoColor", "TrueColor", "DirectColor" };
@@ -476,17 +476,17 @@ void PixmapHolder::setBitmapDataPalette( const sal_uInt8* pData, XImage* pImage
XColor aPalette[256];
sal_uInt32 nColors = readLE32( pData+32 );
- sal_uInt32 nWidth = readLE32( pData+4 );
- sal_uInt32 nHeight = readLE32( pData+8 );
+ sal_uInt32 nWidth = readLE32( pData+4 );
+ sal_uInt32 nHeight = readLE32( pData+8 );
sal_uInt16 nDepth = readLE16( pData+14 );
for( sal_uInt16 i = 0 ; i < nColors; i++ )
{
if( m_aInfo.c_class != TrueColor )
{
- aPalette[i].red = ((unsigned short)pData[42 + i*4]) << 8 | ((unsigned short)pData[42 + i*4]);
- aPalette[i].green = ((unsigned short)pData[41 + i*4]) << 8 | ((unsigned short)pData[41 + i*4]);
- aPalette[i].blue = ((unsigned short)pData[40 + i*4]) << 8 | ((unsigned short)pData[40 + i*4]);
+ aPalette[i].red = ((unsigned short)pData[42 + i*4]) << 8 | ((unsigned short)pData[42 + i*4]);
+ aPalette[i].green = ((unsigned short)pData[41 + i*4]) << 8 | ((unsigned short)pData[41 + i*4]);
+ aPalette[i].blue = ((unsigned short)pData[40 + i*4]) << 8 | ((unsigned short)pData[40 + i*4]);
XAllocColor( m_pDisplay, m_aColormap, aPalette+i );
}
else
@@ -550,10 +550,10 @@ void PixmapHolder::setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage
for( int b = 0; b < 6; b++ )
{
int i = r*36+g*6+b;
- aPalette[i].red = r == 5 ? 0xffff : r*10922;
- aPalette[i].green = g == 5 ? 0xffff : g*10922;
- aPalette[i].blue = b == 5 ? 0xffff : b*10922;
- aPalette[i].pixel = 0;
+ aPalette[i].red = r == 5 ? 0xffff : r*10922;
+ aPalette[i].green = g == 5 ? 0xffff : g*10922;
+ aPalette[i].blue = b == 5 ? 0xffff : b*10922;
+ aPalette[i].pixel = 0;
if( ! XAllocColor( m_pDisplay, m_aColormap, aPalette+i ) )
nNonAllocs++;
}
@@ -579,8 +579,8 @@ void PixmapHolder::setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage
}
}
- sal_uInt32 nWidth = readLE32( pData+4 );
- sal_uInt32 nHeight = readLE32( pData+8 );
+ sal_uInt32 nWidth = readLE32( pData+4 );
+ sal_uInt32 nHeight = readLE32( pData+8 );
const sal_uInt8* pBMData = pData + readLE32( pData );
sal_uInt32 nScanlineSize = nWidth*3;
@@ -608,8 +608,8 @@ void PixmapHolder::setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage
void PixmapHolder::setBitmapDataTC( const sal_uInt8* pData, XImage* pImage )
{
- sal_uInt32 nWidth = readLE32( pData+4 );
- sal_uInt32 nHeight = readLE32( pData+8 );
+ sal_uInt32 nWidth = readLE32( pData+4 );
+ sal_uInt32 nHeight = readLE32( pData+8 );
const sal_uInt8* pBMData = pData + readLE32( pData );
sal_uInt32 nScanlineSize = nWidth*3;
@@ -663,9 +663,9 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData )
if( readLE32( pData + 16 ) != 0 )
return None;
- sal_uInt32 nWidth = readLE32( pData+4 );
- sal_uInt32 nHeight = readLE32( pData+8 );
-
+ sal_uInt32 nWidth = readLE32( pData+4 );
+ sal_uInt32 nHeight = readLE32( pData+8 );
+
if( m_aPixmap != None )
XFreePixmap( m_pDisplay, m_aPixmap ), m_aPixmap = None;
if( m_aBitmap != None )
@@ -678,25 +678,25 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData )
if( m_aPixmap != None )
{
XImage aImage;
- aImage.width = (int)nWidth;
- aImage.height = (int)nHeight;
- aImage.xoffset = 0;
- aImage.format = ZPixmap;
- aImage.data = NULL;
- aImage.byte_order = ImageByteOrder( m_pDisplay );
- aImage.bitmap_unit = BitmapUnit( m_pDisplay );
- aImage.bitmap_bit_order = BitmapBitOrder( m_pDisplay );
- aImage.bitmap_pad = BitmapPad( m_pDisplay );
- aImage.depth = m_aInfo.depth;
- aImage.red_mask = m_aInfo.red_mask;
- aImage.green_mask = m_aInfo.green_mask;
- aImage.blue_mask = m_aInfo.blue_mask;
- aImage.bytes_per_line = 0; // filled in by XInitImage
+ aImage.width = (int)nWidth;
+ aImage.height = (int)nHeight;
+ aImage.xoffset = 0;
+ aImage.format = ZPixmap;
+ aImage.data = NULL;
+ aImage.byte_order = ImageByteOrder( m_pDisplay );
+ aImage.bitmap_unit = BitmapUnit( m_pDisplay );
+ aImage.bitmap_bit_order = BitmapBitOrder( m_pDisplay );
+ aImage.bitmap_pad = BitmapPad( m_pDisplay );
+ aImage.depth = m_aInfo.depth;
+ aImage.red_mask = m_aInfo.red_mask;
+ aImage.green_mask = m_aInfo.green_mask;
+ aImage.blue_mask = m_aInfo.blue_mask;
+ aImage.bytes_per_line = 0; // filled in by XInitImage
if( m_aInfo.depth <= 8 )
aImage.bits_per_pixel = m_aInfo.depth;
else
aImage.bits_per_pixel = 8*((m_aInfo.depth+7)/8);
- aImage.obdata = NULL;
+ aImage.obdata = NULL;
XInitImage( &aImage );
aImage.data = (char*)rtl_allocateMemory( nHeight*aImage.bytes_per_line );
diff --git a/vcl/unx/source/dtrans/bmp.hxx b/vcl/unx/source/dtrans/bmp.hxx
index b59b4417ca69..f8bc3a79bdc6 100644
--- a/vcl/unx/source/dtrans/bmp.hxx
+++ b/vcl/unx/source/dtrans/bmp.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,16 +53,16 @@ void X11_freeBmp( sal_uInt8* pBmp );
class PixmapHolder
{
- Display* m_pDisplay;
- Colormap m_aColormap;
- Pixmap m_aPixmap;
- Pixmap m_aBitmap;
- XVisualInfo m_aInfo;
+ Display* m_pDisplay;
+ Colormap m_aColormap;
+ Pixmap m_aPixmap;
+ Pixmap m_aBitmap;
+ XVisualInfo m_aInfo;
- int m_nRedShift, m_nRedShift2;
- int m_nGreenShift, m_nGreenShift2;
- int m_nBlueShift, m_nBlueShift2;
- unsigned long m_nBlueShift2Mask, m_nRedShift2Mask, m_nGreenShift2Mask;
+ int m_nRedShift, m_nRedShift2;
+ int m_nGreenShift, m_nGreenShift2;
+ int m_nBlueShift, m_nBlueShift2;
+ unsigned long m_nBlueShift2Mask, m_nRedShift2Mask, m_nGreenShift2Mask;
// these expect data pointers to bitmapinfo header
void setBitmapDataTC( const sal_uInt8* pData, XImage* pImage );
@@ -89,12 +89,12 @@ public:
class BmpTransporter :
public cppu::WeakImplHelper1< com::sun::star::awt::XBitmap >
{
- com::sun::star::uno::Sequence<sal_Int8> m_aBM;
- com::sun::star::awt::Size m_aSize;
+ com::sun::star::uno::Sequence<sal_Int8> m_aBM;
+ com::sun::star::awt::Size m_aSize;
public:
BmpTransporter( const com::sun::star::uno::Sequence<sal_Int8>& rBmp );
virtual ~BmpTransporter();
-
+
virtual com::sun::star::awt::Size SAL_CALL getSize() throw();
virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getDIB() throw();
virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw();
diff --git a/vcl/unx/source/dtrans/config.cxx b/vcl/unx/source/dtrans/config.cxx
index 001da3900bb7..525ce9d651fb 100644
--- a/vcl/unx/source/dtrans/config.cxx
+++ b/vcl/unx/source/dtrans/config.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@ class DtransX11ConfigItem : public ::utl::ConfigItem
sal_Int32 m_nSelectionTimeout;
virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames );
- virtual void Commit();
+ virtual void Commit();
public:
DtransX11ConfigItem();
virtual ~DtransX11ConfigItem();
diff --git a/vcl/unx/source/dtrans/copydata_curs.h b/vcl/unx/source/dtrans/copydata_curs.h
index e3d0e3e76530..a5e78e1ce2c4 100644
--- a/vcl/unx/source/dtrans/copydata_curs.h
+++ b/vcl/unx/source/dtrans/copydata_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/copydata_mask.h b/vcl/unx/source/dtrans/copydata_mask.h
index f25b0863d807..99f09cb64d6d 100644
--- a/vcl/unx/source/dtrans/copydata_mask.h
+++ b/vcl/unx/source/dtrans/copydata_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/linkdata_curs.h b/vcl/unx/source/dtrans/linkdata_curs.h
index c60edc3b99d0..2c855fc009de 100644
--- a/vcl/unx/source/dtrans/linkdata_curs.h
+++ b/vcl/unx/source/dtrans/linkdata_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/linkdata_mask.h b/vcl/unx/source/dtrans/linkdata_mask.h
index cf0f89f63b1b..98f16e4bd01a 100644
--- a/vcl/unx/source/dtrans/linkdata_mask.h
+++ b/vcl/unx/source/dtrans/linkdata_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/movedata_curs.h b/vcl/unx/source/dtrans/movedata_curs.h
index b79412bc3f41..062196de77ef 100644
--- a/vcl/unx/source/dtrans/movedata_curs.h
+++ b/vcl/unx/source/dtrans/movedata_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/movedata_mask.h b/vcl/unx/source/dtrans/movedata_mask.h
index e25d0837d8dc..5d0f8b837851 100644
--- a/vcl/unx/source/dtrans/movedata_mask.h
+++ b/vcl/unx/source/dtrans/movedata_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/nodrop_curs.h b/vcl/unx/source/dtrans/nodrop_curs.h
index 8e208e32f293..ccce5f28ad22 100644
--- a/vcl/unx/source/dtrans/nodrop_curs.h
+++ b/vcl/unx/source/dtrans/nodrop_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/dtrans/nodrop_mask.h b/vcl/unx/source/dtrans/nodrop_mask.h
index 7cbecef2c60f..d467650902ca 100644
--- a/vcl/unx/source/dtrans/nodrop_mask.h
+++ b/vcl/unx/source/dtrans/nodrop_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/fontmanager/adobeenc.tab b/vcl/unx/source/fontmanager/adobeenc.tab
index 492e92f3fcf2..26a03bf99059 100644
--- a/vcl/unx/source/fontmanager/adobeenc.tab
+++ b/vcl/unx/source/fontmanager/adobeenc.tab
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,9 +26,9 @@
************************************************************************/
struct AdobeEncEntry {
- sal_Unicode aUnicode;
- sal_uInt8 aAdobeStandardCode;
- const char* const pAdobename;
+ sal_Unicode aUnicode;
+ sal_uInt8 aAdobeStandardCode;
+ const char* const pAdobename;
};
static const AdobeEncEntry aAdobeCodes[]=
diff --git a/vcl/unx/source/fontmanager/fontcache.cxx b/vcl/unx/source/fontmanager/fontcache.cxx
index db4a7d05e5fc..cbce73101814 100644
--- a/vcl/unx/source/fontmanager/fontcache.cxx
+++ b/vcl/unx/source/fontmanager/fontcache.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -258,7 +258,7 @@ void FontCache::read()
#endif
return;
}
-
+
ByteString aLine;
aStream.ReadLine( aLine );
@@ -269,7 +269,7 @@ void FontCache::read()
#endif
return;
}
-
+
int nDir = 0;
FontDirMap* pDir = NULL;
xub_StrLen nIndex;
@@ -302,7 +302,7 @@ void FontCache::read()
// is the directory modified ?
struct stat aStat;
- if( stat( aDir.getStr(), &aStat ) ||
+ if( stat( aDir.getStr(), &aStat ) ||
! S_ISDIR(aStat.st_mode) )
{
// remove outdated cache data
@@ -325,12 +325,12 @@ void FontCache::read()
{
OString aFile( aLine.Copy( 5 ) );
aStream.ReadLine( aLine );
-
+
const char* pLine = aLine.GetBuffer();
fonttype::type eType = (fonttype::type)atoi( pLine );
- if( eType != fonttype::TrueType &&
- eType != fonttype::Type1 &&
+ if( eType != fonttype::TrueType &&
+ eType != fonttype::Type1 &&
eType != fonttype::Builtin
)
continue;
@@ -338,15 +338,15 @@ void FontCache::read()
pLine++;
if( *pLine != ';' )
continue;
-
+
pLine++;
- sal_Int32 nFonts = atoi( pLine );
+ sal_Int32 nFonts = atoi( pLine );
for( int n = 0; n < nFonts; n++ )
{
aStream.ReadLine( aLine );
pLine = aLine.GetBuffer();
int nLen = aLine.Len();
-
+
PrintFontManager::PrintFont* pFont = NULL;
switch( eType )
{
@@ -361,10 +361,10 @@ void FontCache::read()
break;
default: break;
}
-
+
for( nIndex = 0; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ )
;
-
+
pFont->m_nFamilyName = pAtoms->getAtom( ATOM_FAMILYNAME,
OUString( pLine, nIndex, RTL_TEXTENCODING_UTF8 ),
sal_True );
@@ -382,7 +382,7 @@ void FontCache::read()
aStream.ReadLine( aLine );
pLine = aLine.GetBuffer();
nLen = aLine.Len();
-
+
// get up to 20 token positions
const int nMaxTokens = 20;
int nTokenPos[nMaxTokens];
@@ -487,8 +487,8 @@ void FontCache::read()
delete pFont;
continue;
}
-
- FontCacheEntry& rEntry = (*pDir)[aFile].m_aEntry;
+
+ FontCacheEntry& rEntry = (*pDir)[aFile].m_aEntry;
rEntry.push_back( pFont );
}
}
@@ -504,7 +504,7 @@ void FontCache::updateDirTimestamp( int nDirID )
const OString& rDir = rManager.getDirectory( nDirID );
struct stat aStat;
- if( ! stat( rDir.getStr(), &aStat ) )
+ if( ! stat( rDir.getStr(), &aStat ) )
m_aCache[ nDirID ].m_nTimestamp = (sal_Int64)aStat.st_mtime;
}
@@ -535,24 +535,24 @@ void FontCache::copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFo
break;
default: break;
}
- pTo->m_nFamilyName = pFrom->m_nFamilyName;
+ pTo->m_nFamilyName = pFrom->m_nFamilyName;
pTo->m_aStyleName = pFrom->m_aStyleName;
- pTo->m_aAliases = pFrom->m_aAliases;
- pTo->m_nPSName = pFrom->m_nPSName;
- pTo->m_eItalic = pFrom->m_eItalic;
- pTo->m_eWeight = pFrom->m_eWeight;
- pTo->m_eWidth = pFrom->m_eWidth;
- pTo->m_ePitch = pFrom->m_ePitch;
- pTo->m_aEncoding = pFrom->m_aEncoding;
- pTo->m_aGlobalMetricX = pFrom->m_aGlobalMetricX;
- pTo->m_aGlobalMetricY = pFrom->m_aGlobalMetricY;
- pTo->m_nAscend = pFrom->m_nAscend;
- pTo->m_nDescend = pFrom->m_nDescend;
- pTo->m_nLeading = pFrom->m_nLeading;
- pTo->m_nXMin = pFrom->m_nXMin;
- pTo->m_nYMin = pFrom->m_nYMin;
- pTo->m_nXMax = pFrom->m_nXMax;
- pTo->m_nYMax = pFrom->m_nYMax;
+ pTo->m_aAliases = pFrom->m_aAliases;
+ pTo->m_nPSName = pFrom->m_nPSName;
+ pTo->m_eItalic = pFrom->m_eItalic;
+ pTo->m_eWeight = pFrom->m_eWeight;
+ pTo->m_eWidth = pFrom->m_eWidth;
+ pTo->m_ePitch = pFrom->m_ePitch;
+ pTo->m_aEncoding = pFrom->m_aEncoding;
+ pTo->m_aGlobalMetricX = pFrom->m_aGlobalMetricX;
+ pTo->m_aGlobalMetricY = pFrom->m_aGlobalMetricY;
+ pTo->m_nAscend = pFrom->m_nAscend;
+ pTo->m_nDescend = pFrom->m_nDescend;
+ pTo->m_nLeading = pFrom->m_nLeading;
+ pTo->m_nXMin = pFrom->m_nXMin;
+ pTo->m_nYMin = pFrom->m_nYMin;
+ pTo->m_nXMax = pFrom->m_nXMax;
+ pTo->m_nYMax = pFrom->m_nYMax;
pTo->m_bHaveVerticalSubstitutedGlyphs = pFrom->m_bHaveVerticalSubstitutedGlyphs;
pTo->m_bUserOverride = pFrom->m_bUserOverride;
}
@@ -570,10 +570,10 @@ bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, Print
{
const PrintFontManager::TrueTypeFontFile* pLT = static_cast<const PrintFontManager::TrueTypeFontFile*>(pLeft);
const PrintFontManager::TrueTypeFontFile* pRT = static_cast<const PrintFontManager::TrueTypeFontFile*>(pRight);
- if( pRT->m_nDirectory != pLT->m_nDirectory ||
- pRT->m_aFontFile != pLT->m_aFontFile ||
- pRT->m_nCollectionEntry != pLT->m_nCollectionEntry ||
- pRT->m_nTypeFlags != pLT->m_nTypeFlags )
+ if( pRT->m_nDirectory != pLT->m_nDirectory ||
+ pRT->m_aFontFile != pLT->m_aFontFile ||
+ pRT->m_nCollectionEntry != pLT->m_nCollectionEntry ||
+ pRT->m_nTypeFlags != pLT->m_nTypeFlags )
return false;
}
break;
@@ -581,9 +581,9 @@ bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, Print
{
const PrintFontManager::Type1FontFile* pLT = static_cast<const PrintFontManager::Type1FontFile*>(pLeft);
const PrintFontManager::Type1FontFile* pRT = static_cast<const PrintFontManager::Type1FontFile*>(pRight);
- if( pRT->m_nDirectory != pLT->m_nDirectory ||
- pRT->m_aFontFile != pLT->m_aFontFile ||
- pRT->m_aMetricFile != pLT->m_aMetricFile )
+ if( pRT->m_nDirectory != pLT->m_nDirectory ||
+ pRT->m_aFontFile != pLT->m_aFontFile ||
+ pRT->m_aMetricFile != pLT->m_aMetricFile )
return false;
}
break;
@@ -591,30 +591,30 @@ bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, Print
{
const PrintFontManager::BuiltinFont* pLT = static_cast<const PrintFontManager::BuiltinFont*>(pLeft);
const PrintFontManager::BuiltinFont* pRT = static_cast<const PrintFontManager::BuiltinFont*>(pRight);
- if( pRT->m_nDirectory != pLT->m_nDirectory ||
- pRT->m_aMetricFile != pLT->m_aMetricFile )
+ if( pRT->m_nDirectory != pLT->m_nDirectory ||
+ pRT->m_aMetricFile != pLT->m_aMetricFile )
return false;
}
break;
default: break;
}
- if( pRight->m_nFamilyName != pLeft->m_nFamilyName ||
+ if( pRight->m_nFamilyName != pLeft->m_nFamilyName ||
pRight->m_aStyleName != pLeft->m_aStyleName ||
- pRight->m_nPSName != pLeft->m_nPSName ||
- pRight->m_eItalic != pLeft->m_eItalic ||
- pRight->m_eWeight != pLeft->m_eWeight ||
- pRight->m_eWidth != pLeft->m_eWidth ||
- pRight->m_ePitch != pLeft->m_ePitch ||
- pRight->m_aEncoding != pLeft->m_aEncoding ||
- pRight->m_aGlobalMetricX != pLeft->m_aGlobalMetricX ||
- pRight->m_aGlobalMetricY != pLeft->m_aGlobalMetricY ||
- pRight->m_nAscend != pLeft->m_nAscend ||
- pRight->m_nDescend != pLeft->m_nDescend ||
- pRight->m_nLeading != pLeft->m_nLeading ||
- pRight->m_nXMin != pLeft->m_nXMin ||
- pRight->m_nYMin != pLeft->m_nYMin ||
- pRight->m_nXMax != pLeft->m_nXMax ||
- pRight->m_nYMax != pLeft->m_nYMax ||
+ pRight->m_nPSName != pLeft->m_nPSName ||
+ pRight->m_eItalic != pLeft->m_eItalic ||
+ pRight->m_eWeight != pLeft->m_eWeight ||
+ pRight->m_eWidth != pLeft->m_eWidth ||
+ pRight->m_ePitch != pLeft->m_ePitch ||
+ pRight->m_aEncoding != pLeft->m_aEncoding ||
+ pRight->m_aGlobalMetricX != pLeft->m_aGlobalMetricX ||
+ pRight->m_aGlobalMetricY != pLeft->m_aGlobalMetricY ||
+ pRight->m_nAscend != pLeft->m_nAscend ||
+ pRight->m_nDescend != pLeft->m_nDescend ||
+ pRight->m_nLeading != pLeft->m_nLeading ||
+ pRight->m_nXMin != pLeft->m_nXMin ||
+ pRight->m_nYMin != pLeft->m_nYMin ||
+ pRight->m_nXMax != pLeft->m_nXMax ||
+ pRight->m_nYMax != pLeft->m_nYMax ||
pRight->m_bHaveVerticalSubstitutedGlyphs != pLeft->m_bHaveVerticalSubstitutedGlyphs ||
pRight->m_bUserOverride != pLeft->m_bUserOverride
)
@@ -783,7 +783,7 @@ bool FontCache::scanAdditionalFiles( const OString& rDir )
int nDirID = rManager.getDirectoryAtom( rDir );
FontCacheData::const_iterator dir = m_aCache.find( nDirID );
bool bFound = (dir != m_aCache.end());
-
+
return (bFound && dir->second.m_bUserOverrideOnly);
}
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index 03816857f27c..1208dcb7c07c 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,16 +39,16 @@ using namespace psp;
#include <ft2build.h>
#include <fontconfig/fcfreetype.h>
// allow compile on baseline (currently with fontconfig 2.2.0)
- #ifndef FC_WEIGHT_BOOK // TODO: remove when baseline moves to fc>=2.2.1
+ #ifndef FC_WEIGHT_BOOK // TODO: remove when baseline moves to fc>=2.2.1
#define FC_WEIGHT_BOOK 75
#endif
- #ifndef FC_EMBEDDED_BITMAP // TODO: remove when baseline moves to fc>=2.3.92
+ #ifndef FC_EMBEDDED_BITMAP // TODO: remove when baseline moves to fc>=2.3.92
#define FC_EMBEDDED_BITMAP "embeddedbitmap"
#endif
- #ifndef FC_FAMILYLANG // TODO: remove when baseline moves to fc>=2.2.97
+ #ifndef FC_FAMILYLANG // TODO: remove when baseline moves to fc>=2.2.97
#define FC_FAMILYLANG "familylang"
#endif
- #ifndef FC_HINT_STYLE // TODO: remove when baseline moves to fc>=2.2.91
+ #ifndef FC_HINT_STYLE // TODO: remove when baseline moves to fc>=2.2.91
#define FC_HINT_STYLE "hintstyle"
#define FC_HINT_NONE 0
#define FC_HINT_SLIGHT 1
@@ -93,44 +93,44 @@ using namespace rtl;
class FontCfgWrapper
{
- oslModule m_pLib;
+ oslModule m_pLib;
FcFontSet* m_pOutlineSet;
int m_nFcVersion;
FcBool (*m_pFcInit)();
int (*m_pFcGetVersion)();
- FcConfig* (*m_pFcConfigGetCurrent)();
- FcObjectSet* (*m_pFcObjectSetVaBuild)(const char*,va_list);
- void (*m_pFcObjectSetDestroy)(FcObjectSet* pSet);
- FcPattern* (*m_pFcPatternCreate)();
- void (*m_pFcPatternDestroy)(FcPattern*);
- FcFontSet* (*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*);
+ FcConfig* (*m_pFcConfigGetCurrent)();
+ FcObjectSet* (*m_pFcObjectSetVaBuild)(const char*,va_list);
+ void (*m_pFcObjectSetDestroy)(FcObjectSet* pSet);
+ FcPattern* (*m_pFcPatternCreate)();
+ void (*m_pFcPatternDestroy)(FcPattern*);
+ FcFontSet* (*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*);
FcFontSet* (*m_pFcConfigGetFonts)(FcConfig*,FcSetName);
- FcFontSet* (*m_pFcFontSetCreate)();
+ FcFontSet* (*m_pFcFontSetCreate)();
FcCharSet* (*m_pFcCharSetCreate)();
FcBool (*m_pFcCharSetAddChar)(FcCharSet *, FcChar32);
FcBool (*m_pFcCharSetHasChar)(FcCharSet *, FcChar32);
void (*m_pFcCharSetDestroy)(FcCharSet*);
- void (*m_pFcFontSetDestroy)(FcFontSet*);
- FcBool (*m_pFcFontSetAdd)(FcFontSet*,FcPattern*);
+ void (*m_pFcFontSetDestroy)(FcFontSet*);
+ FcBool (*m_pFcFontSetAdd)(FcFontSet*,FcPattern*);
void (*m_pFcPatternReference)(FcPattern*);
FcResult (*m_pFcPatternGetCharSet)(const FcPattern*,const char*,int,FcCharSet**);
- FcResult (*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**);
- FcResult (*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*);
- FcResult (*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*);
- FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*);
- void (*m_pFcDefaultSubstitute)(FcPattern *);
- FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*);
- FcBool (*m_pFcConfigAppFontAddFile)(FcConfig*, const FcChar8*);
- FcBool (*m_pFcConfigAppFontAddDir)(FcConfig*, const FcChar8*);
- FcBool (*m_pFcConfigParseAndLoad)(FcConfig*,const FcChar8*,FcBool);
-
- FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind);
- FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int);
+ FcResult (*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**);
+ FcResult (*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*);
+ FcResult (*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*);
+ FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*);
+ void (*m_pFcDefaultSubstitute)(FcPattern *);
+ FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*);
+ FcBool (*m_pFcConfigAppFontAddFile)(FcConfig*, const FcChar8*);
+ FcBool (*m_pFcConfigAppFontAddDir)(FcConfig*, const FcChar8*);
+ FcBool (*m_pFcConfigParseAndLoad)(FcConfig*,const FcChar8*,FcBool);
+
+ FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind);
+ FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int);
FcBool (*m_pFcPatternAddDouble)(FcPattern*,const char*,double);
FcBool (*m_pFcPatternAddBool)(FcPattern*,const char*,FcBool);
FcBool (*m_pFcPatternAddCharSet)(FcPattern*,const char*,const FcCharSet*);
- FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*);
+ FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*);
FT_UInt (*m_pFcFreeTypeCharIndex)(FT_Face,FcChar32);
oslGenericFunction loadSymbol( const char* );
@@ -143,14 +143,14 @@ public:
static FontCfgWrapper& get();
static void release();
- bool isValid() const
+ bool isValid() const
{ return m_pLib != NULL;}
FcFontSet* getFontSet();
-
+
FcBool FcInit()
{ return m_pFcInit(); }
-
+
int FcGetVersion()
{ return m_pFcGetVersion(); }
@@ -168,13 +168,13 @@ public:
void FcObjectSetDestroy( FcObjectSet* pSet )
{ m_pFcObjectSetDestroy( pSet ); }
-
+
FcPattern* FcPatternCreate()
{ return m_pFcPatternCreate(); }
void FcPatternDestroy( FcPattern* pPattern )
{ m_pFcPatternDestroy( pPattern ); }
-
+
FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
{ return m_pFcFontList( pConfig, pPattern, pSet ); }
@@ -366,37 +366,37 @@ FontCfgWrapper::FontCfgWrapper()
}
if( ! (
- m_pFcInit &&
- m_pFcGetVersion &&
- m_pFcConfigGetCurrent &&
- m_pFcObjectSetVaBuild &&
- m_pFcObjectSetDestroy &&
- m_pFcPatternCreate &&
- m_pFcPatternDestroy &&
- m_pFcFontList &&
+ m_pFcInit &&
+ m_pFcGetVersion &&
+ m_pFcConfigGetCurrent &&
+ m_pFcObjectSetVaBuild &&
+ m_pFcObjectSetDestroy &&
+ m_pFcPatternCreate &&
+ m_pFcPatternDestroy &&
+ m_pFcFontList &&
m_pFcConfigGetFonts &&
- m_pFcFontSetCreate &&
- m_pFcCharSetCreate &&
- m_pFcCharSetAddChar &&
+ m_pFcFontSetCreate &&
+ m_pFcCharSetCreate &&
+ m_pFcCharSetAddChar &&
m_pFcCharSetHasChar &&
m_pFcCharSetDestroy &&
- m_pFcFontSetDestroy &&
- m_pFcFontSetAdd &&
+ m_pFcFontSetDestroy &&
+ m_pFcFontSetAdd &&
m_pFcPatternReference &&
- m_pFcPatternGetCharSet &&
- m_pFcPatternGetString &&
- m_pFcPatternGetInteger &&
- m_pFcPatternGetDouble &&
- m_pFcPatternGetBool &&
- m_pFcConfigAppFontAddFile &&
- m_pFcConfigAppFontAddDir &&
- m_pFcConfigParseAndLoad &&
- m_pFcDefaultSubstitute &&
- m_pFcConfigSubstitute &&
- m_pFcPatternAddInteger &&
+ m_pFcPatternGetCharSet &&
+ m_pFcPatternGetString &&
+ m_pFcPatternGetInteger &&
+ m_pFcPatternGetDouble &&
+ m_pFcPatternGetBool &&
+ m_pFcConfigAppFontAddFile &&
+ m_pFcConfigAppFontAddDir &&
+ m_pFcConfigParseAndLoad &&
+ m_pFcDefaultSubstitute &&
+ m_pFcConfigSubstitute &&
+ m_pFcPatternAddInteger &&
m_pFcPatternAddDouble &&
- m_pFcPatternAddCharSet &&
- m_pFcPatternAddBool &&
+ m_pFcPatternAddCharSet &&
+ m_pFcPatternAddBool &&
m_pFcPatternAddString
) )
{
@@ -421,7 +421,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
{
#ifdef ENABLE_FONTCONFIG
/*
- add only acceptable outlined fonts to our config,
+ add only acceptable outlined fonts to our config,
for future fontconfig use
*/
FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName );
@@ -432,7 +432,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
{
FcBool outline = false;
FcPattern *pOutlinePattern = pOrig->fonts[i];
- FcResult eOutRes =
+ FcResult eOutRes =
FcPatternGetBool( pOutlinePattern, FC_OUTLINE, 0, &outline );
if( (eOutRes != FcResultMatch) || (outline != FcTrue) )
continue;
@@ -444,7 +444,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
(void)eSetName; // prevent compiler warning about unused parameter
#endif
}
-
+
FcFontSet* FontCfgWrapper::getFontSet()
{
#ifdef ENABLE_FONTCONFIG
@@ -532,9 +532,9 @@ namespace
FcResult FontCfgWrapper::FamilyFromPattern(FcPattern* pPattern, FcChar8 **family)
{
FcChar8 *origfamily;
- FcResult eFamilyRes = FcPatternGetString( pPattern, FC_FAMILY, 0, &origfamily );
+ FcResult eFamilyRes = FcPatternGetString( pPattern, FC_FAMILY, 0, &origfamily );
*family = origfamily;
-
+
if( eFamilyRes == FcResultMatch)
{
FcChar8* familylang = NULL;
@@ -552,13 +552,13 @@ FcResult FontCfgWrapper::FamilyFromPattern(FcPattern* pPattern, FcChar8 **family
lang_and_families.push_back(lang_and_family(familylang, *family));
++k;
}
-
+
//possible to-do, sort by UILocale instead of process locale
rtl_Locale* pLoc;
osl_getProcessLocale(&pLoc);
localizedsorter aSorter(pLoc);
*family = aSorter.bestname(lang_and_families);
-
+
std::vector<lang_and_family>::const_iterator aEnd = lang_and_families.end();
for (std::vector<lang_and_family>::const_iterator aIter = lang_and_families.begin(); aIter != aEnd; ++aIter)
{
@@ -570,7 +570,7 @@ FcResult FontCfgWrapper::FamilyFromPattern(FcPattern* pPattern, FcChar8 **family
m_aLocalizedToCanonical[OString((const char*)(*family))] = OString((const char*)origfamily);
}
}
-
+
return eFamilyRes;
}
@@ -675,16 +675,16 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
int spacing = 0;
int nCollectionEntry = -1;
FcBool outline = false;
-
- FcResult eFileRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FILE, 0, &file );
+
+ FcResult eFileRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FILE, 0, &file );
FcResult eFamilyRes = rWrapper.FamilyFromPattern( pFSet->fonts[i], &family );
- FcResult eStyleRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_STYLE, 0, &style );
- FcResult eSlantRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SLANT, 0, &slant );
- FcResult eWeightRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_WEIGHT, 0, &weight );
- FcResult eSpacRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SPACING, 0, &spacing );
- FcResult eOutRes = rWrapper.FcPatternGetBool( pFSet->fonts[i], FC_OUTLINE, 0, &outline );
+ FcResult eStyleRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_STYLE, 0, &style );
+ FcResult eSlantRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SLANT, 0, &slant );
+ FcResult eWeightRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_WEIGHT, 0, &weight );
+ FcResult eSpacRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SPACING, 0, &spacing );
+ FcResult eOutRes = rWrapper.FcPatternGetBool( pFSet->fonts[i], FC_OUTLINE, 0, &outline );
FcResult eIndexRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry );
-
+
if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch )
continue;
@@ -712,9 +712,9 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
std::list< PrintFont* > aFonts;
OString aDir, aBase, aOrgPath( (sal_Char*)file );
splitPath( aOrgPath, aDir, aBase );
-
+
o_rVisitedPaths[aDir] = 1;
-
+
int nDirID = getDirectoryAtom( aDir, true );
if( ! m_pFontCache->getFontCacheFile( nDirID, aBase, aFonts ) )
{
@@ -769,7 +769,7 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
pUpdate = NULL;
}
}
-
+
if( pUpdate )
{
// set family name
@@ -794,7 +794,7 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
{
pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 );
}
-
+
// update font cache
m_pFontCache->updateFontCacheEntry( pUpdate, false );
// sort into known fonts
@@ -817,7 +817,7 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
}
}
}
-
+
// how does one get rid of the config ?
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "inserted %d fonts from fontconfig\n", nFonts );
@@ -872,7 +872,7 @@ bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName )
return true;
}
-static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
+static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
italic::type eItalic, weight::type eWeight, width::type eWidth, pitch::type ePitch)
{
if( eItalic != italic::Unknown )
@@ -880,8 +880,8 @@ static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
int nSlant = FC_SLANT_ROMAN;
switch( eItalic )
{
- case italic::Italic: nSlant = FC_SLANT_ITALIC;break;
- case italic::Oblique: nSlant = FC_SLANT_OBLIQUE;break;
+ case italic::Italic: nSlant = FC_SLANT_ITALIC;break;
+ case italic::Oblique: nSlant = FC_SLANT_OBLIQUE;break;
default:
break;
}
@@ -892,16 +892,16 @@ static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
int nWeight = FC_WEIGHT_NORMAL;
switch( eWeight )
{
- case weight::Thin: nWeight = FC_WEIGHT_THIN;break;
- case weight::UltraLight: nWeight = FC_WEIGHT_ULTRALIGHT;break;
- case weight::Light: nWeight = FC_WEIGHT_LIGHT;break;
- case weight::SemiLight: nWeight = FC_WEIGHT_BOOK;break;
- case weight::Normal: nWeight = FC_WEIGHT_NORMAL;break;
- case weight::Medium: nWeight = FC_WEIGHT_MEDIUM;break;
- case weight::SemiBold: nWeight = FC_WEIGHT_SEMIBOLD;break;
- case weight::Bold: nWeight = FC_WEIGHT_BOLD;break;
- case weight::UltraBold: nWeight = FC_WEIGHT_ULTRABOLD;break;
- case weight::Black: nWeight = FC_WEIGHT_BLACK;break;
+ case weight::Thin: nWeight = FC_WEIGHT_THIN;break;
+ case weight::UltraLight: nWeight = FC_WEIGHT_ULTRALIGHT;break;
+ case weight::Light: nWeight = FC_WEIGHT_LIGHT;break;
+ case weight::SemiLight: nWeight = FC_WEIGHT_BOOK;break;
+ case weight::Normal: nWeight = FC_WEIGHT_NORMAL;break;
+ case weight::Medium: nWeight = FC_WEIGHT_MEDIUM;break;
+ case weight::SemiBold: nWeight = FC_WEIGHT_SEMIBOLD;break;
+ case weight::Bold: nWeight = FC_WEIGHT_BOLD;break;
+ case weight::UltraBold: nWeight = FC_WEIGHT_ULTRABOLD;break;
+ case weight::Black: nWeight = FC_WEIGHT_BLACK;break;
default:
break;
}
@@ -912,15 +912,15 @@ static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
int nWidth = FC_WIDTH_NORMAL;
switch( eWidth )
{
- case width::UltraCondensed: nWidth = FC_WIDTH_ULTRACONDENSED;break;
+ case width::UltraCondensed: nWidth = FC_WIDTH_ULTRACONDENSED;break;
case width::ExtraCondensed: nWidth = FC_WIDTH_EXTRACONDENSED;break;
- case width::Condensed: nWidth = FC_WIDTH_CONDENSED;break;
- case width::SemiCondensed: nWidth = FC_WIDTH_SEMICONDENSED;break;
- case width::Normal: nWidth = FC_WIDTH_NORMAL;break;
- case width::SemiExpanded: nWidth = FC_WIDTH_SEMIEXPANDED;break;
- case width::Expanded: nWidth = FC_WIDTH_EXPANDED;break;
- case width::ExtraExpanded: nWidth = FC_WIDTH_EXTRAEXPANDED;break;
- case width::UltraExpanded: nWidth = FC_WIDTH_ULTRACONDENSED;break;
+ case width::Condensed: nWidth = FC_WIDTH_CONDENSED;break;
+ case width::SemiCondensed: nWidth = FC_WIDTH_SEMICONDENSED;break;
+ case width::Normal: nWidth = FC_WIDTH_NORMAL;break;
+ case width::SemiExpanded: nWidth = FC_WIDTH_SEMIEXPANDED;break;
+ case width::Expanded: nWidth = FC_WIDTH_EXPANDED;break;
+ case width::ExtraExpanded: nWidth = FC_WIDTH_EXTRAEXPANDED;break;
+ case width::UltraExpanded: nWidth = FC_WIDTH_ULTRACONDENSED;break;
default:
break;
}
@@ -931,8 +931,8 @@ static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
int nSpacing = FC_PROPORTIONAL;
switch( ePitch )
{
- case pitch::Fixed: nSpacing = FC_MONO;break;
- case pitch::Variable: nSpacing = FC_PROPORTIONAL;break;
+ case pitch::Fixed: nSpacing = FC_MONO;break;
+ case pitch::Variable: nSpacing = FC_PROPORTIONAL;break;
default:
break;
}
@@ -1056,7 +1056,7 @@ rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName,
return aName;
}
-bool PrintFontManager::getFontOptions(
+bool PrintFontManager::getFontOptions(
const FastPrintFontInfo& rInfo, int nSize, void (*subcallback)(void*),
ImplFontOptions& rOptions) const
{
@@ -1101,13 +1101,13 @@ bool PrintFontManager::getFontOptions(
FC_EMBEDDED_BITMAP, 0, &embitmap);
FcResult eAntialias = rWrapper.FcPatternGetBool(pSet->fonts[0],
FC_ANTIALIAS, 0, &antialias);
- FcResult eAutoHint = rWrapper.FcPatternGetBool(pSet->fonts[0],
+ FcResult eAutoHint = rWrapper.FcPatternGetBool(pSet->fonts[0],
FC_AUTOHINT, 0, &autohint);
- FcResult eHinting = rWrapper.FcPatternGetBool(pSet->fonts[0],
+ FcResult eHinting = rWrapper.FcPatternGetBool(pSet->fonts[0],
FC_HINTING, 0, &hinting);
/*FcResult eHintStyle =*/ rWrapper.FcPatternGetInteger( pSet->fonts[0],
FC_HINT_STYLE, 0, &hintstyle);
-
+
if( eEmbeddedBitmap == FcResultMatch )
rOptions.meEmbeddedBitmap = embitmap ? EMBEDDEDBITMAP_TRUE : EMBEDDEDBITMAP_FALSE;
if( eAntialias == FcResultMatch )
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index 21183dc567ec..a9d45ea6ca77 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -375,10 +375,10 @@ PrintFontManager::Type1FontFile::~Type1FontFile()
// -------------------------------------------------------------------------
PrintFontManager::TrueTypeFontFile::TrueTypeFontFile()
-: PrintFont( fonttype::TrueType )
-, m_nDirectory( 0 )
-, m_nCollectionEntry(-1)
-, m_nTypeFlags( TYPEFLAG_INVALID )
+: PrintFont( fonttype::TrueType )
+, m_nDirectory( 0 )
+, m_nCollectionEntry(-1)
+, m_nTypeFlags( TYPEFLAG_INVALID )
{}
// -------------------------------------------------------------------------
@@ -592,13 +592,13 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
if( nGlyph != 0 )
aGlyphMap[ nGlyph ] = (sal_Unicode)i;
}
-
+
// Loop through each of the 'kern' subtables
KernPair aPair;
for( i = 0; (unsigned int)i < pImplTTFont->nkern; i++ )
{
const sal_uInt8* pTable = pImplTTFont->kerntables[i];
-
+
/*sal_uInt32 nLength =*/ getUInt32BE( pTable );
sal_uInt16 nCoverage = getUInt16BE( pTable );
/*sal_uInt16 nTupleIndex =*/ getUInt16BE( pTable );
@@ -610,7 +610,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
// Kerning sub-table format, 0 through 3
sal_uInt8 nSubTableFormat = nCoverage & 0x00FF;
-
+
aPair.kern_x = 0;
aPair.kern_y = 0;
switch( nSubTableFormat )
@@ -651,7 +651,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
case 0:
aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm;
m_pMetrics->m_aYKernPairs.push_back( aPair );
- break;
+ break;
}
*/
}
@@ -687,7 +687,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
case 0:
aPair.kern_y = (int)nKern * 1000 / pImplTTFont->unitsPerEm;
m_pMetrics->m_aYKernPairs.push_back( aPair );
- break;
+ break;
}
}
}
@@ -785,7 +785,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
}
else
aFamily = pProvider->getString( ATOM_FAMILYNAME, m_nFamilyName );
-
+
// style name: if fullname begins with family name
// interpret the rest of fullname as style
if( ! m_aStyleName.getLength() && pInfo->gfi->fullName && *pInfo->gfi->fullName )
@@ -829,7 +829,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW )
m_aEncoding = nAdobeEncoding == 1 ?
- RTL_TEXTENCODING_ADOBE_STANDARD : RTL_TEXTENCODING_SYMBOL;
+ RTL_TEXTENCODING_ADOBE_STANDARD : RTL_TEXTENCODING_SYMBOL;
}
else if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW )
m_aEncoding = RTL_TEXTENCODING_ADOBE_STANDARD;
@@ -924,7 +924,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
bFillEncodingvector = false; // will be filled anyway, don't do the work twice
}
}
-
+
// ascend
m_nAscend = pInfo->gfi->fontBBox.ury;
@@ -961,12 +961,12 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
if( bFillEncodingvector || !bOnlyGlobalAttributes )
{
// fill in character metrics
-
+
// first transform the character codes to unicode
// note: this only works with single byte encodings
sal_Unicode* pUnicodes = (sal_Unicode*)alloca( pInfo->numOfChars * sizeof(sal_Unicode));
CharMetricInfo* pChar = pInfo->cmi;
-
+
for( i = 0; i < pInfo->numOfChars; i++, pChar++ )
{
if( nAdobeEncoding == 4 )
@@ -997,13 +997,13 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
m_aEncodingVector[ pUnicodes[i] ] = pChar->code;
continue;
}
-
+
if( m_aEncoding == RTL_TEXTENCODING_UNICODE )
{
pUnicodes[i] = (sal_Unicode)pChar->code;
continue;
}
-
+
ByteString aTranslate;
if( pChar->code & 0xff000000 )
aTranslate += (char)(pChar->code >> 24 );
@@ -1018,7 +1018,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
else
pUnicodes[i] = 0;
}
-
+
// now fill in the character metrics
// parseAFM.cxx effectively only supports direction 0 (horizontal)
pChar = pInfo->cmi;
@@ -1027,7 +1027,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
{
if( pChar->code == -1 && ! pChar->name )
continue;
-
+
if( bFillEncodingvector && pChar->name )
{
std::list< sal_Unicode > aCodes = rManager.getUnicodeFromAdobeName( pChar->name );
@@ -1041,13 +1041,13 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
}
}
}
-
+
aMetric.width = pChar->wx ? pChar->wx : pChar->charBBox.urx;
aMetric.height = pChar->wy ? pChar->wy : pChar->charBBox.ury - pChar->charBBox.lly;
if( aMetric.width == 0 && aMetric.height == 0 )
// guess something for e.g. space
aMetric.width = m_aGlobalMetricX.width/4;
-
+
if( ( nAdobeEncoding == 0 ) ||
( ( nAdobeEncoding == 3 ) && ( m_aEncoding != RTL_TEXTENCODING_SYMBOL ) ) )
{
@@ -1107,10 +1107,10 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
}
}
}
-
+
m_pMetrics->m_aXKernPairs.clear();
m_pMetrics->m_aYKernPairs.clear();
-
+
// now fill in the kern pairs
// parseAFM.cxx effectively only supports direction 0 (horizontal)
PairKernData* pKern = pInfo->pkd;
@@ -1120,7 +1120,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
// #i37703# broken kern table
if( ! pKern->name1 || ! pKern->name2 )
continue;
-
+
aPair.first = 0;
aPair.second = 0;
// currently we have to find the adobe character names
@@ -1295,13 +1295,13 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, co
// check for corresponding afm metric
// first look for an adjacent file
static const char* pSuffix[] = { ".afm", ".AFM" };
-
+
for( unsigned int i = 0; i < sizeof(pSuffix)/sizeof(pSuffix[0]); i++ )
{
ByteString aName( rFontFile );
aName.Erase( aName.Len()-4 );
aName.Append( pSuffix[i] );
-
+
ByteString aFilePath( aDir );
aFilePath.Append( '/' );
aFilePath.Append( aName );
@@ -1313,7 +1313,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, co
aFilePath = aDir;
aFilePath.Append( "/afm/" );
aFilePath.Append( aName );
-
+
if( ! access( aFilePath.GetBuffer(), R_OK ) )
{
aAfmFile = "afm/";
@@ -1327,10 +1327,10 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, co
{
Type1FontFile* pFont = new Type1FontFile();
pFont->m_nDirectory = nDirID;
-
+
pFont->m_aFontFile = rFontFile;
pFont->m_aMetricFile = aAfmFile;
-
+
if( ! pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ) )
{
delete pFont;
@@ -1350,8 +1350,8 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, co
aFilePath.Append( '/' );
aFilePath.Append( ByteString( rFontFile ) );
BuiltinFont* pFont = new BuiltinFont();
- pFont->m_nDirectory = nDirID;
- pFont->m_aMetricFile = rFontFile;
+ pFont->m_nDirectory = nDirID;
+ pFont->m_aMetricFile = rFontFile;
if( pFont->readAfmMetrics( aFilePath, m_pAtoms, false, true ) )
rNewFonts.push_back( pFont );
else
@@ -1477,23 +1477,23 @@ fontID PrintFontManager::findFontFileID( int nDirID, const OString& rFontFile )
bool PrintFontManager::parseXLFD( const OString& rXLFD, XLFDEntry& rEntry )
{
sal_Int32 nIndex = 0;
- OString aFoundry = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ) );
+ OString aFoundry = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ) );
if( nIndex < 0 ) return false;
- OString aFamilyXLFD = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ) );
+ OString aFamilyXLFD = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ) );
if( nIndex < 0 ) return false;
- OString aWeight = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
+ OString aWeight = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
if( nIndex < 0 ) return false;
- OString aSlant = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
+ OString aSlant = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
if( nIndex < 0 ) return false;
- OString aWidth = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
+ OString aWidth = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
if( nIndex < 0 ) return false;
- OString aAddStyle = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
+ OString aAddStyle = rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase();
if( nIndex < 0 ) return false;
- OString aPitch = rXLFD.getToken( 4, '-', nIndex ).toAsciiLowerCase();
+ OString aPitch = rXLFD.getToken( 4, '-', nIndex ).toAsciiLowerCase();
if( nIndex < 0 ) return false;
- OString aRegEnc = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ).toAsciiLowerCase() );
+ OString aRegEnc = WhitespaceToSpace( rXLFD.getToken( 1, '-', nIndex ).toAsciiLowerCase() );
if( nIndex < 0 ) return false;
- OString aEnc = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase() );
+ OString aEnc = WhitespaceToSpace( rXLFD.getToken( 0, '-', nIndex ).toAsciiLowerCase() );
// capitalize words
sal_Int32 nFamIndex = 0;
@@ -1512,22 +1512,22 @@ bool PrintFontManager::parseXLFD( const OString& rXLFD, XLFDEntry& rEntry )
aFamilyName.append( aNewToken.makeStringAndClear() );
}
- rEntry.aFoundry = aFoundry;
- rEntry.aFamily = aFamilyName.makeStringAndClear();
- rEntry.aAddStyle = aAddStyle;
+ rEntry.aFoundry = aFoundry;
+ rEntry.aFamily = aFamilyName.makeStringAndClear();
+ rEntry.aAddStyle = aAddStyle;
// evaluate weight
rEntry.eWeight = parseWeight( aWeight );
// evaluate slant
rEntry.eItalic = parseItalic( aSlant );
// evaluate width
rEntry.eWidth = parseWidth( aWidth );
-
+
// evaluate pitch
if( aPitch.toChar() == 'c' || aPitch.toChar() == 'm' )
rEntry.ePitch = pitch::Fixed;
else
rEntry.ePitch = pitch::Variable;
-
+
OString aToken = aEnc.toAsciiLowerCase();
// get encoding
if( aAddStyle.indexOf( "symbol" ) != -1 )
@@ -1545,17 +1545,17 @@ bool PrintFontManager::parseXLFD( const OString& rXLFD, XLFDEntry& rEntry )
rEntry.aEncoding = rtl_getTextEncodingFromUnixCharset( aCharset.getStr() );
}
}
-
+
// set correct mask flags
rEntry.nMask = 0;
- if( rEntry.aFoundry != "*" ) rEntry.nMask |= XLFDEntry::MaskFoundry;
- if( rEntry.aFamily != "*" ) rEntry.nMask |= XLFDEntry::MaskFamily;
- if( rEntry.aAddStyle != "*" ) rEntry.nMask |= XLFDEntry::MaskAddStyle;
- if( aWeight != "*" ) rEntry.nMask |= XLFDEntry::MaskWeight;
- if( aSlant != "*" ) rEntry.nMask |= XLFDEntry::MaskItalic;
- if( aWidth != "*" ) rEntry.nMask |= XLFDEntry::MaskWidth;
- if( aPitch != "*" ) rEntry.nMask |= XLFDEntry::MaskPitch;
- if( aRegEnc != "*" && aEnc != "*" ) rEntry.nMask |= XLFDEntry::MaskEncoding;
+ if( rEntry.aFoundry != "*" ) rEntry.nMask |= XLFDEntry::MaskFoundry;
+ if( rEntry.aFamily != "*" ) rEntry.nMask |= XLFDEntry::MaskFamily;
+ if( rEntry.aAddStyle != "*" ) rEntry.nMask |= XLFDEntry::MaskAddStyle;
+ if( aWeight != "*" ) rEntry.nMask |= XLFDEntry::MaskWeight;
+ if( aSlant != "*" ) rEntry.nMask |= XLFDEntry::MaskItalic;
+ if( aWidth != "*" ) rEntry.nMask |= XLFDEntry::MaskWidth;
+ if( aPitch != "*" ) rEntry.nMask |= XLFDEntry::MaskPitch;
+ if( aRegEnc != "*" && aEnc != "*" ) rEntry.nMask |= XLFDEntry::MaskEncoding;
return true;
}
@@ -1588,12 +1588,12 @@ void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::l
std::list< XLFDEntry > aXLFDs;
parseXLFD_appendAliases( rXLFDs, aXLFDs );
-
+
for( std::list< XLFDEntry >::const_iterator it = aXLFDs.begin();
it != aXLFDs.end(); ++it )
{
// set family name or alias
- int nFam =
+ int nFam =
m_pAtoms->getAtom( ATOM_FAMILYNAME,
OStringToOUString( it->aFamily, it->aAddStyle.indexOf( "utf8" ) != -1 ? RTL_TEXTENCODING_UTF8 : RTL_TEXTENCODING_ISO_8859_1 ),
sal_True );
@@ -1623,7 +1623,7 @@ void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::l
;
if( al_it == pFont->m_aAliases.end() )
pFont->m_aAliases.push_back( nFam );
-
+
}
// for the rest of the attributes there can only be one value;
// we'll trust the first one
@@ -1631,15 +1631,15 @@ void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::l
}
// fill in weight
- pFont->m_eWeight = it->eWeight;
+ pFont->m_eWeight = it->eWeight;
// fill in slant
- pFont->m_eItalic = it->eItalic;
+ pFont->m_eItalic = it->eItalic;
// fill in width
- pFont->m_eWidth = it->eWidth;
+ pFont->m_eWidth = it->eWidth;
// fill in pitch
- pFont->m_ePitch = it->ePitch;
+ pFont->m_ePitch = it->ePitch;
// fill in encoding
- pFont->m_aEncoding = it->aEncoding;
+ pFont->m_aEncoding = it->aEncoding;
}
// handle iso8859-1 as ms1252 to fill the "gap" starting at 0x80
@@ -2030,18 +2030,18 @@ void PrintFontManager::initFontsAlias()
aStream.ReadLine( aLine );
// get the alias and the pattern it gets translated to
- ByteString aAlias = GetCommandLineToken( 0, aLine );
- ByteString aMap = GetCommandLineToken( 1, aLine );
-
+ ByteString aAlias = GetCommandLineToken( 0, aLine );
+ ByteString aMap = GetCommandLineToken( 1, aLine );
+
// remove eventual quotes
aAlias.EraseLeadingChars( '"' );
aAlias.EraseTrailingChars( '"' );
aMap.EraseLeadingChars( '"' );
aMap.EraseTrailingChars( '"' );
-
+
XLFDEntry aAliasEntry, aMapEntry;
parseXLFD( aAlias, aAliasEntry );
- parseXLFD( aMap, aMapEntry );
+ parseXLFD( aMap, aMapEntry );
if( aAliasEntry.nMask && aMapEntry.nMask )
m_aXLFD_Aliases[ aMapEntry ].push_back( aAliasEntry );
@@ -2065,7 +2065,7 @@ static bool AreFCSubstitutionsEnabled()
{
//
if( (*pEnvStr >= '0') && (*pEnvStr <= '9') )
- nDisableBits = (*pEnvStr - '0');
+ nDisableBits = (*pEnvStr - '0');
else
nDisableBits = ~0U; // no specific bits set: disable all
}
@@ -2079,7 +2079,7 @@ void PrintFontManager::initialize()
CALLGRIND_TOGGLE_COLLECT();
CALLGRIND_ZERO_STATS();
#endif
-
+
long aDirEntBuffer[ (sizeof(struct dirent)+_PC_NAME_MAX)+1 ];
if( ! m_pFontCache )
@@ -2115,7 +2115,7 @@ void PrintFontManager::initialize()
clock_t aStep3;
int nBuiltinFonts = 0;
int nCached = 0;
-
+
struct tms tms;
aStart = times( &tms );
@@ -2141,7 +2141,7 @@ void PrintFontManager::initialize()
normPath( aToken );
// if registering an app-specific fontdir with fontconfig fails
// and fontconfig-based substitutions are enabled
- // then trying to use these app-specific fonts doesn't make sense
+ // then trying to use these app-specific fonts doesn't make sense
if( m_bFontconfigSuccess && !addFontconfigDir( aToken ) )
if( bAreFCSubstitutionsEnabled )
continue;
@@ -2225,7 +2225,7 @@ void PrintFontManager::initialize()
priv_dir != m_aPrivateFontDirectories.end() && *priv_dir != nDirID;
++priv_dir )
;
-
+
if( priv_dir == m_aPrivateFontDirectories.end() )
{
ByteString aGccDummy( aPath );
@@ -2245,7 +2245,7 @@ void PrintFontManager::initialize()
}
}
}
-
+
int nDirFonts = 0;
while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pEntry ) && pEntry )
{
@@ -2314,7 +2314,7 @@ void PrintFontManager::initialize()
// ask the font cache whether it handles this directory
std::list< PrintFont* > aCacheFonts;
-
+
if( m_pFontCache->listDirectory( aDir, aCacheFonts ) )
{
#if OSL_DEBUG_LEVEL > 1
@@ -2419,7 +2419,7 @@ void PrintFontManager::initialize()
#endif
m_pFontCache->flush();
-
+
#ifdef CALLGRIND_COMPILE
CALLGRIND_DUMP_STATS();
CALLGRIND_TOGGLE_COLLECT();
@@ -2462,7 +2462,7 @@ namespace {
weight::type eWeight;
pitch::type ePitch;
rtl_TextEncoding aEncoding;
-
+
BuiltinFontIdentifier( const OUString& rFam,
italic::type eIt,
weight::type eWg,
@@ -2474,7 +2474,7 @@ namespace {
ePitch( ePt ),
aEncoding( enc )
{}
-
+
bool operator==( const BuiltinFontIdentifier& rRight ) const
{
return equalItalic( eItalic, rRight.eItalic ) &&
@@ -2484,7 +2484,7 @@ namespace {
aFamily.equalsIgnoreAsciiCase( rRight.aFamily );
}
};
-
+
struct BuiltinFontIdentifierHash
{
size_t operator()( const BuiltinFontIdentifier& rFont ) const
@@ -2498,7 +2498,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDPa
{
rFontIDs.clear();
std::hash_map< fontID, PrintFont* >::const_iterator it;
-
+
/*
* Note: there are two easy steps making this faster:
* first: insert the printer builtins first, then the not builtins,
@@ -2514,7 +2514,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDPa
* Until getFontList for a printer becomes a performance issue (which is
* currently not the case), best stay with the current algorithm.
*/
-
+
// fill sets of printer supported fonts
if( pParser )
{
@@ -2536,7 +2536,7 @@ void PrintFontManager::getFontList( ::std::list< fontID >& rFontIDs, const PPDPa
aOverridePSNames[ font_it->second->m_nPSName ] = *over;
}
}
-
+
int nFonts = pParser->getFonts();
for( int i = 0; i < nFonts; i++ )
aBuiltinPSNames.insert( m_pAtoms->getAtom( ATOM_PSNAME, pParser->getFont( i ) ) );
@@ -3173,7 +3173,7 @@ bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal
pArray[ code - minCharacter ] = it->second;
}
} while( code++ != maxCharacter );
-
+
return true;
}
@@ -3280,9 +3280,9 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL
OUString aFromPath, aToPath;
if( bLinkOnly )
{
- ByteString aLinkFromPath( String(aFromAfm.PathToFileName()),
+ ByteString aLinkFromPath( String(aFromAfm.PathToFileName()),
aEncoding );
- ByteString aLinkToPath( String(aToAfm.PathToFileName()),
+ ByteString aLinkToPath( String(aToAfm.PathToFileName()),
aEncoding );
nError = (FileBase::RC)symlink( aLinkFromPath.GetBuffer(), aLinkToPath.GetBuffer() );
}
@@ -3298,10 +3298,10 @@ int PrintFontManager::importFonts( const ::std::list< OString >& rFiles, bool bL
}
if( bLinkOnly )
{
- ByteString aFromPath( String(aFrom.PathToFileName()),
+ ByteString aFromPath( String(aFrom.PathToFileName()),
aEncoding );
ByteString aToPath( String(aTo.PathToFileName()), aEncoding );
- nError = (FileBase::RC)symlink( aFromPath.GetBuffer(),
+ nError = (FileBase::RC)symlink( aFromPath.GetBuffer(),
aToPath.GetBuffer() );
}
else
@@ -3427,7 +3427,7 @@ bool PrintFontManager::changeFontProperties( fontID nFontID, const ::rtl::OUStri
getFontAttributesFromXLFD( pFont, aDummyList );
pFont->m_bUserOverride = true;
m_pFontCache->updateFontCacheEntry( pFont, true );
-
+
return true;
}
@@ -3729,8 +3729,8 @@ bool PrintFontManager::createFontSubset(
int xMin, yMin, xMax, yMax;
getFontBoundingBox( nFont, xMin, yMin, xMax, yMax );
- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
- rInfo.m_nCapHeight = yMax; // Well ...
+ rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
+ rInfo.m_nCapHeight = yMax; // Well ...
// fill in glyph advance widths
TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont,
@@ -3837,7 +3837,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
rUnicodeEnc.clear();
rWidths.clear();
rWidths.reserve( pFont->m_pMetrics->m_aMetrics.size() );
- for( std::hash_map< int, CharacterMetric >::const_iterator it =
+ for( std::hash_map< int, CharacterMetric >::const_iterator it =
pFont->m_pMetrics->m_aMetrics.begin();
it != pFont->m_pMetrics->m_aMetrics.end(); ++it )
{
@@ -3950,7 +3950,7 @@ bool PrintFontManager::readOverrideMetrics()
UNO_QUERY );
if( !xMat.is() )
return false;
-
+
Any aAny( xMat->getMaterial() );
Sequence< Any > aOverrideFonts;
if( ! (aAny >>= aOverrideFonts ) )
@@ -4086,7 +4086,7 @@ bool PrintFontManager::readOverrideMetrics()
! pFont->m_pMetrics->m_aMetrics.empty() )
{
m_aOverrideFonts.push_back( m_nNextFontID );
- m_aFonts[ m_nNextFontID++ ] = pFont;
+ m_aFonts[ m_nNextFontID++ ] = pFont;
}
else
{
@@ -4094,6 +4094,6 @@ bool PrintFontManager::readOverrideMetrics()
delete pFont;
}
}
-
+
return true;
}
diff --git a/vcl/unx/source/fontmanager/helper.cxx b/vcl/unx/source/fontmanager/helper.cxx
index 05213a52597c..3ae8501e0320 100644
--- a/vcl/unx/source/fontmanager/helper.cxx
+++ b/vcl/unx/source/fontmanager/helper.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -106,7 +106,7 @@ OUString getOfficePath( enum whichOfficePath ePath )
static OString getEnvironmentPath( const char* pKey )
{
OString aPath;
-
+
const char* pValue = getenv( pKey );
if( pValue && *pValue )
{
@@ -121,9 +121,9 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
{
rPathList.clear();
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
-
+
OUStringBuffer aPathBuffer( 256 );
-
+
// append net path
aPathBuffer.append( getOfficePath( psp::NetPath ) );
if( aPathBuffer.getLength() )
@@ -168,7 +168,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
rPathList.push_back( OStringToOUString( aDir, aEncoding ) );
} while( nIndex != -1 );
-
+
#ifdef SYSTEM_PPD_DIR
if( pSubDir && rtl_str_compare( pSubDir, PRINTER_PPDDIR ) == 0 )
{
@@ -201,7 +201,7 @@ OUString psp::getFontPath()
if( ! aPath.getLength() )
{
OUStringBuffer aPathBuffer( 512 );
-
+
OUString aConfigPath( getOfficePath( psp::ConfigPath ) );
OUString aNetPath( getOfficePath( psp::NetPath ) );
OUString aUserPath( getOfficePath( psp::UserPath ) );
@@ -368,7 +368,7 @@ void psp::normPath( OString& rPath )
char buf[PATH_MAX];
ByteString aPath( rPath );
-
+
// double slashes and slash at end are probably
// removed by realpath anyway, but since this runs
// on many different platforms let's play it safe
diff --git a/vcl/unx/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx
index e1a33b4d1b5d..687253209a02 100644
--- a/vcl/unx/source/fontmanager/parseAFM.cxx
+++ b/vcl/unx/source/fontmanager/parseAFM.cxx
@@ -2,20 +2,20 @@
* (C) 1988, 1989, 1990 by Adobe Systems Incorporated. All rights reserved.
*
* This file may be freely copied and redistributed as long as:
- * 1) This entire notice continues to be included in the file,
+ * 1) This entire notice continues to be included in the file,
* 2) If the file has been modified in any way, a notice of such
* modification is conspicuously indicated.
*
* PostScript, Display PostScript, and Adobe are registered trademarks of
* Adobe Systems Incorporated.
- *
+ *
* ************************************************************************
* THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT
* NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS
- * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR
- * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY
- * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION,
- * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
+ * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR
+ * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY
+ * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION,
+ * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
* ************************************************************************
*/
@@ -46,13 +46,13 @@
#include "precompiled_vcl.hxx"
/* parseAFM.c
- *
+ *
* This file is used in conjuction with the parseAFM.h header file.
* This file contains several procedures that are used to parse AFM
* files. It is intended to work with an application program that needs
* font metric information. The program can be used as is by making a
* procedure call to "parseFile" (passing in the expected parameters)
- * and having it fill in a data structure with the data from the
+ * and having it fill in a data structure with the data from the
* AFM file, or an application developer may wish to customize this
* code.
*
@@ -107,7 +107,7 @@ class FileInputStream
public:
FileInputStream( const char* pFilename );
~FileInputStream();
-
+
int getChar() { return (m_nPos < m_nLen) ? int(m_pMemory[m_nPos++]) : -1; }
void ungetChar()
{
@@ -148,18 +148,18 @@ FileInputStream::~FileInputStream()
}
/*************************** GLOBALS ***********************/
-/* "shorts" for fast case statement
+/* "shorts" for fast case statement
* The values of each of these enumerated items correspond to an entry in the
- * table of strings defined below. Therefore, if you add a new string as
+ * table of strings defined below. Therefore, if you add a new string as
* new keyword into the keyStrings table, you must also add a corresponding
* parseKey AND it MUST be in the same position!
*
* IMPORTANT: since the sorting algorithm is a binary search, the strings of
- * keywords must be placed in lexicographical order, below. [Therefore, the
- * enumerated items are not necessarily in lexicographical order, depending
- * on the name chosen. BUT, they must be placed in the same position as the
- * corresponding key string.] The NOPE shall remain in the last position,
- * since it does not correspond to any key string, and it is used in the
+ * keywords must be placed in lexicographical order, below. [Therefore, the
+ * enumerated items are not necessarily in lexicographical order, depending
+ * on the name chosen. BUT, they must be placed in the same position as the
+ * corresponding key string.] The NOPE shall remain in the last position,
+ * since it does not correspond to any key string, and it is used in the
* "recognize" procedure to calculate how many possible keys there are.
*/
@@ -179,16 +179,16 @@ enum parseKey {
NOPE
};
-/*************************** PARSING ROUTINES **************/
-
+/*************************** PARSING ROUTINES **************/
+
/*************************** token *************************/
/* A "AFM file Conventions" tokenizer. That means that it will
* return the next token delimited by white space. See also
- * the `linetoken' routine, which does a similar thing but
+ * the `linetoken' routine, which does a similar thing but
* reads all tokens until the next end-of-line.
*/
-
+
// token white space is ' ', '\n', '\r', ',', '\t', ';'
static const bool is_white_Array[ 256 ] =
{ false, false, false, false, false, false, false, false, // 0-7
@@ -199,7 +199,7 @@ static const bool is_white_Array[ 256 ] =
false, false, false, false, true, false, false, false, // 40-47
false, false, false, false, false, false, false, false, // 48-55
false, false, false, true, false, false, false, false, // 56-63
-
+
false, false, false, false, false, false, false, false, // 64 -
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
@@ -208,7 +208,7 @@ static const bool is_white_Array[ 256 ] =
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false, // 127
-
+
false, false, false, false, false, false, false, false, // 128 -
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
@@ -237,7 +237,7 @@ static const bool is_delimiter_Array[ 256 ] =
false, false, false, false, false, false, false, false, // 40-47
false, false, false, false, false, false, false, false, // 48-55
false, false, true, true, false, false, false, false, // 56-63
-
+
false, false, false, false, false, false, false, false, // 64 -
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
@@ -246,7 +246,7 @@ static const bool is_delimiter_Array[ 256 ] =
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false, // 127
-
+
false, false, false, false, false, false, false, false, // 128 -
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
@@ -275,7 +275,7 @@ static char *token( FileInputStream* stream, int& rLen )
// relies on EOF = -1
while( is_white_Array[ (ch = stream->getChar()) & 255 ] )
;
-
+
idx = 0;
while( ch != -1 && ! is_delimiter_Array[ ch & 255 ] && idx < MAX_NAME-1 )
{
@@ -288,7 +288,7 @@ static char *token( FileInputStream* stream, int& rLen )
if (idx < 1 ) ident[idx++] = ch; /* single-character token */
ident[idx] = 0;
rLen = idx;
-
+
return(ident); /* returns pointer to the token */
} /* token */
@@ -306,15 +306,15 @@ static char *linetoken( FileInputStream* stream )
static char ident[MAX_NAME]; /* storage buffer for keywords */
int ch, idx;
- while ((ch = stream->getChar()) == ' ' || ch == '\t' ) ;
-
+ while ((ch = stream->getChar()) == ' ' || ch == '\t' ) ;
+
idx = 0;
- while (ch != -1 && ch != lineterm && ch != '\r' && idx < MAX_NAME-1 )
+ while (ch != -1 && ch != lineterm && ch != '\r' && idx < MAX_NAME-1 )
{
ident[idx++] = ch;
ch = stream->getChar();
} /* while */
-
+
stream->ungetChar();
ident[idx] = 0;
@@ -326,7 +326,7 @@ static char *linetoken( FileInputStream* stream )
/*************************** recognize *************************/
/* This function tries to match a string to a known list of
- * valid AFM entries (check the keyStrings array above).
+ * valid AFM entries (check the keyStrings array above).
* "ident" contains everything from white space through the
* next space, tab, or ":" character.
*
@@ -338,7 +338,7 @@ static inline enum parseKey recognize( register char* ident, int len)
{
const hash_entry* pEntry = AfmKeywordHash::in_word_set( ident, len );
return pEntry ? pEntry->eKey : NOPE;
-
+
} /* recognize */
@@ -347,34 +347,34 @@ static inline enum parseKey recognize( register char* ident, int len)
/* This function is called by "parseFile". It will parse the AFM file
* up to the "StartCharMetrics" keyword, which essentially marks the
* end of the Global Font Information and the beginning of the character
- * metrics information.
+ * metrics information.
*
* If the caller of "parseFile" specified that it wanted the Global
* Font Information (as defined by the "AFM file Specification"
- * document), then that information will be stored in the returned
+ * document), then that information will be stored in the returned
* data structure.
*
- * Any Global Font Information entries that are not found in a
+ * Any Global Font Information entries that are not found in a
* given file, will have the usual default initialization value
* for its type (i.e. entries of type int will be 0, etc).
*
- * This function returns an error code specifying whether there was
- * a premature EOF or a parsing error. This return value is used by
+ * This function returns an error code specifying whether there was
+ * a premature EOF or a parsing error. This return value is used by
* parseFile to determine if there is more file to parse.
*/
-
+
static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
-{
+{
bool cont = true, save = (gfi != NULL);
int error = ok;
register char *keyword;
int direction = -1;
int tokenlen;
-
+
while (cont)
{
keyword = token(fp, tokenlen);
-
+
if (keyword == NULL)
/* Have reached an early and unexpected EOF. */
/* Set flag and stop parsing */
@@ -382,15 +382,15 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
error = earlyEOF;
break; /* get out of loop */
}
- if (!save)
+ if (!save)
/* get tokens until the end of the Global Font info section */
/* without saving any of the data */
- switch (recognize(keyword, tokenlen))
- {
+ switch (recognize(keyword, tokenlen))
+ {
case STARTCHARMETRICS:
cont = false;
break;
- case ENDFONTMETRICS:
+ case ENDFONTMETRICS:
cont = false;
error = normalEOF;
break;
@@ -416,15 +416,15 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
case ENCODINGSCHEME:
if ((keyword = token(fp,tokenlen)) != NULL)
gfi->encodingScheme = strdup( keyword );
- break;
+ break;
case FULLNAME:
if ((keyword = linetoken(fp)) != NULL)
gfi->fullName = strdup( keyword );
- break;
- case FAMILYNAME:
+ break;
+ case FAMILYNAME:
if ((keyword = linetoken(fp)) != NULL)
gfi->familyName = strdup( keyword );
- break;
+ break;
case WEIGHT:
if ((keyword = token(fp,tokenlen)) != NULL)
gfi->weight = strdup( keyword );
@@ -438,14 +438,14 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
{
if (MATCH(keyword, False))
gfi->isFixedPitch = 0;
- else
+ else
gfi->isFixedPitch = 1;
}
- break;
+ break;
case UNDERLINEPOSITION:
if ((keyword = token(fp,tokenlen)) != NULL)
gfi->underlinePosition = atoi(keyword);
- break;
+ break;
case UNDERLINETHICKNESS:
if ((keyword = token(fp,tokenlen)) != NULL)
gfi->underlineThickness = atoi(keyword);
@@ -453,11 +453,11 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
case VERSION:
if ((keyword = token(fp,tokenlen)) != NULL)
gfi->version = strdup( keyword );
- break;
+ break;
case NOTICE:
if ((keyword = linetoken(fp)) != NULL)
gfi->notice = strdup( keyword );
- break;
+ break;
case FONTBBOX:
if ((keyword = token(fp,tokenlen)) != NULL)
gfi->fontBBox.llx = atoi(keyword);
@@ -532,7 +532,7 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
}
keyword = token(fp,tokenlen);
/* ignore y-width for now */
- break;
+ break;
case METRICSSETS:
keyword = token(fp,tokenlen);
break; /* ignore this for now */
@@ -542,10 +542,10 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
break;
} /* switch */
} /* while */
-
+
return(error);
-
-} /* parseGlobals */
+
+} /* parseGlobals */
#if 0
@@ -554,26 +554,26 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
/* Unmapped character codes are (at Adobe Systems) assigned the
* width of the space character (if one exists) else they get the
* value of 250 ems. This function initializes all entries in the
- * char widths array to have this value. Then any mapped character
- * codes will be replaced with the width of the appropriate character
+ * char widths array to have this value. Then any mapped character
+ * codes will be replaced with the width of the appropriate character
* when parsing the character metric section.
-
+
* This function parses the Character Metrics Section looking
* for a space character (by comparing character names). If found,
* the width of the space character will be used to initialize the
- * values in the array of character widths.
+ * values in the array of character widths.
*
* Before returning, the position of the read/write pointer of the
* FileInputStream is reset to be where it was upon entering this function.
*/
-
+
static int initializeArray( FileInputStream* fp, register int* cwi)
-{
+{
bool cont = true, found = false;
unsigned int opos = fp->tell();
int code = 0, width = 0, i = 0, error = 0, tokenlen;
register char *keyword;
-
+
while (cont)
{
keyword = token(fp,tokenlen);
@@ -602,67 +602,67 @@ static int initializeArray( FileInputStream* fp, register int* cwi)
case X0WIDTH:
(void) token(fp,tokenlen);
break;
- case CHARNAME:
+ case CHARNAME:
if ((keyword = token(fp,tokenlen)) != NULL)
if (MATCH(keyword, Space))
- {
+ {
cont = false;
found = true;
- }
- break;
+ }
+ break;
case ENDCHARMETRICS:
cont = false;
- break;
+ break;
case ENDFONTMETRICS:
cont = false;
error = normalEOF;
break;
case NOPE:
- default:
+ default:
error = parseError;
break;
} /* switch */
} /* while */
-
+
if (!found)
width = 250;
-
+
for (i = 0; i < 256; ++i)
cwi[i] = width;
-
+
fp->seek(opos);
-
+
return(error);
-
-} /* initializeArray */
+
+} /* initializeArray */
#endif
/************************* parseCharWidths **************************/
/* This function is called by "parseFile". It will parse the AFM file
- * up to the "EndCharMetrics" keyword. It will save the character
+ * up to the "EndCharMetrics" keyword. It will save the character
* width info (as opposed to all of the character metric information)
* if requested by the caller of parseFile. Otherwise, it will just
* parse through the section without saving any information.
*
- * If data is to be saved, parseCharWidths is passed in a pointer
+ * If data is to be saved, parseCharWidths is passed in a pointer
* to an array of widths that has already been initialized by the
* standard value for unmapped character codes. This function parses
* the Character Metrics section only storing the width information
* for the encoded characters into the array using the character code
* as the index into that array.
*
- * This function returns an error code specifying whether there was
- * a premature EOF or a parsing error. This return value is used by
+ * This function returns an error code specifying whether there was
+ * a premature EOF or a parsing error. This return value is used by
* parseFile to determine if there is more file to parse.
*/
-
+
static int parseCharWidths( FileInputStream* fp, register int* cwi)
-{
+{
bool cont = true, save = (cwi != NULL);
int pos = 0, error = ok, tokenlen;
register char *keyword;
-
+
while (cont)
{
keyword = token(fp,tokenlen);
@@ -673,19 +673,19 @@ static int parseCharWidths( FileInputStream* fp, register int* cwi)
error = earlyEOF;
break; /* get out of loop */
}
- if (!save)
+ if (!save)
/* get tokens until the end of the Char Metrics section without */
/* saving any of the data*/
- switch (recognize(keyword,tokenlen))
- {
+ switch (recognize(keyword,tokenlen))
+ {
case ENDCHARMETRICS:
cont = false;
- break;
+ break;
case ENDFONTMETRICS:
cont = false;
error = normalEOF;
break;
- default:
+ default:
break;
} /* switch */
else
@@ -719,15 +719,15 @@ static int parseCharWidths( FileInputStream* fp, register int* cwi)
break;
case ENDCHARMETRICS:
cont = false;
- break;
+ break;
case ENDFONTMETRICS:
cont = false;
error = normalEOF;
break;
case CHARNAME: /* eat values (so doesn't cause parseError) */
- keyword = token(fp,tokenlen);
+ keyword = token(fp,tokenlen);
break;
- case CHARBBOX:
+ case CHARBBOX:
keyword = token(fp,tokenlen); keyword = token(fp,tokenlen);
keyword = token(fp,tokenlen); keyword = token(fp,tokenlen);
break;
@@ -739,21 +739,21 @@ static int parseCharWidths( FileInputStream* fp, register int* cwi)
keyword = token(fp,tokenlen);
break;
case NOPE:
- default:
+ default:
error = parseError;
break;
} /* switch */
} /* while */
-
+
return(error);
-
-} /* parseCharWidths */
+
+} /* parseCharWidths */
/*
* number of char metrics is almost allways inaccurate, so be gentle and try to
* adapt our internal storage by adjusting the allocated list
- */
+ */
static int
reallocFontMetrics( void **pp_fontmetrics, int *p_oldcount, int n_newcount, unsigned int n_size )
@@ -772,7 +772,7 @@ reallocFontMetrics( void **pp_fontmetrics, int *p_oldcount, int n_newcount, unsi
if ( n_newcount > *p_oldcount )
{
- char *p_inimetrics = p_tmpmetrics + n_size * *p_oldcount;
+ char *p_inimetrics = p_tmpmetrics + n_size * *p_oldcount;
int n_inimetrics = n_size * (n_newcount - *p_oldcount);
memset( p_inimetrics, 0, n_inimetrics );
}
@@ -790,7 +790,7 @@ enlargeCount( unsigned int n_oldcount )
if (n_oldcount == n_newcount )
n_newcount = n_oldcount + 5;
- return n_newcount;
+ return n_newcount;
}
/************************* parseCharMetrics ************************/
@@ -802,21 +802,21 @@ enlargeCount( unsigned int n_oldcount )
* parseCharMetrics is passed in a pointer to an array of records
* to hold information on a per character basis. This function
* parses the Character Metrics section storing all character
- * metric information for the ALL characters (mapped and unmapped)
+ * metric information for the ALL characters (mapped and unmapped)
* into the array.
*
- * This function returns an error code specifying whether there was
- * a premature EOF or a parsing error. This return value is used by
+ * This function returns an error code specifying whether there was
+ * a premature EOF or a parsing error. This return value is used by
* parseFile to determine if there is more file to parse.
*/
-
+
static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
-{
+{
bool cont = true, firstTime = true;
int error = ok, count = 0, tokenlen;
register CharMetricInfo *temp = fi->cmi;
register char *keyword;
-
+
while (cont)
{
keyword = token(fp,tokenlen);
@@ -829,17 +829,17 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
{
case COMMENT:
keyword = linetoken(fp);
- break;
+ break;
case CODE:
if (!(count < fi->numOfChars))
{
- reallocFontMetrics( (void**)&(fi->cmi),
- &(fi->numOfChars), enlargeCount(fi->numOfChars),
+ reallocFontMetrics( (void**)&(fi->cmi),
+ &(fi->numOfChars), enlargeCount(fi->numOfChars),
sizeof(CharMetricInfo) );
temp = &(fi->cmi[ count - 1 ]);
}
if (count < fi->numOfChars)
- {
+ {
if (firstTime) firstTime = false;
else temp++;
if ((keyword = token(fp,tokenlen)) != NULL)
@@ -857,8 +857,8 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
case CODEHEX:
if (!(count < fi->numOfChars ))
{
- reallocFontMetrics( (void**)&(fi->cmi),
- &(fi->numOfChars), enlargeCount(fi->numOfChars),
+ reallocFontMetrics( (void**)&(fi->cmi),
+ &(fi->numOfChars), enlargeCount(fi->numOfChars),
sizeof(CharMetricInfo) );
temp = &(fi->cmi[ count - 1 ]);
}
@@ -883,20 +883,20 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
temp->wx = atoi(keyword);
if ((keyword = token(fp,tokenlen)) != NULL)
temp->wy = atoi(keyword);
- break;
+ break;
case X0WIDTH:
if ((keyword = token(fp,tokenlen)) != NULL)
temp->wx = atoi(keyword);
break;
- case XWIDTH:
+ case XWIDTH:
if ((keyword = token(fp,tokenlen)) != NULL)
temp->wx = atoi(keyword);
break;
- case CHARNAME:
+ case CHARNAME:
if ((keyword = token(fp,tokenlen)) != NULL)
temp->name = (char *)strdup(keyword);
- break;
- case CHARBBOX:
+ break;
+ case CHARBBOX:
if ((keyword = token(fp,tokenlen)) != NULL)
temp->charBBox.llx = atoi(keyword);
if ((keyword = token(fp,tokenlen)) != NULL)
@@ -909,14 +909,14 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
case LIGATURE: {
Ligature **tail = &(temp->ligs);
Ligature *node = *tail;
-
+
if (*tail != NULL)
{
while (node->next != NULL)
node = node->next;
- tail = &(node->next);
+ tail = &(node->next);
}
-
+
*tail = (Ligature *) calloc(1, sizeof(Ligature));
if ((keyword = token(fp,tokenlen)) != NULL)
(*tail)->succ = (char *)strdup(keyword);
@@ -925,60 +925,60 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
break; }
case ENDCHARMETRICS:
cont = false;;
- break;
- case ENDFONTMETRICS:
+ break;
+ case ENDFONTMETRICS:
cont = false;
error = normalEOF;
- break;
+ break;
case VVECTOR:
keyword = token(fp,tokenlen);
keyword = token(fp,tokenlen);
break;
case NOPE:
default:
- error = parseError;
- break;
+ error = parseError;
+ break;
} /* switch */
} /* while */
-
- if ((error == ok) && (count != fi->numOfChars))
- error = reallocFontMetrics( (void**)&(fi->cmi), &(fi->numOfChars),
+
+ if ((error == ok) && (count != fi->numOfChars))
+ error = reallocFontMetrics( (void**)&(fi->cmi), &(fi->numOfChars),
count, sizeof(CharMetricInfo) );
if ((error == ok) && (count != fi->numOfChars))
error = parseError;
-
+
return(error);
-
-} /* parseCharMetrics */
+
+} /* parseCharMetrics */
/************************* parseTrackKernData ***********************/
-/* This function is called by "parseFile". It will parse the AFM file
+/* This function is called by "parseFile". It will parse the AFM file
* up to the "EndTrackKern" or "EndKernData" keywords. It will save the
* track kerning data if requested by the caller of parseFile.
*
* parseTrackKernData is passed in a pointer to the FontInfo record.
- * If data is to be saved, the FontInfo record will already contain
+ * If data is to be saved, the FontInfo record will already contain
* a valid pointer to storage for the track kerning data.
*
- * This function returns an error code specifying whether there was
- * a premature EOF or a parsing error. This return value is used by
+ * This function returns an error code specifying whether there was
+ * a premature EOF or a parsing error. This return value is used by
* parseFile to determine if there is more file to parse.
*/
-
+
static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi)
-{
+{
bool cont = true, save = (fi->tkd != NULL);
int pos = 0, error = ok, tcount = 0, tokenlen;
register char *keyword;
-
+
while (cont)
{
keyword = token(fp,tokenlen);
-
+
if (keyword == NULL)
{
error = earlyEOF;
@@ -1011,7 +1011,7 @@ static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi)
case TRACKKERN:
if (!(tcount < fi->numOfTracks))
{
- reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks),
+ reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks),
enlargeCount(fi->numOfTracks), sizeof(TrackKernData) );
}
@@ -1049,44 +1049,44 @@ static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi)
break;
} /* switch */
} /* while */
-
+
if (error == ok && tcount != fi->numOfTracks)
- error = reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks),
+ error = reallocFontMetrics( (void**)&(fi->tkd), &(fi->numOfTracks),
tcount, sizeof(TrackKernData) );
if (error == ok && tcount != fi->numOfTracks)
error = parseError;
-
+
return(error);
-
-} /* parseTrackKernData */
+
+} /* parseTrackKernData */
/************************* parsePairKernData ************************/
-/* This function is called by "parseFile". It will parse the AFM file
+/* This function is called by "parseFile". It will parse the AFM file
* up to the "EndKernPairs" or "EndKernData" keywords. It will save
* the pair kerning data if requested by the caller of parseFile.
*
* parsePairKernData is passed in a pointer to the FontInfo record.
- * If data is to be saved, the FontInfo record will already contain
+ * If data is to be saved, the FontInfo record will already contain
* a valid pointer to storage for the pair kerning data.
*
- * This function returns an error code specifying whether there was
- * a premature EOF or a parsing error. This return value is used by
+ * This function returns an error code specifying whether there was
+ * a premature EOF or a parsing error. This return value is used by
* parseFile to determine if there is more file to parse.
*/
-
+
static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
-{
+{
bool cont = true, save = (fi->pkd != NULL);
int pos = 0, error = ok, pcount = 0, tokenlen;
register char *keyword;
-
+
while (cont)
{
keyword = token(fp,tokenlen);
-
+
if (keyword == NULL)
{
error = earlyEOF;
@@ -1119,7 +1119,7 @@ static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
case KERNPAIR:
if (!(pcount < fi->numOfPairs))
{
- reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
+ reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
enlargeCount(fi->numOfPairs), sizeof(PairKernData) );
}
if (pcount < fi->numOfPairs)
@@ -1143,7 +1143,7 @@ static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
case KERNPAIRXAMT:
if (!(pcount < fi->numOfPairs))
{
- reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
+ reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
enlargeCount(fi->numOfPairs), sizeof(PairKernData) );
}
if (pcount < fi->numOfPairs)
@@ -1176,43 +1176,43 @@ static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
break;
} /* switch */
} /* while */
-
- if ((error == ok) && (pcount != fi->numOfPairs))
- error = reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
+
+ if ((error == ok) && (pcount != fi->numOfPairs))
+ error = reallocFontMetrics( (void**)&(fi->pkd), &(fi->numOfPairs),
pcount, sizeof(PairKernData) );
if (error == ok && pcount != fi->numOfPairs)
error = parseError;
-
+
return(error);
-
-} /* parsePairKernData */
+
+} /* parsePairKernData */
/************************* parseCompCharData **************************/
-/* This function is called by "parseFile". It will parse the AFM file
- * up to the "EndComposites" keyword. It will save the composite
+/* This function is called by "parseFile". It will parse the AFM file
+ * up to the "EndComposites" keyword. It will save the composite
* character data if requested by the caller of parseFile.
*
- * parseCompCharData is passed in a pointer to the FontInfo record, and
+ * parseCompCharData is passed in a pointer to the FontInfo record, and
* a boolean representing if the data should be saved.
*
* This function will create the appropriate amount of storage for
* the composite character data and store a pointer to the storage
* in the FontInfo record.
*
- * This function returns an error code specifying whether there was
- * a premature EOF or a parsing error. This return value is used by
+ * This function returns an error code specifying whether there was
+ * a premature EOF or a parsing error. This return value is used by
* parseFile to determine if there is more file to parse.
*/
-
+
static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
-{
+{
bool cont = true, firstTime = true, save = (fi->ccd != NULL);
int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0, tokenlen;
register char *keyword;
-
+
while (cont)
{
keyword = token(fp,tokenlen);
@@ -1225,7 +1225,7 @@ static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
}
if (ccount > fi->numOfComps)
{
- reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
+ reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
enlargeCount(fi->numOfComps), sizeof(CompCharData) );
}
if (ccount > fi->numOfComps)
@@ -1263,7 +1263,7 @@ static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
case COMPCHAR:
if (!(ccount < fi->numOfComps))
{
- reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
+ reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
enlargeCount(fi->numOfComps), sizeof(CompCharData) );
}
if (ccount < fi->numOfComps)
@@ -1315,27 +1315,27 @@ static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
break;
} /* switch */
} /* while */
-
+
if (error == ok && ccount != fi->numOfComps)
- reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
+ reallocFontMetrics( (void**)&(fi->ccd), &(fi->numOfComps),
ccount, sizeof(CompCharData) );
if (error == ok && ccount != fi->numOfComps)
error = parseError;
-
+
return(error);
-
-} /* parseCompCharData */
+
+} /* parseCompCharData */
-/*************************** 'PUBLIC' FUNCTION ********************/
+/*************************** 'PUBLIC' FUNCTION ********************/
/*************************** parseFile *****************************/
-/* parseFile is the only 'public' procedure available. It is called
+/* parseFile is the only 'public' procedure available. It is called
* from an application wishing to get information from an AFM file.
* The caller of this function is responsible for locating and opening
* an AFM file and handling all errors associated with that task.
@@ -1345,41 +1345,41 @@ static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
* the data requested filled in), and a mask specifying which
* data from the AFM file should be saved in the FontInfo structure.
*
- * The file will be parsed and the requested data will be stored in
+ * The file will be parsed and the requested data will be stored in
* a record of type FontInfo (refer to ParseAFM.h).
*
- * parseFile returns an error code as defined in parseAFM.h.
+ * parseFile returns an error code as defined in parseAFM.h.
*
- * The position of the read/write pointer associated with the file
+ * The position of the read/write pointer associated with the file
* pointer upon return of this function is undefined.
*/
int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
{
FileInputStream aFile( pFilename );
-
+
int code = ok; /* return code from each of the parsing routines */
int error = ok; /* used as the return code from this function */
int tokenlen;
-
- register char *keyword; /* used to store a token */
-
+
+ register char *keyword; /* used to store a token */
+
(*fi) = (FontInfo *) calloc(1, sizeof(FontInfo));
- if ((*fi) == NULL) {error = storageProblem; return(error);}
-
- if (flags & P_G)
+ if ((*fi) == NULL) {error = storageProblem; return(error);}
+
+ if (flags & P_G)
{
(*fi)->gfi = (GlobalFontInfo *) calloc(1, sizeof(GlobalFontInfo));
- if ((*fi)->gfi == NULL) {error = storageProblem; return(error);}
+ if ((*fi)->gfi == NULL) {error = storageProblem; return(error);}
}
-
+
/* The AFM file begins with Global Font Information. This section */
- /* will be parsed whether or not information should be saved. */
- code = parseGlobals(&aFile, (*fi)->gfi);
-
+ /* will be parsed whether or not information should be saved. */
+ code = parseGlobals(&aFile, (*fi)->gfi);
+
if (code < 0) error = code;
-
+
/* The Global Font Information is followed by the Character Metrics */
/* section. Which procedure is used to parse this section depends on */
/* how much information should be saved. If all of the metrics info */
@@ -1387,26 +1387,26 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
/* is wanted, parseCharWidths is called. parseCharWidths will also */
/* be called in the case that no character data is to be saved, just */
/* to parse through the section. */
-
+
if ((code != normalEOF) && (code != earlyEOF))
{
if ((keyword = token(&aFile,tokenlen)) != NULL)
(*fi)->numOfChars = atoi(keyword);
if (flags & (P_M ^ P_W))
{
- (*fi)->cmi = (CharMetricInfo *)
+ (*fi)->cmi = (CharMetricInfo *)
calloc((*fi)->numOfChars, sizeof(CharMetricInfo));
if ((*fi)->cmi == NULL) {error = storageProblem; return(error);}
- code = parseCharMetrics(&aFile, *fi);
+ code = parseCharMetrics(&aFile, *fi);
}
else
{
if (flags & P_W)
- {
- (*fi)->cwi = (int *) calloc(256, sizeof(int));
- if ((*fi)->cwi == NULL)
+ {
+ (*fi)->cwi = (int *) calloc(256, sizeof(int));
+ if ((*fi)->cwi == NULL)
{
- error = storageProblem;
+ error = storageProblem;
return(error);
}
}
@@ -1414,15 +1414,15 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
code = parseCharWidths(&aFile, (*fi)->cwi);
} /* else */
} /* if */
-
+
if ((error != earlyEOF) && (code < 0)) error = code;
-
+
/* The remaining sections of the AFM are optional. This code will */
/* look at the next keyword in the file to determine what section */
/* is next, and then allocate the appropriate amount of storage */
/* for the data (if the data is to be saved) and call the */
/* appropriate parsing routine to parse the section. */
-
+
while ((code != normalEOF) && (code != earlyEOF))
{
keyword = token(&aFile,tokenlen);
@@ -1444,11 +1444,11 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((flags & P_T) && keyword)
{
(*fi)->numOfTracks = atoi(keyword);
- (*fi)->tkd = (TrackKernData *)
+ (*fi)->tkd = (TrackKernData *)
calloc((*fi)->numOfTracks, sizeof(TrackKernData));
- if ((*fi)->tkd == NULL)
+ if ((*fi)->tkd == NULL)
{
- error = storageProblem;
+ error = storageProblem;
return(error);
}
} /* if */
@@ -1459,11 +1459,11 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((flags & P_P) && keyword)
{
(*fi)->numOfPairs = atoi(keyword);
- (*fi)->pkd = (PairKernData *)
+ (*fi)->pkd = (PairKernData *)
calloc((*fi)->numOfPairs, sizeof(PairKernData));
- if ((*fi)->pkd == NULL)
+ if ((*fi)->pkd == NULL)
{
- error = storageProblem;
+ error = storageProblem;
return(error);
}
} /* if */
@@ -1472,18 +1472,18 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
case STARTCOMPOSITES:
keyword = token(&aFile,tokenlen);
if ((flags & P_C) && keyword)
- {
+ {
(*fi)->numOfComps = atoi(keyword);
- (*fi)->ccd = (CompCharData *)
+ (*fi)->ccd = (CompCharData *)
calloc((*fi)->numOfComps, sizeof(CompCharData));
- if ((*fi)->ccd == NULL)
+ if ((*fi)->ccd == NULL)
{
- error = storageProblem;
+ error = storageProblem;
return(error);
}
} /* if */
- code = parseCompCharData(&aFile, *fi);
- break;
+ code = parseCompCharData(&aFile, *fi);
+ break;
case ENDFONTMETRICS:
code = normalEOF;
break;
@@ -1495,15 +1495,15 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
code = parseError;
break;
} /* switch */
-
+
if ((error != earlyEOF) && (code < 0)) error = code;
-
+
} /* while */
-
+
if ((error != earlyEOF) && (code < 0)) error = code;
-
+
return(error);
-
+
} /* parseFile */
void
diff --git a/vcl/unx/source/fontmanager/parseAFM.hxx b/vcl/unx/source/fontmanager/parseAFM.hxx
index cfebde696c14..60cf5db929a3 100644
--- a/vcl/unx/source/fontmanager/parseAFM.hxx
+++ b/vcl/unx/source/fontmanager/parseAFM.hxx
@@ -2,20 +2,20 @@
* (C) 1988, 1989 by Adobe Systems Incorporated. All rights reserved.
*
* This file may be freely copied and redistributed as long as:
- * 1) This entire notice continues to be included in the file,
+ * 1) This entire notice continues to be included in the file,
* 2) If the file has been modified in any way, a notice of such
* modification is conspicuously indicated.
*
* PostScript, Display PostScript, and Adobe are registered trademarks of
* Adobe Systems Incorporated.
- *
+ *
* ************************************************************************
* THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT
* NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS
- * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR
- * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY
- * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION,
- * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
+ * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR
+ * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY
+ * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION,
+ * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
* ************************************************************************
*/
@@ -40,23 +40,23 @@
* Together these files provide the functionality to parse Adobe Font
* Metrics files and store the information in predefined data structures.
* It is intended to work with an application program that needs font metric
- * information. The program can be used as is by making a procedure call to
+ * information. The program can be used as is by making a procedure call to
* parse an AFM file and have the data stored, or an application developer
- * may wish to customize the code.
+ * may wish to customize the code.
*
- * This header file defines the data structures used as well as the key
+ * This header file defines the data structures used as well as the key
* strings that are currently recognized by this version of the AFM parser.
- * This program is based on the document "Adobe Font Metrics Files,
+ * This program is based on the document "Adobe Font Metrics Files,
* Specification Version 2.0".
*
* AFM files are separated into distinct sections of different data. Because
* of this, the parseAFM program can parse a specified file to only save
- * certain sections of information based on the application's needs. A record
+ * certain sections of information based on the application's needs. A record
* containing the requested information will be returned to the application.
- *
+ *
* AFM files are divided into five sections of data:
* 1) The Global Font Information
- * 2) The Character Metrics Information
+ * 2) The Character Metrics Information
* 3) The Track Kerning Data
* 4) The Pair-Wise Kerning Data
* 5) The Composite Character Data
@@ -65,22 +65,22 @@
* of what other sections are requested. In addition, in recognizing that
* many applications will want ONLY the x-width of characters and not all
* of the other character metrics information, there is a way to receive
- * only the width information so as not to pay the storage cost for the
- * unwanted data. An application should never request both the
- * "quick and dirty" char metrics (widths only) and the Character Metrics
- * Information since the Character Metrics Information will contain all
+ * only the width information so as not to pay the storage cost for the
+ * unwanted data. An application should never request both the
+ * "quick and dirty" char metrics (widths only) and the Character Metrics
+ * Information since the Character Metrics Information will contain all
* of the character widths as well.
- *
- * There is a procedure in parseAFM.c, called parseFile, that can be
+ *
+ * There is a procedure in parseAFM.c, called parseFile, that can be
* called from any application wishing to get information from the AFM File.
* This procedure expects 3 parameters: a vaild file descriptor, a pointer
- * to a (FontInfo *) variable (for which space will be allocated and then
+ * to a (FontInfo *) variable (for which space will be allocated and then
* will be filled in with the data requested), and a mask specifying
* which data from the AFM File should be saved in the FontInfo structure.
- *
+ *
* The flags that can be used to set the appropriate mask are defined below.
- * In addition, several commonly used masks have already been defined.
- *
+ * In addition, several commonly used masks have already been defined.
+ *
* History:
* original: DSM Thu Oct 20 17:39:59 PDT 1988
* modified: DSM Mon Jul 3 14:17:50 PDT 1989
@@ -112,27 +112,27 @@ namespace psp {
/* Commonly used flags
*/
-#define P_GW (P_G | P_W)
+#define P_GW (P_G | P_W)
#define P_GM (P_G | P_M)
#define P_GMP (P_G | P_M | P_P)
-#define P_GMK (P_G | P_M | P_P | P_T)
+#define P_GMK (P_G | P_M | P_P | P_T)
#define P_ALL (P_G | P_M | P_P | P_T | P_C)
/* Possible return codes from the parseFile procedure.
- *
+ *
* ok means there were no problems parsing the file.
*
* parseError means that there was some kind of parsing error, but the
* parser went on. This could include problems like the count for any given
* section does not add up to how many entries there actually were, or
* there was a key that was not recognized. The return record may contain
- * vaild data or it may not.
+ * vaild data or it may not.
*
* earlyEOF means that an End of File was encountered before expected. This
* may mean that the AFM file had been truncated, or improperly formed.
- *
+ *
* storageProblem means that there were problems allocating storage for
* the data structures that would have contained the AFM data.
*/
@@ -142,16 +142,16 @@ enum afmError { ok = 0, parseError = -1, earlyEOF = -2, storageProblem = -3 };
/************************* TYPES *********************************/
/* Below are all of the data structure definitions. These structures
- * try to map as closely as possible to grouping and naming of data
+ * try to map as closely as possible to grouping and naming of data
* in the AFM Files.
*/
-/* Bounding box definition. Used for the Font BBox as well as the
+/* Bounding box definition. Used for the Font BBox as well as the
* Character BBox.
*/
typedef struct
-{
+{
int llx; /* lower left x-position */
int lly; /* lower left y-position */
int urx; /* upper right x-position */
@@ -160,12 +160,12 @@ typedef struct
/* Global Font information.
- * The key that each field is associated with is in comments. For an
+ * The key that each field is associated with is in comments. For an
* explanation about each key and its value please refer to the AFM
- * documentation (full title & version given above).
+ * documentation (full title & version given above).
*/
typedef struct
-{
+{
char *afmVersion; /* key: StartFontMetrics */
char *fontName; /* key: FontName */
char *fullName; /* key: FullName */
@@ -197,15 +197,15 @@ typedef struct _t_ligature
} Ligature;
-/* Character Metric Information. This structure is used only if ALL
+/* Character Metric Information. This structure is used only if ALL
* character metric information is requested. If only the character
* widths is requested, then only an array of the character x-widths
* is returned.
*
- * The key that each field is associated with is in comments. For an
- * explanation about each key and its value please refer to the
+ * The key that each field is associated with is in comments. For an
+ * explanation about each key and its value please refer to the
* Character Metrics section of the AFM documentation (full title
- * & version given above).
+ * & version given above).
*/
typedef struct
{
@@ -220,19 +220,19 @@ typedef struct
/* Track kerning data structure.
- * The fields of this record are the five values associated with every
+ * The fields of this record are the five values associated with every
* TrackKern entry.
- *
- * For an explanation about each value please refer to the
+ *
+ * For an explanation about each value please refer to the
* Track Kerning section of the AFM documentation (full title
- * & version given above).
+ * & version given above).
*/
-typedef struct
+typedef struct
{
- int degree;
- float minPtSize,
- minKernAmt,
- maxPtSize,
+ int degree;
+ float minPtSize,
+ minKernAmt,
+ maxPtSize,
maxKernAmt;
} TrackKernData;
@@ -241,11 +241,11 @@ typedef struct
* The fields of this record are the four values associated with every
* KP entry. For KPX entries, the yamt will be zero.
*
- * For an explanation about each value please refer to the
+ * For an explanation about each value please refer to the
* Pair Kerning section of the AFM documentation (full title
- * & version given above).
+ * & version given above).
*/
-typedef struct
+typedef struct
{
char *name1;
char *name2;
@@ -257,10 +257,10 @@ typedef struct
/* PCC is a piece of a composite character. This is a sub structure of a
* compCharData described below.
* These fields will be filled in with the values from the key PCC.
- *
- * For an explanation about each key and its value please refer to the
+ *
+ * For an explanation about each key and its value please refer to the
* Composite Character section of the AFM documentation (full title
- * & version given above).
+ * & version given above).
*/
typedef struct
{
@@ -270,15 +270,15 @@ typedef struct
} Pcc;
-/* Composite Character Information data structure.
+/* Composite Character Information data structure.
* The fields ccName and numOfPieces are filled with the values associated
* with the key CC. The field pieces points to an array (size = numOfPieces)
* of information about each of the parts of the composite character. That
* array is filled in with the values from the key PCC.
- *
- * For an explanation about each key and its value please refer to the
+ *
+ * For an explanation about each key and its value please refer to the
* Composite Character section of the AFM documentation (full title
- * & version given above).
+ * & version given above).
*/
typedef struct
{
@@ -295,9 +295,9 @@ typedef struct
* parseFile function.
*/
typedef struct
-{
+{
GlobalFontInfo *gfi; /* ptr to a GlobalFontInfo record */
- int *cwi; /* ptr to 256 element array of just char widths */
+ int *cwi; /* ptr to 256 element array of just char widths */
int numOfChars; /* number of entries in char metrics array */
CharMetricInfo *cmi; /* ptr to char metrics array */
int numOfTracks; /* number to entries in track kerning array */
@@ -316,7 +316,7 @@ typedef struct
*
* "fp" should be a valid file pointer to an AFM file.
*
- * "fi" is a pointer to a pointer to a FontInfo record sturcture
+ * "fi" is a pointer to a pointer to a FontInfo record sturcture
* (defined above). Storage for the FontInfo structure will be
* allocated in parseFile and the structure will be filled in
* with the requested data from the AFM File.
@@ -328,7 +328,7 @@ typedef struct
* The possible return codes from parseFile are defined above.
*/
-int parseFile( const char* pFilename, FontInfo **fi, FLAGS flags );
+int parseFile( const char* pFilename, FontInfo **fi, FLAGS flags );
void freeFontInfo(FontInfo *fi);
} // namespace
diff --git a/vcl/unx/source/gdi/cdeint.cxx b/vcl/unx/source/gdi/cdeint.cxx
index caa4867af874..3d4fea382f24 100644
--- a/vcl/unx/source/gdi/cdeint.cxx
+++ b/vcl/unx/source/gdi/cdeint.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,9 +73,9 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
XTextProperty aTextProperty;
aTextProperty.value = 0;
int i;
-
+
static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False );
-
+
if( XGetTextProperty( mpDisplay,
RootWindow( mpDisplay, 0 ),
&aTextProperty,
@@ -123,7 +123,7 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
;
int nNumber = aLine.Copy( ++nPos ).ToInt32();
-
+
DBG_TRACE2( "found palette %d in resource \"%s\"", nNumber, aLine.GetBuffer() );
// found no documentation what this number actually means;
@@ -133,7 +133,7 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
continue;
DBG_TRACE1( "Palette file is \"%s\".\n", aPaletteFile.GetBuffer() );
-
+
String aPath( aHomeDir );
aPath.AppendAscii( "/.dt/palettes/" );
aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
@@ -162,12 +162,12 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
aColors[nIndex] = Color(
getHexDigit( pArr[1] )
| ( getHexDigit( pArr[0] ) << 4 ),
- getHexDigit( pArr[5] )
+ getHexDigit( pArr[5] )
| ( getHexDigit( pArr[4] ) << 4 ),
getHexDigit( pArr[9] )
| ( getHexDigit( pArr[8] ) << 4 )
);
-
+
DBG_TRACE1( "\t\t%lx\n", aColors[nIndex].GetColor() );
}
}
@@ -177,14 +177,14 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
}
}
}
-
+
if( ppStringList )
XFreeStringList( ppStringList );
if( aTextProperty.value )
XFree( aTextProperty.value );
}
-
+
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
// #i48001# set a default blink rate
aStyleSettings.SetCursorBlinkTime( 500 );
@@ -199,13 +199,13 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
aStyleSettings.SetDeactiveBorderColor( aColors[0] );
Color aActive =
- aColors[ 0 ].GetBlue() < 128 ||
- aColors[ 0 ].GetGreen() < 128 ||
+ aColors[ 0 ].GetBlue() < 128 ||
+ aColors[ 0 ].GetGreen() < 128 ||
aColors[ 0 ].GetRed() < 128
? Color( COL_WHITE ) : Color( COL_BLACK );
Color aDeactive =
- aColors[ 1 ].GetBlue() < 128 ||
- aColors[ 1 ].GetGreen() < 128 ||
+ aColors[ 1 ].GetBlue() < 128 ||
+ aColors[ 1 ].GetGreen() < 128 ||
aColors[ 1 ].GetRed() < 128
? Color( COL_WHITE ) : Color( COL_BLACK );
aStyleSettings.SetActiveTextColor( aActive );
diff --git a/vcl/unx/source/gdi/dtint.cxx b/vcl/unx/source/gdi/dtint.cxx
index 5f0dbd50ea17..2eb3c83f0a5b 100644
--- a/vcl/unx/source/gdi/dtint.cxx
+++ b/vcl/unx/source/gdi/dtint.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/gdi/dtsetenum.hxx b/vcl/unx/source/gdi/dtsetenum.hxx
index 5406ac870a43..87990d08a80c 100644
--- a/vcl/unx/source/gdi/dtsetenum.hxx
+++ b/vcl/unx/source/gdi/dtsetenum.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx
index a69a2426b519..8b2048609999 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -152,7 +152,7 @@ void X11GlyphPeer::InitAntialiasing()
enum { INFO_EMPTY=0, INFO_PIXMAP, INFO_XRENDER, INFO_RAWBMP, INFO_MULTISCREEN };
static const Glyph NO_GLYPHID = 0;
-static RawBitmap* const NO_RAWBMP = NULL;
+static RawBitmap* const NO_RAWBMP = NULL;
static const Pixmap NO_PIXMAP = ~0;
// ---------------------------------------------------------------------------
@@ -516,7 +516,7 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nR
*pTemp = lsb2msb[ *pTemp ];
// often a glyph pixmap is only needed on the default screen
- // => optimize for this common case
+ // => optimize for this common case
int nMinScreen = 0;
int nEndScreen = mnMaxScreens;
if( nReqScreen == mnDefaultScreen ) {
@@ -642,7 +642,7 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
// ===========================================================================
X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
-: GlyphCache( rPeer )
+: GlyphCache( rPeer )
{
}
diff --git a/vcl/unx/source/gdi/gcach_xpeer.hxx b/vcl/unx/source/gdi/gcach_xpeer.hxx
index 13277fa975de..b02e33c7656d 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index d3eb103b9dd6..e62d72c172dc 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,29 +62,29 @@ using namespace rtl;
class SalPrinterBmp : public psp::PrinterBmp
{
private:
- BitmapBuffer* mpBmpBuffer;
+ BitmapBuffer* mpBmpBuffer;
- FncGetPixel mpFncGetPixel;
- Scanline mpScanAccess;
- sal_PtrDiff mnScanOffset;
+ FncGetPixel mpFncGetPixel;
+ Scanline mpScanAccess;
+ sal_PtrDiff mnScanOffset;
- sal_uInt32 ColorOf (BitmapColor& rColor) const;
- sal_uInt8 GrayOf (BitmapColor& rColor) const;
+ sal_uInt32 ColorOf (BitmapColor& rColor) const;
+ sal_uInt8 GrayOf (BitmapColor& rColor) const;
SalPrinterBmp ();
public:
SalPrinterBmp (BitmapBuffer* pBitmap);
- virtual ~SalPrinterBmp ();
- virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const;
- virtual sal_uInt32 GetPaletteEntryCount () const;
- virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt32 GetWidth () const;
- virtual sal_uInt32 GetHeight() const;
- virtual sal_uInt32 GetDepth () const;
+ virtual ~SalPrinterBmp ();
+ virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const;
+ virtual sal_uInt32 GetPaletteEntryCount () const;
+ virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const;
+ virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const;
+ virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const;
+ virtual sal_uInt32 GetWidth () const;
+ virtual sal_uInt32 GetHeight() const;
+ virtual sal_uInt32 GetDepth () const;
};
SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) :
@@ -109,17 +109,17 @@ SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) :
switch( BMP_SCANLINE_FORMAT( mpBmpBuffer->mnFormat ) )
{
case BMP_FORMAT_1BIT_MSB_PAL:
- mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_MSB_PAL; break;
+ mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_MSB_PAL; break;
case BMP_FORMAT_1BIT_LSB_PAL:
- mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_LSB_PAL; break;
+ mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_LSB_PAL; break;
case BMP_FORMAT_4BIT_MSN_PAL:
- mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_MSN_PAL; break;
+ mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_MSN_PAL; break;
case BMP_FORMAT_4BIT_LSN_PAL:
- mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_LSN_PAL; break;
+ mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_LSN_PAL; break;
case BMP_FORMAT_8BIT_PAL:
- mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_PAL; break;
+ mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_PAL; break;
case BMP_FORMAT_8BIT_TC_MASK:
- mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_TC_MASK; break;
+ mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_TC_MASK; break;
case BMP_FORMAT_16BIT_TC_MSB_MASK:
mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_MSB_MASK; break;
case BMP_FORMAT_16BIT_TC_LSB_MASK:
@@ -200,7 +200,7 @@ SalPrinterBmp::ColorOf (BitmapColor& rColor) const
if (rColor.IsIndex())
return ColorOf (mpBmpBuffer->maPalette[rColor.GetIndex()]);
else
- return ((rColor.GetBlue()) & 0x000000ff)
+ return ((rColor.GetBlue()) & 0x000000ff)
| ((rColor.GetGreen() << 8) & 0x0000ff00)
| ((rColor.GetRed() << 16) & 0x00ff0000);
}
@@ -390,7 +390,7 @@ void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry);
}
-void PspGraphics::drawPolyPolygon( sal_uInt32 nPoly,
+void PspGraphics::drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32 *pPoints,
PCONSTSALPOINT *pPtAry )
{
@@ -565,8 +565,8 @@ PspFontLayout::PspFontLayout( ::psp::PrinterGfx& rGfx )
mnFontHeight = mrPrinterGfx.GetFontHeight();
mnFontWidth = mrPrinterGfx.GetFontWidth();
mbVertical = mrPrinterGfx.GetFontVertical();
- mbArtItalic = mrPrinterGfx.GetArtificialItalic();
- mbArtBold = mrPrinterGfx.GetArtificialBold();
+ mbArtItalic = mrPrinterGfx.GetArtificialItalic();
+ mbArtBold = mrPrinterGfx.GetArtificialBold();
}
//--------------------------------------------------------------------------
@@ -654,19 +654,19 @@ public:
PspServerFontLayout( psp::PrinterGfx&, ServerFont& rFont, const ImplLayoutArgs& rArgs );
virtual void InitFont() const;
- const sal_Unicode* getTextPtr() const { return maText.getStr() - mnMinCharPos; }
- int getMinCharPos() const { return mnMinCharPos; }
- int getMaxCharPos() const { return mnMinCharPos+maText.getLength()-1; }
+ const sal_Unicode* getTextPtr() const { return maText.getStr() - mnMinCharPos; }
+ int getMinCharPos() const { return mnMinCharPos; }
+ int getMaxCharPos() const { return mnMinCharPos+maText.getLength()-1; }
private:
::psp::PrinterGfx& mrPrinterGfx;
sal_IntPtr mnFontID;
int mnFontHeight;
int mnFontWidth;
bool mbVertical;
- bool mbArtItalic;
- bool mbArtBold;
- rtl::OUString maText;
- int mnMinCharPos;
+ bool mbArtItalic;
+ bool mbArtBold;
+ rtl::OUString maText;
+ int mnMinCharPos;
};
PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& rFont, const ImplLayoutArgs& rArgs )
@@ -677,9 +677,9 @@ PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& r
mnFontHeight = mrPrinterGfx.GetFontHeight();
mnFontWidth = mrPrinterGfx.GetFontWidth();
mbVertical = mrPrinterGfx.GetFontVertical();
- mbArtItalic = mrPrinterGfx.GetArtificialItalic();
- mbArtBold = mrPrinterGfx.GetArtificialBold();
- maText = OUString( rArgs.mpStr + rArgs.mnMinCharPos, rArgs.mnEndCharPos - rArgs.mnMinCharPos+1 );
+ mbArtItalic = mrPrinterGfx.GetArtificialItalic();
+ mbArtBold = mrPrinterGfx.GetArtificialBold();
+ maText = OUString( rArgs.mpStr + rArgs.mnMinCharPos, rArgs.mnEndCharPos - rArgs.mnMinCharPos+1 );
mnMinCharPos = rArgs.mnMinCharPos;
}
@@ -698,7 +698,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
sal_Int32 aWidthAry[ nMaxGlyphs ];
sal_Int32 aIdxAry [ nMaxGlyphs ];
sal_Unicode aUnicodes[ nMaxGlyphs ];
- int aCharPosAry [ nMaxGlyphs ];
+ int aCharPosAry [ nMaxGlyphs ];
Point aPos;
long nUnitsPerPixel = rLayout.GetUnitsPerPixel();
@@ -798,7 +798,7 @@ USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
// return early if there is no new font
if( !pEntry )
return 0;
-
+
sal_IntPtr nID = pEntry->mpFontData ? pEntry->mpFontData->GetFontId() : 0;
// determine which font attributes need to be emulated
@@ -897,19 +897,19 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric )
pMetric->mbDevice = aDFA.mbDevice;
pMetric->mbScalableFont = true;
- pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle();
- pMetric->mnSlant = 0;
+ pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle();
+ pMetric->mnSlant = 0;
- sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight();
- sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth();
+ sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight();
+ sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth();
if( ! nTextWidth )
nTextWidth = nTextHeight;
- pMetric->mnWidth = nTextWidth;
- pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000;
- pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000;
- pMetric->mnIntLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000;
- pMetric->mnExtLeading = 0;
+ pMetric->mnWidth = nTextWidth;
+ pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000;
+ pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000;
+ pMetric->mnIntLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000;
+ pMetric->mnExtLeading = 0;
}
}
@@ -926,9 +926,9 @@ ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
nTextScale = m_pPrinterGfx->GetFontHeight();
for( i = 0, it = rPairs.begin(); i < nPairs && i < nHavePairs; i++, ++it )
{
- pKernPairs[i].mnChar1 = it->first;
- pKernPairs[i].mnChar2 = it->second;
- pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000;
+ pKernPairs[i].mnChar1 = it->first;
+ pKernPairs[i].mnChar2 = it->second;
+ pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000;
}
}
@@ -1094,9 +1094,9 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
return NULL;
// fill in font info
- rInfo.m_nAscent = aFontInfo.m_nAscend;
- rInfo.m_nDescent = aFontInfo.m_nDescend;
- rInfo.m_aPSName = rMgr.getPSName( aFont );
+ rInfo.m_nAscent = aFontInfo.m_nAscend;
+ rInfo.m_nDescent = aFontInfo.m_nDescend;
+ rInfo.m_aPSName = rMgr.getPSName( aFont );
int xMin, yMin, xMax, yMax;
rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax );
@@ -1126,8 +1126,8 @@ const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Ucs* pUnico
*pDataLen = aStat.st_size;
- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
- rInfo.m_nCapHeight = yMax; // Well ...
+ rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
+ rInfo.m_nCapHeight = yMax; // Well ...
for( int i = 0; i < 256; i++ )
pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0);
@@ -1186,13 +1186,13 @@ FontWidth PspGraphics::ToFontWidth (psp::width::type eWidth)
{
case psp::width::UltraCondensed: return WIDTH_ULTRA_CONDENSED;
case psp::width::ExtraCondensed: return WIDTH_EXTRA_CONDENSED;
- case psp::width::Condensed: return WIDTH_CONDENSED;
- case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED;
- case psp::width::Normal: return WIDTH_NORMAL;
- case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED;
- case psp::width::Expanded: return WIDTH_EXPANDED;
- case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED;
- case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED;
+ case psp::width::Condensed: return WIDTH_CONDENSED;
+ case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED;
+ case psp::width::Normal: return WIDTH_NORMAL;
+ case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED;
+ case psp::width::Expanded: return WIDTH_EXPANDED;
+ case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED;
+ case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED;
case psp::width::Unknown: return WIDTH_DONTKNOW;
default:
DBG_ERROR( "unknown width mapping" );
@@ -1205,17 +1205,17 @@ FontWeight PspGraphics::ToFontWeight (psp::weight::type eWeight)
{
switch (eWeight)
{
- case psp::weight::Thin: return WEIGHT_THIN;
+ case psp::weight::Thin: return WEIGHT_THIN;
case psp::weight::UltraLight: return WEIGHT_ULTRALIGHT;
- case psp::weight::Light: return WEIGHT_LIGHT;
+ case psp::weight::Light: return WEIGHT_LIGHT;
case psp::weight::SemiLight: return WEIGHT_SEMILIGHT;
- case psp::weight::Normal: return WEIGHT_NORMAL;
- case psp::weight::Medium: return WEIGHT_MEDIUM;
- case psp::weight::SemiBold: return WEIGHT_SEMIBOLD;
- case psp::weight::Bold: return WEIGHT_BOLD;
+ case psp::weight::Normal: return WEIGHT_NORMAL;
+ case psp::weight::Medium: return WEIGHT_MEDIUM;
+ case psp::weight::SemiBold: return WEIGHT_SEMIBOLD;
+ case psp::weight::Bold: return WEIGHT_BOLD;
case psp::weight::UltraBold: return WEIGHT_ULTRABOLD;
- case psp::weight::Black: return WEIGHT_BLACK;
- case psp::weight::Unknown: return WEIGHT_DONTKNOW;
+ case psp::weight::Black: return WEIGHT_BLACK;
+ case psp::weight::Unknown: return WEIGHT_DONTKNOW;
default:
DBG_ERROR( "unknown weight mapping" );
break;
@@ -1227,9 +1227,9 @@ FontPitch PspGraphics::ToFontPitch (psp::pitch::type ePitch)
{
switch (ePitch)
{
- case psp::pitch::Fixed: return PITCH_FIXED;
- case psp::pitch::Variable: return PITCH_VARIABLE;
- case psp::pitch::Unknown: return PITCH_DONTKNOW;
+ case psp::pitch::Fixed: return PITCH_FIXED;
+ case psp::pitch::Variable: return PITCH_VARIABLE;
+ case psp::pitch::Unknown: return PITCH_DONTKNOW;
default:
DBG_ERROR( "unknown pitch mapping" );
break;
@@ -1241,10 +1241,10 @@ FontItalic PspGraphics::ToFontItalic (psp::italic::type eItalic)
{
switch (eItalic)
{
- case psp::italic::Upright: return ITALIC_NONE;
- case psp::italic::Oblique: return ITALIC_OBLIQUE;
- case psp::italic::Italic: return ITALIC_NORMAL;
- case psp::italic::Unknown: return ITALIC_DONTKNOW;
+ case psp::italic::Upright: return ITALIC_NONE;
+ case psp::italic::Oblique: return ITALIC_OBLIQUE;
+ case psp::italic::Italic: return ITALIC_NORMAL;
+ case psp::italic::Unknown: return ITALIC_DONTKNOW;
default:
DBG_ERROR( "unknown italic mapping" );
break;
@@ -1257,12 +1257,12 @@ FontFamily PspGraphics::ToFontFamily (psp::family::type eFamily)
switch (eFamily)
{
case psp::family::Decorative: return FAMILY_DECORATIVE;
- case psp::family::Modern: return FAMILY_MODERN;
- case psp::family::Roman: return FAMILY_ROMAN;
- case psp::family::Script: return FAMILY_SCRIPT;
- case psp::family::Swiss: return FAMILY_SWISS;
- case psp::family::System: return FAMILY_SYSTEM;
- case psp::family::Unknown: return FAMILY_DONTKNOW;
+ case psp::family::Modern: return FAMILY_MODERN;
+ case psp::family::Roman: return FAMILY_ROMAN;
+ case psp::family::Script: return FAMILY_SCRIPT;
+ case psp::family::Swiss: return FAMILY_SWISS;
+ case psp::family::System: return FAMILY_SYSTEM;
+ case psp::family::Unknown: return FAMILY_DONTKNOW;
default:
DBG_ERROR( "unknown family mapping" );
break;
@@ -1484,7 +1484,7 @@ SystemFontData PspGraphics::GetSysFontData( int nFallbacklevel ) const
if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
if (nFallbacklevel < 0 ) nFallbacklevel = 0;
-
+
aSysFontData.nSize = sizeof( SystemFontData );
aSysFontData.nFontId = 0;
aSysFontData.nFontFlags = 0;
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
index cc7934b0a798..480a358ed7ed 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,8 +63,8 @@ SalBitmap* X11SalInstance::CreateSalBitmap()
return new X11SalBitmap();
}
-ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
-ULONG X11SalBitmap::mnCacheInstCount = 0;
+ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
+ULONG X11SalBitmap::mnCacheInstCount = 0;
// -----------------------------------------------------------------------------
@@ -138,13 +138,13 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount,
case( 4 ): pDIB->mnFormat |= BMP_FORMAT_4BIT_MSN_PAL; break;
case( 8 ): pDIB->mnFormat |= BMP_FORMAT_8BIT_PAL; break;
#ifdef OSL_BIGENDIAN
- case(16 ):
- pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_MSB_MASK;
+ case(16 ):
+ pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_MSB_MASK;
pDIB->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f );
break;
#else
- case(16 ):
- pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_LSB_MASK;
+ case(16 ):
+ pDIB->mnFormat|= BMP_FORMAT_16BIT_TC_LSB_MASK;
pDIB->maColorMask = ColorMask( 0xf800, 0x07e0, 0x001f );
break;
#endif
@@ -196,9 +196,9 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
if( aDrawable && nWidth && nHeight && nDrawableDepth )
{
- SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- SalXLib* pXLib = pSalDisp->GetXLib();
- Display* pXDisp = pSalDisp->GetDisplay();
+ SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
+ SalXLib* pXLib = pSalDisp->GetXLib();
+ Display* pXDisp = pSalDisp->GetDisplay();
// do not die on XError here
// alternatively one could check the coordinates for being offscreen
@@ -206,16 +206,16 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
// defaults even if the rectangle is offscreen
// so better catch the XError
pXLib->PushXErrorLevel( true );
- XImage* pImage = XGetImage( pXDisp, aDrawable, nX, nY, nWidth, nHeight, AllPlanes, ZPixmap );
+ XImage* pImage = XGetImage( pXDisp, aDrawable, nX, nY, nWidth, nHeight, AllPlanes, ZPixmap );
bool bWasError = pXLib->HasXErrorOccured() && pXLib->GetLastXErrorRequestCode() == X_GetImage;
pXLib->PopXErrorLevel();
if( ! bWasError && pImage && pImage->data )
{
- const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
- BitmapBuffer aSrcBuf;
- ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP;
- const BitmapPalette* pDstPal = NULL;
+ const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
+ BitmapBuffer aSrcBuf;
+ ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP;
+ const BitmapPalette* pDstPal = NULL;
aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN;
aSrcBuf.mnWidth = nWidth;
@@ -311,8 +311,8 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
for( USHORT i = 0; i < nCols; i++ )
{
- const SalColor nColor( rColMap.GetColor( i ) );
- BitmapColor& rBmpCol = rPal[ i ];
+ const SalColor nColor( rColMap.GetColor( i ) );
+ BitmapColor& rBmpCol = rPal[ i ];
rBmpCol.SetRed( SALCOLOR_RED( nColor ) );
rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) );
@@ -332,7 +332,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
// -----------------------------------------------------------------------------
-XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const
+XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const
{
XImage* pImage = NULL;
@@ -342,16 +342,16 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
ImplCreateDIB( mpDDB->ImplGetPixmap(),
mpDDB->ImplGetScreen(),
mpDDB->ImplGetDepth(),
- 0, 0,
- mpDDB->ImplGetWidth(),
+ 0, 0,
+ mpDDB->ImplGetWidth(),
mpDDB->ImplGetHeight() );
}
if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight )
{
- Display* pXDisp = pSalDisp->GetDisplay();
- long nWidth = rTwoRect.mnDestWidth;
- long nHeight = rTwoRect.mnDestHeight;
+ Display* pXDisp = pSalDisp->GetDisplay();
+ long nWidth = rTwoRect.mnDestWidth;
+ long nHeight = rTwoRect.mnDestHeight;
if( 1 == GetBitCount() )
nDepth = 1;
@@ -362,10 +362,10 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
if( pImage )
{
- BitmapBuffer* pDstBuf;
- ULONG nDstFormat = BMP_FORMAT_TOP_DOWN;
- BitmapPalette* pPal = NULL;
- ColorMask* pMask = NULL;
+ BitmapBuffer* pDstBuf;
+ ULONG nDstFormat = BMP_FORMAT_TOP_DOWN;
+ BitmapPalette* pPal = NULL;
+ ColorMask* pMask = NULL;
switch( pImage->bits_per_pixel )
{
@@ -436,8 +436,8 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
for( USHORT i = 0; i < nCols; i++ )
{
- const SalColor nColor( rColMap.GetColor( i ) );
- BitmapColor& rBmpCol = (*pPal)[ i ];
+ const SalColor nColor( rColMap.GetColor( i ) );
+ BitmapColor& rBmpCol = (*pPal)[ i ];
rBmpCol.SetRed( SALCOLOR_RED( nColor ) );
rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) );
@@ -470,7 +470,7 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
// -----------------------------------------------------------------------------
bool X11SalBitmap::ImplCreateFromDrawable( Drawable aDrawable,
- int nScreen, long nDrawableDepth,
+ int nScreen, long nDrawableDepth,
long nX, long nY, long nWidth, long nHeight )
{
Destroy();
@@ -544,7 +544,7 @@ X11SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow)
if ((width > 0) && (height > 0))
{
- XImage* pImage = XGetImage( pDisplay, aAttribute.root,
+ XImage* pImage = XGetImage( pDisplay, aAttribute.root,
x, y, width, height, AllPlanes, ZPixmap );
bool bSnapShot = ImplCreateFromXImage( pDisplay,
aAttribute.root,
@@ -561,22 +561,22 @@ X11SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow)
return False;
}
-bool
+bool
X11SalBitmap::ImplCreateFromXImage (Display* pDisplay, XLIB_Window hWindow, int nScreen, XImage* pImage)
{
Destroy();
if (pImage != NULL && pImage->width != 0 && pImage->height != 0 && pImage->depth != 0)
{
- mpDDB = new ImplSalDDB (pDisplay, hWindow, nScreen, pImage);
+ mpDDB = new ImplSalDDB (pDisplay, hWindow, nScreen, pImage);
return True;
}
return False;
}
ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable,
- int nScreen,
- long nDrawableDepth,
+ int nScreen,
+ long nDrawableDepth,
const SalTwoRect& rTwoRect ) const
{
if( !mpDDB || !mpDDB->ImplMatches( nScreen, nDrawableDepth, rTwoRect ) )
@@ -589,8 +589,8 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable,
const_cast<X11SalBitmap*>(this)->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(),
mpDDB->ImplGetScreen(),
mpDDB->ImplGetDepth(),
- 0, 0,
- mpDDB->ImplGetWidth(),
+ 0, 0,
+ mpDDB->ImplGetWidth(),
mpDDB->ImplGetHeight() );
}
@@ -651,7 +651,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable,
}
}
- XImage* pImage = ImplCreateXImage( GetX11SalData()->GetDisplay(), nScreen,
+ XImage* pImage = ImplCreateXImage( GetX11SalData()->GetDisplay(), nScreen,
nDrawableDepth, aTwoRect );
if( pImage )
@@ -671,9 +671,9 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable,
// -----------------------------------------------------------------------------
void X11SalBitmap::ImplDraw( Drawable aDrawable,
- int nScreen,
- long nDrawableDepth,
- const SalTwoRect& rTwoRect,
+ int nScreen,
+ long nDrawableDepth,
+ const SalTwoRect& rTwoRect,
const GC& rGC ) const
{
ImplGetDDB( aDrawable, nScreen, nDrawableDepth, rTwoRect );
@@ -720,7 +720,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
else if( rSalBmp.mpDDB )
ImplCreateFromDrawable( rSalBmp.mpDDB->ImplGetPixmap(),
rSalBmp.mpDDB->ImplGetScreen(),
- rSalBmp.mpDDB->ImplGetDepth(),
+ rSalBmp.mpDDB->ImplGetDepth(),
0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() );
return( ( !rSalBmp.mpDIB && !rSalBmp.mpDDB ) ||
@@ -841,19 +841,19 @@ bool X11SalBitmap::GetSystemData( BitmapSystemData& rData )
// --------------
ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable, int nScreen, const SalTwoRect& rTwoRect ) :
- maPixmap ( 0 ),
- maTwoRect ( rTwoRect ),
- mnDepth ( pImage->depth ),
+ maPixmap ( 0 ),
+ maTwoRect ( rTwoRect ),
+ mnDepth ( pImage->depth ),
mnScreen ( nScreen )
{
- SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- Display* pXDisp = pSalDisp->GetDisplay();
+ SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, ImplGetWidth(), ImplGetHeight(), ImplGetDepth() )) )
{
- XGCValues aValues;
- GC aGC;
- int nValues = GCFunction;
+ XGCValues aValues;
+ GC aGC;
+ int nValues = GCFunction;
aValues.function = GXcopy;
@@ -878,9 +878,9 @@ ImplSalDDB::ImplSalDDB (Display* pDisplay, XLIB_Window hWindow, int nScreen, XIm
maPixmap = XCreatePixmap (pDisplay, hWindow, pImage->width, pImage->height, pImage->depth);
if (maPixmap != 0)
{
- XGCValues aValues;
- GC aGC;
- int nValues = GCFunction;
+ XGCValues aValues;
+ GC aGC;
+ int nValues = GCFunction;
aValues.function = GXcopy;
@@ -914,14 +914,14 @@ ImplSalDDB::ImplSalDDB( Drawable aDrawable, int nScreen, long nDrawableDepth, lo
mnDepth( nDrawableDepth ),
mnScreen( nScreen )
{
- SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- Display* pXDisp = pSalDisp->GetDisplay();
+ SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, nWidth, nHeight, nDrawableDepth )) )
{
- XGCValues aValues;
- GC aGC;
- int nValues = GCFunction;
+ XGCValues aValues;
+ GC aGC;
+ int nValues = GCFunction;
aValues.function = GXcopy;
@@ -982,7 +982,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe
void ImplSalDDB::ImplDraw( Drawable aDrawable, long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC ) const
{
- ImplDraw( maPixmap, mnDepth, aDrawable, nDrawableDepth,
+ ImplDraw( maPixmap, mnDepth, aDrawable, nDrawableDepth,
rTwoRect.mnSrcX - maTwoRect.mnSrcX, rTwoRect.mnSrcY - maTwoRect.mnSrcY,
rTwoRect.mnDestWidth, rTwoRect.mnDestHeight,
rTwoRect.mnDestX, rTwoRect.mnDestY, rGC );
@@ -992,12 +992,12 @@ void ImplSalDDB::ImplDraw( Drawable aDrawable, long nDrawableDepth, const SalTwo
void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
Drawable aDstDrawable, long,
- long nSrcX, long nSrcY,
- long nDestWidth, long nDestHeight,
+ long nSrcX, long nSrcY,
+ long nDestWidth, long nDestHeight,
long nDestX, long nDestY, const GC& rGC )
{
- SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- Display* pXDisp = pSalDisp->GetDisplay();
+ SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
if( 1 == nSrcDrawableDepth )
{
@@ -1017,9 +1017,9 @@ void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
struct ImplBmpObj
{
- X11SalBitmap* mpBmp;
- ULONG mnMemSize;
- ULONG mnFlags;
+ X11SalBitmap* mpBmp;
+ ULONG mnMemSize;
+ ULONG mnFlags;
ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) :
mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {}
@@ -1044,7 +1044,7 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags )
{
ImplBmpObj* pObj;
- bool bFound = FALSE;
+ bool bFound = FALSE;
for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() )
if( pObj->mpBmp == pBmp )
diff --git a/vcl/unx/source/gdi/salcvt.cxx b/vcl/unx/source/gdi/salcvt.cxx
index c699cdb12335..49d7befd09e0 100644
--- a/vcl/unx/source/gdi/salcvt.cxx
+++ b/vcl/unx/source/gdi/salcvt.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ SalConverterCache::~SalConverterCache()
#include <stdio.h>
// <---
-rtl_UnicodeToTextConverter
+rtl_UnicodeToTextConverter
SalConverterCache::GetU2TConverter( rtl_TextEncoding nEncoding )
{
if( rtl_isOctetTextEncoding( nEncoding ) )
@@ -60,7 +60,7 @@ SalConverterCache::GetU2TConverter( rtl_TextEncoding nEncoding )
ConverterT& rConverter( m_aConverters[ nEncoding ] );
if ( rConverter.mpU2T == NULL )
{
- rConverter.mpU2T =
+ rConverter.mpU2T =
rtl_createUnicodeToTextConverter( nEncoding );
// ---> FIXME
if ( rConverter.mpU2T == NULL )
@@ -72,7 +72,7 @@ if ( rConverter.mpU2T == NULL )
return NULL;
}
-rtl_TextToUnicodeConverter
+rtl_TextToUnicodeConverter
SalConverterCache::GetT2UConverter( rtl_TextEncoding nEncoding )
{
if( rtl_isOctetTextEncoding( nEncoding ) )
@@ -80,7 +80,7 @@ SalConverterCache::GetT2UConverter( rtl_TextEncoding nEncoding )
ConverterT& rConverter( m_aConverters[ nEncoding ] );
if ( rConverter.mpT2U == NULL )
{
- rConverter.mpT2U =
+ rConverter.mpT2U =
rtl_createTextToUnicodeConverter( nEncoding );
// ---> FIXME
if ( rConverter.mpT2U == NULL )
@@ -106,15 +106,15 @@ SalConverterCache::IsSingleByteEncoding( rtl_TextEncoding nEncoding )
aTextEncInfo.StructSize = sizeof( aTextEncInfo );
rtl_getTextEncodingInfo( nEncoding, &aTextEncInfo );
- if ( aTextEncInfo.MinimumCharSize == aTextEncInfo.MaximumCharSize
+ if ( aTextEncInfo.MinimumCharSize == aTextEncInfo.MaximumCharSize
&& aTextEncInfo.MinimumCharSize == 1)
rConverter.mbSingleByteEncoding = True;
else
rConverter.mbSingleByteEncoding = False;
}
-
+
return rConverter.mbSingleByteEncoding;
- }
+ }
return False;
}
@@ -122,7 +122,7 @@ SalConverterCache::IsSingleByteEncoding( rtl_TextEncoding nEncoding )
// code point nChar. This list has been compiled from the according
// ttmap files in /usr/openwin/lib/X11/fonts/TrueType/ttmap/
Bool
-SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
+SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
sal_Unicode nChar )
{
Bool bMatch = False;
@@ -140,120 +140,120 @@ SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
// handle them also like ms1252
// this is due to the fact that so many X fonts say they are iso8859-1
// but have the other glyphs anyway because they are really ms1252
- bMatch = ( /*nChar >= 0x0000 &&*/ nChar <= 0x00ff )
- || ( nChar == 0x20ac )
- || ( nChar == 0x201a )
- || ( nChar == 0x0192 )
- || ( nChar == 0x201e )
- || ( nChar == 0x2026 )
- || ( nChar == 0x2020 )
- || ( nChar == 0x2021 )
- || ( nChar == 0x02c6 )
- || ( nChar == 0x2030 )
- || ( nChar == 0x0160 )
- || ( nChar == 0x2039 )
- || ( nChar == 0x0152 )
- || ( nChar == 0x017d )
- || ( nChar == 0x2018 )
- || ( nChar == 0x2019 )
- || ( nChar == 0x201c )
- || ( nChar == 0x201d )
- || ( nChar == 0x2022 )
- || ( nChar == 0x2013 )
- || ( nChar == 0x2014 )
- || ( nChar == 0x02dc )
- || ( nChar == 0x2122 )
- || ( nChar == 0x0161 )
- || ( nChar == 0x203a )
- || ( nChar == 0x0153 )
- || ( nChar == 0x017e )
- || ( nChar == 0x0178 )
+ bMatch = ( /*nChar >= 0x0000 &&*/ nChar <= 0x00ff )
+ || ( nChar == 0x20ac )
+ || ( nChar == 0x201a )
+ || ( nChar == 0x0192 )
+ || ( nChar == 0x201e )
+ || ( nChar == 0x2026 )
+ || ( nChar == 0x2020 )
+ || ( nChar == 0x2021 )
+ || ( nChar == 0x02c6 )
+ || ( nChar == 0x2030 )
+ || ( nChar == 0x0160 )
+ || ( nChar == 0x2039 )
+ || ( nChar == 0x0152 )
+ || ( nChar == 0x017d )
+ || ( nChar == 0x2018 )
+ || ( nChar == 0x2019 )
+ || ( nChar == 0x201c )
+ || ( nChar == 0x201d )
+ || ( nChar == 0x2022 )
+ || ( nChar == 0x2013 )
+ || ( nChar == 0x2014 )
+ || ( nChar == 0x02dc )
+ || ( nChar == 0x2122 )
+ || ( nChar == 0x0161 )
+ || ( nChar == 0x203a )
+ || ( nChar == 0x0153 )
+ || ( nChar == 0x017e )
+ || ( nChar == 0x0178 )
;
break;
case RTL_TEXTENCODING_ISO_8859_2:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x017e )
- || ( nChar >= 0x02c7 && nChar <= 0x02dd );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x017e )
+ || ( nChar >= 0x02c7 && nChar <= 0x02dd );
break;
-
+
case RTL_TEXTENCODING_ISO_8859_4:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x017e )
- || ( nChar >= 0x02c7 && nChar <= 0x02db );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x017e )
+ || ( nChar >= 0x02c7 && nChar <= 0x02db );
break;
case RTL_TEXTENCODING_ISO_8859_5:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x00ad )
- || ( nChar >= 0x0401 && nChar <= 0x045f )
- || ( nChar == 0x2116 );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00ad )
+ || ( nChar >= 0x0401 && nChar <= 0x045f )
+ || ( nChar == 0x2116 );
break;
case RTL_TEXTENCODING_ISO_8859_6:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x0600 && nChar <= 0x06ff )
- || ( nChar >= 0xfb50 && nChar <= 0xfffe );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x0600 && nChar <= 0x06ff )
+ || ( nChar >= 0xfb50 && nChar <= 0xfffe );
break;
case RTL_TEXTENCODING_ISO_8859_7:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x00bd )
- || ( nChar == 0x02bd )
- || ( nChar >= 0x0384 && nChar <= 0x03ce )
- || ( nChar >= 0x2014 && nChar <= 0x2019 );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00bd )
+ || ( nChar == 0x02bd )
+ || ( nChar >= 0x0384 && nChar <= 0x03ce )
+ || ( nChar >= 0x2014 && nChar <= 0x2019 );
break;
case RTL_TEXTENCODING_ISO_8859_8:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x00f7 )
- || ( nChar >= 0x05d0 && nChar <= 0x05ea )
- || ( nChar == 0x2017 );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00f7 )
+ || ( nChar >= 0x05d0 && nChar <= 0x05ea )
+ || ( nChar == 0x2017 );
break;
case RTL_TEXTENCODING_ISO_8859_9:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x015f );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x015f );
break;
case RTL_TEXTENCODING_ISO_8859_13:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x017e )
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x017e )
|| ( nChar >= 0x2019 && nChar <= 0x201e );
break;
/* real case for RTL_TEXTENCODING_ISO_8859_15
case RTL_TEXTENCODING_ISO_8859_15:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x00ff )
- || ( nChar >= 0x0152 && nChar <= 0x017e )
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00ff )
+ || ( nChar >= 0x0152 && nChar <= 0x017e )
|| ( nChar == 0x20ac );
break;
*/
case RTL_TEXTENCODING_JIS_X_0201:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0xff61 && nChar <= 0xff9f );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0xff61 && nChar <= 0xff9f );
break;
case RTL_TEXTENCODING_MS_1251:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x00bb )
- || ( nChar >= 0x0401 && nChar <= 0x045f )
- || ( nChar >= 0x0490 && nChar <= 0x0491 )
- || ( nChar >= 0x2013 && nChar <= 0x203a )
- || ( nChar >= 0x2116 && nChar <= 0x2122 );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00bb )
+ || ( nChar >= 0x0401 && nChar <= 0x045f )
+ || ( nChar >= 0x0490 && nChar <= 0x0491 )
+ || ( nChar >= 0x2013 && nChar <= 0x203a )
+ || ( nChar >= 0x2116 && nChar <= 0x2122 );
break;
case RTL_TEXTENCODING_KOI8_R:
- bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
- || ( nChar >= 0x00a0 && nChar <= 0x00b7 )
- || ( nChar == 0x00f7 )
- || ( nChar >= 0x0401 && nChar <= 0x0451 )
- || ( nChar >= 0x2219 && nChar <= 0x221a )
- || ( nChar >= 0x2248 && nChar <= 0x2265 )
- || ( nChar >= 0x2320 && nChar <= 0x2321 )
- || ( nChar >= 0x2500 && nChar <= 0x25a0 );
+ bMatch = ( nChar >= 0x0020 && nChar <= 0x007e )
+ || ( nChar >= 0x00a0 && nChar <= 0x00b7 )
+ || ( nChar == 0x00f7 )
+ || ( nChar >= 0x0401 && nChar <= 0x0451 )
+ || ( nChar >= 0x2219 && nChar <= 0x221a )
+ || ( nChar >= 0x2248 && nChar <= 0x2265 )
+ || ( nChar >= 0x2320 && nChar <= 0x2321 )
+ || ( nChar >= 0x2500 && nChar <= 0x25a0 );
break;
case RTL_TEXTENCODING_UNICODE:
@@ -267,7 +267,7 @@ SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
case RTL_TEXTENCODING_MS_1361:
case RTL_TEXTENCODING_JIS_X_0208:
- // XXX Big5 and Korean EUC contain Ascii chars, but Solaris
+ // XXX Big5 and Korean EUC contain Ascii chars, but Solaris
// *-big5-1 and *-ksc5601.1992-3 fonts dont, in general CJK fonts
// are monospaced, so dont trust them for latin chars
if (nChar <= 0xFF)
@@ -277,7 +277,7 @@ SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
}
default:
- // XXX really convert the unicode char into the encoding
+ // XXX really convert the unicode char into the encoding
// and check for conversion errors, this is expensive !
rtl_UnicodeToTextConverter aConverter;
rtl_UnicodeToTextContext aContext;
@@ -295,27 +295,27 @@ SalConverterCache::EncodingHasChar( rtl_TextEncoding nEncoding,
sal_Size nConvertedChars;
sal_Size nSize;
- nSize = rtl_convertUnicodeToText( aConverter, aContext,
- &nChar, 1, pConversionBuffer, sizeof(pConversionBuffer),
- RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+ nSize = rtl_convertUnicodeToText( aConverter, aContext,
+ &nChar, 1, pConversionBuffer, sizeof(pConversionBuffer),
+ RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR,
&nConversionInfo, &nConvertedChars );
rtl_destroyUnicodeToTextContext( aConverter, aContext );
bMatch = (nConvertedChars == 1)
- && (nSize == 1 || nSize == 2) // XXX Fix me this is a hack
+ && (nSize == 1 || nSize == 2) // XXX Fix me this is a hack
&& ((nConversionInfo & RTL_UNICODETOTEXT_INFO_ERROR) == 0);
break;
}
- return bMatch;
+ return bMatch;
}
// wrapper for rtl_convertUnicodeToText that handles the usual cases for
// textconversion in drawtext and gettextwidth routines
sal_Size
-SalConverterCache::ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
+SalConverterCache::ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
sal_Char *pBuffer, sal_Size nBufferSize, rtl_TextEncoding nEncoding )
{
rtl_UnicodeToTextConverter aConverter = GetU2TConverter(nEncoding);
@@ -327,10 +327,10 @@ SalConverterCache::ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
sal_uInt32 nCvtInfo;
sal_Size nCvtChars;
- rtl_UnicodeToTextContext aContext =
+ rtl_UnicodeToTextContext aContext =
rtl_createUnicodeToTextContext( aConverter );
- sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext,
+ sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext,
pText, nTextLen, pBuffer, nBufferSize,
nCvtFlags, &nCvtInfo, &nCvtChars );
diff --git a/vcl/unx/source/gdi/salcvt.hxx b/vcl/unx/source/gdi/salcvt.hxx
index c142c76fe5d0..bb9495abbaa7 100644
--- a/vcl/unx/source/gdi/salcvt.hxx
+++ b/vcl/unx/source/gdi/salcvt.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,40 +33,40 @@
#include <map>
-extern "C" const char*
+extern "C" const char*
pGetEncodingName( rtl_TextEncoding nEncoding );
//
// Cache TextToUnicode and UnicodeToText converter and conversion info which is
// used in DrawXYZ routines and in the Event loop
-//
+//
class SalConverterCache {
public:
SalConverterCache();
~SalConverterCache();
- Bool EncodingHasChar(
+ Bool EncodingHasChar(
rtl_TextEncoding nEncoding, sal_Unicode nChar );
- rtl_UnicodeToTextConverter
+ rtl_UnicodeToTextConverter
GetU2TConverter( rtl_TextEncoding nEncoding );
- rtl_TextToUnicodeConverter
+ rtl_TextToUnicodeConverter
GetT2UConverter( rtl_TextEncoding nEncoding );
- Bool IsSingleByteEncoding( rtl_TextEncoding nEncoding );
- sal_Size ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
- sal_Char *pBuffer, sal_Size nBufferSize,
+ Bool IsSingleByteEncoding( rtl_TextEncoding nEncoding );
+ sal_Size ConvertStringUTF16( const sal_Unicode *pText, int nTextLen,
+ sal_Char *pBuffer, sal_Size nBufferSize,
rtl_TextEncoding nEncoding);
- static SalConverterCache*
- GetInstance ();
+ static SalConverterCache*
+ GetInstance ();
private:
struct ConverterT {
- rtl_UnicodeToTextConverter mpU2T;
- rtl_TextToUnicodeConverter mpT2U;
- Bool mbSingleByteEncoding;
- Bool mbValid;
+ rtl_UnicodeToTextConverter mpU2T;
+ rtl_TextToUnicodeConverter mpT2U;
+ Bool mbSingleByteEncoding;
+ Bool mbValid;
ConverterT() :
mpU2T( NULL ),
mpT2U( NULL ),
@@ -83,7 +83,7 @@ class SalConverterCache {
}
};
- std::map< rtl_TextEncoding, ConverterT > m_aConverters;
+ std::map< rtl_TextEncoding, ConverterT > m_aConverters;
};
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index c0658c162489..b176e41aa178 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,13 +64,13 @@
class SalPolyLine
{
- XPoint Points_[STATIC_POINTS];
- XPoint *pFirst_;
+ XPoint Points_[STATIC_POINTS];
+ XPoint *pFirst_;
public:
- inline SalPolyLine( ULONG nPoints );
- inline SalPolyLine( ULONG nPoints, const SalPoint *p );
- inline ~SalPolyLine();
- inline XPoint &operator [] ( ULONG n ) const
+ inline SalPolyLine( ULONG nPoints );
+ inline SalPolyLine( ULONG nPoints, const SalPoint *p );
+ inline ~SalPolyLine();
+ inline XPoint &operator [] ( ULONG n ) const
{ return pFirst_[n]; }
};
@@ -97,19 +97,19 @@ inline SalPolyLine::~SalPolyLine()
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
X11SalGraphics::X11SalGraphics()
{
- m_pFrame = NULL;
- m_pVDev = NULL;
- m_pDeleteColormap = NULL;
- hDrawable_ = None;
+ m_pFrame = NULL;
+ m_pVDev = NULL;
+ m_pDeleteColormap = NULL;
+ hDrawable_ = None;
m_aRenderPicture = 0;
m_pRenderFormat = NULL;
- pClipRegion_ = NULL;
- pPaintRegion_ = NULL;
+ pClipRegion_ = NULL;
+ pPaintRegion_ = NULL;
- pPenGC_ = NULL;
- nPenPixel_ = 0;
- nPenColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
+ pPenGC_ = NULL;
+ nPenPixel_ = 0;
+ nPenColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
pFontGC_ = NULL;
for( int i = 0; i < MAX_FALLBACK; ++i )
@@ -118,42 +118,42 @@ X11SalGraphics::X11SalGraphics()
mpServerFont[i] = NULL;
}
- nTextPixel_ = 0;
- nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
+ nTextPixel_ = 0;
+ nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
#ifdef ENABLE_GRAPHITE
// check if graphite fonts have been disabled
static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" );
- bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE;
+ bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE;
#endif
- pBrushGC_ = NULL;
- nBrushPixel_ = 0;
- nBrushColor_ = MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ); // White
- hBrush_ = None;
-
- pMonoGC_ = NULL;
- pCopyGC_ = NULL;
- pMaskGC_ = NULL;
- pInvertGC_ = NULL;
- pInvert50GC_ = NULL;
- pStippleGC_ = NULL;
- pTrackingGC_ = NULL;
-
- bWindow_ = FALSE;
- bPrinter_ = FALSE;
- bVirDev_ = FALSE;
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
- bXORMode_ = FALSE;
- bDitherBrush_ = FALSE;
+ pBrushGC_ = NULL;
+ nBrushPixel_ = 0;
+ nBrushColor_ = MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ); // White
+ hBrush_ = None;
+
+ pMonoGC_ = NULL;
+ pCopyGC_ = NULL;
+ pMaskGC_ = NULL;
+ pInvertGC_ = NULL;
+ pInvert50GC_ = NULL;
+ pStippleGC_ = NULL;
+ pTrackingGC_ = NULL;
+
+ bWindow_ = FALSE;
+ bPrinter_ = FALSE;
+ bVirDev_ = FALSE;
+ bPenGC_ = FALSE;
+ bFontGC_ = FALSE;
+ bBrushGC_ = FALSE;
+ bMonoGC_ = FALSE;
+ bCopyGC_ = FALSE;
+ bInvertGC_ = FALSE;
+ bInvert50GC_ = FALSE;
+ bStippleGC_ = FALSE;
+ bTrackingGC_ = FALSE;
+ bXORMode_ = FALSE;
+ bDitherBrush_ = FALSE;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -168,21 +168,21 @@ X11SalGraphics::~X11SalGraphics()
void X11SalGraphics::freeResources()
{
Display *pDisplay = GetXDisplay();
-
+
DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" );
if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ), pClipRegion_ = None;
-
- if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
- if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None;
- if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None;
- if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ ), pBrushGC_ = None;
- if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ ), pMonoGC_ = None;
- if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ ), pCopyGC_ = None;
- if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ ), pMaskGC_ = None;
- if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ ), pInvertGC_ = None;
- if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ ), pInvert50GC_ = None;
- if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ ), pStippleGC_ = None;
- if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ ), pTrackingGC_ = None;
+
+ if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
+ if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None;
+ if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None;
+ if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ ), pBrushGC_ = None;
+ if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ ), pMonoGC_ = None;
+ if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ ), pCopyGC_ = None;
+ if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ ), pMaskGC_ = None;
+ if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ ), pInvertGC_ = None;
+ if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ ), pInvert50GC_ = None;
+ if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ ), pStippleGC_ = None;
+ if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ ), pTrackingGC_ = None;
if( m_pDeleteColormap )
delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = NULL;
@@ -216,34 +216,34 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, int nScreen )
if( hDrawable_ )
{
- nPenPixel_ = GetPixel( nPenColor_ );
- nTextPixel_ = GetPixel( nTextColor_ );
- nBrushPixel_ = GetPixel( nBrushColor_ );
+ nPenPixel_ = GetPixel( nPenColor_ );
+ nTextPixel_ = GetPixel( nTextColor_ );
+ nBrushPixel_ = GetPixel( nBrushColor_ );
}
}
void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen )
{
#if 0 // TODO: use SetDrawable() instead
- m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
- hDrawable_ = aTarget;
+ m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
+ hDrawable_ = aTarget;
m_nScreen = nScreen;
SetXRenderFormat( NULL );
if( m_aRenderPicture )
XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0;
- nPenPixel_ = GetPixel( nPenColor_ );
- nTextPixel_ = GetPixel( nTextColor_ );
- nBrushPixel_ = GetPixel( nBrushColor_ );
+ nPenPixel_ = GetPixel( nPenColor_ );
+ nTextPixel_ = GetPixel( nTextColor_ );
+ nBrushPixel_ = GetPixel( nBrushColor_ );
#else
- m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
+ m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
m_nScreen = nScreen;
SetDrawable( aTarget, nScreen );
#endif
- bWindow_ = TRUE;
- m_pFrame = pFrame;
- m_pVDev = NULL;
+ bWindow_ = TRUE;
+ m_pFrame = pFrame;
+ m_pVDev = NULL;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -262,8 +262,8 @@ void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const
if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ )
Regions[n++] = pClipRegion_;
-// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ )
-// Regions[n++] = pPaintRegion_;
+// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ )
+// Regions[n++] = pPaintRegion_;
if( pXReg && !XEmptyRegion( pXReg ) )
Regions[n++] = pXReg;
@@ -276,8 +276,8 @@ void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const
{
XLIB_Region pTmpRegion = XCreateRegion();
XIntersectRegion( Regions[0], Regions[1], pTmpRegion );
-// if( 3 == n )
-// XIntersectRegion( Regions[2], pTmpRegion, pTmpRegion );
+// if( 3 == n )
+// XIntersectRegion( Regions[2], pTmpRegion, pTmpRegion );
XSetRegion( pDisplay, pGC, pTmpRegion );
XDestroyRegion( pTmpRegion );
}
@@ -291,9 +291,9 @@ GC X11SalGraphics::SelectPen()
if( !pPenGC_ )
{
XGCValues values;
- values.subwindow_mode = ClipByChildren;
- values.fill_rule = EvenOddRule; // Pict import/ Gradient
- values.graphics_exposures = False;
+ values.subwindow_mode = ClipByChildren;
+ values.fill_rule = EvenOddRule; // Pict import/ Gradient
+ values.graphics_exposures = False;
pPenGC_ = XCreateGC( pDisplay, hDrawable_,
GCSubwindowMode | GCFillRule | GCGraphicsExposures,
@@ -322,10 +322,10 @@ GC X11SalGraphics::SelectBrush()
if( !pBrushGC_ )
{
XGCValues values;
- // values.subwindow_mode = IncludeInferiors;
- values.subwindow_mode = ClipByChildren;
- values.fill_rule = EvenOddRule; // Pict import/ Gradient
- values.graphics_exposures = False;
+ // values.subwindow_mode = IncludeInferiors;
+ values.subwindow_mode = ClipByChildren;
+ values.fill_rule = EvenOddRule; // Pict import/ Gradient
+ values.graphics_exposures = False;
pBrushGC_ = XCreateGC( pDisplay, hDrawable_,
GCSubwindowMode | GCFillRule | GCGraphicsExposures,
@@ -379,7 +379,7 @@ GC X11SalGraphics::GetTrackingGC()
^ m_pColormap->GetWhitePixel();
values.function = GXxor;
values.line_width = 1;
- values.line_style = LineOnOffDash;
+ values.line_style = LineOnOffDash;
pTrackingGC_ = XCreateGC( GetXDisplay(), GetDrawable(),
GCGraphicsExposures | GCForeground | GCFunction
@@ -435,8 +435,8 @@ void X11SalGraphics::DrawLines( ULONG nPoints,
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Dithern: Calculate a dither-pixmap and make a brush of it
-#define P_DELTA 51
-#define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA))
+#define P_DELTA 51
+#define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA))
BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
{
@@ -482,11 +482,11 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
GetColormap().GetXVisual(),
8,
ZPixmap,
- 0, // offset
- pBits, // data
- 8, 8, // width & height
- 8, // bitmap_pad
- 0 ); // (default) bytes_per_line
+ 0, // offset
+ pBits, // data
+ 8, 8, // width & height
+ 8, // bitmap_pad
+ 0 ); // (default) bytes_per_line
if ( GetDisplay()->GetProperties() & PROPERTY_BUG_Tile )
{
@@ -503,9 +503,9 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
hBrush_,
GetDisplay()->GetCopyGC( m_nScreen ),
pImage,
- 0, 0, // Source
- 0, 0, // Destination
- 8, 8 ); // width & height
+ 0, 0, // Source
+ 0, 0, // Destination
+ 8, 8 ); // width & height
// destroy image-frame but not palette-data
pImage->data = NULL;
@@ -518,7 +518,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const
{
const SalDisplay *pDisplay = GetDisplay();
-
+
rDPIX = pDisplay->GetResolution().A();
rDPIY = pDisplay->GetResolution().B();
if( !pDisplay->GetExactResolution() && rDPIY < 96 )
@@ -531,12 +531,12 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons
rDPIX = Divide( rDPIX * 200, rDPIY );
rDPIY = 200;
}
-
+
// #i12705# equalize x- and y-resolution if they are close enough
if( rDPIX != rDPIY )
{
// different x- and y- resolutions are usually artifacts of
- // a wrongly calculated screen size.
+ // a wrongly calculated screen size.
//if( (13*rDPIX >= 10*rDPIY) && (13*rDPIY >= 10*rDPIX) ) //+-30%
{
#ifdef DEBUG
@@ -581,18 +581,18 @@ void X11SalGraphics::ResetClipRegion()
{
if( pClipRegion_ )
{
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
-
+ bPenGC_ = FALSE;
+ bFontGC_ = FALSE;
+ bBrushGC_ = FALSE;
+ bMonoGC_ = FALSE;
+ bCopyGC_ = FALSE;
+ bInvertGC_ = FALSE;
+ bInvert50GC_ = FALSE;
+ bStippleGC_ = FALSE;
+ bTrackingGC_ = FALSE;
+
XDestroyRegion( pClipRegion_ );
- pClipRegion_ = NULL;
+ pClipRegion_ = NULL;
}
}
@@ -611,13 +611,13 @@ BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
return TRUE;
XRectangle aRect;
- aRect.x = (short)nX;
- aRect.y = (short)nY;
- aRect.width = (unsigned short)nDX;
- aRect.height = (unsigned short)nDY;
-
+ aRect.x = (short)nX;
+ aRect.y = (short)nY;
+ aRect.width = (unsigned short)nDX;
+ aRect.height = (unsigned short)nDY;
+
XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ );
-
+
return TRUE;
}
@@ -631,16 +631,16 @@ bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalGraphics::EndSetClipRegion()
{
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
-
+ bPenGC_ = FALSE;
+ bFontGC_ = FALSE;
+ bBrushGC_ = FALSE;
+ bMonoGC_ = FALSE;
+ bCopyGC_ = FALSE;
+ bInvertGC_ = FALSE;
+ bInvert50GC_ = FALSE;
+ bStippleGC_ = FALSE;
+ bTrackingGC_ = FALSE;
+
if( XEmptyRegion( pClipRegion_ ) )
{
XDestroyRegion( pClipRegion_ );
@@ -653,8 +653,8 @@ void X11SalGraphics::SetLineColor()
{
if( nPenColor_ != SALCOLOR_NONE )
{
- nPenColor_ = SALCOLOR_NONE;
- bPenGC_ = FALSE;
+ nPenColor_ = SALCOLOR_NONE;
+ bPenGC_ = FALSE;
}
}
@@ -663,9 +663,9 @@ void X11SalGraphics::SetLineColor( SalColor nSalColor )
{
if( nPenColor_ != nSalColor )
{
- nPenColor_ = nSalColor;
- nPenPixel_ = GetPixel( nSalColor );
- bPenGC_ = FALSE;
+ nPenColor_ = nSalColor;
+ nPenPixel_ = GetPixel( nSalColor );
+ bPenGC_ = FALSE;
}
}
@@ -674,9 +674,9 @@ void X11SalGraphics::SetFillColor()
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- bDitherBrush_ = FALSE;
- nBrushColor_ = SALCOLOR_NONE;
- bBrushGC_ = FALSE;
+ bDitherBrush_ = FALSE;
+ nBrushColor_ = SALCOLOR_NONE;
+ bBrushGC_ = FALSE;
}
}
@@ -685,9 +685,9 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor )
{
if( nBrushColor_ != nSalColor )
{
- bDitherBrush_ = FALSE;
- nBrushColor_ = nSalColor;
- nBrushPixel_ = GetPixel( nSalColor );
+ bDitherBrush_ = FALSE;
+ nBrushColor_ = nSalColor;
+ nBrushPixel_ = GetPixel( nSalColor );
if( TrueColor != GetColormap().GetVisual().GetClass()
&& GetColormap().GetColor( nBrushPixel_ ) != nBrushColor_
&& nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) // black
@@ -707,7 +707,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor )
&& nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown
&& nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) )
bDitherBrush_ = GetDitherPixmap(nSalColor);
- bBrushGC_ = FALSE;
+ bBrushGC_ = FALSE;
}
}
@@ -726,8 +726,8 @@ void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor )
nPenPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1;
break;
}
- nPenColor_ = GetColormap().GetColor( nPenPixel_ );
- bPenGC_ = FALSE;
+ nPenColor_ = GetColormap().GetColor( nPenPixel_ );
+ bPenGC_ = FALSE;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -745,9 +745,9 @@ void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor )
nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1;
break;
}
- bDitherBrush_ = FALSE;
- nBrushColor_ = GetColormap().GetColor( nBrushPixel_ );
- bBrushGC_ = FALSE;
+ bDitherBrush_ = FALSE;
+ nBrushColor_ = GetColormap().GetColor( nBrushPixel_ );
+ bBrushGC_ = FALSE;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -755,15 +755,15 @@ void X11SalGraphics::SetXORMode( bool bSet, bool )
{
if( !bXORMode_ == bSet )
{
- bXORMode_ = bSet;
- bPenGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
+ bXORMode_ = bSet;
+ bPenGC_ = FALSE;
+ bBrushGC_ = FALSE;
+ bMonoGC_ = FALSE;
+ bCopyGC_ = FALSE;
+ bInvertGC_ = FALSE;
+ bInvert50GC_ = FALSE;
+ bStippleGC_ = FALSE;
+ bTrackingGC_ = FALSE;
}
}
@@ -779,7 +779,7 @@ void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
if( nSalColor != SALCOLOR_NONE )
{
Display *pDisplay = GetXDisplay();
-
+
if( (nPenColor_ == SALCOLOR_NONE) && !bPenGC_ )
{
SetLineColor( nSalColor );
@@ -790,12 +790,12 @@ void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
else
{
GC pGC = SelectPen();
-
+
if( nSalColor != nPenColor_ )
XSetForeground( pDisplay, pGC, GetPixel( nSalColor ) );
-
+
XDrawPoint( pDisplay, GetDrawable(), pGC, nX, nY );
-
+
if( nSalColor != nPenColor_ )
XSetForeground( pDisplay, pGC, nPenPixel_ );
}
@@ -850,7 +850,7 @@ void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool b
if( nPenColor_ != 0xFFFFFFFF )
{
SalPolyLine Points( nPoints, pPtAry );
-
+
DrawLines( nPoints, Points, SelectPen(), bClose );
}
}
@@ -860,7 +860,7 @@ void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
{
if( nPoints == 0 )
return;
-
+
if( nPoints < 3 )
{
if( !bXORMode_ )
@@ -873,9 +873,9 @@ void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
}
return;
}
-
+
SalPolyLine Points( nPoints, pPtAry );
-
+
nPoints++;
/* WORKAROUND: some Xservers (Xorg, VIA chipset in this case)
@@ -909,29 +909,29 @@ void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
if( Points[i].x < 0 )
Points[i].x = 0;
}
- }
-
+ }
+
if( nBrushColor_ != SALCOLOR_NONE )
XFillPolygon( GetXDisplay(),
GetDrawable(),
SelectBrush(),
&Points[0], nPoints,
Complex, CoordModeOrigin );
-
+
if( nPenColor_ != 0xFFFFFFFF )
DrawLines( nPoints, Points, SelectPen(), true );
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
- const sal_uInt32 *pPoints,
+void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
+ const sal_uInt32 *pPoints,
PCONSTSALPOINT *pPtAry )
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- ULONG i, n;
- XLIB_Region pXRegA = NULL;
-
+ ULONG i, n;
+ XLIB_Region pXRegA = NULL;
+
for( i = 0; i < nPoly; i++ ) {
n = pPoints[i];
SalPolyLine Points( n, pPtAry[i] );
@@ -947,24 +947,24 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
}
}
}
-
+
if( pXRegA )
{
XRectangle aXRect;
XClipBox( pXRegA, &aXRect );
-
+
GC pGC = SelectBrush();
SetClipRegion( pGC, pXRegA ); // ??? doppelt
XDestroyRegion( pXRegA );
bBrushGC_ = FALSE;
-
+
XFillRectangle( GetXDisplay(),
GetDrawable(),
pGC,
aXRect.x, aXRect.y, aXRect.width, aXRect.height );
}
}
-
+
if( nPenColor_ != SALCOLOR_NONE )
for( ULONG i = 0; i < nPoly; i++ )
drawPolyLine( pPoints[i], pPtAry[i], true );
@@ -999,7 +999,7 @@ void X11SalGraphics::invert( ULONG nPoints,
SalInvert nFlags )
{
SalPolyLine Points ( nPoints, pPtAry );
-
+
GC pGC;
if( SAL_INVERT_50 & nFlags )
pGC = GetInvert50GC();
@@ -1008,7 +1008,7 @@ void X11SalGraphics::invert( ULONG nPoints,
pGC = GetTrackingGC();
else
pGC = GetInvertGC();
-
+
if( SAL_INVERT_TRACKFRAME & nFlags )
DrawLines ( nPoints, Points, pGC, true );
else
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
index 1cb2abbedf43..37c89a262b2a 100644
--- a/vcl/unx/source/gdi/salgdi2.cxx
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -67,12 +67,12 @@ static void sal_PrintImage( char *s, XImage*p )
// -----------------------------------------------------------------------------
#if (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS
-#define DBG_TESTTRANS( _def_drawable ) \
-{ \
- XCopyArea( pXDisp, _def_drawable, aDrawable, GetCopyGC(), \
- 0, 0, \
- pPosAry->mnDestWidth, pPosAry->mnDestHeight, \
- 0, 0 ); \
+#define DBG_TESTTRANS( _def_drawable ) \
+{ \
+ XCopyArea( pXDisp, _def_drawable, aDrawable, GetCopyGC(), \
+ 0, 0, \
+ pPosAry->mnDestWidth, pPosAry->mnDestHeight, \
+ 0, 0 ); \
}
#else // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS
#define DBG_TESTTRANS( _def_drawable )
@@ -129,14 +129,14 @@ GC X11SalGraphics::CreateGC( Drawable hDrawable, unsigned long nMask )
{
XGCValues values;
- values.graphics_exposures = False;
- values.foreground = m_pColormap->GetBlackPixel()
+ values.graphics_exposures = False;
+ values.foreground = m_pColormap->GetBlackPixel()
^ m_pColormap->GetWhitePixel();
- values.function = GXxor;
- values.line_width = 1;
- values.fill_style = FillStippled;
- values.stipple = GetDisplay()->GetInvert50( m_nScreen );
- values.subwindow_mode = ClipByChildren;
+ values.function = GXxor;
+ values.line_width = 1;
+ values.fill_style = FillStippled;
+ values.stipple = GetDisplay()->GetInvert50( m_nScreen );
+ values.subwindow_mode = ClipByChildren;
return XCreateGC( GetXDisplay(), hDrawable, nMask | GCSubwindowMode, &values );
}
@@ -197,12 +197,12 @@ GC X11SalGraphics::GetInvert50GC()
{
XGCValues values;
- values.graphics_exposures = False;
- values.foreground = m_pColormap->GetWhitePixel();
- values.background = m_pColormap->GetBlackPixel();
- values.function = GXinvert;
- values.line_width = 1;
- values.line_style = LineSolid;
+ values.graphics_exposures = False;
+ values.foreground = m_pColormap->GetWhitePixel();
+ values.background = m_pColormap->GetBlackPixel();
+ values.function = GXinvert;
+ values.line_width = 1;
+ values.line_style = LineSolid;
unsigned long nValueMask =
GCGraphicsExposures
| GCForeground
@@ -221,8 +221,8 @@ GC X11SalGraphics::GetInvert50GC()
}
else
{
- values.fill_style = FillStippled;
- values.stipple = GetDisplay()->GetInvert50( m_nScreen );
+ values.fill_style = FillStippled;
+ values.stipple = GetDisplay()->GetInvert50( m_nScreen );
}
pInvert50GC_ = XCreateGC( GetXDisplay(), GetDrawable(),
@@ -363,7 +363,7 @@ GC X11SalGraphics::SetMask( int &nX,
}
// - - - - create alternate clip pixmap for region clipping - - - -
- Pixmap hPixmap = XCreatePixmap( pDisplay, hClipMask, nDX, nDY, 1 );
+ Pixmap hPixmap = XCreatePixmap( pDisplay, hClipMask, nDX, nDY, 1 );
if( !hPixmap )
{
@@ -384,12 +384,12 @@ GC X11SalGraphics::SetMask( int &nX,
GC pMonoGC = GetMonoGC( hPixmap );
XSetClipOrigin( pDisplay, pMonoGC, -nX, -nY );
XCopyArea( pDisplay,
- hClipMask, // Source
- hPixmap, // Destination
+ hClipMask, // Source
+ hPixmap, // Destination
pMonoGC,
- nSrcX, nSrcY, // Source
- nDX, nDY, // Width & Height
- 0, 0 ); // Destination
+ nSrcX, nSrcY, // Source
+ nDX, nDY, // Width & Height
+ 0, 0 ); // Destination
XSetClipMask( pDisplay, pMaskGC_, hPixmap );
XSetClipOrigin( pDisplay, pMaskGC_, nX, nY );
@@ -401,7 +401,7 @@ GC X11SalGraphics::SetMask( int &nX,
// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-extern "C"
+extern "C"
{
static Bool GraphicsExposePredicate( Display*, XEvent* pEvent, XPointer pFrameWindow )
{
@@ -460,12 +460,12 @@ void X11SalGraphics::YieldGraphicsExpose()
}
void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
- SalGraphics *pSSrcGraphics )
+ SalGraphics *pSSrcGraphics )
{
X11SalGraphics* pSrcGraphics = pSSrcGraphics
? static_cast<X11SalGraphics*>(pSSrcGraphics)
: this;
-
+
if( pPosAry->mnSrcWidth <= 0
|| pPosAry->mnSrcHeight <= 0
|| pPosAry->mnDestWidth <= 0
@@ -473,7 +473,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
{
return;
}
-
+
int n;
if( pSrcGraphics == this )
{
@@ -500,9 +500,9 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
}
else
n = 0;
-
+
if( n == 2
- && pPosAry->mnSrcWidth == pPosAry->mnDestWidth
+ && pPosAry->mnSrcWidth == pPosAry->mnDestWidth
&& pPosAry->mnSrcHeight == pPosAry->mnDestHeight
)
{
@@ -510,7 +510,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
// obscured areas beneath overlapping windows), src and dest
// are the same window.
const bool bNeedGraphicsExposures( pSrcGraphics == this &&
- !bVirDev_ &&
+ !bVirDev_ &&
pSrcGraphics->bWindow_ );
GC pCopyGC;
@@ -520,7 +520,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
&& (GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) )
{
Pixmap hPixmap = XCreatePixmap( GetXDisplay(),
- pSrcGraphics->GetDrawable(), // source
+ pSrcGraphics->GetDrawable(), // source
pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
pSrcGraphics->GetBitCount() );
@@ -532,17 +532,17 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
True );
XCopyArea( GetXDisplay(),
- pSrcGraphics->GetDrawable(), // source
- hPixmap, // destination
- pCopyGC, // no clipping
+ pSrcGraphics->GetDrawable(), // source
+ hPixmap, // destination
+ pCopyGC, // no clipping
pPosAry->mnSrcX, pPosAry->mnSrcY,
pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
- 0, 0 ); // destination
+ 0, 0 ); // destination
XCopyArea( GetXDisplay(),
- hPixmap, // source
- GetDrawable(), // destination
- GetInvertGC(), // destination clipping
- 0, 0, // source
+ hPixmap, // source
+ GetDrawable(), // destination
+ GetInvertGC(), // destination clipping
+ 0, 0, // source
pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
pPosAry->mnDestX, pPosAry->mnDestY );
XFreePixmap( GetXDisplay(), hPixmap );
@@ -550,16 +550,16 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
else
{
pCopyGC = GetCopyGC();
-
+
if( bNeedGraphicsExposures )
XSetGraphicsExposures( GetXDisplay(),
pCopyGC,
True );
XCopyArea( GetXDisplay(),
- pSrcGraphics->GetDrawable(), // source
- GetDrawable(), // destination
- pCopyGC, // destination clipping
+ pSrcGraphics->GetDrawable(), // source
+ GetDrawable(), // destination
+ pCopyGC, // destination clipping
pPosAry->mnSrcX, pPosAry->mnSrcY,
pPosAry->mnSrcWidth, pPosAry->mnSrcHeight,
pPosAry->mnDestX, pPosAry->mnDestY );
@@ -584,18 +584,18 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
pPosAry->mnSrcY,
pPosAry->mnSrcWidth,
pPosAry->mnSrcHeight );
-
+
if( !pDDB )
{
stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" );
return;
}
-
+
SalTwoRect aPosAry( *pPosAry );
-
- aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0;
+
+ aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0;
drawBitmap( &aPosAry, *pDDB );
-
+
delete pDDB;
}
else {
@@ -611,17 +611,17 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY,
USHORT )
{
SalTwoRect aPosAry;
-
+
aPosAry.mnDestX = nDestX;
aPosAry.mnDestY = nDestY;
aPosAry.mnDestWidth = nSrcWidth;
aPosAry.mnDestHeight = nSrcHeight;
-
+
aPosAry.mnSrcX = nSrcX;
aPosAry.mnSrcY = nSrcY;
aPosAry.mnSrcWidth = nSrcWidth;
aPosAry.mnSrcHeight = nSrcHeight;
-
+
copyBits ( &aPosAry, 0 );
}
@@ -629,14 +629,14 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY,
void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap )
{
const SalDisplay* pSalDisp = GetDisplay();
- Display* pXDisp = pSalDisp->GetDisplay();
- const Drawable aDrawable( GetDrawable() );
- const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen );
- const long nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth();
- GC aGC( GetCopyGC() );
- XGCValues aOldVal, aNewVal;
- int nValues = GCForeground | GCBackground;
-
+ Display* pXDisp = pSalDisp->GetDisplay();
+ const Drawable aDrawable( GetDrawable() );
+ const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen );
+ const long nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth();
+ GC aGC( GetCopyGC() );
+ XGCValues aOldVal, aNewVal;
+ int nValues = GCForeground | GCBackground;
+
if( rSalBitmap.GetBitCount() == 1 )
{
// set foreground/background values for 1Bit bitmaps
@@ -644,9 +644,9 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSa
aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel();
XChangeGC( pXDisp, aGC, nValues, &aNewVal );
}
-
+
static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aDrawable, m_nScreen, nDepth, *pPosAry, aGC );
-
+
if( rSalBitmap.GetBitCount() == 1 )
XChangeGC( pXDisp, aGC, nValues, &aOldVal );
XFlush( pXDisp );
@@ -686,23 +686,23 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
// figure work mode depth. If this is a VDev Drawable, use its
// bitdepth to create pixmaps for, otherwise, XCopyArea will
// refuse to work.
- const USHORT nDepth( m_pVDev ?
+ const USHORT nDepth( m_pVDev ?
m_pVDev->GetDepth() :
pSalDisp->GetVisual( m_nScreen ).GetDepth() );
- Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
+ Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
pPosAry->mnDestHeight, nDepth ) );
- Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
+ Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
pPosAry->mnDestHeight, nDepth ) );
-
+
if( aFG && aBG )
{
- GC aTmpGC;
- XGCValues aValues;
- const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen );
- const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel();
- const int nValues = GCFunction | GCForeground | GCBackground;
- SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0;
-
+ GC aTmpGC;
+ XGCValues aValues;
+ const SalColormap& rColMap = pSalDisp->GetColormap( m_nScreen );
+ const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel();
+ const int nValues = GCFunction | GCForeground | GCBackground;
+ SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0;
+
// draw paint bitmap in pixmap #1
aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack;
aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues );
@@ -716,14 +716,14 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
0, 0 );
DBG_TESTTRANS( aBG );
-
+
// mask out paint bitmap in pixmap #1 (transparent areas 0)
aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff;
XChangeGC( pXDisp, aTmpGC, nValues, &aValues );
static_cast<const X11SalBitmap&>(rTransBitmap).ImplDraw( aFG, m_nScreen, 1, aTmpRect, aTmpGC );
-
+
DBG_TESTTRANS( aFG );
-
+
// #105055# For XOR mode, keep background behind bitmap intact
if( !bXORMode_ )
{
@@ -731,10 +731,10 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000;
XChangeGC( pXDisp, aTmpGC, nValues, &aValues );
static_cast<const X11SalBitmap&>(rTransBitmap).ImplDraw( aBG, m_nScreen, 1, aTmpRect, aTmpGC );
-
+
DBG_TESTTRANS( aBG );
}
-
+
// merge pixmap #1 and pixmap #2 in pixmap #2
aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000;
XChangeGC( pXDisp, aTmpGC, nValues, &aValues );
@@ -743,30 +743,30 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
pPosAry->mnDestWidth, pPosAry->mnDestHeight,
0, 0 );
DBG_TESTTRANS( aBG );
-
+
// #105055# Disable XOR temporarily
BOOL bOldXORMode( bXORMode_ );
bXORMode_ = FALSE;
-
+
// copy pixmap #2 (result) to background
XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(),
0, 0,
pPosAry->mnDestWidth, pPosAry->mnDestHeight,
pPosAry->mnDestX, pPosAry->mnDestY );
-
+
DBG_TESTTRANS( aBG );
-
+
bXORMode_ = bOldXORMode;
-
+
XFreeGC( pXDisp, aTmpGC );
XFlush( pXDisp );
}
else
drawBitmap( pPosAry, rSalBitmap );
-
+
if( aFG )
XFreePixmap( pXDisp, aFG );
-
+
if( aBG )
XFreePixmap( pXDisp, aBG );
}
@@ -782,7 +782,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// horizontal mirroring not implemented yet
if( rTR.mnDestWidth < 0 )
return false;
-
+
// stretched conversion is not implemented yet
if( rTR.mnDestWidth != rTR.mnSrcWidth )
return false;
@@ -890,7 +890,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// set clipping
if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
rPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
-
+
// paint source * mask over destination picture
rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic,
rTR.mnSrcX, rTR.mnSrcY, 0, 0,
@@ -904,29 +904,29 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
+bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
long nHeight, sal_uInt8 nTransparency )
{
if( ! m_pFrame && ! m_pVDev )
return false;
-
+
if( bPenGC_ || !bBrushGC_ || bXORMode_ )
return false; // can only perform solid fills without XOR.
-
+
if( m_pVDev && m_pVDev->GetDepth() < 8 )
return false;
XRenderPeer& rPeer = XRenderPeer::GetInstance();
if( rPeer.GetVersion() < 0x02 ) // TODO: replace with better test
return false;
-
+
Picture aDstPic = GetXRenderPicture();
if( !aDstPic )
return false;
const double fTransparency = (100 - nTransparency) * (1.0/100);
const XRenderColor aRenderColor = GetXRenderColor( nBrushColor_ , fTransparency);
-
+
rPeer.FillRectangle( PictOpOver,
aDstPic,
&aRenderColor,
@@ -950,30 +950,30 @@ void X11SalGraphics::drawMask( const SalTwoRect* pPosAry,
SalColor nMaskColor )
{
const SalDisplay* pSalDisp = GetDisplay();
- Display* pXDisp = pSalDisp->GetDisplay();
+ Display* pXDisp = pSalDisp->GetDisplay();
Drawable aDrawable( GetDrawable() );
Pixmap aStipple( XCreatePixmap( pXDisp, aDrawable,
pPosAry->mnDestWidth,
pPosAry->mnDestHeight, 1 ) );
-
+
if( aStipple )
{
- SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0;
- GC aTmpGC;
- XGCValues aValues;
-
+ SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0;
+ GC aTmpGC;
+ XGCValues aValues;
+
// create a stipple bitmap first (set bits are changed to unset bits and vice versa)
aValues.function = GXcopyInverted;
aValues.foreground = 1, aValues.background = 0;
aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues );
static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aStipple, m_nScreen, 1, aTwoRect, aTmpGC );
-
+
XFreeGC( pXDisp, aTmpGC );
-
+
// Set stipple and draw rectangle
- GC aStippleGC( GetStippleGC() );
- int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY;
-
+ GC aStippleGC( GetStippleGC() );
+ int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY;
+
XSetStipple( pXDisp, aStippleGC, aStipple );
XSetTSOrigin( pXDisp, aStippleGC, nX, nY );
XSetForeground( pXDisp, aStippleGC, GetPixel( nMaskColor ) );
@@ -992,7 +992,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
{
if( bPrinter_ && !bVirDev_ )
return NULL;
-
+
bool bFakeWindowBG = false;
// normalize
@@ -1008,9 +1008,9 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
}
if( bWindow_ && !bVirDev_ )
- {
+ {
XWindowAttributes aAttrib;
-
+
XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib );
if( aAttrib.map_state != IsViewable )
bFakeWindowBG = true;
@@ -1033,7 +1033,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
nDX = aAttrib.width - nX;
if( nY + nDY > aAttrib.height )
nDY = aAttrib.height - nY;
-
+
// inside ?
if( nDX <= 0 || nDY <= 0 )
{
@@ -1043,13 +1043,13 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
}
}
}
-
- X11SalBitmap* pSalBitmap = new X11SalBitmap;
- USHORT nBitCount = GetBitCount();
-
+
+ X11SalBitmap* pSalBitmap = new X11SalBitmap;
+ USHORT nBitCount = GetBitCount();
+
if( &GetDisplay()->GetColormap( m_nScreen ) != &GetColormap() )
nBitCount = 1;
-
+
if( ! bFakeWindowBG )
pSalBitmap->ImplCreateFromDrawable( GetDrawable(), m_nScreen, nBitCount, nX, nY, nDX, nDY );
else
@@ -1064,7 +1064,7 @@ SalColor X11SalGraphics::getPixel( long nX, long nY )
if( bWindow_ && !bVirDev_ )
{
XWindowAttributes aAttrib;
-
+
XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib );
if( aAttrib.map_state != IsViewable )
{
@@ -1072,7 +1072,7 @@ SalColor X11SalGraphics::getPixel( long nX, long nY )
return 0;
}
}
-
+
XImage *pXImage = XGetImage( GetXDisplay(),
GetDrawable(),
nX, nY,
@@ -1084,21 +1084,21 @@ SalColor X11SalGraphics::getPixel( long nX, long nY )
stderr0( "X11SalGraphics::GetPixel !XGetImage()\n" );
return 0;
}
-
+
XColor aXColor;
-
+
aXColor.pixel = XGetPixel( pXImage, 0, 0 );
XDestroyImage( pXImage );
-
+
return GetColormap().GetColor( aXColor.pixel );
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::invert( long nX,
- long nY,
- long nDX,
- long nDY,
- SalInvert nFlags )
+void X11SalGraphics::invert( long nX,
+ long nY,
+ long nDX,
+ long nDY,
+ SalInvert nFlags )
{
GC pGC;
if( SAL_INVERT_50 & nFlags )
@@ -1131,10 +1131,10 @@ bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const
{
XRenderPeer& rPeer = XRenderPeer::GetInstance();
if( rPeer.GetVersion() >= 0x02 )
- {
+ {
const SalDisplay* pSalDisp = GetDisplay();
const SalVisual& rSalVis = pSalDisp->GetVisual( m_nScreen );
-
+
Visual* pDstXVisual = rSalVis.GetVisual();
XRenderPictFormat* pDstVisFmt = rPeer.FindVisualFormat( pDstXVisual );
if( pDstVisFmt )
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 6024b66f6010..b9ac7b629c48 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -134,10 +134,10 @@ class FontLookup
private:
- rtl::OString maName;
- FontWeight mnWeight;
- FontItalic mnItalic;
- sal_Bool mbDisplay;
+ rtl::OString maName;
+ FontWeight mnWeight;
+ FontItalic mnItalic;
+ sal_Bool mbDisplay;
public:
@@ -153,18 +153,18 @@ class FontLookup
~FontLookup ()
{}
- static void BuildSet (fl_hashset& rSet);
- static bool InSet (const fl_hashset& rSet, const Xlfd& rXfld);
- bool InSet (const fl_hashset& rSet) const;
+ static void BuildSet (fl_hashset& rSet);
+ static bool InSet (const fl_hashset& rSet, const Xlfd& rXfld);
+ bool InSet (const fl_hashset& rSet) const;
- bool operator== (const FontLookup &rRef) const
+ bool operator== (const FontLookup &rRef) const
{
return (abs(mnWeight - rRef.mnWeight) < 2)
&& (mnItalic == rRef.mnItalic)
&& (maName == rRef.maName)
&& (mbDisplay== rRef.mbDisplay);
}
- FontLookup& operator= (const FontLookup &rRef)
+ FontLookup& operator= (const FontLookup &rRef)
{
mnWeight = rRef.mnWeight;
mnItalic = rRef.mnItalic;
@@ -173,7 +173,7 @@ class FontLookup
return *this;
}
- size_t Hash() const
+ size_t Hash() const
{
return maName.hashCode ();
}
@@ -233,14 +233,14 @@ FontLookup::FontLookup ( ::std::list< psp::fontID >::iterator& it,
FontLookup::FontLookup (const Xlfd& rFont)
{
AttributeProvider* pFactory = rFont.mpFactory;
- Attribute* pAttr;
+ Attribute* pAttr;
pAttr = pFactory->RetrieveSlant (rFont.mnSlant);
mnItalic = (FontItalic)pAttr->GetValue();
pAttr = pFactory->RetrieveWeight (rFont.mnWeight);
mnWeight = (FontWeight)pAttr->GetValue();
pAttr = pFactory->RetrieveFamily (rFont.mnFamily);
- maName = pAttr->GetKey();
+ maName = pAttr->GetKey();
if (mnItalic == ITALIC_OBLIQUE)
mnItalic = ITALIC_NORMAL;
@@ -339,7 +339,7 @@ SalDisplay::GetXlfdList() const
//
BitmapXlfdStorage aBitmapList;
- ScalableXlfd *pScalableFont = NULL;
+ ScalableXlfd *pScalableFont = NULL;
int nFrom = 0;
for ( i = 0; i < nXlfdCount; i++ )
@@ -350,7 +350,7 @@ SalDisplay::GetXlfdList() const
| XLFD_FEATURE_OL_CURSOR) )
continue;
// exclude fonts with unknown encoding
- if ( pXlfdList[i].GetEncoding() == RTL_TEXTENCODING_DONTKNOW )
+ if ( pXlfdList[i].GetEncoding() == RTL_TEXTENCODING_DONTKNOW )
continue;
// exclude "interface system" and "interface user"
if (pAttr->HasFeature( XLFD_FEATURE_APPLICATION_FONT ) )
@@ -545,10 +545,10 @@ X11SalGraphics::SelectFont()
if( !pFontGC_ )
{
XGCValues values;
- values.subwindow_mode = ClipByChildren;
- values.fill_rule = EvenOddRule; // Pict import/ Gradient
- values.graphics_exposures = False;
- values.foreground = nTextPixel_;
+ values.subwindow_mode = ClipByChildren;
+ values.fill_rule = EvenOddRule; // Pict import/ Gradient
+ values.graphics_exposures = False;
+ values.foreground = nTextPixel_;
#ifdef _USE_PRINT_EXTENSION_
values.background = xColormap_->GetWhitePixel();
pFontGC_ = XCreateGC( pDisplay, hDrawable_,
@@ -619,7 +619,7 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev
{
const ImplX11FontData* pRequestedFont = static_cast<const ImplX11FontData*>( pEntry->mpFontData );
const ExtendedXlfd& rX11Font = pRequestedFont->GetExtendedXlfd();
-
+
Size aReqSize( pEntry->mnWidth, pEntry->mnHeight );
mXFont[ nFallbackLevel ] = GetDisplay()->GetFont( &rX11Font, aReqSize, bFontVertical_ );
bFontGC_ = FALSE;
@@ -640,7 +640,7 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev
// register to use the font
mpServerFont[ nFallbackLevel ] = pServerFont;
- // apply font specific-hint settings if needed
+ // apply font specific-hint settings if needed
// TODO: also disable it for reference devices
if( !bPrinter_ )
{
@@ -757,7 +757,7 @@ class CairoWrapper
{
private:
oslModule mpCairoLib;
-
+
cairo_surface_t* (*mp_xlib_surface_create_with_xrender_format)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int );
void (*mp_surface_destroy)(cairo_surface_t *);
cairo_t* (*mp_create)(cairo_surface_t *);
@@ -790,7 +790,7 @@ public:
cairo_t* create(cairo_surface_t *surface) { return (*mp_create)(surface); }
void destroy(cairo_t *cr) { (*mp_destroy)(cr); }
void clip(cairo_t *cr) { (*mp_clip)(cr); }
- void rectangle(cairo_t *cr, double x, double y, double width, double height)
+ void rectangle(cairo_t *cr, double x, double y, double width, double height)
{ (*mp_rectangle)(cr, x, y, width, height); }
cairo_font_face_t* ft_font_face_create_for_ft_face(FT_Face face, int load_flags)
{ return (*mp_ft_font_face_create_for_ft_face)(face, load_flags); }
@@ -831,7 +831,7 @@ CairoWrapper::CairoWrapper()
static const char* pDisableCairoText = getenv( "SAL_DISABLE_CAIROTEXT" );
if( pDisableCairoText && (pDisableCairoText[0] != '0') )
return;
-
+
int nDummy;
if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) )
return;
@@ -840,7 +840,7 @@ CairoWrapper::CairoWrapper()
OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.2.dylib" ));
#else
OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" ));
-#endif
+#endif
mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
if( !mpCairoLib )
return;
@@ -853,11 +853,11 @@ CairoWrapper::CairoWrapper()
fprintf( stderr, "CAIRO version=%d\n", nVersion );
#endif
- mp_xlib_surface_create_with_xrender_format = (cairo_surface_t* (*)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int ))
+ mp_xlib_surface_create_with_xrender_format = (cairo_surface_t* (*)(Display *, Drawable , Screen *, XRenderPictFormat *, int , int ))
osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_xlib_surface_create_with_xrender_format" );
- mp_surface_destroy = (void(*)(cairo_surface_t*))
+ mp_surface_destroy = (void(*)(cairo_surface_t*))
osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" );
- mp_create = (cairo_t*(*)(cairo_surface_t*))
+ mp_create = (cairo_t*(*)(cairo_surface_t*))
osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_create" );
mp_destroy = (void(*)(cairo_t*))
osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_destroy" );
@@ -888,7 +888,7 @@ CairoWrapper::CairoWrapper()
mp_ft_font_options_substitute = (void (*)(const void *, void *))
osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_ft_font_options_substitute" );
- if( !(
+ if( !(
mp_xlib_surface_create_with_xrender_format &&
mp_surface_destroy &&
mp_create &&
@@ -968,7 +968,7 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
{
std::vector<cairo_glyph_t> cairo_glyphs;
cairo_glyphs.reserve( 256 );
-
+
Point aPos;
sal_GlyphId aGlyphId;
for( int nStart = 0; rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); )
@@ -1020,8 +1020,8 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
{
for (long i = 0; i < pClipRegion_->numRects; ++i)
{
- rCairo.rectangle(cr,
- pClipRegion_->rects[i].x1,
+ rCairo.rectangle(cr,
+ pClipRegion_->rects[i].x1,
pClipRegion_->rects[i].y1,
pClipRegion_->rects[i].x2 - pClipRegion_->rects[i].x1,
pClipRegion_->rects[i].y2 - pClipRegion_->rects[i].y1);
@@ -1029,8 +1029,8 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
rCairo.clip(cr);
}
- rCairo.set_source_rgb(cr,
- SALCOLOR_RED(nTextColor_)/255.0,
+ rCairo.set_source_rgb(cr,
+ SALCOLOR_RED(nTextColor_)/255.0,
SALCOLOR_GREEN(nTextColor_)/255.0,
SALCOLOR_BLUE(nTextColor_)/255.0);
@@ -1106,7 +1106,7 @@ void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout )
// set font foreground color and opacity
XRenderColor aRenderColor = GetXRenderColor( nTextColor_ );
rRenderPeer.FillRectangle( PictOpSrc, rEntry.m_aPicture, &aRenderColor, 0, 0, 1, 1 );
-
+
// set clipping
// TODO: move into GetXRenderPicture()?
if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
@@ -1471,7 +1471,7 @@ void X11SalGraphics::DrawStringUCS2MB( ExtendedFontStruct& rFont,
int nItem = 0;
DBG_ASSERT( nLength<=1, "#i49902# DrawStringUCS2MB with nLength>1 => problems with XOrg6.8.[0123]");
-
+
for( int nChar = 0; nChar < nLength; ++nChar )
{
rtl_TextEncoding nEnc;
@@ -1531,7 +1531,7 @@ USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
void
X11SalGraphics::SetTextColor( SalColor nSalColor )
{
- if( nTextColor_ != nSalColor )
+ if( nTextColor_ != nSalColor )
{
nTextColor_ = nSalColor;
nTextPixel_ = GetPixel( nSalColor );
@@ -1633,7 +1633,7 @@ void X11SalGraphics::GetDevFontList( ImplDevFontList *pList )
// register platform specific font substitutions if available
if( rMgr.hasFontconfig() )
RegisterFontSubstitutors( pList );
-
+
ImplGetSVData()->maGDIData.mbNativeFontConfig = rMgr.hasFontconfig();
}
@@ -1881,7 +1881,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const
if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
if (nFallbacklevel < 0 ) nFallbacklevel = 0;
-
+
if (mpServerFont[nFallbacklevel] != NULL)
{
ServerFont* rFont = mpServerFont[nFallbacklevel];
@@ -1892,7 +1892,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const
aSysFontData.bAntialias = rFont->GetAntialiasAdvice();
aSysFontData.bVerticalCharacterType = rFont->GetFontSelData().mbVertical;
}
-
+
return aSysFontData;
}
@@ -2015,7 +2015,7 @@ void RegisterFontSubstitutors( ImplDevFontList* pList )
if( pEnvStr )
{
if( (*pEnvStr >= '0') && (*pEnvStr <= '9') )
- nDisableBits = (*pEnvStr - '0');
+ nDisableBits = (*pEnvStr - '0');
else
nDisableBits = ~0U; // no specific bits set: disable all
}
@@ -2061,16 +2061,16 @@ static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData
{
switch( rFontSelData.GetWeight() )
{
- case WEIGHT_THIN: eWeight = psp::weight::Thin; break;
- case WEIGHT_ULTRALIGHT: eWeight = psp::weight::UltraLight; break;
- case WEIGHT_LIGHT: eWeight = psp::weight::Light; break;
- case WEIGHT_SEMILIGHT: eWeight = psp::weight::SemiLight; break;
- case WEIGHT_NORMAL: eWeight = psp::weight::Normal; break;
- case WEIGHT_MEDIUM: eWeight = psp::weight::Medium; break;
- case WEIGHT_SEMIBOLD: eWeight = psp::weight::SemiBold; break;
- case WEIGHT_BOLD: eWeight = psp::weight::Bold; break;
- case WEIGHT_ULTRABOLD: eWeight = psp::weight::UltraBold; break;
- case WEIGHT_BLACK: eWeight = psp::weight::Black; break;
+ case WEIGHT_THIN: eWeight = psp::weight::Thin; break;
+ case WEIGHT_ULTRALIGHT: eWeight = psp::weight::UltraLight; break;
+ case WEIGHT_LIGHT: eWeight = psp::weight::Light; break;
+ case WEIGHT_SEMILIGHT: eWeight = psp::weight::SemiLight; break;
+ case WEIGHT_NORMAL: eWeight = psp::weight::Normal; break;
+ case WEIGHT_MEDIUM: eWeight = psp::weight::Medium; break;
+ case WEIGHT_SEMIBOLD: eWeight = psp::weight::SemiBold; break;
+ case WEIGHT_BOLD: eWeight = psp::weight::Bold; break;
+ case WEIGHT_ULTRABOLD: eWeight = psp::weight::UltraBold; break;
+ case WEIGHT_BLACK: eWeight = psp::weight::Black; break;
default:
break;
}
@@ -2081,15 +2081,15 @@ static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData
{
switch( rFontSelData.GetWidthType() )
{
- case WIDTH_ULTRA_CONDENSED: eWidth = psp::width::UltraCondensed; break;
+ case WIDTH_ULTRA_CONDENSED: eWidth = psp::width::UltraCondensed; break;
case WIDTH_EXTRA_CONDENSED: eWidth = psp::width::ExtraCondensed; break;
- case WIDTH_CONDENSED: eWidth = psp::width::Condensed; break;
- case WIDTH_SEMI_CONDENSED: eWidth = psp::width::SemiCondensed; break;
- case WIDTH_NORMAL: eWidth = psp::width::Normal; break;
- case WIDTH_SEMI_EXPANDED: eWidth = psp::width::SemiExpanded; break;
- case WIDTH_EXPANDED: eWidth = psp::width::Expanded; break;
- case WIDTH_EXTRA_EXPANDED: eWidth = psp::width::ExtraExpanded; break;
- case WIDTH_ULTRA_EXPANDED: eWidth = psp::width::UltraExpanded; break;
+ case WIDTH_CONDENSED: eWidth = psp::width::Condensed; break;
+ case WIDTH_SEMI_CONDENSED: eWidth = psp::width::SemiCondensed; break;
+ case WIDTH_NORMAL: eWidth = psp::width::Normal; break;
+ case WIDTH_SEMI_EXPANDED: eWidth = psp::width::SemiExpanded; break;
+ case WIDTH_EXPANDED: eWidth = psp::width::Expanded; break;
+ case WIDTH_EXTRA_EXPANDED: eWidth = psp::width::ExtraExpanded; break;
+ case WIDTH_ULTRA_EXPANDED: eWidth = psp::width::UltraExpanded; break;
default:
break;
}
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index 8617bc4e5bfa..cef551ac3c63 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,12 +65,12 @@ using namespace psp;
using namespace rtl;
/*
- * static helpers
+ * static helpers
*/
#include "rtsname.hxx"
-static oslModule driverLib = NULL;
+static oslModule driverLib = NULL;
extern "C"
{
typedef int(*setupFunction)(PrinterInfo&);
@@ -103,16 +103,16 @@ static void getPaLib()
if( ! driverLib )
{
OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) );
- driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT );
+ driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( !driverLib )
{
return;
}
-
- pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" );
+
+ pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" );
if ( !pSetupFunction )
fprintf( stderr, "could not resolve Sal_SetupPrinterDriver\n" );
-
+
pFaxNrFunction = (faxFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_queryFaxNumber" );
if ( !pFaxNrFunction )
fprintf( stderr, "could not resolve Sal_queryFaxNumber\n" );
@@ -125,31 +125,31 @@ inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)
static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
{
- pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
+ pJobSetup->meOrientation = (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
// copy page size
String aPaper;
int width, height;
rData.m_aContext.getPageSize( aPaper, width, height );
- pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 ));
+ pJobSetup->mePaperFormat = PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 ));
- pJobSetup->mnPaperWidth = 0;
- pJobSetup->mnPaperHeight = 0;
+ pJobSetup->mnPaperWidth = 0;
+ pJobSetup->mnPaperHeight = 0;
if( pJobSetup->mePaperFormat == PAPER_USER )
{
// transform to 100dth mm
- width = PtTo10Mu( width );
- height = PtTo10Mu( height );
+ width = PtTo10Mu( width );
+ height = PtTo10Mu( height );
if( rData.m_eOrientation == psp::orientation::Portrait )
{
- pJobSetup->mnPaperWidth = width;
+ pJobSetup->mnPaperWidth = width;
pJobSetup->mnPaperHeight= height;
}
else
{
- pJobSetup->mnPaperWidth = height;
+ pJobSetup->mnPaperWidth = height;
pJobSetup->mnPaperHeight= width;
}
}
@@ -160,9 +160,9 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->mnPaperBin = 0;
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
+ pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
if( pKey )
- pValue = rData.m_aContext.getValue( pKey );
+ pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
{
for( pJobSetup->mnPaperBin = 0;
@@ -173,11 +173,11 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
if( pJobSetup->mnPaperBin >= pKey->countValues() )
pJobSetup->mnPaperBin = 0;
}
-
+
// copy duplex
pKey = NULL;
pValue = NULL;
-
+
pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
if( rData.m_pParser )
pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
@@ -368,13 +368,13 @@ static bool createPdf( const String& rToFile, const String& rFromFile, const Str
}
/*
- * SalInstance
+ * SalInstance
*/
// -----------------------------------------------------------------------
-SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pJobSetup )
+SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
+ ImplJobSetup* pJobSetup )
{
mbPrinterInit = true;
// create and initialize SalInfoPrinter
@@ -390,16 +390,16 @@ SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
if( pJobSetup->mpDriverData )
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo );
- pJobSetup->mnSystem = JOBSETUP_SYSTEM_UNIX;
- pJobSetup->maPrinterName = pQueueInfo->maPrinterName;
- pJobSetup->maDriver = aInfo.m_aDriverName;
+ pJobSetup->mnSystem = JOBSETUP_SYSTEM_UNIX;
+ pJobSetup->maPrinterName = pQueueInfo->maPrinterName;
+ pJobSetup->maDriver = aInfo.m_aDriverName;
copyJobDataToJobSetup( pJobSetup, aInfo );
-
+
// set/clear backwards compatibility flag
bool bStrictSO52Compatibility = false;
std::hash_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it =
pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictSO52Compatibility" ) ) );
-
+
if( compat_it != pJobSetup->maValueMap.end() )
{
if( compat_it->second.equalsIgnoreAsciiCaseAscii( "true" ) )
@@ -458,11 +458,11 @@ void X11SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
const PrinterInfo& rInfo( rManager.getPrinterInfo( *it ) );
// Neuen Eintrag anlegen
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
- pInfo->maPrinterName = *it;
- pInfo->maDriver = rInfo.m_aDriverName;
- pInfo->maLocation = rInfo.m_aLocation;
- pInfo->maComment = rInfo.m_aComment;
- pInfo->mpSysData = NULL;
+ pInfo->maPrinterName = *it;
+ pInfo->maDriver = rInfo.m_aDriverName;
+ pInfo->maLocation = rInfo.m_aLocation;
+ pInfo->maComment = rInfo.m_aComment;
+ pInfo->mpSysData = NULL;
sal_Int32 nIndex = 0;
while( nIndex != -1 )
@@ -603,7 +603,7 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
SetData( ~0, pJobSetup );
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo );
}
-
+
if( pSetupFunction( aInfo ) )
{
rtl_freeMemory( pJobSetup->mpDriverData );
@@ -612,8 +612,8 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
int nBytes;
void* pBuffer = NULL;
aInfo.getStreamBuffer( pBuffer, nBytes );
- pJobSetup->mnDriverDataLen = nBytes;
- pJobSetup->mpDriverData = (BYTE*)pBuffer;
+ pJobSetup->mnDriverDataLen = nBytes;
+ pJobSetup->mpDriverData = (BYTE*)pBuffer;
// copy everything to job setup
copyJobDataToJobSetup( pJobSetup, aInfo );
@@ -648,7 +648,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
return SetData( ~0, pJobSetup );
copyJobDataToJobSetup( pJobSetup, m_aJobData );
-
+
return TRUE;
}
@@ -676,13 +676,13 @@ BOOL PspSalInfoPrinter::SetData(
int nWidth, nHeight;
if( pJobSetup->meOrientation == ORIENTATION_PORTRAIT )
{
- nWidth = pJobSetup->mnPaperWidth;
- nHeight = pJobSetup->mnPaperHeight;
+ nWidth = pJobSetup->mnPaperWidth;
+ nHeight = pJobSetup->mnPaperHeight;
}
else
{
- nWidth = pJobSetup->mnPaperHeight;
- nHeight = pJobSetup->mnPaperWidth;
+ nWidth = pJobSetup->mnPaperHeight;
+ nHeight = pJobSetup->mnPaperWidth;
}
String aPaper;
@@ -695,7 +695,7 @@ BOOL PspSalInfoPrinter::SetData(
pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL;
-
+
// some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5)
// try to find the correct paper anyway using the size
if( pKey && ! pValue && pJobSetup->mePaperFormat != PAPER_USER )
@@ -706,7 +706,7 @@ BOOL PspSalInfoPrinter::SetData(
TenMuToPt( aInfo.getHeight() ) );
pValue = pKey->getValueCaseInsensitive( aPaper );
}
-
+
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
return FALSE;
}
@@ -809,12 +809,12 @@ void PspSalInfoPrinter::GetPageInfo(
aData.m_pParser->getMargins( aPaper, top, bottom, right, left );
}
- rPageWidth = width * nDPI / 72;
- rPageHeight = height * nDPI / 72;
- rPageOffX = left * nDPI / 72;
- rPageOffY = top * nDPI / 72;
- rOutWidth = ( width - left - right ) * nDPI / 72;
- rOutHeight = ( height - top - bottom ) * nDPI / 72;
+ rPageWidth = width * nDPI / 72;
+ rPageHeight = height * nDPI / 72;
+ rPageOffX = left * nDPI / 72;
+ rPageOffY = top * nDPI / 72;
+ rOutWidth = ( width - left - right ) * nDPI / 72;
+ rOutHeight = ( height - top - bottom ) * nDPI / 72;
}
}
@@ -903,7 +903,7 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
// =======================================================================
/*
- * SalPrinter
+ * SalPrinter
*/
PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter )
@@ -945,11 +945,11 @@ BOOL PspSalPrinter::StartJob(
{
vcl_sal::PrinterUpdate::jobStarted();
- m_bFax = false;
- m_bPdf = false;
- m_aFileName = pFileName ? *pFileName : String();
- m_aTmpFile = String();
- m_nCopies = nCopies;
+ m_bFax = false;
+ m_bPdf = false;
+ m_aFileName = pFileName ? *pFileName : String();
+ m_aTmpFile = String();
+ m_nCopies = nCopies;
m_bCollate = bCollate;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
@@ -1001,7 +1001,7 @@ BOOL PspSalPrinter::StartJob(
}
}
m_aPrinterGfx.Init( m_aJobData );
-
+
// set/clear backwards compatibility flag
bool bStrictSO52Compatibility = false;
std::hash_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it =
@@ -1131,14 +1131,14 @@ void vcl_sal::PrinterUpdate::update()
{
if( Application::GetSettings().GetMiscSettings().GetDisablePrinting() )
return;
-
+
if( ! static_cast< X11SalInstance* >(GetSalData()->m_pInstance)->isPrinterInit() )
{
// #i45389# start background printer detection
psp::PrinterInfoManager::get();
return;
}
-
+
if( nActiveJobs < 1 )
doUpdate();
else if( ! pPrinterUpdateTimer )
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx
index f242fffae715..f80faa005209 100644
--- a/vcl/unx/source/gdi/salvd.cxx
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -98,7 +98,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
SalDisplay *pDisplay = pDevice->GetDisplay();
m_nScreen = pDevice->GetScreenNumber();
-
+
int nVisualDepth = pDisplay->GetColormap( m_nScreen ).GetVisual().GetDepth();
int nDeviceDepth = pDevice->GetDepth();
@@ -111,18 +111,18 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
else
if( nDeviceDepth == nVisualDepth )
m_pColormap = &pDisplay->GetColormap( m_nScreen );
- else
+ else
if( nDeviceDepth == 1 )
m_pColormap = m_pDeleteColormap = new SalColormap();
-
+
if (m_pDeleteColormap != pOrigDeleteColormap)
delete pOrigDeleteColormap;
const Drawable aVdevDrawable = pDevice->GetDrawable();
SetDrawable( aVdevDrawable, m_nScreen );
- m_pVDev = pDevice;
- m_pFrame = NULL;
+ m_pVDev = pDevice;
+ m_pFrame = NULL;
bWindow_ = pDisplay->IsDisplay();
bVirDev_ = TRUE;
@@ -141,7 +141,7 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
bool bDeleteColormap = false;
pDisplay_ = pDisplay;
- pGraphics_ = new X11SalGraphics();
+ pGraphics_ = new X11SalGraphics();
m_nScreen = nScreen;
if( pRenderFormatVoid ) {
XRenderPictFormat *pRenderFormat = ( XRenderPictFormat* )pRenderFormatVoid;
@@ -220,7 +220,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
{
if( bExternPixmap_ )
return FALSE;
-
+
// #144688#
// the X protocol request CreatePixmap puts an upper bound
// of 16 bit to the size. Beyond that there may be implementation
@@ -260,7 +260,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
if( pGraphics_ )
InitGraphics( this );
-
+
return TRUE;
}
diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx
index f6d19909cd4a..b31eab24fcef 100644
--- a/vcl/unx/source/gdi/xfont.cxx
+++ b/vcl/unx/source/gdi/xfont.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,13 +46,13 @@
#include <algorithm>
-#define VCLASS_ROTATE 0
-#define VCLASS_ROTATE_REVERSE 1
-#define VCLASS_TRANSFORM1 2
-#define VCLASS_TRANSFORM2 3
-#define VCLASS_CJK 4
-#define VCLASS_DONTKNOW 5
-#define VCLASS_FONT_NUM 2 // Other than rotate and rotate_reverse,
+#define VCLASS_ROTATE 0
+#define VCLASS_ROTATE_REVERSE 1
+#define VCLASS_TRANSFORM1 2
+#define VCLASS_TRANSFORM2 3
+#define VCLASS_CJK 4
+#define VCLASS_DONTKNOW 5
+#define VCLASS_FONT_NUM 2 // Other than rotate and rotate_reverse,
// don't have spacial font
// Select the max size of a font, which is token for real
@@ -238,24 +238,24 @@ ExtendedFontStruct::GetFontBoundingBox( XCharStruct *pCharStruct,
bool
ExtendedFontStruct::ToImplFontMetricData(ImplFontMetricData *pFontMetric)
{
- pFontMetric->mnOrientation = 0;
- pFontMetric->mnSlant = 0;
- pFontMetric->mbDevice = true;
- pFontMetric->mbScalableFont = mpXlfd->IsScalable();
- pFontMetric->mbKernableFont = false;
+ pFontMetric->mnOrientation = 0;
+ pFontMetric->mnSlant = 0;
+ pFontMetric->mbDevice = true;
+ pFontMetric->mbScalableFont = mpXlfd->IsScalable();
+ pFontMetric->mbKernableFont = false;
pFontMetric->mbSymbolFlag= mpXlfd->IsSymbolFont();
- pFontMetric->meFamily = mpXlfd->GetFamilyType();
+ pFontMetric->meFamily = mpXlfd->GetFamilyType();
pFontMetric->meWeight = mpXlfd->GetWeight();
- pFontMetric->mePitch = mpXlfd->GetPitch();
- pFontMetric->meItalic = mpXlfd->GetSlant();
+ pFontMetric->mePitch = mpXlfd->GetPitch();
+ pFontMetric->meItalic = mpXlfd->GetSlant();
int nAscent, nDescent;
XCharStruct aBoundingBox;
if ( GetFontBoundingBox(&aBoundingBox, &nAscent, &nDescent) )
{
- pFontMetric->mnWidth = aBoundingBox.width;
- pFontMetric->mnAscent = aBoundingBox.ascent;
- pFontMetric->mnDescent = aBoundingBox.descent;
+ pFontMetric->mnWidth = aBoundingBox.width;
+ pFontMetric->mnAscent = aBoundingBox.ascent;
+ pFontMetric->mnDescent = aBoundingBox.descent;
pFontMetric->mnIntLeading = std::max(0, aBoundingBox.ascent - nAscent
+ aBoundingBox.descent - nDescent );
pFontMetric->mnExtLeading = 0; // TODO!!!
@@ -565,7 +565,7 @@ ExtendedFontStruct::GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo,
nChar, mnDefaultWidth );
}
else
- if ( (pFont->max_bounds.width == pFont->min_bounds.width)
+ if ( (pFont->max_bounds.width == pFont->min_bounds.width)
|| (pFont->per_char == NULL) )
{
// fixed width font
diff --git a/vcl/unx/source/gdi/xlfd_attr.cxx b/vcl/unx/source/gdi/xlfd_attr.cxx
index ca49a8548afb..9e8d63c4d5db 100644
--- a/vcl/unx/source/gdi/xlfd_attr.cxx
+++ b/vcl/unx/source/gdi/xlfd_attr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -173,10 +173,10 @@ Attribute::TagFeature( unsigned short nFeature )
mnFeature |= (XLFD_FEATURE_INTERFACE_FONT | XLFD_FEATURE_MQ);
else
// japanese
- if ( (strcmp(mpName, "hg mincho l") == 0) /* Solaris: jisx0208 jisx0201 */
- || (strcmp(mpName, "heiseimin") == 0) /* Solaris: jisx0212 */
- || (strcmp(mpName, "minchol") == 0) /* TurboLinux */
- || (strcmp(mpName, "mincho") == 0)) /* Redhat 6.2 JP */
+ if ( (strcmp(mpName, "hg mincho l") == 0) /* Solaris: jisx0208 jisx0201 */
+ || (strcmp(mpName, "heiseimin") == 0) /* Solaris: jisx0212 */
+ || (strcmp(mpName, "minchol") == 0) /* TurboLinux */
+ || (strcmp(mpName, "mincho") == 0)) /* Redhat 6.2 JP */
{
mnFeature |= XLFD_FEATURE_INTERFACE_FONT;
}
@@ -189,7 +189,7 @@ Attribute::TagFeature( unsigned short nFeature )
}
else
// korean
- if ( (strcmp(mpName, "myeongjo") == 0)) /* Solaris */
+ if ( (strcmp(mpName, "myeongjo") == 0)) /* Solaris */
{
mnFeature |= XLFD_FEATURE_INTERFACE_FONT;
}
@@ -204,14 +204,14 @@ Attribute::TagFeature( unsigned short nFeature )
break;
case 'b':
- if ( (strcmp(mpName, "bold") == 0)
+ if ( (strcmp(mpName, "bold") == 0)
|| (strcmp(mpName, "bold italic") == 0)
|| (strcmp(mpName, "bold sans") == 0) )
mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
break;
case 'd':
- if ( (strcmp(mpName, "demi") == 0)
+ if ( (strcmp(mpName, "demi") == 0)
|| (strcmp(mpName, "demi italic") == 0) )
mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE;
break;
@@ -237,76 +237,76 @@ Attribute::TagFeature( unsigned short nFeature )
#define MembersOf( p ) (sizeof(p) / sizeof(p[0]) )
const Attribute pFamilyAttribute[] = {
- { InitializeAttributeWith( "arial", FAMILY_SWISS ) },
- { InitializeAttributeWith( "arioso", FAMILY_SCRIPT ) },
- { InitializeAttributeWith( "avant garde", FAMILY_SWISS ) },
- { InitializeAttributeWith( "avantgarde", FAMILY_SWISS ) },
- { InitializeAttributeWith( "bembo", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "bookman", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "conga", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "courier", FAMILY_MODERN ) },
- { InitializeAttributeWith( "curl", FAMILY_SCRIPT ) },
- { InitializeAttributeWith( "fixed", FAMILY_MODERN ) },
- { InitializeAttributeWith( "gill", FAMILY_SWISS ) },
- { InitializeAttributeWith( "helmet", FAMILY_MODERN ) },
- { InitializeAttributeWith( "helvetica", FAMILY_SWISS ) },
- { InitializeAttributeWith( "international", FAMILY_MODERN ) },
- { InitializeAttributeWith( "lucida", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "arial", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "arioso", FAMILY_SCRIPT ) },
+ { InitializeAttributeWith( "avant garde", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "avantgarde", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "bembo", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "bookman", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "conga", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "courier", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "curl", FAMILY_SCRIPT ) },
+ { InitializeAttributeWith( "fixed", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "gill", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "helmet", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "helvetica", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "international", FAMILY_MODERN ) },
+ { InitializeAttributeWith( "lucida", FAMILY_SWISS ) },
{ InitializeAttributeWith( "new century schoolbook", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "palatino", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "roman", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "sans serif", FAMILY_SWISS ) },
- { InitializeAttributeWith( "sansserif", FAMILY_SWISS ) },
- { InitializeAttributeWith( "serf", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "serif", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "times", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "utopia", FAMILY_ROMAN ) },
- { InitializeAttributeWith( "zapf chancery", FAMILY_SCRIPT ) },
- { InitializeAttributeWith( "zapfchancery", FAMILY_SCRIPT ) }
+ { InitializeAttributeWith( "palatino", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "roman", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "sans serif", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "sansserif", FAMILY_SWISS ) },
+ { InitializeAttributeWith( "serf", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "serif", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "times", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "utopia", FAMILY_ROMAN ) },
+ { InitializeAttributeWith( "zapf chancery", FAMILY_SCRIPT ) },
+ { InitializeAttributeWith( "zapfchancery", FAMILY_SCRIPT ) }
};
const Attribute pWeightAttribute[] = {
- { InitializeAttributeWith( "black", WEIGHT_BLACK ) },
- { InitializeAttributeWith( "bold", WEIGHT_BOLD ) },
- { InitializeAttributeWith( "book", WEIGHT_LIGHT ) },
- { InitializeAttributeWith( "demi", WEIGHT_SEMIBOLD ) },
- { InitializeAttributeWith( "demi bold", WEIGHT_SEMIBOLD ) },
- { InitializeAttributeWith( "demibold", WEIGHT_SEMIBOLD ) },
- { InitializeAttributeWith( "light", WEIGHT_LIGHT ) },
- { InitializeAttributeWith( "medium", WEIGHT_MEDIUM ) },
- { InitializeAttributeWith( "normal", WEIGHT_NORMAL ) },
- { InitializeAttributeWith( "regular", WEIGHT_NORMAL ) },
- { InitializeAttributeWith( "roman", WEIGHT_NORMAL ) },
- { InitializeAttributeWith( "semicondensed", WEIGHT_LIGHT ) },
- { InitializeAttributeWith( "ultrabold", WEIGHT_ULTRABOLD ) }
+ { InitializeAttributeWith( "black", WEIGHT_BLACK ) },
+ { InitializeAttributeWith( "bold", WEIGHT_BOLD ) },
+ { InitializeAttributeWith( "book", WEIGHT_LIGHT ) },
+ { InitializeAttributeWith( "demi", WEIGHT_SEMIBOLD ) },
+ { InitializeAttributeWith( "demi bold", WEIGHT_SEMIBOLD ) },
+ { InitializeAttributeWith( "demibold", WEIGHT_SEMIBOLD ) },
+ { InitializeAttributeWith( "light", WEIGHT_LIGHT ) },
+ { InitializeAttributeWith( "medium", WEIGHT_MEDIUM ) },
+ { InitializeAttributeWith( "normal", WEIGHT_NORMAL ) },
+ { InitializeAttributeWith( "regular", WEIGHT_NORMAL ) },
+ { InitializeAttributeWith( "roman", WEIGHT_NORMAL ) },
+ { InitializeAttributeWith( "semicondensed", WEIGHT_LIGHT ) },
+ { InitializeAttributeWith( "ultrabold", WEIGHT_ULTRABOLD ) }
};
const Attribute pSlantAttribute[] = {
- { InitializeAttributeWith( "i", ITALIC_NORMAL ) },
- { InitializeAttributeWith( "o", ITALIC_OBLIQUE ) },
- { InitializeAttributeWith( "r", ITALIC_NONE ) }
+ { InitializeAttributeWith( "i", ITALIC_NORMAL ) },
+ { InitializeAttributeWith( "o", ITALIC_OBLIQUE ) },
+ { InitializeAttributeWith( "r", ITALIC_NONE ) }
};
const Attribute pSetwidthAttribute[] = {
- { InitializeAttributeWith( "bold", WIDTH_SEMI_EXPANDED ) },
- { InitializeAttributeWith( "condensed", WIDTH_CONDENSED ) },
- { InitializeAttributeWith( "double wide", WIDTH_ULTRA_EXPANDED ) },
- { InitializeAttributeWith( "expanded", WIDTH_EXPANDED ) },
- { InitializeAttributeWith( "extracondensed", WIDTH_EXTRA_CONDENSED ) },
- { InitializeAttributeWith( "extraexpanded", WIDTH_EXTRA_EXPANDED ) },
- { InitializeAttributeWith( "medium", WIDTH_NORMAL ) },
- { InitializeAttributeWith( "narrow", WIDTH_CONDENSED ) },
- { InitializeAttributeWith( "normal", WIDTH_NORMAL ) },
- { InitializeAttributeWith( "semicondensed", WIDTH_SEMI_CONDENSED ) },
- { InitializeAttributeWith( "semiexpanded", WIDTH_SEMI_EXPANDED ) },
- { InitializeAttributeWith( "ultracondensed", WIDTH_ULTRA_CONDENSED ) },
- { InitializeAttributeWith( "ultraexpanded", WIDTH_ULTRA_EXPANDED ) },
- { InitializeAttributeWith( "wide", WIDTH_EXPANDED ) }
+ { InitializeAttributeWith( "bold", WIDTH_SEMI_EXPANDED ) },
+ { InitializeAttributeWith( "condensed", WIDTH_CONDENSED ) },
+ { InitializeAttributeWith( "double wide", WIDTH_ULTRA_EXPANDED ) },
+ { InitializeAttributeWith( "expanded", WIDTH_EXPANDED ) },
+ { InitializeAttributeWith( "extracondensed", WIDTH_EXTRA_CONDENSED ) },
+ { InitializeAttributeWith( "extraexpanded", WIDTH_EXTRA_EXPANDED ) },
+ { InitializeAttributeWith( "medium", WIDTH_NORMAL ) },
+ { InitializeAttributeWith( "narrow", WIDTH_CONDENSED ) },
+ { InitializeAttributeWith( "normal", WIDTH_NORMAL ) },
+ { InitializeAttributeWith( "semicondensed", WIDTH_SEMI_CONDENSED ) },
+ { InitializeAttributeWith( "semiexpanded", WIDTH_SEMI_EXPANDED ) },
+ { InitializeAttributeWith( "ultracondensed", WIDTH_ULTRA_CONDENSED ) },
+ { InitializeAttributeWith( "ultraexpanded", WIDTH_ULTRA_EXPANDED ) },
+ { InitializeAttributeWith( "wide", WIDTH_EXPANDED ) }
};
const Attribute pEnhancedCharsetAttribute[] = {
- { InitializeAttributeWith( "iso8859-1", RTL_TEXTENCODING_MS_1252 ) },
- { InitializeAttributeWith( "iso8859_1", RTL_TEXTENCODING_MS_1252 ) }
+ { InitializeAttributeWith( "iso8859-1", RTL_TEXTENCODING_MS_1252 ) },
+ { InitializeAttributeWith( "iso8859_1", RTL_TEXTENCODING_MS_1252 ) }
};
// -------------------------------------------------------------------------
@@ -333,7 +333,7 @@ AppendAttribute( Attribute *pAttribute, ByteString &rString )
//
// Prettify the font name: make each leading character of a fontname
// uppercase. For example
-// times new roman -> Times New Roman
+// times new roman -> Times New Roman
//
static void
diff --git a/vcl/unx/source/gdi/xlfd_attr.hxx b/vcl/unx/source/gdi/xlfd_attr.hxx
index b721310da506..46a1f6e9ec51 100644
--- a/vcl/unx/source/gdi/xlfd_attr.hxx
+++ b/vcl/unx/source/gdi/xlfd_attr.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,39 +33,39 @@
struct Attribute {
- const char* mpName;
+ const char* mpName;
unsigned short mnLength;
- unsigned short mnValue;
- unsigned short mnFeature;
- String* mpAnnotation;
- rtl::OString* mpKeyName;
+ unsigned short mnValue;
+ unsigned short mnFeature;
+ String* mpAnnotation;
+ rtl::OString* mpKeyName;
- const char* GetName() const
+ const char* GetName() const
{ return mpName; }
- unsigned short GetValue() const
+ unsigned short GetValue() const
{ return mnValue; }
unsigned short GetLength() const
{ return mnLength; }
- Bool HasFeature( unsigned short nFeature ) const
+ Bool HasFeature( unsigned short nFeature ) const
{ return ((mnFeature & nFeature) != 0); }
const String &GetAnnotation() const
{ return *mpAnnotation; }
const rtl::OString&
GetKey();
- void InitKey();
+ void InitKey();
- void SetName( const char *p, int nLen );
- void SetValue( unsigned short nIn )
+ void SetName( const char *p, int nLen );
+ void SetValue( unsigned short nIn )
{ mnValue = nIn; }
- void SetAnnotation( String *pString )
+ void SetAnnotation( String *pString )
{ mpAnnotation = pString; }
- void SetFeature( unsigned short nFeature )
+ void SetFeature( unsigned short nFeature )
{ mnFeature = nFeature; }
- void TagFeature( unsigned short nFeature );
+ void TagFeature( unsigned short nFeature );
- int Compare( const char *p, int nLen );
- Bool ExactMatch( const char *p, int nLen );
- void Release();
+ int Compare( const char *p, int nLen );
+ Bool ExactMatch( const char *p, int nLen );
+ void Release();
};
@@ -78,14 +78,14 @@ extern "C" {
typedef rtl_TextEncoding(*AttributeClassifierT)(const char* pStr);
}
-#define XLFD_FEATURE_NONE 0x0000
-#define XLFD_FEATURE_NARROW 0x0001
-#define XLFD_FEATURE_OL_GLYPH 0x0002
-#define XLFD_FEATURE_OL_CURSOR 0x0004
-#define XLFD_FEATURE_REDUNDANTSTYLE 0x0008
-#define XLFD_FEATURE_APPLICATION_FONT 0x0010
+#define XLFD_FEATURE_NONE 0x0000
+#define XLFD_FEATURE_NARROW 0x0001
+#define XLFD_FEATURE_OL_GLYPH 0x0002
+#define XLFD_FEATURE_OL_CURSOR 0x0004
+#define XLFD_FEATURE_REDUNDANTSTYLE 0x0008
+#define XLFD_FEATURE_APPLICATION_FONT 0x0010
-#define XLFD_FEATURE_INTERFACE_FONT 0x0020
+#define XLFD_FEATURE_INTERFACE_FONT 0x0020
#define XLFD_FEATURE_LQ 0x0040
#define XLFD_FEATURE_MQ 0x0080
#define XLFD_FEATURE_HQ 0x0100
@@ -105,28 +105,28 @@ class AttributeStorage {
private:
- Attribute* mpList;
- unsigned short mnSize;
- unsigned short mnCount;
+ Attribute* mpList;
+ unsigned short mnSize;
+ unsigned short mnCount;
unsigned short mnLastmatch;
unsigned short mnDefaultValue;
- void Enlarge();
+ void Enlarge();
AttributeStorage();
public:
AttributeStorage( unsigned short nDefaultValue );
~AttributeStorage();
- unsigned short Insert( const char *pString, int nLength );
- Attribute* Retrieve( unsigned short nIndex ) const ;
- void AddClassification( Attribute *pClassification,
+ unsigned short Insert( const char *pString, int nLength );
+ Attribute* Retrieve( unsigned short nIndex ) const ;
+ void AddClassification( Attribute *pClassification,
unsigned short nNum );
- void AddClassification( AttributeClassifierT Classify );
- void TagFeature( unsigned short nFeature );
- void AddAnnotation( AttributeAnnotatorT Annotate );
+ void AddClassification( AttributeClassifierT Classify );
+ void TagFeature( unsigned short nFeature );
+ void AddAnnotation( AttributeAnnotatorT Annotate );
#if OSL_DEBUG_LEVEL > 1
- void Dump();
+ void Dump();
#endif
};
@@ -160,20 +160,20 @@ class AttributeProvider {
private:
- AttributeStorage* mpField[ eXLFDMaxEntry ];
+ AttributeStorage* mpField[ eXLFDMaxEntry ];
- AttributeStorage* GetField( eXLFDAttributeT eXLFDField )
+ AttributeStorage* GetField( eXLFDAttributeT eXLFDField )
{ return mpField[ eXLFDField]; }
public:
AttributeProvider ();
~AttributeProvider ();
- void AddClassification();
- void AddAnnotation();
- void TagFeature();
+ void AddClassification();
+ void AddAnnotation();
+ void TagFeature();
#if OSL_DEBUG_LEVEL > 1
- void Dump();
+ void Dump();
#endif
// these are just shortcuts or proxies for the most common used
@@ -193,34 +193,34 @@ class AttributeProvider {
AttributeStorage* GetCharset()
{ return GetField(eXLFDCharset); }
- Attribute* RetrieveFoundry( unsigned short nIndex )
+ Attribute* RetrieveFoundry( unsigned short nIndex )
{ return GetFoundry()->Retrieve(nIndex); }
- Attribute* RetrieveFamily( unsigned short nIndex )
+ Attribute* RetrieveFamily( unsigned short nIndex )
{ return GetFamily()->Retrieve(nIndex); }
- Attribute* RetrieveWeight( unsigned short nIndex )
+ Attribute* RetrieveWeight( unsigned short nIndex )
{ return GetWeight()->Retrieve(nIndex); }
- Attribute* RetrieveSlant( unsigned short nIndex )
+ Attribute* RetrieveSlant( unsigned short nIndex )
{ return GetSlant()->Retrieve(nIndex); }
- Attribute* RetrieveSetwidth( unsigned short nIndex )
+ Attribute* RetrieveSetwidth( unsigned short nIndex )
{ return GetSetwidth()->Retrieve(nIndex); }
- Attribute* RetrieveAddstyle( unsigned short nIndex )
+ Attribute* RetrieveAddstyle( unsigned short nIndex )
{ return GetAddstyle()->Retrieve(nIndex); }
- Attribute* RetrieveCharset( unsigned short nIndex )
+ Attribute* RetrieveCharset( unsigned short nIndex )
{ return GetCharset()->Retrieve(nIndex); }
- unsigned short InsertFoundry( const char *pString, int nLength )
+ unsigned short InsertFoundry( const char *pString, int nLength )
{ return GetFoundry()->Insert(pString, nLength); }
- unsigned short InsertFamily( const char *pString, int nLength )
+ unsigned short InsertFamily( const char *pString, int nLength )
{ return GetFamily()->Insert(pString, nLength); }
- unsigned short InsertWeight( const char *pString, int nLength )
+ unsigned short InsertWeight( const char *pString, int nLength )
{ return GetWeight()->Insert(pString, nLength); }
- unsigned short InsertSlant( const char *pString, int nLength )
+ unsigned short InsertSlant( const char *pString, int nLength )
{ return GetSlant()->Insert(pString, nLength); }
- unsigned short InsertSetwidth( const char *pString, int nLength )
+ unsigned short InsertSetwidth( const char *pString, int nLength )
{ return GetSetwidth()->Insert(pString, nLength);}
- unsigned short InsertAddstyle( const char *pString, int nLength )
+ unsigned short InsertAddstyle( const char *pString, int nLength )
{ return GetAddstyle()->Insert(pString, nLength);}
- unsigned short InsertCharset( const char *pString, int nLength )
+ unsigned short InsertCharset( const char *pString, int nLength )
{ return GetCharset()->Insert(pString, nLength); }
};
diff --git a/vcl/unx/source/gdi/xlfd_extd.cxx b/vcl/unx/source/gdi/xlfd_extd.cxx
index 73731eddf115..a299be82359a 100644
--- a/vcl/unx/source/gdi/xlfd_extd.cxx
+++ b/vcl/unx/source/gdi/xlfd_extd.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,12 +79,12 @@ sal_IntPtr ImplX11FontData::GetFontId() const
ExtendedXlfd::EncodingInfo&
ExtendedXlfd::EncodingInfo::operator= ( const Xlfd *pXlfd )
{
- mcSpacing = pXlfd->mcSpacing;
+ mcSpacing = pXlfd->mcSpacing;
mnResolutionX = pXlfd->mnResolutionX;
mnResolutionY = pXlfd->mnResolutionY;
mnAddstyle = pXlfd->mnAddstyle;
mnCharset = pXlfd->mnCharset;
- mnEncoding = pXlfd->GetEncoding();
+ mnEncoding = pXlfd->GetEncoding();
return *this;
}
@@ -273,9 +273,9 @@ ExtendedXlfd::ToString( ByteString &rString,
unsigned short /*nPixelSize*/, rtl_TextEncoding /*nEncoding*/ ) const
{
AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString );
- AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
- AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
- AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
+ AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString );
}
@@ -284,9 +284,9 @@ ExtendedXlfd::ToString( ByteString &rString,
unsigned short /*nPixelSize*/, char* /*pMatricsString*/, rtl_TextEncoding /*nEncoding*/ ) const
{
AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString );
- AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
- AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
- AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
+ AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString );
}
@@ -854,7 +854,7 @@ VirtualXlfd::ToString( ByteString &rString, unsigned short nPixelSize,
AppendAttribute( mpFactory->RetrieveFoundry(rExtInfo.mnFoundry), rString );
AppendAttribute( mpFactory->RetrieveFamily(rExtInfo.mnFamily), rString );
AppendAttribute( mpFactory->RetrieveWeight(rExtInfo.mnWeight), rString );
- AppendAttribute( mpFactory->RetrieveSlant(rExtInfo.mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(rExtInfo.mnSlant), rString );
AppendAttribute( mpFactory->RetrieveSetwidth(rExtInfo.mnSetwidth), rString );
EncodingInfo& rInfo = mpEncodingInfo[ nIdx ];
@@ -882,7 +882,7 @@ VirtualXlfd::ToString( ByteString &rString, unsigned short nPixelSize,
AppendAttribute( mpFactory->RetrieveFoundry(rExtInfo.mnFoundry), rString );
AppendAttribute( mpFactory->RetrieveFamily(rExtInfo.mnFamily), rString );
AppendAttribute( mpFactory->RetrieveWeight(rExtInfo.mnWeight), rString );
- AppendAttribute( mpFactory->RetrieveSlant(rExtInfo.mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(rExtInfo.mnSlant), rString );
AppendAttribute( mpFactory->RetrieveSetwidth(rExtInfo.mnSetwidth), rString );
EncodingInfo& rInfo = mpEncodingInfo[ nIdx ];
@@ -913,7 +913,7 @@ ImplFontData* VirtualXlfd::GetImplFontData() const
pFontData->meWidthType = WIDTH_NORMAL;
pFontData->mePitch = PITCH_VARIABLE;
- pFontData->mbSymbolFlag = false;
+ pFontData->mbSymbolFlag = false;
pFontData->mbOrientation= false;
pFontData->mbDevice = true;
pFontData->mnQuality = 100;
diff --git a/vcl/unx/source/gdi/xlfd_extd.hxx b/vcl/unx/source/gdi/xlfd_extd.hxx
index 523f87fac477..a18a29b09289 100644
--- a/vcl/unx/source/gdi/xlfd_extd.hxx
+++ b/vcl/unx/source/gdi/xlfd_extd.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,18 +61,18 @@ class ExtendedXlfd : public ImplDevFontAttributes
{
public:
ExtendedXlfd( bool bScalable );
- virtual ~ExtendedXlfd();
- virtual bool AddEncoding( const Xlfd* );
- bool HasEncoding( rtl_TextEncoding ) const;
- int GetEncodingIdx( rtl_TextEncoding nEncoding ) const;
- unsigned short NumEncodings() const
+ virtual ~ExtendedXlfd();
+ virtual bool AddEncoding( const Xlfd* );
+ bool HasEncoding( rtl_TextEncoding ) const;
+ int GetEncodingIdx( rtl_TextEncoding nEncoding ) const;
+ unsigned short NumEncodings() const
{ return mnEncodings; }
virtual int GetPixelSize() const
{ return 0; }
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
rtl_TextEncoding nEncoding ) const ;
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
char* pMatricsString,
rtl_TextEncoding nEncoding ) const;
@@ -92,28 +92,28 @@ class ExtendedXlfd : public ImplDevFontAttributes
int GetFontCodeRanges( sal_uInt32* pCodePairs ) const;
protected:
- AttributeProvider* mpFactory;
+ AttributeProvider* mpFactory;
public:
- unsigned short mnFoundry;
- unsigned short mnFamily;
- unsigned short mnWeight;
- unsigned short mnSlant;
- unsigned short mnSetwidth;
+ unsigned short mnFoundry;
+ unsigned short mnFamily;
+ unsigned short mnWeight;
+ unsigned short mnSlant;
+ unsigned short mnSetwidth;
bool mbScalable;
protected:
- unsigned short mnEncodings;
- unsigned short mnEncCapacity;
+ unsigned short mnEncodings;
+ unsigned short mnEncCapacity;
struct EncodingInfo {
- unsigned char mcSpacing;
- unsigned short mnResolutionX;
- unsigned short mnResolutionY;
- unsigned short mnAddstyle;
- unsigned short mnCharset;
- rtl_TextEncoding mnEncoding;
-
- EncodingInfo& operator= ( const Xlfd *pXlfd );
+ unsigned char mcSpacing;
+ unsigned short mnResolutionX;
+ unsigned short mnResolutionY;
+ unsigned short mnAddstyle;
+ unsigned short mnCharset;
+ rtl_TextEncoding mnEncoding;
+
+ EncodingInfo& operator= ( const Xlfd *pXlfd );
} *mpEncodingInfo;
};
@@ -123,11 +123,11 @@ class ScalableBitmapXlfd : public ExtendedXlfd {
public:
ScalableBitmapXlfd();
- virtual ~ScalableBitmapXlfd();
- virtual void ToString( ByteString &rString,
+ virtual ~ScalableBitmapXlfd();
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
rtl_TextEncoding nEncoding ) const;
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
char* pMatricsString,
rtl_TextEncoding nEncoding ) const;
@@ -144,22 +144,22 @@ class BitmapXlfd : public ExtendedXlfd {
public:
BitmapXlfd();
~BitmapXlfd();
- bool AddEncoding( const Xlfd* );
- virtual int GetPixelSize() const
+ bool AddEncoding( const Xlfd* );
+ virtual int GetPixelSize() const
{ return mnPixelSize; }
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
rtl_TextEncoding nEncoding ) const;
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
char* pMatricsString,
rtl_TextEncoding nEncoding ) const;
virtual ImplFontData* GetImplFontData() const ;
protected:
- unsigned short mnPixelSize;
- unsigned short mnPointSize;
- unsigned short mnAverageWidth;
+ unsigned short mnPixelSize;
+ unsigned short mnPointSize;
+ unsigned short mnAverageWidth;
};
// class to handle true scalable fonts
@@ -170,12 +170,12 @@ class ScalableXlfd : public ExtendedXlfd {
public:
ScalableXlfd();
- virtual ~ScalableXlfd();
- virtual void ToString( ByteString &rString,
+ virtual ~ScalableXlfd();
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
rtl_TextEncoding nEncoding ) const;
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
char* pMatricsString,
rtl_TextEncoding nEncoding ) const;
@@ -189,11 +189,11 @@ class XlfdStorage {
public:
XlfdStorage();
- void Dispose();
- void Reset();
+ void Dispose();
+ void Reset();
- void Add( const ExtendedXlfd *pXlfd );
- void Add( const XlfdStorage *pXlfd );
+ void Add( const ExtendedXlfd *pXlfd );
+ void Add( const XlfdStorage *pXlfd );
void AnnounceFonts( ImplDevFontList* ) const;
protected:
@@ -208,7 +208,7 @@ class BitmapXlfdStorage : public XlfdStorage {
public:
- void AddBitmapFont( const Xlfd *pXlfd );
+ void AddBitmapFont( const Xlfd *pXlfd );
};
@@ -218,17 +218,17 @@ class VirtualXlfd : public ExtendedXlfd
{
private:
- int GetFontQuality (unsigned short nFamily);
+ int GetFontQuality (unsigned short nFamily);
public:
VirtualXlfd();
- virtual ~VirtualXlfd();
- virtual bool AddEncoding( const Xlfd* );
- void FilterInterfaceFont (const Xlfd *pXlfd);
- virtual void ToString( ByteString &rString,
+ virtual ~VirtualXlfd();
+ virtual bool AddEncoding( const Xlfd* );
+ void FilterInterfaceFont (const Xlfd *pXlfd);
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
rtl_TextEncoding nEncoding ) const ;
- virtual void ToString( ByteString &rString,
+ virtual void ToString( ByteString &rString,
unsigned short nPixelSize,
char* pMatricsString,
rtl_TextEncoding nEncoding ) const;
@@ -236,15 +236,15 @@ class VirtualXlfd : public ExtendedXlfd
virtual ImplFontData* GetImplFontData() const ;
protected:
- unsigned short mnExtCapacity;
+ unsigned short mnExtCapacity;
struct ExtEncodingInfo {
- unsigned short mnFoundry;
- unsigned short mnFamily;
- unsigned short mnWeight;
- unsigned short mnSlant;
- unsigned short mnSetwidth;
+ unsigned short mnFoundry;
+ unsigned short mnFamily;
+ unsigned short mnWeight;
+ unsigned short mnSlant;
+ unsigned short mnSetwidth;
- ExtEncodingInfo& operator= ( const Xlfd *pXlfd );
+ ExtEncodingInfo& operator= ( const Xlfd *pXlfd );
} *mpExtEncodingInfo;
friend class ExtEncodingInfo;
diff --git a/vcl/unx/source/gdi/xlfd_smpl.cxx b/vcl/unx/source/gdi/xlfd_smpl.cxx
index 6cf18d98de1e..39939d64fa11 100644
--- a/vcl/unx/source/gdi/xlfd_smpl.cxx
+++ b/vcl/unx/source/gdi/xlfd_smpl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,7 +90,7 @@ XlfdCompare( const void *vFrom, const void *vTo )
int nFromCompare = (pFromAddStyle->GetValue() != RTL_TEXTENCODING_DONTKNOW)
|| (pFromAddStyle->HasFeature(XLFD_FEATURE_REDUNDANTSTYLE)) ?
-1 : pFrom->mnAddstyle;
- int nToCompare = (pToAddStyle->GetValue() != RTL_TEXTENCODING_DONTKNOW)
+ int nToCompare = (pToAddStyle->GetValue() != RTL_TEXTENCODING_DONTKNOW)
|| (pToAddStyle->HasFeature(XLFD_FEATURE_REDUNDANTSTYLE)) ?
-1 : pTo->mnAddstyle;
@@ -173,7 +173,7 @@ Xlfd::FromString( const char* pXlfdstring, AttributeProvider *pFactory )
return False;
const char* pFrom = pXlfdstring + 1;
- const char* pTo = pFrom;
+ const char* pTo = pFrom;
mpFactory = pFactory;
Advance( &pFrom, &pTo ); //-foundry-*
@@ -240,9 +240,9 @@ const char*
Xlfd::ToString( ByteString &rString ) const
{
AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString );
- AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
- AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
- AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
+ AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString );
+ AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString );
+ AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString );
AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString );
AppendAttribute( mpFactory->RetrieveAddstyle(mnAddstyle), rString );
diff --git a/vcl/unx/source/gdi/xlfd_smpl.hxx b/vcl/unx/source/gdi/xlfd_smpl.hxx
index f62ac381e6b9..5e3a106fc0a4 100644
--- a/vcl/unx/source/gdi/xlfd_smpl.hxx
+++ b/vcl/unx/source/gdi/xlfd_smpl.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,28 +42,28 @@ class AttributeProvider;
// --------------------------------------------------------------------------
enum XlfdFonttype {
- eTypeUnknown = TYPE_DONTKNOW,
- eTypeBitmap = TYPE_RASTER,
+ eTypeUnknown = TYPE_DONTKNOW,
+ eTypeBitmap = TYPE_RASTER,
eTypeScalableBitmap = TYPE_VECTOR,
- eTypeScalable = TYPE_SCALABLE
+ eTypeScalable = TYPE_SCALABLE
};
class Xlfd {
public:
- unsigned short mnFoundry;
- unsigned short mnFamily;
- unsigned short mnWeight;
- unsigned short mnSlant;
- unsigned short mnSetwidth;
- unsigned short mnAddstyle;
- unsigned short mnPixelSize;
- unsigned short mnPointSize;
- unsigned short mnResolutionX;
- unsigned short mnResolutionY;
- unsigned char mcSpacing;
- unsigned short mnAverageWidth;
+ unsigned short mnFoundry;
+ unsigned short mnFamily;
+ unsigned short mnWeight;
+ unsigned short mnSlant;
+ unsigned short mnSetwidth;
+ unsigned short mnAddstyle;
+ unsigned short mnPixelSize;
+ unsigned short mnPointSize;
+ unsigned short mnResolutionX;
+ unsigned short mnResolutionY;
+ unsigned char mcSpacing;
+ unsigned short mnAverageWidth;
unsigned short mnCharset;
// all foundry, family, weight ... information referres
@@ -74,14 +74,14 @@ class Xlfd {
public:
Xlfd();
- Bool FromString( const char* pXlfdstring,
+ Bool FromString( const char* pXlfdstring,
AttributeProvider *pFactory );
- Bool SameFontoutline( const Xlfd *pComparedTo ) const ;
- XlfdFonttype Fonttype() const ;
+ Bool SameFontoutline( const Xlfd *pComparedTo ) const ;
+ XlfdFonttype Fonttype() const ;
unsigned short GetEncoding() const ;
#if OSL_DEBUG_LEVEL > 1
- const char* ToString( ByteString &rString ) const ;
- void Dump() const;
+ const char* ToString( ByteString &rString ) const ;
+ void Dump() const;
#endif
};
diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx
index 8d24e4098df4..27756e600f26 100644
--- a/vcl/unx/source/gdi/xrender_peer.cxx
+++ b/vcl/unx/source/gdi/xrender_peer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,7 +87,7 @@ void XRenderPeer::InitRenderLib()
if( !mpRenderLib ) {
#ifdef DEBUG
fprintf( stderr, "Display can do XRender, but no %s installed.\n"
- "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(),
+ "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(),
osl_getThreadTextEncoding() ).getStr() );
#endif
return;
diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx
index 89dccfcef40b..448d75489a4a 100644
--- a/vcl/unx/source/gdi/xrender_peer.hxx
+++ b/vcl/unx/source/gdi/xrender_peer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ public:
int GetVersion() const;
sal_uInt32 InitRenderText();
-
+
protected:
XRenderPeer();
~XRenderPeer();
@@ -291,7 +291,7 @@ inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const
inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst,
GlyphSet aGlyphSet, int nDstX, int nDstY,
- const unsigned* pText, int nTextLen ) const
+ const unsigned* pText, int nTextLen ) const
{
#ifdef XRENDER_LINK
XRenderCompositeString32( mpDisplay, PictOpOver, aSrc, aDst, NULL,
diff --git a/vcl/unx/source/inc/airbrush_curs.h b/vcl/unx/source/inc/airbrush_curs.h
index 293c9757e77b..87b990fd8104 100644
--- a/vcl/unx/source/inc/airbrush_curs.h
+++ b/vcl/unx/source/inc/airbrush_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/airbrush_mask.h b/vcl/unx/source/inc/airbrush_mask.h
index 811ea2819669..ec751ea3d6d1 100644
--- a/vcl/unx/source/inc/airbrush_mask.h
+++ b/vcl/unx/source/inc/airbrush_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/ase_curs.h b/vcl/unx/source/inc/ase_curs.h
index 52b67f56d2ae..e4d5f9c127b4 100644
--- a/vcl/unx/source/inc/ase_curs.h
+++ b/vcl/unx/source/inc/ase_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/ase_mask.h b/vcl/unx/source/inc/ase_mask.h
index 5dbd5c134dbf..9bfb37c8628b 100644
--- a/vcl/unx/source/inc/ase_mask.h
+++ b/vcl/unx/source/inc/ase_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,7 @@
************************************************************************/
#define ase_mask_width 32
#define ase_mask_height 32
-#define ase_mask_x_hot 19
+#define ase_mask_x_hot 19
#define ase_mask_y_hot 16
static char ase_mask_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
diff --git a/vcl/unx/source/inc/asn_curs.h b/vcl/unx/source/inc/asn_curs.h
index 3b5f4364b5e2..d3f6a12c7d6b 100644
--- a/vcl/unx/source/inc/asn_curs.h
+++ b/vcl/unx/source/inc/asn_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asn_mask.h b/vcl/unx/source/inc/asn_mask.h
index 902fe80df8a1..c3678bd1ecd4 100644
--- a/vcl/unx/source/inc/asn_mask.h
+++ b/vcl/unx/source/inc/asn_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asne_curs.h b/vcl/unx/source/inc/asne_curs.h
index 0939b1d07e4b..506ed5cb0587 100644
--- a/vcl/unx/source/inc/asne_curs.h
+++ b/vcl/unx/source/inc/asne_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asne_mask.h b/vcl/unx/source/inc/asne_mask.h
index 9ab55c293218..6ea83dbf4b32 100644
--- a/vcl/unx/source/inc/asne_mask.h
+++ b/vcl/unx/source/inc/asne_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asns_curs.h b/vcl/unx/source/inc/asns_curs.h
index fef8fe2f4ab5..3cac3f831a4a 100644
--- a/vcl/unx/source/inc/asns_curs.h
+++ b/vcl/unx/source/inc/asns_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asns_mask.h b/vcl/unx/source/inc/asns_mask.h
index f90cb95ee721..c11cc00914ba 100644
--- a/vcl/unx/source/inc/asns_mask.h
+++ b/vcl/unx/source/inc/asns_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asnswe_curs.h b/vcl/unx/source/inc/asnswe_curs.h
index fd6ddaca65cb..af1005484daa 100644
--- a/vcl/unx/source/inc/asnswe_curs.h
+++ b/vcl/unx/source/inc/asnswe_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asnswe_mask.h b/vcl/unx/source/inc/asnswe_mask.h
index e48da90e3de5..42eab182cc03 100644
--- a/vcl/unx/source/inc/asnswe_mask.h
+++ b/vcl/unx/source/inc/asnswe_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asnw_curs.h b/vcl/unx/source/inc/asnw_curs.h
index cb3a35d793c7..4b4dd35ee235 100644
--- a/vcl/unx/source/inc/asnw_curs.h
+++ b/vcl/unx/source/inc/asnw_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asnw_mask.h b/vcl/unx/source/inc/asnw_mask.h
index e583957c4bae..b62f102de41d 100644
--- a/vcl/unx/source/inc/asnw_mask.h
+++ b/vcl/unx/source/inc/asnw_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/ass_curs.h b/vcl/unx/source/inc/ass_curs.h
index ea942cefe942..5c77458a1710 100644
--- a/vcl/unx/source/inc/ass_curs.h
+++ b/vcl/unx/source/inc/ass_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/ass_mask.h b/vcl/unx/source/inc/ass_mask.h
index b35298183cb1..985002dedf38 100644
--- a/vcl/unx/source/inc/ass_mask.h
+++ b/vcl/unx/source/inc/ass_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asse_curs.h b/vcl/unx/source/inc/asse_curs.h
index 4b30e81882ff..181a83c48fdf 100644
--- a/vcl/unx/source/inc/asse_curs.h
+++ b/vcl/unx/source/inc/asse_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asse_mask.h b/vcl/unx/source/inc/asse_mask.h
index ad74b0cf724a..ee5f496cccc3 100644
--- a/vcl/unx/source/inc/asse_mask.h
+++ b/vcl/unx/source/inc/asse_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/assw_curs.h b/vcl/unx/source/inc/assw_curs.h
index d26c36e79ed4..c568b16d7380 100644
--- a/vcl/unx/source/inc/assw_curs.h
+++ b/vcl/unx/source/inc/assw_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/assw_mask.h b/vcl/unx/source/inc/assw_mask.h
index ea47a3ee27e9..61a84acae08d 100644
--- a/vcl/unx/source/inc/assw_mask.h
+++ b/vcl/unx/source/inc/assw_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asw_curs.h b/vcl/unx/source/inc/asw_curs.h
index 7b9b2199955a..48230903e741 100644
--- a/vcl/unx/source/inc/asw_curs.h
+++ b/vcl/unx/source/inc/asw_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/asw_mask.h b/vcl/unx/source/inc/asw_mask.h
index df934399fe91..4602852ae7ac 100644
--- a/vcl/unx/source/inc/asw_mask.h
+++ b/vcl/unx/source/inc/asw_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/aswe_curs.h b/vcl/unx/source/inc/aswe_curs.h
index f06d2140559e..bb8b5d64611d 100644
--- a/vcl/unx/source/inc/aswe_curs.h
+++ b/vcl/unx/source/inc/aswe_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/aswe_mask.h b/vcl/unx/source/inc/aswe_mask.h
index c04dbf5deafb..f583c35c995a 100644
--- a/vcl/unx/source/inc/aswe_mask.h
+++ b/vcl/unx/source/inc/aswe_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/chain_curs.h b/vcl/unx/source/inc/chain_curs.h
index 95b4fbe66c2e..129e16df3259 100644
--- a/vcl/unx/source/inc/chain_curs.h
+++ b/vcl/unx/source/inc/chain_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/chain_mask.h b/vcl/unx/source/inc/chain_mask.h
index 91d89bbed3c6..1c42341646b2 100644
--- a/vcl/unx/source/inc/chain_mask.h
+++ b/vcl/unx/source/inc/chain_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/chainnot_curs.h b/vcl/unx/source/inc/chainnot_curs.h
index 841e2efdec63..1833b3bc4e1c 100644
--- a/vcl/unx/source/inc/chainnot_curs.h
+++ b/vcl/unx/source/inc/chainnot_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/chainnot_mask.h b/vcl/unx/source/inc/chainnot_mask.h
index 9fbed6408c54..b5fc4593227b 100644
--- a/vcl/unx/source/inc/chainnot_mask.h
+++ b/vcl/unx/source/inc/chainnot_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/chart_curs.h b/vcl/unx/source/inc/chart_curs.h
index 9346fbd8f2c0..25a57f4fa5c3 100644
--- a/vcl/unx/source/inc/chart_curs.h
+++ b/vcl/unx/source/inc/chart_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/chart_mask.h b/vcl/unx/source/inc/chart_mask.h
index d4804fb6c85b..d013474a4d1b 100644
--- a/vcl/unx/source/inc/chart_mask.h
+++ b/vcl/unx/source/inc/chart_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copydata_curs.h b/vcl/unx/source/inc/copydata_curs.h
index e3d0e3e76530..a5e78e1ce2c4 100644
--- a/vcl/unx/source/inc/copydata_curs.h
+++ b/vcl/unx/source/inc/copydata_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copydata_mask.h b/vcl/unx/source/inc/copydata_mask.h
index f25b0863d807..99f09cb64d6d 100644
--- a/vcl/unx/source/inc/copydata_mask.h
+++ b/vcl/unx/source/inc/copydata_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copydlnk_curs.h b/vcl/unx/source/inc/copydlnk_curs.h
index 8e22a5bee37b..d5220027e659 100644
--- a/vcl/unx/source/inc/copydlnk_curs.h
+++ b/vcl/unx/source/inc/copydlnk_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copydlnk_mask.h b/vcl/unx/source/inc/copydlnk_mask.h
index 02ee5db5fbc1..504765107059 100644
--- a/vcl/unx/source/inc/copydlnk_mask.h
+++ b/vcl/unx/source/inc/copydlnk_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copyfile_curs.h b/vcl/unx/source/inc/copyfile_curs.h
index c74a1da26b66..2eea25d58e44 100644
--- a/vcl/unx/source/inc/copyfile_curs.h
+++ b/vcl/unx/source/inc/copyfile_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copyfile_mask.h b/vcl/unx/source/inc/copyfile_mask.h
index c13089abaea5..9bdc76fc5f8d 100644
--- a/vcl/unx/source/inc/copyfile_mask.h
+++ b/vcl/unx/source/inc/copyfile_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copyfiles_curs.h b/vcl/unx/source/inc/copyfiles_curs.h
index e6a9b7a668af..463f612b9c02 100644
--- a/vcl/unx/source/inc/copyfiles_curs.h
+++ b/vcl/unx/source/inc/copyfiles_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copyfiles_mask.h b/vcl/unx/source/inc/copyfiles_mask.h
index f904b7848f64..2990d86f5f43 100644
--- a/vcl/unx/source/inc/copyfiles_mask.h
+++ b/vcl/unx/source/inc/copyfiles_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copyflnk_curs.h b/vcl/unx/source/inc/copyflnk_curs.h
index b76368923f31..f45a0b80748f 100644
--- a/vcl/unx/source/inc/copyflnk_curs.h
+++ b/vcl/unx/source/inc/copyflnk_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/copyflnk_mask.h b/vcl/unx/source/inc/copyflnk_mask.h
index b8fac92fdd75..8c7912bcd5ca 100644
--- a/vcl/unx/source/inc/copyflnk_mask.h
+++ b/vcl/unx/source/inc/copyflnk_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/crook_curs.h b/vcl/unx/source/inc/crook_curs.h
index 6e4d5f613959..4ec93c6ceec3 100644
--- a/vcl/unx/source/inc/crook_curs.h
+++ b/vcl/unx/source/inc/crook_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/crook_mask.h b/vcl/unx/source/inc/crook_mask.h
index 7493f3a501dc..21f37e4be928 100644
--- a/vcl/unx/source/inc/crook_mask.h
+++ b/vcl/unx/source/inc/crook_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/crop_curs.h b/vcl/unx/source/inc/crop_curs.h
index a546ce6c1ba8..2323eb1bfd69 100644
--- a/vcl/unx/source/inc/crop_curs.h
+++ b/vcl/unx/source/inc/crop_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/crop_mask.h b/vcl/unx/source/inc/crop_mask.h
index 5a10726cf36c..43e2ce7bdb24 100644
--- a/vcl/unx/source/inc/crop_mask.h
+++ b/vcl/unx/source/inc/crop_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/detective_curs.h b/vcl/unx/source/inc/detective_curs.h
index 9d8a0d6a1c47..14862e9f7ab7 100644
--- a/vcl/unx/source/inc/detective_curs.h
+++ b/vcl/unx/source/inc/detective_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/detective_mask.h b/vcl/unx/source/inc/detective_mask.h
index 14402a37b641..ad877b6ffa7e 100644
--- a/vcl/unx/source/inc/detective_mask.h
+++ b/vcl/unx/source/inc/detective_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawarc_curs.h b/vcl/unx/source/inc/drawarc_curs.h
index daea116e186e..6494fbe242d2 100644
--- a/vcl/unx/source/inc/drawarc_curs.h
+++ b/vcl/unx/source/inc/drawarc_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawarc_mask.h b/vcl/unx/source/inc/drawarc_mask.h
index c9e2b6dd8737..5626ba8042c8 100644
--- a/vcl/unx/source/inc/drawarc_mask.h
+++ b/vcl/unx/source/inc/drawarc_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawbezier_curs.h b/vcl/unx/source/inc/drawbezier_curs.h
index ea677d4734aa..04ecd4a2f6d0 100644
--- a/vcl/unx/source/inc/drawbezier_curs.h
+++ b/vcl/unx/source/inc/drawbezier_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawbezier_mask.h b/vcl/unx/source/inc/drawbezier_mask.h
index 17c1075d07a7..73427355121d 100644
--- a/vcl/unx/source/inc/drawbezier_mask.h
+++ b/vcl/unx/source/inc/drawbezier_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcaption_curs.h b/vcl/unx/source/inc/drawcaption_curs.h
index 3fe104f3673e..a19127824354 100644
--- a/vcl/unx/source/inc/drawcaption_curs.h
+++ b/vcl/unx/source/inc/drawcaption_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcaption_mask.h b/vcl/unx/source/inc/drawcaption_mask.h
index 70b39e37b65e..e1366d5b264e 100644
--- a/vcl/unx/source/inc/drawcaption_mask.h
+++ b/vcl/unx/source/inc/drawcaption_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcirclecut_curs.h b/vcl/unx/source/inc/drawcirclecut_curs.h
index dc632873dd3b..90b4cafbfdfe 100644
--- a/vcl/unx/source/inc/drawcirclecut_curs.h
+++ b/vcl/unx/source/inc/drawcirclecut_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcirclecut_mask.h b/vcl/unx/source/inc/drawcirclecut_mask.h
index 1f96be33b86a..7c7e9f8b4a10 100644
--- a/vcl/unx/source/inc/drawcirclecut_mask.h
+++ b/vcl/unx/source/inc/drawcirclecut_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawconnect_curs.h b/vcl/unx/source/inc/drawconnect_curs.h
index 994f34b96e0e..98e58f6ad25a 100644
--- a/vcl/unx/source/inc/drawconnect_curs.h
+++ b/vcl/unx/source/inc/drawconnect_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawconnect_mask.h b/vcl/unx/source/inc/drawconnect_mask.h
index 187cf31cfd1a..a0ec74d59e46 100644
--- a/vcl/unx/source/inc/drawconnect_mask.h
+++ b/vcl/unx/source/inc/drawconnect_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcrook_curs.h b/vcl/unx/source/inc/drawcrook_curs.h
index 4fdba0e8442a..a350246e8878 100644
--- a/vcl/unx/source/inc/drawcrook_curs.h
+++ b/vcl/unx/source/inc/drawcrook_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcrook_mask.h b/vcl/unx/source/inc/drawcrook_mask.h
index 657fcff2b4fd..2632a88d2e09 100644
--- a/vcl/unx/source/inc/drawcrook_mask.h
+++ b/vcl/unx/source/inc/drawcrook_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcrop_curs.h b/vcl/unx/source/inc/drawcrop_curs.h
index 7f574e1ab351..5b5c744a38e2 100644
--- a/vcl/unx/source/inc/drawcrop_curs.h
+++ b/vcl/unx/source/inc/drawcrop_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawcrop_mask.h b/vcl/unx/source/inc/drawcrop_mask.h
index ac2e8885bdbb..657cb2129924 100644
--- a/vcl/unx/source/inc/drawcrop_mask.h
+++ b/vcl/unx/source/inc/drawcrop_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawellipse_curs.h b/vcl/unx/source/inc/drawellipse_curs.h
index bddc330d71d2..1f23183e563b 100644
--- a/vcl/unx/source/inc/drawellipse_curs.h
+++ b/vcl/unx/source/inc/drawellipse_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawellipse_mask.h b/vcl/unx/source/inc/drawellipse_mask.h
index 0ac5f200eab1..d00fde8419a4 100644
--- a/vcl/unx/source/inc/drawellipse_mask.h
+++ b/vcl/unx/source/inc/drawellipse_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawfreehand_curs.h b/vcl/unx/source/inc/drawfreehand_curs.h
index 75795c088c8e..b90d6182ca5a 100644
--- a/vcl/unx/source/inc/drawfreehand_curs.h
+++ b/vcl/unx/source/inc/drawfreehand_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawfreehand_mask.h b/vcl/unx/source/inc/drawfreehand_mask.h
index 29edf44a9999..28a9302d329a 100644
--- a/vcl/unx/source/inc/drawfreehand_mask.h
+++ b/vcl/unx/source/inc/drawfreehand_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawline_curs.h b/vcl/unx/source/inc/drawline_curs.h
index 2d2aa162fac6..6f82124635be 100644
--- a/vcl/unx/source/inc/drawline_curs.h
+++ b/vcl/unx/source/inc/drawline_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawline_mask.h b/vcl/unx/source/inc/drawline_mask.h
index d66b0fd09aaa..79d0e85e1e1f 100644
--- a/vcl/unx/source/inc/drawline_mask.h
+++ b/vcl/unx/source/inc/drawline_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawmirror_curs.h b/vcl/unx/source/inc/drawmirror_curs.h
index 3f61e751befb..8e934ef29cbd 100644
--- a/vcl/unx/source/inc/drawmirror_curs.h
+++ b/vcl/unx/source/inc/drawmirror_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawmirror_mask.h b/vcl/unx/source/inc/drawmirror_mask.h
index 5394dd74576a..3a5e7523628a 100644
--- a/vcl/unx/source/inc/drawmirror_mask.h
+++ b/vcl/unx/source/inc/drawmirror_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawpie_curs.h b/vcl/unx/source/inc/drawpie_curs.h
index 327b15258d3d..c087ada23a35 100644
--- a/vcl/unx/source/inc/drawpie_curs.h
+++ b/vcl/unx/source/inc/drawpie_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawpie_mask.h b/vcl/unx/source/inc/drawpie_mask.h
index 6b5e5ac4ff0d..c43d3be498c4 100644
--- a/vcl/unx/source/inc/drawpie_mask.h
+++ b/vcl/unx/source/inc/drawpie_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawpolygon_curs.h b/vcl/unx/source/inc/drawpolygon_curs.h
index ee68c707444c..80378a2c1fe1 100644
--- a/vcl/unx/source/inc/drawpolygon_curs.h
+++ b/vcl/unx/source/inc/drawpolygon_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawpolygon_mask.h b/vcl/unx/source/inc/drawpolygon_mask.h
index 8b82e237233c..8398e374da39 100644
--- a/vcl/unx/source/inc/drawpolygon_mask.h
+++ b/vcl/unx/source/inc/drawpolygon_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawrect_curs.h b/vcl/unx/source/inc/drawrect_curs.h
index c2508d37fad5..8c8db54f3011 100644
--- a/vcl/unx/source/inc/drawrect_curs.h
+++ b/vcl/unx/source/inc/drawrect_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawrect_mask.h b/vcl/unx/source/inc/drawrect_mask.h
index 955152f312c9..ebc344d21c1a 100644
--- a/vcl/unx/source/inc/drawrect_mask.h
+++ b/vcl/unx/source/inc/drawrect_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawtext_curs.h b/vcl/unx/source/inc/drawtext_curs.h
index c5049670b9ec..48d3f6293ffb 100644
--- a/vcl/unx/source/inc/drawtext_curs.h
+++ b/vcl/unx/source/inc/drawtext_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/drawtext_mask.h b/vcl/unx/source/inc/drawtext_mask.h
index e27ce2514306..c40aff2f6328 100644
--- a/vcl/unx/source/inc/drawtext_mask.h
+++ b/vcl/unx/source/inc/drawtext_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/fill_curs.h b/vcl/unx/source/inc/fill_curs.h
index 792ea50e4f00..70446744062f 100644
--- a/vcl/unx/source/inc/fill_curs.h
+++ b/vcl/unx/source/inc/fill_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/fill_mask.h b/vcl/unx/source/inc/fill_mask.h
index 67681f243f7b..ac72dc108b41 100644
--- a/vcl/unx/source/inc/fill_mask.h
+++ b/vcl/unx/source/inc/fill_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/hshear_curs.h b/vcl/unx/source/inc/hshear_curs.h
index 7f6092b648de..4c1c5e77d5b1 100644
--- a/vcl/unx/source/inc/hshear_curs.h
+++ b/vcl/unx/source/inc/hshear_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/hshear_mask.h b/vcl/unx/source/inc/hshear_mask.h
index 6d09b3b0af01..786ab1a9de7e 100644
--- a/vcl/unx/source/inc/hshear_mask.h
+++ b/vcl/unx/source/inc/hshear_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/invert50.h b/vcl/unx/source/inc/invert50.h
index 7c0d00ce8fa4..9b0f9b71db21 100644
--- a/vcl/unx/source/inc/invert50.h
+++ b/vcl/unx/source/inc/invert50.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/linkdata_curs.h b/vcl/unx/source/inc/linkdata_curs.h
index c60edc3b99d0..2c855fc009de 100644
--- a/vcl/unx/source/inc/linkdata_curs.h
+++ b/vcl/unx/source/inc/linkdata_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/linkdata_mask.h b/vcl/unx/source/inc/linkdata_mask.h
index cf0f89f63b1b..98f16e4bd01a 100644
--- a/vcl/unx/source/inc/linkdata_mask.h
+++ b/vcl/unx/source/inc/linkdata_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/linkfile_curs.h b/vcl/unx/source/inc/linkfile_curs.h
index fb676ae2a04b..2e19fd9e4cb2 100644
--- a/vcl/unx/source/inc/linkfile_curs.h
+++ b/vcl/unx/source/inc/linkfile_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/linkfile_mask.h b/vcl/unx/source/inc/linkfile_mask.h
index 28ff46c4fae4..b012579207ee 100644
--- a/vcl/unx/source/inc/linkfile_mask.h
+++ b/vcl/unx/source/inc/linkfile_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/magnify_curs.h b/vcl/unx/source/inc/magnify_curs.h
index 76114ca410d5..346989a3a453 100644
--- a/vcl/unx/source/inc/magnify_curs.h
+++ b/vcl/unx/source/inc/magnify_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/magnify_mask.h b/vcl/unx/source/inc/magnify_mask.h
index db4213943b6e..ed0146a64410 100644
--- a/vcl/unx/source/inc/magnify_mask.h
+++ b/vcl/unx/source/inc/magnify_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/mirror_curs.h b/vcl/unx/source/inc/mirror_curs.h
index 0f0f1b360224..ebff6f60f8eb 100644
--- a/vcl/unx/source/inc/mirror_curs.h
+++ b/vcl/unx/source/inc/mirror_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/mirror_mask.h b/vcl/unx/source/inc/mirror_mask.h
index da9c00435162..13af1a8d142d 100644
--- a/vcl/unx/source/inc/mirror_mask.h
+++ b/vcl/unx/source/inc/mirror_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movebezierweight_curs.h b/vcl/unx/source/inc/movebezierweight_curs.h
index a1ece2d925e9..88f20880c4b5 100644
--- a/vcl/unx/source/inc/movebezierweight_curs.h
+++ b/vcl/unx/source/inc/movebezierweight_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movebezierweight_mask.h b/vcl/unx/source/inc/movebezierweight_mask.h
index 27e0d8c703db..3a53892f36c3 100644
--- a/vcl/unx/source/inc/movebezierweight_mask.h
+++ b/vcl/unx/source/inc/movebezierweight_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movedata_curs.h b/vcl/unx/source/inc/movedata_curs.h
index b79412bc3f41..062196de77ef 100644
--- a/vcl/unx/source/inc/movedata_curs.h
+++ b/vcl/unx/source/inc/movedata_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movedata_mask.h b/vcl/unx/source/inc/movedata_mask.h
index e25d0837d8dc..5d0f8b837851 100644
--- a/vcl/unx/source/inc/movedata_mask.h
+++ b/vcl/unx/source/inc/movedata_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movedlnk_curs.h b/vcl/unx/source/inc/movedlnk_curs.h
index 56608b8153a6..10950e5b3f65 100644
--- a/vcl/unx/source/inc/movedlnk_curs.h
+++ b/vcl/unx/source/inc/movedlnk_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movedlnk_mask.h b/vcl/unx/source/inc/movedlnk_mask.h
index 2aa3eb4b277d..360b103f138b 100644
--- a/vcl/unx/source/inc/movedlnk_mask.h
+++ b/vcl/unx/source/inc/movedlnk_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movefile_curs.h b/vcl/unx/source/inc/movefile_curs.h
index ed3a11e7f49d..4ecec3762992 100644
--- a/vcl/unx/source/inc/movefile_curs.h
+++ b/vcl/unx/source/inc/movefile_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movefile_mask.h b/vcl/unx/source/inc/movefile_mask.h
index 668d8d7e8015..550f4255afc3 100644
--- a/vcl/unx/source/inc/movefile_mask.h
+++ b/vcl/unx/source/inc/movefile_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movefiles_curs.h b/vcl/unx/source/inc/movefiles_curs.h
index 148fe2e72a5e..e3023dbca121 100644
--- a/vcl/unx/source/inc/movefiles_curs.h
+++ b/vcl/unx/source/inc/movefiles_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movefiles_mask.h b/vcl/unx/source/inc/movefiles_mask.h
index dc990dc5cb61..f0d3f21f8678 100644
--- a/vcl/unx/source/inc/movefiles_mask.h
+++ b/vcl/unx/source/inc/movefiles_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/moveflnk_curs.h b/vcl/unx/source/inc/moveflnk_curs.h
index 7f48bc4506fc..adcead58aaf5 100644
--- a/vcl/unx/source/inc/moveflnk_curs.h
+++ b/vcl/unx/source/inc/moveflnk_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/moveflnk_mask.h b/vcl/unx/source/inc/moveflnk_mask.h
index a25b7ee18960..a344e67bff9e 100644
--- a/vcl/unx/source/inc/moveflnk_mask.h
+++ b/vcl/unx/source/inc/moveflnk_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movepoint_curs.h b/vcl/unx/source/inc/movepoint_curs.h
index e3b20bd8edf9..3bb4e8c3a2a6 100644
--- a/vcl/unx/source/inc/movepoint_curs.h
+++ b/vcl/unx/source/inc/movepoint_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/movepoint_mask.h b/vcl/unx/source/inc/movepoint_mask.h
index e4fae36c023c..1f9d687c41a8 100644
--- a/vcl/unx/source/inc/movepoint_mask.h
+++ b/vcl/unx/source/inc/movepoint_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/nodrop_curs.h b/vcl/unx/source/inc/nodrop_curs.h
index 8e208e32f293..ccce5f28ad22 100644
--- a/vcl/unx/source/inc/nodrop_curs.h
+++ b/vcl/unx/source/inc/nodrop_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/nodrop_mask.h b/vcl/unx/source/inc/nodrop_mask.h
index 7cbecef2c60f..d467650902ca 100644
--- a/vcl/unx/source/inc/nodrop_mask.h
+++ b/vcl/unx/source/inc/nodrop_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/null_curs.h b/vcl/unx/source/inc/null_curs.h
index 19d4130d4b5d..f87ca9227741 100644
--- a/vcl/unx/source/inc/null_curs.h
+++ b/vcl/unx/source/inc/null_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,6 +26,6 @@
************************************************************************/
#define nullcurs_width 4
#define nullcurs_height 4
-#define nullcurs_x_hot 2
+#define nullcurs_x_hot 2
#define nullcurs_y_hot 2
static char nullcurs_bits[] = { 0x00, 0x00 };
diff --git a/vcl/unx/source/inc/null_mask.h b/vcl/unx/source/inc/null_mask.h
index a657cfa54af4..6a47663d0967 100644
--- a/vcl/unx/source/inc/null_mask.h
+++ b/vcl/unx/source/inc/null_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotcol_curs.h b/vcl/unx/source/inc/pivotcol_curs.h
index 22873985daf0..872c13ae64e5 100644
--- a/vcl/unx/source/inc/pivotcol_curs.h
+++ b/vcl/unx/source/inc/pivotcol_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotcol_mask.h b/vcl/unx/source/inc/pivotcol_mask.h
index 911eede87ed4..d54cc89c5fe3 100644
--- a/vcl/unx/source/inc/pivotcol_mask.h
+++ b/vcl/unx/source/inc/pivotcol_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotdel_curs.h b/vcl/unx/source/inc/pivotdel_curs.h
index e0dcbc14a6d6..f4d93719789d 100644
--- a/vcl/unx/source/inc/pivotdel_curs.h
+++ b/vcl/unx/source/inc/pivotdel_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotdel_mask.h b/vcl/unx/source/inc/pivotdel_mask.h
index 147bc2da410d..04d973ba1503 100644
--- a/vcl/unx/source/inc/pivotdel_mask.h
+++ b/vcl/unx/source/inc/pivotdel_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotfld_curs.h b/vcl/unx/source/inc/pivotfld_curs.h
index 1daf4f553275..a91ba85cbb2e 100644
--- a/vcl/unx/source/inc/pivotfld_curs.h
+++ b/vcl/unx/source/inc/pivotfld_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotfld_mask.h b/vcl/unx/source/inc/pivotfld_mask.h
index 6d62d8bbda46..812ddfd902fb 100644
--- a/vcl/unx/source/inc/pivotfld_mask.h
+++ b/vcl/unx/source/inc/pivotfld_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotrow_curs.h b/vcl/unx/source/inc/pivotrow_curs.h
index 75f4965f2582..ae205c7cc67c 100644
--- a/vcl/unx/source/inc/pivotrow_curs.h
+++ b/vcl/unx/source/inc/pivotrow_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/pivotrow_mask.h b/vcl/unx/source/inc/pivotrow_mask.h
index a8896d0975f9..85c4d12644e4 100644
--- a/vcl/unx/source/inc/pivotrow_mask.h
+++ b/vcl/unx/source/inc/pivotrow_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/rotate_curs.h b/vcl/unx/source/inc/rotate_curs.h
index f9c57674dfb2..7a0019b025cb 100644
--- a/vcl/unx/source/inc/rotate_curs.h
+++ b/vcl/unx/source/inc/rotate_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/rotate_mask.h b/vcl/unx/source/inc/rotate_mask.h
index 9fcff18925f0..a37964ee799a 100644
--- a/vcl/unx/source/inc/rotate_mask.h
+++ b/vcl/unx/source/inc/rotate_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/salcursors.h b/vcl/unx/source/inc/salcursors.h
index e8a63d6195aa..4c2b88555c58 100644
--- a/vcl/unx/source/inc/salcursors.h
+++ b/vcl/unx/source/inc/salcursors.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/timemove_curs.h b/vcl/unx/source/inc/timemove_curs.h
index 252a702caf77..90533d874e63 100644
--- a/vcl/unx/source/inc/timemove_curs.h
+++ b/vcl/unx/source/inc/timemove_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/timemove_mask.h b/vcl/unx/source/inc/timemove_mask.h
index b7a9542a64c6..140e4596cc9b 100644
--- a/vcl/unx/source/inc/timemove_mask.h
+++ b/vcl/unx/source/inc/timemove_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/timesize_curs.h b/vcl/unx/source/inc/timesize_curs.h
index 61e53971290e..adbbd8fa7668 100644
--- a/vcl/unx/source/inc/timesize_curs.h
+++ b/vcl/unx/source/inc/timesize_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/timesize_mask.h b/vcl/unx/source/inc/timesize_mask.h
index 3c4333c5e7b8..8d5280f58561 100644
--- a/vcl/unx/source/inc/timesize_mask.h
+++ b/vcl/unx/source/inc/timesize_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/vertcurs_curs.h b/vcl/unx/source/inc/vertcurs_curs.h
index d67251a1743d..5beb063a3fbd 100644
--- a/vcl/unx/source/inc/vertcurs_curs.h
+++ b/vcl/unx/source/inc/vertcurs_curs.h
@@ -1,6 +1,6 @@
#define vertcurs_curs_width 16
#define vertcurs_curs_height 16
-#define vertcurs_curs_x_hot 8
+#define vertcurs_curs_x_hot 8
#define vertcurs_curs_y_hot 8
static char vertcurs_curs_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x02, 0x40,
diff --git a/vcl/unx/source/inc/vertcurs_mask.h b/vcl/unx/source/inc/vertcurs_mask.h
index 769d6966571f..fe4839ca53cb 100644
--- a/vcl/unx/source/inc/vertcurs_mask.h
+++ b/vcl/unx/source/inc/vertcurs_mask.h
@@ -1,6 +1,6 @@
#define vertcurs_mask_width 16
#define vertcurs_mask_height 16
-#define vertcurs_mask_x_hot 8
+#define vertcurs_mask_x_hot 8
#define vertcurs_mask_y_hot 8
static char vertcurs_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xf0,
diff --git a/vcl/unx/source/inc/vshear_curs.h b/vcl/unx/source/inc/vshear_curs.h
index 87357c0a5027..8b730d87152d 100644
--- a/vcl/unx/source/inc/vshear_curs.h
+++ b/vcl/unx/source/inc/vshear_curs.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/inc/vshear_mask.h b/vcl/unx/source/inc/vshear_mask.h
index be77728c13f9..53f0988b939e 100644
--- a/vcl/unx/source/inc/vshear_mask.h
+++ b/vcl/unx/source/inc/vshear_mask.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index a438760cffba..a93b2fa530a4 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,7 +62,7 @@ static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KD
static SalInstance* tryInstance( const OUString& rModuleBase )
{
SalInstance* pInst = NULL;
-
+
OUStringBuffer aModName( 128 );
aModName.appendAscii( SAL_DLLPREFIX"vclplug_" );
aModName.append( rModuleBase );
@@ -80,7 +80,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
{
pInst = aProc( aMod );
#if OSL_DEBUG_LEVEL > 1
- std::fprintf( stderr, "sal plugin %s produced instance %p\n",
+ std::fprintf( stderr, "sal plugin %s produced instance %p\n",
OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr(),
pInst );
#endif
@@ -89,9 +89,9 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
pCloseModule = aMod;
/*
- * Recent GTK+ versions load their modules with RTLD_LOCAL, so we can
- * not access the 'gnome_accessibility_module_shutdown' anymore.
- * So make sure libgtk+ & co are still mapped into memory when
+ * Recent GTK+ versions load their modules with RTLD_LOCAL, so we can
+ * not access the 'gnome_accessibility_module_shutdown' anymore.
+ * So make sure libgtk+ & co are still mapped into memory when
* atk-bridge's atexit handler gets called.
*/
if( rModuleBase.equalsAscii("gtk") )
@@ -106,7 +106,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
{
pCloseModule = NULL;
}
-
+
GetSalData()->m_pPlugin = aMod;
}
else
@@ -126,7 +126,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
else
std::fprintf( stderr, "could not load shared object %s\n",
OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr() );
-#endif
+#endif
return pInst;
}
@@ -141,7 +141,7 @@ static const rtl::OUString& get_desktop_environment()
aModName.appendAscii( SAL_DLLPOSTFIX );
aModName.appendAscii( SAL_DLLEXTENSION );
OUString aModule = aModName.makeStringAndClear();
-
+
oslModule aMod = osl_loadModuleRelative(
reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData,
SAL_LOADMODULE_DEFAULT );
@@ -163,12 +163,12 @@ static SalInstance* autodetect_plugin()
{
"kde4", "kde", "gtk", "gen", 0
};
-
+
static const char* pStandardFallbackList[] =
{
"gtk", "gen", 0
};
-
+
static const char* pHeadlessFallbackList[] =
{
"svp", 0
@@ -177,7 +177,7 @@ static SalInstance* autodetect_plugin()
const rtl::OUString& desktop( get_desktop_environment() );
const char ** pList = pStandardFallbackList;
int nListEntry = 0;
-
+
// no server at all: dummy plugin
if ( desktop.equalsAscii( desktop_strings[DESKTOP_NONE] ) )
pList = pHeadlessFallbackList;
@@ -190,12 +190,12 @@ static SalInstance* autodetect_plugin()
}
else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE4] ) )
pList = pKDEFallbackList;
-
+
SalInstance* pInst = NULL;
while( pList[nListEntry] && pInst == NULL )
{
- rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) );
- pInst = tryInstance( aTry );
+ rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) );
+ pInst = tryInstance( aTry );
#if OSL_DEBUG_LEVEL > 1
if( pInst )
std::fprintf( stderr, "plugin autodetection: %s\n", pList[nListEntry] );
@@ -221,7 +221,7 @@ static SalInstance* check_headless_plugin()
SalInstance *CreateSalInstance()
{
- SalInstance* pInst = NULL;
+ SalInstance* pInst = NULL;
static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" );
@@ -229,13 +229,15 @@ SalInstance *CreateSalInstance()
pInst = check_headless_plugin();
else
pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) );
-
+
if( ! pInst )
pInst = autodetect_plugin();
+
+ // fallback, try everything
+ const char* pPlugin[] = { "gtk", "kde", "gen", 0 };
- // fallback to gen
- if( ! pInst )
- pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gen" ) ) );
+ for ( int i = 0; !pInst && pPlugin[ i ]; ++i )
+ pInst = tryInstance( OUString::createFromAscii( pPlugin[ i ] ) );
if( ! pInst )
{
@@ -245,7 +247,7 @@ SalInstance *CreateSalInstance()
// acquire SolarMutex
pInst->AcquireYieldMutex( 1 );
-
+
return pInst;
}
diff --git a/vcl/unx/source/printer/cupsmgr.cxx b/vcl/unx/source/printer/cupsmgr.cxx
index e245b2548c79..d8e725484edd 100644
--- a/vcl/unx/source/printer/cupsmgr.cxx
+++ b/vcl/unx/source/printer/cupsmgr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,24 +58,24 @@ namespace psp
{
class CUPSWrapper
{
- oslModule m_pLib;
- osl::Mutex m_aGetPPDMutex;
+ oslModule m_pLib;
+ osl::Mutex m_aGetPPDMutex;
bool m_bPPDThreadRunning;
- int (*m_pcupsPrintFile)(const char*, const char*, const char*, int, cups_option_t*);
- int (*m_pcupsGetDests)(cups_dest_t**);
- void (*m_pcupsSetDests)(int,cups_dest_t*);
- void (*m_pcupsFreeDests)(int,cups_dest_t*);
- const char* (*m_pcupsGetPPD)(const char*);
- int (*m_pcupsMarkOptions)(ppd_file_t*,int,cups_option_t*);
- int (*m_pcupsAddOption)(const char*,const char*,int,cups_option_t**);
- void (*m_pcupsFreeOptions)(int,cups_option_t*);
- ppd_file_t* (*m_pppdOpenFile)(const char* pFile);
- void (*m_pppdClose)(ppd_file_t*);
- const char* (*m_pcupsServer)();
- void (*m_pcupsSetPasswordCB)(const char*(cb)(const char*));
- const char* (*m_pcupsUser)();
- void (*m_pcupsSetUser)(const char*);
+ int (*m_pcupsPrintFile)(const char*, const char*, const char*, int, cups_option_t*);
+ int (*m_pcupsGetDests)(cups_dest_t**);
+ void (*m_pcupsSetDests)(int,cups_dest_t*);
+ void (*m_pcupsFreeDests)(int,cups_dest_t*);
+ const char* (*m_pcupsGetPPD)(const char*);
+ int (*m_pcupsMarkOptions)(ppd_file_t*,int,cups_option_t*);
+ int (*m_pcupsAddOption)(const char*,const char*,int,cups_option_t**);
+ void (*m_pcupsFreeOptions)(int,cups_option_t*);
+ ppd_file_t* (*m_pppdOpenFile)(const char* pFile);
+ void (*m_pppdClose)(ppd_file_t*);
+ const char* (*m_pcupsServer)();
+ void (*m_pcupsSetPasswordCB)(const char*(cb)(const char*));
+ const char* (*m_pcupsUser)();
+ void (*m_pcupsSetUser)(const char*);
const char* (*m_pcupsGetOption)(const char*,int,cups_option_t*);
oslGenericFunction loadSymbol( const char* );
@@ -118,21 +118,21 @@ public:
void ppdClose( ppd_file_t* pPPD )
{ m_pppdClose( pPPD ); }
- const char *cupsServer(void)
+ const char *cupsServer(void)
{ return m_pcupsServer(); }
- const char *cupsUser(void)
+ const char *cupsUser(void)
{ return m_pcupsUser(); }
-
+
void cupsSetPasswordCB(const char *(*cb)(const char *))
{ m_pcupsSetPasswordCB( cb ); }
void cupsSetUser(const char *user)
{ m_pcupsSetUser( user ); }
-
+
const char* cupsGetOption(const char* name, int num_options, cups_option_t* options)
{ return m_pcupsGetOption( name, num_options, options ); }
-
+
};
}
@@ -154,7 +154,7 @@ oslGenericFunction CUPSWrapper::loadSymbol( const char* pSymbol )
return pSym;
}
-CUPSWrapper::CUPSWrapper()
+CUPSWrapper::CUPSWrapper()
: m_pLib( NULL ),
m_bPPDThreadRunning( false )
{
@@ -176,51 +176,51 @@ CUPSWrapper::CUPSWrapper()
return;
}
- m_pcupsPrintFile = (int(*)(const char*,const char*,const char*,int,cups_option_t*))
+ m_pcupsPrintFile = (int(*)(const char*,const char*,const char*,int,cups_option_t*))
loadSymbol( "cupsPrintFile" );
- m_pcupsGetDests = (int(*)(cups_dest_t**))
+ m_pcupsGetDests = (int(*)(cups_dest_t**))
loadSymbol( "cupsGetDests" );
- m_pcupsSetDests = (void(*)(int,cups_dest_t*))
+ m_pcupsSetDests = (void(*)(int,cups_dest_t*))
loadSymbol( "cupsSetDests" );
- m_pcupsFreeDests = (void(*)(int,cups_dest_t*))
+ m_pcupsFreeDests = (void(*)(int,cups_dest_t*))
loadSymbol( "cupsFreeDests" );
- m_pcupsGetPPD = (const char*(*)(const char*))
+ m_pcupsGetPPD = (const char*(*)(const char*))
loadSymbol( "cupsGetPPD" );
- m_pcupsMarkOptions = (int(*)(ppd_file_t*,int,cups_option_t*))
+ m_pcupsMarkOptions = (int(*)(ppd_file_t*,int,cups_option_t*))
loadSymbol( "cupsMarkOptions" );
- m_pcupsAddOption = (int(*)(const char*,const char*,int,cups_option_t**))
+ m_pcupsAddOption = (int(*)(const char*,const char*,int,cups_option_t**))
loadSymbol( "cupsAddOption" );
- m_pcupsFreeOptions = (void(*)(int,cups_option_t*))
+ m_pcupsFreeOptions = (void(*)(int,cups_option_t*))
loadSymbol( "cupsFreeOptions" );
- m_pppdOpenFile = (ppd_file_t*(*)(const char*))
+ m_pppdOpenFile = (ppd_file_t*(*)(const char*))
loadSymbol( "ppdOpenFile" );
- m_pppdClose = (void(*)(ppd_file_t*))
+ m_pppdClose = (void(*)(ppd_file_t*))
loadSymbol( "ppdClose" );
- m_pcupsServer = (const char*(*)())
+ m_pcupsServer = (const char*(*)())
loadSymbol( "cupsServer" );
- m_pcupsUser = (const char*(*)())
+ m_pcupsUser = (const char*(*)())
loadSymbol( "cupsUser" );
- m_pcupsSetPasswordCB = (void(*)(const char*(*)(const char*)))
+ m_pcupsSetPasswordCB = (void(*)(const char*(*)(const char*)))
loadSymbol( "cupsSetPasswordCB" );
- m_pcupsSetUser = (void(*)(const char*))
+ m_pcupsSetUser = (void(*)(const char*))
loadSymbol( "cupsSetUser" );
m_pcupsGetOption = (const char*(*)(const char*,int,cups_option_t*))
loadSymbol( "cupsGetOption" );
if( ! (
- m_pcupsPrintFile &&
- m_pcupsGetDests &&
- m_pcupsSetDests &&
- m_pcupsFreeDests &&
- m_pcupsGetPPD &&
- m_pcupsMarkOptions &&
- m_pcupsAddOption &&
- m_pcupsServer &&
- m_pcupsUser &&
- m_pcupsSetPasswordCB &&
- m_pcupsSetUser &&
- m_pcupsFreeOptions &&
- m_pppdOpenFile &&
+ m_pcupsPrintFile &&
+ m_pcupsGetDests &&
+ m_pcupsSetDests &&
+ m_pcupsFreeDests &&
+ m_pcupsGetPPD &&
+ m_pcupsMarkOptions &&
+ m_pcupsAddOption &&
+ m_pcupsServer &&
+ m_pcupsUser &&
+ m_pcupsSetPasswordCB &&
+ m_pcupsSetUser &&
+ m_pcupsFreeOptions &&
+ m_pppdOpenFile &&
m_pppdClose &&
m_pcupsGetOption
) )
@@ -245,14 +245,14 @@ typedef const char*(*PPDFunction)(const char*);
struct GetPPDAttribs
{
PPDFunction m_pFunction;
- osl::Condition m_aCondition;
- OString m_aParameter;
- OString m_aResult;
- oslThread m_aThread;
+ osl::Condition m_aCondition;
+ OString m_aParameter;
+ OString m_aResult;
+ oslThread m_aThread;
int m_nRefs;
bool* m_pResetRunning;
osl::Mutex* m_pSyncMutex;
-
+
GetPPDAttribs( PPDFunction pFn, const char * m_pParameter,
bool* pResetRunning, osl::Mutex* pSyncMutex )
: m_pFunction( pFn ),
@@ -263,13 +263,13 @@ struct GetPPDAttribs
m_nRefs = 2;
m_aCondition.reset();
}
-
+
~GetPPDAttribs()
{
if( m_aResult.getLength() )
unlink( m_aResult.getStr() );
}
-
+
void unref()
{
if( --m_nRefs == 0 )
@@ -278,7 +278,7 @@ struct GetPPDAttribs
delete this;
}
}
-
+
void executeCall()
{
// This CUPS method is not at all thread-safe we need
@@ -289,11 +289,11 @@ struct GetPPDAttribs
m_aCondition.set();
unref();
}
-
+
OString waitResult( TimeValue *pDelay )
{
m_pSyncMutex->release();
-
+
if (m_aCondition.wait( pDelay ) != Condition::result_ok
)
{
@@ -304,11 +304,11 @@ struct GetPPDAttribs
#endif
}
m_pSyncMutex->acquire();
-
+
OString aRetval = m_aResult;
m_aResult = OString();
unref();
-
+
return aRetval;
}
};
@@ -334,7 +334,7 @@ OString CUPSWrapper::cupsGetPPD( const char* pPrinter )
pPrinter,
&m_bPPDThreadRunning,
&m_aGetPPDMutex );
-
+
oslThread aThread = osl_createThread( getPPDWorker, pAttribs );
TimeValue aValue;
@@ -354,7 +354,7 @@ OString CUPSWrapper::cupsGetPPD( const char* pPrinter )
static const char* setPasswordCallback( const char* pIn )
{
const char* pRet = NULL;
-
+
PrinterInfoManager& rMgr = PrinterInfoManager::get();
if( rMgr.getType() == PrinterInfoManager::CUPS ) // sanity check
pRet = static_cast<CUPSManager&>(rMgr).authenticateUser( pIn );
@@ -371,7 +371,7 @@ CUPSManager* CUPSManager::tryLoadCUPS()
CUPSManager* pManager = NULL;
#ifdef ENABLE_CUPS
static const char* pEnv = getenv( "SAL_DISABLE_CUPS" );
-
+
if( ! pEnv || ! *pEnv )
{
// try to load CUPS
@@ -443,7 +443,7 @@ void CUPSManager::runDests()
cups_dest_t* pDests = NULL;
// #i86306# prepare against really broken CUPS installations / missing servers
-
+
// install signal handler for SEGV, BUS and ABRT
struct sigaction act;
struct sigaction oact[3];
@@ -451,7 +451,7 @@ void CUPSManager::runDests()
act.sa_handler = lcl_signal_action;
act.sa_flags = 0;
sigemptyset(&(act.sa_mask));
-
+
int nSegvSignalInstalled = sigaction(SIGSEGV, &act, &oact[0]);
int nBusSignalInstalled = sigaction(SIGBUS, &act, &oact[1]);
int nAbortSignalInstalled = sigaction(SIGABRT, &act, &oact[2]);
@@ -463,7 +463,7 @@ void CUPSManager::runDests()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "came out of cupsGetDests\n" );
#endif
-
+
osl::MutexGuard aGuard( m_aCUPSMutex );
m_nDests = nDests;
m_pDests = pDests;
@@ -478,7 +478,7 @@ void CUPSManager::runDests()
fprintf( stderr, "cupsGetDests crashed, not using CUPS\n" );
#endif
}
-
+
// restore old signal handlers
if( nSegvSignalInstalled == 0 )
sigaction( SIGSEGV, &oact[0], NULL );
@@ -492,12 +492,12 @@ void CUPSManager::initialize()
{
// get normal printers, clear printer list
PrinterInfoManager::initialize();
-
+
#ifdef ENABLE_CUPS
// check whether thread has completed
// if not behave like old printing system
osl::MutexGuard aGuard( m_aCUPSMutex );
-
+
if( ! m_bNewDests )
return;
@@ -515,7 +515,7 @@ void CUPSManager::initialize()
if( ! (m_nDests && m_pDests ) )
return;
-
+
if( isCUPSDisabled() )
return;
@@ -537,7 +537,7 @@ void CUPSManager::initialize()
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
int nPrinter = m_nDests;
-
+
// reset global default PPD options; these are queried on demand from CUPS
m_aGlobalDefaults.m_pParser = NULL;
m_aGlobalDefaults.m_aContext = PPDContext();
@@ -647,8 +647,8 @@ static void updatePrinterContextInfo( ppd_group_t* pPPDGroup, PPDContext& rConte
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "key %s is set to %s\n", pOption->keyword, pChoice->choice );
#endif
-
- }
+
+ }
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "key %s is defaulted to %s\n", pOption->keyword, pChoice->choice );
@@ -711,7 +711,7 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
PPDParser* pCUPSParser = new PPDParser( aFileName );
pCUPSParser->m_aFile = rPrinter;
pNewParser = pCUPSParser;
-
+
/*int nConflicts =*/ m_pCUPSWrapper->cupsMarkOptions( pPPD, pDest->num_options, pDest->options );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "processing the following options for printer %s (instance %s):\n",
@@ -722,7 +722,7 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
pDest->options[k].value );
#endif
PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo;
-
+
// remember the default context for later use
PPDContext& rContext = m_aDefaultContexts[ aPrinter ];
rContext.setParser( pNewParser );
@@ -731,18 +731,18 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
setDefaultPaper( rContext );
for( int i = 0; i < pPPD->num_groups; i++ )
updatePrinterContextInfo( pPPD->groups + i, rContext );
-
+
rInfo.m_pParser = pNewParser;
rInfo.m_aContext = rContext;
-
+
// clean up the mess
- m_pCUPSWrapper->ppdClose( pPPD );
+ m_pCUPSWrapper->ppdClose( pPPD );
}
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "ppdOpenFile failed, falling back to generic driver\n" );
#endif
-
+
// remove temporary PPD file
unlink( aPPDFile.getStr() );
}
@@ -768,9 +768,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
{
// get the default PPD
pNewParser = PPDParser::getParser( String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) );
-
+
PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo;
-
+
rInfo.m_pParser = pNewParser;
rInfo.m_aContext.setParser( pNewParser );
}
@@ -819,8 +819,8 @@ void CUPSManager::setupJobContextData(
p_it->second.m_aInfo.m_aContext = m_aDefaultContexts[ aPrinter ];
}
- rData.m_pParser = p_it->second.m_aInfo.m_pParser;
- rData.m_aContext = p_it->second.m_aInfo.m_aContext;
+ rData.m_pParser = p_it->second.m_aInfo.m_pParser;
+ rData.m_aContext = p_it->second.m_aInfo.m_aContext;
#endif
}
@@ -828,7 +828,7 @@ FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand
{
if( m_aCUPSDestMap.find( rPrintername ) == m_aCUPSDestMap.end() )
return PrinterInfoManager::startSpool( rPrintername, bQuickCommand );
-
+
#ifdef ENABLE_CUPS
OUString aTmpURL, aTmpFile;
osl_createTempFile( NULL, NULL, &aTmpURL.pData );
@@ -837,7 +837,7 @@ FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand
FILE* fp = fopen( aSysFile.getStr(), "w" );
if( fp )
m_aSpoolFiles[fp] = aSysFile;
-
+
return fp;
#else
return NULL;
@@ -846,7 +846,7 @@ FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand
struct less_ppd_key : public ::std::binary_function<double, double, bool>
{
- bool operator()(const PPDKey* left, const PPDKey* right)
+ bool operator()(const PPDKey* left, const PPDKey* right)
{ return left->getOrderDependency() < right->getOrderDependency(); }
};
@@ -887,7 +887,7 @@ int CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTit
int nJobID = 0;
osl::MutexGuard aGuard( m_aCUPSMutex );
-
+
std::hash_map< OUString, int, OUStringHash >::iterator dest_it =
m_aCUPSDestMap.find( rPrintername );
if( dest_it == m_aCUPSDestMap.end() )
@@ -899,7 +899,7 @@ int CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTit
{
fclose( pFile );
rtl_TextEncoding aEnc = osl_getThreadTextEncoding();
-
+
// setup cups options
int nNumOptions = 0;
cups_option_t* pOptions = NULL;
@@ -926,7 +926,7 @@ int CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTit
aCmd = aCmd + OString( " $HOME/cupsprint.ps" );
system( aCmd.getStr() );
#endif
-
+
unlink( it->second.getStr() );
m_aSpoolFiles.erase( pFile );
if( pOptions )
@@ -969,7 +969,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
// where the user can set SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION
// (see vcl/unx/source/gdi/salprnpsp.cxx)
// so that checkPrintersChanged( true ) will never be called
-
+
// there is no way to query CUPS whether the printer list has changed
// so get the dest list anew
if( m_nDests && m_pDests )
@@ -992,7 +992,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
if( bChanged )
m_bNewDests = true;
}
-
+
if( bChanged )
initialize();
@@ -1037,7 +1037,7 @@ bool CUPSManager::setDefaultPrinter( const OUString& rName )
else
#endif
bSuccess = PrinterInfoManager::setDefaultPrinter( rName );
-
+
return bSuccess;
}
@@ -1054,7 +1054,7 @@ bool CUPSManager::writePrinterConfig()
m_aCUPSDestMap.find( prt->first );
if( nit == m_aCUPSDestMap.end() )
continue;
-
+
if( ! prt->second.m_bModified )
continue;
@@ -1066,7 +1066,7 @@ bool CUPSManager::writePrinterConfig()
// create new option list
int nNewOptions = 0;
- cups_option_t* pNewOptions = NULL;
+ cups_option_t* pNewOptions = NULL;
int nValues = rInfo.m_aContext.countValuesModified();
for( int i = 0; i < nValues; i++ )
{
@@ -1123,12 +1123,12 @@ const char* CUPSManager::authenticateUser( const char* /*pIn*/ )
OString aServer = m_pCUPSWrapper->cupsServer();
OString aPassword;
if( getpw( aServer, aUser, aPassword ) )
- {
+ {
m_aPassword = aPassword;
m_aUser = aUser;
m_pCUPSWrapper->cupsSetUser( m_aUser.getStr() );
pRet = m_aPassword.getStr();
- }
+ }
}
osl_unloadModule( pLib );
}
diff --git a/vcl/unx/source/printer/jobdata.cxx b/vcl/unx/source/printer/jobdata.cxx
index a1bca9441f77..b0b553ab1e9d 100644
--- a/vcl/unx/source/printer/jobdata.cxx
+++ b/vcl/unx/source/printer/jobdata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,18 +40,18 @@ using namespace rtl;
JobData& JobData::operator=(const JobData& rRight)
{
- m_nCopies = rRight.m_nCopies;
- m_nLeftMarginAdjust = rRight.m_nLeftMarginAdjust;
- m_nRightMarginAdjust = rRight.m_nRightMarginAdjust;
- m_nTopMarginAdjust = rRight.m_nTopMarginAdjust;
- m_nBottomMarginAdjust = rRight.m_nBottomMarginAdjust;
- m_nColorDepth = rRight.m_nColorDepth;
- m_eOrientation = rRight.m_eOrientation;
- m_aPrinterName = rRight.m_aPrinterName;
- m_pParser = rRight.m_pParser;
- m_aContext = rRight.m_aContext;
- m_nPSLevel = rRight.m_nPSLevel;
- m_nColorDevice = rRight.m_nColorDevice;
+ m_nCopies = rRight.m_nCopies;
+ m_nLeftMarginAdjust = rRight.m_nLeftMarginAdjust;
+ m_nRightMarginAdjust = rRight.m_nRightMarginAdjust;
+ m_nTopMarginAdjust = rRight.m_nTopMarginAdjust;
+ m_nBottomMarginAdjust = rRight.m_nBottomMarginAdjust;
+ m_nColorDepth = rRight.m_nColorDepth;
+ m_eOrientation = rRight.m_eOrientation;
+ m_aPrinterName = rRight.m_aPrinterName;
+ m_pParser = rRight.m_pParser;
+ m_aContext = rRight.m_aContext;
+ m_nPSLevel = rRight.m_nPSLevel;
+ m_nColorDevice = rRight.m_nColorDevice;
if( ! m_pParser && m_aPrinterName.getLength() )
{
diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx
index b2549573d099..e7b232618e62 100644
--- a/vcl/unx/source/printer/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,23 +69,23 @@ namespace psp
struct LocaleHash
{
size_t operator()(const com::sun::star::lang::Locale& rLocale) const
- { return
+ { return
(size_t)rLocale.Language.hashCode()
^ (size_t)rLocale.Country.hashCode()
^ (size_t)rLocale.Variant.hashCode()
;
}
};
-
+
typedef std::hash_map< com::sun::star::lang::Locale, rtl::OUString, LocaleHash, LocaleEqual > translation_map;
typedef std::hash_map< rtl::OUString, translation_map, rtl::OUStringHash > key_translation_map;
-
+
key_translation_map m_aTranslations;
public:
PPDTranslator() {}
~PPDTranslator() {}
-
-
+
+
void insertValue(
const rtl::OUString& i_rKey,
const rtl::OUString& i_rOption,
@@ -93,7 +93,7 @@ namespace psp
const rtl::OUString& i_rTranslation,
const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale()
);
-
+
void insertOption( const rtl::OUString& i_rKey,
const rtl::OUString& i_rOption,
const rtl::OUString& i_rTranslation,
@@ -101,14 +101,14 @@ namespace psp
{
insertValue( i_rKey, i_rOption, rtl::OUString(), i_rTranslation, i_rLocale );
}
-
+
void insertKey( const rtl::OUString& i_rKey,
const rtl::OUString& i_rTranslation,
const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() )
{
insertValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rTranslation, i_rLocale );
}
-
+
rtl::OUString translateValue(
const rtl::OUString& i_rKey,
const rtl::OUString& i_rOption,
@@ -129,7 +129,7 @@ namespace psp
return translateValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rLocale );
}
};
-
+
static com::sun::star::lang::Locale normalizeInputLocale(
const com::sun::star::lang::Locale& i_rLocale,
bool bInsertDefault = false
@@ -159,7 +159,7 @@ namespace psp
aLoc.Language = aLoc.Language.toAsciiLowerCase();
aLoc.Country = aLoc.Country.toAsciiUpperCase();
aLoc.Variant = aLoc.Variant.toAsciiUpperCase();
-
+
return aLoc;
}
@@ -193,7 +193,7 @@ namespace psp
m_aTranslations[ aK ][ aLoc ] = i_rTranslation;
}
}
-
+
rtl::OUString PPDTranslator::translateValue(
const rtl::OUString& i_rKey,
const rtl::OUString& i_rOption,
@@ -202,7 +202,7 @@ namespace psp
) const
{
rtl::OUString aResult;
-
+
rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 );
aKey.append( i_rKey );
if( i_rOption.getLength() || i_rValue.getLength() )
@@ -222,7 +222,7 @@ namespace psp
if( it != m_aTranslations.end() )
{
const translation_map& rMap( it->second );
-
+
com::sun::star::lang::Locale aLoc( normalizeInputLocale( i_rLocale, true ) );
for( int nTry = 0; nTry < 4; nTry++ )
{
@@ -264,15 +264,15 @@ class PPDDecompressStream
SvFileStream* mpFileStream;
SvMemoryStream* mpMemStream;
rtl::OUString maFileName;
-
+
// forbid copying
PPDDecompressStream( const PPDDecompressStream& );
PPDDecompressStream& operator=(const PPDDecompressStream& );
-
+
public:
PPDDecompressStream( const rtl::OUString& rFile );
~PPDDecompressStream();
-
+
bool IsOpen() const;
bool IsEof() const;
void ReadLine( ByteString& o_rLine);
@@ -299,7 +299,7 @@ void PPDDecompressStream::Open( const rtl::OUString& i_rFile )
mpFileStream = new SvFileStream( i_rFile, STREAM_READ );
maFileName = mpFileStream->GetFileName();
-
+
if( ! mpFileStream->IsOpen() )
{
Close();
@@ -309,7 +309,7 @@ void PPDDecompressStream::Open( const rtl::OUString& i_rFile )
ByteString aLine;
mpFileStream->ReadLine( aLine );
mpFileStream->Seek( 0 );
-
+
// check for compress'ed or gzip'ed file
ULONG nCompressMethod = 0;
if( aLine.Len() > 1 && static_cast<unsigned char>(aLine.GetChar( 0 )) == 0x1f )
@@ -369,7 +369,7 @@ static osl::FileBase::RC resolveLink( const rtl::OUString& i_rURL, rtl::OUString
{
osl::DirectoryItem aLinkItem;
osl::FileBase::RC aRet = osl::FileBase::E_None;
-
+
if( ( aRet = osl::DirectoryItem::get( i_rURL, aLinkItem ) ) == osl::FileBase::E_None )
{
osl::FileStatus aStatus( FileStatusMask_FileName | FileStatusMask_Type | FileStatusMask_LinkTargetURL );
@@ -418,17 +418,17 @@ void PPDParser::scanPPDDir( const String& rDir )
aURLBuf.append( rDir );
aURLBuf.append( sal_Unicode( '/' ) );
aURLBuf.append( aStatus.getFileName() );
-
+
rtl::OUString aFileURL, aFileName;
osl::FileStatus::Type eType = osl::FileStatus::Unknown;
-
+
if( resolveLink( aURLBuf.makeStringAndClear(), aFileURL, aFileName, eType ) == osl::FileBase::E_None )
{
if( eType == osl::FileStatus::Regular )
{
INetURLObject aPPDFile = aPPDDir;
aPPDFile.Append( aFileName );
-
+
// match extension
for( int nSuffix = 0; nSuffix < nSuffixes; nSuffix++ )
{
@@ -496,7 +496,7 @@ void PPDParser::getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers, bool
initPPDFiles();
o_rDrivers.clear();
-
+
std::hash_map< OUString, OUString, OUStringHash >::const_iterator it;
for( it = pAllPPDFiles->begin(); it != pAllPPDFiles->end(); ++it )
o_rDrivers.push_back( it->first );
@@ -510,7 +510,7 @@ String PPDParser::getPPDFile( const String& rFile )
if( ! aStream.IsOpen() )
{
std::hash_map< OUString, OUString, OUStringHash >::const_iterator it;
-
+
bool bRetry = true;
do
{
@@ -528,7 +528,7 @@ String PPDParser::getPPDFile( const String& rFile )
if( nLastIndex > 0 )
aBase = aBase.copy( 0, nLastIndex );
} while( it == pAllPPDFiles->end() && nLastIndex > 0 );
-
+
if( it == pAllPPDFiles->end() && bRetry )
{
// a new file ? rehash
@@ -538,7 +538,7 @@ String PPDParser::getPPDFile( const String& rFile )
// no new files occur and initPPDFiles is called only once
}
} while( ! pAllPPDFiles );
-
+
if( it != pAllPPDFiles->end() )
aStream.Open( it->second );
}
@@ -948,7 +948,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
// default values are parsed in pass 2
if( aKey.CompareTo( "Default", 7 ) == COMPARE_EQUAL )
continue;
-
+
bool bQuery = false;
if( aKey.GetChar( 0 ) == '?' )
{
@@ -976,7 +976,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
}
bIsGlobalizedLine = true;
}
-
+
String aOption;
nPos = aCurrentLine.Search( ':' );
if( nPos != STRING_NOTFOUND )
@@ -1000,7 +1000,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
int nTransPos = aLine.Search( '/' );
if( nTransPos != STRING_NOTFOUND )
aOptionTranslation = handleTranslation( aLine.Copy( nTransPos+1 ), bIsGlobalizedLine );
-
+
// read in more lines if necessary for multiline values
aLine = aCurrentLine.Copy( nPos+1 );
if( aLine.Len() )
@@ -1017,7 +1017,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
}
}
aLine = WhitespaceToSpace( aLine );
-
+
// #i100644# handle a missing value (actually a broken PPD)
if( ! aLine.Len() )
{
@@ -1064,7 +1064,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
eType = eString;
}
}
-
+
// handle globalized PPD entries
if( bIsGlobalizedLine )
{
@@ -1101,7 +1101,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
continue;
pValue->m_eType = eType;
pValue->m_aValue = aValue;
-
+
if( aOptionTranslation.getLength() )
m_pTranslator->insertOption( aUniKey, aOption, aOptionTranslation, aTransLocale );
if( aValueTranslation.getLength() )
@@ -1722,7 +1722,7 @@ const PPDValue* PPDKey::getValueCaseInsensitive( const String& rOption ) const
if( m_aOrderedValues[n]->m_aOption.EqualsIgnoreCaseAscii( rOption ) )
pValue = m_aOrderedValues[n];
}
-
+
return pValue;
}
diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx
index e1d499c40ca5..ded308b920e6 100644
--- a/vcl/unx/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,16 +69,16 @@ namespace psp
std::list< PrinterInfoManager::SystemPrintQueue >
m_aQueues;
OUString m_aCommand;
-
+
virtual void run();
-
+
public:
SystemQueueInfo();
~SystemQueueInfo();
-
+
bool hasChanged() const;
OUString getCommand() const;
-
+
// sets changed status to false; therefore not const
void getSystemQueues( std::list< PrinterInfoManager::SystemPrintQueue >& rQueues );
};
@@ -93,20 +93,20 @@ namespace psp
PrinterInfoManager& PrinterInfoManager::get()
{
static PrinterInfoManager* pManager = NULL;
-
+
if( ! pManager )
{
pManager = CUPSManager::tryLoadCUPS();
if( ! pManager )
pManager = new PrinterInfoManager();
-
+
if( pManager )
pManager->initialize();
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "PrinterInfoManager::get create Manager of type %d\n", pManager->getType() );
#endif
}
-
+
return *pManager;
}
@@ -187,7 +187,7 @@ bool PrinterInfoManager::checkPrintersChanged( bool bWait )
}
}
}
-
+
if( bWait && m_pQueueInfo )
{
#if OSL_DEBUG_LEVEL > 1
@@ -198,14 +198,14 @@ bool PrinterInfoManager::checkPrintersChanged( bool bWait )
fprintf( stderr, "done: syncing printer discovery thread\n" );
#endif
}
-
+
if( ! bChanged && m_pQueueInfo )
bChanged = m_pQueueInfo->hasChanged();
if( bChanged )
{
initialize();
}
-
+
return bChanged;
}
@@ -218,19 +218,19 @@ void PrinterInfoManager::initialize()
m_aPrinters.clear();
m_aWatchFiles.clear();
OUString aDefaultPrinter;
-
+
// first initialize the global defaults
// have to iterate over all possible files
// there should be only one global setup section in all
// available config files
m_aGlobalDefaults = PrinterInfo();
-
+
// need a parser for the PPDContext. generic printer should do.
m_aGlobalDefaults.m_pParser = PPDParser::getParser( String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) );
m_aGlobalDefaults.m_aContext.setParser( m_aGlobalDefaults.m_pParser );
m_aGlobalDefaults.m_bPerformFontSubstitution = true;
m_bDisableCUPS = false;
-
+
if( ! m_aGlobalDefaults.m_pParser )
{
#if OSL_DEBUG_LEVEL > 1
@@ -238,7 +238,7 @@ void PrinterInfoManager::initialize()
#endif
return;
}
-
+
std::list< OUString > aDirList;
psp::getPrinterPathList( aDirList, NULL );
std::list< OUString >::const_iterator print_dir_it;
@@ -253,15 +253,15 @@ void PrinterInfoManager::initialize()
fprintf( stderr, "found global defaults in %s\n", OUStringToOString( aFile.PathToFileName(), RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
#endif
aConfig.SetGroup( GLOBAL_DEFAULTS_GROUP );
-
+
ByteString aValue( aConfig.ReadKey( "Copies" ) );
if( aValue.Len() )
m_aGlobalDefaults.m_nCopies = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "Orientation" );
if( aValue.Len() )
m_aGlobalDefaults.m_eOrientation = aValue.EqualsIgnoreCaseAscii( "Landscape" ) ? orientation::Landscape : orientation::Portrait;
-
+
aValue = aConfig.ReadKey( "MarginAdjust" );
if( aValue.Len() )
{
@@ -270,19 +270,19 @@ void PrinterInfoManager::initialize()
m_aGlobalDefaults.m_nTopMarginAdjust = aValue.GetToken( 2, ',' ).ToInt32();
m_aGlobalDefaults.m_nBottomMarginAdjust = aValue.GetToken( 3, ',' ).ToInt32();
}
-
+
aValue = aConfig.ReadKey( "ColorDepth", "24" );
if( aValue.Len() )
m_aGlobalDefaults.m_nColorDepth = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "ColorDevice" );
if( aValue.Len() )
m_aGlobalDefaults.m_nColorDevice = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "PSLevel" );
if( aValue.Len() )
m_aGlobalDefaults.m_nPSLevel = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "PerformFontSubstitution" );
if( aValue.Len() )
{
@@ -291,7 +291,7 @@ void PrinterInfoManager::initialize()
else
m_aGlobalDefaults.m_bPerformFontSubstitution = false;
}
-
+
aValue = aConfig.ReadKey( "DisableCUPS" );
if( aValue.Len() )
{
@@ -300,7 +300,7 @@ void PrinterInfoManager::initialize()
else
m_bDisableCUPS = false;
}
-
+
// get the PPDContext of global JobData
for( int nKey = 0; nKey < aConfig.GetKeyCount(); nKey++ )
{
@@ -330,14 +330,14 @@ void PrinterInfoManager::initialize()
}
setDefaultPaper( m_aGlobalDefaults.m_aContext );
fillFontSubstitutions( m_aGlobalDefaults );
-
+
// now collect all available printers
for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it )
{
INetURLObject aDir( *print_dir_it, INET_PROT_FILE, INetURLObject::ENCODE_ALL );
INetURLObject aFile( aDir );
aFile.Append( String( RTL_CONSTASCII_USTRINGPARAM( PRINT_FILENAME ) ) );
-
+
// check directory validity
OUString aUniPath;
FileBase::getFileURLFromSystemPath( aDir.PathToFileName(), aUniPath );
@@ -345,12 +345,12 @@ void PrinterInfoManager::initialize()
if( aDirectory.open() )
continue;
aDirectory.close();
-
-
+
+
FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aUniPath );
FileStatus aStatus( FileStatusMask_ModifyTime );
DirectoryItem aItem;
-
+
// setup WatchFile list
WatchFile aWatchFile;
aWatchFile.m_aFilePath = aUniPath;
@@ -365,7 +365,7 @@ void PrinterInfoManager::initialize()
aWatchFile.m_aModified.Nanosec = 0;
}
m_aWatchFiles.push_back( aWatchFile );
-
+
Config aConfig( aFile.PathToFileName() );
for( int nGroup = 0; nGroup < aConfig.GetGroupCount(); nGroup++ )
{
@@ -374,12 +374,12 @@ void PrinterInfoManager::initialize()
if( aValue.Len() )
{
OUString aPrinterName;
-
+
int nNamePos = aValue.Search( '/' );
// check for valid value of "Printer"
if( nNamePos == STRING_NOTFOUND )
continue;
-
+
Printer aPrinter;
// initialize to global defaults
aPrinter.m_aInfo = m_aGlobalDefaults;
@@ -388,11 +388,11 @@ void PrinterInfoManager::initialize()
// newly created printers
aPrinter.m_aInfo.m_aFontSubstitutes.clear();
aPrinter.m_aInfo.m_aFontSubstitutions.clear();
-
+
aPrinterName = String( aValue.Copy( nNamePos+1 ), RTL_TEXTENCODING_UTF8 );
aPrinter.m_aInfo.m_aPrinterName = aPrinterName;
aPrinter.m_aInfo.m_aDriverName = String( aValue.Copy( 0, nNamePos ), RTL_TEXTENCODING_UTF8 );
-
+
// set parser, merge settings
// don't do this for CUPS printers as this is done
// by the CUPS system itself
@@ -401,11 +401,11 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_pParser = PPDParser::getParser( aPrinter.m_aInfo.m_aDriverName );
aPrinter.m_aInfo.m_aContext.setParser( aPrinter.m_aInfo.m_pParser );
// note: setParser also purges the context
-
+
// ignore this printer if its driver is not found
if( ! aPrinter.m_aInfo.m_pParser )
continue;
-
+
// merge the ppd context keys if the printer has the same keys and values
// this is a bit tricky, since it involves mixing two PPDs
// without constraints which might end up badly
@@ -430,7 +430,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
}
}
-
+
aValue = aConfig.ReadKey( "Command" );
// no printer without a command
if( ! aValue.Len() )
@@ -447,32 +447,32 @@ void PrinterInfoManager::initialize()
}
aPrinter.m_aInfo.m_aCommand = String( aValue, RTL_TEXTENCODING_UTF8 );
}
-
+
aValue = aConfig.ReadKey( "QuickCommand" );
aPrinter.m_aInfo.m_aQuickCommand = String( aValue, RTL_TEXTENCODING_UTF8 );
-
+
aValue = aConfig.ReadKey( "Features" );
aPrinter.m_aInfo.m_aFeatures = String( aValue, RTL_TEXTENCODING_UTF8 );
-
+
// override the settings in m_aGlobalDefaults if keys exist
aValue = aConfig.ReadKey( "DefaultPrinter" );
if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) )
aDefaultPrinter = aPrinterName;
-
+
aValue = aConfig.ReadKey( "Location" );
aPrinter.m_aInfo.m_aLocation = String( aValue, RTL_TEXTENCODING_UTF8 );
-
+
aValue = aConfig.ReadKey( "Comment" );
aPrinter.m_aInfo.m_aComment = String( aValue, RTL_TEXTENCODING_UTF8 );
-
+
aValue = aConfig.ReadKey( "Copies" );
if( aValue.Len() )
aPrinter.m_aInfo.m_nCopies = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "Orientation" );
if( aValue.Len() )
aPrinter.m_aInfo.m_eOrientation = aValue.EqualsIgnoreCaseAscii( "Landscape" ) ? orientation::Landscape : orientation::Portrait;
-
+
aValue = aConfig.ReadKey( "MarginAdjust" );
if( aValue.Len() )
{
@@ -481,25 +481,25 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_nTopMarginAdjust = aValue.GetToken( 2, ',' ).ToInt32();
aPrinter.m_aInfo.m_nBottomMarginAdjust = aValue.GetToken( 3, ',' ).ToInt32();
}
-
+
aValue = aConfig.ReadKey( "ColorDepth" );
if( aValue.Len() )
aPrinter.m_aInfo.m_nColorDepth = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "ColorDevice" );
if( aValue.Len() )
aPrinter.m_aInfo.m_nColorDevice = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "PSLevel" );
if( aValue.Len() )
aPrinter.m_aInfo.m_nPSLevel = aValue.ToInt32();
-
+
aValue = aConfig.ReadKey( "PerformFontSubstitution" );
if( ! aValue.Equals( "0" ) && ! aValue.EqualsIgnoreCaseAscii( "false" ) )
aPrinter.m_aInfo.m_bPerformFontSubstitution = true;
else
aPrinter.m_aInfo.m_bPerformFontSubstitution = false;
-
+
// now iterate over all keys to extract multi key information:
// 1. PPDContext information
// 2. Font substitution table
@@ -524,10 +524,10 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aFontSubstitutes[ OStringToOUString( aKey.Copy( 10 ), RTL_TEXTENCODING_ISO_8859_1 ) ] = OStringToOUString( aValue, RTL_TEXTENCODING_ISO_8859_1 );
}
}
-
+
setDefaultPaper( aPrinter.m_aInfo.m_aContext );
fillFontSubstitutions( aPrinter.m_aInfo );
-
+
// finally insert printer
FileBase::getFileURLFromSystemPath( aFile.PathToFileName(), aPrinter.m_aFile );
aPrinter.m_bModified = false;
@@ -543,7 +543,7 @@ void PrinterInfoManager::initialize()
}
}
}
-
+
// set default printer
if( m_aPrinters.size() )
{
@@ -553,23 +553,23 @@ void PrinterInfoManager::initialize()
else
aDefaultPrinter = OUString();
m_aDefaultPrinter = aDefaultPrinter;
-
+
if( m_eType != Default )
return;
-
+
// add a default printer for every available print queue
// merge paper and font substitution from default printer,
// all else from global defaults
PrinterInfo aMergeInfo( m_aGlobalDefaults );
aMergeInfo.m_aDriverName = String( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) );
aMergeInfo.m_aFeatures = String( RTL_CONSTASCII_USTRINGPARAM( "autoqueue" ) );
-
+
if( m_aDefaultPrinter.getLength() )
{
PrinterInfo aDefaultInfo( getPrinterInfo( m_aDefaultPrinter ) );
aMergeInfo.m_bPerformFontSubstitution = aDefaultInfo.m_bPerformFontSubstitution;
fillFontSubstitutions( aMergeInfo );
-
+
const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey );
@@ -577,23 +577,23 @@ void PrinterInfoManager::initialize()
if( pMergeKey && pMergeValue )
aMergeInfo.m_aContext.setValue( pMergeKey, pMergeValue );
}
-
+
getSystemPrintQueues();
for( ::std::list< SystemPrintQueue >::iterator it = m_aSystemPrintQueues.begin(); it != m_aSystemPrintQueues.end(); ++it )
{
String aPrinterName( RTL_CONSTASCII_USTRINGPARAM( "<" ) );
aPrinterName += String( it->m_aQueue );
aPrinterName.Append( '>' );
-
+
if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() )
// probably user made this one permanent in padmin
continue;
-
+
String aCmd( m_aSystemPrintCommand );
aCmd.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) ), it->m_aQueue );
-
+
Printer aPrinter;
-
+
// initialize to merged defaults
aPrinter.m_aInfo = aMergeInfo;
aPrinter.m_aInfo.m_aPrinterName = aPrinterName;
@@ -602,7 +602,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aLocation = it->m_aLocation;
aPrinter.m_bModified = false;
aPrinter.m_aGroup = ByteString( aPrinterName, aEncoding ); //provide group name in case user makes this one permanent in padmin
-
+
m_aPrinters[ aPrinterName ] = aPrinter;
}
}
@@ -623,9 +623,9 @@ const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter
{
static PrinterInfo aEmptyInfo;
::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter );
-
+
DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistant printers" );
-
+
return it != m_aPrinters.end() ? it->second.m_aInfo : aEmptyInfo;
}
@@ -634,9 +634,9 @@ const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter
void PrinterInfoManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo& rNewInfo )
{
::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinter );
-
+
DBG_ASSERT( it != m_aPrinters.end(), "Do not change nonexistant printers" );
-
+
if( it != m_aPrinters.end() )
{
it->second.m_aInfo = rNewInfo;
@@ -667,7 +667,7 @@ bool PrinterInfoManager::writePrinterConfig()
::std::hash_map< OUString, Config*, OUStringHash > files;
::std::hash_map< OUString, int, OUStringHash > rofiles;
::std::hash_map< OUString, Config*, OUStringHash >::iterator file_it;
-
+
for( ::std::list< WatchFile >::const_iterator wit = m_aWatchFiles.begin(); wit != m_aWatchFiles.end(); ++wit )
{
if( checkWriteability( wit->m_aFilePath ) )
@@ -676,21 +676,21 @@ bool PrinterInfoManager::writePrinterConfig()
break;
}
}
-
+
if( files.empty() )
return false;
-
+
Config* pGlobal = files.begin()->second;
pGlobal->SetGroup( GLOBAL_DEFAULTS_GROUP );
pGlobal->WriteKey( "DisableCUPS", m_bDisableCUPS ? "true" : "false" );
-
+
::std::hash_map< OUString, Printer, OUStringHash >::iterator it;
for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it )
{
if( ! it->second.m_bModified )
// printer was not changed, do nothing
continue;
-
+
// don't save autoqueue printers
sal_Int32 nIndex = 0;
bool bAutoQueue = false;
@@ -702,7 +702,7 @@ bool PrinterInfoManager::writePrinterConfig()
}
if( bAutoQueue )
continue;
-
+
if( it->second.m_aFile.getLength() )
{
// check if file is writable
@@ -735,16 +735,16 @@ bool PrinterInfoManager::writePrinterConfig()
}
else // a new printer, write it to the first file available
it->second.m_aFile = files.begin()->first;
-
+
if( ! it->second.m_aGroup.getLength() ) // probably a new printer
it->second.m_aGroup = OString( it->first.getStr(), it->first.getLength(), RTL_TEXTENCODING_UTF8 );
-
+
if( files.find( it->second.m_aFile ) != files.end() )
{
Config* pConfig = files[ it->second.m_aFile ];
pConfig->DeleteGroup( it->second.m_aGroup ); // else some old keys may remain
pConfig->SetGroup( it->second.m_aGroup );
-
+
ByteString aValue( String( it->second.m_aInfo.m_aDriverName ), RTL_TEXTENCODING_UTF8 );
aValue += '/';
aValue += ByteString( String( it->first ), RTL_TEXTENCODING_UTF8 );
@@ -768,7 +768,7 @@ bool PrinterInfoManager::writePrinterConfig()
aValue += ',';
aValue += ByteString::CreateFromInt32( it->second.m_aInfo.m_nBottomMarginAdjust );
pConfig->WriteKey( "MarginAdjust", aValue );
-
+
if( it->second.m_aInfo.m_aDriverName.compareToAscii( "CUPS:", 5 ) != 0 )
{
// write PPDContext (not for CUPS)
@@ -777,13 +777,13 @@ bool PrinterInfoManager::writePrinterConfig()
const PPDKey* pKey = it->second.m_aInfo.m_aContext.getModifiedKey( i );
ByteString aKey( "PPD_" );
aKey += ByteString( pKey->getKey(), RTL_TEXTENCODING_ISO_8859_1 );
-
+
const PPDValue* pValue = it->second.m_aInfo.m_aContext.getValue( pKey );
aValue = pValue ? ByteString( pValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1 ) : ByteString( "*nil" );
pConfig->WriteKey( aKey, aValue );
}
}
-
+
// write font substitution table
pConfig->WriteKey( "PerformFontSubstitution", it->second.m_aInfo.m_bPerformFontSubstitution ? "true" : "false" );
for( ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst = it->second.m_aInfo.m_aFontSubstitutes.begin();
@@ -795,11 +795,11 @@ bool PrinterInfoManager::writePrinterConfig()
}
}
}
-
+
// get rid of Config objects. this also writes any changes
for( file_it = files.begin(); file_it != files.end(); ++file_it )
delete file_it->second;
-
+
return true;
}
@@ -808,7 +808,7 @@ bool PrinterInfoManager::writePrinterConfig()
bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUString& rDriverName )
{
bool bSuccess = false;
-
+
const PPDParser* pParser = NULL;
if( m_aPrinters.find( rPrinterName ) == m_aPrinters.end() && ( pParser = PPDParser::getParser( rDriverName ) ) )
{
@@ -819,7 +819,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
aPrinter.m_aInfo.m_pParser = pParser;
aPrinter.m_aInfo.m_aContext.setParser( pParser );
aPrinter.m_aInfo.m_aPrinterName = rPrinterName;
-
+
fillFontSubstitutions( aPrinter.m_aInfo );
// merge PPD values with global defaults
for( int nPPDValueModified = 0; nPPDValueModified < m_aGlobalDefaults.m_aContext.countValuesModified(); nPPDValueModified++ )
@@ -841,7 +841,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
}
}
-
+
m_aPrinters[ rPrinterName ] = aPrinter;
bSuccess = true;
#if OSL_DEBUG_LEVEL > 1
@@ -864,15 +864,15 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
bool PrinterInfoManager::removePrinter( const OUString& rPrinterName, bool bCheckOnly )
{
bool bSuccess = true;
-
+
::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName );
if( it != m_aPrinters.end() )
{
if( it->second.m_aFile.getLength() )
{
// this printer already exists in a config file
-
-
+
+
// check writeability of config file(s)
if( ! checkWriteability( it->second.m_aFile ) )
bSuccess = false;
@@ -887,7 +887,7 @@ bool PrinterInfoManager::removePrinter( const OUString& rPrinterName, bool bChec
}
if( bSuccess && ! bCheckOnly )
{
-
+
Config aConfig( it->second.m_aFile );
aConfig.DeleteGroup( it->second.m_aGroup );
aConfig.Flush();
@@ -918,7 +918,7 @@ bool PrinterInfoManager::removePrinter( const OUString& rPrinterName, bool bChec
bool PrinterInfoManager::setDefaultPrinter( const OUString& rPrinterName )
{
bool bSuccess = false;
-
+
::std::hash_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinterName );
if( it != m_aPrinters.end() )
{
@@ -944,21 +944,21 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const
{
PrintFontManager& rFontManager( PrintFontManager::get() );
rInfo.m_aFontSubstitutions.clear();
-
+
if( ! rInfo.m_bPerformFontSubstitution ||
! rInfo.m_aFontSubstitutes.size() )
return;
-
+
::std::list< FastPrintFontInfo > aFonts;
::std::hash_map< OUString, ::std::list< FastPrintFontInfo >, OUStringHash > aPrinterFonts;
rFontManager.getFontListWithFastInfo( aFonts, rInfo.m_pParser );
-
+
// get builtin fonts
::std::list< FastPrintFontInfo >::const_iterator it;
for( it = aFonts.begin(); it != aFonts.end(); ++it )
if( it->m_eType == fonttype::Builtin )
aPrinterFonts[ it->m_aFamilyName.toAsciiLowerCase() ].push_back( *it );
-
+
// map lower case, so build a local copy of the font substitutions
::std::hash_map< OUString, OUString, OUStringHash > aSubstitutions;
::std::hash_map< OUString, OUString, OUStringHash >::const_iterator subst;
@@ -972,8 +972,8 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const
else
aSubstitutions[ aFamily ] = subst->second.toAsciiLowerCase();
}
-
-
+
+
// now find substitutions
for( it = aFonts.begin(); it != aFonts.end(); ++it )
{
@@ -994,15 +994,15 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const
int nDiff;
if( builtin->m_eItalic == it->m_eItalic )
nMatch += 8000;
-
+
nDiff = builtin->m_eWeight - it->m_eWeight;
nDiff = nDiff < 0 ? -nDiff : nDiff;
nMatch += 4000 - 1000*nDiff;
-
+
nDiff = builtin->m_eWidth - it->m_eWidth;
nDiff = nDiff < 0 ? -nDiff : nDiff;
nMatch += 2000 - 500*nDiff;
-
+
if( nMatch > nLastMatch )
{
nLastMatch = nMatch;
@@ -1022,7 +1022,7 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const
it->m_eItalic == italic::Upright ? "r" : it->m_eItalic == italic::Oblique ? "o" : it->m_eItalic == italic::Italic ? "i" : "u",
it->m_eWeight,
it->m_eWidth,
-
+
OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
aInfo.m_eItalic == italic::Upright ? "r" : aInfo.m_eItalic == italic::Oblique ? "o" : aInfo.m_eItalic == italic::Italic ? "i" : "u",
aInfo.m_eWeight,
@@ -1045,7 +1045,7 @@ void PrinterInfoManager::getSystemPrintCommands( std::list< OUString >& rCommand
m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
delete m_pQueueInfo, m_pQueueInfo = NULL;
}
-
+
std::list< SystemPrintQueue >::const_iterator it;
rCommands.clear();
String aPrinterConst( RTL_CONSTASCII_USTRINGPARAM( "(PRINTER)" ) );
@@ -1065,7 +1065,7 @@ const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::get
m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
delete m_pQueueInfo, m_pQueueInfo = NULL;
}
-
+
return m_aSystemPrintQueues;
}
@@ -1091,7 +1091,7 @@ FILE* PrinterInfoManager::startSpool( const OUString& rPrintername, bool bQuickC
rPrinterInfo.m_aQuickCommand : rPrinterInfo.m_aCommand;
rtl::OString aShellCommand = OUStringToOString (rCommand, RTL_TEXTENCODING_ISO_8859_1);
aShellCommand += rtl::OString( " 2>/dev/null" );
-
+
return popen (aShellCommand.getStr(), "w");
}
@@ -1115,16 +1115,16 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
{
if( ! rContext.getParser() )
return;
-
+
const PPDKey* pPageSizeKey = rContext.getParser()->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
if( ! pPageSizeKey )
return;
-
+
int nModified = rContext.countValuesModified();
while( nModified-- &&
rContext.getModifiedKey( nModified ) != pPageSizeKey )
;
-
+
if( nModified >= 0 ) // paper was set already, do not modify
{
#if OSL_DEBUG_LEVEL > 1
@@ -1133,7 +1133,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
#endif
return;
}
-
+
// paper not set, fill in default value
const PPDValue* pPaperVal = NULL;
int nValues = pPageSizeKey->countValues();
@@ -1205,7 +1205,7 @@ struct SystemCommandParameters
tokenHandler pHandler;
};
-#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD))
+#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD))
static void lpgetSysQueueTokenHandler(
const std::list< rtl::OString >& i_rLines,
std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues,
@@ -1216,10 +1216,10 @@ static void lpgetSysQueueTokenHandler(
std::hash_set< OUString, OUStringHash > aOnlySet;
aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_all" ) ) );
aUniqueSet.insert( OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
-
+
// the eventual "all" attribute of the "_all" queue tells us, which
// printers are to be used for this user at all
-
+
// find _all: line
rtl::OString aAllLine( "_all:" );
rtl::OString aAllAttr( "all=" );
@@ -1249,7 +1249,7 @@ static void lpgetSysQueueTokenHandler(
break;
}
}
-
+
bool bInsertAttribute = false;
rtl::OString aDescrStr( "description=" );
rtl::OString aLocStr( "location=" );
@@ -1318,7 +1318,7 @@ static void standardSysQueueTokenHandler(
it != i_rLines.end(); ++it )
{
sal_Int32 nPos = 0;
-
+
// search for a line describing a printer:
// find if there are enough tokens before the name
for( unsigned int i = 0; i < i_pParms->nForeTokenCount && nPos != -1; i++ )
@@ -1350,7 +1350,7 @@ static void standardSysQueueTokenHandler(
static const struct SystemCommandParameters aParms[] =
{
- #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD)
+ #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD)
{ "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
{ "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
{ "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler }
@@ -1367,7 +1367,7 @@ void SystemQueueInfo::run()
char pBuffer[1024];
FILE *pPipe;
std::list< rtl::OString > aLines;
-
+
/* Discover which command we can use to get a list of all printer queues */
for( unsigned int i = 0; i < sizeof(aParms)/sizeof(aParms[0]); i++ )
{
@@ -1377,7 +1377,7 @@ void SystemQueueInfo::run()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "trying print queue command \"%s\" ... ", aParms[i].pQueueCommand );
#endif
- aCmdLine.append( " 2>/dev/null" );
+ aCmdLine.append( " 2>/dev/null" );
if( (pPipe = popen( aCmdLine.getStr(), "r" )) )
{
while( fgets( pBuffer, 1024, pPipe ) )
@@ -1399,6 +1399,6 @@ void SystemQueueInfo::run()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "failed\n" );
#endif
- }
+ }
}
diff --git a/vcl/unx/source/printergfx/bitmap_gfx.cxx b/vcl/unx/source/printergfx/bitmap_gfx.cxx
index 1421fb7433f7..3e3ffd748bee 100644
--- a/vcl/unx/source/printergfx/bitmap_gfx.cxx
+++ b/vcl/unx/source/printergfx/bitmap_gfx.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ const sal_uInt32 nLineLength = 80;
const sal_uInt32 nBufferSize = 16384;
/*
- *
+ *
* Bitmap compression / Hex encoding / Ascii85 Encoding
*
*/
@@ -49,7 +49,7 @@ PrinterBmp::~PrinterBmp ()
/* virtual base class */
-class ByteEncoder
+class ByteEncoder
{
private:
@@ -97,7 +97,7 @@ HexEncoder::~HexEncoder ()
WritePS (mpFile, "\n");
}
-void
+void
HexEncoder::WriteAscii (sal_uInt8 nByte)
{
sal_uInt32 nOff = psp::getHexValueOf (nByte, mpFileBuffer + mnOffset);
@@ -113,10 +113,10 @@ HexEncoder::WriteAscii (sal_uInt8 nByte)
FlushLine ();
}
-void
+void
HexEncoder::EncodeByte (sal_uInt8 nByte)
{
- WriteAscii (nByte);
+ WriteAscii (nByte);
}
void
@@ -129,7 +129,7 @@ HexEncoder::FlushLine ()
}
}
-/* Ascii85 encoder, is abi compatible with HexEncoder but writes a ~> to
+/* Ascii85 encoder, is abi compatible with HexEncoder but writes a ~> to
indicate end of data EOD */
class Ascii85Encoder : public ByteEncoder
@@ -218,7 +218,7 @@ Ascii85Encoder::ConvertToAscii85 ()
{
sal_uInt32 nEolOff = mnColumn - nLineLength;
sal_uInt32 nBufOff = mnOffset - nEolOff;
-
+
std::memmove (mpFileBuffer + nBufOff + 1, mpFileBuffer + nBufOff, nEolOff);
mpFileBuffer[ nBufOff ] = '\n';
@@ -302,7 +302,7 @@ public:
LZWEncoder (osl::File* pOutputFile);
~LZWEncoder ();
-
+
virtual void EncodeByte (sal_uInt8 nByte);
};
@@ -344,7 +344,7 @@ LZWEncoder::~LZWEncoder()
delete[] mpTable;
}
-void
+void
LZWEncoder::WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen)
{
mdwShift |= (nCode << (mnOffset - nCodeLen));
@@ -359,7 +359,7 @@ LZWEncoder::WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen)
WriteAscii ((sal_uInt8)(mdwShift >> 24));
}
-void
+void
LZWEncoder::EncodeByte (sal_uInt8 nByte )
{
LZWCTreeNode* p;
@@ -421,7 +421,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte )
*/
void
-PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
+PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
const PrinterBmp& rBitmap)
{
double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth();
@@ -444,7 +444,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
// image to save diskspace. This is important for printing transparent
// bitmaps that are disassembled into small pieces
sal_Int32 nImageSz = rSrc.GetWidth() * rSrc.GetHeight();
- sal_Int32 nPaletteSz = rBitmap.GetPaletteEntryCount();
+ sal_Int32 nPaletteSz = rBitmap.GetPaletteEntryCount();
if ((nImageSz < nPaletteSz) || (nImageSz < 24) )
DrawPS2TrueColorImage (rBitmap, rSrc);
else
@@ -455,7 +455,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
{
DrawPS2TrueColorImage (rBitmap, rSrc);
}
- else
+ else
{
DrawPS2GrayImage (rBitmap, rSrc);
}
@@ -470,7 +470,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
/* XXX does not work XXX */
void
-PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
+PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
const PrinterBmp& /*rBitmap*/, const PrinterBmp& /*rTransBitmap*/)
{
double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth();
@@ -478,13 +478,13 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
PSGSave ();
PSTranslate (rDest.BottomLeft());
- PSScale (fScaleX, fScaleY);
+ PSScale (fScaleX, fScaleY);
PSGRestore ();
}
/* XXX does not work XXX */
void
-PrinterGfx::DrawMask (const Rectangle& rDest, const Rectangle& rSrc,
+PrinterGfx::DrawMask (const Rectangle& rDest, const Rectangle& rSrc,
const PrinterBmp &/*rBitmap*/, PrinterColor& /*rMaskColor*/)
{
double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth();
@@ -492,7 +492,7 @@ PrinterGfx::DrawMask (const Rectangle& rDest, const Rectangle& rSrc,
PSGSave ();
PSTranslate (rDest.BottomLeft());
- PSScale (fScaleX, fScaleY);
+ PSScale (fScaleX, fScaleY);
PSGRestore ();
}
@@ -538,7 +538,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
}
}
- delete pEncoder;
+ delete pEncoder;
WritePS (mpPageBody, "\n");
}
@@ -549,7 +549,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
*
*/
-void
+void
PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType)
{
sal_Int32 nChar = 0;
@@ -593,7 +593,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
WritePS (mpPageBody, "/DeviceRGB setcolorspace\n");
break;
- case psp::MonochromeImage:
+ case psp::MonochromeImage:
case psp::PaletteImage:
{
@@ -610,7 +610,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
nChar += psp::appendStr ("\npsp_ascii85string\n", pImage + nChar);
WritePS (mpPageBody, pImage);
- ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
+ ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody);
for (sal_uInt32 i = 0; i < nSize; i++)
{
@@ -621,7 +621,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
pEncoder->EncodeByte (aColor.GetBlue());
}
delete pEncoder;
-
+
WritePS (mpPageBody, "pop ] setcolorspace\n");
}
break;
@@ -633,9 +633,9 @@ void
PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
{
writePS2Colorspace(rBitmap, psp::GrayScaleImage);
- writePS2ImageHeader(rArea, psp::GrayScaleImage);
+ writePS2ImageHeader(rArea, psp::GrayScaleImage);
- ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
+ ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody);
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
@@ -656,20 +656,20 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
writePS2Colorspace(rBitmap, psp::MonochromeImage);
writePS2ImageHeader(rArea, psp::MonochromeImage);
- ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
+ ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody);
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
long nBitPos = 0;
- sal_uChar nBit = 0;
+ sal_uChar nBit = 0;
sal_uChar nByte = 0;
for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
nBit = rBitmap.GetPixelIdx (nRow, nColumn);
nByte |= nBit << (7 - nBitPos);
-
+
if (++nBitPos == 8)
{
pEncoder->EncodeByte (nByte);
@@ -691,7 +691,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr
writePS2Colorspace(rBitmap, psp::PaletteImage);
writePS2ImageHeader(rArea, psp::PaletteImage);
- ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
+ ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody);
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
@@ -712,7 +712,7 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& r
writePS2Colorspace(rBitmap, psp::TrueColorImage);
writePS2ImageHeader(rArea, psp::TrueColorImage);
- ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
+ ByteEncoder* pEncoder = mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody);
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
diff --git a/vcl/unx/source/printergfx/common_gfx.cxx b/vcl/unx/source/printergfx/common_gfx.cxx
index 6bb31acfcbbe..f6c38d66ba11 100644
--- a/vcl/unx/source/printergfx/common_gfx.cxx
+++ b/vcl/unx/source/printergfx/common_gfx.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@
using namespace psp ;
-static const sal_Int32 nMaxTextColumn = 80;
+static const sal_Int32 nMaxTextColumn = 80;
GraphicsStatus::GraphicsStatus() :
mbArtItalic( false ),
@@ -66,7 +66,7 @@ PrinterGfx::Init (PrinterJob &rPrinterJob)
mnDepth = rPrinterJob.GetDepth ();
mnPSLevel = rPrinterJob.GetPostscriptLevel ();
mbColor = rPrinterJob.IsColorPrinter ();
-
+
mnDpi = rPrinterJob.GetResolution();
rPrinterJob.GetScale (mfScaleX, mfScaleY);
const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rPrinterJob.GetPrinterName() ) );
@@ -101,7 +101,7 @@ PrinterGfx::Init (const JobData& rData)
else
mpFontSubstitutes = NULL;
mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False;
-
+
return sal_True;
}
@@ -118,7 +118,7 @@ PrinterGfx::GetBitCount ()
return mnDepth;
}
-PrinterGfx::PrinterGfx() :
+PrinterGfx::PrinterGfx() :
mpPageHeader (NULL),
mpPageBody (NULL),
mnFontID (0),
@@ -216,7 +216,7 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
nextit = it;
++nextit;
std::list< Point > leftside, rightside;
-
+
Rectangle aLastRect( *it );
leftside.push_back( Point( it->Left(), it->Top() ) );
rightside.push_back( Point( it->Right()+1, it->Top() ) );
@@ -226,7 +226,7 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
++tempit;
if( nextit->Top() == aLastRect.Bottom()+1 )
{
- if(
+ if(
( nextit->Left() >= aLastRect.Left() && nextit->Left() <= aLastRect.Right() ) // left endpoint touches last rectangle
||
( nextit->Right() >= aLastRect.Left() && nextit->Right() <= aLastRect.Right() ) // right endpoint touches last rectangle
@@ -389,7 +389,7 @@ PrinterGfx::DrawLine (const Point& rFrom, const Point& rTo)
PSSetColor (maLineColor);
PSSetColor ();
PSSetLineWidth ();
-
+
PSMoveTo (rFrom);
PSLineTo (rTo);
WritePS (mpPageBody, "stroke\n" );
@@ -422,9 +422,9 @@ PrinterGfx::DrawPolyLine (sal_uInt32 nPoints, const Point* pPath)
PSSetLineWidth ();
PSBinCurrentPath (nPoints, pPath);
-
+
WritePS (mpPageBody, "stroke\n" );
- }
+ }
}
void
@@ -437,7 +437,7 @@ PrinterGfx::DrawPolygon (sal_uInt32 nPoints, const Point* pPath)
// setup closed path
Point aPoint( 0, 0 );
sal_Int32 nColumn( 0 );
-
+
PSBinStartPath();
PSBinMoveTo( pPath[0], aPoint, nColumn );
for( unsigned int n = 1; n < nPoints; n++ )
@@ -486,7 +486,7 @@ PrinterGfx::DrawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32* pSizes, const P
{
Point aPoint( 0, 0 );
sal_Int32 nColumn( 0 );
-
+
PSBinStartPath();
PSBinMoveTo( pPaths[i][0], aPoint, nColumn );
for( unsigned int n = 1; n < pSizes[i]; n++ )
@@ -531,7 +531,7 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BY
{
const sal_uInt32 nBezString = 1024;
sal_Char pString[nBezString];
-
+
if ( nPoints > 1 && maLineColor.Is() && pPath )
{
PSSetColor (maLineColor);
@@ -540,8 +540,8 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BY
snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y());
WritePS(mpPageBody, pString);
-
- // Handle the drawing of mixed lines mixed with curves
+
+ // Handle the drawing of mixed lines mixed with curves
// - a normal point followed by a normal point is a line
// - a normal point followed by 2 control points and a normal point is a curve
for (unsigned int i=1; i<nPoints;)
@@ -553,14 +553,14 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BY
}
else //Otherwise we're drawing a spline
{
- if (i+2 >= nPoints)
+ if (i+2 >= nPoints)
return; //Error: wrong sequence of contol/normal points somehow
if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) &&
(pFlgAry[i+2] != POLY_CONTROL))
{
snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n",
- pPath[i].X(), pPath[i].Y(),
- pPath[i+1].X(), pPath[i+1].Y(),
+ pPath[i].X(), pPath[i].Y(),
+ pPath[i+1].X(), pPath[i+1].Y(),
pPath[i+2].X(), pPath[i+2].Y());
}
else
@@ -585,10 +585,10 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYT
// premature end of operation
if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is()))
return;
-
+
snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y());
WritePS(mpPageBody, pString); //Move to the starting point for the PolyPoygon
- for (unsigned int i=1; i < nPoints;)
+ for (unsigned int i=1; i < nPoints;)
{
if (pFlgAry[i] != POLY_CONTROL)
{
@@ -598,14 +598,14 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYT
}
else
{
- if (i+2 >= nPoints)
+ if (i+2 >= nPoints)
return; //Error: wrong sequence of contol/normal points somehow
if ((pFlgAry[i] == POLY_CONTROL) && (pFlgAry[i+1] == POLY_CONTROL) &&
(pFlgAry[i+2] != POLY_CONTROL))
{
snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n",
- pPath[i].X(), pPath[i].Y(),
- pPath[i+1].X(), pPath[i+1].Y(),
+ pPath[i].X(), pPath[i].Y(),
+ pPath[i+1].X(), pPath[i+1].Y(),
pPath[i+2].X(), pPath[i+2].Y());
WritePS(mpPageBody, pString);
}
@@ -630,7 +630,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYT
// restore the current path
if( maFillColor.Is() && maLineColor.Is())
- PSGRestore();
+ PSGRestore();
}
void
@@ -640,15 +640,15 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
sal_Char pString[nBezString];
if ( !nPoly || !pPtAry || !pPoints || !(maFillColor.Is() || maLineColor.Is()))
return;
-
-
+
+
for (unsigned int i=0; i<nPoly;i++)
{
sal_uInt32 nPoints = pPoints[i];
// #112689# sanity check
if( nPoints == 0 || pPtAry[i] == NULL )
continue;
-
+
snprintf(pString, nBezString, "%li %li moveto\n", pPtAry[i][0].X(), pPtAry[i][0].Y()); //Move to the starting point
WritePS(mpPageBody, pString);
for (unsigned int j=1; j < nPoints;)
@@ -668,8 +668,8 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
if ((pFlgAry[i][j] == POLY_CONTROL) && (pFlgAry[i][j+1] == POLY_CONTROL) && (pFlgAry[i][j+2] != POLY_CONTROL))
{
snprintf(pString, nBezString, "%li %li %li %li %li %li curveto\n",
- pPtAry[i][j].X(), pPtAry[i][j].Y(),
- pPtAry[i][j+1].X(), pPtAry[i][j+1].Y(),
+ pPtAry[i][j].X(), pPtAry[i][j].Y(),
+ pPtAry[i][j+1].X(), pPtAry[i][j+1].Y(),
pPtAry[i][j+2].X(), pPtAry[i][j+2].Y());
WritePS(mpPageBody, pString);
}
@@ -681,7 +681,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
}
}
}
-
+
// if fill and stroke, save the current path
if( maFillColor.Is() && maLineColor.Is())
PSGSave();
@@ -695,7 +695,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
// restore the current path
if( maFillColor.Is() && maLineColor.Is())
- PSGRestore();
+ PSGRestore();
}
@@ -750,14 +750,14 @@ PrinterGfx::PSSetColor ()
sal_Int32 nChar = 0;
if( mbColor )
- {
- nChar = psp::getValueOfDouble (pBuffer,
+ {
+ nChar = psp::getValueOfDouble (pBuffer,
(double)rColor.GetRed() / 255.0, 5);
nChar += psp::appendStr (" ", pBuffer + nChar);
- nChar += psp::getValueOfDouble (pBuffer + nChar,
- (double)rColor.GetGreen() / 255.0, 5);
+ nChar += psp::getValueOfDouble (pBuffer + nChar,
+ (double)rColor.GetGreen() / 255.0, 5);
nChar += psp::appendStr (" ", pBuffer + nChar);
- nChar += psp::getValueOfDouble (pBuffer + nChar,
+ nChar += psp::getValueOfDouble (pBuffer + nChar,
(double)rColor.GetBlue() / 255.0, 5);
nChar += psp::appendStr (" setrgbcolor\n", pBuffer + nChar );
}
@@ -777,53 +777,53 @@ void
PrinterGfx::PSSetFont ()
{
GraphicsStatus& rCurrent( currentState() );
- if( maVirtualStatus.maFont != rCurrent.maFont ||
- maVirtualStatus.mnTextHeight != rCurrent.mnTextHeight ||
- maVirtualStatus.maEncoding != rCurrent.maEncoding ||
- maVirtualStatus.mnTextWidth != rCurrent.mnTextWidth ||
- maVirtualStatus.mbArtBold != rCurrent.mbArtBold ||
- maVirtualStatus.mbArtItalic != rCurrent.mbArtItalic
+ if( maVirtualStatus.maFont != rCurrent.maFont ||
+ maVirtualStatus.mnTextHeight != rCurrent.mnTextHeight ||
+ maVirtualStatus.maEncoding != rCurrent.maEncoding ||
+ maVirtualStatus.mnTextWidth != rCurrent.mnTextWidth ||
+ maVirtualStatus.mbArtBold != rCurrent.mbArtBold ||
+ maVirtualStatus.mbArtItalic != rCurrent.mbArtItalic
)
{
rCurrent.maFont = maVirtualStatus.maFont;
rCurrent.maEncoding = maVirtualStatus.maEncoding;
rCurrent.mnTextWidth = maVirtualStatus.mnTextWidth;
rCurrent.mnTextHeight = maVirtualStatus.mnTextHeight;
- rCurrent.mbArtItalic = maVirtualStatus.mbArtItalic;
- rCurrent.mbArtBold = maVirtualStatus.mbArtBold;
+ rCurrent.mbArtItalic = maVirtualStatus.mbArtItalic;
+ rCurrent.mbArtBold = maVirtualStatus.mbArtBold;
sal_Int32 nTextHeight = rCurrent.mnTextHeight;
- sal_Int32 nTextWidth = rCurrent.mnTextWidth ? rCurrent.mnTextWidth
+ sal_Int32 nTextWidth = rCurrent.mnTextWidth ? rCurrent.mnTextWidth
: rCurrent.mnTextHeight;
-
+
sal_Char pSetFont [256];
sal_Int32 nChar = 0;
- // postscript based fonts need reencoding
- if ( ( rCurrent.maEncoding == RTL_TEXTENCODING_MS_1252)
+ // postscript based fonts need reencoding
+ if ( ( rCurrent.maEncoding == RTL_TEXTENCODING_MS_1252)
|| ( rCurrent.maEncoding == RTL_TEXTENCODING_ISO_8859_1)
- || ( rCurrent.maEncoding >= RTL_TEXTENCODING_USER_START
+ || ( rCurrent.maEncoding >= RTL_TEXTENCODING_USER_START
&& rCurrent.maEncoding <= RTL_TEXTENCODING_USER_END)
)
{
- rtl::OString aReencodedFont =
- psp::GlyphSet::GetReencodedFontName (rCurrent.maEncoding,
+ rtl::OString aReencodedFont =
+ psp::GlyphSet::GetReencodedFontName (rCurrent.maEncoding,
rCurrent.maFont);
- nChar += psp::appendStr ("(", pSetFont + nChar);
- nChar += psp::appendStr (aReencodedFont.getStr(),
+ nChar += psp::appendStr ("(", pSetFont + nChar);
+ nChar += psp::appendStr (aReencodedFont.getStr(),
pSetFont + nChar);
nChar += psp::appendStr (") cvn findfont ",
- pSetFont + nChar);
+ pSetFont + nChar);
}
else
// tt based fonts mustn't reencode, the encoding is implied by the fontname
// same for symbol type1 fonts, dont try to touch them
{
- nChar += psp::appendStr ("(", pSetFont + nChar);
- nChar += psp::appendStr (rCurrent.maFont.getStr(),
+ nChar += psp::appendStr ("(", pSetFont + nChar);
+ nChar += psp::appendStr (rCurrent.maFont.getStr(),
pSetFont + nChar);
- nChar += psp::appendStr (") cvn findfont ",
+ nChar += psp::appendStr (") cvn findfont ",
pSetFont + nChar);
}
@@ -836,13 +836,13 @@ PrinterGfx::PSSetFont ()
}
else // skew 15 degrees to right
{
- nChar += psp::appendStr ( " [", pSetFont + nChar);
- nChar += psp::getValueOf (nTextWidth, pSetFont + nChar);
+ nChar += psp::appendStr ( " [", pSetFont + nChar);
+ nChar += psp::getValueOf (nTextWidth, pSetFont + nChar);
nChar += psp::appendStr (" 0 ", pSetFont + nChar);
nChar += psp::getValueOfDouble (pSetFont + nChar, 0.27*(double)nTextWidth, 3 );
- nChar += psp::appendStr ( " ", pSetFont + nChar);
+ nChar += psp::appendStr ( " ", pSetFont + nChar);
nChar += psp::getValueOf (-nTextHeight, pSetFont + nChar);
-
+
nChar += psp::appendStr (" 0 0] makefont setfont\n", pSetFont + nChar);
}
@@ -939,7 +939,7 @@ PrinterGfx::PSBinMoveTo (const Point& rCurrent, Point& rOld, sal_Int32& nColumn)
#else
PSBinPath (rCurrent, rOld, moveto, nColumn);
#endif
-}
+}
void
PrinterGfx::PSBinStartPath ()
@@ -976,7 +976,7 @@ PrinterGfx::PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath)
}
void
-PrinterGfx::PSBinPath (const Point& rCurrent, Point& rOld,
+PrinterGfx::PSBinPath (const Point& rCurrent, Point& rOld,
pspath_t eType, sal_Int32& nColumn)
{
sal_Char pPath[48];
@@ -988,7 +988,7 @@ PrinterGfx::PSBinPath (const Point& rCurrent, Point& rOld,
sal_Int32 nYPrec = getAlignedHexValueOf (rCurrent.Y() - rOld.Y(), pPath + 1 + nXPrec);
pPath [ 1 + nXPrec + nYPrec ] = 0;
- // build the command, it is a char with bit represention 000cxxyy
+ // build the command, it is a char with bit represention 000cxxyy
// c represents the char, xx and yy repr. the field width of the dx and dy shift,
// dx and dy represent the number of bytes to read after the opcode
sal_Char cCmd = (eType == lineto ? (sal_Char)0x00 : (sal_Char)0x10);
@@ -1011,8 +1011,8 @@ PrinterGfx::PSBinPath (const Point& rCurrent, Point& rOld,
cCmd += 'A';
pPath[0] = cCmd;
- // write the command to file,
- // line breaking at column nMaxTextColumn (80)
+ // write the command to file,
+ // line breaking at column nMaxTextColumn (80)
nChar = 1 + nXPrec + nYPrec;
if ((nColumn + nChar) > nMaxTextColumn)
{
@@ -1077,9 +1077,9 @@ PrinterGfx::PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries)
{
sal_Char pPSArray [128];
sal_Int32 nChar = 0;
-
+
nChar = psp::appendStr ("[", pPSArray + nChar);
- nChar += psp::getValueOf (pArray[0], pPSArray + nChar);
+ nChar += psp::getValueOf (pArray[0], pPSArray + nChar);
for (int i = 1; i < nEntries; i++)
{
@@ -1091,7 +1091,7 @@ PrinterGfx::PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries)
}
nChar += psp::appendStr (" ", pPSArray + nChar);
- nChar += psp::getValueOf (pArray[i] - pArray[i-1], pPSArray + nChar);
+ nChar += psp::getValueOf (pArray[i] - pArray[i-1], pPSArray + nChar);
}
nChar += psp::appendStr (" 0]\n", pPSArray + nChar);
@@ -1129,7 +1129,7 @@ PrinterGfx::PSShowText (const sal_uChar* pStr, sal_Int16 nGlyphs, sal_Int16 nByt
if (pDeltaArray == NULL)
{
PSHexString (pStr, nBytes);
-
+
if( maVirtualStatus.mbArtBold )
{
WritePS( mpPageBody, pBuffer );
@@ -1151,7 +1151,7 @@ PrinterGfx::PSShowText (const sal_uChar* pStr, sal_Int16 nGlyphs, sal_Int16 nByt
WritePS (mpPageBody, "xshow\n");
}
- // restore the user coordinate system
+ // restore the user coordinate system
if (mnTextAngle != 0)
PSGRestore ();
}
diff --git a/vcl/unx/source/printergfx/glyphset.cxx b/vcl/unx/source/printergfx/glyphset.cxx
index 8885a6b42c1e..4423bf36eef2 100644
--- a/vcl/unx/source/printergfx/glyphset.cxx
+++ b/vcl/unx/source/printergfx/glyphset.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,27 +52,27 @@ using namespace vcl;
using namespace psp;
using namespace rtl;
-GlyphSet::GlyphSet ()
+GlyphSet::GlyphSet ()
: mnFontID (-1),
mbVertical (0),
mbUseFontEncoding (false)
{}
-GlyphSet::GlyphSet (sal_Int32 nFontID, sal_Bool bVertical)
+GlyphSet::GlyphSet (sal_Int32 nFontID, sal_Bool bVertical)
: mnFontID (nFontID),
mbVertical (bVertical)
{
PrintFontManager &rMgr = PrintFontManager::get();
- meBaseType = rMgr.getFontType (mnFontID);
- maBaseName = OUStringToOString (rMgr.getPSName(mnFontID),
+ meBaseType = rMgr.getFontType (mnFontID);
+ maBaseName = OUStringToOString (rMgr.getPSName(mnFontID),
RTL_TEXTENCODING_ASCII_US);
- mnBaseEncoding = rMgr.getFontEncoding(mnFontID);
- mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID);
+ mnBaseEncoding = rMgr.getFontEncoding(mnFontID);
+ mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID);
}
GlyphSet::~GlyphSet ()
{
- /* FIXME delete the glyphlist ??? */
+ /* FIXME delete the glyphlist ??? */
}
sal_Int32
@@ -98,29 +98,29 @@ GlyphSet::SetFont (sal_Int32 nFontID, sal_Bool bVertical)
{
if (mnFontID != -1)
return sal_False;
-
+
mnFontID = nFontID;
mbVertical = bVertical;
PrintFontManager &rMgr = PrintFontManager::get();
meBaseType = rMgr.getFontType (mnFontID);
- maBaseName = OUStringToOString (rMgr.getPSName(mnFontID),
+ maBaseName = OUStringToOString (rMgr.getPSName(mnFontID),
RTL_TEXTENCODING_ASCII_US);
mnBaseEncoding = rMgr.getFontEncoding(mnFontID);
- mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID);
+ mbUseFontEncoding = rMgr.getUseOnlyFontEncoding(mnFontID);
return sal_True;
}
sal_Bool
GlyphSet::GetCharID (
- sal_Unicode nChar,
+ sal_Unicode nChar,
sal_uChar* nOutGlyphID,
sal_Int32* nOutGlyphSetID
)
{
return LookupCharID (nChar, nOutGlyphID, nOutGlyphSetID)
- || AddCharID (nChar, nOutGlyphID, nOutGlyphSetID);
+ || AddCharID (nChar, nOutGlyphID, nOutGlyphSetID);
}
sal_Bool
@@ -132,22 +132,22 @@ GlyphSet::GetGlyphID (
)
{
return LookupGlyphID (nGlyph, nOutGlyphID, nOutGlyphSetID)
- || AddGlyphID (nGlyph, nUnicode, nOutGlyphID, nOutGlyphSetID);
+ || AddGlyphID (nGlyph, nUnicode, nOutGlyphID, nOutGlyphSetID);
}
sal_Bool
GlyphSet::LookupCharID (
- sal_Unicode nChar,
+ sal_Unicode nChar,
sal_uChar* nOutGlyphID,
sal_Int32* nOutGlyphSetID
)
{
char_list_t::iterator aGlyphSet;
- sal_Int32 nGlyphSetID;
+ sal_Int32 nGlyphSetID;
// loop thru all the font subsets
- for (aGlyphSet = maCharList.begin(), nGlyphSetID = 1;
- aGlyphSet != maCharList.end();
+ for (aGlyphSet = maCharList.begin(), nGlyphSetID = 1;
+ aGlyphSet != maCharList.end();
++aGlyphSet, nGlyphSetID++)
{
// check every subset if it contains the queried unicode char
@@ -168,17 +168,17 @@ GlyphSet::LookupCharID (
sal_Bool
GlyphSet::LookupGlyphID (
- sal_uInt32 nGlyph,
+ sal_uInt32 nGlyph,
sal_uChar* nOutGlyphID,
sal_Int32* nOutGlyphSetID
)
{
glyph_list_t::iterator aGlyphSet;
- sal_Int32 nGlyphSetID;
+ sal_Int32 nGlyphSetID;
// loop thru all the font subsets
- for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1;
- aGlyphSet != maGlyphList.end();
+ for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1;
+ aGlyphSet != maGlyphList.end();
++aGlyphSet, nGlyphSetID++)
{
// check every subset if it contains the queried unicode char
@@ -200,9 +200,9 @@ GlyphSet::LookupGlyphID (
sal_uChar
GlyphSet::GetAnsiMapping (sal_Unicode nUnicodeChar)
{
- static rtl_UnicodeToTextConverter aConverter =
+ static rtl_UnicodeToTextConverter aConverter =
rtl_createUnicodeToTextConverter(RTL_TEXTENCODING_MS_1252);
- static rtl_UnicodeToTextContext aContext =
+ static rtl_UnicodeToTextContext aContext =
rtl_createUnicodeToTextContext( aConverter );
sal_Char nAnsiChar;
@@ -211,8 +211,8 @@ GlyphSet::GetAnsiMapping (sal_Unicode nUnicodeChar)
const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR;
- sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext,
- &nUnicodeChar, 1, &nAnsiChar, 1,
+ sal_Size nSize = rtl_convertUnicodeToText( aConverter, aContext,
+ &nUnicodeChar, 1, &nAnsiChar, 1,
nCvtFlags, &nCvtInfo, &nCvtChars );
return nSize == 1 ? (sal_uChar)nAnsiChar : (sal_uChar)0;
@@ -244,12 +244,12 @@ GlyphSet::AddNotdef (glyph_map_t &rGlyphMap)
}
sal_Bool
GlyphSet::AddCharID (
- sal_Unicode nChar,
+ sal_Unicode nChar,
sal_uChar* nOutGlyphID,
sal_Int32* nOutGlyphSetID
)
{
- sal_uChar nMappedChar;
+ sal_uChar nMappedChar;
// XXX important: avoid to reencode type1 symbol fonts
if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL)
@@ -272,15 +272,15 @@ GlyphSet::AddCharID (
char_map_t aMap;
maCharList.push_back (aMap);
}
-
+
// insert a new glyph in the font subset
if (nMappedChar)
{
// always put iso1252 chars into the first map, map them on itself
char_map_t& aGlyphSet = maCharList.front();
AddNotdef (aGlyphSet);
-
- aGlyphSet [nChar] = nMappedChar;
+
+ aGlyphSet [nChar] = nMappedChar;
*nOutGlyphSetID = 1;
*nOutGlyphID = nMappedChar;
}
@@ -296,7 +296,7 @@ GlyphSet::AddCharID (
*nOutGlyphSetID = maCharList.size();
*nOutGlyphID = aGlyphSet [nChar];
}
-
+
return sal_True;
}
@@ -308,7 +308,7 @@ GlyphSet::AddGlyphID (
sal_Int32* nOutGlyphSetID
)
{
- sal_uChar nMappedChar;
+ sal_uChar nMappedChar;
// XXX important: avoid to reencode type1 symbol fonts
if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL)
@@ -331,15 +331,15 @@ GlyphSet::AddGlyphID (
glyph_map_t aMap;
maGlyphList.push_back (aMap);
}
-
+
// insert a new glyph in the font subset
if (nMappedChar)
{
// always put iso1252 chars into the first map, map them on itself
glyph_map_t& aGlyphSet = maGlyphList.front();
AddNotdef (aGlyphSet);
-
- aGlyphSet [nGlyph] = nMappedChar;
+
+ aGlyphSet [nGlyph] = nMappedChar;
*nOutGlyphSetID = 1;
*nOutGlyphID = nMappedChar;
}
@@ -355,7 +355,7 @@ GlyphSet::AddGlyphID (
*nOutGlyphSetID = maGlyphList.size();
*nOutGlyphID = aGlyphSet [nGlyph];
}
-
+
return sal_True;
}
@@ -410,7 +410,7 @@ GlyphSet::GetGlyphSetEncoding (sal_Int32 nGlyphSetID)
if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL)
return RTL_TEXTENCODING_SYMBOL;
else
- return nGlyphSetID == 1 ? RTL_TEXTENCODING_MS_1252
+ return nGlyphSetID == 1 ? RTL_TEXTENCODING_MS_1252
: RTL_TEXTENCODING_USER_START + nGlyphSetID;
}
}
@@ -426,8 +426,8 @@ GlyphSet::GetGlyphSetEncodingName (rtl_TextEncoding nEnc, const OString &rFontNa
else
if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END)
{
- return rFontName
- + OString("Enc")
+ return rFontName
+ + OString("Enc")
+ OString::valueOf ((sal_Int32)(nEnc - RTL_TEXTENCODING_USER_START));
}
else
@@ -451,17 +451,17 @@ GlyphSet::PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID)
sal_Char pEncodingVector [256];
sal_Int32 nSize = 0;
-
+
nSize += psp::appendStr ("(", pEncodingVector + nSize);
- nSize += psp::appendStr (GetReencodedFontName(nGlyphSetID),
+ nSize += psp::appendStr (GetReencodedFontName(nGlyphSetID),
pEncodingVector + nSize);
nSize += psp::appendStr (") cvn (", pEncodingVector + nSize);
- nSize += psp::appendStr (maBaseName.getStr(),
+ nSize += psp::appendStr (maBaseName.getStr(),
pEncodingVector + nSize);
nSize += psp::appendStr (") cvn ", pEncodingVector + nSize);
- nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID),
+ nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID),
pEncodingVector + nSize);
- nSize += psp::appendStr (" psp_definefont\n",
+ nSize += psp::appendStr (" psp_definefont\n",
pEncodingVector + nSize);
psp::WritePS (pOutFile, pEncodingVector);
@@ -473,14 +473,14 @@ GlyphSet::GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName)
if ( nEnc == RTL_TEXTENCODING_MS_1252
|| nEnc == RTL_TEXTENCODING_ISO_8859_1)
{
- return rFontName
+ return rFontName
+ OString("-iso1252");
}
else
if (nEnc >= RTL_TEXTENCODING_USER_START && nEnc <= RTL_TEXTENCODING_USER_END)
{
- return rFontName
- + OString("-enc")
+ return rFontName
+ + OString("-enc")
+ OString::valueOf ((sal_Int32)(nEnc - RTL_TEXTENCODING_USER_START));
}
else
@@ -511,14 +511,14 @@ void GlyphSet::DrawGlyphs(
for (int nChar = 0; nChar < nLen; nChar++)
{
GetGlyphID (pGlyphIds[nChar], pUnicodes[nChar], pGlyphID + nChar, pGlyphSetID + nChar);
- aGlyphSet.insert (pGlyphSetID[nChar]);
+ aGlyphSet.insert (pGlyphSetID[nChar]);
}
// loop over all glyph sets to detect substrings that can be xshown together
// without changing the postscript font
sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32));
sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar));
-
+
std::set< sal_Int32 >::iterator aSet;
for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet)
{
@@ -527,13 +527,13 @@ void GlyphSet::DrawGlyphs(
sal_Int32 nGlyphs = 0;
sal_Int32 nChar;
- // get offset to first glyph
+ // get offset to first glyph
for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++)
{
nOffset = pDeltaArray [nChar];
}
-
- // loop over all chars to extract those that share the current glyph set
+
+ // loop over all chars to extract those that share the current glyph set
for (nChar = 0; nChar < nLen; nChar++)
{
if (pGlyphSetID[nChar] == *aSet)
@@ -562,14 +562,14 @@ void GlyphSet::DrawGlyphs(
rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet));
rGfx.PSMoveTo (aPoint);
rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL);
- }
+ }
}
void
-GlyphSet::DrawText (PrinterGfx &rGfx, const Point& rPoint,
+GlyphSet::DrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray)
{
- // dispatch to the impl method
+ // dispatch to the impl method
if (pDeltaArray == NULL)
ImplDrawText (rGfx, rPoint, pStr, nLen);
else
@@ -577,7 +577,7 @@ GlyphSet::DrawText (PrinterGfx &rGfx, const Point& rPoint,
}
void
-GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
+GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen)
{
rGfx.PSMoveTo (rPoint);
@@ -594,11 +594,11 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
int nChar;
sal_uChar *pGlyphID = (sal_uChar*)alloca (nLen * sizeof(sal_uChar));
sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32));
-
+
// convert unicode to glyph id and char set (font subset)
for (nChar = 0; nChar < nLen; nChar++)
GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar);
-
+
// loop over the string to draw subsequent pieces of chars
// with the same postscript font
for (nChar = 0; nChar < nLen; /* atend */)
@@ -612,18 +612,18 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
else
break;
}
-
+
// show the text using the PrinterGfx text api
OString aGlyphSetName(GetCharSetName(nGlyphSetID));
rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(nGlyphSetID));
rGfx.PSShowText (pGlyphID + nChar, nGlyphs, nGlyphs);
-
- nChar += nGlyphs;
+
+ nChar += nGlyphs;
}
}
void
-GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
+GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray)
{
if( mbUseFontEncoding )
@@ -644,14 +644,14 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
for (int nChar = 0; nChar < nLen; nChar++)
{
GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar);
- aGlyphSet.insert (pGlyphSetID[nChar]);
+ aGlyphSet.insert (pGlyphSetID[nChar]);
}
// loop over all glyph sets to detect substrings that can be xshown together
// without changing the postscript font
sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32));
sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar));
-
+
std::set< sal_Int32 >::iterator aSet;
for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet)
{
@@ -660,13 +660,13 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
sal_Int32 nGlyphs = 0;
sal_Int32 nChar;
- // get offset to first glyph
+ // get offset to first glyph
for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++)
{
nOffset = pDeltaArray [nChar];
}
-
- // loop over all chars to extract those that share the current glyph set
+
+ // loop over all chars to extract those that share the current glyph set
for (nChar = 0; nChar < nLen; nChar++)
{
if (pGlyphSetID[nChar] == *aSet)
@@ -695,7 +695,7 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet));
rGfx.PSMoveTo (aPoint);
rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL);
- }
+ }
}
sal_Bool
@@ -717,7 +717,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
++nGlyphSetID;
if (nGlyphSetID == 1) // latin1 page uses global reencoding table
- {
+ {
PSDefineReencodedFont (pOutFile, nGlyphSetID);
continue;
}
@@ -730,13 +730,13 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
sal_Char pEncodingVector [256];
sal_Int32 nSize = 0;
-
- nSize += psp::appendStr ("/",
- pEncodingVector + nSize);
- nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID),
- pEncodingVector + nSize);
- nSize += psp::appendStr (" [ ",
+
+ nSize += psp::appendStr ("/",
+ pEncodingVector + nSize);
+ nSize += psp::appendStr (GetGlyphSetEncodingName(nGlyphSetID),
pEncodingVector + nSize);
+ nSize += psp::appendStr (" [ ",
+ pEncodingVector + nSize);
// need a list of glyphs, sorted by glyphid
typedef std::map< sal_uInt8, sal_Unicode > ps_mapping_t;
@@ -744,21 +744,21 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
ps_mapping_t aSortedGlyphSet;
char_map_t::const_iterator aUnsortedGlyph;
- for (aUnsortedGlyph = (*aGlyphSet).begin();
- aUnsortedGlyph != (*aGlyphSet).end();
+ for (aUnsortedGlyph = (*aGlyphSet).begin();
+ aUnsortedGlyph != (*aGlyphSet).end();
++aUnsortedGlyph)
{
- aSortedGlyphSet.insert(ps_value_t((*aUnsortedGlyph).second,
+ aSortedGlyphSet.insert(ps_value_t((*aUnsortedGlyph).second,
(*aUnsortedGlyph).first));
}
-
+
ps_mapping_t::const_iterator aSortedGlyph;
// loop thru all the glyphs in the subset
- for (aSortedGlyph = (aSortedGlyphSet).begin();
- aSortedGlyph != (aSortedGlyphSet).end();
+ for (aSortedGlyph = (aSortedGlyphSet).begin();
+ aSortedGlyph != (aSortedGlyphSet).end();
++aSortedGlyph)
{
- nSize += psp::appendStr ("/",
+ nSize += psp::appendStr ("/",
pEncodingVector + nSize);
std::list< OString > aName( rMgr.getAdobeNameFromUnicode((*aSortedGlyph).second) );
@@ -776,7 +776,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
nSize = 0;
}
}
-
+
nSize += psp::appendStr ("] def\n", pEncodingVector + nSize);
psp::WritePS (pOutFile, pEncodingVector);
@@ -790,13 +790,13 @@ struct EncEntry
{
sal_uChar aEnc;
long aGID;
-
+
EncEntry() : aEnc( 0 ), aGID( 0 ) {}
-
+
bool operator<( const EncEntry& rRight ) const
{ return aEnc < rRight.aEnc; }
};
-
+
static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile,
const char* pGlyphSetName, int nGlyphCount,
/*const*/ sal_uInt16* pRequestedGlyphs, /*const*/ sal_uChar* pEncoding,
@@ -807,16 +807,16 @@ static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile,
int nTargetMask = FontSubsetInfo::TYPE1_PFA | FontSubsetInfo::TYPE3_FONT;
if( bAllowType42 )
nTargetMask |= FontSubsetInfo::TYPE42_FONT;
-
+
std::vector< EncEntry > aSorted( nGlyphCount, EncEntry() );
for( int i = 0; i < nGlyphCount; i++ )
{
aSorted[i].aEnc = pEncoding[i];
aSorted[i].aGID = pRequestedGlyphs[i];
}
-
+
std::stable_sort( aSorted.begin(), aSorted.end() );
-
+
std::vector< sal_uChar > aEncoding( nGlyphCount );
std::vector< long > aRequestedGlyphs( nGlyphCount );
@@ -825,7 +825,7 @@ static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile,
aEncoding[i] = aSorted[i].aEnc;
aRequestedGlyphs[i] = aSorted[i].aGID;
}
-
+
FontSubsetInfo aInfo;
aInfo.LoadFont( pSrcFont );
@@ -840,7 +840,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
if (meBaseType != fonttype::TrueType)
return sal_False;
- TrueTypeFont *pTTFont;
+ TrueTypeFont *pTTFont;
OString aTTFileName (rGfx.GetFontMgr().getFontFileSysPath(mnFontID));
int nFace = rGfx.GetFontMgr().getFontFaceNumber(mnFontID);
sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace < 0 ? 0 : nFace, &pTTFont);
@@ -862,8 +862,8 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
// loop thru all the font subsets
sal_Int32 nCharSetID;
char_list_t::iterator aCharSet;
- for (aCharSet = maCharList.begin(), nCharSetID = 1;
- aCharSet != maCharList.end();
+ for (aCharSet = maCharList.begin(), nCharSetID = 1;
+ aCharSet != maCharList.end();
++aCharSet, nCharSetID++)
{
if ((*aCharSet).size() == 0)
@@ -876,9 +876,9 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
{
pUChars [n] = (*aChar).first;
pEncoding [n] = (*aChar).second;
- n++;
+ n++;
}
- // create a mapping from the unicode chars to the char encoding in
+ // create a mapping from the unicode chars to the char encoding in
// source TrueType font
MapString (pTTFont, pUChars, (*aCharSet).size(), pTTGlyphMapping, mbVertical);
@@ -894,7 +894,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
// loop thru all the font glyph subsets
sal_Int32 nGlyphSetID;
glyph_list_t::iterator aGlyphSet;
- for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1;
+ for (aGlyphSet = maGlyphList.begin(), nGlyphSetID = 1;
aGlyphSet != maGlyphList.end();
++aGlyphSet, nGlyphSetID++)
{
@@ -907,8 +907,8 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
for (aGlyph = (*aGlyphSet).begin(); aGlyph != (*aGlyphSet).end(); aGlyph++)
{
pTTGlyphMapping [n] = (*aGlyph).first;
- pEncoding [n] = (*aGlyph).second;
- n++;
+ pEncoding [n] = (*aGlyph).second;
+ n++;
}
// create the current subset
@@ -920,7 +920,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
rSuppliedFonts.push_back( aGlyphSetName );
}
- // copy the file into the page header
+ // copy the file into the page header
rewind(pTmpFile);
fflush(pTmpFile);
diff --git a/vcl/unx/source/printergfx/glyphset.hxx b/vcl/unx/source/printergfx/glyphset.hxx
index 320e8e071955..c43151e44aeb 100644
--- a/vcl/unx/source/printergfx/glyphset.hxx
+++ b/vcl/unx/source/printergfx/glyphset.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,42 +48,42 @@ class GlyphSet
{
private:
- sal_Int32 mnFontID;
- sal_Bool mbVertical;
- rtl::OString maBaseName;
+ sal_Int32 mnFontID;
+ sal_Bool mbVertical;
+ rtl::OString maBaseName;
fonttype::type meBaseType;
rtl_TextEncoding mnBaseEncoding;
- bool mbUseFontEncoding;
+ bool mbUseFontEncoding;
typedef std::hash_map< sal_Unicode, sal_uInt8 > char_map_t;
typedef std::list< char_map_t > char_list_t;
typedef std::hash_map< sal_uInt32, sal_uInt8 > glyph_map_t;
typedef std::list< glyph_map_t > glyph_list_t;
- char_list_t maCharList;
- glyph_list_t maGlyphList;
+ char_list_t maCharList;
+ glyph_list_t maGlyphList;
- rtl::OString GetGlyphSetName (sal_Int32 nGlyphSetID);
- rtl::OString GetCharSetName (sal_Int32 nGlyphSetID);
+ rtl::OString GetGlyphSetName (sal_Int32 nGlyphSetID);
+ rtl::OString GetCharSetName (sal_Int32 nGlyphSetID);
sal_Int32 GetGlyphSetEncoding (sal_Int32 nGlyphSetID);
rtl::OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID);
rtl::OString GetReencodedFontName (sal_Int32 nGlyphSetID);
- void PSDefineReencodedFont (osl::File* pOutFile,
+ void PSDefineReencodedFont (osl::File* pOutFile,
sal_Int32 nGlyphSetID);
- sal_Bool GetCharID (sal_Unicode nChar,
+ sal_Bool GetCharID (sal_Unicode nChar,
sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID);
- sal_Bool LookupCharID (sal_Unicode nChar,
+ sal_Bool LookupCharID (sal_Unicode nChar,
sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID);
- sal_Bool AddCharID (sal_Unicode nChar,
+ sal_Bool AddCharID (sal_Unicode nChar,
sal_uChar* nOutGlyphID,
sal_Int32* nOutGlyphSetID);
- sal_Bool GetGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
+ sal_Bool GetGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID);
- sal_Bool LookupGlyphID (sal_uInt32 nGlyph,
+ sal_Bool LookupGlyphID (sal_uInt32 nGlyph,
sal_uChar* nOutGlyphID, sal_Int32* nOutGlyphSetID);
- sal_Bool AddGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
+ sal_Bool AddGlyphID (sal_uInt32 nGlyph, sal_Unicode nUnicode,
sal_uChar* nOutGlyphID,
sal_Int32* nOutGlyphSetID);
void AddNotdef (char_map_t &rCharMap);
@@ -91,9 +91,9 @@ private:
sal_uChar GetAnsiMapping (sal_Unicode nUnicodeChar);
sal_uChar GetSymbolMapping (sal_Unicode nUnicodeChar);
- void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
+ void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen);
- void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
+ void ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen,
const sal_Int32* pDeltaArray);
@@ -103,29 +103,29 @@ public:
GlyphSet (sal_Int32 nFontID, sal_Bool bVertical);
~GlyphSet ();
- sal_Int32 GetFontID ();
+ sal_Int32 GetFontID ();
fonttype::type GetFontType ();
- static rtl::OString
- GetReencodedFontName (rtl_TextEncoding nEnc,
+ static rtl::OString
+ GetReencodedFontName (rtl_TextEncoding nEnc,
const rtl::OString &rFontName);
static rtl::OString
- GetGlyphSetEncodingName (rtl_TextEncoding nEnc,
+ GetGlyphSetEncodingName (rtl_TextEncoding nEnc,
const rtl::OString &rFontName);
- sal_Bool IsVertical ();
-
- sal_Bool SetFont (sal_Int32 nFontID, sal_Bool bVertical);
+ sal_Bool IsVertical ();
- void DrawText (PrinterGfx &rGfx, const Point& rPoint,
+ sal_Bool SetFont (sal_Int32 nFontID, sal_Bool bVertical);
+
+ void DrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen,
const sal_Int32* pDeltaArray = NULL);
- void DrawGlyphs (PrinterGfx& rGfx,
+ void DrawGlyphs (PrinterGfx& rGfx,
const Point& rPoint,
const sal_uInt32* pGlyphIds,
const sal_Unicode* pUnicodes,
sal_Int16 nLen,
const sal_Int32* pDeltaArray );
sal_Bool PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx);
- sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< rtl::OString >& rSuppliedFonts );
+ sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< rtl::OString >& rSuppliedFonts );
};
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index 5e18849b8dfe..06caf7654a96 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,11 +61,11 @@ using namespace rtl;
#define nBLOCKSIZE 0x2000
-namespace psp
+namespace psp
{
sal_Bool
-AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer,
+AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer,
sal_uInt32 nBlockSize = nBLOCKSIZE)
{
if ((pDst == NULL) || (pSrc == NULL))
@@ -90,7 +90,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer,
return sal_True;
}
-
+
} // namespace psp
/*
@@ -118,7 +118,7 @@ PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rE
return NULL;
}
- pFile->setAttributes (aFileURL,
+ pFile->setAttributes (aFileURL,
osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead);
return pFile;
}
@@ -144,7 +144,7 @@ PrinterJob::GetDepth () const
}
sal_uInt16
-PrinterJob::GetPostscriptLevel (const JobData *pJobData) const
+PrinterJob::GetPostscriptLevel (const JobData *pJobData) const
{
sal_uInt16 nPSLevel = 2;
@@ -153,7 +153,7 @@ PrinterJob::GetPostscriptLevel (const JobData *pJobData) const
if( pJobData->m_nPSLevel )
nPSLevel = pJobData->m_nPSLevel;
- else
+ else
if( pJobData->m_pParser )
nPSLevel = pJobData->m_pParser->getLanguageLevel();
@@ -199,7 +199,7 @@ PrinterJob::GetCurrentPageBody ()
/*
* public methods of PrinterJob: the actual job / spool handling
- */
+ */
PrinterJob::PrinterJob () :
mpJobHeader( NULL ),
@@ -211,7 +211,7 @@ PrinterJob::PrinterJob () :
namespace psp
{
-/* check whether the given name points to a directory which is
+/* check whether the given name points to a directory which is
usable for the user */
sal_Bool
existsTmpDir (const char* pName)
@@ -225,14 +225,14 @@ existsTmpDir (const char* pName)
if (! S_ISDIR(aFileStatus.st_mode))
return sal_False;
- return access(pName, W_OK | R_OK) == 0 ? sal_True : sal_False;
+ return access(pName, W_OK | R_OK) == 0 ? sal_True : sal_False;
}
/* return the username in the given buffer */
sal_Bool
getUserName (char* pName, int nSize)
{
- struct passwd *pPWEntry;
+ struct passwd *pPWEntry;
struct passwd aPWEntry;
sal_Char pPWBuffer[256];
@@ -252,7 +252,7 @@ getUserName (char* pName, int nSize)
{
memcpy (pName, pPWEntry->pw_name, nLen);
pName[nLen] = '\0';
-
+
bSuccess = sal_True;
}
}
@@ -276,12 +276,12 @@ removeSpoolDir (const rtl::OUString& rSpoolDir)
OSL_ENSURE( 0, "psprint: couldn't remove spool directory" );
return;
}
- rtl::OString aSysPathByte =
+ rtl::OString aSysPathByte =
rtl::OUStringToOString (aSysPath, osl_getThreadTextEncoding());
sal_Char pSystem [128];
sal_Int32 nChar = 0;
- nChar = psp::appendStr ("rm -rf ", pSystem);
+ nChar = psp::appendStr ("rm -rf ", pSystem);
nChar += psp::appendStr (aSysPathByte.getStr(), pSystem + nChar);
if (system (pSystem) == -1)
@@ -296,10 +296,10 @@ createSpoolDir ()
TimeValue aCur;
osl_getSystemTime( &aCur );
sal_Int32 nRand = aCur.Seconds ^ (aCur.Nanosec/1000);
-
+
rtl::OUString aTmpDir;
osl_getTempDirURL( &aTmpDir.pData );
-
+
do
{
rtl::OUStringBuffer aDir( aTmpDir.getLength() + 16 );
@@ -377,7 +377,7 @@ PrinterJob::StartJob (
const rtl::OUString& rFileName,
int nMode,
const rtl::OUString& rJobName,
- const rtl::OUString& rAppName,
+ const rtl::OUString& rAppName,
const JobData& rSetupData,
PrinterGfx* pGraphics,
bool bIsQuickJob
@@ -407,11 +407,11 @@ PrinterJob::StartJob (
"%%BoundingBox: (atend)\n" );
rtl::OUString aFilterWS;
-
+
// Creator (this application)
aFilterWS = WhitespaceToSpace( rAppName, FALSE );
- WritePS (mpJobHeader, "%%Creator: (");
- WritePS (mpJobHeader, aFilterWS);
+ WritePS (mpJobHeader, "%%Creator: (");
+ WritePS (mpJobHeader, aFilterWS);
WritePS (mpJobHeader, ")\n");
// For (user name)
@@ -458,11 +458,11 @@ PrinterJob::StartJob (
if( ! isAscii( aTitle ) )
aTitle = rtl::OUString();
}
-
+
maJobTitle = aFilterWS;
if( aTitle.getLength() )
{
- WritePS (mpJobHeader, "%%Title: (");
+ WritePS (mpJobHeader, "%%Title: (");
WritePS (mpJobHeader, aTitle);
WritePS (mpJobHeader, ")\n");
}
@@ -520,7 +520,7 @@ PrinterJob::EndJob ()
WritePS (mpJobTrailer, aTrailer.getStr());
/*
- * spool the set of files to their final destination, this is U**X dependent
+ * spool the set of files to their final destination, this is U**X dependent
*/
FILE* pDestFILE = NULL;
@@ -529,7 +529,7 @@ PrinterJob::EndJob ()
sal_Bool bSpoolToFile = maFileName.getLength() > 0 ? sal_True : sal_False;
if (bSpoolToFile)
{
- const rtl::OString aFileName = rtl::OUStringToOString (maFileName,
+ const rtl::OString aFileName = rtl::OUStringToOString (maFileName,
osl_getThreadTextEncoding());
if( mnFileMode )
{
@@ -545,7 +545,7 @@ PrinterJob::EndJob ()
}
}
else
- chmod( aFileName.getStr(), mnFileMode );
+ chmod( aFileName.getStr(), mnFileMode );
}
if (pDestFILE == NULL)
pDestFILE = fopen (aFileName.getStr(), "w");
@@ -572,7 +572,7 @@ PrinterJob::EndJob ()
std::list< osl::File* >::iterator pPageBody;
std::list< osl::File* >::iterator pPageHead;
for (pPageBody = maPageList.begin(), pPageHead = maHeaderList.begin();
- pPageBody != maPageList.end() && pPageHead != maHeaderList.end();
+ pPageBody != maPageList.end() && pPageHead != maHeaderList.end();
pPageBody++, pPageHead++)
{
if( *pPageHead )
@@ -598,7 +598,7 @@ PrinterJob::EndJob ()
else
bSuccess = sal_False;
}
-
+
AppendPS (pDestFILE, mpJobTrailer, pBuffer);
mpJobTrailer->close();
@@ -609,7 +609,7 @@ PrinterJob::EndJob ()
else
{
PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get();
- if (0 == rPrinterInfoManager.endSpool( m_aLastJobData.m_aPrinterName,
+ if (0 == rPrinterInfoManager.endSpool( m_aLastJobData.m_aPrinterName,
maJobTitle, pDestFILE, m_aDocumentJobData ))
{
bSuccess = sal_False;
@@ -640,7 +640,7 @@ PrinterJob::InitPaperSize (const JobData& rJobSetup)
if (pParser != NULL)
pParser->getMargins (aPaper, nLeft, nRight, nUpper, nLower);
- mnResolution = nRes;
+ mnResolution = nRes;
mnWidthPt = nWidth;
mnHeightPt = nHeight;
@@ -667,7 +667,7 @@ PrinterJob::StartPage (const JobData& rJobSetup)
rtl::OUString aPageNo = rtl::OUString::valueOf ((sal_Int32)maPageList.size()+1); // sequential page number must start with 1
rtl::OUString aExt = aPageNo + rtl::OUString::createFromAscii (".ps");
-
+
osl::File* pPageHeader = CreateSpoolFile (
rtl::OUString::createFromAscii("psp_pghead"), aExt);
osl::File* pPageBody = CreateSpoolFile (
@@ -681,7 +681,7 @@ PrinterJob::StartPage (const JobData& rJobSetup)
// write page header according to Document Structuring Conventions (DSC)
WritePS (pPageHeader, "%%Page: ");
- WritePS (pPageHeader, aPageNo);
+ WritePS (pPageHeader, aPageNo);
WritePS (pPageHeader, " ");
WritePS (pPageHeader, aPageNo);
WritePS (pPageHeader, "\n");
@@ -700,7 +700,7 @@ PrinterJob::StartPage (const JobData& rJobSetup)
sal_Char pBBox [256];
sal_Int32 nChar = 0;
- nChar = psp::appendStr ("%%PageBoundingBox: ", pBBox);
+ nChar = psp::appendStr ("%%PageBoundingBox: ", pBBox);
nChar += psp::getValueOf (mnLMarginPt, pBBox + nChar);
nChar += psp::appendStr (" ", pBBox + nChar);
nChar += psp::getValueOf (mnBMarginPt, pBBox + nChar);
@@ -716,7 +716,7 @@ PrinterJob::StartPage (const JobData& rJobSetup)
* (to %%Begin(End)Setup, instead of %%Begin(End)PageSetup)
* don't do this in StartJob since the jobsetup there may be
* different.
- */
+ */
bool bWriteFeatures = true;
if( 1 == maPageList.size() )
{
@@ -729,7 +729,7 @@ PrinterJob::StartPage (const JobData& rJobSetup)
m_aLastJobData = rJobSetup;
return true;
}
-
+
return false;
}
@@ -753,7 +753,7 @@ PrinterJob::EndPage ()
nChar += psp::appendStr ("%%PageTrailer\n\n", pTrailer + nChar);
WritePS (pPageBody, pTrailer);
- // this page is done for now, close it to avoid having too many open fd's
+ // this page is done for now, close it to avoid having too many open fd's
pPageHeader->close();
pPageBody->close();
@@ -770,7 +770,7 @@ PrinterJob::GetErrorCode ()
struct less_ppd_key : public ::std::binary_function<double, double, bool>
{
- bool operator()(const PPDKey* left, const PPDKey* right)
+ bool operator()(const PPDKey* left, const PPDKey* right)
{ return left->getOrderDependency() < right->getOrderDependency(); }
};
@@ -797,7 +797,7 @@ static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue*
}
aFeature.append( "\n} stopped cleartomark\n" );
sal_uInt64 nWritten = 0;
- return pFile->write( aFeature.getStr(), aFeature.getLength(), nWritten )
+ return pFile->write( aFeature.getStr(), aFeature.getLength(), nWritten )
|| nWritten != (sal_uInt64)aFeature.getLength() ? false : true;
}
@@ -836,9 +836,9 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
if( bEmit )
{
const PPDValue* pValue = rJob.m_aContext.getValue( pKey );
- if( pValue
+ if( pValue
&& pValue->m_eType == eInvocation
- && ( m_aLastJobData.m_pParser == NULL
+ && ( m_aLastJobData.m_pParser == NULL
|| m_aLastJobData.m_aContext.getValue( pKey ) != pValue
|| bDocumentSetup
)
@@ -879,13 +879,13 @@ bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob, bool bWr
if( rJob.m_eOrientation == orientation::Portrait )
{
- nChar = psp::appendStr ("gsave\n[", pTranslate);
+ nChar = psp::appendStr ("gsave\n[", pTranslate);
nChar += psp::getValueOfDouble ( pTranslate + nChar, mfXScale, 5);
nChar += psp::appendStr (" 0 0 ", pTranslate + nChar);
nChar += psp::getValueOfDouble ( pTranslate + nChar, mfYScale, 5);
nChar += psp::appendStr (" ", pTranslate + nChar);
nChar += psp::getValueOf (mnRMarginPt, pTranslate + nChar);
- nChar += psp::appendStr (" ", pTranslate + nChar);
+ nChar += psp::appendStr (" ", pTranslate + nChar);
nChar += psp::getValueOf (mnHeightPt-mnTMarginPt,
pTranslate + nChar);
nChar += psp::appendStr ("] concat\ngsave\n",
@@ -893,8 +893,8 @@ bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob, bool bWr
}
else
{
- nChar = psp::appendStr ("gsave\n", pTranslate);
- nChar += psp::appendStr ("[ 0 ", pTranslate + nChar);
+ nChar = psp::appendStr ("gsave\n", pTranslate);
+ nChar += psp::appendStr ("[ 0 ", pTranslate + nChar);
nChar += psp::getValueOfDouble ( pTranslate + nChar, -mfYScale, 5);
nChar += psp::appendStr (" ", pTranslate + nChar);
nChar += psp::getValueOfDouble ( pTranslate + nChar, mfXScale, 5);
@@ -917,12 +917,12 @@ void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData )
return;
const PPDKey* pKey = NULL;
-
+
if( rJobData.m_pParser )
pKey = rJobData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPatchFile" ) ) );
if( ! pKey )
return;
-
+
// order the patch files
// according to PPD spec the JobPatchFile options must be int
// and should be emitted in order
@@ -999,7 +999,7 @@ bool PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData )
"/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def\n"
"\n"
"/psp_definefont { exch dup findfont dup length dict begin { 1 index /FID ne\n"
- "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n"
+ "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n"
"currentdict end exch pop definefont pop } def\n"
"\n"
"/pathdict dup 8 dict def load begin\n"
@@ -1086,7 +1086,7 @@ bool PrinterJob::writeProlog (osl::File* pFile, const JobData& rJobData )
"/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def\n"
"\n"
"/psp_definefont { exch dup findfont dup length dict begin { 1 index /FID ne\n"
- "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n"
+ "{ def } { pop pop } ifelse } forall /Encoding 3 -1 roll def\n"
"currentdict end exch pop definefont pop } def\n"
"\n"
"/pathdict dup 8 dict def load begin\n"
@@ -1184,9 +1184,9 @@ bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob )
aLine += ByteString::CreateFromInt32( rJob.m_nCopies );
aLine += " def\n";
sal_uInt64 nWritten = 0;
- bSuccess = pFile->write( aLine.GetBuffer(), aLine.Len(), nWritten )
+ bSuccess = pFile->write( aLine.GetBuffer(), aLine.Len(), nWritten )
|| nWritten != aLine.Len() ? false : true;
-
+
if( bSuccess && GetPostscriptLevel( &rJob ) >= 2 )
WritePS (pFile, "<< /NumCopies null /Policies << /NumCopies 1 >> >> setpagedevice\n" );
}
diff --git a/vcl/unx/source/printergfx/psputil.cxx b/vcl/unx/source/printergfx/psputil.cxx
index 370114be47cb..d1cd413b9633 100644
--- a/vcl/unx/source/printergfx/psputil.cxx
+++ b/vcl/unx/source/printergfx/psputil.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,8 +34,8 @@
#include "tools/debug.hxx"
-namespace psp {
-
+namespace psp {
+
/*
* string convenience routines
*/
@@ -43,8 +43,8 @@ namespace psp {
sal_Int32
getHexValueOf (sal_Int32 nValue, sal_Char* pBuffer)
{
- const static sal_Char pHex [0x10] = {
- '0', '1', '2', '3', '4', '5', '6', '7',
+ const static sal_Char pHex [0x10] = {
+ '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
pBuffer[0] = pHex [(nValue & 0xF0) >> 4];
@@ -59,14 +59,14 @@ getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer)
// get sign
sal_Bool bNegative = nValue < 0;
nValue = bNegative ? -nValue : nValue;
-
+
// get required buffer size, must be a multiple of two
sal_Int32 nPrecision;
if (nValue < 0x80)
nPrecision = 2;
else
if (nValue < 0x8000)
- nPrecision = 4;
+ nPrecision = 4;
else
if (nValue < 0x800000)
nPrecision = 6;
@@ -95,7 +95,7 @@ getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer)
case '6' : pBuffer[0] = 'E'; break;
case '7' : pBuffer[0] = 'F'; break;
default: DBG_ERROR("Already a signed value");
- }
+ }
}
// report precision
@@ -120,7 +120,7 @@ getValueOf (sal_Int32 nValue, sal_Char* pBuffer)
}
sal_Char pInvBuffer [32];
- sal_Int32 nInvChar = 0;
+ sal_Int32 nInvChar = 0;
while (nValue > 0)
{
pInvBuffer [nInvChar++] = '0' + nValue % 10;
@@ -130,14 +130,14 @@ getValueOf (sal_Int32 nValue, sal_Char* pBuffer)
{
pBuffer [nChar++] = pInvBuffer [--nInvChar];
}
-
+
return nChar;
}
sal_Int32
appendStr (const sal_Char* pSrc, sal_Char* pDst)
{
- sal_Int32 nBytes = strlen (pSrc);
+ sal_Int32 nBytes = strlen (pSrc);
strncpy (pDst, pSrc, nBytes + 1);
return nBytes;
@@ -147,7 +147,7 @@ sal_Int32
appendStr (const sal_Char* pSrc, sal_Char* pDst, sal_Int32 nBytes)
{
strncpy (pDst, pSrc, nBytes);
- pDst [nBytes] = '\0';
+ pDst [nBytes] = '\0';
return nBytes;
}
@@ -160,7 +160,7 @@ WritePS (osl::File* pFile, const sal_Char* pString)
{
sal_uInt64 nInLength = rtl_str_getLength (pString);
sal_uInt64 nOutLength = 0;
-
+
if (nInLength > 0 && pFile)
pFile->write (pString, nInLength, nOutLength);
@@ -171,7 +171,7 @@ sal_Bool
WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength)
{
sal_uInt64 nOutLength = 0;
-
+
if (nInLength > 0 && pFile)
pFile->write (pString, nInLength, nOutLength);
@@ -183,7 +183,7 @@ WritePS (osl::File* pFile, const rtl::OString &rString)
{
sal_uInt64 nInLength = rString.getLength();
sal_uInt64 nOutLength = 0;
-
+
if (nInLength > 0 && pFile)
pFile->write (rString, nInLength, nOutLength);
@@ -210,7 +210,7 @@ ConverterFactory::~ConverterFactory ()
rtl_destroyUnicodeToTextConverter (it->second);
}
-rtl_UnicodeToTextConverter
+rtl_UnicodeToTextConverter
ConverterFactory::Get (rtl_TextEncoding nEncoding)
{
if (rtl_isOctetTextEncoding( nEncoding ))
@@ -233,7 +233,7 @@ ConverterFactory::Get (rtl_TextEncoding nEncoding)
// wrapper for rtl_convertUnicodeToText that handles the usual cases for
// textconversion in drawtext
sal_Size
-ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen,
+ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen,
sal_uChar *pBuffer, sal_Size nBufferSize, rtl_TextEncoding nEncoding)
{
const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK
@@ -244,7 +244,7 @@ ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen,
rtl_UnicodeToTextConverter aConverter = Get (nEncoding);
rtl_UnicodeToTextContext aContext = rtl_createUnicodeToTextContext (aConverter);
- sal_Size nSize = rtl_convertUnicodeToText (aConverter, aContext,
+ sal_Size nSize = rtl_convertUnicodeToText (aConverter, aContext,
pText, nTextLen, (sal_Char*)pBuffer, nBufferSize,
nCvtFlags, &nCvtInfo, &nCvtChars);
diff --git a/vcl/unx/source/printergfx/psputil.hxx b/vcl/unx/source/printergfx/psputil.hxx
index d4af41bb95ed..721283139b53 100644
--- a/vcl/unx/source/printergfx/psputil.hxx
+++ b/vcl/unx/source/printergfx/psputil.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,10 +39,10 @@
namespace psp {
-/*
+/*
* string convenience routines
- * sizeof(pBuffer) must be at least 2 Bytes, 0x00 <= nValue <= 0xFF,
- * effective buffer of get*ValueOf() is NOT NULL-terminated
+ * sizeof(pBuffer) must be at least 2 Bytes, 0x00 <= nValue <= 0xFF,
+ * effective buffer of get*ValueOf() is NOT NULL-terminated
*/
sal_Int32 getHexValueOf (sal_Int32 nValue, sal_Char* pBuffer);
sal_Int32 getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer);
@@ -55,7 +55,7 @@ sal_Bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLe
sal_Bool WritePS (osl::File* pFile, const rtl::OString &rString);
sal_Bool WritePS (osl::File* pFile, const rtl::OUString &rString);
-class ConverterFactory
+class ConverterFactory
{
public:
@@ -63,11 +63,11 @@ public:
~ConverterFactory();
rtl_UnicodeToTextConverter Get (rtl_TextEncoding nEncoding);
sal_Size Convert (const sal_Unicode *pText, int nTextLen,
- sal_uChar *pBuffer, sal_Size nBufferSize,
+ sal_uChar *pBuffer, sal_Size nBufferSize,
rtl_TextEncoding nEncoding);
private:
- std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter > m_aConverters;
+ std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter > m_aConverters;
};
ConverterFactory* GetConverterFactory ();
diff --git a/vcl/unx/source/printergfx/text_gfx.cxx b/vcl/unx/source/printergfx/text_gfx.cxx
index 1901aa0d004a..69fe48078419 100644
--- a/vcl/unx/source/printergfx/text_gfx.cxx
+++ b/vcl/unx/source/printergfx/text_gfx.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ namespace psp {
1st font is the font substitute e.g. helvetica substitutes arial on the printer
2nd is the font itself
3rd is a fallback font, usually a font with unicode glyph repertoir (e.g. andale)
- symbol fonts (adobe-fontspecific) may need special glyphmapping
+ symbol fonts (adobe-fontspecific) may need special glyphmapping
(symbol page vc. latin page)
*/
class Font3
@@ -59,13 +59,13 @@ class Font3
#define Font3Size 3
fontID mpFont [Font3Size];
- bool mbSymbol;
+ bool mbSymbol;
public:
- fontID GetFont (int nIdx) const
+ fontID GetFont (int nIdx) const
{ return nIdx < Font3Size ? mpFont[nIdx] : -1 ; }
- bool IsSymbolFont () const
+ bool IsSymbolFont () const
{ return mbSymbol; }
Font3 (const PrinterGfx &rGfx);
@@ -75,13 +75,13 @@ class Font3
Font3::Font3(const PrinterGfx &rGfx)
{
mpFont[0] = rGfx.getFontSubstitute();
- mpFont[1] = rGfx.GetFontID();
+ mpFont[1] = rGfx.GetFontID();
mpFont[2] = rGfx.getFallbackID();
// mpFont[2] = rGfx.GetFontID();
- PrintFontManager &rMgr = PrintFontManager::get();
- mbSymbol = mpFont[1] != -1 ?
- rMgr.getFontEncoding(mpFont[1]) == RTL_TEXTENCODING_SYMBOL : false;
+ PrintFontManager &rMgr = PrintFontManager::get();
+ mbSymbol = mpFont[1] != -1 ?
+ rMgr.getFontEncoding(mpFont[1]) == RTL_TEXTENCODING_SYMBOL : false;
}
} // namespace psp
@@ -98,7 +98,7 @@ static int getVerticalDeltaAngle( sal_Unicode nChar )
/* #i52932# remember:
nChar == 0x2010 || nChar == 0x2015
nChar == 0x2016 || nChar == 0x2026
-
+
are nAngle = 0 also, but already handled in the first if
*/
if( ( nChar >= 0x3008 && nChar < 0x3019 && nChar != 0x3012 ) ||
@@ -133,7 +133,7 @@ PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID)
* implement text handling printer routines,
*/
-sal_uInt16
+sal_uInt16
PrinterGfx::SetFont(
sal_Int32 nFontID,
sal_Int32 nHeight,
@@ -151,15 +151,15 @@ PrinterGfx::SetFont(
maVirtualStatus.maEncoding = RTL_TEXTENCODING_DONTKNOW;
maVirtualStatus.mnTextHeight = nHeight;
maVirtualStatus.mnTextWidth = nWidth;
- maVirtualStatus.mbArtItalic = bArtItalic;
- maVirtualStatus.mbArtBold = bArtBold;
+ maVirtualStatus.mbArtItalic = bArtItalic;
+ maVirtualStatus.mbArtBold = bArtBold;
mnTextAngle = nAngle;
mbTextVertical = bVertical;
return 0;
}
-sal_uInt16
+sal_uInt16
PrinterGfx::SetFallbackFont ( sal_Int32 nFontID )
{
mnFallbackID = nFontID;
@@ -175,18 +175,18 @@ void PrinterGfx::drawGlyphs(
)
{
- // draw the string
+ // draw the string
// search for a glyph set matching the set font
std::list< GlyphSet >::iterator aIter;
for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); aIter++)
- if ( ((*aIter).GetFontID() == mnFontID)
+ if ( ((*aIter).GetFontID() == mnFontID)
&& ((*aIter).IsVertical() == mbTextVertical))
{
(*aIter).DrawGlyphs (*this, rPoint, pGlyphIds, pUnicodes, nLen, pDeltaArray);
break;
}
-
- // not found ? create a new one
+
+ // not found ? create a new one
if (aIter == maPS3Font.end())
{
maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical));
@@ -256,10 +256,10 @@ void PrinterGfx::DrawGlyphs(
const sal_GlyphId nRot = pGlyphIds[i] & GF_ROTMASK;
if( nRot == GF_NONE )
{
- pTempUnicodes[nTempLen] = pUnicodes[i];
+ pTempUnicodes[nTempLen] = pUnicodes[i];
pTempGlyphIds[nTempLen] = pGlyphIds[i];
if( nTempLen > 0 )
- pTempDelta[nTempLen-1] = pDeltaArray[i-1]-nTempFirstDelta;
+ pTempDelta[nTempLen-1] = pDeltaArray[i-1]-nTempFirstDelta;
else
{
// the first element in pDeltaArray shows
@@ -292,9 +292,9 @@ void PrinterGfx::DrawGlyphs(
aRotPoint = Point( -nDescend*nTextWidth/nTextHeight, nOffset + nAscend*nTextWidth/nTextHeight );
break;
}
- sal_GlyphId nRotGlyphId = pGlyphIds[i];
- sal_Unicode nRotUnicode = pUnicodes[i];
- sal_Int32 nRotDelta = 0;
+ sal_GlyphId nRotGlyphId = pGlyphIds[i];
+ sal_Unicode nRotUnicode = pUnicodes[i];
+ sal_Int32 nRotDelta = 0;
// transform matrix to new individual direction
PSGSave ();
@@ -339,13 +339,13 @@ void
PrinterGfx::DrawText (
const Point& rPoint,
const sal_Unicode* pStr,
- sal_Int16 nLen,
+ sal_Int16 nLen,
const sal_Int32* pDeltaArray
)
{
fontID nRestoreFont = mnFontID;
- // setup font[substitutes] and map the string into the symbol area in case of
+ // setup font[substitutes] and map the string into the symbol area in case of
// symbol font
Font3 aFont(*this);
sal_Unicode *pEffectiveStr;
@@ -357,7 +357,7 @@ PrinterGfx::DrawText (
}
else
{
- pEffectiveStr = const_cast<sal_Unicode*>(pStr);
+ pEffectiveStr = const_cast<sal_Unicode*>(pStr);
}
fontID *pFontMap = (fontID*) alloca(nLen * sizeof(fontID));
@@ -398,7 +398,7 @@ PrinterGfx::DrawText (
PSTranslate (rPoint);
PSRotate (nCurrentTextAngle);
mnTextAngle = 0;
-
+
nCurrentPointX = 0;
nCurrentPointY = 0;
}
@@ -408,7 +408,7 @@ PrinterGfx::DrawText (
nCurrentPointY = rPoint.Y();
}
- // draw the string
+ // draw the string
sal_Int32 nDelta = 0;
for (int nTo = 0; nTo < nLen; )
{
@@ -422,25 +422,25 @@ PrinterGfx::DrawText (
}
SetFont( nFont,
- maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
+ maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
mnTextAngle,
mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold
);
-
+
if (mbTextVertical)
{
- drawVerticalizedText(
- Point(nCurrentPointX + nDelta, nCurrentPointY),
- pEffectiveStr + nFrom, nTo - nFrom,
+ drawVerticalizedText(
+ Point(nCurrentPointX + nDelta, nCurrentPointY),
+ pEffectiveStr + nFrom, nTo - nFrom,
pNewDeltaArray + nFrom );
}
else
{
- drawText(
- Point(nCurrentPointX + nDelta, nCurrentPointY),
- pEffectiveStr + nFrom, nTo - nFrom,
+ drawText(
+ Point(nCurrentPointX + nDelta, nCurrentPointY),
+ pEffectiveStr + nFrom, nTo - nFrom,
pDeltaArray == NULL ? NULL : pNewDeltaArray + nFrom );
}
nDelta += pNewDeltaArray[ nTo - 1 ];
@@ -455,7 +455,7 @@ PrinterGfx::DrawText (
// restore the original font settings
SetFont( nRestoreFont,
- maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
+ maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
mnTextAngle, mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold
@@ -465,7 +465,7 @@ PrinterGfx::DrawText (
void PrinterGfx::drawVerticalizedText(
const Point& rPoint,
const sal_Unicode* pStr,
- sal_Int16 nLen,
+ sal_Int16 nLen,
const sal_Int32* pDeltaArray
)
{
@@ -494,32 +494,32 @@ void PrinterGfx::drawVerticalizedText(
{
for( int n = nLastPos; n < i; n++ )
pDelta[n] = pDeltaArray[n] - (aPoint.X() - rPoint.X() );
-
+
SetFont( mnFontID,
maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
nNormalAngle, mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold );
drawText( aPoint, pStr + nLastPos, i - nLastPos, pDelta + nLastPos );
-
+
aPoint.X() = (sal_Int32)(rPoint.X() + ((double)pDeltaArray[i-1] * fCos));
aPoint.Y() = (sal_Int32)(rPoint.Y() + ((double)pDeltaArray[i-1] * fSin));
}
if( i < nLen )
{
- int nOldWidth = maVirtualStatus.mnTextWidth;
- int nOldHeight = maVirtualStatus.mnTextHeight;
+ int nOldWidth = maVirtualStatus.mnTextWidth;
+ int nOldHeight = maVirtualStatus.mnTextHeight;
SetFont( mnFontID,
nTextScale,
maVirtualStatus.mnTextHeight,
- nNormalAngle + nDeltaAngle,
+ nNormalAngle + nDeltaAngle,
mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold );
double nA = nTextScale * aInfo.m_nAscend / 1000.0;
double nD = nTextScale * aInfo.m_nDescend / 1000.0;
- double fStretch = (double)maVirtualStatus.mnTextWidth / maVirtualStatus.mnTextHeight;
+ double fStretch = (double)maVirtualStatus.mnTextWidth / maVirtualStatus.mnTextHeight;
if( !pGsubFlags[i] )
nD *= fStretch;
@@ -546,7 +546,7 @@ void PrinterGfx::drawVerticalizedText(
SetFont( mnFontID,
nOldHeight,
nOldWidth,
- nNormalAngle,
+ nNormalAngle,
mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold );
@@ -557,25 +557,25 @@ void PrinterGfx::drawVerticalizedText(
mnTextAngle = nNormalAngle;
}
-void
+void
PrinterGfx::LicenseWarning(const Point& rPoint, const sal_Unicode* pStr,
sal_Int16 nLen, const sal_Int32* pDeltaArray)
{
- // treat it like a builtin font in case a user has that font also in the
- // printer. This is not so unlikely as it may seem; no print embedding
+ // treat it like a builtin font in case a user has that font also in the
+ // printer. This is not so unlikely as it may seem; no print embedding
// licensed fonts are often used (or so they say) in companies:
- // they are installed on displays and printers, but get not embedded in
- // they are installed on displays and printers, but get not embedded in
- // print files or documents because they are not licensed for use outside
+ // they are installed on displays and printers, but get not embedded in
+ // they are installed on displays and printers, but get not embedded in
+ // print files or documents because they are not licensed for use outside
// the company.
rtl::OString aMessage( "The font " );
- aMessage += rtl::OUStringToOString( mrFontMgr.getPSName(mnFontID),
+ aMessage += rtl::OUStringToOString( mrFontMgr.getPSName(mnFontID),
RTL_TEXTENCODING_ASCII_US );
aMessage += " could not be downloaded\nbecause its license does not allow for that";
PSComment( aMessage.getStr() );
- rtl::OString aFontName = rtl::OUStringToOString(
- mrFontMgr.getPSName(mnFontID),
+ rtl::OString aFontName = rtl::OUStringToOString(
+ mrFontMgr.getPSName(mnFontID),
RTL_TEXTENCODING_ASCII_US);
PSSetFont (aFontName, RTL_TEXTENCODING_ISO_8859_1);
@@ -589,11 +589,11 @@ PrinterGfx::LicenseWarning(const Point& rPoint, const sal_Unicode* pStr,
PSShowText (pBuffer, nLen, nSize, pDeltaArray);
}
-void
+void
PrinterGfx::drawText(
const Point& rPoint,
const sal_Unicode* pStr,
- sal_Int16 nLen,
+ sal_Int16 nLen,
const sal_Int32* pDeltaArray
)
{
@@ -605,7 +605,7 @@ PrinterGfx::drawText(
if (eType == fonttype::Type1)
PSUploadPS1Font (mnFontID);
- if ( eType == fonttype::TrueType
+ if ( eType == fonttype::TrueType
&& !mrFontMgr.isFontDownloadingAllowed(mnFontID))
{
LicenseWarning(rPoint, pStr, nLen, pDeltaArray);
@@ -622,14 +622,14 @@ PrinterGfx::drawText(
// search for a glyph set matching the set font
std::list< GlyphSet >::iterator aIter;
for (aIter = maPS3Font.begin(); aIter != maPS3Font.end(); aIter++)
- if ( ((*aIter).GetFontID() == mnFontID)
+ if ( ((*aIter).GetFontID() == mnFontID)
&& ((*aIter).IsVertical() == mbTextVertical))
{
(*aIter).DrawText (*this, rPoint, pStr, nLen, pDeltaArray);
break;
}
- // not found ? create a new one
+ // not found ? create a new one
if (aIter == maPS3Font.end())
{
maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical));
@@ -642,11 +642,11 @@ PrinterGfx::getCharWidth (sal_Bool b_vert, sal_Unicode n_char, CharacterMetric *
{
b_vert = b_vert && (getVerticalDeltaAngle(n_char) != 0);
int w = b_vert ? p_bbox->height : p_bbox->width;
- w *= maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight;
+ w *= maVirtualStatus.mnTextWidth ? maVirtualStatus.mnTextWidth : maVirtualStatus.mnTextHeight;
return w;
}
-fontID
+fontID
PrinterGfx::getCharMetric (const Font3 &rFont, sal_Unicode n_char, CharacterMetric *p_bbox)
{
p_bbox->width = -1;
@@ -702,7 +702,7 @@ PrinterGfx::getFontSubstitute () const
{
if( mpFontSubstitutes )
{
- ::std::hash_map< fontID, fontID >::const_iterator it =
+ ::std::hash_map< fontID, fontID >::const_iterator it =
mpFontSubstitutes->find( mnFontID );
if( it != mpFontSubstitutes->end() )
return it->second;
@@ -714,12 +714,12 @@ PrinterGfx::getFontSubstitute () const
sal_Int32
PrinterGfx::GetCharWidth (sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray)
{
- Font3 aFont(*this);
+ Font3 aFont(*this);
if (aFont.IsSymbolFont() && (nFrom < 256) && (nTo < 256))
{
nFrom += 0xF000;
nTo += 0xF000;
- }
+ }
for( int n = 0; n < (nTo - nFrom + 1); n++ )
{
@@ -758,21 +758,21 @@ const ::std::list< KernPair >& PrinterGfx::getKernPairs( bool bVertical ) const
* advanced glyph handling
*/
-sal_Bool
+sal_Bool
PrinterGfx::GetGlyphBoundRect (sal_Unicode /*c*/, Rectangle& /*rOutRect*/)
{
return 0;
}
-sal_uInt32
-PrinterGfx::GetGlyphOutline (sal_Unicode /*c*/,
+sal_uInt32
+PrinterGfx::GetGlyphOutline (sal_Unicode /*c*/,
sal_uInt16 **/*ppPolySizes*/, Point **/*ppPoints*/, sal_uInt8 **/*ppFlags*/)
{
return 0;
}
/*
- * spool the converted truetype fonts to the page header after the page body is
+ * spool the converted truetype fonts to the page header after the page body is
* complete
* for Type1 fonts spool additional reencoding vectors that are necessary to access the
* whole font
@@ -809,7 +809,7 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppli
RTL_TEXTENCODING_ASCII_US );
WritePS (pFile, "%%BeginResource: font ");
- WritePS (pFile, aPostScriptName.getStr());
+ WritePS (pFile, aPostScriptName.getStr());
WritePS (pFile, "\n");
osl::File::RC nError = aFontFile.open (OpenFlag_Read);
@@ -838,7 +838,7 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppli
aIter->PSUploadFont (*pFile, *this, mbUploadPS42Fonts ? true : false, rSuppliedFonts );
}
else
- // ( aIter->GetFontType() == fonttype::Type1
+ // ( aIter->GetFontType() == fonttype::Type1
// || aIter->GetFontType() == fonttype::Builtin )
{
aIter->PSUploadEncoding (pFile, *this);
diff --git a/vcl/unx/source/window/FWS.cxx b/vcl/unx/source/window/FWS.cxx
index 4683864fd116..981ac1bd54b9 100644
--- a/vcl/unx/source/window/FWS.cxx
+++ b/vcl/unx/source/window/FWS.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/unx/source/window/FWS.hxx b/vcl/unx/source/window/FWS.hxx
index a687870ede4a..853a182e2b6d 100644
--- a/vcl/unx/source/window/FWS.hxx
+++ b/vcl/unx/source/window/FWS.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ extern "C" {
* providing FWS extension support.
*/
-Bool
+Bool
WMSupportsFWS (Display *display, int screen);
/* Send a client message to the FWS_COMM_WINDOW indicating the existance
@@ -47,13 +47,13 @@ WMSupportsFWS (Display *display, int screen);
* old/obsolete junk in it.
*/
-Bool
+Bool
RegisterFwsWindow (Display *display, Window window);
/* Add the FWS protocol atoms to the WMProtocols property for the window.
*/
-void
+void
AddFwsProtocols (Display *display, Window window);
#if defined(__cplusplus)
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index b0248662a2a2..cbfb98928dc0 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,7 +84,7 @@ using namespace vcl_sal;
using namespace vcl;
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define CLIENT_EVENTS StructureNotifyMask \
+#define CLIENT_EVENTS StructureNotifyMask \
| SubstructureNotifyMask \
| KeyPressMask \
| KeyReleaseMask \
@@ -101,9 +101,9 @@ using namespace vcl;
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static XLIB_Window hPresentationWindow = None, hPresFocusWindow = None;
+static XLIB_Window hPresentationWindow = None, hPresFocusWindow = None;
static ::std::list< XLIB_Window > aPresentationReparentList;
-static int nVisibleFloats = 0;
+static int nVisibleFloats = 0;
X11SalFrame* X11SalFrame::s_pSaveYourselfFrame = NULL;
@@ -158,8 +158,8 @@ bool X11SalFrame::IsFloatGrabWindow() const
return
( ( !pDisableGrab || !*pDisableGrab ) &&
(
- (nStyle_ & SAL_FRAME_STYLE_FLOAT) &&
- ! (nStyle_ & SAL_FRAME_STYLE_TOOLTIP) &&
+ (nStyle_ & SAL_FRAME_STYLE_FLOAT) &&
+ ! (nStyle_ & SAL_FRAME_STYLE_TOOLTIP) &&
! (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION)
)
);
@@ -186,7 +186,7 @@ void X11SalFrame::setXEmbedInfo()
void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
{
XEvent aEvent;
-
+
rtl_zeroMemory( &aEvent, sizeof(aEvent) );
aEvent.xclient.window = mhForeignParent;
aEvent.xclient.type = ClientMessage;
@@ -197,7 +197,7 @@ void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
aEvent.xclient.data.l[2] = 0;
aEvent.xclient.data.l[3] = 0;
aEvent.xclient.data.l[4] = 0;
-
+
GetDisplay()->GetXLib()->PushXErrorLevel( true );
XSendEvent( pDisplay_->GetDisplay(),
mhForeignParent,
@@ -215,9 +215,9 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
nScreen = GetDisplay()->GetDefaultScreenNumber();
if( mpParent )
nScreen = mpParent->m_nScreen;
-
+
m_nScreen = nScreen;
- nStyle_ = nSalFrameStyle;
+ nStyle_ = nSalFrameStyle;
XWMHints Hints;
Hints.flags = InputHint;
Hints.input = (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ? False : True;
@@ -233,15 +233,15 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
| CWEventMask
;
Attributes.border_pixel = 0;
- Attributes.background_pixmap = None;
- Attributes.colormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap();
- Attributes.override_redirect = False;
- Attributes.event_mask = CLIENT_EVENTS;
-
+ Attributes.background_pixmap = None;
+ Attributes.colormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap();
+ Attributes.override_redirect = False;
+ Attributes.event_mask = CLIENT_EVENTS;
+
const SalVisual& rVis = GetDisplay()->GetVisual( m_nScreen );
XLIB_Window aFrameParent = pParentData ? pParentData->aWindow : GetDisplay()->GetRootWindow( m_nScreen );
XLIB_Window aClientLeader = None;
-
+
if( bUseGeometry )
{
x = maGeometry.nX;
@@ -249,7 +249,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
w = maGeometry.nWidth;
h = maGeometry.nHeight;
}
-
+
if( (nSalFrameStyle & SAL_FRAME_STYLE_FLOAT) &&
! (nSalFrameStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION)
)
@@ -344,7 +344,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
w = 785;
if( aScreenSize.Width() >= 1024 )
w = 920;
-
+
if( aScreenSize.Height() >= 600 )
h = 550;
if( aScreenSize.Height() >= 768 )
@@ -371,7 +371,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
break;
++it;
}
-
+
if( it != rFrames.end() )
{
// set a document position and size
@@ -429,7 +429,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
try
{
bOk=SelectAppIconPixmap( pDisplay_, m_nScreen,
- mnIconID != 1 ? mnIconID :
+ mnIconID != 1 ? mnIconID :
(mpParent ? mpParent->mnIconID : 1), 32,
Hints.icon_pixmap, Hints.icon_mask );
}
@@ -439,9 +439,9 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
if( bOk )
{
- Hints.flags |= IconPixmapHint;
+ Hints.flags |= IconPixmapHint;
if( Hints.icon_mask )
- Hints.flags |= IconMaskHint;
+ Hints.flags |= IconMaskHint;
}
}
@@ -472,8 +472,8 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
else
{
- Hints.flags |= WindowGroupHint;
- Hints.window_group = pFrame->GetShellWindow();
+ Hints.flags |= WindowGroupHint;
+ Hints.window_group = pFrame->GetShellWindow();
// note: for a normal document window this will produce None
// as the window is not yet created and the shell window is
// initialized to None. This must be corrected after window creation.
@@ -481,10 +481,10 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
}
- nShowState_ = SHOWSTATE_UNKNOWN;
- bViewable_ = TRUE;
- bMapped_ = FALSE;
- nVisibility_ = VisibilityFullyObscured;
+ nShowState_ = SHOWSTATE_UNKNOWN;
+ bViewable_ = TRUE;
+ bMapped_ = FALSE;
+ nVisibility_ = VisibilityFullyObscured;
mhWindow = XCreateWindow( GetXDisplay(),
aFrameParent,
x, y,
@@ -499,8 +499,8 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
if( /*! IsSysChildWindow() &&*/ pParentData == NULL )
{
mhShellWindow = mhWindow;
- }
-
+ }
+
// correct window group if necessary
if( (Hints.flags & WindowGroupHint) == WindowGroupHint )
{
@@ -508,10 +508,10 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
Hints.window_group = GetShellWindow();
}
- maGeometry.nX = x;
- maGeometry.nY = y;
- maGeometry.nWidth = w;
- maGeometry.nHeight = h;
+ maGeometry.nX = x;
+ maGeometry.nY = y;
+ maGeometry.nWidth = w;
+ maGeometry.nHeight = h;
updateScreenNumber();
XSync( GetXDisplay(), False );
@@ -563,7 +563,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
GetShellWindow(),
pHints );
XFree (pHints);
-
+
// set PID and WM_CLIENT_MACHINE
pDisplay_->getWMAdaptor()->setClientMachine( this );
pDisplay_->getWMAdaptor()->setPID( this );
@@ -637,9 +637,9 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
== SAL_FRAME_STYLE_DEFAULT )
pDisplay_->getWMAdaptor()->maximizeFrame( this, true, true );
}
-
+
m_nWorkArea = GetDisplay()->getWMAdaptor()->getCurrentWorkArea();
-
+
// Pointer
SetPointer( POINTER_ARROW );
}
@@ -652,69 +652,69 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentD
// initialize frame geometry
memset( &maGeometry, 0, sizeof(maGeometry) );
- mpParent = static_cast< X11SalFrame* >( pParent );
+ mpParent = static_cast< X11SalFrame* >( pParent );
- mbTransientForRoot = false;
+ mbTransientForRoot = false;
- pDisplay_ = pSalData->GetDisplay();
+ pDisplay_ = pSalData->GetDisplay();
// insert frame in framelist
pDisplay_->registerFrame( this );
- mhWindow = None;
- mhShellWindow = None;
- mhStackingWindow = None;
- mhForeignParent = None;
+ mhWindow = None;
+ mhShellWindow = None;
+ mhStackingWindow = None;
+ mhForeignParent = None;
mhBackgroundPixmap = None;
m_bSetFocusOnMap = false;
- pGraphics_ = NULL;
- pFreeGraphics_ = NULL;
+ pGraphics_ = NULL;
+ pFreeGraphics_ = NULL;
- hCursor_ = None;
- nCaptured_ = 0;
+ hCursor_ = None;
+ nCaptured_ = 0;
- nReleaseTime_ = 0;
- nKeyCode_ = 0;
- nKeyState_ = 0;
- nCompose_ = -1;
- mbKeyMenu = false;
- mbSendExtKeyModChange = false;
- mnExtKeyMod = 0;
+ nReleaseTime_ = 0;
+ nKeyCode_ = 0;
+ nKeyState_ = 0;
+ nCompose_ = -1;
+ mbKeyMenu = false;
+ mbSendExtKeyModChange = false;
+ mnExtKeyMod = 0;
- nShowState_ = SHOWSTATE_UNKNOWN;
- nWidth_ = 0;
- nHeight_ = 0;
- nStyle_ = 0;
+ nShowState_ = SHOWSTATE_UNKNOWN;
+ nWidth_ = 0;
+ nHeight_ = 0;
+ nStyle_ = 0;
mnExtStyle = 0;
- bAlwaysOnTop_ = FALSE;
+ bAlwaysOnTop_ = FALSE;
// set bViewable_ to TRUE: hack GetClientSize to report something
// different to 0/0 before first map
- bViewable_ = TRUE;
- bMapped_ = FALSE;
- bDefaultPosition_ = TRUE;
- nVisibility_ = VisibilityFullyObscured;
+ bViewable_ = TRUE;
+ bMapped_ = FALSE;
+ bDefaultPosition_ = TRUE;
+ nVisibility_ = VisibilityFullyObscured;
m_nWorkArea = 0;
- mbInShow = FALSE;
+ mbInShow = FALSE;
m_bXEmbed = false;
- nScreenSaversTimeout_ = 0;
+ nScreenSaversTimeout_ = 0;
- mpInputContext = NULL;
- mbInputFocus = False;
+ mpInputContext = NULL;
+ mbInputFocus = False;
maAlwaysOnTopRaiseTimer.SetTimeoutHdl( LINK( this, X11SalFrame, HandleAlwaysOnTopRaise ) );
maAlwaysOnTopRaiseTimer.SetTimeout( 100 );
- meWindowType = WMAdaptor::windowType_Normal;
- mnDecorationFlags = WMAdaptor::decoration_All;
- mbMaximizedVert = false;
- mbMaximizedHorz = false;
- mbShaded = false;
- mbFullScreen = false;
-
- mnIconID = 1; // ICON_DEFAULT
+ meWindowType = WMAdaptor::windowType_Normal;
+ mnDecorationFlags = WMAdaptor::decoration_All;
+ mbMaximizedVert = false;
+ mbMaximizedHorz = false;
+ mbShaded = false;
+ mbFullScreen = false;
+ mnIconID = 1; // ICON_DEFAULT
+
m_pClipRectangles = NULL;
m_nCurClipRect = 0;
m_nMaxClipRect = 0;
@@ -741,9 +741,9 @@ void X11SalFrame::passOnSaveYourSelf()
if( ! ( IsChildWindow() || pFrame->mpParent )
&& pFrame != s_pSaveYourselfFrame )
break;
- ++it;
+ ++it;
}
-
+
s_pSaveYourselfFrame = (it != rFrames.end() ) ? const_cast<X11SalFrame*>(pFrame) : NULL;
if( s_pSaveYourselfFrame )
{
@@ -761,20 +761,20 @@ void X11SalFrame::passOnSaveYourSelf()
X11SalFrame::~X11SalFrame()
{
notifyDelete();
-
+
if( m_pClipRectangles )
{
delete [] m_pClipRectangles;
m_pClipRectangles = NULL;
m_nCurClipRect = m_nMaxClipRect = 0;
}
-
+
if( mhBackgroundPixmap )
{
XSetWindowBackgroundPixmap( GetXDisplay(), GetWindow(), None );
- XFreePixmap( GetXDisplay(), mhBackgroundPixmap );
+ XFreePixmap( GetXDisplay(), mhBackgroundPixmap );
}
-
+
if( mhStackingWindow )
aPresentationReparentList.remove( mhStackingWindow );
@@ -847,7 +847,7 @@ void X11SalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
if( nStyle != mnExtStyle && ! IsChildWindow() )
{
mnExtStyle = nStyle;
-
+
XClassHint* pClass = XAllocClassHint();
rtl::OString aResHint = X11SalData::getFrameResName( mnExtStyle );
pClass->res_name = const_cast<char*>(aResHint.getStr());
@@ -900,18 +900,18 @@ void X11SalFrame::SetBackgroundBitmap( SalBitmap* pBitmap )
const SystemChildData* X11SalFrame::GetSystemData() const
{
X11SalFrame *pFrame = const_cast<X11SalFrame*>(this);
- pFrame->maSystemChildData.nSize = sizeof( SystemChildData );
- pFrame->maSystemChildData.pDisplay = GetXDisplay();
- pFrame->maSystemChildData.aWindow = pFrame->GetWindow();
- pFrame->maSystemChildData.pSalFrame = pFrame;
- pFrame->maSystemChildData.pWidget = NULL;
- pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
- pFrame->maSystemChildData.nScreen = m_nScreen;
- pFrame->maSystemChildData.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth();
- pFrame->maSystemChildData.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap();
- pFrame->maSystemChildData.pAppContext = NULL;
- pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow();
- pFrame->maSystemChildData.pShellWidget = NULL;
+ pFrame->maSystemChildData.nSize = sizeof( SystemChildData );
+ pFrame->maSystemChildData.pDisplay = GetXDisplay();
+ pFrame->maSystemChildData.aWindow = pFrame->GetWindow();
+ pFrame->maSystemChildData.pSalFrame = pFrame;
+ pFrame->maSystemChildData.pWidget = NULL;
+ pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
+ pFrame->maSystemChildData.nScreen = m_nScreen;
+ pFrame->maSystemChildData.nDepth = GetDisplay()->GetVisual( m_nScreen ).GetDepth();
+ pFrame->maSystemChildData.aColormap = GetDisplay()->GetColormap( m_nScreen ).GetXColormap();
+ pFrame->maSystemChildData.pAppContext = NULL;
+ pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow();
+ pFrame->maSystemChildData.pShellWidget = NULL;
return &maSystemChildData;
}
@@ -922,8 +922,8 @@ SalGraphics *X11SalFrame::GetGraphics()
if( pFreeGraphics_ )
{
- pGraphics_ = pFreeGraphics_;
- pFreeGraphics_ = NULL;
+ pGraphics_ = pFreeGraphics_;
+ pFreeGraphics_ = NULL;
}
else
{
@@ -941,8 +941,8 @@ void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
if( pGraphics != pGraphics_ )
return;
- pFreeGraphics_ = pGraphics_;
- pGraphics_ = NULL;
+ pFreeGraphics_ = pGraphics_;
+ pGraphics_ = NULL;
}
void X11SalFrame::updateGraphics( bool bClear )
@@ -1029,7 +1029,7 @@ void X11SalFrame::SetIcon( USHORT nIcon )
else
{
const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() );
- if( rWM.EqualsAscii( "KWin" ) ) // assume KDE is running
+ if( rWM.EqualsAscii( "KWin" ) ) // assume KDE is running
iconSize = 48;
static bool bGnomeIconSize = false;
static bool bGnomeChecked = false;
@@ -1077,7 +1077,7 @@ void X11SalFrame::SetIcon( USHORT nIcon )
}
if( bOk )
{
- pHints->flags |= IconPixmapHint;
+ pHints->flags |= IconPixmapHint;
if( pHints->icon_mask )
pHints->flags |= IconMaskHint;
@@ -1101,8 +1101,8 @@ void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight )
pHints,
&nSupplied
);
- pHints->max_width = nWidth;
- pHints->max_height = nHeight;
+ pHints->max_width = nWidth;
+ pHints->max_height = nHeight;
pHints->flags |= PMaxSize;
XSetWMNormalHints( GetXDisplay(),
GetShellWindow(),
@@ -1125,8 +1125,8 @@ void X11SalFrame::SetMinClientSize( long nWidth, long nHeight )
pHints,
&nSupplied
);
- pHints->min_width = nWidth;
- pHints->min_height = nHeight;
+ pHints->min_width = nWidth;
+ pHints->min_height = nHeight;
pHints->flags |= PMinSize;
XSetWMNormalHints( GetXDisplay(),
GetShellWindow(),
@@ -1150,7 +1150,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
// so artificially set ABOVE and remove it again on hide
if( mpParent && (mpParent->nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) && pDisplay_->getWMAdaptor()->isLegacyPartialFullscreen())
pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bVisible );
-
+
bMapped_ = bVisible;
bViewable_ = bVisible;
setXEmbedInfo();
@@ -1174,7 +1174,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
}
}
-
+
// update NET_WM_STATE which may have been deleted due to earlier Show(FALSE)
if( nShowState_ == SHOWSTATE_HIDDEN )
GetDisplay()->getWMAdaptor()->frameIsMapping( this );
@@ -1197,7 +1197,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
{
GetDisplay()->getWMAdaptor()->changeReferenceFrame( this, mpParent );
}
-
+
// #i45160# switch to desktop where a dialog with parent will appear
if( mpParent && mpParent->m_nWorkArea != m_nWorkArea )
GetDisplay()->getWMAdaptor()->switchToWorkArea( mpParent->m_nWorkArea );
@@ -1261,7 +1261,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
XSync( GetXDisplay(), False );
-
+
if( IsFloatGrabWindow() )
{
/*
@@ -1351,7 +1351,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
else if( ! m_bXEmbed )
XUnmapWindow( GetXDisplay(), GetWindow() );
-
+
nShowState_ = SHOWSTATE_HIDDEN;
if( IsFloatGrabWindow() && nVisibleFloats )
{
@@ -1414,7 +1414,7 @@ void X11SalFrame::GetClientSize( long &rWidth, long &rHeight )
return;
}
- rWidth = maGeometry.nWidth;
+ rWidth = maGeometry.nWidth;
rHeight = maGeometry.nHeight;
if( !rWidth || !rHeight )
@@ -1436,29 +1436,29 @@ void X11SalFrame::SetWindowGravity (int nGravity) const
{
XSizeHints* pHint = XAllocSizeHints();
long nFlag;
-
+
XGetWMNormalHints (GetXDisplay(), GetShellWindow(), pHint, &nFlag);
pHint->flags |= PWinGravity;
pHint->win_gravity = nGravity;
-
+
XSetWMNormalHints (GetXDisplay(), GetShellWindow(), pHint);
XSync (GetXDisplay(), False);
-
+
XFree (pHint);
}
}
void X11SalFrame::Center( )
{
- int nX, nY, nScreenWidth, nScreenHeight;
- int nRealScreenWidth, nRealScreenHeight;
- int nScreenX = 0, nScreenY = 0;
+ int nX, nY, nScreenWidth, nScreenHeight;
+ int nRealScreenWidth, nRealScreenHeight;
+ int nScreenX = 0, nScreenY = 0;
const Size& aScreenSize = GetDisplay()->getDataForScreen( m_nScreen ).m_aSize;
- nScreenWidth = aScreenSize.Width();
- nScreenHeight = aScreenSize.Height();
- nRealScreenWidth = nScreenWidth;
- nRealScreenHeight = nScreenHeight;
+ nScreenWidth = aScreenSize.Width();
+ nScreenHeight = aScreenSize.Height();
+ nRealScreenWidth = nScreenWidth;
+ nRealScreenHeight = nScreenHeight;
if( GetDisplay()->IsXinerama() )
{
@@ -1484,10 +1484,10 @@ void X11SalFrame::Center( )
for( unsigned int i = 0; i < rScreens.size(); i++ )
if( rScreens[i].IsInside( Point( root_x, root_y ) ) )
{
- nScreenX = rScreens[i].Left();
- nScreenY = rScreens[i].Top();
- nRealScreenWidth = rScreens[i].GetWidth();
- nRealScreenHeight = rScreens[i].GetHeight();
+ nScreenX = rScreens[i].Left();
+ nScreenY = rScreens[i].Top();
+ nRealScreenWidth = rScreens[i].GetWidth();
+ nRealScreenHeight = rScreens[i].GetHeight();
break;
}
}
@@ -1501,10 +1501,10 @@ void X11SalFrame::Center( )
{
Rectangle aRect;
pFrame->GetPosSize( aRect );
- pFrame->maGeometry.nX = aRect.Left();
- pFrame->maGeometry.nY = aRect.Top();
- pFrame->maGeometry.nWidth = aRect.GetWidth();
- pFrame->maGeometry.nHeight = aRect.GetHeight();
+ pFrame->maGeometry.nX = aRect.Left();
+ pFrame->maGeometry.nY = aRect.Top();
+ pFrame->maGeometry.nWidth = aRect.GetWidth();
+ pFrame->maGeometry.nHeight = aRect.GetHeight();
}
if( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG )
@@ -1521,10 +1521,10 @@ void X11SalFrame::Center( )
}
else
{
- nScreenX = pFrame->maGeometry.nX;
- nScreenY = pFrame->maGeometry.nY;
- nScreenWidth = pFrame->maGeometry.nWidth;
- nScreenHeight = pFrame->maGeometry.nHeight;
+ nScreenX = pFrame->maGeometry.nX;
+ nScreenY = pFrame->maGeometry.nY;
+ nScreenWidth = pFrame->maGeometry.nWidth;
+ nScreenHeight = pFrame->maGeometry.nHeight;
}
}
@@ -1539,14 +1539,14 @@ void X11SalFrame::Center( )
else
{
// center the window relative to the top level frame
- nX = (nScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX;
+ nX = (nScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX;
nY = (nScreenHeight - (int)maGeometry.nHeight) / 2 + nScreenY;
}
}
else
{
// center the window relative to screen
- nX = (nRealScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX;
+ nX = (nRealScreenWidth - (int)maGeometry.nWidth ) / 2 + nScreenX;
nY = (nRealScreenHeight - (int)maGeometry.nHeight) / 2 + nScreenY;
}
nX = nX < 0 ? 0 : nX;
@@ -1589,7 +1589,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHOR
{
if( nStyle_ & SAL_FRAME_STYLE_PLUG )
return;
-
+
// relative positioning in X11SalFrame::SetPosSize
Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) );
aPosSize.Justify();
@@ -1659,7 +1659,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
{
Rectangle aPosSize;
bool bDoAdjust = false;
-
+
/* #i44325#
* if maximized, set restore size and guess maximized size from last time
* in state change below maximize window
@@ -1678,14 +1678,14 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
pHints,
&nSupplied );
pHints->flags |= PPosition | PWinGravity;
- pHints->x = pState->mnX;
- pHints->y = pState->mnY;
- pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity();
+ pHints->x = pState->mnX;
+ pHints->y = pState->mnY;
+ pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity();
XSetWMNormalHints( GetXDisplay(),
GetShellWindow(),
pHints );
XFree( pHints );
-
+
XMoveResizeWindow( GetXDisplay(), GetShellWindow(),
pState->mnX, pState->mnY,
pState->mnWidth, pState->mnHeight );
@@ -1701,7 +1701,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
// initialize with current geometry
if ((pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) != _FRAMESTATE_MASK_GEOMETRY)
GetPosSize (aPosSize);
-
+
// change requested properties
if (pState->mnMask & SAL_FRAMESTATE_MASK_X)
{
@@ -1723,15 +1723,15 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
aPosSize.setHeight (nHeight);
bDoAdjust = true;
}
-
+
const Size& aScreenSize = pDisplay_->getDataForScreen( m_nScreen ).m_aSize;
const WMAdaptor *pWM = GetDisplay()->getWMAdaptor();
-
+
if( bDoAdjust && aPosSize.GetWidth() <= aScreenSize.Width()
&& aPosSize.GetHeight() <= aScreenSize.Height() )
{
SalFrameGeometry aGeom = maGeometry;
-
+
if( ! (nStyle_ & ( SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_PLUG ) ) &&
mpParent &&
aGeom.nLeftDecoration == 0 &&
@@ -1747,7 +1747,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
aGeom.nBottomDecoration = 5;
}
}
-
+
// adjust position so that frame fits onto screen
if( aPosSize.Right()+(long)aGeom.nRightDecoration > aScreenSize.Width()-1 )
aPosSize.Move( (long)aScreenSize.Width() - (long)aPosSize.Right() - (long)aGeom.nRightDecoration, 0 );
@@ -1758,7 +1758,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
if( aPosSize.Top() < (long)aGeom.nTopDecoration )
aPosSize.Move( 0, (long)aGeom.nTopDecoration - (long)aPosSize.Top() );
}
-
+
// resize with new args
if (pWM->supportsICCCMPos())
{
@@ -1824,7 +1824,7 @@ BOOL X11SalFrame::GetWindowState( SalFrameState* pState )
GetPosSize( aPosSize );
else
aPosSize = maRestorePosSize;
-
+
if( mbMaximizedHorz )
pState->mnState |= SAL_FRAMESTATE_MAXIMIZED_HORZ;
if( mbMaximizedVert )
@@ -1832,8 +1832,8 @@ BOOL X11SalFrame::GetWindowState( SalFrameState* pState )
if( mbShaded )
pState->mnState |= SAL_FRAMESTATE_ROLLUP;
- pState->mnX = aPosSize.Left();
- pState->mnY = aPosSize.Top();
+ pState->mnX = aPosSize.Left();
+ pState->mnY = aPosSize.Top();
pState->mnWidth = aPosSize.GetWidth();
pState->mnHeight = aPosSize.GetHeight();
@@ -1945,10 +1945,10 @@ void X11SalFrame::SetSize( const Size &rSize )
pHints,
&nSupplied
);
- pHints->min_width = rSize.Width();
- pHints->min_height = rSize.Height();
- pHints->max_width = rSize.Width();
- pHints->max_height = rSize.Height();
+ pHints->min_width = rSize.Width();
+ pHints->min_height = rSize.Height();
+ pHints->max_width = rSize.Width();
+ pHints->max_height = rSize.Height();
pHints->flags |= PMinSize | PMaxSize;
XSetWMNormalHints( GetXDisplay(),
GetShellWindow(),
@@ -1980,10 +1980,10 @@ void X11SalFrame::SetSize( const Size &rSize )
void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
{
XWindowChanges values;
- values.x = rPosSize.Left();
- values.y = rPosSize.Top();
- values.width = rPosSize.GetWidth();
- values.height = rPosSize.GetHeight();
+ values.x = rPosSize.Left();
+ values.y = rPosSize.Top();
+ values.width = rPosSize.GetWidth();
+ values.height = rPosSize.GetHeight();
if( !values.width || !values.height )
return;
@@ -2014,8 +2014,8 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
if( ! ( nStyle_ & ( SAL_FRAME_STYLE_PLUG | SAL_FRAME_STYLE_FLOAT ) )
&& !(pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_ClientPos) )
{
- values.x -= maGeometry.nLeftDecoration;
- values.y -= maGeometry.nTopDecoration;
+ values.x -= maGeometry.nLeftDecoration;
+ values.y -= maGeometry.nTopDecoration;
}
// do net set WMNormalHints for ..
@@ -2023,7 +2023,7 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
// child windows
! IsChildWindow()
// popups (menu, help window, etc.)
- && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT
+ && (nStyle_ & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) != SAL_FRAME_STYLE_FLOAT
// shown, sizeable windows
&& ( nShowState_ == SHOWSTATE_UNKNOWN ||
nShowState_ == SHOWSTATE_HIDDEN ||
@@ -2040,23 +2040,23 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
);
if( ! ( nStyle_ & SAL_FRAME_STYLE_SIZEABLE ) )
{
- pHints->min_width = rPosSize.GetWidth();
- pHints->min_height = rPosSize.GetHeight();
- pHints->max_width = rPosSize.GetWidth();
- pHints->max_height = rPosSize.GetHeight();
+ pHints->min_width = rPosSize.GetWidth();
+ pHints->min_height = rPosSize.GetHeight();
+ pHints->max_width = rPosSize.GetWidth();
+ pHints->max_height = rPosSize.GetHeight();
pHints->flags |= PMinSize | PMaxSize;
}
if( nShowState_ == SHOWSTATE_UNKNOWN || nShowState_ == SHOWSTATE_HIDDEN )
{
pHints->flags |= PPosition | PWinGravity;
- pHints->x = values.x;
- pHints->y = values.y;
- pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity();
+ pHints->x = values.x;
+ pHints->y = values.y;
+ pHints->win_gravity = pDisplay_->getWMAdaptor()->getPositionWinGravity();
}
if( mbFullScreen )
{
- pHints->max_width = 10000;
- pHints->max_height = 10000;
+ pHints->max_width = 10000;
+ pHints->max_height = 10000;
pHints->flags |= PMaxSize;
}
XSetWMNormalHints( GetXDisplay(),
@@ -2072,19 +2072,19 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, values.width, values.height );
else
XMoveResizeWindow( GetXDisplay(), GetWindow(), values.x, values.y, values.width, values.height );
- }
+ }
- maGeometry.nX = values.x;
- maGeometry.nY = values.y;
- maGeometry.nWidth = values.width;
- maGeometry.nHeight = values.height;
+ maGeometry.nX = values.x;
+ maGeometry.nY = values.y;
+ maGeometry.nWidth = values.width;
+ maGeometry.nHeight = values.height;
if( IsSysChildWindow() && mpParent )
{
// translate back to root coordinates
maGeometry.nX += mpParent->maGeometry.nX;
maGeometry.nY += mpParent->maGeometry.nY;
}
-
+
updateScreenNumber();
if( bSized && ! bMoved )
CallCallback( SALEVENT_RESIZE, NULL );
@@ -2103,7 +2103,7 @@ void X11SalFrame::Minimize()
{
if( IsSysChildWindow() )
return;
-
+
if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ )
{
stderr0( "X11SalFrame::Minimize on withdrawn window\n" );
@@ -2121,7 +2121,7 @@ void X11SalFrame::Maximize()
{
if( IsSysChildWindow() )
return;
-
+
if( SHOWSTATE_MINIMIZED == nShowState_ )
{
GetDisplay()->getWMAdaptor()->frameIsMapping( this );
@@ -2137,7 +2137,7 @@ void X11SalFrame::Restore()
{
if( IsSysChildWindow() )
return;
-
+
if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ )
{
stderr0( "X11SalFrame::Restore on withdrawn window\n" );
@@ -2160,12 +2160,12 @@ void X11SalFrame::SetScreenNumber( unsigned int nNewScreen )
{
if( nNewScreen == maGeometry.nScreenNumber )
return;
-
+
if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 )
{
if( nNewScreen >= GetDisplay()->GetXineramaScreens().size() )
return;
-
+
Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nScreenNumber] );
Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] );
bool bVisible = bMapped_;
@@ -2220,7 +2220,7 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
createNewWindow( None, m_nScreen );
if( GetDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
GetDisplay()->getWMAdaptor()->enableAlwaysOnTop( this, true );
- else
+ else
GetDisplay()->getWMAdaptor()->showFullScreen( this, true );
if( bVisible )
Show(TRUE);
@@ -2263,7 +2263,7 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
}
if( mbFullScreen == (bool)bFullScreen )
return;
-
+
pDisplay_->getWMAdaptor()->showFullScreen( this, bFullScreen );
if( IsOverrideRedirect()
&& WMSupportsFWS( GetXDisplay(), GetDisplay()->GetRootWindow( m_nScreen ) ) )
@@ -2283,7 +2283,7 @@ static Bool
IsRunningXAutoLock( Display *p_display, XLIB_Window a_window )
{
const char *p_atomname = "XAUTOLOCK_SEMAPHORE_PID";
- Atom a_pidatom;
+ Atom a_pidatom;
// xautolock interns this atom
a_pidatom = XInternAtom( p_display, p_atomname, True );
@@ -2294,7 +2294,7 @@ IsRunningXAutoLock( Display *p_display, XLIB_Window a_window )
int n_format;
unsigned long n_items;
unsigned long n_bytes_after;
- pid_t *p_pid;
+ pid_t *p_pid;
pid_t n_pid;
// get pid of running xautolock
XGetWindowProperty (p_display, a_window, a_pidatom, 0L, 2L, False,
@@ -2355,10 +2355,10 @@ void X11SalFrame::StartPresentation( BOOL bStart )
if( ! bStart && hPresentationWindow != None )
doReparentPresentationDialogues( GetDisplay() );
hPresentationWindow = (bStart && IsOverrideRedirect() ) ? GetWindow() : None;
-
-
+
+
// needs static here to save DPMS settings
- int dummy;
+ int dummy;
static bool DPMSExtensionAvailable =
#ifndef SOLARIS
(DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0);
@@ -2372,8 +2372,8 @@ void X11SalFrame::StartPresentation( BOOL bStart )
static CARD16 dpms_standby_timeout=0;
static CARD16 dpms_suspend_timeout=0;
static CARD16 dpms_off_timeout=0;
-
-
+
+
if( bStart || nScreenSaversTimeout_ || DPMSEnabled)
{
if( hPresentationWindow )
@@ -2390,20 +2390,20 @@ void X11SalFrame::StartPresentation( BOOL bStart )
&interval,
&prefer_blanking,
&allow_exposures );
-
-
+
+
// get the DPMS state right before the start
if (DPMSExtensionAvailable)
{
#ifndef SOLARIS
- CARD16 state; // card16 is defined in Xdm.h
- DPMSInfo( GetXDisplay(),
- &state,
+ CARD16 state; // card16 is defined in Xdm.h
+ DPMSInfo( GetXDisplay(),
+ &state,
&DPMSEnabled);
#endif
- }
- if( bStart ) // start show
- {
+ }
+ if( bStart ) // start show
+ {
if ( timeout )
{
nScreenSaversTimeout_ = timeout;
@@ -2412,41 +2412,41 @@ void X11SalFrame::StartPresentation( BOOL bStart )
0,
interval,
prefer_blanking,
- allow_exposures );
+ allow_exposures );
}
#ifndef SOLARIS
if( DPMSEnabled )
{
if ( DPMSExtensionAvailable )
{
- DPMSGetTimeouts( GetXDisplay(),
- &dpms_standby_timeout,
- &dpms_suspend_timeout,
- &dpms_off_timeout);
- DPMSSetTimeouts(GetXDisplay(), 0,0,0);
+ DPMSGetTimeouts( GetXDisplay(),
+ &dpms_standby_timeout,
+ &dpms_suspend_timeout,
+ &dpms_off_timeout);
+ DPMSSetTimeouts(GetXDisplay(), 0,0,0);
}
}
#endif
- }
+ }
else // if( !bStart ) // end of show
{
- if( nScreenSaversTimeout_ )
+ if( nScreenSaversTimeout_ )
{
XSetScreenSaver( GetXDisplay(),
nScreenSaversTimeout_,
interval,
prefer_blanking,
allow_exposures );
- nScreenSaversTimeout_ = 0;
+ nScreenSaversTimeout_ = 0;
}
#ifndef SOLARIS
if ( DPMSEnabled )
- {
+ {
if ( DPMSExtensionAvailable )
{
- // restore timeouts
- DPMSSetTimeouts(GetXDisplay(), dpms_standby_timeout,
- dpms_suspend_timeout, dpms_off_timeout);
+ // restore timeouts
+ DPMSSetTimeouts(GetXDisplay(), dpms_standby_timeout,
+ dpms_suspend_timeout, dpms_off_timeout);
}
}
#endif
@@ -2486,16 +2486,16 @@ void
X11SalFrame::PostExtTextEvent (sal_uInt16 nExtTextEventType, void *pExtTextEvent)
{
XLIB_Window nFocusWindow = GetWindow();
- Atom nEventAtom = GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::SAL_EXTTEXTEVENT );
+ Atom nEventAtom = GetDisplay()->getWMAdaptor()->getAtom( WMAdaptor::SAL_EXTTEXTEVENT );
XEvent aEvent;
- aEvent.xclient.type = ClientMessage;
- aEvent.xclient.serial = 0;
- aEvent.xclient.send_event = True;
- aEvent.xclient.display = GetXDisplay();
- aEvent.xclient.window = nFocusWindow;
- aEvent.xclient.message_type = nEventAtom;
- aEvent.xclient.format = 32;
+ aEvent.xclient.type = ClientMessage;
+ aEvent.xclient.serial = 0;
+ aEvent.xclient.send_event = True;
+ aEvent.xclient.display = GetXDisplay();
+ aEvent.xclient.window = nFocusWindow;
+ aEvent.xclient.message_type = nEventAtom;
+ aEvent.xclient.format = 32;
#if SAL_TYPES_SIZEOFLONG > 4
aEvent.xclient.data.l[0] = (sal_uInt32)((long)pExtTextEvent & 0xffffffff);
@@ -2697,7 +2697,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
bool bWasVisible = bMapped_;
if( bWasVisible )
Show( FALSE );
-
+
if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() )
nScreen = m_nScreen;
@@ -2752,10 +2752,10 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
// update graphics if necessary
updateGraphics(false);
-
+
if( m_aTitle.Len() )
SetTitle( m_aTitle );
-
+
if( mpParent )
{
if( mpParent->m_nScreen != m_nScreen )
@@ -2766,11 +2766,11 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
if( bWasVisible )
Show( TRUE );
-
+
std::list< X11SalFrame* > aChildren = maChildren;
for( std::list< X11SalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
(*it)->createNewWindow( None, m_nScreen );
-
+
// FIXME: SalObjects
}
@@ -2851,9 +2851,9 @@ SalFrame::SalPointerState X11SalFrame::GetPointerState()
long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
{
- SalMouseEvent aMouseEvt;
- USHORT nEvent = 0;
- bool bClosePopups = false;
+ SalMouseEvent aMouseEvt;
+ USHORT nEvent = 0;
+ bool bClosePopups = false;
if( nVisibleFloats && pEvent->type == EnterNotify )
return 0;
@@ -2869,7 +2869,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
if ( pEvent->xcrossing.state & Button2Mask )
{
pEvent->xcrossing.state &= ~Button2Mask;
- pEvent->xcrossing.state |= Button3Mask;
+ pEvent->xcrossing.state |= Button3Mask;
}
break;
@@ -2915,26 +2915,26 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
if( pEvent->xcrossing.mode == NotifyGrab || pEvent->xcrossing.mode == NotifyUngrab )
return 0;
- aMouseEvt.mnX = pEvent->xcrossing.x;
- aMouseEvt.mnY = pEvent->xcrossing.y;
- aMouseEvt.mnTime = pEvent->xcrossing.time;
- aMouseEvt.mnCode = sal_GetCode( pEvent->xcrossing.state );
- aMouseEvt.mnButton = 0;
+ aMouseEvt.mnX = pEvent->xcrossing.x;
+ aMouseEvt.mnY = pEvent->xcrossing.y;
+ aMouseEvt.mnTime = pEvent->xcrossing.time;
+ aMouseEvt.mnCode = sal_GetCode( pEvent->xcrossing.state );
+ aMouseEvt.mnButton = 0;
- nEvent = LeaveNotify == pEvent->type
+ nEvent = LeaveNotify == pEvent->type
? SALEVENT_MOUSELEAVE
: SALEVENT_MOUSEMOVE;
}
else if( pEvent->type == MotionNotify )
{
- aMouseEvt.mnX = pEvent->xmotion.x;
- aMouseEvt.mnY = pEvent->xmotion.y;
- aMouseEvt.mnTime = pEvent->xmotion.time;
- aMouseEvt.mnCode = sal_GetCode( pEvent->xmotion.state );
+ aMouseEvt.mnX = pEvent->xmotion.x;
+ aMouseEvt.mnY = pEvent->xmotion.y;
+ aMouseEvt.mnTime = pEvent->xmotion.time;
+ aMouseEvt.mnCode = sal_GetCode( pEvent->xmotion.state );
- aMouseEvt.mnButton = 0;
+ aMouseEvt.mnButton = 0;
- nEvent = SALEVENT_MOUSEMOVE;
+ nEvent = SALEVENT_MOUSEMOVE;
if( nVisibleFloats > 0 && mpParent )
{
XLIB_Cursor aCursor = mpParent->GetCursor();
@@ -2965,11 +2965,11 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
{
const X11SalFrame* pFrame = static_cast< const X11SalFrame* >(*it);
- if( pFrame->IsFloatGrabWindow() &&
- pFrame->bMapped_ &&
- pEvent->xbutton.x_root >= pFrame->maGeometry.nX &&
- pEvent->xbutton.x_root < pFrame->maGeometry.nX + (int)pFrame->maGeometry.nWidth &&
- pEvent->xbutton.y_root >= pFrame->maGeometry.nY &&
+ if( pFrame->IsFloatGrabWindow() &&
+ pFrame->bMapped_ &&
+ pEvent->xbutton.x_root >= pFrame->maGeometry.nX &&
+ pEvent->xbutton.x_root < pFrame->maGeometry.nX + (int)pFrame->maGeometry.nWidth &&
+ pEvent->xbutton.y_root >= pFrame->maGeometry.nY &&
pEvent->xbutton.y_root < pFrame->maGeometry.nY + (int)pFrame->maGeometry.nHeight )
{
bInside = true;
@@ -3023,7 +3023,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
}
}
}
-
+
if( m_bXEmbed && pEvent->xbutton.button == Button1 )
askForXEmbedFocus( pEvent->xbutton.time );
@@ -3031,19 +3031,19 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
pEvent->xbutton.button == Button2 ||
pEvent->xbutton.button == Button3 )
{
- aMouseEvt.mnX = pEvent->xbutton.x;
- aMouseEvt.mnY = pEvent->xbutton.y;
- aMouseEvt.mnTime = pEvent->xbutton.time;
- aMouseEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
+ aMouseEvt.mnX = pEvent->xbutton.x;
+ aMouseEvt.mnY = pEvent->xbutton.y;
+ aMouseEvt.mnTime = pEvent->xbutton.time;
+ aMouseEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
if( Button1 == pEvent->xbutton.button )
- aMouseEvt.mnButton = MOUSE_LEFT;
+ aMouseEvt.mnButton = MOUSE_LEFT;
else if( Button2 == pEvent->xbutton.button )
- aMouseEvt.mnButton = MOUSE_MIDDLE;
+ aMouseEvt.mnButton = MOUSE_MIDDLE;
else if( Button3 == pEvent->xbutton.button )
- aMouseEvt.mnButton = MOUSE_RIGHT;
+ aMouseEvt.mnButton = MOUSE_RIGHT;
- nEvent = ButtonPress == pEvent->type
+ nEvent = ButtonPress == pEvent->type
? SALEVENT_MOUSEBUTTONDOWN
: SALEVENT_MOUSEBUTTONUP;
}
@@ -3052,17 +3052,17 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
pEvent->xbutton.button == Button6 ||
pEvent->xbutton.button == Button7 )
{
- const bool bIncrement(
+ const bool bIncrement(
pEvent->xbutton.button == Button4 ||
pEvent->xbutton.button == Button6 );
- const bool bHoriz(
+ const bool bHoriz(
pEvent->xbutton.button == Button6 ||
pEvent->xbutton.button == Button7 );
if( pEvent->type == ButtonRelease )
return 0;
- static ULONG nLines = 0;
+ static ULONG nLines = 0;
if( ! nLines )
{
char* pEnv = getenv( "SAL_WHEELLINES" );
@@ -3071,15 +3071,15 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
nLines = SAL_WHEELMOUSE_EVENT_PAGESCROLL;
}
- SalWheelMouseEvent aWheelEvt;
- aWheelEvt.mnTime = pEvent->xbutton.time;
- aWheelEvt.mnX = pEvent->xbutton.x;
- aWheelEvt.mnY = pEvent->xbutton.y;
- aWheelEvt.mnDelta = bIncrement ? 120 : -120;
- aWheelEvt.mnNotchDelta = bIncrement ? 1 : -1;
+ SalWheelMouseEvent aWheelEvt;
+ aWheelEvt.mnTime = pEvent->xbutton.time;
+ aWheelEvt.mnX = pEvent->xbutton.x;
+ aWheelEvt.mnY = pEvent->xbutton.y;
+ aWheelEvt.mnDelta = bIncrement ? 120 : -120;
+ aWheelEvt.mnNotchDelta = bIncrement ? 1 : -1;
aWheelEvt.mnScrollLines = nLines;
- aWheelEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
- aWheelEvt.mbHorz = bHoriz;
+ aWheelEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
+ aWheelEvt.mbHorz = bHoriz;
nEvent = SALEVENT_WHEELMOUSE;
@@ -3124,8 +3124,8 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
// in the independent part.
struct KeyAlternate
{
- USHORT nKeyCode;
- sal_Unicode nCharCode;
+ USHORT nKeyCode;
+ sal_Unicode nCharCode;
KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {}
KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
@@ -3147,10 +3147,10 @@ GetAlternateKeyCode( const USHORT nKeyCode )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
{
- KeySym nKeySym;
+ KeySym nKeySym;
KeySym nUnmodifiedKeySym;
- int nLen = 2048;
- unsigned char *pPrintable = (unsigned char*)alloca( nLen );
+ int nLen = 2048;
+ unsigned char *pPrintable = (unsigned char*)alloca( nLen );
// singlebyte code composed by input method, the new default
if (mpInputContext != NULL && mpInputContext->UseContext())
@@ -3180,7 +3180,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
SalKeyEvent aKeyEvt;
USHORT nKeyCode;
USHORT nModCode = 0;
- char aDummy;
+ char aDummy;
if( pEvent->state & ShiftMask )
nModCode |= KEY_SHIFT;
@@ -3189,10 +3189,10 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if( pEvent->state & Mod1Mask )
nModCode |= KEY_MOD2;
- if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R
- || nKeySym == XK_Control_L || nKeySym == XK_Control_R
- || nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
- || nKeySym == XK_Meta_L || nKeySym == XK_Meta_R
+ if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R
+ || nKeySym == XK_Control_L || nKeySym == XK_Control_R
+ || nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
+ || nKeySym == XK_Meta_L || nKeySym == XK_Meta_R
|| nKeySym == XK_Super_L || nKeySym == XK_Super_R )
{
SalKeyModEvent aModEvt;
@@ -3275,9 +3275,9 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
else if( mbKeyMenu )
{
// simulate KEY_MENU
- aKeyEvt.mnCode = KEY_MENU | nModCode;
+ aKeyEvt.mnCode = KEY_MENU | nModCode;
aKeyEvt.mnRepeat = 0;
- aKeyEvt.mnTime = pEvent->time;
+ aKeyEvt.mnTime = pEvent->time;
aKeyEvt.mnCharCode = 0;
nRet = CallCallback( SALEVENT_KEYINPUT, &aKeyEvt );
nRet = CallCallback( SALEVENT_KEYUP, &aKeyEvt );
@@ -3305,7 +3305,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
// information (in et_EE locale: "Compose + Z + <" delivers "," in printable and
// (the desired) Zcaron in KeySym
sal_Unicode nKeyString = 0x0;
- if ( (nLen == 0)
+ if ( (nLen == 0)
|| ((nLen == 1) && (nKeySym > 0)) )
nKeyString = KeysymToUnicode (nKeySym);
// if we have nothing we give up
@@ -3383,9 +3383,9 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
else
// normal single character keyinput
{
- aKeyEvt.mnCode = nKeyCode | nModCode;
+ aKeyEvt.mnCode = nKeyCode | nModCode;
aKeyEvt.mnRepeat = 0;
- aKeyEvt.mnTime = pEvent->time;
+ aKeyEvt.mnTime = pEvent->time;
aKeyEvt.mnCharCode = pString[ 0 ];
if( KeyRelease == pEvent->type )
@@ -3431,14 +3431,14 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
if( nVisibleFloats > 0 && GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "ReflectionX Windows" ) )
return 1;
- /* #55691# ignore focusout resulting from keyboard grabs
- * we do not grab it and are not interested when
- * someone else does CDE e.g. does a XGrabKey on arrow keys
- * #73179# handle focus events with mode NotifyWhileGrabbed
- * because with CDE alt-tab focus changing we do not get
- * normal focus events
- * #71791# cast focus event to the input context, otherwise the
- * status window does not follow the application frame
+ /* #55691# ignore focusout resulting from keyboard grabs
+ * we do not grab it and are not interested when
+ * someone else does CDE e.g. does a XGrabKey on arrow keys
+ * #73179# handle focus events with mode NotifyWhileGrabbed
+ * because with CDE alt-tab focus changing we do not get
+ * normal focus events
+ * #71791# cast focus event to the input context, otherwise the
+ * status window does not follow the application frame
*/
if ( mpInputContext != NULL )
@@ -3450,7 +3450,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
/*
* do not unset the IC focuse here because would kill
* a lookup choice windows that might have the focus now
- * mpInputContext->UnsetICFocus( this );
+ * mpInputContext->UnsetICFocus( this );
*/
I18NStatus::get().show( false, I18NStatus::focus );
}
@@ -3500,24 +3500,24 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
{
- XRectangle aRect = { 0, 0, 0, 0 };
- USHORT nCount = 0;
+ XRectangle aRect = { 0, 0, 0, 0 };
+ USHORT nCount = 0;
if( pEvent->type == Expose )
{
- aRect.x = pEvent->xexpose.x;
- aRect.y = pEvent->xexpose.y;
- aRect.width = pEvent->xexpose.width;
- aRect.height = pEvent->xexpose.height;
- nCount = pEvent->xexpose.count;
+ aRect.x = pEvent->xexpose.x;
+ aRect.y = pEvent->xexpose.y;
+ aRect.width = pEvent->xexpose.width;
+ aRect.height = pEvent->xexpose.height;
+ nCount = pEvent->xexpose.count;
}
else if( pEvent->type == GraphicsExpose )
{
- aRect.x = pEvent->xgraphicsexpose.x;
- aRect.y = pEvent->xgraphicsexpose.y;
- aRect.width = pEvent->xgraphicsexpose.width;
- aRect.height = pEvent->xgraphicsexpose.height;
- nCount = pEvent->xgraphicsexpose.count;
+ aRect.x = pEvent->xgraphicsexpose.x;
+ aRect.y = pEvent->xgraphicsexpose.y;
+ aRect.width = pEvent->xgraphicsexpose.width;
+ aRect.height = pEvent->xgraphicsexpose.height;
+ nCount = pEvent->xgraphicsexpose.count;
}
if( IsOverrideRedirect() && mbFullScreen &&
@@ -3567,8 +3567,8 @@ void X11SalFrame::RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelW
// if a child is behind its parent, place it above the
// parent (for insane WMs like Dtwm and olwm)
XWindowChanges aCfg;
- aCfg.sibling = GetStackingWindow();
- aCfg.stack_mode = Above;
+ aCfg.sibling = GetStackingWindow();
+ aCfg.stack_mode = Above;
XConfigureWindow( GetXDisplay(), pData->GetStackingWindow(), CWSibling|CWStackMode, &aCfg );
break;
}
@@ -3653,16 +3653,16 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
if( SHOWSTATE_UNKNOWN == nShowState_ && bMapped_ )
nShowState_ = SHOWSTATE_NORMAL;
- nWidth_ = pEvent->width;
- nHeight_ = pEvent->height;
+ nWidth_ = pEvent->width;
+ nHeight_ = pEvent->height;
bool bMoved = ( pEvent->x != maGeometry.nX || pEvent->y != maGeometry.nY );
bool bSized = ( pEvent->width != (int)maGeometry.nWidth || pEvent->height != (int)maGeometry.nHeight );
- maGeometry.nX = pEvent->x;
- maGeometry.nY = pEvent->y;
- maGeometry.nWidth = pEvent->width;
- maGeometry.nHeight = pEvent->height;
+ maGeometry.nX = pEvent->x;
+ maGeometry.nY = pEvent->y;
+ maGeometry.nWidth = pEvent->width;
+ maGeometry.nHeight = pEvent->height;
updateScreenNumber();
// update children's position
@@ -3688,11 +3688,11 @@ IMPL_LINK( X11SalFrame, HandleAlwaysOnTopRaise, void*, EMPTYARG )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
{
- Display *pDisplay = pEvent->display;
- XLIB_Window hWM_Parent;
- XLIB_Window hRoot, *Children, hDummy;
- unsigned int nChildren;
- BOOL bNone = pDisplay_->GetProperties()
+ Display *pDisplay = pEvent->display;
+ XLIB_Window hWM_Parent;
+ XLIB_Window hRoot, *Children, hDummy;
+ unsigned int nChildren;
+ BOOL bNone = pDisplay_->GetProperties()
& PROPERTY_SUPPORT_WM_Parent_Pixmap_None;
BOOL bAccessParentWindow = ! (pDisplay_->GetProperties()
& PROPERTY_FEATURE_TrustedSolaris);
@@ -3749,9 +3749,9 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
XSelectInput( pDisplay, GetStackingWindow(), StructureNotifyMask );
}
- if( hWM_Parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() )
- || hWM_Parent == GetForeignParent()
- || pEvent->parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() )
+ if( hWM_Parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() )
+ || hWM_Parent == GetForeignParent()
+ || pEvent->parent == pDisplay_->GetRootWindow( pDisplay_->GetDefaultScreenNumber() )
|| ( nStyle_ & SAL_FRAME_STYLE_FLOAT ) )
{
// Reparenting before Destroy
@@ -3800,8 +3800,8 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
&nLeft,
&nTop,
&hDummy );
- maGeometry.nLeftDecoration = nLeft > 0 ? nLeft-1 : 0;
- maGeometry.nTopDecoration = nTop > 0 ? nTop-1 : 0;
+ maGeometry.nLeftDecoration = nLeft > 0 ? nLeft-1 : 0;
+ maGeometry.nTopDecoration = nTop > 0 ? nTop-1 : 0;
/*
* decorations are not symmetric,
@@ -3822,16 +3822,16 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
bool bResized = false;
if( ! GetDisplay()->GetXLib()->HasXErrorOccured() )
{
- maGeometry.nRightDecoration = wp - w - maGeometry.nLeftDecoration;
- maGeometry.nBottomDecoration = hp - h - maGeometry.nTopDecoration;
+ maGeometry.nRightDecoration = wp - w - maGeometry.nLeftDecoration;
+ maGeometry.nBottomDecoration = hp - h - maGeometry.nTopDecoration;
/*
* note: this works because hWM_Parent is direct child of root,
* not necessarily parent of GetShellWindow()
*/
- maGeometry.nX = xp + nLeft;
- maGeometry.nY = yp + nTop;
+ maGeometry.nX = xp + nLeft;
+ maGeometry.nY = yp + nTop;
bResized = w != maGeometry.nWidth || h != maGeometry.nHeight;
- maGeometry.nWidth = w;
+ maGeometry.nWidth = w;
maGeometry.nHeight = h;
}
@@ -3847,16 +3847,16 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
int nScreenHeight = aScreenSize.Height();
int nFrameWidth = maGeometry.nWidth + maGeometry.nLeftDecoration + maGeometry.nRightDecoration;
int nFrameHeight = maGeometry.nHeight + maGeometry.nTopDecoration + maGeometry.nBottomDecoration;
-
+
if ((nFrameWidth > nScreenWidth) || (nFrameHeight > nScreenHeight))
{
Size aSize(maGeometry.nWidth, maGeometry.nHeight);
-
+
if (nFrameWidth > nScreenWidth)
aSize.Width() = nScreenWidth - maGeometry.nRightDecoration - maGeometry.nLeftDecoration;
if (nFrameHeight > nScreenHeight)
aSize.Height() = nScreenHeight - maGeometry.nBottomDecoration - maGeometry.nTopDecoration;
-
+
SetSize( aSize );
bResized = false;
}
@@ -3878,18 +3878,18 @@ long X11SalFrame::HandleColormapEvent( XColormapEvent* )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
{
- Atom actual_type;
- int actual_format;
+ Atom actual_type;
+ int actual_format;
unsigned long nitems, bytes_after;
unsigned char *prop = NULL;
if( 0 != XGetWindowProperty( GetXDisplay(),
GetShellWindow(),
- pEvent->atom, // property
- 0, // long_offset (32bit)
- 2, // long_length (32bit)
- False, // delete
- pEvent->atom, // req_type
+ pEvent->atom, // property
+ 0, // long_offset (32bit)
+ 2, // long_length (32bit)
+ False, // delete
+ pEvent->atom, // req_type
&actual_type,
&actual_format,
&nitems,
@@ -3901,8 +3901,8 @@ long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
DBG_ASSERT( actual_type = pEvent->atom
&& 32 == actual_format
- && 2 == nitems
- && 0 == bytes_after, "HandleStateEvent" );
+ && 2 == nitems
+ && 0 == bytes_after, "HandleStateEvent" );
if( *(unsigned long*)prop == NormalState )
nShowState_ = SHOWSTATE_NORMAL;
@@ -3956,7 +3956,7 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_SAVE_YOURSELF ) )
{
bool bSession = rWMAdaptor.getWindowManagerName().EqualsAscii( "Dtwm" );
-
+
if( ! bSession )
{
if( this == s_pSaveYourselfFrame )
@@ -4030,7 +4030,7 @@ void X11SalFrame::SaveYourselfDone( SalFrame* pSaveFrame )
pFrame = static_cast< const X11SalFrame* >(*it);
if( pFrame == pSaveFrame )
break;
- ++it;
+ ++it;
}
if( pFrame == pSaveFrame )
{
@@ -4058,10 +4058,10 @@ Bool X11SalFrame::checkKeyReleaseForRepeat( Display*, XEvent* pCheck, XPointer p
{
X11SalFrame* pThis = (X11SalFrame*)pX11SalFrame;
return
- pCheck->type == XLIB_KeyPress &&
- pCheck->xkey.state == pThis->nKeyState_ &&
- pCheck->xkey.keycode == pThis->nKeyCode_ &&
- pCheck->xkey.time == pThis->nReleaseTime_ ? True : False;
+ pCheck->type == XLIB_KeyPress &&
+ pCheck->xkey.state == pThis->nKeyState_ &&
+ pCheck->xkey.keycode == pThis->nKeyCode_ &&
+ pCheck->xkey.time == pThis->nReleaseTime_ ? True : False;
}
long X11SalFrame::Dispatch( XEvent *pEvent )
@@ -4082,9 +4082,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
switch( pEvent->type )
{
case XLIB_KeyPress:
- nKeyCode_ = pEvent->xkey.keycode;
- nKeyState_ = pEvent->xkey.state;
- nRet = HandleKeyEvent( &pEvent->xkey );
+ nKeyCode_ = pEvent->xkey.keycode;
+ nKeyState_ = pEvent->xkey.state;
+ nRet = HandleKeyEvent( &pEvent->xkey );
break;
case KeyRelease:
@@ -4095,7 +4095,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
if( XCheckIfEvent( pEvent->xkey.display, &aEvent, call_checkKeyReleaseForRepeat, (XPointer)this ) )
XPutBackEvent( pEvent->xkey.display, &aEvent );
else
- nRet = HandleKeyEvent( &pEvent->xkey );
+ nRet = HandleKeyEvent( &pEvent->xkey );
}
break;
@@ -4156,13 +4156,13 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
*/
maPaintRegion.Union( Rectangle( Point( 0, 0 ), Size( maGeometry.nWidth, maGeometry.nHeight ) ) );
XEvent aEvent;
- aEvent.xexpose.type = Expose;
- aEvent.xexpose.display = pDisplay_->GetDisplay();
- aEvent.xexpose.x = 0;
- aEvent.xexpose.y = 0;
- aEvent.xexpose.width = maGeometry.nWidth;
- aEvent.xexpose.height = maGeometry.nHeight;
- aEvent.xexpose.count = 0;
+ aEvent.xexpose.type = Expose;
+ aEvent.xexpose.display = pDisplay_->GetDisplay();
+ aEvent.xexpose.x = 0;
+ aEvent.xexpose.y = 0;
+ aEvent.xexpose.width = maGeometry.nWidth;
+ aEvent.xexpose.height = maGeometry.nHeight;
+ aEvent.xexpose.count = 0;
XSendEvent( pDisplay_->GetDisplay(),
GetWindow(),
True,
@@ -4220,7 +4220,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
CurrentTime );
bSetFocus = false;
}
-
+
if( bSetFocus )
{
XSetInputFocus( GetXDisplay(),
@@ -4228,7 +4228,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
RevertToParent,
CurrentTime );
}
-
+
RestackChildren();
mbInShow = FALSE;
@@ -4327,13 +4327,13 @@ void X11SalFrame::ResetClipRegion()
delete [] m_pClipRectangles;
m_pClipRectangles = NULL;
m_nCurClipRect = m_nMaxClipRect = 0;
-
- const int dest_kind = ShapeBounding;
- const int op = ShapeSet;
- const int ordering = YSorted;
+
+ const int dest_kind = ShapeBounding;
+ const int op = ShapeSet;
+ const int ordering = YSorted;
XWindowAttributes win_attrib;
- XRectangle win_size;
+ XRectangle win_size;
XLIB_Window aShapeWindow = mhShellWindow;
@@ -4341,17 +4341,17 @@ void X11SalFrame::ResetClipRegion()
aShapeWindow,
&win_attrib );
- win_size.x = 0;
- win_size.y = 0;
- win_size.width = win_attrib.width;
+ win_size.x = 0;
+ win_size.y = 0;
+ win_size.width = win_attrib.width;
win_size.height = win_attrib.height;
XShapeCombineRectangles ( GetDisplay()->GetDisplay(),
aShapeWindow,
dest_kind,
- 0, 0, // x_off, y_off
- &win_size, // list of rectangles
- 1, // number of rectangles
+ 0, 0, // x_off, y_off
+ &win_size, // list of rectangles
+ 1, // number of rectangles
op, ordering );
}
@@ -4381,9 +4381,9 @@ void X11SalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
void X11SalFrame::EndSetClipRegion()
{
- const int dest_kind = ShapeBounding;
- const int ordering = YSorted;
- const int op = ShapeSet;
+ const int dest_kind = ShapeBounding;
+ const int ordering = YSorted;
+ const int op = ShapeSet;
XLIB_Window aShapeWindow = mhShellWindow;
XShapeCombineRectangles ( GetDisplay()->GetDisplay(),
diff --git a/vcl/unx/source/window/salmenu.cxx b/vcl/unx/source/window/salmenu.cxx
index 0739b6cd5352..ff08c8c36836 100644
--- a/vcl/unx/source/window/salmenu.cxx
+++ b/vcl/unx/source/window/salmenu.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,7 +74,7 @@ X11SalMenu::~X11SalMenu()
BOOL X11SalMenu::VisibleMenuBar()
{
- return FALSE;
+ return FALSE;
}
void X11SalMenu::SetFrame( const SalFrame* )
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
index 647b95ae032c..20a7749a30ac 100644
--- a/vcl/unx/source/window/salobj.cxx
+++ b/vcl/unx/source/window/salobj.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,8 +63,8 @@ SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pW
X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow )
{
int error_base, event_base;
- X11SalObject* pObject = new X11SalObject();
- SystemChildData* pObjData = const_cast<SystemChildData*>(pObject->GetSystemData());
+ X11SalObject* pObject = new X11SalObject();
+ SystemChildData* pObjData = const_cast<SystemChildData*>(pObject->GetSystemData());
if ( ! XShapeQueryExtension( (Display*)pObjData->pDisplay,
&event_base, &error_base ) )
@@ -74,12 +74,12 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
}
pObject->mpParent = pParent;
-
- SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- const SystemEnvData* pEnv = pParent->GetSystemData();
- Display* pDisp = pSalDisp->GetDisplay();
- XLIB_Window aObjectParent = (XLIB_Window)pEnv->aWindow;
-
+
+ SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
+ const SystemEnvData* pEnv = pParent->GetSystemData();
+ Display* pDisp = pSalDisp->GetDisplay();
+ XLIB_Window aObjectParent = (XLIB_Window)pEnv->aWindow;
+
// find out on which screen that window is
XWindowAttributes aParentAttr;
XGetWindowAttributes( pDisp, aObjectParent, &aParentAttr );
@@ -137,7 +137,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pSalDisp->GetXLib()->PushXErrorLevel( true );
// create colormap for visual - there might not be one
- pObject->maColormap = aAttribs.colormap = XCreateColormap(
+ pObject->maColormap = aAttribs.colormap = XCreateColormap(
pDisp,
pSalDisp->GetRootWindow( nScreen ),
pVisual,
@@ -169,14 +169,14 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
XMapWindow( pDisp, pObject->maPrimary );
}
- pObjData->pDisplay = pDisp;
- pObjData->aWindow = pObject->maSecondary;
- pObjData->pWidget = NULL;
- pObjData->pVisual = pVisual;
- pObjData->nDepth = nDepth;
- pObjData->aColormap = aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ?
+ pObjData->pDisplay = pDisp;
+ pObjData->aWindow = pObject->maSecondary;
+ pObjData->pWidget = NULL;
+ pObjData->pVisual = pVisual;
+ pObjData->nDepth = nDepth;
+ pObjData->aColormap = aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ?
pSalDisp->GetColormap( nScreen ).GetXColormap() : None;
- pObjData->pAppContext = NULL;
+ pObjData->pAppContext = NULL;
XSync(pDisp, False);
BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
@@ -237,8 +237,8 @@ SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
{
XRectangle *aRect = ClipRectangleList + numClipRectangles;
- aRect->x = (short) nX;
- aRect->y = (short) nY;
+ aRect->x = (short) nX;
+ aRect->y = (short) nY;
aRect->width = (unsigned short) nWidth;
aRect->height= (unsigned short) nHeight;
@@ -253,19 +253,19 @@ SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
X11SalObject::X11SalObject()
{
- maSystemChildData.nSize = sizeof( SystemChildData );
- maSystemChildData.pDisplay = GetX11SalData()->GetDisplay()->GetDisplay();
- maSystemChildData.aWindow = None;
- maSystemChildData.pSalFrame = 0;
- maSystemChildData.pWidget = 0;
- maSystemChildData.pVisual = 0;
- maSystemChildData.nDepth = 0;
- maSystemChildData.aColormap = 0;
- maSystemChildData.pAppContext = NULL;
- maSystemChildData.aShellWindow = 0;
- maSystemChildData.pShellWidget = NULL;
- maPrimary = 0;
- maSecondary = 0;
+ maSystemChildData.nSize = sizeof( SystemChildData );
+ maSystemChildData.pDisplay = GetX11SalData()->GetDisplay()->GetDisplay();
+ maSystemChildData.aWindow = None;
+ maSystemChildData.pSalFrame = 0;
+ maSystemChildData.pWidget = 0;
+ maSystemChildData.pVisual = 0;
+ maSystemChildData.nDepth = 0;
+ maSystemChildData.aColormap = 0;
+ maSystemChildData.pAppContext = NULL;
+ maSystemChildData.aShellWindow = 0;
+ maSystemChildData.pShellWidget = NULL;
+ maPrimary = 0;
+ maSecondary = 0;
maColormap = 0;
std::list< SalObject* >& rObjects = GetX11SalData()->GetDisplay()->getSalObjects();
@@ -279,7 +279,7 @@ X11SalObject::~X11SalObject()
rObjects.remove( this );
SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
pSalDisp->GetXLib()->PushXErrorLevel( true );
- if ( maSecondary )
+ if ( maSecondary )
XDestroyWindow( (Display*)maSystemChildData.pDisplay, maSecondary );
if ( maPrimary )
XDestroyWindow( (Display*)maSystemChildData.pDisplay, maPrimary );
@@ -295,12 +295,12 @@ X11SalObject::ResetClipRegion()
{
maClipRegion.ResetClipRegion();
- const int dest_kind = ShapeBounding;
- const int op = ShapeSet;
- const int ordering = YSorted;
+ const int dest_kind = ShapeBounding;
+ const int op = ShapeSet;
+ const int ordering = YSorted;
XWindowAttributes win_attrib;
- XRectangle win_size;
+ XRectangle win_size;
XLIB_Window aShapeWindow = maPrimary;
@@ -308,17 +308,17 @@ X11SalObject::ResetClipRegion()
aShapeWindow,
&win_attrib );
- win_size.x = 0;
- win_size.y = 0;
- win_size.width = win_attrib.width;
+ win_size.x = 0;
+ win_size.y = 0;
+ win_size.width = win_attrib.width;
win_size.height = win_attrib.height;
XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay,
aShapeWindow,
dest_kind,
- 0, 0, // x_off, y_off
- &win_size, // list of rectangles
- 1, // number of rectangles
+ 0, 0, // x_off, y_off
+ &win_size, // list of rectangles
+ 1, // number of rectangles
op, ordering );
}
@@ -341,12 +341,12 @@ void
X11SalObject::EndSetClipRegion()
{
XRectangle *pRectangles = maClipRegion.EndSetClipRegion ();
- const int nType = maClipRegion.GetClipRegionType();
- const int nRectangles = maClipRegion.GetRectangleCount();
+ const int nType = maClipRegion.GetClipRegionType();
+ const int nRectangles = maClipRegion.GetRectangleCount();
- const int dest_kind = ShapeBounding;
- const int ordering = YSorted;
- int op;
+ const int dest_kind = ShapeBounding;
+ const int ordering = YSorted;
+ int op;
switch ( nType )
{
@@ -364,7 +364,7 @@ X11SalObject::EndSetClipRegion()
}
XLIB_Window aShapeWindow = maPrimary;
-
+
XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay,
aShapeWindow,
dest_kind,
@@ -401,7 +401,7 @@ X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
void
X11SalObject::Show( BOOL bVisible )
{
- if ( ! maSystemChildData.aWindow )
+ if ( ! maSystemChildData.aWindow )
return;
if ( bVisible ) {