summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/aqua/inc/aqua11yfactory.h4
-rw-r--r--vcl/aqua/inc/aqua11yfocustracker.hxx26
-rw-r--r--vcl/aqua/inc/aqua11ylistener.hxx12
-rw-r--r--vcl/aqua/inc/aqua11ywrapper.h2
-rw-r--r--vcl/aqua/inc/aquaprintview.h6
-rw-r--r--vcl/aqua/inc/aquavclevents.hxx2
-rw-r--r--vcl/aqua/inc/aquavcltypes.h2
-rw-r--r--vcl/aqua/inc/keyboardfocuslistener.hxx2
-rw-r--r--vcl/aqua/inc/salatsuifontutils.hxx10
-rw-r--r--vcl/aqua/inc/salbmp.h56
-rw-r--r--vcl/aqua/inc/salcolorutils.hxx4
-rw-r--r--vcl/aqua/inc/salconst.h2
-rw-r--r--vcl/aqua/inc/saldata.hxx36
-rw-r--r--vcl/aqua/inc/salfontutils.hxx4
-rw-r--r--vcl/aqua/inc/salframe.h122
-rw-r--r--vcl/aqua/inc/salframeview.h14
-rw-r--r--vcl/aqua/inc/salgdi.h212
-rw-r--r--vcl/aqua/inc/salinst.h88
-rw-r--r--vcl/aqua/inc/salmathutils.hxx6
-rw-r--r--vcl/aqua/inc/salmenu.h12
-rw-r--r--vcl/aqua/inc/salnativewidgets.h6
-rw-r--r--vcl/aqua/inc/salnsmenu.h2
-rw-r--r--vcl/aqua/inc/salnstimer.h2
-rw-r--r--vcl/aqua/inc/salobj.h40
-rw-r--r--vcl/aqua/inc/salprn.h82
-rw-r--r--vcl/aqua/inc/salsys.h2
-rw-r--r--vcl/aqua/inc/saltimer.h4
-rw-r--r--vcl/aqua/inc/salvd.h8
-rw-r--r--vcl/aqua/inc/svsys.h2
-rw-r--r--vcl/aqua/inc/vclnsapp.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yactionwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ycomponentwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocuslistener.cxx22
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocuslistener.hxx12
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocustracker.cxx46
-rw-r--r--vcl/aqua/source/a11y/aqua11ylistener.cxx40
-rw-r--r--vcl/aqua/source/a11y/aqua11yrolehelper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ytablewrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yutil.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yvaluewrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperbutton.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercheckbox.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercombobox.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappergroup.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperlist.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperrow.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappersplitter.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperstatictext.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertabgroup.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertextarea.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertoolbar.h2
-rw-r--r--vcl/aqua/source/a11y/documentfocuslistener.cxx62
-rw-r--r--vcl/aqua/source/a11y/documentfocuslistener.hxx10
-rw-r--r--vcl/aqua/source/app/saldata.cxx10
-rw-r--r--vcl/aqua/source/app/salinst.cxx8
-rw-r--r--vcl/aqua/source/app/salsys.cxx6
-rw-r--r--vcl/aqua/source/app/saltimer.cxx2
-rw-r--r--vcl/aqua/source/dtrans/DataFlavorMapping.cxx44
-rw-r--r--vcl/aqua/source/dtrans/DataFlavorMapping.hxx22
-rw-r--r--vcl/aqua/source/dtrans/DragActionConversion.cxx10
-rw-r--r--vcl/aqua/source/dtrans/DragActionConversion.hxx6
-rw-r--r--vcl/aqua/source/dtrans/DragSource.cxx46
-rw-r--r--vcl/aqua/source/dtrans/DragSource.hxx12
-rw-r--r--vcl/aqua/source/dtrans/DragSourceContext.cxx2
-rw-r--r--vcl/aqua/source/dtrans/DragSourceContext.hxx10
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.cxx86
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.hxx10
-rw-r--r--vcl/aqua/source/dtrans/HtmlFmtFlt.cxx64
-rw-r--r--vcl/aqua/source/dtrans/HtmlFmtFlt.hxx2
-rw-r--r--vcl/aqua/source/dtrans/OSXTransferable.cxx30
-rw-r--r--vcl/aqua/source/dtrans/OSXTransferable.hxx16
-rw-r--r--vcl/aqua/source/dtrans/PictToBmpFlt.cxx44
-rw-r--r--vcl/aqua/source/dtrans/PictToBmpFlt.hxx10
-rw-r--r--vcl/aqua/source/dtrans/aqua_clipboard.cxx80
-rw-r--r--vcl/aqua/source/dtrans/aqua_clipboard.hxx40
-rw-r--r--vcl/aqua/source/dtrans/aqua_service.cxx16
-rw-r--r--vcl/aqua/source/dtrans/service_entry.cxx2
-rw-r--r--vcl/aqua/source/dtrans/test_aquacb.cxx28
-rw-r--r--vcl/aqua/source/gdi/salatslayout.cxx126
-rw-r--r--vcl/aqua/source/gdi/salatsuifontutils.cxx18
-rw-r--r--vcl/aqua/source/gdi/salbmp.cxx108
-rw-r--r--vcl/aqua/source/gdi/salcolorutils.cxx2
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx102
-rw-r--r--vcl/aqua/source/gdi/salgdiutils.cxx16
-rw-r--r--vcl/aqua/source/gdi/salmathutils.cxx26
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx286
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx98
-rw-r--r--vcl/aqua/source/gdi/salvd.cxx18
-rw-r--r--vcl/aqua/source/window/salframe.cxx168
-rw-r--r--vcl/aqua/source/window/salmenu.cxx80
-rw-r--r--vcl/aqua/source/window/salobj.cxx12
-rw-r--r--vcl/inc/cupsmgr.hxx26
-rw-r--r--vcl/inc/list.h4
-rw-r--r--vcl/inc/pch/precompiled_vcl.cxx2
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx2
-rw-r--r--vcl/inc/sft.hxx26
-rw-r--r--vcl/inc/vcl/ImageListProvider.hxx2
-rw-r--r--vcl/inc/vcl/abstdlg.hxx20
-rw-r--r--vcl/inc/vcl/accel.h14
-rw-r--r--vcl/inc/vcl/accel.hxx112
-rw-r--r--vcl/inc/vcl/accmgr.hxx2
-rw-r--r--vcl/inc/vcl/alpha.hxx40
-rw-r--r--vcl/inc/vcl/animate.hxx198
-rw-r--r--vcl/inc/vcl/apptypes.hxx2
-rw-r--r--vcl/inc/vcl/arrange.hxx40
-rw-r--r--vcl/inc/vcl/bitmap.hxx172
-rw-r--r--vcl/inc/vcl/bitmapex.hxx136
-rw-r--r--vcl/inc/vcl/bmpacc.hxx50
-rw-r--r--vcl/inc/vcl/bmpfast.hxx2
-rw-r--r--vcl/inc/vcl/brdwin.hxx378
-rw-r--r--vcl/inc/vcl/btndlg.hxx88
-rw-r--r--vcl/inc/vcl/button.hxx26
-rw-r--r--vcl/inc/vcl/canvasbitmap.hxx6
-rw-r--r--vcl/inc/vcl/canvastools.hxx120
-rw-r--r--vcl/inc/vcl/cmdevt.h48
-rw-r--r--vcl/inc/vcl/cmdevt.hxx40
-rw-r--r--vcl/inc/vcl/combobox.h12
-rw-r--r--vcl/inc/vcl/combobox.hxx26
-rw-r--r--vcl/inc/vcl/configsettings.hxx4
-rw-r--r--vcl/inc/vcl/controldata.hxx2
-rw-r--r--vcl/inc/vcl/controllayout.hxx10
-rw-r--r--vcl/inc/vcl/ctrl.hxx36
-rw-r--r--vcl/inc/vcl/cursor.hxx88
-rw-r--r--vcl/inc/vcl/cvtgrf.hxx20
-rw-r--r--vcl/inc/vcl/cvtsvm.hxx102
-rw-r--r--vcl/inc/vcl/dbggui.hxx2
-rw-r--r--vcl/inc/vcl/decoview.hxx74
-rw-r--r--vcl/inc/vcl/dialog.hxx54
-rw-r--r--vcl/inc/vcl/dllapi.h2
-rw-r--r--vcl/inc/vcl/dndevdis.hxx32
-rw-r--r--vcl/inc/vcl/dndhelp.hxx12
-rw-r--r--vcl/inc/vcl/dndlcon.hxx16
-rw-r--r--vcl/inc/vcl/dockingarea.hxx4
-rw-r--r--vcl/inc/vcl/dockwin.hxx280
-rw-r--r--vcl/inc/vcl/edit.hxx162
-rw-r--r--vcl/inc/vcl/event.hxx6
-rw-r--r--vcl/inc/vcl/evntpost.hxx2
-rw-r--r--vcl/inc/vcl/extoutdevdata.hxx2
-rw-r--r--vcl/inc/vcl/field.hxx8
-rw-r--r--vcl/inc/vcl/fixbrd.hxx40
-rw-r--r--vcl/inc/vcl/fixed.hxx4
-rw-r--r--vcl/inc/vcl/fldunit.hxx2
-rw-r--r--vcl/inc/vcl/floatwin.hxx144
-rw-r--r--vcl/inc/vcl/fntstyle.hxx8
-rw-r--r--vcl/inc/vcl/font.hxx148
-rw-r--r--vcl/inc/vcl/fontcache.hxx18
-rw-r--r--vcl/inc/vcl/fontmanager.hxx146
-rw-r--r--vcl/inc/vcl/fontsubset.hxx72
-rw-r--r--vcl/inc/vcl/gdimtf.hxx62
-rw-r--r--vcl/inc/vcl/gfxlink.hxx114
-rw-r--r--vcl/inc/vcl/glyphcache.hxx4
-rw-r--r--vcl/inc/vcl/gradient.hxx8
-rw-r--r--vcl/inc/vcl/graph.h2
-rw-r--r--vcl/inc/vcl/graph.hxx4
-rw-r--r--vcl/inc/vcl/graphictools.hxx226
-rw-r--r--vcl/inc/vcl/graphite_adaptors.hxx2
-rw-r--r--vcl/inc/vcl/graphite_cache.hxx2
-rw-r--r--vcl/inc/vcl/graphite_features.hxx2
-rw-r--r--vcl/inc/vcl/graphite_layout.hxx2
-rw-r--r--vcl/inc/vcl/graphite_serverfont.hxx2
-rw-r--r--vcl/inc/vcl/group.hxx4
-rw-r--r--vcl/inc/vcl/hatch.hxx30
-rw-r--r--vcl/inc/vcl/help.hxx88
-rw-r--r--vcl/inc/vcl/helper.hxx2
-rw-r--r--vcl/inc/vcl/helpwin.hxx48
-rw-r--r--vcl/inc/vcl/i18nhelp.hxx10
-rw-r--r--vcl/inc/vcl/idlemgr.hxx2
-rw-r--r--vcl/inc/vcl/ilstbox.hxx616
-rw-r--r--vcl/inc/vcl/image.h66
-rw-r--r--vcl/inc/vcl/image.hxx80
-rw-r--r--vcl/inc/vcl/imagerepository.hxx2
-rw-r--r--vcl/inc/vcl/imgctrl.hxx14
-rw-r--r--vcl/inc/vcl/impbmp.hxx64
-rw-r--r--vcl/inc/vcl/impbmpconv.hxx2
-rw-r--r--vcl/inc/vcl/impdel.hxx28
-rw-r--r--vcl/inc/vcl/impfont.hxx82
-rw-r--r--vcl/inc/vcl/impgraph.hxx144
-rw-r--r--vcl/inc/vcl/impimagetree.hxx2
-rw-r--r--vcl/inc/vcl/impoct.hxx70
-rw-r--r--vcl/inc/vcl/inputctx.hxx36
-rw-r--r--vcl/inc/vcl/introwin.hxx2
-rw-r--r--vcl/inc/vcl/javachild.hxx4
-rw-r--r--vcl/inc/vcl/jobdata.hxx4
-rw-r--r--vcl/inc/vcl/jobset.h38
-rw-r--r--vcl/inc/vcl/jobset.hxx36
-rw-r--r--vcl/inc/vcl/keycod.hxx38
-rw-r--r--vcl/inc/vcl/keycodes.hxx238
-rw-r--r--vcl/inc/vcl/lazydelete.hxx50
-rw-r--r--vcl/inc/vcl/lineinfo.hxx62
-rw-r--r--vcl/inc/vcl/longcurr.hxx104
-rw-r--r--vcl/inc/vcl/lstbox.h16
-rw-r--r--vcl/inc/vcl/lstbox.hxx182
-rw-r--r--vcl/inc/vcl/mapmod.hxx48
-rw-r--r--vcl/inc/vcl/mapunit.hxx4
-rw-r--r--vcl/inc/vcl/menu.hxx372
-rw-r--r--vcl/inc/vcl/menubtn.hxx48
-rw-r--r--vcl/inc/vcl/metaact.hxx954
-rw-r--r--vcl/inc/vcl/metric.hxx66
-rw-r--r--vcl/inc/vcl/mnemonic.hxx36
-rw-r--r--vcl/inc/vcl/mnemonicengine.hxx2
-rw-r--r--vcl/inc/vcl/morebtn.hxx4
-rw-r--r--vcl/inc/vcl/msgbox.hxx84
-rw-r--r--vcl/inc/vcl/octree.hxx78
-rw-r--r--vcl/inc/vcl/oldprintadaptor.hxx6
-rw-r--r--vcl/inc/vcl/outdata.hxx2
-rw-r--r--vcl/inc/vcl/outdev.h18
-rw-r--r--vcl/inc/vcl/outdev.hxx196
-rw-r--r--vcl/inc/vcl/outfont.hxx4
-rw-r--r--vcl/inc/vcl/pdfextoutdevdata.hxx82
-rw-r--r--vcl/inc/vcl/pdfwriter.hxx208
-rw-r--r--vcl/inc/vcl/pngread.hxx12
-rw-r--r--vcl/inc/vcl/pngwrite.hxx8
-rw-r--r--vcl/inc/vcl/pointr.hxx10
-rw-r--r--vcl/inc/vcl/polyscan.hxx92
-rw-r--r--vcl/inc/vcl/popupmenuwindow.hxx2
-rw-r--r--vcl/inc/vcl/ppdparser.hxx76
-rw-r--r--vcl/inc/vcl/print.h8
-rw-r--r--vcl/inc/vcl/print.hxx290
-rw-r--r--vcl/inc/vcl/printergfx.hxx134
-rw-r--r--vcl/inc/vcl/printerinfomanager.hxx30
-rw-r--r--vcl/inc/vcl/printerjob.hxx20
-rw-r--r--vcl/inc/vcl/prndlg.hxx94
-rw-r--r--vcl/inc/vcl/prntypes.hxx56
-rw-r--r--vcl/inc/vcl/ptrstyle.hxx178
-rw-r--r--vcl/inc/vcl/regband.hxx68
-rw-r--r--vcl/inc/vcl/region.h54
-rw-r--r--vcl/inc/vcl/region.hxx90
-rw-r--r--vcl/inc/vcl/salatype.hxx16
-rw-r--r--vcl/inc/vcl/salbmp.hxx24
-rw-r--r--vcl/inc/vcl/salbtype.hxx300
-rw-r--r--vcl/inc/vcl/salctrlhandle.hxx4
-rw-r--r--vcl/inc/vcl/salctype.hxx32
-rw-r--r--vcl/inc/vcl/saldatabasic.hxx6
-rw-r--r--vcl/inc/vcl/salframe.hxx100
-rw-r--r--vcl/inc/vcl/salgdi.hxx118
-rw-r--r--vcl/inc/vcl/salgeom.hxx4
-rw-r--r--vcl/inc/vcl/salgtype.hxx44
-rw-r--r--vcl/inc/vcl/salimestatus.hxx2
-rw-r--r--vcl/inc/vcl/salinst.hxx66
-rw-r--r--vcl/inc/vcl/sallayout.hxx10
-rw-r--r--vcl/inc/vcl/salmenu.hxx18
-rw-r--r--vcl/inc/vcl/salnativewidgets.hxx176
-rw-r--r--vcl/inc/vcl/salobj.hxx42
-rw-r--r--vcl/inc/vcl/salprn.hxx58
-rw-r--r--vcl/inc/vcl/salptype.hxx6
-rw-r--r--vcl/inc/vcl/salsession.hxx30
-rw-r--r--vcl/inc/vcl/salsys.hxx40
-rw-r--r--vcl/inc/vcl/saltimer.hxx14
-rw-r--r--vcl/inc/vcl/salvd.hxx8
-rw-r--r--vcl/inc/vcl/salwtype.hxx8
-rw-r--r--vcl/inc/vcl/scrbar.hxx26
-rw-r--r--vcl/inc/vcl/seleng.hxx12
-rw-r--r--vcl/inc/vcl/settings.hxx110
-rw-r--r--vcl/inc/vcl/slider.hxx144
-rw-r--r--vcl/inc/vcl/smartid.hxx2
-rw-r--r--vcl/inc/vcl/sndstyle.hxx2
-rw-r--r--vcl/inc/vcl/sound.hxx2
-rw-r--r--vcl/inc/vcl/spin.h2
-rw-r--r--vcl/inc/vcl/spin.hxx2
-rw-r--r--vcl/inc/vcl/spinfld.hxx84
-rw-r--r--vcl/inc/vcl/split.hxx8
-rw-r--r--vcl/inc/vcl/splitwin.hxx266
-rw-r--r--vcl/inc/vcl/status.hxx200
-rw-r--r--vcl/inc/vcl/stdtext.hxx10
-rw-r--r--vcl/inc/vcl/strhelper.hxx2
-rw-r--r--vcl/inc/vcl/subedit.hxx2
-rw-r--r--vcl/inc/vcl/sv.h2
-rw-r--r--vcl/inc/vcl/svapp.hxx18
-rw-r--r--vcl/inc/vcl/svcompat.hxx8
-rw-r--r--vcl/inc/vcl/svdata.hxx10
-rw-r--r--vcl/inc/vcl/svids.hrc126
-rw-r--r--vcl/inc/vcl/symbol.hxx82
-rw-r--r--vcl/inc/vcl/syschild.hxx4
-rw-r--r--vcl/inc/vcl/sysdata.hxx72
-rw-r--r--vcl/inc/vcl/syswin.hxx20
-rw-r--r--vcl/inc/vcl/tabctrl.hxx14
-rw-r--r--vcl/inc/vcl/tabdlg.hxx32
-rw-r--r--vcl/inc/vcl/tabpage.hxx16
-rw-r--r--vcl/inc/vcl/taskpanelist.hxx2
-rw-r--r--vcl/inc/vcl/textlayout.hxx2
-rw-r--r--vcl/inc/vcl/threadex.hxx12
-rw-r--r--vcl/inc/vcl/timer.hxx4
-rw-r--r--vcl/inc/vcl/toolbox.h66
-rw-r--r--vcl/inc/vcl/toolbox.hxx28
-rw-r--r--vcl/inc/vcl/unobrok.hxx4
-rw-r--r--vcl/inc/vcl/unohelp.hxx8
-rw-r--r--vcl/inc/vcl/unohelp2.hxx16
-rw-r--r--vcl/inc/vcl/unowrap.hxx26
-rw-r--r--vcl/inc/vcl/vclenum.hxx60
-rw-r--r--vcl/inc/vcl/vclevent.hxx32
-rw-r--r--vcl/inc/vcl/virdev.hxx32
-rw-r--r--vcl/inc/vcl/waitobj.hxx2
-rw-r--r--vcl/inc/vcl/wall.hxx94
-rw-r--r--vcl/inc/vcl/wall2.hxx24
-rw-r--r--vcl/inc/vcl/windata.hxx2
-rw-r--r--vcl/inc/vcl/window.h8
-rw-r--r--vcl/inc/vcl/window.hxx72
-rw-r--r--vcl/inc/vcl/wintypes.hxx2
-rw-r--r--vcl/inc/vcl/wrkwin.hxx8
-rw-r--r--vcl/inc/vcl/xconnection.hxx6
-rw-r--r--vcl/os2/inc/salbmp.h20
-rw-r--r--vcl/os2/inc/saldata.hxx148
-rw-r--r--vcl/os2/inc/salframe.h124
-rw-r--r--vcl/os2/inc/salgdi.h156
-rw-r--r--vcl/os2/inc/salids.hrc138
-rw-r--r--vcl/os2/inc/salinst.h78
-rw-r--r--vcl/os2/inc/sallang.hxx40
-rw-r--r--vcl/os2/inc/sallayout.h2
-rw-r--r--vcl/os2/inc/salmenu.h2
-rw-r--r--vcl/os2/inc/salobj.h46
-rw-r--r--vcl/os2/inc/salprn.h116
-rw-r--r--vcl/os2/inc/salsound.h66
-rw-r--r--vcl/os2/inc/salsound.hxx50
-rw-r--r--vcl/os2/inc/salsys.h2
-rw-r--r--vcl/os2/inc/saltimer.h6
-rw-r--r--vcl/os2/inc/salvd.h22
-rw-r--r--vcl/os2/inc/svsys.h2
-rw-r--r--vcl/os2/inc/wingdi.h10
-rw-r--r--vcl/os2/source/app/salinfo.cxx4
-rw-r--r--vcl/os2/source/app/salinst.cxx58
-rw-r--r--vcl/os2/source/app/sallang.cxx2
-rw-r--r--vcl/os2/source/app/salshl.cxx16
-rw-r--r--vcl/os2/source/app/saltimer.cxx10
-rw-r--r--vcl/os2/source/gdi/os2layout.cxx28
-rw-r--r--vcl/os2/source/gdi/salbmp.cxx24
-rw-r--r--vcl/os2/source/gdi/salgdi.cxx96
-rw-r--r--vcl/os2/source/gdi/salgdi2.cxx210
-rw-r--r--vcl/os2/source/gdi/salgdi3.cxx146
-rw-r--r--vcl/os2/source/gdi/salprn.cxx328
-rw-r--r--vcl/os2/source/gdi/salvd.cxx48
-rw-r--r--vcl/os2/source/window/salframe.cxx214
-rw-r--r--vcl/os2/source/window/salmenu.cxx4
-rw-r--r--vcl/os2/source/window/salobj.cxx52
-rw-r--r--vcl/qa/complex/memCheck/CheckMemoryUsage.java44
-rw-r--r--vcl/qa/complex/persistent_window_states/DocumentHandle.java2
-rw-r--r--vcl/qa/complex/persistent_window_states/PersistentWindowTest.java2
-rw-r--r--vcl/source/app/dbggui.cxx16
-rw-r--r--vcl/source/app/dndhelp.cxx4
-rw-r--r--vcl/source/app/help.cxx38
-rw-r--r--vcl/source/app/i18nhelp.cxx14
-rw-r--r--vcl/source/app/idlemgr.cxx2
-rw-r--r--vcl/source/app/salvtables.cxx2
-rw-r--r--vcl/source/app/session.cxx40
-rw-r--r--vcl/source/app/settings.cxx84
-rw-r--r--vcl/source/app/sound.cxx2
-rw-r--r--vcl/source/app/stdtext.cxx2
-rw-r--r--vcl/source/app/svapp.cxx106
-rw-r--r--vcl/source/app/svdata.cxx42
-rw-r--r--vcl/source/app/svmainhook.cxx4
-rw-r--r--vcl/source/app/timer.cxx78
-rw-r--r--vcl/source/app/unohelp.cxx14
-rw-r--r--vcl/source/app/unohelp2.cxx6
-rw-r--r--vcl/source/app/vclevent.cxx6
-rw-r--r--vcl/source/components/display.cxx6
-rw-r--r--vcl/source/components/dtranscomp.cxx66
-rw-r--r--vcl/source/components/factory.cxx4
-rw-r--r--vcl/source/components/fontident.cxx6
-rw-r--r--vcl/source/control/button.cxx120
-rw-r--r--vcl/source/control/combobox.cxx48
-rw-r--r--vcl/source/control/ctrl.cxx18
-rw-r--r--vcl/source/control/edit.cxx166
-rw-r--r--vcl/source/control/field2.cxx44
-rw-r--r--vcl/source/control/fixbrd.cxx18
-rw-r--r--vcl/source/control/fixed.cxx74
-rw-r--r--vcl/source/control/group.cxx32
-rw-r--r--vcl/source/control/ilstbox.cxx220
-rw-r--r--vcl/source/control/imgctrl.cxx4
-rw-r--r--vcl/source/control/longcurr.cxx68
-rw-r--r--vcl/source/control/lstbox.cxx50
-rw-r--r--vcl/source/control/menubtn.cxx30
-rw-r--r--vcl/source/control/morebtn.cxx16
-rw-r--r--vcl/source/control/scrbar.cxx68
-rw-r--r--vcl/source/control/slider.cxx228
-rw-r--r--vcl/source/control/spinbtn.cxx4
-rw-r--r--vcl/source/control/spinfld.cxx40
-rw-r--r--vcl/source/control/tabctrl.cxx62
-rw-r--r--vcl/source/fontsubset/cff.cxx894
-rw-r--r--vcl/source/fontsubset/fontsubset.cxx30
-rw-r--r--vcl/source/fontsubset/gsub.cxx6
-rw-r--r--vcl/source/fontsubset/gsub.h4
-rw-r--r--vcl/source/fontsubset/list.c2
-rw-r--r--vcl/source/fontsubset/sft.cxx46
-rw-r--r--vcl/source/fontsubset/ttcr.cxx98
-rw-r--r--vcl/source/fontsubset/ttcr.hxx8
-rw-r--r--vcl/source/fontsubset/xlat.cxx20
-rw-r--r--vcl/source/fontsubset/xlat.hxx2
-rw-r--r--vcl/source/gdi/alpha.cxx84
-rw-r--r--vcl/source/gdi/animate.cxx110
-rw-r--r--vcl/source/gdi/base14.cxx4
-rw-r--r--vcl/source/gdi/bitmap.cxx454
-rw-r--r--vcl/source/gdi/bitmap2.cxx256
-rw-r--r--vcl/source/gdi/bitmap3.cxx566
-rw-r--r--vcl/source/gdi/bitmap4.cxx302
-rw-r--r--vcl/source/gdi/bitmapex.cxx88
-rw-r--r--vcl/source/gdi/bmpacc.cxx70
-rw-r--r--vcl/source/gdi/bmpacc2.cxx10
-rw-r--r--vcl/source/gdi/bmpacc3.cxx116
-rw-r--r--vcl/source/gdi/bmpconv.cxx20
-rw-r--r--vcl/source/gdi/bmpfast.cxx4
-rw-r--r--vcl/source/gdi/configsettings.cxx10
-rw-r--r--vcl/source/gdi/cvtgrf.cxx38
-rw-r--r--vcl/source/gdi/cvtsvm.cxx422
-rw-r--r--vcl/source/gdi/extoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/font.cxx152
-rw-r--r--vcl/source/gdi/gdimtf.cxx532
-rw-r--r--vcl/source/gdi/gfxlink.cxx52
-rw-r--r--vcl/source/gdi/gradient.cxx6
-rw-r--r--vcl/source/gdi/graph.cxx12
-rw-r--r--vcl/source/gdi/graphictools.cxx82
-rw-r--r--vcl/source/gdi/hatch.cxx28
-rw-r--r--vcl/source/gdi/image.cxx92
-rw-r--r--vcl/source/gdi/imagerepository.cxx2
-rw-r--r--vcl/source/gdi/impanmvw.cxx62
-rw-r--r--vcl/source/gdi/impanmvw.hxx74
-rw-r--r--vcl/source/gdi/impbmp.cxx10
-rw-r--r--vcl/source/gdi/impgraph.cxx222
-rw-r--r--vcl/source/gdi/impimage.cxx42
-rw-r--r--vcl/source/gdi/impimagetree.cxx2
-rw-r--r--vcl/source/gdi/impvect.cxx274
-rw-r--r--vcl/source/gdi/impvect.hxx24
-rw-r--r--vcl/source/gdi/jobset.cxx132
-rw-r--r--vcl/source/gdi/lineinfo.cxx48
-rw-r--r--vcl/source/gdi/mapmod.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx510
-rw-r--r--vcl/source/gdi/metric.cxx26
-rw-r--r--vcl/source/gdi/octree.cxx10
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx4
-rw-r--r--vcl/source/gdi/outdev.cxx300
-rw-r--r--vcl/source/gdi/outdev2.cxx394
-rw-r--r--vcl/source/gdi/outdev3.cxx104
-rw-r--r--vcl/source/gdi/outdev4.cxx336
-rw-r--r--vcl/source/gdi/outdev5.cxx24
-rw-r--r--vcl/source/gdi/outdev6.cxx192
-rw-r--r--vcl/source/gdi/outdevnative.cxx8
-rw-r--r--vcl/source/gdi/outmap.cxx338
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx90
-rw-r--r--vcl/source/gdi/pdffontcache.cxx2
-rw-r--r--vcl/source/gdi/pdffontcache.hxx12
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx1082
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx480
-rw-r--r--vcl/source/gdi/pngread.cxx228
-rw-r--r--vcl/source/gdi/pngwrite.cxx166
-rw-r--r--vcl/source/gdi/polyscan.cxx54
-rw-r--r--vcl/source/gdi/print.cxx190
-rw-r--r--vcl/source/gdi/print2.cxx194
-rw-r--r--vcl/source/gdi/print3.cxx182
-rw-r--r--vcl/source/gdi/regband.cxx180
-rw-r--r--vcl/source/gdi/region.cxx178
-rw-r--r--vcl/source/gdi/salgdilayout.cxx106
-rw-r--r--vcl/source/gdi/sallayout.cxx20
-rw-r--r--vcl/source/gdi/salmisc.cxx106
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx24
-rw-r--r--vcl/source/gdi/svcompat.cxx2
-rw-r--r--vcl/source/gdi/textlayout.cxx2
-rw-r--r--vcl/source/gdi/virdev.cxx54
-rw-r--r--vcl/source/gdi/wall.cxx76
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx28
-rw-r--r--vcl/source/glyphs/gcach_ftyp.hxx8
-rw-r--r--vcl/source/glyphs/gcach_layout.cxx20
-rw-r--r--vcl/source/glyphs/gcach_rbmp.cxx4
-rw-r--r--vcl/source/glyphs/gcach_vdev.cxx124
-rw-r--r--vcl/source/glyphs/gcach_vdev.hxx24
-rw-r--r--vcl/source/glyphs/glyphcache.cxx8
-rw-r--r--vcl/source/glyphs/graphite_adaptors.cxx2
-rw-r--r--vcl/source/glyphs/graphite_cache.cxx2
-rw-r--r--vcl/source/glyphs/graphite_features.cxx4
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx4
-rw-r--r--vcl/source/glyphs/graphite_serverfont.cxx2
-rw-r--r--vcl/source/glyphs/graphite_textsrc.cxx2
-rw-r--r--vcl/source/glyphs/graphite_textsrc.hxx4
-rw-r--r--vcl/source/helper/canvasbitmap.cxx6
-rw-r--r--vcl/source/helper/canvastools.cxx60
-rw-r--r--vcl/source/helper/evntpost.cxx2
-rw-r--r--vcl/source/helper/lazydelete.cxx6
-rw-r--r--vcl/source/helper/smartid.cxx6
-rw-r--r--vcl/source/helper/strhelper.cxx34
-rw-r--r--vcl/source/helper/threadex.cxx2
-rw-r--r--vcl/source/helper/xconnection.cxx4
-rw-r--r--vcl/source/salmain/salmain.cxx2
-rw-r--r--vcl/source/src/btntext.src16
-rw-r--r--vcl/source/src/helptext.src2
-rw-r--r--vcl/source/src/images.src2
-rw-r--r--vcl/source/src/menu.src24
-rw-r--r--vcl/source/src/print.src30
-rw-r--r--vcl/source/src/stdtext.src2
-rw-r--r--vcl/source/src/units.src2
-rw-r--r--vcl/source/window/abstdlg.cxx2
-rw-r--r--vcl/source/window/accel.cxx82
-rw-r--r--vcl/source/window/accmgr.cxx4
-rw-r--r--vcl/source/window/arrange.cxx44
-rw-r--r--vcl/source/window/brdwin.cxx362
-rw-r--r--vcl/source/window/btndlg.cxx70
-rw-r--r--vcl/source/window/cmdevt.cxx34
-rw-r--r--vcl/source/window/cursor.cxx104
-rw-r--r--vcl/source/window/decoview.cxx176
-rw-r--r--vcl/source/window/dlgctrl.cxx22
-rw-r--r--vcl/source/window/dndevdis.cxx2
-rw-r--r--vcl/source/window/dndlcon.cxx74
-rw-r--r--vcl/source/window/dockingarea.cxx14
-rw-r--r--vcl/source/window/dockmgr.cxx80
-rw-r--r--vcl/source/window/dockwin.cxx36
-rw-r--r--vcl/source/window/floatwin.cxx44
-rw-r--r--vcl/source/window/introwin.cxx2
-rw-r--r--vcl/source/window/javachild.cxx58
-rw-r--r--vcl/source/window/keycod.cxx8
-rw-r--r--vcl/source/window/keyevent.cxx10
-rw-r--r--vcl/source/window/menu.cxx343
-rw-r--r--vcl/source/window/mnemonic.cxx12
-rw-r--r--vcl/source/window/mnemonicengine.cxx2
-rw-r--r--vcl/source/window/mouseevent.cxx2
-rw-r--r--vcl/source/window/msgbox.cxx78
-rw-r--r--vcl/source/window/popupmenuwindow.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx314
-rw-r--r--vcl/source/window/scrwnd.cxx2
-rw-r--r--vcl/source/window/scrwnd.hxx80
-rw-r--r--vcl/source/window/seleng.cxx6
-rw-r--r--vcl/source/window/split.cxx54
-rw-r--r--vcl/source/window/splitwin.cxx832
-rw-r--r--vcl/source/window/status.cxx184
-rw-r--r--vcl/source/window/syschild.cxx2
-rw-r--r--vcl/source/window/syswin.cxx22
-rw-r--r--vcl/source/window/tabdlg.cxx76
-rw-r--r--vcl/source/window/tabpage.cxx4
-rw-r--r--vcl/source/window/taskpanelist.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx78
-rw-r--r--vcl/source/window/toolbox2.cxx290
-rw-r--r--vcl/source/window/window.cxx26
-rw-r--r--vcl/source/window/window2.cxx276
-rw-r--r--vcl/source/window/window3.cxx2
-rw-r--r--vcl/source/window/winproc.cxx14
-rw-r--r--vcl/source/window/wrkwin.cxx8
-rw-r--r--vcl/test/canvasbitmaptest.cxx112
-rw-r--r--vcl/test/dndtest.cxx54
-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.cxx2
-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.cxx60
-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.cxx16
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx528
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx540
-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.cxx16
-rw-r--r--vcl/unx/headless/svpinst.hxx84
-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.hxx116
-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.h128
-rw-r--r--vcl/unx/inc/saldata.hxx52
-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.h218
-rw-r--r--vcl/unx/inc/salinst.h66
-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/saltimer.h6
-rw-r--r--vcl/unx/inc/salunx.h6
-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.cxx6
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx146
-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.cxx58
-rw-r--r--vcl/unx/kde4/KDESalFrame.hxx6
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx217
-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.cxx16
-rw-r--r--vcl/unx/kde4/KDEXLib.hxx6
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.cxx6
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.hxx6
-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.cxx26
-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.cxx90
-rw-r--r--vcl/unx/source/app/saldisp.cxx104
-rw-r--r--vcl/unx/source/app/salinst.cxx36
-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.cxx296
-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.cxx664
-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.cxx402
-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.cxx138
-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.cxx349
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx256
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx126
-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.cxx38
-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.cxx226
-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.cxx736
-rw-r--r--vcl/unx/source/window/salmenu.cxx4
-rw-r--r--vcl/unx/source/window/salobj.cxx100
-rw-r--r--vcl/util/hidother.src4
-rw-r--r--vcl/win/inc/salbmp.h36
-rw-r--r--vcl/win/inc/saldata.hxx14
-rw-r--r--vcl/win/inc/salframe.h82
-rw-r--r--vcl/win/inc/salgdi.h178
-rw-r--r--vcl/win/inc/salids.hrc144
-rw-r--r--vcl/win/inc/salinst.h66
-rw-r--r--vcl/win/inc/salmenu.h2
-rw-r--r--vcl/win/inc/salnativewidgets.h6
-rw-r--r--vcl/win/inc/salobj.h44
-rw-r--r--vcl/win/inc/salprn.h78
-rw-r--r--vcl/win/inc/salsys.h6
-rw-r--r--vcl/win/inc/saltimer.h6
-rw-r--r--vcl/win/inc/salvd.h22
-rw-r--r--vcl/win/inc/svsys.h2
-rw-r--r--vcl/win/inc/wincomp.hxx26
-rw-r--r--vcl/win/source/app/saldata.cxx8
-rw-r--r--vcl/win/source/app/salinfo.cxx10
-rw-r--r--vcl/win/source/app/salinst.cxx34
-rw-r--r--vcl/win/source/app/salshl.cxx2
-rw-r--r--vcl/win/source/app/saltimer.cxx8
-rw-r--r--vcl/win/source/gdi/salbmp.cxx94
-rw-r--r--vcl/win/source/gdi/salgdi.cxx326
-rw-r--r--vcl/win/source/gdi/salgdi2.cxx160
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx228
-rw-r--r--vcl/win/source/gdi/salgdi_gdiplus.cxx12
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx88
-rw-r--r--vcl/win/source/gdi/salprn.cxx258
-rw-r--r--vcl/win/source/gdi/salvd.cxx44
-rw-r--r--vcl/win/source/gdi/winlayout.cxx62
-rw-r--r--vcl/win/source/gdi/wntgdi.cxx2
-rw-r--r--vcl/win/source/window/salframe.cxx116
-rw-r--r--vcl/win/source/window/salmenu.cxx8
-rw-r--r--vcl/win/source/window/salobj.cxx134
-rw-r--r--vcl/workben/outdevgrind.cxx40
-rw-r--r--vcl/workben/svdem.cxx16
-rw-r--r--vcl/workben/svpclient.cxx34
-rw-r--r--vcl/workben/svptest.cxx16
-rw-r--r--vcl/workben/vcldemo.cxx18
894 files changed, 24982 insertions, 24993 deletions
diff --git a/vcl/aqua/inc/aqua11yfactory.h b/vcl/aqua/inc/aqua11yfactory.h
index 15ba372ed320..9b8e599fb262 100644
--- a/vcl/aqua/inc/aqua11yfactory.h
+++ b/vcl/aqua/inc/aqua11yfactory.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate asRadioGroup:(MacOSBOOL) asRadioGroup;
+(void)removeFromWrapperRepositoryFor: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext;
+(void)registerView: (NSView *) theView;
-+(void)revokeView: (NSView *) theViewt;
++(void)revokeView: (NSView *) theViewt;
@end
#endif // _SV_AQUA11FACTORY_H
diff --git a/vcl/aqua/inc/aqua11yfocustracker.hxx b/vcl/aqua/inc/aqua11yfocustracker.hxx
index b9721619b8ac..5e4611852703 100644
--- a/vcl/aqua/inc/aqua11yfocustracker.hxx
+++ b/vcl/aqua/inc/aqua11yfocustracker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class AquaA11yFocusTracker : public rtl::Static< AquaA11yFocusTracker, AquaA11yF
public:
AquaA11yFocusTracker();
-
+
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getFocusedObject() { return m_xFocusedObject; };
// sets the currently focus object and notifies the FocusEventListener (if any)
@@ -60,24 +60,24 @@ public:
// may evolve to add/remove later
void setFocusListener(const rtl::Reference< KeyboardFocusListener >& aFocusListener) { m_aFocusListener = aFocusListener; };
-
+
protected:
// received a WINDOW_GETFOCUS event for this window
virtual void window_got_focus(Window *pWindow);
-
+
// received a TOOLBOX_HIGHLIGHT event for this window
virtual void toolbox_highlight_on(Window *pWindow);
// received a TOOLBOX_HIGHLIGHTOFF event for this window
virtual void toolbox_highlight_off(Window *pWindow);
-
+
// received a TABPAGE_ACTIVATE event for this window
virtual void tabpage_activated(Window *pWindow);
-
+
// received a MENU_HIGHLIGHT event for this window
virtual void menu_highlighted(const ::VclMenuEvent *pEvent);
-
+
// toolbox items are widgets in gtk+ and Cocoa
virtual void notify_toolbox_item_focus(ToolBox *pToolBox);
@@ -87,23 +87,23 @@ protected:
// callback function for Application::addEventListener
static long WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent);
-private:
+private:
// the accessible object that has the keyboard focus (if any)
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xFocusedObject;
-
+
// the listener for focus events
rtl::Reference< KeyboardFocusListener > m_aFocusListener;
-
+
// the list of Windows that need deeper (focus) investigation
std::set< Window *> m_aDocumentWindowList;
-
+
// the link object needed for Application::addEventListener
Link m_aWindowEventLink;
-
+
// the UNO XAccessibilityEventListener for Documents and other non VCL objects
const ::com::sun::star::uno::Reference< DocumentFocusListener > m_xDocumentFocusListener;
};
-#endif // _AQUA11YFOCUSTRACKER_HXX_
+#endif // _AQUA11YFOCUSTRACKER_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/aqua11ylistener.hxx b/vcl/aqua/inc/aqua11ylistener.hxx
index cab8d8c89d58..ca8d0639e321 100644
--- a/vcl/aqua/inc/aqua11ylistener.hxx
+++ b/vcl/aqua/inc/aqua11ylistener.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#ifndef _AQUA11YLISTENER_HXX_
#define _AQUA11YLISTENER_HXX_
@@ -41,7 +41,7 @@
// - AquaA11yEventListener -
// -------------------------
-class AquaA11yEventListener :
+class AquaA11yEventListener :
public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleEventListener >
{
@@ -50,13 +50,13 @@ public:
virtual ~AquaA11yEventListener();
// XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
throw (::com::sun::star::uno::RuntimeException);
// XAccessibleEventListener
- virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
throw( ::com::sun::star::uno::RuntimeException );
-
+
private:
const id m_wrapperObject;
const sal_Int16 m_role;
diff --git a/vcl/aqua/inc/aqua11ywrapper.h b/vcl/aqua/inc/aqua11ywrapper.h
index 66faca457622..b3fea12125ec 100644
--- a/vcl/aqua/inc/aqua11ywrapper.h
+++ b/vcl/aqua/inc/aqua11ywrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/aquaprintview.h b/vcl/aqua/inc/aquaprintview.h
index 5e209bfa6233..d8a9ec6330f9 100644
--- a/vcl/aqua/inc/aquaprintview.h
+++ b/vcl/aqua/inc/aquaprintview.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +41,7 @@ struct PrintAccessoryViewState
{
bool bNeedRestart;
sal_Int32 nLastPage;
-
+
PrintAccessoryViewState()
: bNeedRestart( false ), nLastPage( 0 ) {}
};
@@ -61,7 +61,7 @@ struct PrintAccessoryViewState
@interface AquaPrintAccessoryView : NSObject
{
}
-+(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState;
++(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState;
@end
diff --git a/vcl/aqua/inc/aquavclevents.hxx b/vcl/aqua/inc/aquavclevents.hxx
index 034edd3882b5..907e1ea7d547 100644
--- a/vcl/aqua/inc/aquavclevents.hxx
+++ b/vcl/aqua/inc/aquavclevents.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/aquavcltypes.h b/vcl/aqua/inc/aquavcltypes.h
index 93003faecad7..81dd543e7b68 100644
--- a/vcl/aqua/inc/aquavcltypes.h
+++ b/vcl/aqua/inc/aquavcltypes.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/keyboardfocuslistener.hxx b/vcl/aqua/inc/keyboardfocuslistener.hxx
index bf9c70250005..b66b7e483c33 100644
--- a/vcl/aqua/inc/keyboardfocuslistener.hxx
+++ b/vcl/aqua/inc/keyboardfocuslistener.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/salatsuifontutils.hxx b/vcl/aqua/inc/salatsuifontutils.hxx
index e47745a5552a..5a11e6a29f7a 100644
--- a/vcl/aqua/inc/salatsuifontutils.hxx
+++ b/vcl/aqua/inc/salatsuifontutils.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class SystemFontList
public:
SystemFontList();
~SystemFontList();
-
+
void AnnounceFonts( ImplDevFontList& ) const;
ImplMacFontData* GetFontDataFromId( ATSUFontID ) const;
@@ -57,9 +57,9 @@ private:
typedef std::hash_map<ATSUFontID,ImplMacFontData*> MacFontContainer;
MacFontContainer maFontContainer;
- void InitGlyphFallbacks();
+ void InitGlyphFallbacks();
};
-
-#endif // _SV_SALATSUIFONTUTILS_HXX
+
+#endif // _SV_SALATSUIFONTUTILS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/salbmp.h b/vcl/aqua/inc/salbmp.h
index 818b25d38772..c438ea929c38 100644
--- a/vcl/aqua/inc/salbmp.h
+++ b/vcl/aqua/inc/salbmp.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,34 +42,34 @@
#include "basebmp/bitmapdevice.hxx"
// --------------
-// - SalBitmap -
+// - SalBitmap -
// --------------
-struct BitmapBuffer;
-class BitmapColor;
-class BitmapPalette;
-class AquaSalVirtualDevice;
-class AquaSalGraphics;
+struct BitmapBuffer;
+class BitmapColor;
+class BitmapPalette;
+class AquaSalVirtualDevice;
+class AquaSalGraphics;
class AquaSalBitmap : public SalBitmap
{
public:
- CGContextRef mxGraphicContext;
- mutable CGImageRef mxCachedImage;
- BitmapPalette maPalette;
- basebmp::RawMemorySharedArray maUserBuffer;
- basebmp::RawMemorySharedArray maContextBuffer;
- sal_uInt16 mnBits;
- int mnWidth;
- int mnHeight;
- sal_uInt32 mnBytesPerRow;
+ CGContextRef mxGraphicContext;
+ mutable CGImageRef mxCachedImage;
+ BitmapPalette maPalette;
+ basebmp::RawMemorySharedArray maUserBuffer;
+ basebmp::RawMemorySharedArray maContextBuffer;
+ sal_uInt16 mnBits;
+ int mnWidth;
+ int mnHeight;
+ sal_uInt32 mnBytesPerRow;
public:
AquaSalBitmap();
virtual ~AquaSalBitmap();
-
+
public:
-
+
// SalBitmap methods
bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
bool Create( const SalBitmap& rSalBmp );
@@ -78,12 +78,12 @@ public:
virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
Size& rSize,
bool bMask = false );
-
+
void Destroy();
-
+
Size GetSize() const;
USHORT GetBitCount() const;
-
+
BitmapBuffer *AcquireBuffer( bool bReadOnly );
void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
@@ -91,21 +91,21 @@ public:
private:
// quartz helper
- bool CreateContext();
+ bool CreateContext();
void DestroyContext();
- bool AllocateUserData();
+ bool AllocateUserData();
- void ConvertBitmapData( sal_uInt32 nWidth, sal_uInt32 nHeight,
+ void ConvertBitmapData( sal_uInt32 nWidth, sal_uInt32 nHeight,
sal_uInt16 nDestBits, sal_uInt32 nDestBytesPerRow, const BitmapPalette& rDestPalette, sal_uInt8* pDestData,
sal_uInt16 nSrcBits, sal_uInt32 nSrcBytesPerRow, const BitmapPalette& rSrcPalette, sal_uInt8* pSrcData );
public:
- bool Create( CGLayerRef xLayer, int nBitCount, int nX, int nY, int nWidth, int nHeight, bool bMirrorVert = true );
+ bool Create( CGLayerRef xLayer, int nBitCount, int nX, int nY, int nWidth, int nHeight, bool bMirrorVert = true );
public:
- CGImageRef CreateWithMask( const AquaSalBitmap& rMask, int nX, int nY, int nWidth, int nHeight ) const;
- CGImageRef CreateColorMask( int nX, int nY, int nWidth, int nHeight, SalColor nMaskColor ) const;
- CGImageRef CreateCroppedImage( int nX, int nY, int nWidth, int nHeight ) const;
+ CGImageRef CreateWithMask( const AquaSalBitmap& rMask, int nX, int nY, int nWidth, int nHeight ) const;
+ CGImageRef CreateColorMask( int nX, int nY, int nWidth, int nHeight, SalColor nMaskColor ) const;
+ CGImageRef CreateCroppedImage( int nX, int nY, int nWidth, int nHeight ) const;
};
#endif // _SV_SALBMP_HXX
diff --git a/vcl/aqua/inc/salcolorutils.hxx b/vcl/aqua/inc/salcolorutils.hxx
index ae6afdabb9ff..ca5e93e16c43 100644
--- a/vcl/aqua/inc/salcolorutils.hxx
+++ b/vcl/aqua/inc/salcolorutils.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,6 +50,6 @@ void SetSalColor( const SalColor& rColor, float* pQuartzColor );
// ------------------------------------------------------------------
-#endif // _SV_SALCOLORUTILS_HXX
+#endif // _SV_SALCOLORUTILS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/salconst.h b/vcl/aqua/inc/salconst.h
index 50971a819c09..8d0a5aa1fdd9 100644
--- a/vcl/aqua/inc/salconst.h
+++ b/vcl/aqua/inc/salconst.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/saldata.hxx b/vcl/aqua/inc/saldata.hxx
index 4dbf2ea09ee2..5915ec8a3c86 100644
--- a/vcl/aqua/inc/saldata.hxx
+++ b/vcl/aqua/inc/saldata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,48 +81,48 @@ struct FrameHash : public std::hash<sal_IntPtr>
struct SalData
{
-
- SALTIMERPROC mpTimerProc; // timer callback proc
- AquaSalInstance *mpFirstInstance; // pointer of first instance
- std::list<AquaSalFrame*> maFrames; // pointer of first frame
+
+ SALTIMERPROC mpTimerProc; // timer callback proc
+ AquaSalInstance *mpFirstInstance; // pointer of first instance
+ std::list<AquaSalFrame*> maFrames; // pointer of first frame
std::hash_set<const AquaSalFrame*,FrameHash> maFrameCheck; // for fast check of frame existance
- SalObject *mpFirstObject; // pointer of first object window
- SalVirtualDevice *mpFirstVD; // first VirDev
- SalPrinter *mpFirstPrinter; // first printing printer
+ SalObject *mpFirstObject; // pointer of first object window
+ SalVirtualDevice *mpFirstVD; // first VirDev
+ SalPrinter *mpFirstPrinter; // first printing printer
SystemFontList *mpFontList;
NSStatusItem* mpStatusItem; // one status item that draws all our stati
// at the moment this is only one add menu button
-
+
CGColorSpaceRef mxRGBSpace;
CGColorSpaceRef mxGraySpace;
CGColorSpaceRef mxP50Space;
CGPatternRef mxP50Pattern;
-
+
std::vector< NSCursor* > maCursors;
std::vector< NSMenuItem* > maFallbackMenu;
std::map< NSEvent*, bool > maKeyEventAnswer;
-
+
static oslThreadKey s_aAutoReleaseKey;
- bool mbIsScrollbarDoubleMax; // TODO: support DoubleMin and DoubleBoth too
+ bool mbIsScrollbarDoubleMax; // TODO: support DoubleMin and DoubleBoth too
SInt32 mnSystemVersion; // Store System Version
MainController* mpMainController; // Apple Remote
-
+
NSObject* mpDockIconClickHandler;
long mnDPIX; // #i100617# read DPI only once per office life
long mnDPIY; // #i100617# read DPI only once per office life
-
+
com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
mxClipboard;
SalData();
~SalData();
-
+
NSCursor* getCursor( PointerStyle i_eStyle );
-
+
static void ensureThreadAutoreleasePool();
static void drainThreadAutoreleasePool();
-
+
static NSStatusItem* getStatusItem();
};
@@ -136,6 +136,6 @@ BOOL ImplSalYieldMutexTryToAcquire();
void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease();
-#endif // _SV_SALDATA_HXX
+#endif // _SV_SALDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/salfontutils.hxx b/vcl/aqua/inc/salfontutils.hxx
index 8394d874bf10..8c070da4ba08 100644
--- a/vcl/aqua/inc/salfontutils.hxx
+++ b/vcl/aqua/inc/salfontutils.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,6 +63,6 @@ static const char *kFontWeightRegular1 = "Regular";
static const char *kFontWeightRegular2 = "regular";
-#endif // _SV_SALFONTUTILS_HXX
+#endif // _SV_SALFONTUTILS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/salframe.h b/vcl/aqua/inc/salframe.h
index bd0929829bc1..64f56cfae2cf 100644
--- a/vcl/aqua/inc/salframe.h
+++ b/vcl/aqua/inc/salframe.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,47 +61,47 @@ class AquaSalFrame : public SalFrame
{
public:
NSWindow* mpWindow; // Cocoa window
- NSView* mpView; // Cocoa view (actually a custom view, see below
+ NSView* mpView; // Cocoa view (actually a custom view, see below
NSMenuItem* mpDockMenuEntry; // entry in the dynamic dock menu
NSRect maScreenRect; // for mirroring purposes
- AquaSalGraphics* mpGraphics; // current frame graphics
- AquaSalFrame* mpParent; // pointer to parent frame
- SystemEnvData maSysData; // system data
+ AquaSalGraphics* mpGraphics; // current frame graphics
+ AquaSalFrame* mpParent; // pointer to parent frame
+ SystemEnvData maSysData; // system data
int mnMinWidth; // min. client width in pixels
int mnMinHeight; // min. client height in pixels
int mnMaxWidth; // max. client width in pixels
int mnMaxHeight; // max. client height in pixels
NSRect maFullScreenRect; // old window size when in FullScreen
- bool mbGraphics:1; // is Graphics used?
+ bool mbGraphics:1; // is Graphics used?
bool mbFullScreen:1; // is Window in FullScreen?
bool mbShown:1;
bool mbInitShow:1;
bool mbPositioned:1;
bool mbSized:1;
bool mbPresentation:1;
-
+
ULONG mnStyle;
unsigned int mnStyleMask; // our style mask from NSWindow creation
-
+
ULONG mnLastEventTime;
unsigned int mnLastModifierFlags;
AquaSalMenu* mpMenu;
-
+
SalExtStyle mnExtStyle; // currently document frames are marked this way
-
+
PointerStyle mePointerStyle; // currently active pointer style
-
+
NSTrackingRectTag mnTrackingRectTag; // used to get enter/leave messages
CGMutablePathRef mrClippingPath; // used for "shaping"
std::vector< CGRect > maClippingRects;
-
+
std::list<AquaBlinker*> maBlinkers;
-
+
Rectangle maInvalidRect;
-
+
ULONG mnICOptions;
-
+
boost::shared_ptr< Timer > mpActivityTimer; // Timer to prevent system sleep during presentation
public:
/** Constructor
@@ -114,49 +114,49 @@ public:
virtual ~AquaSalFrame();
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL PostEvent( void* pData );
- virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual BOOL PostEvent( void* pData );
+ virtual void SetTitle( const XubString& rTitle );
+ virtual void SetIcon( USHORT nIcon );
virtual void SetRepresentedURL( const rtl::OUString& );
virtual void SetMenu( SalMenu* pSalMenu );
virtual void DrawMenuBar();
- 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 Flush( void );
- virtual void Flush( const Rectangle& );
- 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 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 Flush( void );
+ virtual void Flush( const Rectangle& );
+ 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 SalPointerState GetPointerState();
+ 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 SalIndicatorState GetIndicatorState();
virtual void SimulateKeyPress( USHORT nKeyCode );
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
+ virtual void SetParent( SalFrame* pNewParent );
+ virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetExtendedFrameStyle( SalExtStyle );
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber(unsigned int);
@@ -175,21 +175,21 @@ public:
virtual void SetClientSize( long nWidth, long nHeight );
void UpdateFrameGeometry();
-
+
// trigger painting of the window
void SendPaintEvent( const Rectangle* pRect = NULL );
static bool isAlive( const AquaSalFrame* pFrame )
{ return GetSalData()->maFrameCheck.find( pFrame ) != GetSalData()->maFrameCheck.end(); }
-
+
static AquaSalFrame* GetCaptureFrame() { return s_pCaptureFrame; }
-
+
NSWindow* getWindow() const { return mpWindow; }
NSView* getView() const { return mpView; }
unsigned int getStyleMask() const { return mnStyleMask; }
-
+
void getResolution( long& o_rDPIX, long& o_rDPIY );
-
+
// actually the follwing methods do the same thing: flipping y coordinates
// but having two of them makes clearer what the coordinate system
// is supposed to be before and after
@@ -198,11 +198,11 @@ public:
void VCLToCocoa( NSPoint& io_rPoint, bool bRelativeToScreen = true );
void CocoaToVCL( NSPoint& io_Point, bool bRelativeToScreen = true );
-
+
NSCursor* getCurrentCursor() const;
-
+
CGMutablePathRef getClipPath() const { return mrClippingPath; }
-
+
// called by VCL_NSApplication to indicate screen settings have changed
void screenParametersChanged();
@@ -210,12 +210,12 @@ public:
/** do things on initial show (like centering on parent or on screen)
*/
void initShow();
-
+
void initWindowAndView();
- private: // data
+ private: // data
static AquaSalFrame* s_pCaptureFrame;
-
+
// make AquaSalFrame non copyable
AquaSalFrame( const AquaSalFrame& );
AquaSalFrame& operator=(const AquaSalFrame&);
diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h
index 55fbc3bf66c5..e073af25d240 100644
--- a/vcl/aqua/inc/salframeview.h
+++ b/vcl/aqua/inc/salframeview.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,8 +80,8 @@
NSEvent* mpLastSuperEvent;
// #i102807# used by magnify event handler
- NSTimeInterval mfLastMagnifyTime;
- float mfMagnifyDeltaSum;
+ NSTimeInterval mfLastMagnifyTime;
+ float mfMagnifyDeltaSum;
}
+(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
@@ -187,10 +187,10 @@
actual mouse event initiating this drag operation.
Mouse events can only be received by subclassing
NSView and overriding methods like 'mouseDown' etc.
- hence we implement a event hook here so that the
- D&D service can register as listener for mouse
- messages and use the last 'mouseDown' or
- 'mouseDragged' message to initiate the drag
+ hence we implement a event hook here so that the
+ D&D service can register as listener for mouse
+ messages and use the last 'mouseDown' or
+ 'mouseDragged' message to initiate the drag
operation.
*/
-(void)registerMouseEventListener: (id)theListener;
diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h
index 830de42caa95..eb203863ed95 100644
--- a/vcl/aqua/inc/salgdi.h
+++ b/vcl/aqua/inc/salgdi.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,21 +59,21 @@ public:
virtual ImplFontData* Clone() const;
virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const;
virtual sal_IntPtr GetFontId() const;
+
+ ImplFontCharMap* GetImplFontCharMap() const;
+ bool HasChar( sal_uInt32 cChar ) const;
- ImplFontCharMap* GetImplFontCharMap() const;
- bool HasChar( sal_uInt32 cChar ) const;
-
- void ReadOs2Table() const;
- void ReadMacCmapEncoding() const;
- bool HasCJKSupport() const;
+ void ReadOs2Table() const;
+ void ReadMacCmapEncoding() const;
+ bool HasCJKSupport() const;
private:
- const ATSUFontID mnFontId;
- mutable ImplFontCharMap* mpCharMap;
- mutable bool mbOs2Read; // true if OS2-table related info is valid
- mutable bool mbHasOs2Table;
- mutable bool mbCmapEncodingRead; // true if cmap encoding of Mac font is read
- mutable bool mbHasCJKSupport; // #i78970# CJK fonts need extra leading
+ const ATSUFontID mnFontId;
+ mutable ImplFontCharMap* mpCharMap;
+ mutable bool mbOs2Read; // true if OS2-table related info is valid
+ mutable bool mbHasOs2Table;
+ mutable bool mbCmapEncodingRead; // true if cmap encoding of Mac font is read
+ mutable bool mbHasCJKSupport; // #i78970# CJK fonts need extra leading
};
// abstracting quartz color instead of having to use an CGFloat[] array
@@ -82,9 +82,9 @@ class RGBAColor
public:
RGBAColor( SalColor );
RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET
- const float* AsArray() const { return &mfRed; }
- bool IsVisible() const { return (mfAlpha > 0); }
- void SetAlpha( float fAlpha ) { mfAlpha = fAlpha; }
+ const float* AsArray() const { return &mfRed; }
+ bool IsVisible() const { return (mfAlpha > 0); }
+ void SetAlpha( float fAlpha ) { mfAlpha = fAlpha; }
private:
float mfRed, mfGreen, mfBlue, mfAlpha;
};
@@ -97,13 +97,13 @@ class AquaSalGraphics : public SalGraphics
friend class ATSLayout;
protected:
AquaSalFrame* mpFrame;
- CGLayerRef mxLayer; // Quartz graphics layer
- CGContextRef mrContext; // Quartz drawing context
- class XorEmulation* mpXorEmulation;
+ CGLayerRef mxLayer; // Quartz graphics layer
+ CGContextRef mrContext; // Quartz drawing context
+ class XorEmulation* mpXorEmulation;
int mnXorMode; // 0: off 1: on 2: invert only
- int mnWidth;
- int mnHeight;
- int mnBitmapDepth; // zero unless bitmap
+ int mnWidth;
+ int mnHeight;
+ int mnBitmapDepth; // zero unless bitmap
/// device resolution of this graphics
long mnRealDPIX;
long mnRealDPIY;
@@ -115,7 +115,7 @@ protected:
/// path representing current clip region
CGMutablePathRef mxClipPath;
- /// Drawing colors
+ /// Drawing colors
/// pen color RGBA
RGBAColor maLineColor;
/// brush color RGBA
@@ -124,7 +124,7 @@ protected:
// Device Font settings
const ImplMacFontData* mpMacFontData;
/// ATSU style object which carries all font attributes
- ATSUStyle maATSUStyle;
+ ATSUStyle maATSUStyle;
/// text rotation as ATSU angle
Fixed mnATSUIRotation;
/// workaround to prevent ATSU overflows for huge font sizes
@@ -135,7 +135,7 @@ protected:
bool mbNonAntialiasedText;
// Graphics types
-
+
/// is this a printer graphics
bool mbPrinter;
/// is this a virtual device graphics
@@ -144,12 +144,12 @@ protected:
bool mbWindow;
public:
- AquaSalGraphics();
+ AquaSalGraphics();
virtual ~AquaSalGraphics();
- bool IsPenVisible() const { return maLineColor.IsVisible(); }
- bool IsBrushVisible() const { return maFillColor.IsVisible(); }
-
+ bool IsPenVisible() const { return maLineColor.IsVisible(); }
+ bool IsBrushVisible() const { return maFillColor.IsVisible(); }
+
void SetWindowGraphics( AquaSalFrame* pFrame );
void SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY, double fFakeScale );
void SetVirDevGraphics( CGLayerRef, CGContextRef, int nBitDepth = 0 );
@@ -157,7 +157,7 @@ public:
void initResolution( NSWindow* );
void copyResolution( AquaSalGraphics& );
void updateResolution();
-
+
bool IsWindowGraphics() const { return mbWindow; }
bool IsPrinterGraphics() const { return mbPrinter; }
bool IsVirDevGraphics() const { return mbVirDev; }
@@ -165,67 +165,67 @@ public:
void setGraphicsFrame( AquaSalFrame* pFrame ) { mpFrame = pFrame; }
void ImplDrawPixel( long nX, long nY, const RGBAColor& ); // helper to draw single pixels
-
+
bool CheckContext();
void UpdateWindow( NSRect& ); // delivered in NSView coordinates
- void RefreshRect( const CGRect& );
- void RefreshRect( const NSRect& );
- void RefreshRect(float lX, float lY, float lWidth, float lHeight);
+ void RefreshRect( const CGRect& );
+ void RefreshRect( const NSRect& );
+ void RefreshRect(float lX, float lY, float lWidth, float lHeight);
void SetState();
void UnsetState();
// InvalidateContext does an UnsetState and sets mrContext to 0
void InvalidateContext();
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- 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( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* 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 void drawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
// CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
long nSrcHeight, USHORT nFlags );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
- virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
+ virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
+ 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 SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
// invert --> ClipRegion (only Windows or VirDevs)
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags);
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ 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 );
CGPoint* makeCGptArray(ULONG nPoints, const SalPoint* pPtAry);
@@ -243,52 +243,52 @@ public:
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
// get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
+ virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount();
// get the width of the device
- virtual long GetGraphicsWidth() const;
+ virtual long GetGraphicsWidth() const;
// set the clip region to empty
- virtual void ResetClipRegion();
+ virtual void ResetClipRegion();
// begin setting the clip region, add rectangles to the
// region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
+ virtual void BeginSetClipRegion( ULONG nCount );
// all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion();
+ virtual void EndSetClipRegion();
// set the line color to transparent (= don't draw lines)
- virtual void SetLineColor();
+ virtual void SetLineColor();
// set the line color to a specific color
- virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetLineColor( SalColor nSalColor );
// set the fill color to transparent (= don't fill)
- virtual void SetFillColor();
+ virtual void SetFillColor();
// set the fill color to a specific color, shapes will be
// filled accordingly
- virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetFillColor( SalColor nSalColor );
// enable/disable XOR drawing
- virtual void SetXORMode( bool bSet, bool bInvertOnly );
+ virtual void SetXORMode( bool bSet, bool bInvertOnly );
// set line color for raster operations
- virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
// set fill color for raster operations
- virtual void SetROPFillColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
// set the text color to a specific color
- virtual void SetTextColor( SalColor nSalColor );
+ virtual void SetTextColor( SalColor nSalColor );
// set the font
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
// get the current font's etrics
- virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const;
// graphics must fill supplied font list
- virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontList( ImplDevFontList* );
// graphics should call ImplAddDevFontSubstitute on supplied
// OutputDevice for all its device specific preferred font substitutions
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
// returns TRUE if creation of subset was successfull
@@ -301,7 +301,7 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData* pFont,
long* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -326,13 +326,13 @@ public:
// pWidths MUST support at least 256 members;
// rInfo: additional outgoing information
// pDataLen: out parameter, contains the byte length of the returned buffer
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
// frees the font data again
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
virtual void GetGlyphWidths( const ImplFontData*,
bool bVertical,
@@ -343,7 +343,7 @@ public:
virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
// Query the platform layer for control support
@@ -367,25 +367,25 @@ class XorEmulation
{
public:
XorEmulation();
- /*final*/ ~XorEmulation();
+ /*final*/ ~XorEmulation();
- void SetTarget( int nWidth, int nHeight, int nBitmapDepth, CGContextRef, CGLayerRef );
- bool UpdateTarget();
- void Enable() { mbIsEnabled = true; }
- void Disable() { mbIsEnabled = false; }
- bool IsEnabled() const { return mbIsEnabled; }
- CGContextRef GetTargetContext() const { return mxTargetContext; }
- CGContextRef GetMaskContext() const { return (mbIsEnabled ? mxMaskContext : NULL); }
+ void SetTarget( int nWidth, int nHeight, int nBitmapDepth, CGContextRef, CGLayerRef );
+ bool UpdateTarget();
+ void Enable() { mbIsEnabled = true; }
+ void Disable() { mbIsEnabled = false; }
+ bool IsEnabled() const { return mbIsEnabled; }
+ CGContextRef GetTargetContext() const { return mxTargetContext; }
+ CGContextRef GetMaskContext() const { return (mbIsEnabled ? mxMaskContext : NULL); }
private:
- CGLayerRef mxTargetLayer;
- CGContextRef mxTargetContext;
- CGContextRef mxMaskContext;
- CGContextRef mxTempContext;
- ULONG* mpMaskBuffer;
- ULONG* mpTempBuffer;
- int mnBufferLongs;
- bool mbIsEnabled;
+ CGLayerRef mxTargetLayer;
+ CGContextRef mxTargetContext;
+ CGContextRef mxMaskContext;
+ CGContextRef mxTempContext;
+ ULONG* mpMaskBuffer;
+ ULONG* mpTempBuffer;
+ int mnBufferLongs;
+ bool mbIsEnabled;
};
@@ -402,17 +402,17 @@ inline void AquaSalGraphics::RefreshRect( const NSRect& rRect )
}
inline RGBAColor::RGBAColor( SalColor nSalColor )
-: mfRed( SALCOLOR_RED(nSalColor) * (1.0/255))
-, mfGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255))
-, mfBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255))
-, mfAlpha( 1.0 ) // opaque
+: mfRed( SALCOLOR_RED(nSalColor) * (1.0/255))
+, mfGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255))
+, mfBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255))
+, mfAlpha( 1.0 ) // opaque
{}
inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha )
-: mfRed( fRed )
-, mfGreen( fGreen )
-, mfBlue( fBlue )
-, mfAlpha( fAlpha )
+: mfRed( fRed )
+, mfGreen( fGreen )
+, mfBlue( fBlue )
+, mfAlpha( fAlpha )
{}
#endif // _SV_SALGDI_H
diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h
index db5b0219f821..3861c0387e93 100644
--- a/vcl/aqua/inc/salinst.h
+++ b/vcl/aqua/inc/salinst.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +50,15 @@ class Image;
class SalYieldMutex : public vcl::SolarMutexObject
{
- ULONG mnCount;
+ ULONG mnCount;
oslThreadIdentifier mnThreadId;
public:
SalYieldMutex();
- virtual void acquire();
- virtual void release();
- virtual sal_Bool tryToAcquire();
- ULONG GetAcquireCount() const { return mnCount; }
+ virtual void acquire();
+ virtual void release();
+ virtual sal_Bool tryToAcquire();
+ ULONG GetAcquireCount() const { return mnCount; }
oslThreadIdentifier GetThreadId() const { return mnThreadId; }
};
@@ -85,14 +85,14 @@ class AquaSalInstance : public SalInstance
AquaSalFrame* mpFrame;
void* mpData;
USHORT mnType;
-
+
SalUserEvent( AquaSalFrame* pFrame, void* pData, USHORT nType ) :
mpFrame( pFrame ), mpData( pData ), mnType( nType )
{}
};
-
+
public:
- SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
+ SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
rtl::OUString maDefaultPrinter;
oslThreadIdentifier maMainThread;
bool mbWaitingYield;
@@ -103,47 +103,47 @@ public:
typedef std::list<const ApplicationEvent*> AppEventList;
static AppEventList aAppEventList;
-
+
public:
AquaSalInstance();
virtual ~AquaSalInstance();
virtual SalSystem* CreateSystem();
virtual void DestroySystem(SalSystem*);
- 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 SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ 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 SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
USHORT nBitCount, const SystemGraphicsData *pData );
- 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 GetPrinterQueueInfo( ImplPrnQueueList* pList );
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
+ 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 String GetDefaultPrinter();
- virtual SalTimer* CreateSalTimer();
- virtual SalI18NImeStatus* CreateI18NImeStatus();
- virtual SalSystem* CreateSalSystem();
- virtual SalBitmap* CreateSalBitmap();
+ virtual SalTimer* CreateSalTimer();
+ virtual SalI18NImeStatus* CreateI18NImeStatus();
+ virtual SalSystem* CreateSalSystem();
+ virtual SalBitmap* CreateSalBitmap();
virtual osl::SolarMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* );
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* );
+ virtual ULONG ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( ULONG nCount );
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual bool AnyInput( USHORT nType );
+ virtual SalMenu* CreateMenu( BOOL bMenuBar );
+ virtual void DestroyMenu( SalMenu* );
+ virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
+ virtual void DestroyMenuItem( SalMenuItem* );
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);
virtual void SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) );
virtual void SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) );
@@ -155,31 +155,31 @@ public:
virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget();
static void handleAppDefinedEvent( NSEvent* pEvent );
-
+
// check whether a particular string is passed on the command line
// this is needed to avoid duplicate open events through a) command line and b) NSApp's openFile
static bool isOnCommandLine( const rtl::OUString& );
-
+
void wakeupYield();
public:
friend class AquaSalFrame;
-
+
void PostUserEvent( AquaSalFrame* pFrame, USHORT nType, void* pData );
void delayedSettingsChanged( bool bInvalidate );
-
+
bool isNSAppThread() const;
-
+
void startedPrintJob() { mnActivePrintJobs++; }
void endedPrintJob() { mnActivePrintJobs--; }
-
+
// event subtypes for NSApplicationDefined events
static const short AppExecuteSVMain = 0x7fff;
static const short AppEndLoopEvent = 1;
static const short AppStartTimerEvent = 10;
static const short AppleRemoteEvent = 15;
static const short YieldWakeupEvent = 20;
-
+
static NSMenu* GetDynamicDockMenu();
};
diff --git a/vcl/aqua/inc/salmathutils.hxx b/vcl/aqua/inc/salmathutils.hxx
index e81f68e46b0b..e70735a04758 100644
--- a/vcl/aqua/inc/salmathutils.hxx
+++ b/vcl/aqua/inc/salmathutils.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ struct LRectCoor
//
// ------------------------------------------------------------------
-// LRectCoorVec is an abreviation for vectors in rectangular
+// LRectCoorVec is an abreviation for vectors in rectangular
// coordinates represented as long integers
typedef struct LRectCoor LRectCoor;
@@ -85,6 +85,6 @@ unsigned long Euclidian2Norm ( const LRectCoorVector pVec );
}
#endif
-#endif // _SV_SALMATHUTILS_HXX
+#endif // _SV_SALMATHUTILS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/salmenu.h b/vcl/aqua/inc/salmenu.h
index 0d30deedb176..812399128c50 100644
--- a/vcl/aqua/inc/salmenu.h
+++ b/vcl/aqua/inc/salmenu.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +58,7 @@ public: // for OOStatusView
};
private:
std::vector< MenuBarButtonEntry > maButtons;
-
+
MenuBarButtonEntry* findButtonItem( USHORT i_nItemId );
void releaseButtonEntry( MenuBarButtonEntry& i_rEntry );
static void statusLayout();
@@ -86,14 +86,14 @@ public:
int getItemIndexByPos( USHORT nPos ) const;
const AquaSalFrame* getFrame() const;
-
+
void setMainMenu();
static void unsetMainMenu();
static void setDefaultMenu();
static void enableMainMenu( bool bEnable );
static void addFallbackMenuItem( NSMenuItem* NewItem );
static void removeFallbackMenuItem( NSMenuItem* pOldItem );
-
+
const std::vector< MenuBarButtonEntry >& getButtons() const { return maButtons; }
bool mbMenuBar; // true - Menubar, false - Menu
@@ -101,9 +101,9 @@ public:
Menu* mpVCLMenu; // the corresponding vcl Menu object
const AquaSalFrame* mpFrame; // the frame to dispatch the menu events to
AquaSalMenu* mpParentSalMenu; // the parent menu that contains us (and perhaps has a frame)
-
+
static const AquaSalMenu* pCurrentMenuBar;
-
+
};
class AquaSalMenuItem : public SalMenuItem
diff --git a/vcl/aqua/inc/salnativewidgets.h b/vcl/aqua/inc/salnativewidgets.h
index fd6226c8030b..86db06d1180e 100644
--- a/vcl/aqua/inc/salnativewidgets.h
+++ b/vcl/aqua/inc/salnativewidgets.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
//tabs
#define TAB_HEIGHT_NORMAL 20
#define TAB_HEIGHT_SMALL 17
-#define TAB_HEIGHT_MINI 15
+#define TAB_HEIGHT_MINI 15
#define TAB_TEXT_OFFSET 12
#define VCL_TAB_TEXT_OFFSET 2
@@ -69,6 +69,6 @@
#define CLIP_FUZZ 1
-#endif // _SV_NATIVEWIDGETS_H
+#endif // _SV_NATIVEWIDGETS_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/inc/salnsmenu.h b/vcl/aqua/inc/salnsmenu.h
index fac4aec75792..eb29c3d6a47b 100644
--- a/vcl/aqua/inc/salnsmenu.h
+++ b/vcl/aqua/inc/salnsmenu.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/salnstimer.h b/vcl/aqua/inc/salnstimer.h
index 5c4ba0eea430..8e3f8dfc6cad 100644
--- a/vcl/aqua/inc/salnstimer.h
+++ b/vcl/aqua/inc/salnstimer.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/salobj.h b/vcl/aqua/inc/salobj.h
index 99dea9483b4b..d48d807f11fb 100644
--- a/vcl/aqua/inc/salobj.h
+++ b/vcl/aqua/inc/salobj.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,40 +48,40 @@ struct SalObjectData
class AquaSalObject : public SalObject
{
public:
- AquaSalFrame* mpFrame; // parent frame
+ AquaSalFrame* mpFrame; // parent frame
NSClipView* mpClipView;
SystemEnvData maSysData;
-
+
long mnClipX;
long mnClipY;
long mnClipWidth;
long mnClipHeight;
bool mbClip;
-
+
long mnX;
long mnY;
long mnWidth;
long mnHeight;
-
-
+
+
void setClippedPosSize();
-
+
AquaSalObject( AquaSalFrame* pFrame );
virtual ~AquaSalObject();
-
- 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/aqua/inc/salprn.h b/vcl/aqua/inc/salprn.h
index 3682ea6b5a9f..bcae1cb8ffc1 100644
--- a/vcl/aqua/inc/salprn.h
+++ b/vcl/aqua/inc/salprn.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,56 +45,56 @@ class AquaSalGraphics;
class AquaSalInfoPrinter : public SalInfoPrinter
{
/// Printer graphics
- AquaSalGraphics* mpGraphics;
+ AquaSalGraphics* mpGraphics;
/// is Graphics used
- bool mbGraphics;
+ bool mbGraphics;
/// job active ?
bool mbJob;
-
+
/// cocoa printer object
NSPrinter* mpPrinter;
/// cocoa print info object
NSPrintInfo* mpPrintInfo;
-
+
/// FIXME: get real printer context for infoprinter if possible
/// fake context for info printer
/// graphics context for Quartz 2D
- CGContextRef mrContext;
+ CGContextRef mrContext;
/// memory for graphics bitmap context for querying metrics
boost::shared_array< sal_uInt8 > maContextMemory;
-
+
// since changes to NSPrintInfo during a job are ignored
// we have to care for some settings ourselves
// currently we do this for orientation;
// really needed however is a solution for paper formats
Orientation mePageOrientation;
-
+
int mnStartPageOffsetX;
int mnStartPageOffsetY;
sal_Int32 mnCurPageRangeStart;
sal_Int32 mnCurPageRangeCount;
-
+
public:
AquaSalInfoPrinter( const SalPrinterQueueInfo& pInfo );
virtual ~AquaSalInfoPrinter();
-
+
void SetupPrinterGraphics( CGContextRef i_xContext ) const;
-
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* i_pGraphics );
- virtual BOOL Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData );
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
- virtual BOOL SetData( ULONG i_nFlags, ImplJobSetup* i_pSetupData );
- virtual void GetPageInfo( const ImplJobSetup* i_pSetupData,
+
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* i_pGraphics );
+ virtual BOOL Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData );
+ virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
+ virtual BOOL SetData( ULONG i_nFlags, ImplJobSetup* i_pSetupData );
+ virtual void GetPageInfo( const ImplJobSetup* i_pSetupData,
long& o_rOutWidth, long& o_rOutHeight,
long& o_rPageOffX, long& o_rPageOffY,
long& o_rPageWidth, long& o_rPageHeight );
- virtual ULONG GetCapabilities( const ImplJobSetup* i_pSetupData, USHORT i_nType );
- virtual ULONG GetPaperBinCount( const ImplJobSetup* i_pSetupData );
- virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin );
- virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData );
- virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData );
-
+ virtual ULONG GetCapabilities( const ImplJobSetup* i_pSetupData, USHORT i_nType );
+ virtual ULONG GetPaperBinCount( const ImplJobSetup* i_pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin );
+ virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData );
+ virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData );
+
// the artificial separation between InfoPrinter and Printer
// is not really useful for us
// so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter
@@ -105,21 +105,21 @@ class AquaSalInfoPrinter : public SalInfoPrinter
const String& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rController );
- BOOL EndJob();
- BOOL AbortJob();
- SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
- BOOL EndPage();
- ULONG GetErrorCode() const;
-
+ BOOL EndJob();
+ BOOL AbortJob();
+ SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
+ BOOL EndPage();
+ ULONG GetErrorCode() const;
+
NSPrintInfo* getPrintInfo() const { return mpPrintInfo; }
void setStartPageOffset( int nOffsetX, int nOffsetY ) { mnStartPageOffsetX = nOffsetX; mnStartPageOffsetY = nOffsetY; }
sal_Int32 getCurPageRangeStart() const { return mnCurPageRangeStart; }
sal_Int32 getCurPageRangeCount() const { return mnCurPageRangeCount; }
-
+
// match width/height against known paper formats, possibly switching orientation
const PaperInfo* matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const;
void setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation );
-
+
private:
AquaSalInfoPrinter( const AquaSalInfoPrinter& );
AquaSalInfoPrinter& operator=(const AquaSalInfoPrinter&);
@@ -131,12 +131,12 @@ class AquaSalInfoPrinter : public SalInfoPrinter
class AquaSalPrinter : public SalPrinter
{
- AquaSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ AquaSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
public:
AquaSalPrinter( AquaSalInfoPrinter* i_pInfoPrinter );
virtual ~AquaSalPrinter();
-
- virtual BOOL StartJob( const XubString* i_pFileName,
+
+ virtual BOOL StartJob( const XubString* i_pFileName,
const XubString& i_rJobName,
const XubString& i_rAppName,
ULONG i_nCopies,
@@ -149,13 +149,13 @@ class AquaSalPrinter : public SalPrinter
const String& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rListener );
-
- virtual BOOL EndJob();
- virtual BOOL AbortJob();
- virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
- virtual BOOL EndPage();
- virtual ULONG GetErrorCode();
-
+
+ virtual BOOL EndJob();
+ virtual BOOL AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
+ virtual BOOL EndPage();
+ virtual ULONG GetErrorCode();
+
private:
AquaSalPrinter( const AquaSalPrinter& );
AquaSalPrinter& operator=(const AquaSalPrinter&);
diff --git a/vcl/aqua/inc/salsys.h b/vcl/aqua/inc/salsys.h
index 964da669301b..b0919c0c55a4 100644
--- a/vcl/aqua/inc/salsys.h
+++ b/vcl/aqua/inc/salsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/saltimer.h b/vcl/aqua/inc/saltimer.h
index 0651ec584fef..929d16981c9b 100644
--- a/vcl/aqua/inc/saltimer.h
+++ b/vcl/aqua/inc/saltimer.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 AquaSalTimer : public SalTimer
void Start( ULONG nMS );
void Stop();
-
+
static void handleStartTimerEvent( NSEvent* pEvent );
diff --git a/vcl/aqua/inc/salvd.h b/vcl/aqua/inc/salvd.h
index 5970c07f7f9c..117c42c0af88 100644
--- a/vcl/aqua/inc/salvd.h
+++ b/vcl/aqua/inc/salvd.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,9 +83,9 @@ private:
public:
AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData );
virtual ~AquaSalVirtualDevice();
-
- 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 );
};
diff --git a/vcl/aqua/inc/svsys.h b/vcl/aqua/inc/svsys.h
index 291e7801db75..4856908a3852 100644
--- a/vcl/aqua/inc/svsys.h
+++ b/vcl/aqua/inc/svsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/inc/vclnsapp.h b/vcl/aqua/inc/vclnsapp.h
index 316f7e6af153..c8fbf12afffb 100644
--- a/vcl/aqua/inc/vclnsapp.h
+++ b/vcl/aqua/inc/vclnsapp.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11yactionwrapper.h b/vcl/aqua/source/a11y/aqua11yactionwrapper.h
index 0fd2fa1e25ff..749a9bda98ac 100644
--- a/vcl/aqua/source/a11y/aqua11yactionwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11yactionwrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ycomponentwrapper.h b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
index 3968e71f4992..8f83e650d0d3 100644
--- a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11yfocuslistener.cxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
index 8e93bd450bf8..7ed4b9bccc66 100644
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ rtl::Reference< AquaA11yFocusListener > AquaA11yFocusListener::get()
{
if ( ! theListener.is() )
theListener = new AquaA11yFocusListener();
-
+
return theListener;
}
@@ -73,20 +73,20 @@ id AquaA11yFocusListener::getFocusedUIElement()
// intentionally do nothing ..
}
}
-
+
return m_focusedObject;
}
//------------------------------------------------------------------------------
-void SAL_CALL
+void SAL_CALL
AquaA11yFocusListener::focusedObjectChanged(const Reference< XAccessible >& xAccessible)
{
if ( nil != m_focusedObject ) {
[ m_focusedObject release ];
m_focusedObject = nil;
}
-
+
try {
if( xAccessible.is() ) {
Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext());
@@ -103,18 +103,18 @@ AquaA11yFocusListener::focusedObjectChanged(const Reference< XAccessible >& xAcc
//------------------------------------------------------------------------------
-oslInterlockedCount SAL_CALL
+oslInterlockedCount SAL_CALL
AquaA11yFocusListener::acquire() SAL_THROW(())
-{
- return ReferenceObject::acquire();
+{
+ return ReferenceObject::acquire();
}
//------------------------------------------------------------------------------
-oslInterlockedCount SAL_CALL
+oslInterlockedCount SAL_CALL
AquaA11yFocusListener::release() SAL_THROW(())
-{
- return ReferenceObject::release();
+{
+ return ReferenceObject::release();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx
index 192a1f04e278..0fbbc896f1b3 100644
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx
+++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +34,12 @@
#include "keyboardfocuslistener.hxx"
#include "aquavcltypes.h"
-class AquaA11yFocusListener :
+class AquaA11yFocusListener :
public KeyboardFocusListener,
public salhelper::ReferenceObject
{
id m_focusedObject;
-
+
static rtl::Reference< AquaA11yFocusListener > theListener;
AquaA11yFocusListener::AquaA11yFocusListener();
@@ -47,15 +47,15 @@ class AquaA11yFocusListener :
public:
static rtl::Reference< AquaA11yFocusListener > get();
-
+
id getFocusedUIElement();
// KeyboardFocusListener
virtual void SAL_CALL focusedObjectChanged(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible);
-
+
// rtl::IReference
virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(());
- virtual oslInterlockedCount SAL_CALL release() SAL_THROW(());
+ virtual oslInterlockedCount SAL_CALL release() SAL_THROW(());
};
#endif // _AQUA11YFOCUSLISTENER_HXX_
diff --git a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
index f4b5393c7e8f..53e12b516aed 100644
--- a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace ::com::sun::star::uno;
//------------------------------------------------------------------------------
-static inline Window *
+static inline Window *
getWindow(const ::VclSimpleEvent *pEvent)
{
return static_cast< const ::VclWindowEvent *> (pEvent)->GetWindow();
@@ -87,13 +87,13 @@ long AquaA11yFocusTracker::WindowEventHandler(AquaA11yFocusTracker *pFocusTracke
default:
break;
};
-
+
return 0;
}
//------------------------------------------------------------------------------
-AquaA11yFocusTracker::AquaA11yFocusTracker() :
+AquaA11yFocusTracker::AquaA11yFocusTracker() :
m_aWindowEventLink(this, (PSTUB) WindowEventHandler),
m_xDocumentFocusListener(new DocumentFocusListener(*this))
{
@@ -106,9 +106,9 @@ AquaA11yFocusTracker::AquaA11yFocusTracker() :
void AquaA11yFocusTracker::setFocusedObject(const Reference< XAccessible >& xAccessible)
{
if( xAccessible != m_xFocusedObject )
- {
+ {
m_xFocusedObject = xAccessible;
-
+
if( m_aFocusListener.is() )
m_aFocusListener->focusedObjectChanged(xAccessible);
}
@@ -119,7 +119,7 @@ void AquaA11yFocusTracker::setFocusedObject(const Reference< XAccessible >& xAcc
void AquaA11yFocusTracker::notify_toolbox_item_focus(ToolBox *pToolBox)
{
Reference< XAccessible > xAccessible( pToolBox->GetAccessible() );
-
+
if( xAccessible.is() )
{
Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext());
@@ -179,7 +179,7 @@ void AquaA11yFocusTracker::toolbox_highlight_on(Window *pWindow)
if ( ! pToolBoxParent || ! pToolBoxParent->HasFocus() )
return;
}
-
+
notify_toolbox_item_focus(static_cast <ToolBox *> (pWindow));
}
@@ -188,7 +188,7 @@ void AquaA11yFocusTracker::toolbox_highlight_on(Window *pWindow)
void AquaA11yFocusTracker::toolbox_highlight_off(Window *pWindow)
{
ToolBox* pToolBoxParent = dynamic_cast< ToolBox * >( pWindow->GetParent() );
-
+
// Notify when leaving sub toolboxes
if( pToolBoxParent && pToolBoxParent->HasFocus() )
notify_toolbox_item_focus( pToolBoxParent );
@@ -199,14 +199,14 @@ void AquaA11yFocusTracker::toolbox_highlight_off(Window *pWindow)
void AquaA11yFocusTracker::tabpage_activated(Window *pWindow)
{
Reference< XAccessible > xAccessible( pWindow->GetAccessible() );
-
+
if( xAccessible.is() )
{
Reference< XAccessibleSelection > xSelection(xAccessible->getAccessibleContext(), UNO_QUERY);
-
+
if( xSelection.is() )
setFocusedObject( xSelection->getSelectedAccessibleChild(0) );
- }
+ }
}
//------------------------------------------------------------------------------
@@ -214,7 +214,7 @@ void AquaA11yFocusTracker::tabpage_activated(Window *pWindow)
void AquaA11yFocusTracker::menu_highlighted(const VclMenuEvent *pEvent)
{
Menu * pMenu = pEvent->GetMenu();
-
+
if( pMenu )
{
Reference< XAccessible > xAccessible( pMenu->GetAccessible() );
@@ -231,34 +231,34 @@ void AquaA11yFocusTracker::window_got_focus(Window *pWindow)
// The menu bar is handled through VCLEVENT_MENU_HIGHLIGHTED
if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WINDOW_MENUBARWINDOW )
return;
-
+
// ToolBoxes are handled through VCLEVENT_TOOLBOX_HIGHLIGHT
if( pWindow->GetType() == WINDOW_TOOLBOX )
return;
-
+
if( pWindow->GetType() == WINDOW_TABCONTROL )
{
tabpage_activated( pWindow );
return;
}
-
+
Reference< XAccessible > xAccessible(pWindow->GetAccessible());
-
+
if( ! xAccessible.is() )
return;
-
+
Reference< XAccessibleContext > xContext = xAccessible->getAccessibleContext();
-
+
if( ! xContext.is() )
return;
-
+
Reference< XAccessibleStateSet > xStateSet = xContext->getAccessibleStateSet();
-
+
if( ! xStateSet.is() )
return;
-
+
/* the UNO ToolBox wrapper does not (yet?) support XAccessibleSelection, so we
- * need to add listeners to the children instead of re-using the tabpage stuff
+ * need to add listeners to the children instead of re-using the tabpage stuff
*/
if( xStateSet->contains(AccessibleStateType::FOCUSED) && (pWindow->GetType() != WINDOW_TREELISTBOX) )
{
diff --git a/vcl/aqua/source/a11y/aqua11ylistener.cxx b/vcl/aqua/source/a11y/aqua11ylistener.cxx
index 3b77f054a0ac..782580ff87ae 100644
--- a/vcl/aqua/source/a11y/aqua11ylistener.cxx
+++ b/vcl/aqua/source/a11y/aqua11ylistener.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#include "aqua11ylistener.hxx"
#include "aqua11yfactory.h"
#include "aqua11yfocustracker.hxx"
@@ -47,16 +47,16 @@ NSString * getTableNotification( const AccessibleEventObject& aEvent )
{
AccessibleTableModelChange aChange;
NSString * notification = nil;
-
+
if( (aEvent.NewValue >>= aChange) &&
( AccessibleTableModelChangeType::INSERT == aChange.Type || AccessibleTableModelChangeType::DELETE == aChange.Type ) &&
aChange.FirstRow != aChange.LastRow )
{
notification = NSAccessibilityRowCountChangedNotification;
}
-
+
return notification;
-}
+}
//------------------------------------------------------------------------------
@@ -67,14 +67,14 @@ AquaA11yEventListener::AquaA11yEventListener(id wrapperObject, sal_Int16 role) :
//------------------------------------------------------------------------------
-AquaA11yEventListener::~AquaA11yEventListener()
+AquaA11yEventListener::~AquaA11yEventListener()
{
[ m_wrapperObject release ];
}
//------------------------------------------------------------------------------
-void SAL_CALL
+void SAL_CALL
AquaA11yEventListener::disposing( const EventObject& Source ) throw( RuntimeException )
{
[ AquaA11yFactory removeFromWrapperRepositoryFor: [ (AquaA11yWrapper *) m_wrapperObject accessibleContext ] ];
@@ -82,13 +82,13 @@ AquaA11yEventListener::disposing( const EventObject& Source ) throw( RuntimeExce
//------------------------------------------------------------------------------
-void SAL_CALL
+void SAL_CALL
AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) throw( RuntimeException )
{
NSString * notification = nil;
id element = m_wrapperObject;
Rectangle bounds;
-
+
// TODO: NSAccessibilityValueChanged, NSAccessibilitySelectedRowsChangedNotification
switch( aEvent.EventId )
{
@@ -99,11 +99,11 @@ AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) throw(
AquaA11yFocusTracker::get().setFocusedObject( xAccessible );
}
break;
-
+
case AccessibleEventId::NAME_CHANGED:
notification = NSAccessibilityTitleChangedNotification;
break;
-
+
case AccessibleEventId::CHILD:
// only needed for tooltips (says Apple)
if ( m_role == AccessibleRole::TOOL_TIP ) {
@@ -114,11 +114,11 @@ AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) throw(
}
}
break;
-
+
case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
- // TODO: depricate or remember all children
+ // TODO: depricate or remember all children
break;
-
+
case AccessibleEventId::BOUNDRECT_CHANGED:
bounds = [ element accessibleComponent ] -> getBounds();
if ( m_oldBounds.X != 0 && ( bounds.X != m_oldBounds.X || bounds.Y != m_oldBounds.Y ) ) {
@@ -129,23 +129,23 @@ AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) throw(
}
m_oldBounds = bounds;
break;
-
+
case AccessibleEventId::SELECTION_CHANGED:
notification = NSAccessibilitySelectedChildrenChangedNotification;
break;
-
+
case AccessibleEventId::TEXT_SELECTION_CHANGED:
notification = NSAccessibilitySelectedTextChangedNotification;
break;
-
+
case AccessibleEventId::TABLE_MODEL_CHANGED:
notification = getTableNotification(aEvent);
break;
-
+
case AccessibleEventId::CARET_CHANGED:
notification = NSAccessibilitySelectedTextChangedNotification;
break;
-
+
case AccessibleEventId::TEXT_CHANGED:
notification = NSAccessibilityValueChangedNotification;
break;
@@ -153,7 +153,7 @@ AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) throw(
default:
break;
}
-
+
if( nil != notification )
NSAccessibilityPostNotification(element, notification);
}
diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.h b/vcl/aqua/source/a11y/aqua11yrolehelper.h
index 38328c6a3d46..66e6e91b75d7 100644
--- a/vcl/aqua/source/a11y/aqua11yrolehelper.h
+++ b/vcl/aqua/source/a11y/aqua11yrolehelper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11yselectionwrapper.h b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
index 56a77ae9b728..ade4cf14a1b0 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ytablewrapper.h b/vcl/aqua/source/a11y/aqua11ytablewrapper.h
index 8f3e48364257..acaa50bd43ee 100644
--- a/vcl/aqua/source/a11y/aqua11ytablewrapper.h
+++ b/vcl/aqua/source/a11y/aqua11ytablewrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ytextattributeswrapper.h b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h
index d7159de9f526..c54cbc360a9f 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ytextwrapper.h b/vcl/aqua/source/a11y/aqua11ytextwrapper.h
index c793ae01a69e..b4bc25cb0a4c 100644
--- a/vcl/aqua/source/a11y/aqua11ytextwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11yutil.h b/vcl/aqua/source/a11y/aqua11yutil.h
index 5007def0487b..7939685e8c34 100644
--- a/vcl/aqua/source/a11y/aqua11yutil.h
+++ b/vcl/aqua/source/a11y/aqua11yutil.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11yvaluewrapper.h b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
index 6b92718cc808..dbe8671f9948 100644
--- a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
+++ b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperbutton.h b/vcl/aqua/source/a11y/aqua11ywrapperbutton.h
index d232e111865e..b4ab2b19eed5 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperbutton.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperbutton.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappercheckbox.h b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
index e689e829a6e2..d855d8e485ca 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappercombobox.h b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
index ea58a227ed95..bc52420300f6 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappergroup.h b/vcl/aqua/source/a11y/aqua11ywrappergroup.h
index 0e6deae658d1..622e9d51b038 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappergroup.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappergroup.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperlist.h b/vcl/aqua/source/a11y/aqua11ywrapperlist.h
index d0b0b17d3769..f6ddb58c3dd3 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperlist.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperlist.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperradiobutton.h b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
index 6edc9b139b70..6df01c0147a5 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperradiogroup.h b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h
index f73a746046ad..a37c89ba194e 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperrow.h b/vcl/aqua/source/a11y/aqua11ywrapperrow.h
index b4956ec466af..d4f4eca1e0ed 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperrow.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperrow.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperscrollarea.h b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h
index b92d9ac4a1cb..31ce6be739b3 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperscrollbar.h b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h
index 8fc87d02b0fe..81ba622c9549 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappersplitter.h b/vcl/aqua/source/a11y/aqua11ywrappersplitter.h
index dfe39d88949e..535b79bed0ac 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappersplitter.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappersplitter.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrapperstatictext.h b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h
index a87f238b6027..024368f8fa58 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappertabgroup.h b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h
index 9c448c057eff..cfad97feacc3 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappertextarea.h b/vcl/aqua/source/a11y/aqua11ywrappertextarea.h
index 3e11797bb383..9a73adc18509 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappertextarea.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappertextarea.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/aqua11ywrappertoolbar.h b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h
index e7163fd8b373..6467abe643ed 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/a11y/documentfocuslistener.cxx b/vcl/aqua/source/a11y/documentfocuslistener.cxx
index 964f629bff51..a9f526f4b28a 100644
--- a/vcl/aqua/source/a11y/documentfocuslistener.cxx
+++ b/vcl/aqua/source/a11y/documentfocuslistener.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#include "documentfocuslistener.hxx"
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
@@ -33,16 +33,16 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
+
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
-
+
//------------------------------------------------------------------------------
DocumentFocusListener::DocumentFocusListener(AquaA11yFocusTracker& rTracker) :
- m_aFocusTracker(rTracker)
+ m_aFocusTracker(rTracker)
{
}
@@ -52,7 +52,7 @@ void SAL_CALL
DocumentFocusListener::disposing( const EventObject& aEvent )
throw (RuntimeException)
{
- // Unref the object here, but do not remove as listener since the object
+ // Unref the object here, but do not remove as listener since the object
// might no longer be in a state that safely allows this.
if( aEvent.Source.is() )
m_aRefList.erase(aEvent.Source);
@@ -60,18 +60,18 @@ DocumentFocusListener::disposing( const EventObject& aEvent )
//------------------------------------------------------------------------------
-void SAL_CALL
-DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent )
+void SAL_CALL
+DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent )
throw( RuntimeException )
{
switch( aEvent.EventId )
{
case AccessibleEventId::STATE_CHANGED:
- try
+ try
{
sal_Int16 nState = AccessibleStateType::INVALID;
aEvent.NewValue >>= nState;
-
+
if( AccessibleStateType::FOCUSED == nState )
m_aFocusTracker.setFocusedObject( getAccessible(aEvent) );
}
@@ -80,18 +80,18 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent )
OSL_TRACE("Focused object has invalid index in parent");
}
break;
-
+
case AccessibleEventId::CHILD:
{
Reference< XAccessible > xChild;
if( (aEvent.OldValue >>= xChild) && xChild.is() )
detachRecursive(xChild);
-
+
if( (aEvent.NewValue >>= xChild) && xChild.is() )
attachRecursive(xChild);
}
break;
-
+
case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
{
Reference< XAccessible > xAccessible( getAccessible(aEvent) );
@@ -112,10 +112,10 @@ Reference< XAccessible > DocumentFocusListener::getAccessible(const EventObject&
throw (IndexOutOfBoundsException, RuntimeException)
{
Reference< XAccessible > xAccessible(aEvent.Source, UNO_QUERY);
-
+
if( xAccessible.is() )
return xAccessible;
-
+
Reference< XAccessibleContext > xContext(aEvent.Source, UNO_QUERY);
if( xContext.is() )
@@ -130,13 +130,13 @@ Reference< XAccessible > DocumentFocusListener::getAccessible(const EventObject&
}
}
}
-
+
return Reference< XAccessible >();
}
//------------------------------------------------------------------------------
-void DocumentFocusListener::attachRecursive(const Reference< XAccessible >& xAccessible)
+void DocumentFocusListener::attachRecursive(const Reference< XAccessible >& xAccessible)
throw (IndexOutOfBoundsException, RuntimeException)
{
Reference< XAccessibleContext > xContext = xAccessible->getAccessibleContext();
@@ -148,8 +148,8 @@ void DocumentFocusListener::attachRecursive(const Reference< XAccessible >& xAcc
//------------------------------------------------------------------------------
void DocumentFocusListener::attachRecursive(
- const Reference< XAccessible >& xAccessible,
- const Reference< XAccessibleContext >& xContext
+ const Reference< XAccessible >& xAccessible,
+ const Reference< XAccessibleContext >& xContext
) throw (IndexOutOfBoundsException, RuntimeException)
{
if( xContext.is() )
@@ -164,13 +164,13 @@ void DocumentFocusListener::attachRecursive(
//------------------------------------------------------------------------------
void DocumentFocusListener::attachRecursive(
- const Reference< XAccessible >& xAccessible,
+ const Reference< XAccessible >& xAccessible,
const Reference< XAccessibleContext >& xContext,
- const Reference< XAccessibleStateSet >& xStateSet
+ const Reference< XAccessibleStateSet >& xStateSet
) throw (IndexOutOfBoundsException,RuntimeException)
{
if( xStateSet->contains(AccessibleStateType::FOCUSED ) )
- m_aFocusTracker.setFocusedObject( xAccessible );
+ m_aFocusTracker.setFocusedObject( xAccessible );
Reference< XAccessibleEventBroadcaster > xBroadcaster =
Reference< XAccessibleEventBroadcaster >(xContext, UNO_QUERY);
@@ -186,7 +186,7 @@ void DocumentFocusListener::attachRecursive(
for( n = 0; n < nmax; n++ )
{
Reference< XAccessible > xChild( xContext->getAccessibleChild( n ) );
-
+
if( xChild.is() )
attachRecursive(xChild);
}
@@ -196,7 +196,7 @@ void DocumentFocusListener::attachRecursive(
//------------------------------------------------------------------------------
-void DocumentFocusListener::detachRecursive(const Reference< XAccessible >& xAccessible)
+void DocumentFocusListener::detachRecursive(const Reference< XAccessible >& xAccessible)
throw (IndexOutOfBoundsException, RuntimeException)
{
Reference< XAccessibleContext > xContext = xAccessible->getAccessibleContext();
@@ -208,8 +208,8 @@ void DocumentFocusListener::detachRecursive(const Reference< XAccessible >& xAcc
//------------------------------------------------------------------------------
void DocumentFocusListener::detachRecursive(
- const Reference< XAccessible >& xAccessible,
- const Reference< XAccessibleContext >& xContext
+ const Reference< XAccessible >& xAccessible,
+ const Reference< XAccessibleContext >& xContext
) throw (IndexOutOfBoundsException, RuntimeException)
{
Reference< XAccessibleStateSet > xStateSet = xContext->getAccessibleStateSet();
@@ -221,9 +221,9 @@ void DocumentFocusListener::detachRecursive(
//------------------------------------------------------------------------------
void DocumentFocusListener::detachRecursive(
- const Reference< XAccessible >&,
+ const Reference< XAccessible >&,
const Reference< XAccessibleContext >& xContext,
- const Reference< XAccessibleStateSet >& xStateSet
+ const Reference< XAccessibleStateSet >& xStateSet
) throw (IndexOutOfBoundsException, RuntimeException)
{
Reference< XAccessibleEventBroadcaster > xBroadcaster =
@@ -232,19 +232,19 @@ void DocumentFocusListener::detachRecursive(
if( xBroadcaster.is() && 0 < m_aRefList.erase(xBroadcaster) )
{
xBroadcaster->removeEventListener(static_cast< XAccessibleEventListener *>(this));
-
+
if( ! xStateSet->contains(AccessibleStateType::MANAGES_DESCENDANTS ) )
{
sal_Int32 n, nmax = xContext->getAccessibleChildCount();
for( n = 0; n < nmax; n++ )
{
Reference< XAccessible > xChild( xContext->getAccessibleChild( n ) );
-
+
if( xChild.is() )
detachRecursive(xChild);
}
}
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/documentfocuslistener.hxx b/vcl/aqua/source/a11y/documentfocuslistener.hxx
index 6e3f3bd511ac..5b8ae53c2c68 100644
--- a/vcl/aqua/source/a11y/documentfocuslistener.hxx
+++ b/vcl/aqua/source/a11y/documentfocuslistener.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// - DocumentFocusListener -
// -------------------------
-class DocumentFocusListener :
+class DocumentFocusListener :
public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleEventListener >
{
@@ -82,16 +82,16 @@ public:
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
// XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
throw (::com::sun::star::uno::RuntimeException);
// XAccessibleEventListener
- virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+ virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
throw( ::com::sun::star::uno::RuntimeException );
private:
std::set< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > m_aRefList;
-
+
AquaA11yFocusTracker& m_aFocusTracker;
};
diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx
index 28d3fc0df71b..96ae9829ddcb 100644
--- a/vcl/aqua/source/app/saldata.cxx
+++ b/vcl/aqua/source/app/saldata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ SalData::SalData()
if( s_aAutoReleaseKey == 0 )
s_aAutoReleaseKey = osl_createThreadKey( releasePool );
}
-
+
SalData::~SalData()
{
CGPatternRelease( mxP50Pattern );
@@ -89,7 +89,7 @@ SalData::~SalData()
osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
[pPool release];
}
-
+
osl_destroyThreadKey( s_aAutoReleaseKey );
s_aAutoReleaseKey = 0;
}
@@ -247,11 +247,11 @@ NSCursor* SalData::getCursor( PointerStyle i_eStyle )
{
if( i_eStyle >= POINTER_COUNT )
return nil;
-
+
NSCursor* pCurs = maCursors[ i_eStyle ];
if( pCurs == INVALID_CURSOR_PTR )
{
- pCurs = nil;
+ pCurs = nil;
if( aCursorTab[ i_eStyle ].pBaseName )
{
NSPoint aHotSpot = aCursorTab[ i_eStyle ].aHotSpot;
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 2cc777b80cd3..c6f573d99fa4 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -366,7 +366,7 @@ void DeInitSalMain()
SalYieldMutex::SalYieldMutex()
{
- mnCount = 0;
+ mnCount = 0;
mnThreadId = 0;
}
@@ -622,7 +622,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
// kept for experimentation purpose (scheduled for future implementation)
// case kRemoteButtonMenu: nCommand = MEDIA_COMMAND_MENU; break;
- case kRemoteButtonPlus: nCommand = MEDIA_COMMAND_VOLUME_UP; break;
+ case kRemoteButtonPlus: nCommand = MEDIA_COMMAND_VOLUME_UP; break;
case kRemoteButtonMinus: nCommand = MEDIA_COMMAND_VOLUME_DOWN; break;
@@ -1049,8 +1049,8 @@ void AquaSalInstance::SetErrorEventCallback( void* pInstance, bool(*pCallback)(v
void* AquaSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
{
- rReturnedBytes = 1;
- rReturnedType = AsciiCString;
+ rReturnedBytes = 1;
+ rReturnedType = AsciiCString;
return (void*)"";
}
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index a7ea84f78113..c279c1c7f88f 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +69,7 @@ Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
pScreen = [pScreens objectAtIndex: nScreen];
else
pScreen = [NSScreen mainScreen];
-
+
if( pScreen )
{
NSRect aFrame = [pScreen frame];
@@ -88,7 +88,7 @@ Rectangle AquaSalSystem::GetDisplayWorkAreaPosSizePixel( unsigned int nScreen )
pScreen = [pScreens objectAtIndex: nScreen];
else
pScreen = [NSScreen mainScreen];
-
+
if( pScreen )
{
NSRect aFrame = [pScreen visibleFrame];
diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx
index 75c5f92f820b..cb3033e4e496 100644
--- a/vcl/aqua/source/app/saltimer.cxx
+++ b/vcl/aqua/source/app/saltimer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index d811740956cb..1c9ae096efd4 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +58,7 @@ namespace // private
const Type CPPUTYPE_SEQINT8 = getCppuType((Sequence<sal_Int8>*)0);
const Type CPPUTYPE_OUSTRING = getCppuType( (OUString*)0 );
- /* Determine whether or not a DataFlavor is valid.
+ /* Determine whether or not a DataFlavor is valid.
*/
bool isValidFlavor(const DataFlavor& aFlavor)
{
@@ -112,7 +112,7 @@ namespace // private
const char* FLAVOR_GDIMF = "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"";
const char* FLAVOR_WMF = "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
const char* FLAVOR_EMF = "application/x-openoffice-emf;windows_formatname=\"Image EMF\"";
-
+
const char* FLAVOR_DUMMY_INTERNAL = "application/x-openoffice-internal";
@@ -124,7 +124,7 @@ namespace // private
Type DataType;
};
- /* At the moment it appears as if only MS Office pastes "public.html" to the clipboard.
+ /* At the moment it appears as if only MS Office pastes "public.html" to the clipboard.
*/
FlavorMap flavorMap[] =
{
@@ -133,7 +133,7 @@ namespace // private
{ NSTIFFPboardType, "image/bmp", "Windows Bitmap", CPPUTYPE_SEQINT8 },
{ NSPICTPboardType, "image/bmp", "Windows Bitmap", CPPUTYPE_SEQINT8 },
{ NSHTMLPboardType, "text/html", "Plain Html", CPPUTYPE_SEQINT8 },
- { NSFilenamesPboardType, "application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", CPPUTYPE_SEQINT8 },
+ { NSFilenamesPboardType, "application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", CPPUTYPE_SEQINT8 },
{ PBTYPE_SESX, FLAVOR_SESX, "Star Embed Source (XML)", CPPUTYPE_SEQINT8 },
{ PBTYPE_SLSDX, FLAVOR_SLSDX, "Star Link Source Descriptor (XML)", CPPUTYPE_SEQINT8 },
{ PBTYPE_ESX, FLAVOR_ESX, "Star Embed Source (XML)", CPPUTYPE_SEQINT8 },
@@ -166,7 +166,7 @@ namespace // private
//###########################
-/* A base class for other data provider.
+/* A base class for other data provider.
*/
class DataProviderBaseImpl : public DataProvider
{
@@ -187,7 +187,7 @@ DataProviderBaseImpl::DataProviderBaseImpl(const Any& data) :
{
}
-DataProviderBaseImpl::DataProviderBaseImpl(id data) :
+DataProviderBaseImpl::DataProviderBaseImpl(id data) :
mSystemData(data)
{
[mSystemData retain];
@@ -208,7 +208,7 @@ class UniDataProvider : public DataProviderBaseImpl
{
public:
UniDataProvider(const Any& data);
-
+
UniDataProvider(NSData* data);
virtual NSData* getSystemData();
@@ -243,8 +243,8 @@ Any UniDataProvider::getOOoData()
if (mSystemData)
{
- oOOData = makeAny(OUString(reinterpret_cast<const sal_Char*>([mSystemData bytes]),
- [mSystemData length],
+ oOOData = makeAny(OUString(reinterpret_cast<const sal_Char*>([mSystemData bytes]),
+ [mSystemData length],
RTL_TEXTENCODING_UTF8));
}
else
@@ -285,7 +285,7 @@ NSData* ByteSequenceDataProvider::getSystemData()
Sequence<sal_Int8> rawData;
mData >>= rawData;
- return [NSData dataWithBytes: rawData.getArray() length: rawData.getLength()];
+ return [NSData dataWithBytes: rawData.getArray() length: rawData.getLength()];
}
Any ByteSequenceDataProvider::getOOoData()
@@ -304,7 +304,7 @@ Any ByteSequenceDataProvider::getOOoData()
{
oOOData = mData;
}
-
+
return oOOData;
}
@@ -363,14 +363,14 @@ Any HTMLFormatDataProvider::getOOoData()
plainHtml = HTMLFormatToTextHtml(unkHtmlData);
pPlainHtml = &plainHtml;
}
-
+
oOOData = makeAny(*pPlainHtml);
}
else
{
oOOData = mData;
}
-
+
return oOOData;
}
@@ -420,7 +420,7 @@ NSData* BMPDataProvider::getSystemData()
/* At the moment the OOo 'PCT' filter is not good enough to be used
and there is no flavor defined for exchanging 'PCT' with OOo so
we will at the moment convert 'PCT' to a Windows BMP and provide
- this to OOo
+ this to OOo
*/
Any BMPDataProvider::getOOoData()
{
@@ -434,7 +434,7 @@ Any BMPDataProvider::getOOoData()
memcpy(pictData.getArray(), [mSystemData bytes], flavorDataLength);
Sequence<sal_Int8> bmpData;
-
+
if (ImageToBMP(pictData, bmpData, meImageType))
{
oOOData = makeAny(bmpData);
@@ -444,7 +444,7 @@ Any BMPDataProvider::getOOoData()
{
oOOData = mData;
}
-
+
return oOOData;
}
@@ -493,7 +493,7 @@ Any FileListDataProvider::getOOoData()
Sequence<sal_Int8> oOOFileList(lenSeqRequired);
unichar* pBuffer = reinterpret_cast<unichar*>(oOOFileList.getArray());
rtl_zeroMemory(pBuffer, lenSeqRequired);
-
+
for (size_t i = 0; i < length; i++)
{
NSString* fname = [mSystemData objectAtIndex: i];
@@ -508,7 +508,7 @@ Any FileListDataProvider::getOOoData()
{
oOOData = mData;
}
-
+
return oOOData;
}
@@ -573,7 +573,7 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, Refe
DataFlavor oOOFlavor = systemToOpenOfficeFlavor(systemFlavor);
Any data = rTransferable->getTransferData(oOOFlavor);
-
+
if (isByteSequenceType(data.getValueType()))
{
if ([systemFlavor caseInsensitiveCompare: NSHTMLPboardType] == NSOrderedSame)
@@ -680,7 +680,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno:
else
{
NSString* str = openOfficeToSystemFlavor(flavors[i]);
-
+
if (str != NULL)
{
[array addObject: str];
@@ -690,7 +690,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno:
// #i89462# #i90747#
// in case no system flavor was found to report
- // report at least one so D&D between OOo targets works
+ // report at least one so D&D between OOo targets works
if( [array count] == 0 )
{
[array addObject: PBTYPE_DUMMY_INTERNAL];
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
index 51e29efed530..3d8cee3f39de 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +42,14 @@
#include <boost/shared_ptr.hpp>
-/* An interface to get the clipboard data in either
+/* An interface to get the clipboard data in either
system or OOo format.
*/
class DataProvider
{
public:
virtual ~DataProvider() {};
-
+
/* Get the clipboard data in the system format.
The caller has to retain/release the returned
CFDataRef on demand.
@@ -76,8 +76,8 @@ public:
DataFlavorMapper();
- /* Map a system data flavor to an OpenOffice data flavor.
- Return an empty string if there is not suiteable
+ /* Map a system data flavor to an OpenOffice data flavor.
+ Return an empty string if there is not suiteable
mapping from a system data flavor to a OpenOffice data
flavor.
*/
@@ -99,11 +99,11 @@ public:
/* Get a data provider which is able to provide the data 'rTransferable' offers in a format that can
be put on to the system clipboard.
*/
- DataProviderPtr_t getDataProvider(NSString* systemFlavor,
+ DataProviderPtr_t getDataProvider(NSString* systemFlavor,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > rTransferable) const;
-
-
+
+
/* Get a data provider which is able to provide 'systemData' in the OOo expected format.
*/
DataProviderPtr_t getDataProvider(const NSString* systemFlavor, NSArray* systemData) const;
@@ -115,12 +115,12 @@ public:
/* Translate a sequence of DataFlavors into a NSArray of system types.
- Only those DataFlavors for which a suitable mapping to a system
+ Only those DataFlavors for which a suitable mapping to a system
type exist will be contained in the returned types array.
*/
NSArray* flavorSequenceToTypesArray(const com::sun::star::uno::Sequence<com::sun::star::datatransfer::DataFlavor>& flavors) const;
- /* Translate a NSArray of system types into a sequence of DataFlavors.
+ /* Translate a NSArray of system types into a sequence of DataFlavors.
Only those types for which a suitable mapping to a DataFlavor
exist will be contained in the new DataFlavor Sequence.
*/
@@ -141,6 +141,6 @@ private:
typedef boost::shared_ptr<DataFlavorMapper> DataFlavorMapperPtr_t;
-#endif
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/dtrans/DragActionConversion.cxx b/vcl/aqua/source/dtrans/DragActionConversion.cxx
index 1e6880566c24..fbcc02c68dea 100644
--- a/vcl/aqua/source/dtrans/DragActionConversion.cxx
+++ b/vcl/aqua/source/dtrans/DragActionConversion.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
using namespace com::sun::star::datatransfer::dnd;
-/* Convert office drag actions as defined in
+/* Convert office drag actions as defined in
<type>com::sun::star::datatransfer::dnd::DNDConstants</type>
into system conform drag actions.
*/
@@ -41,12 +41,12 @@ unsigned int OfficeToSystemDragActions(sal_Int8 dragActions)
{
unsigned int actions = NSDragOperationNone;
- if (dragActions & DNDConstants::ACTION_COPY)
+ if (dragActions & DNDConstants::ACTION_COPY)
{
actions |= NSDragOperationCopy;
}
- if (dragActions & DNDConstants::ACTION_MOVE)
+ if (dragActions & DNDConstants::ACTION_MOVE)
{
actions |= NSDragOperationMove;
}
@@ -60,7 +60,7 @@ unsigned int OfficeToSystemDragActions(sal_Int8 dragActions)
}
/* Convert system conform drag actions into office conform
- drag actions as defined in
+ drag actions as defined in
<type>com::sun::star::datatransfer::dnd::DNDConstants</type>.
*/
sal_Int8 SystemToOfficeDragActions(unsigned int dragActions)
diff --git a/vcl/aqua/source/dtrans/DragActionConversion.hxx b/vcl/aqua/source/dtrans/DragActionConversion.hxx
index d4b12ae8dce8..13f36e815ef8 100644
--- a/vcl/aqua/source/dtrans/DragActionConversion.hxx
+++ b/vcl/aqua/source/dtrans/DragActionConversion.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +34,14 @@
#include <postmac.h>
-/* Convert office drag actions as defined in
+/* Convert office drag actions as defined in
<type>com::sun::star::datatransfer::dnd::DNDConstants</type>
into system conform drag actions.
*/
unsigned int OfficeToSystemDragActions(sal_Int8 dragActions);
/* Convert system conform drag actions into office conform
- drag actions as defined in
+ drag actions as defined in
<type>com::sun::star::datatransfer::dnd::DNDConstants</type>.
*/
sal_Int8 SystemToOfficeDragActions(unsigned int dragActions);
diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx
index c702e4693355..1b5d651b0f8e 100644
--- a/vcl/aqua/source/dtrans/DragSource.cxx
+++ b/vcl/aqua/source/dtrans/DragSource.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -113,13 +113,13 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
-(void)draggedImage:(NSImage*)anImage beganAt:(NSPoint)aPoint
{
- DragSourceDragEvent dsde(static_cast<OWeakObject*>(mDragSource),
- new DragSourceContext(mDragSource),
- mDragSource,
- DNDConstants::ACTION_COPY,
+ DragSourceDragEvent dsde(static_cast<OWeakObject*>(mDragSource),
+ new DragSourceContext(mDragSource),
+ mDragSource,
+ DNDConstants::ACTION_COPY,
DNDConstants::ACTION_COPY);
- mDragSource->mXDragSrcListener->dragEnter(dsde);
+ mDragSource->mXDragSrcListener->dragEnter(dsde);
}
@@ -130,7 +130,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
bool bDropSuccess = operation != NSDragOperationNone;
if( DragSource::g_DropSuccessSet )
bDropSuccess = DragSource::g_DropSuccess;
-
+
DragSourceDropEvent dsde(static_cast<OWeakObject*>(mDragSource),
new DragSourceContext(mDragSource),
static_cast< XDragSource* >(mDragSource),
@@ -170,7 +170,7 @@ DragSource::~DragSource()
[(id <MouseEventListener>)mView unregisterMouseEventListener: mDragSourceHelper];
[mDragSourceHelper release];
}
-
+
void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
throw(Exception)
@@ -188,7 +188,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
/* All SalFrameView the base class for all VCL system views inherits from
NSView in order to get mouse and other events. This is the only way to
- get these events. In order to start a drag operation we need to provide
+ get these events. In order to start a drag operation we need to provide
the mouse event which was the trigger. SalFrameView therefor implements
a hook mechanism so that we can get mouse events for our purpose.
*/
@@ -198,7 +198,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
throw Exception(OUString(RTL_CONSTASCII_USTRINGPARAM("DragSource::initialize: Provided view doesn't support mouse listener")),
static_cast<OWeakObject*>(this));
}
-
+
mDragSourceHelper = [[DragSourceHelper alloc] initWithDragSource: this];
if (mDragSourceHelper == nil)
@@ -234,16 +234,16 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
sal_Int32 cursor,
sal_Int32 image,
const Reference<XTransferable >& transferable,
- const Reference<XDragSourceListener >& listener )
+ const Reference<XDragSourceListener >& listener )
throw( RuntimeException)
{
MutexGuard guard(m_aMutex);
-
+
OSL_ASSERT(listener.is() && "DragSource::startDrag: No XDragSourceListener provided\n");
OSL_ASSERT(transferable.is() && "DragSource::startDrag: No transferable provided\n");
-
- trigger.Event >>= mMouseEvent;
- m_MouseButton= mMouseEvent.Buttons;
+
+ trigger.Event >>= mMouseEvent;
+ m_MouseButton= mMouseEvent.Buttons;
mXDragSrcListener = listener;
mXCurrentContext = static_cast<XDragSourceContext*>(new DragSourceContext(this));
auto_ptr<AquaClipboard> clipb(new AquaClipboard(NULL, false));
@@ -258,11 +258,11 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
NSImage* dragImage;
dragImage = [[NSImage alloc] initWithSize: sz];
-
+
NSRect bounds;
bounds.origin = NSMakePoint(0,0);
bounds.size = sz;
-
+
[dragImage lockFocus];
[[NSColor blackColor] set];
[NSBezierPath fillRect: bounds];
@@ -278,9 +278,9 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
g_DropSuccessSet = false;
g_DropSuccess = false;
- [mView dragImage: dragImage
- at: p
- offset: NSMakeSize(0,0)
+ [mView dragImage: dragImage
+ at: p
+ offset: NSMakeSize(0,0)
event: mLastMouseEventBeforeStartDrag
pasteboard: clipb->getPasteboard()
source: mDragSourceHelper
@@ -299,7 +299,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
// In order to initiate a D&D operation we need to
// provide the triggering mouse event which we get
-// from the SalFrameView that is associated with
+// from the SalFrameView that is associated with
// this DragSource
void DragSource::saveMouseEvent(NSEvent* theEvent)
{
@@ -322,9 +322,9 @@ unsigned int DragSource::getSupportedDragOperations(bool isLocal) const
if (isLocal)
{
// Support NSDragOperation generic which means we can
- // decide which D&D operation to choose. We map
+ // decide which D&D operation to choose. We map
// NSDragOperationGenric to DNDConstants::ACTION_DEFAULT
- // in SystemToOfficeDragActions to signal this and
+ // in SystemToOfficeDragActions to signal this and
// use it in DropTarget::determineDropAction
srcActions |= NSDragOperationGeneric;
}
diff --git a/vcl/aqua/source/dtrans/DragSource.hxx b/vcl/aqua/source/dtrans/DragSource.hxx
index 498feaf819bb..dcdaac4cff63 100644
--- a/vcl/aqua/source/dtrans/DragSource.hxx
+++ b/vcl/aqua/source/dtrans/DragSource.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
class DragSource;
-/* The functions declared in this protocol are actually
+/* The functions declared in this protocol are actually
declared in vcl/aqua/inc/salframe.h. Because we want
to avoid importing VCL headers in UNO services and
on the other hand want to avoid warnings caused by
@@ -81,8 +81,8 @@ class DragSource;
class DragSource : public ::cppu::BaseMutex,
- public ::cppu::WeakComponentImplHelper3< com::sun::star::datatransfer::dnd::XDragSource,
- com::sun::star::lang::XInitialization,
+ public ::cppu::WeakComponentImplHelper3< com::sun::star::datatransfer::dnd::XDragSource,
+ com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo >,
private ::boost::noncopyable
{
@@ -99,7 +99,7 @@ public:
virtual sal_Int32 SAL_CALL getDefaultCursor(sal_Int8 dragAction)
throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
-
+
virtual void SAL_CALL startDrag( const com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions,
sal_Int32 cursor,
@@ -129,7 +129,7 @@ public:
// The mouse button that set off the drag and drop operation
short m_MouseButton;
sal_Int8 mDragSourceActions;
-
+
static com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > g_XTransferable;
static NSView* g_DragSourceView;
static bool g_DropSuccessSet;
diff --git a/vcl/aqua/source/dtrans/DragSourceContext.cxx b/vcl/aqua/source/dtrans/DragSourceContext.cxx
index 4d18379e90af..c613c17b0bb8 100644
--- a/vcl/aqua/source/dtrans/DragSourceContext.cxx
+++ b/vcl/aqua/source/dtrans/DragSourceContext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/dtrans/DragSourceContext.hxx b/vcl/aqua/source/dtrans/DragSourceContext.hxx
index 276567af3f99..b8d357e41baf 100644
--- a/vcl/aqua/source/dtrans/DragSourceContext.hxx
+++ b/vcl/aqua/source/dtrans/DragSourceContext.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +52,16 @@ public:
DragSourceContext(DragSource* pSource);
~DragSourceContext();
- virtual sal_Int32 SAL_CALL getCurrentCursor( )
+ virtual sal_Int32 SAL_CALL getCurrentCursor( )
throw( com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setCursor( sal_Int32 cursorId )
+ virtual void SAL_CALL setCursor( sal_Int32 cursorId )
throw( com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setImage( sal_Int32 imageId )
+ virtual void SAL_CALL setImage( sal_Int32 imageId )
throw( com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL transferablesFlavorsChanged( )
+ virtual void SAL_CALL transferablesFlavorsChanged( )
throw( com::sun::star::uno::RuntimeException);
private:
diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx
index e376411df0a5..5404dc1186b4 100644
--- a/vcl/aqua/source/dtrans/DropTarget.cxx
+++ b/vcl/aqua/source/dtrans/DropTarget.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace /* private */
{
self = [super init];
- if (self)
+ if (self)
{
mDropTarget = pdt;
}
@@ -169,8 +169,8 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
{
sal_Int8 dropAct = dropActions;
bool srcAndDestEqual = false;
-
- if ([sender draggingSource] != nil)
+
+ if ([sender draggingSource] != nil)
{
// Internal DnD
NSView* destView = [[sender draggingDestinationWindow] contentView];
@@ -178,8 +178,8 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
}
// If ACTION_DEFAULT is set this means NSDragOperationGeneric
- // has been set and we map this to ACTION_MOVE or ACTION_COPY
- // depending on whether or not source and dest are equal,
+ // has been set and we map this to ACTION_MOVE or ACTION_COPY
+ // depending on whether or not source and dest are equal,
// this hopefully satisfies all parties
if( (dropActions == DNDConstants::ACTION_DEFAULT)
|| ((dropActions == mDragSourceSupportedActions)
@@ -188,8 +188,8 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
dropAct = srcAndDestEqual ? DNDConstants::ACTION_MOVE :
DNDConstants::ACTION_COPY;
}
- // if more than one drop actions have been specified
- // set ACTION_DEFAULT in order to let the drop target
+ // if more than one drop actions have been specified
+ // set ACTION_DEFAULT in order to let the drop target
// decide which one to use
else if (dropActions != DNDConstants::ACTION_NONE &&
dropActions != DNDConstants::ACTION_MOVE &&
@@ -207,7 +207,7 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
else if (dropActions & DNDConstants::ACTION_MOVE)
dropAct = DNDConstants::ACTION_MOVE;
else if (dropActions & DNDConstants::ACTION_LINK)
- dropAct = DNDConstants::ACTION_LINK;
+ dropAct = DNDConstants::ACTION_LINK;
}
dropAct |= DNDConstants::ACTION_DEFAULT;
@@ -220,56 +220,56 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
NSDragOperation DropTarget::draggingEntered(id sender)
{
// Initially when DnD will be started no modifier key can be pressed yet
- // thus we are getting all actions that the drag source supports, we save
+ // thus we are getting all actions that the drag source supports, we save
// this value because later the system masks the drag source actions if
// a modifier key will be pressed
mDragSourceSupportedActions = SystemToOfficeDragActions([sender draggingSourceOperationMask]);
-
+
// Only if the drop target is really interessted in the drag actions
// supported by the source
if (mDragSourceSupportedActions & mDefaultActions)
{
- sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender);
+ sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender);
NSRect bounds = [mView bounds];
NSPoint dragLocation = [sender draggedImageLocation];
-
+
CocoaToVCL(dragLocation, bounds);
-
+
sal_Int32 posX = static_cast<sal_Int32>(dragLocation.x);
sal_Int32 posY = static_cast<sal_Int32>(dragLocation.y);
NSPasteboard* dragPboard = [sender draggingPasteboard];
mXCurrentDragClipboard = new AquaClipboard(dragPboard, false);
-
+
Reference<XTransferable> xTransferable = DragSource::g_XTransferable.is() ?
DragSource::g_XTransferable : mXCurrentDragClipboard->getContents();
- DropTargetDragEnterEvent dtdee(static_cast<OWeakObject*>(this),
- 0,
- this,
- currentAction,
- posX,
- posY,
- mDragSourceSupportedActions,
+ DropTargetDragEnterEvent dtdee(static_cast<OWeakObject*>(this),
+ 0,
+ this,
+ currentAction,
+ posX,
+ posY,
+ mDragSourceSupportedActions,
xTransferable->getTransferDataFlavors());
- fire_dragEnter(dtdee);
+ fire_dragEnter(dtdee);
}
- return OfficeToSystemDragActions(mSelectedDropAction);
+ return OfficeToSystemDragActions(mSelectedDropAction);
}
NSDragOperation DropTarget::draggingUpdated(id sender)
{
- sal_Int8 currentDragSourceActions =
+ sal_Int8 currentDragSourceActions =
SystemToOfficeDragActions([sender draggingSourceOperationMask]);
NSDragOperation dragOp = NSDragOperationNone;
if (currentDragSourceActions & mDefaultActions)
{
- sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender);
+ sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender);
NSRect bounds = [mView bounds];
NSPoint dragLocation = [sender draggedImageLocation];
@@ -278,24 +278,24 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
sal_Int32 posX = static_cast<sal_Int32>(dragLocation.x);
sal_Int32 posY = static_cast<sal_Int32>(dragLocation.y);
- DropTargetDragEvent dtde(static_cast<OWeakObject*>(this),
- 0,
- this,
+ DropTargetDragEvent dtde(static_cast<OWeakObject*>(this),
+ 0,
+ this,
currentAction,
posX,
- posY,
+ posY,
mDragSourceSupportedActions);
fire_dragOver(dtde);
- // drag over callbacks likely have rendered something
+ // drag over callbacks likely have rendered something
[mView setNeedsDisplay: TRUE];
-
+
dragOp = OfficeToSystemDragActions(mSelectedDropAction);
//NSLog(@"Drag update: Source actions: %x proposed action %x selected action %x", mDragSourceSupportedActions, currentAction, mSelectedDropAction);
}
-
+
// Weird but it appears as if there is no method in Cocoa
// to create a kThemeCopyArrowCursor hence we have to use
// Carbon to do it
@@ -303,7 +303,7 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
SetThemeCursor(kThemeNotAllowedCursor);
else if (dragOp == NSDragOperationCopy)
SetThemeCursor(kThemeCopyArrowCursor);
- else
+ else
SetThemeCursor(kThemeArrowCursor);
return dragOp;
@@ -334,11 +334,11 @@ MacOSBOOL DropTarget::performDragOperation(id sender)
{
Reference<XTransferable> xTransferable = DragSource::g_XTransferable;
- if (!DragSource::g_XTransferable.is())
+ if (!DragSource::g_XTransferable.is())
{
xTransferable = mXCurrentDragClipboard->getContents();
}
-
+
NSRect bounds = [mView bounds];
NSPoint dragLocation = [sender draggedImageLocation];
@@ -352,10 +352,10 @@ MacOSBOOL DropTarget::performDragOperation(id sender)
this,
mSelectedDropAction,
posX,
- posY,
+ posY,
mDragSourceSupportedActions,
xTransferable);
-
+
fire_drop(dtde);
bSuccess = true;
@@ -397,10 +397,10 @@ MacOSBOOL DropTarget::performDragOperation(id sender)
mView = (id)tmp;
mDropTargetHelper = [[DropTargetHelper alloc] initWithDropTarget: this];
-
+
[(id <DraggingDestinationHandler>)mView registerDraggingDestinationHandler:mDropTargetHelper];
[mView registerForDraggedTypes: mDataFlavorMapper->getAllSupportedPboardTypes()];
-
+
id wnd = [mView window];
NSWindow* parentWnd = [wnd parentWindow];
unsigned int topWndStyle = (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask);
@@ -483,7 +483,7 @@ MacOSBOOL DropTarget::performDragOperation(id sender)
void SAL_CALL DropTarget::dropComplete(sal_Bool success) throw (RuntimeException)
{
- // Reset the internal transferable used as shortcut in case this is
+ // Reset the internal transferable used as shortcut in case this is
// an internal D&D operation
DragSource::g_XTransferable = Reference<XTransferable>();
DragSource::g_DropSuccessSet = true;
@@ -535,7 +535,7 @@ MacOSBOOL DropTarget::performDragOperation(id sender)
while( iter.hasMoreElements())
{
Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
-
+
try { listener->dragExit( dte); }
catch (RuntimeException&) {}
}
@@ -581,7 +581,7 @@ MacOSBOOL DropTarget::performDragOperation(id sender)
OUString SAL_CALL DropTarget::getImplementationName() throw (RuntimeException)
{
- return dropTarget_getImplementationName();
+ return dropTarget_getImplementationName();
}
diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx
index bb25497244a6..d0fc443017ba 100644
--- a/vcl/aqua/source/dtrans/DropTarget.hxx
+++ b/vcl/aqua/source/dtrans/DropTarget.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +51,7 @@
class DropTarget;
-/* The functions declared in this protocol are actually
+/* The functions declared in this protocol are actually
declared in vcl/aqua/inc/salframe.h. Because we want
to avoid importing VCL headers in UNO services and
on the other hand want to avoid warnings caused by
@@ -83,8 +83,8 @@ class DropTarget;
class DropTarget: public cppu::BaseMutex,
- public cppu::WeakComponentImplHelper5< com::sun::star::lang::XInitialization,
- com::sun::star::datatransfer::dnd::XDropTarget,
+ public cppu::WeakComponentImplHelper5< com::sun::star::lang::XInitialization,
+ com::sun::star::datatransfer::dnd::XDropTarget,
com::sun::star::datatransfer::dnd::XDropTargetDragContext,
com::sun::star::datatransfer::dnd::XDropTargetDropContext,
com::sun::star::lang::XServiceInfo >,
@@ -120,7 +120,7 @@ public:
virtual void SAL_CALL acceptDrag(sal_Int8 dragOperation) throw(com::sun::star::uno::RuntimeException);
virtual void SAL_CALL rejectDrag() throw(com::sun::star::uno::RuntimeException);
- // XDropTargetDragContext
+ // XDropTargetDragContext
virtual void SAL_CALL acceptDrop(sal_Int8 dropOperation) throw (com::sun::star::uno::RuntimeException);
virtual void SAL_CALL rejectDrop() throw (com::sun::star::uno::RuntimeException);
virtual void SAL_CALL dropComplete(sal_Bool success) throw (com::sun::star::uno::RuntimeException);
diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
index 0bd461d81096..9f5bf7483616 100644
--- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
+++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
@@ -17,23 +17,23 @@ using namespace com::sun::star::uno;
// well known under MS Windows
// the MS HTML Format has a header before the real html data
//
-// Version:1.0 Version number of the clipboard. Staring is 0.9
-// StartHTML: Byte count from the beginning of the clipboard to the start
-// of the context, or -1 if no context
-// EndHTML: Byte count from the beginning of the clipboard to the end
-// of the context, or -1 if no context
-// StartFragment: Byte count from the beginning of the clipboard to the
-// start of the fragment
-// EndFragment: Byte count from the beginning of the clipboard to the
-// end of the fragment
-// StartSelection: Byte count from the beginning of the clipboard to the
-// start of the selection
-// EndSelection: Byte count from the beginning of the clipboard to the
-// end of the selection
+// Version:1.0 Version number of the clipboard. Staring is 0.9
+// StartHTML: Byte count from the beginning of the clipboard to the start
+// of the context, or -1 if no context
+// EndHTML: Byte count from the beginning of the clipboard to the end
+// of the context, or -1 if no context
+// StartFragment: Byte count from the beginning of the clipboard to the
+// start of the fragment
+// EndFragment: Byte count from the beginning of the clipboard to the
+// end of the fragment
+// StartSelection: Byte count from the beginning of the clipboard to the
+// start of the selection
+// EndSelection: Byte count from the beginning of the clipboard to the
+// end of the selection
//
// StartSelection and EndSelection are optional
// The fragment should be preceded and followed by the HTML comments
-// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
+// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
// text
//------------------------------------------------------------------------------
@@ -66,37 +66,37 @@ const std::string TAG_END_BODY = std::string("</BODY");
Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8>& aTextHtml)
{
OSL_ASSERT(aTextHtml.getLength() > 0);
-
+
if (!(aTextHtml.getLength() > 0))
return Sequence<sal_Int8>();
-
+
// fill the buffer with dummy values to calc the exact length
- std::string dummyHtmlHeader = GetHtmlFormatHeader(0, 0, 0, 0);
+ std::string dummyHtmlHeader = GetHtmlFormatHeader(0, 0, 0, 0);
size_t lHtmlFormatHeader = dummyHtmlHeader.length();
-
+
std::string textHtml(
- reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()),
+ reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()),
reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()) + aTextHtml.getLength());
-
+
std::string::size_type nStartHtml = textHtml.find(TAG_HTML) + lHtmlFormatHeader - 1; // we start one before '<HTML>' Word 2000 does also so
std::string::size_type nEndHtml = textHtml.find(TAG_END_HTML) + lHtmlFormatHeader + TAG_END_HTML.length() + 1; // our SOffice 5.2 wants 2 behind </HTML>?
-
+
// The body tag may have parameters so we need to search for the
// closing '>' manually e.g. <BODY param> #92840#
- std::string::size_type nStartFragment = textHtml.find(">", textHtml.find(TAG_BODY)) + lHtmlFormatHeader + 1;
+ std::string::size_type nStartFragment = textHtml.find(">", textHtml.find(TAG_BODY)) + lHtmlFormatHeader + 1;
std::string::size_type nEndFragment = textHtml.find(TAG_END_BODY) + lHtmlFormatHeader;
- std::string htmlFormat = GetHtmlFormatHeader(nStartHtml, nEndHtml, nStartFragment, nEndFragment);
+ std::string htmlFormat = GetHtmlFormatHeader(nStartHtml, nEndHtml, nStartFragment, nEndFragment);
htmlFormat += textHtml;
-
+
Sequence<sal_Int8> byteSequence(htmlFormat.length() + 1); // space the trailing '\0'
- rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
-
+ rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
+
rtl_copyMemory(
static_cast<void*>(byteSequence.getArray()),
static_cast<const void*>(htmlFormat.c_str()),
htmlFormat.length());
-
+
return byteSequence;
}
@@ -113,7 +113,7 @@ Sequence<sal_Int8> HTMLFormatToTextHtml(const Sequence<sal_Int8>& aHTMLFormat)
BOOST_ASSERT(htmlStartTag && "Seems to be no HTML at all");
- // It doesn't seem to be HTML? Well then simply return what has been
+ // It doesn't seem to be HTML? Well then simply return what has been
// provided in non-debug builds
if (htmlStartTag == NULL)
{
@@ -131,7 +131,7 @@ Sequence<sal_Int8> HTMLFormatToTextHtml(const Sequence<sal_Int8>& aHTMLFormat)
/* A simple format detection. We are just comparing the first few bytes
of the provided byte sequence to see whether or not it is the MS
Office Html format. If it shows that this is not reliable enough we
- can improve this
+ can improve this
*/
const char HtmlFormatStart[] = "Version:";
int HtmlFormatStartLen = (sizeof(HtmlFormatStart) - 1);
@@ -141,9 +141,9 @@ bool isHTMLFormat(const Sequence<sal_Int8>& aHtmlSequence)
if (aHtmlSequence.getLength() < HtmlFormatStartLen)
return false;
- return rtl_str_compareIgnoreAsciiCase_WithLength(HtmlFormatStart,
- HtmlFormatStartLen,
- reinterpret_cast<const sal_Char*>(aHtmlSequence.getConstArray()),
+ return rtl_str_compareIgnoreAsciiCase_WithLength(HtmlFormatStart,
+ HtmlFormatStartLen,
+ reinterpret_cast<const sal_Char*>(aHtmlSequence.getConstArray()),
HtmlFormatStartLen) == 0;
}
diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.hxx b/vcl/aqua/source/dtrans/HtmlFmtFlt.hxx
index bbf2fc5164eb..cfcaaab558ec 100644
--- a/vcl/aqua/source/dtrans/HtmlFmtFlt.hxx
+++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.hxx
@@ -4,7 +4,7 @@
#include <com/sun/star/uno/Sequence.hxx>
-/* Transform plain HTML into the format expected by MS Office.
+/* Transform plain HTML into the format expected by MS Office.
*/
com::sun::star::uno::Sequence<sal_Int8> TextHtmlToHTMLFormat(com::sun::star::uno::Sequence<sal_Int8>& aTextHtml);
diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx
index c9ba3cc02599..a65a66f4b2c2 100644
--- a/vcl/aqua/source/dtrans/OSXTransferable.cxx
+++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 com::sun::star::container;
const Type CPPUTYPE_SEQINT8 = getCppuType((Sequence<sal_Int8>*)0);
const Type CPPUTYPE_OUSTRING = getCppuType((OUString*)0);
-namespace // private
+namespace // private
{
bool isValidFlavor( const DataFlavor& aFlavor )
{
@@ -60,12 +60,12 @@ namespace // private
OSXTransferable::OSXTransferable(const Reference<XMimeContentTypeFactory> rXMimeCntFactory,
- DataFlavorMapperPtr_t pDataFlavorMapper,
+ DataFlavorMapperPtr_t pDataFlavorMapper,
NSPasteboard* pasteboard) :
mrXMimeCntFactory(rXMimeCntFactory),
mDataFlavorMapper(pDataFlavorMapper),
mPasteboard(pasteboard)
-{
+{
[mPasteboard retain];
initClipboardItemList();
@@ -78,7 +78,7 @@ OSXTransferable::~OSXTransferable()
}
-Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor )
+Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor )
throw( UnsupportedFlavorException, IOException, RuntimeException )
{
if (!isValidFlavor(aFlavor) || !isDataFlavorSupported(aFlavor))
@@ -87,7 +87,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor )
static_cast<XTransferable*>(this));
}
- NSString* sysFormat =
+ NSString* sysFormat =
(aFlavor.MimeType.compareToAscii( "image/bmp", 9 ) == 0)
? mDataFlavorMapper->openOfficeImageToSystemFlavor( mPasteboard )
: mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor);
@@ -120,14 +120,14 @@ bool OSXTransferable::isUnicodeText(const DataFlavor& flavor)
}
-Sequence< DataFlavor > SAL_CALL OSXTransferable::getTransferDataFlavors( )
+Sequence< DataFlavor > SAL_CALL OSXTransferable::getTransferDataFlavors( )
throw( RuntimeException )
-{
+{
return mFlavorList;
}
-sal_Bool SAL_CALL OSXTransferable::isDataFlavorSupported(const DataFlavor& aFlavor)
+sal_Bool SAL_CALL OSXTransferable::isDataFlavorSupported(const DataFlavor& aFlavor)
throw( RuntimeException )
{
for (sal_Int32 i = 0; i < mFlavorList.getLength(); i++)
@@ -141,13 +141,13 @@ sal_Bool SAL_CALL OSXTransferable::isDataFlavorSupported(const DataFlavor& aFlav
void OSXTransferable::initClipboardItemList()
{
NSArray* pboardFormats = [mPasteboard types];
-
+
if (pboardFormats == NULL)
{
- throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot get clipboard data")),
+ throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot get clipboard data")),
static_cast<XTransferable*>(this));
}
-
+
mFlavorList = mDataFlavorMapper->typesArrayToFlavorSequence(pboardFormats);
}
@@ -179,7 +179,7 @@ bool OSXTransferable::compareDataFlavors(const DataFlavor& lhs, const DataFlavor
}
-bool OSXTransferable::cmpAllContentTypeParameter(const Reference<XMimeContentType> xLhs,
+bool OSXTransferable::cmpAllContentTypeParameter(const Reference<XMimeContentType> xLhs,
const Reference<XMimeContentType> xRhs) const
{
Sequence<OUString> xLhsFlavors = xLhs->getParameters();
@@ -190,12 +190,12 @@ bool OSXTransferable::cmpAllContentTypeParameter(const Reference<XMimeContentTyp
return false;
try
- {
+ {
OUString pLhs;
OUString pRhs;
for (sal_Int32 i = 0; i < xLhsFlavors.getLength(); i++)
- {
+ {
pLhs = xLhs->getParameterValue(xLhsFlavors[i]);
pRhs = xRhs->getParameterValue(xLhsFlavors[i]);
diff --git a/vcl/aqua/source/dtrans/OSXTransferable.hxx b/vcl/aqua/source/dtrans/OSXTransferable.hxx
index 82e8fea57e20..531a1005d8c9 100644
--- a/vcl/aqua/source/dtrans/OSXTransferable.hxx
+++ b/vcl/aqua/source/dtrans/OSXTransferable.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +58,7 @@ public:
explicit OSXTransferable(com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentTypeFactory> rXMimeCntFactory,
DataFlavorMapperPtr_t pDataFlavorMapper,
- NSPasteboard* pasteboard);
+ NSPasteboard* pasteboard);
virtual ~OSXTransferable();
@@ -66,13 +66,13 @@ public:
// XTransferable
//------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+ 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 );
//------------------------------------------------------------------------
@@ -88,11 +88,11 @@ public:
bool compareDataFlavors( const com::sun::star::datatransfer::DataFlavor& lhs,
const com::sun::star::datatransfer::DataFlavor& rhs );
- bool cmpAllContentTypeParameter( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType > xLhs,
+ bool cmpAllContentTypeParameter( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType > xLhs,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType > xRhs ) const;
private:
- com::sun::star::uno::Sequence< com::sun::star::datatransfer::DataFlavor > mFlavorList;
+ com::sun::star::uno::Sequence< com::sun::star::datatransfer::DataFlavor > mFlavorList;
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentTypeFactory> mrXMimeCntFactory;
DataFlavorMapperPtr_t mDataFlavorMapper;
NSPasteboard* mPasteboard;
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 7a9b2963ddb1..07da1fe77f99 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,14 +29,14 @@
*
************************************************************************/
-/* This is a work-around to prevent 'deprecated' warning for 'KillPicture' API
+/* This is a work-around to prevent 'deprecated' warning for 'KillPicture' API
Hopefully we can get rid of this whole code again when the OOo PICT filter
are good enough to be used see #i78953 thus this hack would vanish to again.
*/
#include <premac.h>
#include <AvailabilityMacros.h>
#undef DEPRECATED_ATTRIBUTE
-#define DEPRECATED_ATTRIBUTE
+#define DEPRECATED_ATTRIBUTE
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
@@ -44,10 +44,10 @@
#include "PictToBmpFlt.hxx"
-bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
+bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp)
{
-
+
bool result = false;
ComponentInstance bmpExporter;
@@ -65,7 +65,7 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
}
Handle hBmp;
- if ((GraphicsExportSetInputPicture(bmpExporter, (PicHandle)hPict) != noErr) ||
+ if ((GraphicsExportSetInputPicture(bmpExporter, (PicHandle)hPict) != noErr) ||
((hBmp = NewHandleClear(0)) == NULL))
{
CloseComponent(bmpExporter);
@@ -84,7 +84,7 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
HUnlock(hBmp);
result = true;
- }
+ }
DisposeHandle(hPict);
DisposeHandle(hBmp);
@@ -93,14 +93,14 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
return result;
}
-bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict)
{
bool result = false;
Handle hBmp;
ComponentInstance pictExporter;
- if ((PtrToHand(aBmp.getArray(), &hBmp, aBmp.getLength()) != noErr))
+ if ((PtrToHand(aBmp.getArray(), &hBmp, aBmp.getLength()) != noErr))
{
return result;
}
@@ -112,7 +112,7 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
DisposeHandle(hBmp);
return result;
}
-
+
if (GraphicsImportSetDataHandle(pictExporter, hBmp) != noErr)
{
DisposeHandle(hBmp);
@@ -131,28 +131,28 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
HUnlock((Handle)hPict);
// Release the data associated with the picture
- // Note: This function is deprecated in Mac OS X
+ // Note: This function is deprecated in Mac OS X
// 10.4.
- KillPicture(hPict);
+ KillPicture(hPict);
result = true;
}
-
+
DisposeHandle(hBmp);
CloseComponent(pictExporter);
-
+
return result;
}
-bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
+bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp,
NSBitmapImageFileType eInFormat)
{
if( eInFormat == PICTImageFileType )
return PICTtoBMP( aPict, aBmp );
-
+
bool bResult = false;
-
+
NSData* pData = [NSData dataWithBytesNoCopy: (void*)aPict.getConstArray() length: aPict.getLength() freeWhenDone: 0];
if( pData )
{
@@ -168,20 +168,20 @@ bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
}
}
}
-
+
return bResult;
}
-bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict,
NSBitmapImageFileType eOutFormat
)
{
if( eOutFormat == PICTImageFileType )
return BMPtoPICT( aBmp, aPict );
-
+
bool bResult = false;
-
+
NSData* pData = [NSData dataWithBytesNoCopy: const_cast<sal_Int8*>(aBmp.getConstArray()) length: aBmp.getLength() freeWhenDone: 0];
if( pData )
{
@@ -197,7 +197,7 @@ bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
}
}
}
-
+
return bResult;
}
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.hxx b/vcl/aqua/source/dtrans/PictToBmpFlt.hxx
index cdd0c41d5f4b..4673c4d73798 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.hxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.hxx
@@ -10,10 +10,10 @@
/* Transform PICT into the a Window BMP.
- Returns true if the conversion was successful false
+ Returns true if the conversion was successful false
otherwise.
*/
-bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
+bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp);
/* Transform a Windows BMP to a PICT.
@@ -21,16 +21,16 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
Returns true if the conversion was successful false
otherwise.
*/
-bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict);
#define PICTImageFileType ((NSBitmapImageFileType)~0)
-bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
+bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp,
NSBitmapImageFileType eInFormat);
-bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict,
NSBitmapImageFileType eOutFormat
);
diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx
index 21b8bc5c96d9..4a95fc7a8734 100644
--- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx
+++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +53,12 @@ using namespace comphelper;
@implementation EventListener;
-(EventListener*)initWithAquaClipboard: (AquaClipboard*) pcb
-{
+{
self = [super init];
-
+
if (self)
pAquaClipboard = pcb;
-
+
return self;
}
@@ -103,9 +103,9 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"))), UNO_QUERY);
if (!mrXMimeCntFactory.is())
- {
+ {
throw RuntimeException(OUString(
- RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")),
+ RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")),
static_cast<XClipboardEx*>(this));
}
@@ -118,13 +118,13 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
}
else
{
- mPasteboard = bUseSystemPasteboard ? [NSPasteboard generalPasteboard] :
+ mPasteboard = bUseSystemPasteboard ? [NSPasteboard generalPasteboard] :
[NSPasteboard pasteboardWithName: NSDragPboard];
if (mPasteboard == nil)
- {
+ {
throw RuntimeException(OUString(
- RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create Cocoa pasteboard")),
+ RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create Cocoa pasteboard")),
static_cast<XClipboardEx*>(this));
}
}
@@ -138,7 +138,7 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
[mPasteboard release];
throw RuntimeException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create pasteboard change listener")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create pasteboard change listener")),
static_cast<XClipboardEx*>(this));
}
@@ -146,10 +146,10 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
{
NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter];
- [notificationCenter addObserver: mEventListener
- selector: @selector(applicationDidBecomeActive:)
- name: @"NSApplicationDidBecomeActiveNotification"
- object: [NSApplication sharedApplication]];
+ [notificationCenter addObserver: mEventListener
+ selector: @selector(applicationDidBecomeActive:)
+ name: @"NSApplicationDidBecomeActiveNotification"
+ object: [NSApplication sharedApplication]];
}
mPasteboardChangeCount = [mPasteboard changeCount];
@@ -158,7 +158,7 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
AquaClipboard::~AquaClipboard()
{
- if (mIsSystemPasteboard)
+ if (mIsSystemPasteboard)
{
[[NSNotificationCenter defaultCenter] removeObserver: mEventListener];
}
@@ -172,22 +172,22 @@ AquaClipboard::~AquaClipboard()
Reference<XTransferable> SAL_CALL AquaClipboard::getContents() throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
-
- // Shortcut: If we are clipboard owner already we don't need
+
+ // Shortcut: If we are clipboard owner already we don't need
// to drag the data through the system clipboard
if (mXClipboardContent.is())
{
return mXClipboardContent;
}
- return Reference<XTransferable>(new OSXTransferable(mrXMimeCntFactory,
- mpDataFlavorMapper,
+ return Reference<XTransferable>(new OSXTransferable(mrXMimeCntFactory,
+ mpDataFlavorMapper,
mPasteboard));
}
-void SAL_CALL AquaClipboard::setContents(const Reference<XTransferable>& xTransferable,
- const Reference<XClipboardOwner>& xClipboardOwner)
+void SAL_CALL AquaClipboard::setContents(const Reference<XTransferable>& xTransferable,
+ const Reference<XClipboardOwner>& xClipboardOwner)
throw( RuntimeException )
{
NSArray* types = xTransferable.is() ?
@@ -195,24 +195,24 @@ void SAL_CALL AquaClipboard::setContents(const Reference<XTransferable>& xTransf
[NSArray array];
ClearableMutexGuard aGuard(m_aMutex);
-
+
Reference<XClipboardOwner> oldOwner(mXClipboardOwner);
mXClipboardOwner = xClipboardOwner;
-
+
Reference<XTransferable> oldContent(mXClipboardContent);
mXClipboardContent = xTransferable;
-
+
mPasteboardChangeCount = [mPasteboard declareTypes: types owner: mEventListener];
aGuard.clear();
-
+
// if we are already the owner of the clipboard
// then fire lost ownership event
if (oldOwner.is())
{
fireLostClipboardOwnershipEvent(oldOwner, oldContent);
}
-
+
fireClipboardChangedEvent();
}
@@ -229,26 +229,26 @@ sal_Int8 SAL_CALL AquaClipboard::getRenderingCapabilities() throw( RuntimeExcept
}
-void SAL_CALL AquaClipboard::addClipboardListener(const Reference< XClipboardListener >& listener)
+void SAL_CALL AquaClipboard::addClipboardListener(const Reference< XClipboardListener >& listener)
throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
-
+
if (!listener.is())
- throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
+ throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
static_cast<XClipboardEx*>(this), 1);
-
+
mClipboardListeners.push_back(listener);
}
-void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboardListener >& listener)
+void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboardListener >& listener)
throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
if (!listener.is())
- throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
+ throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
static_cast<XClipboardEx*>(this), 1);
mClipboardListeners.remove(listener);
@@ -317,7 +317,7 @@ void AquaClipboard::fireLostClipboardOwnershipEvent(Reference<XClipboardOwner> o
BOOST_ASSERT(oldOwner.is());
try { oldOwner->lostOwnership(static_cast<XClipboardEx*>(this), oldContent); }
- catch(RuntimeException&) { }
+ catch(RuntimeException&) { }
}
@@ -327,10 +327,10 @@ void AquaClipboard::provideDataForType(NSPasteboard* sender, NSString* type)
{
DataProviderPtr_t dp = mpDataFlavorMapper->getDataProvider(type, mXClipboardContent);
NSData* pBoardData = NULL;
-
+
if (dp.get() != NULL)
{
- pBoardData = (NSData*)dp->getSystemData();
+ pBoardData = (NSData*)dp->getSystemData();
[sender setData: pBoardData forType: type];
}
}
@@ -340,19 +340,19 @@ void AquaClipboard::provideDataForType(NSPasteboard* sender, NSString* type)
//------------------------------------------------
// XFlushableClipboard
//------------------------------------------------
-
-void SAL_CALL AquaClipboard::flushClipboard()
+
+void SAL_CALL AquaClipboard::flushClipboard()
throw(RuntimeException)
{
if (mXClipboardContent.is())
{
- Sequence<DataFlavor> flavorList = mXClipboardContent->getTransferDataFlavors();
+ Sequence<DataFlavor> flavorList = mXClipboardContent->getTransferDataFlavors();
sal_uInt32 nFlavors = flavorList.getLength();
-
+
for (sal_uInt32 i = 0; i < nFlavors; i++)
{
NSString* sysType = mpDataFlavorMapper->openOfficeToSystemFlavor(flavorList[i]);
-
+
if (sysType != NULL)
{
provideDataForType(mPasteboard, sysType);
diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.hxx b/vcl/aqua/source/dtrans/aqua_clipboard.hxx
index e495ee3c239e..ce6f463499e9 100644
--- a/vcl/aqua/source/dtrans/aqua_clipboard.hxx
+++ b/vcl/aqua/source/dtrans/aqua_clipboard.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +72,22 @@ class AquaClipboard;
class AquaClipboard : public ::cppu::BaseMutex,
- public ::cppu::WeakComponentImplHelper4< com::sun::star::datatransfer::clipboard::XClipboardEx,
- com::sun::star::datatransfer::clipboard::XClipboardNotifier,
+ public ::cppu::WeakComponentImplHelper4< com::sun::star::datatransfer::clipboard::XClipboardEx,
+ com::sun::star::datatransfer::clipboard::XClipboardNotifier,
com::sun::star::datatransfer::clipboard::XFlushableClipboard,
com::sun::star::lang::XServiceInfo >,
private ::boost::noncopyable
{
public:
- /* Create a clipboard instance.
-
- @param pasteboard
+ /* Create a clipboard instance.
+
+ @param pasteboard
If not equal NULL the instance will be instantiated with the provided
pasteboard reference and 'bUseSystemClipboard' will be ignored
@param bUseSystemClipboard
If 'pasteboard' is NULL 'bUseSystemClipboard' determines whether the
- system clipboard will be created (bUseSystemClipboard == true) or if
+ system clipboard will be created (bUseSystemClipboard == true) or if
the DragPasteboard if bUseSystemClipboard == false
*/
AquaClipboard(NSPasteboard* pasteboard = NULL,
@@ -98,51 +98,51 @@ public:
//------------------------------------------------
// XClipboard
//------------------------------------------------
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setContents( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+ virtual void SAL_CALL setContents( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw( ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getName()
+ virtual ::rtl::OUString SAL_CALL getName()
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
- // XClipboardEx
+ // XClipboardEx
//------------------------------------------------
virtual sal_Int8 SAL_CALL getRenderingCapabilities()
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
- // XClipboardNotifier
+ // XClipboardNotifier
//------------------------------------------------
- virtual void SAL_CALL addClipboardListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ virtual void SAL_CALL addClipboardListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeClipboardListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ virtual void SAL_CALL removeClipboardListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
// XFlushableClipboard
//------------------------------------------------
-
+
virtual void SAL_CALL flushClipboard( ) throw( com::sun::star::uno::RuntimeException );
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
virtual ::rtl::OUString SAL_CALL getImplementationName()
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
throw(::com::sun::star::uno::RuntimeException);
/* Get a reference to the used pastboard.
diff --git a/vcl/aqua/source/dtrans/aqua_service.cxx b/vcl/aqua/source/dtrans/aqua_service.cxx
index 65f438b0180d..4fa1a2c2a1ef 100644
--- a/vcl/aqua/source/dtrans/aqua_service.cxx
+++ b/vcl/aqua/source/dtrans/aqua_service.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceF
} // namespace aqua
-extern "C"
+extern "C"
{
void SAL_CALL component_getImplementationEnvironment(
@@ -67,13 +67,13 @@ sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( AQUA_CLIPBOARD_REGKEY_NAME ) ) );
bRetVal = sal_True;
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
+ {
+ OSL_ENSURE(sal_False, "InvalidRegistryException caught");
bRetVal = sal_False;
}
}
@@ -88,8 +88,8 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, AQUA_CLIPBOARD_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( AQUA_CLIPBOARD_SERVICE_NAME ) );
-
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( AQUA_CLIPBOARD_SERVICE_NAME ) );
+
//OUString( RTL_CONSTASCII_USTRINGPARAM( FPS_IMPL_NAME ) )
Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
@@ -100,7 +100,7 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/vcl/aqua/source/dtrans/service_entry.cxx b/vcl/aqua/source/dtrans/service_entry.cxx
index 73476525b6b4..1e683b413ec0 100644
--- a/vcl/aqua/source/dtrans/service_entry.cxx
+++ b/vcl/aqua/source/dtrans/service_entry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/dtrans/test_aquacb.cxx b/vcl/aqua/source/dtrans/test_aquacb.cxx
index 6a223a9bcec1..9a0ec9af4187 100644
--- a/vcl/aqua/source/dtrans/test_aquacb.cxx
+++ b/vcl/aqua/source/dtrans/test_aquacb.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,26 +44,26 @@
#include <stdio.h>
-using namespace ::rtl;
+using namespace ::rtl;
using namespace ::std;
using namespace ::cppu;
using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::datatransfer::clipboard;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::lang;
Reference< XTransferable > rXTransfRead;
class TestTransferable : public WeakImplHelper2< XClipboardOwner, XTransferable >
{
-public:
+public:
TestTransferable();
virtual Any SAL_CALL getTransferData( const DataFlavor& aFlavor ) throw(UnsupportedFlavorException, IOException, RuntimeException);
virtual Sequence< DataFlavor > SAL_CALL getTransferDataFlavors() throw(RuntimeException);
virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& aFlavor ) throw(RuntimeException);
virtual void SAL_CALL lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans ) throw(RuntimeException);
-
+
private:
Sequence< DataFlavor > m_seqDFlv;
OUString m_Data;
@@ -74,16 +74,16 @@ TestTransferable::TestTransferable() :
m_Data( RTL_CONSTASCII_USTRINGPARAM( "This is a test string" ) )
{
DataFlavor df;
-
+
df.MimeType = OUString::createFromAscii( "text/html" );
df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 );
- m_seqDFlv[0] = df;
+ m_seqDFlv[0] = df;
}
-Any SAL_CALL TestTransferable::getTransferData( const DataFlavor& aFlavor )
+Any SAL_CALL TestTransferable::getTransferData( const DataFlavor& aFlavor )
throw(UnsupportedFlavorException, IOException, RuntimeException)
-{
+{
Any anyData;
if ( aFlavor.MimeType == m_seqDFlv[0].MimeType )
@@ -101,13 +101,13 @@ Any SAL_CALL TestTransferable::getTransferData( const DataFlavor& aFlavor )
return anyData;
}
-Sequence< DataFlavor > SAL_CALL TestTransferable::getTransferDataFlavors()
+Sequence< DataFlavor > SAL_CALL TestTransferable::getTransferDataFlavors()
throw(RuntimeException)
{
return m_seqDFlv;
}
-sal_Bool SAL_CALL TestTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
+sal_Bool SAL_CALL TestTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw(RuntimeException)
{
sal_Int32 nLength = m_seqDFlv.getLength();
@@ -125,7 +125,7 @@ sal_Bool SAL_CALL TestTransferable::isDataFlavorSupported( const DataFlavor& aFl
return bRet;
}
-void SAL_CALL TestTransferable::lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
+void SAL_CALL TestTransferable::lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException)
{
}
@@ -197,13 +197,13 @@ int SAL_CALL main( int argc, char** argv )
if ( !xComponent.is() )
OSL_ENSURE(sal_False, "Error shuting down");
-
+
// Dispose and clear factory
xComponent->dispose();
g_xFactory.clear();
g_xFactory = Reference< XMultiServiceFactory >();
- return 0;
+ return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx
index f79da3559b35..d6abb0cf93dd 100644
--- a/vcl/aqua/source/gdi/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/salatslayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +43,11 @@ public:
ATSLayout( ATSUStyle&, float fFontScale );
virtual ~ATSLayout();
- virtual bool LayoutText( ImplLayoutArgs& );
- virtual void AdjustLayout( ImplLayoutArgs& );
- virtual void DrawText( SalGraphics& ) const;
+ virtual bool LayoutText( ImplLayoutArgs& );
+ virtual void AdjustLayout( ImplLayoutArgs& );
+ virtual void DrawText( SalGraphics& ) const;
- virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int&,
+ virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int&,
sal_Int32* pGlyphAdvances, int* pCharIndexes ) const;
virtual long GetTextWidth() const;
@@ -65,49 +65,49 @@ public:
virtual void Simplify( bool bIsBase );
private:
- ATSUStyle& mrATSUStyle;
- ATSUTextLayout maATSULayout;
- int mnCharCount; // ==mnEndCharPos-mnMinCharPos
+ ATSUStyle& mrATSUStyle;
+ ATSUTextLayout maATSULayout;
+ int mnCharCount; // ==mnEndCharPos-mnMinCharPos
// to prevent ATS overflowing the Fixed16.16 values
// ATS font requests get size limited by downscaling huge fonts
// in these cases the font scale becomes something bigger than 1.0
- float mfFontScale;
+ float mfFontScale;
private:
- bool InitGIA( ImplLayoutArgs* pArgs = NULL ) const;
- bool GetIdealX() const;
- bool GetDeltaY() const;
- void InvalidateMeasurements();
+ bool InitGIA( ImplLayoutArgs* pArgs = NULL ) const;
+ bool GetIdealX() const;
+ bool GetDeltaY() const;
+ void InvalidateMeasurements();
- int Fixed2Vcl( Fixed ) const; // convert ATSU-Fixed units to VCL units
- int AtsuPix2Vcl( int ) const; // convert ATSU-Pixel units to VCL units
- Fixed Vcl2Fixed( int ) const; // convert VCL units to ATSU-Fixed units
+ int Fixed2Vcl( Fixed ) const; // convert ATSU-Fixed units to VCL units
+ int AtsuPix2Vcl( int ) const; // convert ATSU-Pixel units to VCL units
+ Fixed Vcl2Fixed( int ) const; // convert VCL units to ATSU-Fixed units
// cached details about the resulting layout
// mutable members since these details are all lazy initialized
- mutable int mnGlyphCount; // glyph count
- mutable Fixed mnCachedWidth; // cached value of resulting typographical width
- int mnTrailingSpaceWidth; // in Pixels
-
- mutable ATSGlyphRef* mpGlyphIds; // ATSU glyph ids
- mutable Fixed* mpCharWidths; // map relative charpos to charwidth
- mutable int* mpChars2Glyphs; // map relative charpos to absolute glyphpos
- mutable int* mpGlyphs2Chars; // map absolute glyphpos to absolute charpos
- mutable bool* mpGlyphRTLFlags; // BiDi status for glyphs: true if RTL
- mutable Fixed* mpGlyphAdvances; // contains glyph widths for the justified layout
- mutable Fixed* mpGlyphOrigAdvs; // contains glyph widths for the unjustified layout
- mutable Fixed* mpDeltaY; // vertical offset from the baseline
+ mutable int mnGlyphCount; // glyph count
+ mutable Fixed mnCachedWidth; // cached value of resulting typographical width
+ int mnTrailingSpaceWidth; // in Pixels
+
+ mutable ATSGlyphRef* mpGlyphIds; // ATSU glyph ids
+ mutable Fixed* mpCharWidths; // map relative charpos to charwidth
+ mutable int* mpChars2Glyphs; // map relative charpos to absolute glyphpos
+ mutable int* mpGlyphs2Chars; // map absolute glyphpos to absolute charpos
+ mutable bool* mpGlyphRTLFlags; // BiDi status for glyphs: true if RTL
+ mutable Fixed* mpGlyphAdvances; // contains glyph widths for the justified layout
+ mutable Fixed* mpGlyphOrigAdvs; // contains glyph widths for the unjustified layout
+ mutable Fixed* mpDeltaY; // vertical offset from the baseline
struct SubPortion { int mnMinCharPos, mnEndCharPos; Fixed mnXOffset; };
typedef std::vector<SubPortion> SubPortionVector;
- mutable SubPortionVector maSubPortions; // Writer&ATSUI layouts can differ quite a bit...
+ mutable SubPortionVector maSubPortions; // Writer&ATSUI layouts can differ quite a bit...
// storing details about fonts used in glyph-fallback for this layout
- mutable class FallbackInfo* mpFallbackInfo;
+ mutable class FallbackInfo* mpFallbackInfo;
// x-offset relative to layout origin
// currently only used in RTL-layouts
- mutable Fixed mnBaseAdv;
+ mutable Fixed mnBaseAdv;
};
class FallbackInfo
@@ -155,7 +155,7 @@ ATSLayout::~ATSLayout()
if( maATSULayout )
ATSUDisposeTextLayout( maATSULayout );
-
+
delete[] mpGlyphRTLFlags;
delete[] mpGlyphs2Chars;
delete[] mpChars2Glyphs;
@@ -181,7 +181,7 @@ inline int ATSLayout::Fixed2Vcl( Fixed nFixed ) const
inline int ATSLayout::AtsuPix2Vcl( int nAtsuPixel) const
{
float fVclPixel = mfFontScale * nAtsuPixel;
- fVclPixel += (fVclPixel>=0) ? +0.5 : -0.5; // prepare rounding to int
+ fVclPixel += (fVclPixel>=0) ? +0.5 : -0.5; // prepare rounding to int
int nVclPixel = static_cast<int>( fVclPixel);
return nVclPixel;
}
@@ -200,8 +200,8 @@ inline Fixed ATSLayout::Vcl2Fixed( int nPixel ) const
* @param rArgs: contains array of char to be layouted, starting and ending position of the text to layout
*
* Typographic layout of text by using the style maATSUStyle
- *
- * @return : true if everything is ok
+ *
+ * @return : true if everything is ok
**/
bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
{
@@ -211,7 +211,7 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
maATSULayout = NULL;
// Layout text
- // set up our locals, verify parameters...
+ // set up our locals, verify parameters...
DBG_ASSERT( (rArgs.mpStr!=NULL), "ATSLayout::LayoutText() with rArgs.mpStr==NULL !!!");
DBG_ASSERT( (mrATSUStyle!=NULL), "ATSLayout::LayoutText() with ATSUStyle==NULL !!!");
@@ -287,8 +287,8 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
* @param rArgs: contains attributes relevant to do a text specific layout
*
* Adjust text layout by moving glyphs to match the requested logical widths
- *
- * @return : none
+ *
+ * @return : none
**/
void ATSLayout::AdjustLayout( ImplLayoutArgs& rArgs )
{
@@ -330,7 +330,7 @@ void ATSLayout::AdjustLayout( ImplLayoutArgs& rArgs )
// changing the layout will make all previous measurements invalid
InvalidateMeasurements();
-
+
ATSUAttributeTag nTags[3];
ATSUAttributeValuePtr nVals[3];
ByteCount nBytes[3];
@@ -367,17 +367,17 @@ void ATSLayout::AdjustLayout( ImplLayoutArgs& rArgs )
*
* Draw the layouted text to the CGContext
*
- * @return : none
+ * @return : none
**/
void ATSLayout::DrawText( SalGraphics& rGraphics ) const
{
AquaSalGraphics& rAquaGraphics = static_cast<AquaSalGraphics&>(rGraphics);
-
- // short circuit if there is nothing to do
+
+ // short circuit if there is nothing to do
if( (mnCharCount <= 0)
|| !rAquaGraphics.CheckContext() )
return;
-
+
// the view is vertically flipped => flipped glyphs
// so apply a temporary transformation that it flips back
// also compensate if the font was size limited
@@ -469,7 +469,7 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
* ATSLayout::GetNextGlyphs : Get info about next glyphs in the layout
*
* @param nLen: max number of char
- * @param pGlyphs: returned array of glyph ids
+ * @param pGlyphs: returned array of glyph ids
* @param rPos: returned x starting position
* @param nStart: index of the first requested glyph
* @param pGlyphAdvances: returned array of glyphs advances
@@ -576,14 +576,14 @@ int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int
nCharPos = nStart + mnMinCharPos;
*(pCharIndexes++) = nCharPos;
}
-
+
// stop at last glyph
if( ++nStart >= mnGlyphCount )
break;
// stop when next the x-position is unexpected
if( !maSubPortions.empty() )
- break; // TODO: finish the complete sub-portion
+ break; // TODO: finish the complete sub-portion
if( !pGlyphAdvances && mpGlyphOrigAdvs )
if( mpGlyphAdvances[nStart-1] != mpGlyphOrigAdvs[nStart-1] )
break;
@@ -603,7 +603,7 @@ int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int
*
* Get typographic bounds of the text
*
- * @return : text width
+ * @return : text width
**/
long ATSLayout::GetTextWidth() const
{
@@ -680,7 +680,7 @@ long ATSLayout::FillDXArray( long* pDXArray ) const
DBG_ASSERT( !mnTrailingSpaceWidth, "ATSLayout::FillDXArray() with nTSW!=0" );
// initialize details about the resulting layout
- InitGIA();
+ InitGIA();
// distribute the widths among the string elements
int nPixWidth = 0;
@@ -708,7 +708,7 @@ long ATSLayout::FillDXArray( long* pDXArray ) const
* Measure the layouted text to find the typographical line break
* the result is needed by the language specific line breaking
*
- * @return : string index corresponding to the suggested line break
+ * @return : string index corresponding to the suggested line break
**/
int ATSLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
{
@@ -750,7 +750,7 @@ int ATSLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) cons
// initial measurement of text break position
UniCharArrayOffset nBreakPos = mnMinCharPos;
- const ATSUTextMeasurement nATSUMaxWidth = Vcl2Fixed( nPixelWidth );
+ const ATSUTextMeasurement nATSUMaxWidth = Vcl2Fixed( nPixelWidth );
if( nATSUMaxWidth <= 0xFFFF ) // #i108584# avoid ATSU rejecting the parameter
return mnMinCharPos; // or do ATSUMaxWidth=0x10000;
OSStatus eStatus = ATSUBreakLine( maATSULayout, mnMinCharPos,
@@ -794,7 +794,7 @@ int ATSLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) cons
*
* Fill the array of positions of carets (for cursors and selections)
*
- * @return : none
+ * @return : none
**/
void ATSLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
{
@@ -817,7 +817,7 @@ void ATSLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
&aCaret0, &aCaret1, &bIsSplit );
if( eStatus != noErr )
continue;
- const Fixed nFixedPos = mnBaseAdv + aCaret0.fX;
+ const Fixed nFixedPos = mnBaseAdv + aCaret0.fX;
// convert the measurement to pixel units
const int nPixelPos = Fixed2Vcl( nFixedPos );
// update previous trailing position
@@ -838,7 +838,7 @@ void ATSLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
*
* Get ink bounds of the text
*
- * @return : measurement valid
+ * @return : measurement valid
**/
bool ATSLayout::GetBoundRect( SalGraphics&, Rectangle& rVCLRect ) const
{
@@ -865,7 +865,7 @@ bool ATSLayout::GetBoundRect( SalGraphics&, Rectangle& rVCLRect ) const
* ATSLayout::InitGIA() : get many informations about layouted text
*
* Fills arrays of information about the gylph layout previously done
- * in ASTLayout::LayoutText() : glyph advance (width), glyph delta Y (from baseline),
+ * in ASTLayout::LayoutText() : glyph advance (width), glyph delta Y (from baseline),
* mapping between glyph index and character index, chars widths
*
* @return : true if everything could be computed, otherwise false
@@ -876,14 +876,14 @@ bool ATSLayout::InitGIA( ImplLayoutArgs* pArgs ) const
if( mnGlyphCount >= 0 )
return true;
mnGlyphCount = 0;
-
+
// Workaround a bug in ATSUI with empty string
if( mnCharCount <= 0 )
return false;
// initialize character details
- mpCharWidths = new Fixed[ mnCharCount ];
- mpChars2Glyphs = new int[ mnCharCount ];
+ mpCharWidths = new Fixed[ mnCharCount ];
+ mpChars2Glyphs = new int[ mnCharCount ];
for( int n = 0; n < mnCharCount; ++n )
{
mpCharWidths[ n ] = 0;
@@ -903,8 +903,8 @@ bool ATSLayout::InitGIA( ImplLayoutArgs* pArgs ) const
// initialize glyph details
mpGlyphIds = new ATSGlyphRef[ iLayoutDataCount ];
- mpGlyphAdvances = new Fixed[ iLayoutDataCount ];
- mpGlyphs2Chars = new int[ iLayoutDataCount ];
+ mpGlyphAdvances = new Fixed[ iLayoutDataCount ];
+ mpGlyphs2Chars = new int[ iLayoutDataCount ];
// measure details of the glyph layout
Fixed nLeftPos = 0;
@@ -916,7 +916,7 @@ bool ATSLayout::InitGIA( ImplLayoutArgs* pArgs ) const
const int nRelativeIdx = (rALR.originalOffset / 2);
if( i+1 < iLayoutDataCount )
mpCharWidths[ nRelativeIdx ] += pALR[i+1].realPos - rALR.realPos;
-
+
// new glyph is available => finish measurement of old glyph
if( mnGlyphCount > 0 )
mpGlyphAdvances[ mnGlyphCount-1 ] = rALR.realPos - nLeftPos;
@@ -1058,17 +1058,17 @@ bool ATSLayout::GetDeltaY() const
if( mpDeltaY == NULL )
return true;
-
+
if( nDeltaCount != (ItemCount)mnGlyphCount )
{
DBG_WARNING( "ATSLayout::GetDeltaY() : wrong deltaY count!" );
ATSUDirectReleaseLayoutDataArrayPtr( NULL,
- kATSUDirectDataBaselineDeltaFixedArray, (void**)&mpDeltaY );
+ kATSUDirectDataBaselineDeltaFixedArray, (void**)&mpDeltaY );
mpDeltaY = NULL;
return false;
}
#endif
-
+
return true;
}
diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx b/vcl/aqua/source/gdi/salatsuifontutils.cxx
index c11ca9764400..9884c4fb6486 100644
--- a/vcl/aqua/source/gdi/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -216,10 +216,10 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes& rDF
return false;
// all scalable fonts on this platform are subsettable
- rDFA.mbSubsettable = true;
- rDFA.mbEmbeddable = false;
+ rDFA.mbSubsettable = true;
+ rDFA.mbEmbeddable = false;
- // prepare iterating over all name strings of the font
+ // prepare iterating over all name strings of the font
ItemCount nFontNameCount = 0;
rc = ATSUCountFontNames( nFontID, &nFontNameCount );
if( rc != noErr )
@@ -236,9 +236,9 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes& rDF
{
ByteCount nNameLength = 0;
- FontNameCode eFontNameCode;
- FontPlatformCode eFontNamePlatform;
- FontScriptCode eFontNameScript;
+ FontNameCode eFontNameCode;
+ FontPlatformCode eFontNamePlatform;
+ FontScriptCode eFontNameScript;
FontLanguageCode eFontNameLanguage;
rc = ATSUGetIndFontName( nFontID, nNameIndex, 0, NULL,
&nNameLength, &eFontNameCode, &eFontNamePlatform, &eFontNameScript, &eFontNameLanguage );
@@ -267,13 +267,13 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes& rDF
case 0x30A: nNameValue += 0; // Win-UCS-4
eEncoding = RTL_TEXTENCODING_UCS4;
break;
- case 0x100: nNameValue += 21; // Mac Roman
+ case 0x100: nNameValue += 21; // Mac Roman
eEncoding = RTL_TEXTENCODING_APPLE_ROMAN;
break;
case 0x300: nNameValue = 0; // Win Symbol encoded name!
rDFA.mbSymbolFlag = true; // (often seen for symbol fonts)
break;
- default: nNameValue = 0; // ignore other encodings
+ default: nNameValue = 0; // ignore other encodings
break;
}
diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx
index 3a37f6d32d39..9d14d686472f 100644
--- a/vcl/aqua/source/gdi/salbmp.cxx
+++ b/vcl/aqua/source/gdi/salbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ bool AquaSalBitmap::Create( const SalBitmap& rSalBmp, USHORT nNewBitCount )
{
const AquaSalBitmap& rSourceBitmap = static_cast<const AquaSalBitmap&>(rSalBmp);
- if( isValidBitCount( nNewBitCount ) && rSourceBitmap.maUserBuffer.get() )
+ if( isValidBitCount( nNewBitCount ) && rSourceBitmap.maUserBuffer.get() )
{
mnBits = nNewBitCount;
mnWidth = rSourceBitmap.mnWidth;
@@ -258,17 +258,17 @@ bool AquaSalBitmap::AllocateUserData()
switch( mnBits )
{
- case 1: mnBytesPerRow = (mnWidth + 7) >> 3; break;
- case 4: mnBytesPerRow = (mnWidth + 1) >> 1; break;
- case 8: mnBytesPerRow = mnWidth; break;
- case 16: mnBytesPerRow = mnWidth << 1; break;
- case 24: mnBytesPerRow = (mnWidth << 1) + mnWidth; break;
- case 32: mnBytesPerRow = mnWidth << 2; break;
+ case 1: mnBytesPerRow = (mnWidth + 7) >> 3; break;
+ case 4: mnBytesPerRow = (mnWidth + 1) >> 1; break;
+ case 8: mnBytesPerRow = mnWidth; break;
+ case 16: mnBytesPerRow = mnWidth << 1; break;
+ case 24: mnBytesPerRow = (mnWidth << 1) + mnWidth; break;
+ case 32: mnBytesPerRow = mnWidth << 2; break;
default:
DBG_ERROR("vcl::AquaSalBitmap::AllocateUserData(), illegal bitcount!");
}
}
-
+
try
{
if( mnBytesPerRow )
@@ -280,7 +280,7 @@ bool AquaSalBitmap::AllocateUserData()
maUserBuffer.reset( NULL );
mnBytesPerRow = 0;
}
-
+
return maUserBuffer.get() != 0;
}
@@ -292,7 +292,7 @@ protected:
sal_uInt8* pData;
public:
static ImplPixelFormat* GetFormat( sal_uInt16 nBits, const BitmapPalette& rPalette );
-
+
virtual void StartLine( sal_uInt8* pLine ) { pData = pLine; }
virtual void SkipPixel( sal_uInt32 nPixel ) = 0;
virtual ColorData ReadPixel() = 0;
@@ -350,7 +350,7 @@ class ImplPixelFormat16 : public ImplPixelFormat
protected:
sal_uInt16* pData16;
public:
-
+
virtual void StartLine( sal_uInt8* pLine )
{
pData16 = (sal_uInt16*)pLine;
@@ -367,7 +367,7 @@ public:
}
virtual void WritePixel( ColorData nColor )
{
- *pData++ = ((COLORDATA_RED( nColor ) & 0xf8 ) << 7 ) ||
+ *pData++ = ((COLORDATA_RED( nColor ) & 0xf8 ) << 7 ) ||
((COLORDATA_GREEN( nColor ) & 0xf8 ) << 2 ) ||
((COLORDATA_BLUE( nColor ) & 0xf8 ) >> 3 );
}
@@ -424,14 +424,14 @@ public:
}
virtual ColorData ReadPixel()
{
- const BitmapColor& rColor = mrPalette[( pData[mnX >> 1] >> mnShift) & 0x0f];
+ const BitmapColor& rColor = mrPalette[( pData[mnX >> 1] >> mnShift) & 0x0f];
mnX++;
mnShift ^= 4;
return rColor.operator Color().GetColor();
}
virtual void WritePixel( ColorData nColor )
{
- const BitmapColor aColor( COLORDATA_RED( nColor ), COLORDATA_GREEN( nColor ), COLORDATA_BLUE( nColor ) );
+ const BitmapColor aColor( COLORDATA_RED( nColor ), COLORDATA_GREEN( nColor ), COLORDATA_BLUE( nColor ) );
pData[mnX>>1] &= (0xf0 >> mnShift);
pData[mnX>>1] |= (static_cast< sal_uInt8 >( mrPalette.GetBestIndex( aColor ) ) & 0x0f);
mnX++;
@@ -461,13 +461,13 @@ public:
}
virtual ColorData ReadPixel()
{
- const BitmapColor& rColor = mrPalette[ (pData[mnX >> 3 ] >> ( 7 - ( mnX & 7 ) )) & 1];
+ const BitmapColor& rColor = mrPalette[ (pData[mnX >> 3 ] >> ( 7 - ( mnX & 7 ) )) & 1];
mnX++;
return rColor.operator Color().GetColor();
}
virtual void WritePixel( ColorData nColor )
{
- const BitmapColor aColor( COLORDATA_RED( nColor ), COLORDATA_GREEN( nColor ), COLORDATA_BLUE( nColor ) );
+ const BitmapColor aColor( COLORDATA_RED( nColor ), COLORDATA_GREEN( nColor ), COLORDATA_BLUE( nColor ) );
if( mrPalette.GetBestIndex( aColor ) & 1 )
pData[ mnX >> 3 ] |= 1 << ( 7 - ( mnX & 7 ) );
else
@@ -487,7 +487,7 @@ ImplPixelFormat* ImplPixelFormat::GetFormat( sal_uInt16 nBits, const BitmapPalet
case 24: return new ImplPixelFormat24;
case 32: return new ImplPixelFormat32;
}
-
+
return 0;
}
@@ -549,7 +549,7 @@ void AquaSalBitmap::ConvertBitmapData( sal_uInt32 nWidth, sal_uInt32 nHeight,
sal_uInt32 nX = nWidth;
while( nX-- )
pD->WritePixel( pS->ReadPixel() );
-
+
pSrcData += nSrcBytesPerRow;
pDestData += nDestBytesPerRow;
}
@@ -583,21 +583,21 @@ static struct pal_entry
}
const aImplSalSysPalEntryAry[ 16 ] =
{
-{ 0, 0, 0 },
-{ 0, 0, 0x80 },
-{ 0, 0x80, 0 },
-{ 0, 0x80, 0x80 },
-{ 0x80, 0, 0 },
+{ 0, 0, 0 },
+{ 0, 0, 0x80 },
+{ 0, 0x80, 0 },
+{ 0, 0x80, 0x80 },
+{ 0x80, 0, 0 },
{ 0x80, 0, 0x80 },
-{ 0x80, 0x80, 0 },
+{ 0x80, 0x80, 0 },
{ 0x80, 0x80, 0x80 },
{ 0xC0, 0xC0, 0xC0 },
-{ 0, 0, 0xFF },
-{ 0, 0xFF, 0 },
-{ 0, 0xFF, 0xFF },
-{ 0xFF, 0, 0 },
+{ 0, 0, 0xFF },
+{ 0, 0xFF, 0 },
+{ 0, 0xFF, 0xFF },
+{ 0xFF, 0, 0 },
{ 0xFF, 0, 0xFF },
-{ 0xFF, 0xFF, 0 },
+{ 0xFF, 0xFF, 0 },
{ 0xFF, 0xFF, 0xFF }
};
@@ -618,7 +618,7 @@ const BitmapPalette& GetDefaultPalette( int mnBits, bool bMonochrome )
aDefPalette256.SetEntryCount( 256 );
aDefPalette16.SetEntryCount( 16 );
aDefPalette2.SetEntryCount( 2 );
-
+
// Standard colors
unsigned int i;
for( i = 0; i < 16; i++ )
@@ -666,7 +666,7 @@ const BitmapPalette& GetDefaultPalette( int mnBits, bool bMonochrome )
BitmapBuffer* AquaSalBitmap::AcquireBuffer( bool bReadOnly )
{
if( !maUserBuffer.get() )
-// || maContextBuffer.get() && (maUserBuffer.get() != maContextBuffer.get()) )
+// || maContextBuffer.get() && (maUserBuffer.get() != maContextBuffer.get()) )
{
fprintf(stderr,"ASB::Acq(%dx%d,d=%d)\n",mnWidth,mnHeight,mnBits);
// TODO: AllocateUserData();
@@ -682,14 +682,14 @@ BitmapBuffer* AquaSalBitmap::AcquireBuffer( bool bReadOnly )
pBuffer->mnBitCount = mnBits;
switch( mnBits )
{
- case 1: pBuffer->mnFormat = BMP_FORMAT_1BIT_MSB_PAL; break;
- case 4: pBuffer->mnFormat = BMP_FORMAT_4BIT_MSN_PAL; break;
- case 8: pBuffer->mnFormat = BMP_FORMAT_8BIT_PAL; break;
- case 16: pBuffer->mnFormat = BMP_FORMAT_16BIT_TC_MSB_MASK;
+ case 1: pBuffer->mnFormat = BMP_FORMAT_1BIT_MSB_PAL; break;
+ case 4: pBuffer->mnFormat = BMP_FORMAT_4BIT_MSN_PAL; break;
+ case 8: pBuffer->mnFormat = BMP_FORMAT_8BIT_PAL; break;
+ case 16: pBuffer->mnFormat = BMP_FORMAT_16BIT_TC_MSB_MASK;
pBuffer->maColorMask = ColorMask( k16BitRedColorMask, k16BitGreenColorMask, k16BitBlueColorMask );
break;
- case 24: pBuffer->mnFormat = BMP_FORMAT_24BIT_TC_BGR; break;
- case 32: pBuffer->mnFormat = BMP_FORMAT_32BIT_TC_ARGB;
+ case 24: pBuffer->mnFormat = BMP_FORMAT_24BIT_TC_BGR; break;
+ case 32: pBuffer->mnFormat = BMP_FORMAT_32BIT_TC_ARGB;
pBuffer->maColorMask = ColorMask( k32BitRedColorMask, k32BitGreenColorMask, k32BitBlueColorMask );
break;
}
@@ -713,7 +713,7 @@ void AquaSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
if( mxGraphicContext )
DestroyContext();
}
-
+
delete pBuffer;
}
@@ -770,7 +770,7 @@ CGImageRef AquaSalBitmap::CreateWithMask( const AquaSalBitmap& rMask,
if( !CGImageIsMask(xMask) || (CGImageGetColorSpace(xMask) != GetSalData()->mxGraySpace) )
{
const CGRect xImageRect=CGRectMake( 0, 0, nWidth, nHeight );//the rect has no offset
-
+
// create the alpha mask image fitting our image
// TODO: is caching the full mask or the subimage mask worth it?
int nMaskBytesPerRow = ((nWidth + 3) & ~3);
@@ -785,13 +785,13 @@ CGImageRef AquaSalBitmap::CreateWithMask( const AquaSalBitmap& rMask,
xMask = CGImageMaskCreate( nWidth, nHeight, 8, 8, nMaskBytesPerRow, xDataProvider, pDecode, false );
CFRelease( xDataProvider );
CFRelease( xMaskContext );
- }
-
+ }
+
if( !xMask )
return xImage;
// combine image and alpha mask
- CGImageRef xMaskedImage = CGImageCreateWithMask( xImage, xMask );
+ CGImageRef xMaskedImage = CGImageCreateWithMask( xImage, xMask );
CFRelease( xMask );
CFRelease( xImage );
return xMaskedImage;
@@ -822,7 +822,7 @@ CGImageRef AquaSalBitmap::CreateColorMask( int nX, int nY, int nWidth, int nHeig
sal_uInt8* pSource = maUserBuffer.get();
if( nY )
pSource += nY * mnBytesPerRow;
-
+
int y = nHeight;
while( y-- )
{
@@ -853,7 +853,7 @@ CGImageRef AquaSalBitmap::CreateColorMask( int nX, int nY, int nWidth, int nHeig
// =======================================================================
/** AquaSalBitmap::GetSystemData Get platform native image data from existing image
- *
+ *
* @param rData struct BitmapSystemData, defined in vcl/inc/bitmap.hxx
* @return true if successful
**/
@@ -863,7 +863,7 @@ bool AquaSalBitmap::GetSystemData( BitmapSystemData& rData )
if( !mxGraphicContext )
CreateContext();
-
+
if ( mxGraphicContext )
{
bRet = true;
@@ -875,9 +875,9 @@ bool AquaSalBitmap::GetSystemData( BitmapSystemData& rData )
* We need to hack things because VCL does not use kCGBitmapByteOrder32Host, while Cairo requires it.
*/
OSL_TRACE("AquaSalBitmap::%s(): kCGBitmapByteOrder32Host not found => inserting it.",__func__);
-
+
CGImageRef xImage = CGBitmapContextCreateImage (mxGraphicContext);
-
+
// re-create the context with single change: include kCGBitmapByteOrder32Host flag.
CGContextRef mxGraphicContextNew = CGBitmapContextCreate( CGBitmapContextGetData(mxGraphicContext),
CGBitmapContextGetWidth(mxGraphicContext),
@@ -887,27 +887,27 @@ bool AquaSalBitmap::GetSystemData( BitmapSystemData& rData )
CGBitmapContextGetColorSpace(mxGraphicContext),
CGBitmapContextGetBitmapInfo(mxGraphicContext) | kCGBitmapByteOrder32Host);
CFRelease(mxGraphicContext);
-
+
// Needs to be flipped
CGContextSaveGState( mxGraphicContextNew );
CGContextTranslateCTM (mxGraphicContextNew, 0, CGBitmapContextGetHeight(mxGraphicContextNew));
CGContextScaleCTM (mxGraphicContextNew, 1.0, -1.0);
-
+
CGContextDrawImage(mxGraphicContextNew, CGRectMake( 0, 0, CGImageGetWidth(xImage), CGImageGetHeight(xImage)), xImage);
-
+
// Flip back
CGContextRestoreGState( mxGraphicContextNew );
-
+
CGImageRelease( xImage );
mxGraphicContext = mxGraphicContextNew;
- }
+ }
#endif
rData.rImageContext = (void *) mxGraphicContext;
rData.mnWidth = mnWidth;
rData.mnHeight = mnHeight;
}
-
+
return bRet;
}
diff --git a/vcl/aqua/source/gdi/salcolorutils.cxx b/vcl/aqua/source/gdi/salcolorutils.cxx
index 664011b2684d..1c5408e7a981 100644
--- a/vcl/aqua/source/gdi/salcolorutils.cxx
+++ b/vcl/aqua/source/gdi/salcolorutils.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 5061a90d41e2..4585699d12ee 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -68,11 +68,11 @@ typedef std::vector<unsigned char> ByteVector;
ImplMacFontData::ImplMacFontData( const ImplDevFontAttributes& rDFA, ATSUFontID nFontId )
: ImplFontData( rDFA, 0 )
, mnFontId( nFontId )
-, mpCharMap( NULL )
-, mbOs2Read( false )
-, mbHasOs2Table( false )
-, mbCmapEncodingRead( false )
-, mbHasCJKSupport( false )
+, mpCharMap( NULL )
+, mbOs2Read( false )
+, mbHasOs2Table( false )
+, mbCmapEncodingRead( false )
+, mbHasCJKSupport( false )
{}
// -----------------------------------------------------------------------
@@ -510,9 +510,9 @@ static void AddPolygonToPath( CGMutablePathRef xPath,
bPendingCurve |= rPolygon.isPrevControlPointUsed( nClosedIdx );
}
- if( !bPendingCurve ) // line segment
+ if( !bPendingCurve ) // line segment
CGPathAddLineToPoint( xPath, pTransform, aPoint.getX(), aPoint.getY() );
- else // cubic bezier segment
+ else // cubic bezier segment
{
basegfx::B2DPoint aCP1 = rPolygon.getNextControlPoint( nPrevIdx );
basegfx::B2DPoint aCP2 = rPolygon.getPrevControlPoint( nClosedIdx );
@@ -1012,11 +1012,11 @@ bool AquaSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon& rPolyLine,
// setup line attributes
CGLineJoin aCGLineJoin = kCGLineJoinMiter;
switch( eLineJoin ) {
- case ::basegfx::B2DLINEJOIN_NONE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break;
- case ::basegfx::B2DLINEJOIN_MIDDLE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break;
- case ::basegfx::B2DLINEJOIN_BEVEL: aCGLineJoin = kCGLineJoinBevel; break;
- case ::basegfx::B2DLINEJOIN_MITER: aCGLineJoin = kCGLineJoinMiter; break;
- case ::basegfx::B2DLINEJOIN_ROUND: aCGLineJoin = kCGLineJoinRound; break;
+ case ::basegfx::B2DLINEJOIN_NONE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break;
+ case ::basegfx::B2DLINEJOIN_MIDDLE: aCGLineJoin = /*TODO?*/kCGLineJoinMiter; break;
+ case ::basegfx::B2DLINEJOIN_BEVEL: aCGLineJoin = kCGLineJoinBevel; break;
+ case ::basegfx::B2DLINEJOIN_MITER: aCGLineJoin = kCGLineJoinMiter; break;
+ case ::basegfx::B2DLINEJOIN_ROUND: aCGLineJoin = kCGLineJoinRound; break;
}
// setup poly-polygon path
@@ -1167,7 +1167,7 @@ void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, l
// drawing a layer onto its own context causes trouble on OSX => copy it first
// TODO: is it possible to get rid of this unneeded copy more often?
// e.g. on OSX>=10.5 only this situation causes problems:
- // mnBitmapDepth && (aDstPoint.x + pSrc->mnWidth) > mnWidth
+ // mnBitmapDepth && (aDstPoint.x + pSrc->mnWidth) > mnWidth
CGLayerRef xSrcLayer = mxLayer;
// TODO: if( mnBitmapDepth > 0 )
{
@@ -1431,7 +1431,7 @@ BOOL AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
// NOTE: flip drawing, else the nsimage would be drawn upside down
CGContextSaveGState( mrContext );
-// CGContextTranslateCTM( mrContext, 0, +mnHeight );
+// CGContextTranslateCTM( mrContext, 0, +mnHeight );
CGContextScaleCTM( mrContext, +1, -1 );
nY = /*mnHeight*/ - (nY + nHeight);
@@ -1707,7 +1707,7 @@ bool AquaSalGraphics::AddTempDevFont( ImplDevFontList* pFontList,
#else
FSSpec aFontFSSpec;
eStatus = ::FSGetCatalogInfo( &aNewRef, kFSCatInfoNone,
- NULL, NULL, &aFontFSSpec, NULL );
+ NULL, NULL, &aFontFSSpec, NULL );
if( eStatus != noErr )
return false;
@@ -1773,7 +1773,7 @@ BOOL AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygon& r
aGgoData.mpPolyPoly = &rPolyPoly;
rPolyPoly.clear();
- ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback when CWS pdffix02 is integrated
+ ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback when CWS pdffix02 is integrated
OSStatus eGgoStatus = noErr;
OSStatus eStatus = ATSUGlyphGetCubicPaths( rATSUStyle, nGlyphId,
GgoMoveToProc, GgoLineToProc, GgoCurveToProc, GgoClosePathProc,
@@ -1811,7 +1811,7 @@ long AquaSalGraphics::GetGraphicsWidth() const
BOOL AquaSalGraphics::GetGlyphBoundRect( long nGlyphId, Rectangle& rRect )
{
- ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback
+ ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback
GlyphID aGlyphId = nGlyphId;
ATSGlyphScreenMetrics aGlyphMetrics;
OSStatus eStatus = ATSUGlyphGetScreenMetrics( rATSUStyle,
@@ -1997,8 +1997,8 @@ static void FakeDirEntry( FourCharCode eFCC, ByteCount nOfs, ByteCount nLen,
rpDest[ 2] = (char)(eFCC >> 8);
rpDest[ 3] = (char)(eFCC >> 0);
// TODO: get entry checksum and write it
- // not too important since the subsetter doesn't care currently
- // for( pData+nOfs ... pData+nOfs+nLen )
+ // not too important since the subsetter doesn't care currently
+ // for( pData+nOfs ... pData+nOfs+nLen )
// write entry offset
rpDest[ 8] = (char)(nOfs >> 24);
rpDest[ 9] = (char)(nOfs >> 16);
@@ -2036,34 +2036,34 @@ static bool GetRawFontData( const ImplFontData* pFontData,
}
// get font table availability and size in bytes
- ByteCount nHeadLen = 0;
+ ByteCount nHeadLen = 0;
eStatus = ATSFontGetTable( rFont, GetTag("head"), 0, 0, NULL, &nHeadLen);
if( (eStatus != noErr) || (nHeadLen <= 0) )
return false;
- ByteCount nMaxpLen = 0;
+ ByteCount nMaxpLen = 0;
eStatus = ATSFontGetTable( rFont, GetTag("maxp"), 0, 0, NULL, &nMaxpLen);
if( (eStatus != noErr) || (nMaxpLen <= 0) )
return false;
- ByteCount nCmapLen = 0;
+ ByteCount nCmapLen = 0;
eStatus = ATSFontGetTable( rFont, GetTag("cmap"), 0, 0, NULL, &nCmapLen);
if( (eStatus != noErr) || (nCmapLen <= 0) )
return false;
- ByteCount nNameLen = 0;
+ ByteCount nNameLen = 0;
eStatus = ATSFontGetTable( rFont, GetTag("name"), 0, 0, NULL, &nNameLen);
if( (eStatus != noErr) || (nNameLen <= 0) )
return false;
- ByteCount nHheaLen = 0;
+ ByteCount nHheaLen = 0;
eStatus = ATSFontGetTable( rFont, GetTag("hhea"), 0, 0, NULL, &nHheaLen);
if( (eStatus != noErr) || (nHheaLen <= 0) )
return false;
- ByteCount nHmtxLen = 0;
+ ByteCount nHmtxLen = 0;
eStatus = ATSFontGetTable( rFont, GetTag("hmtx"), 0, 0, NULL, &nHmtxLen);
if( (eStatus != noErr) || (nHmtxLen <= 0) )
return false;
// get the glyph outline tables
- ByteCount nLocaLen = 0;
- ByteCount nGlyfLen = 0;
+ ByteCount nLocaLen = 0;
+ ByteCount nGlyfLen = 0;
if( (eStatus != noErr) || (nCffLen <= 0) )
{
eStatus = ATSFontGetTable( rFont, GetTag("loca"), 0, 0, NULL, &nLocaLen);
@@ -2075,7 +2075,7 @@ static bool GetRawFontData( const ImplFontData* pFontData,
}
ByteCount nPrepLen=0, nCvtLen=0, nFpgmLen=0;
- if( nGlyfLen ) // TODO: reduce PDF size by making hint subsetting optional
+ if( nGlyfLen ) // TODO: reduce PDF size by making hint subsetting optional
{
eStatus = ATSFontGetTable( rFont, GetTag("prep"), 0, 0, NULL, &nPrepLen);
eStatus = ATSFontGetTable( rFont, GetTag("cvt "), 0, 0, NULL, &nCvtLen);
@@ -2101,11 +2101,11 @@ static bool GetRawFontData( const ImplFontData* pFontData,
{
int nLog2 = 0;
while( (nTableCount >> nLog2) > 1 ) ++nLog2;
- rBuffer[ 1] = 1; // Win-TTF style scaler
- rBuffer[ 5] = nTableCount; // table count
- rBuffer[ 7] = nLog2*16; // searchRange
- rBuffer[ 9] = nLog2; // entrySelector
- rBuffer[11] = (nTableCount-nLog2)*16; // rangeShift
+ rBuffer[ 1] = 1; // Win-TTF style scaler
+ rBuffer[ 5] = nTableCount; // table count
+ rBuffer[ 7] = nLog2*16; // searchRange
+ rBuffer[ 9] = nLog2; // entrySelector
+ rBuffer[11] = (nTableCount-nLog2)*16; // rangeShift
}
// get font table raw data and update the fake directory entries
@@ -2213,17 +2213,17 @@ BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
::GetTTGlobalFontInfo( pSftFont, &aTTInfo );
rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF;
rInfo.m_aPSName = String( aTTInfo.psname, RTL_TEXTENCODING_UTF8 );
- rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
+ rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
Point( aTTInfo.xMax, aTTInfo.yMax ) );
- rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
- rInfo.m_nAscent = +aTTInfo.winAscent;
+ rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
+ rInfo.m_nAscent = +aTTInfo.winAscent;
rInfo.m_nDescent = -aTTInfo.winDescent;
// mac fonts usually do not have an OS2-table
// => get valid ascent/descent values from other tables
if( !rInfo.m_nAscent )
- rInfo.m_nAscent = +aTTInfo.typoAscender;
+ rInfo.m_nAscent = +aTTInfo.typoAscender;
if( !rInfo.m_nAscent )
- rInfo.m_nAscent = +aTTInfo.ascender;
+ rInfo.m_nAscent = +aTTInfo.ascender;
if( !rInfo.m_nDescent )
rInfo.m_nDescent = +aTTInfo.typoDescender;
if( !rInfo.m_nDescent )
@@ -2281,9 +2281,9 @@ BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
::GetTTSimpleGlyphMetrics( pSftFont, aShortIDs, nGlyphCount, bVertical );
if( !pGlyphMetrics )
return FALSE;
- sal_uInt16 nNotDefAdv = pGlyphMetrics[0].adv;
- pGlyphMetrics[0].adv = pGlyphMetrics[nNotDef].adv;
- pGlyphMetrics[nNotDef].adv = nNotDefAdv;
+ sal_uInt16 nNotDefAdv = pGlyphMetrics[0].adv;
+ pGlyphMetrics[0].adv = pGlyphMetrics[nNotDef].adv;
+ pGlyphMetrics[nNotDef].adv = nNotDefAdv;
for( int i = 0; i < nOrigCount; ++i )
pGlyphWidths[i] = pGlyphMetrics[i].adv;
free( pGlyphMetrics );
@@ -2372,7 +2372,7 @@ const Ucs2SIntMap* AquaSalGraphics::GetFontEncodingVector(
// -----------------------------------------------------------------------
-const void* AquaSalGraphics::GetEmbedFontData( const ImplFontData* pFontData,
+const void* AquaSalGraphics::GetEmbedFontData( const ImplFontData* pFontData,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
@@ -2386,7 +2386,7 @@ const void* AquaSalGraphics::GetEmbedFontData( const ImplFontData* pFontData,
void AquaSalGraphics::FreeEmbedFontData( const void* pData, long nDataLen )
{
// TODO: implementing this only makes sense when the implementation of
- // AquaSalGraphics::GetEmbedFontData() returns non-NULL
+ // AquaSalGraphics::GetEmbedFontData() returns non-NULL
DBG_ASSERT( (pData!=NULL), "AquaSalGraphics::FreeEmbedFontData() is not implemented\n");
}
@@ -2502,14 +2502,14 @@ void AquaSalGraphics::ApplyXorContext()
// ======================================================================
XorEmulation::XorEmulation()
-: mxTargetLayer( NULL )
-, mxTargetContext( NULL )
-, mxMaskContext( NULL )
-, mxTempContext( NULL )
-, mpMaskBuffer( NULL )
-, mpTempBuffer( NULL )
-, mnBufferLongs( 0 )
-, mbIsEnabled( false )
+: mxTargetLayer( NULL )
+, mxTargetContext( NULL )
+, mxMaskContext( NULL )
+, mxTempContext( NULL )
+, mpMaskBuffer( NULL )
+, mpTempBuffer( NULL )
+, mnBufferLongs( 0 )
+, mbIsEnabled( false )
{}
// ----------------------------------------------------------------------
diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx
index 56d40d3c7e72..6dd8317b8827 100644
--- a/vcl/aqua/source/gdi/salgdiutils.cxx
+++ b/vcl/aqua/source/gdi/salgdiutils.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ void AquaSalGraphics::SetPrinterGraphics( CGContextRef xContext, long nDPIX, lon
mbWindow = false;
mbPrinter = true;
mbVirDev = false;
-
+
mrContext = xContext;
mfFakeDPIScale = fScale;
mnRealDPIX = nDPIX;
@@ -90,7 +90,7 @@ void AquaSalGraphics::SetVirDevGraphics( CGLayerRef xLayer, CGContextRef xContex
mbVirDev = true;
// set graphics properties
- mxLayer = xLayer;
+ mxLayer = xLayer;
mrContext = xContext;
mnBitmapDepth = nBitmapDepth;
@@ -248,7 +248,7 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
// this helps with antialiased rendering
const Rectangle aVclRect(Point(static_cast<long int>(lX-1),
static_cast<long int>(lY-1) ),
- Size( static_cast<long int>(lWidth+2),
+ Size( static_cast<long int>(lWidth+2),
static_cast<long int>(lHeight+2) ) );
mpFrame->maInvalidRect.Union( aVclRect );
}
@@ -257,14 +257,14 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
CGPoint* AquaSalGraphics::makeCGptArray(ULONG nPoints, const SalPoint* pPtAry)
{
CGPoint *CGpoints = new (CGPoint[nPoints]);
- if ( CGpoints )
+ if ( CGpoints )
{
for(ULONG i=0;i<nPoints;i++)
{
- CGpoints[i].x = (float)(pPtAry[i].mnX);
- CGpoints[i].y = (float)(pPtAry[i].mnY);
+ CGpoints[i].x = (float)(pPtAry[i].mnX);
+ CGpoints[i].y = (float)(pPtAry[i].mnY);
}
- }
+ }
return CGpoints;
}
diff --git a/vcl/aqua/source/gdi/salmathutils.cxx b/vcl/aqua/source/gdi/salmathutils.cxx
index 26516902c5c1..8a5612788429 100644
--- a/vcl/aqua/source/gdi/salmathutils.cxx
+++ b/vcl/aqua/source/gdi/salmathutils.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -102,7 +102,7 @@ void ULSwap ( unsigned long &rX, unsigned long &rY )
// -----------------------------------------------------------------------
//
// This way of measuring distance is also called the "Manhattan distance."
-// Manhattan distance takes advantage of the fact that the sum of the
+// Manhattan distance takes advantage of the fact that the sum of the
// lengths of the three components of a 3D vector is a rough approxima-
// tion of the vector's length.
//
@@ -111,7 +111,7 @@ void ULSwap ( unsigned long &rX, unsigned long &rY )
unsigned long Euclidian2Norm ( const LRectCoorVector pVec )
{
unsigned long ndist = 0;
-
+
if ( pVec )
{
long nDX = 0;
@@ -120,29 +120,29 @@ unsigned long Euclidian2Norm ( const LRectCoorVector pVec )
unsigned long nMax = 0;
unsigned long nMed = 0;
unsigned long nMin = 0;
-
+
// Find |x'-x|, |y'-y|, and |z'-z| from (x,y,z) and (x',y',z')
-
+
nDX = pVec[1].x - pVec[0].x;
nDY = pVec[1].y - pVec[0].y;
nDZ = pVec[1].z - pVec[0].z;
-
+
nMax = (unsigned long)abs( nDX );
nMed = (unsigned long)abs( nDY );
nMin = (unsigned long)abs( nDZ );
-
+
// Sort them (3 compares, 0-3 swaps)
-
+
if ( nMax < nMed )
{
Swap( nMax, nMed );
} // if
-
+
if ( nMax < nMin )
{
Swap( nMax, nMin );
} // if
-
+
// Approximate Euclidian distance:
//
// d = max + (11/32)*med + (1/4)*min
@@ -150,11 +150,11 @@ unsigned long Euclidian2Norm ( const LRectCoorVector pVec )
// with +/- 8% error, where the exact formulae for d is
//
// || (x',y',z') - (x,y,z) || = { |x'-x|^2 + |y'-y|^2 + |z'-z|^2 }^(1/2)
-
- ndist = nMax + ( nMin >> 2UL )
+
+ ndist = nMax + ( nMin >> 2UL )
+ ( ( ( nMed << 3UL ) + ( nMed << 1UL ) + nMed ) >> 5UL );
} // if
-
+
return ndist;
} // RGBDistance
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 4e40bfa7077d..9d62a87dfdd5 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +51,11 @@ class AquaBlinker : public Timer
{
mpFrame->maBlinkers.push_back( this );
}
-
+
public:
-
+
static void Blink( AquaSalFrame*, const Rectangle&, int nTimeout = 80 );
-
+
virtual void Timeout()
{
Stop();
@@ -219,7 +219,7 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart,
if( GetSalData()->mbIsScrollbarDoubleMax )
rResultRect.Bottom() += 8;
else
- rResultRect.Bottom() += 4;
+ rResultRect.Bottom() += 4;
break;
case PART_TRACK_VERT_LOWER:
if( GetSalData()->mbIsScrollbarDoubleMax )
@@ -267,25 +267,25 @@ BOOL AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n
nPart == HAS_THREE_BUTTONS )
return true;
break;
-
+
case CTRL_SLIDER:
if( nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA )
return true;
break;
- case CTRL_EDITBOX:
+ case CTRL_EDITBOX:
if( nPart == PART_ENTIRE_CONTROL ||
nPart == HAS_BACKGROUND_TEXTURE )
return true;
break;
- case CTRL_MULTILINE_EDITBOX:
+ case CTRL_MULTILINE_EDITBOX:
if( nPart == PART_ENTIRE_CONTROL ||
nPart == HAS_BACKGROUND_TEXTURE )
return true;
break;
- case CTRL_SPINBOX:
+ case CTRL_SPINBOX:
if( nPart == PART_ENTIRE_CONTROL ||
nPart == PART_ALL_BUTTONS ||
nPart == HAS_BACKGROUND_TEXTURE )
@@ -420,14 +420,14 @@ BOOL AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart
kThemeStatePressedUp = 2,
kThemeStatePressedDown = 3
-#define CTRL_STATE_ENABLED 0x0001
-#define CTRL_STATE_FOCUSED 0x0002
-#define CTRL_STATE_PRESSED 0x0004
-#define CTRL_STATE_ROLLOVER 0x0008
-#define CTRL_STATE_HIDDEN 0x0010
-#define CTRL_STATE_DEFAULT 0x0020
-#define CTRL_STATE_SELECTED 0x0040
-#define CTRL_CACHING_ALLOWED 0x8000 // set when the control is completely visible (i.e. not clipped)
+#define CTRL_STATE_ENABLED 0x0001
+#define CTRL_STATE_FOCUSED 0x0002
+#define CTRL_STATE_PRESSED 0x0004
+#define CTRL_STATE_ROLLOVER 0x0008
+#define CTRL_STATE_HIDDEN 0x0010
+#define CTRL_STATE_DEFAULT 0x0020
+#define CTRL_STATE_SELECTED 0x0040
+#define CTRL_CACHING_ALLOWED 0x8000 // set when the control is completely visible (i.e. not clipped)
*/
UInt32 AquaSalGraphics::getState( ControlState nState )
{
@@ -463,9 +463,9 @@ UInt32 AquaSalGraphics::getTrackState( ControlState nState )
*
* 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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
ControlPart nPart,
@@ -584,22 +584,22 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
if( nState & CTRL_STATE_PRESSED ) {//checked, else it is not displayed (see vcl/source/window/menu.cxx)
HIThemeTextInfo aTextInfo;
aTextInfo.version = 0;
- aTextInfo.state = ((nState & CTRL_STATE_ENABLED)==0) ? kThemeStateInactive: kThemeStateActive;
+ aTextInfo.state = ((nState & CTRL_STATE_ENABLED)==0) ? kThemeStateInactive: kThemeStateActive;
aTextInfo.fontID = kThemeMenuItemMarkFont;
aTextInfo.horizontalFlushness=kHIThemeTextHorizontalFlushCenter;
aTextInfo.verticalFlushness=kHIThemeTextVerticalFlushTop;
aTextInfo.options=kHIThemeTextBoxOptionNone;
aTextInfo.truncationPosition=kHIThemeTextTruncationNone;
//aTextInfo.truncationMaxLines unused because of kHIThemeTextTruncationNone
-
+
if( nState & CTRL_STATE_SELECTED) aTextInfo.state = kThemeStatePressed; //item highlighted
-
+
UniChar mark=( nPart == PART_MENU_ITEM_CHECK_MARK ) ? kCheckUnicode: kBulletUnicode;//0x2713;
CFStringRef cfString = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, &mark, 1, kCFAllocatorNull);
- HIThemeDrawTextBox(cfString, &rc, &aTextInfo, mrContext, kHIThemeOrientationNormal);
+ HIThemeDrawTextBox(cfString, &rc, &aTextInfo, mrContext, kHIThemeOrientationNormal);
if (cfString)
CFRelease(cfString);
-
+
bOK = true;
}
}
@@ -620,7 +620,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aPushInfo.animation.time.current = 0;
PushButtonValue* pPBVal = aValue.getType() == CTRL_PUSHBUTTON ? (PushButtonValue*)&aValue : NULL;
int nPaintHeight = static_cast<int>(rc.size.height);
-
+
if( pPBVal && pPBVal->mbBevelButton )
{
aPushInfo.kind = kThemeRoundedBevelButton;
@@ -634,7 +634,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
{
aPushInfo.kind = kThemePushButtonNormal;
nPaintHeight = PB_Norm_Height;
-
+
// avoid clipping when focused
rc.origin.x += FOCUS_RING_WIDTH/2;
rc.size.width -= FOCUS_RING_WIDTH;
@@ -697,11 +697,11 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
bOK = true;
}
break;
-
+
case CTRL_LISTNODE:
{
ButtonValue aButtonValue = aValue.getTristateVal();
-
+
if( Application::GetSettings().GetLayoutRTL() && aButtonValue == BUTTONVALUE_OFF )
{
// FIXME: a value of kThemeDisclosureLeft
@@ -709,7 +709,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
// sadly this does not seem to work, so we'll draw a left
// grey equilateral triangle here ourselves.
// Perhaps some other HIThemeButtonDrawInfo setting would do the trick ?
-
+
CGContextSetShouldAntialias( mrContext, true );
float aGrey[] = { 0.45, 0.45, 0.45, 1.0 };
CGContextSetFillColor( mrContext, aGrey );
@@ -731,9 +731,9 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aInfo.kind = kThemeDisclosureTriangle;
aInfo.value = kThemeDisclosureRight;
aInfo.state = getState( nState );
-
+
aInfo.adornment = kThemeAdornmentNone;
-
+
switch( aButtonValue ) {
case BUTTONVALUE_ON: aInfo.value = kThemeDisclosureDown;//expanded
break;
@@ -749,13 +749,13 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
default:
break;
}
-
+
HIThemeDrawButton( &rc, &aInfo, mrContext, kHIThemeOrientationNormal, NULL );
}
bOK = true;
}
break;
-
+
case CTRL_PROGRESS:
case CTRL_INTROPROGRESS:
{
@@ -779,12 +779,12 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTrackInfo.enableState = kThemeTrackActive;
aTrackInfo.filler1 = 0;
aTrackInfo.trackInfo.progress.phase = static_cast<UInt8>(CFAbsoluteTimeGetCurrent()*10.0);
-
+
HIThemeDrawTrack( &aTrackInfo, NULL, mrContext, kHIThemeOrientationNormal );
bOK = true;
}
break;
-
+
case CTRL_SLIDER:
{
SliderValue* pSLVal = (SliderValue*)&aValue;
@@ -869,8 +869,8 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
}
}
break;
-
-//#define OLD_TAB_STYLE
+
+//#define OLD_TAB_STYLE
#ifdef OLD_TAB_STYLE
case CTRL_TAB_PANE:
{
@@ -879,17 +879,17 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTabPaneDrawInfo.state = kThemeStateActive;
aTabPaneDrawInfo.direction=kThemeTabNorth;
aTabPaneDrawInfo.size=kHIThemeTabSizeNormal;
-
+
//the border is outside the rect rc for Carbon
//but for VCL it should be inside
rc.origin.x+=1;
rc.size.width-=2;
-
+
HIThemeDrawTabPane(&rc, &aTabPaneDrawInfo, mrContext, kHIThemeOrientationNormal);
bOK = true;
}
break;
-
+
case CTRL_TAB_ITEM:
{
HIThemeTabDrawInfo aTabItemDrawInfo;
@@ -898,25 +898,25 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTabItemDrawInfo.direction=kThemeTabNorth;
aTabItemDrawInfo.size=kHIThemeTabSizeNormal;
aTabItemDrawInfo.adornment=kHIThemeTabAdornmentNone;
-
+
if(nState & CTRL_STATE_SELECTED) {
aTabItemDrawInfo.style=kThemeTabFront;
}
if(nState & CTRL_STATE_FOCUSED) {
aTabItemDrawInfo.adornment=kHIThemeTabAdornmentFocus;
}
-
+
/*if(rc.size.height>=TAB_HEIGHT_NORMAL) rc.size.height=TAB_HEIGHT_NORMAL;
else if(rc.size.height>=TAB_HEIGHT_SMALL) rc.size.height=TAB_HEIGHT_SMALL;
else rc.size.height=TAB_HEIGHT_MINI;*/
//now we only use the default size
rc.size.height=TAB_HEIGHT_NORMAL;
-
+
HIThemeDrawTab(&rc, &aTabItemDrawInfo, mrContext, kHIThemeOrientationNormal, &rc );
-
+
bOK=true;
}
- break;
+ break;
#else
case CTRL_TAB_PANE:
{
@@ -926,20 +926,20 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTabPaneDrawInfo.direction=kThemeTabNorth;
aTabPaneDrawInfo.size=kHIThemeTabSizeNormal;
aTabPaneDrawInfo.kind=kHIThemeTabKindNormal;
-
+
//the border is outside the rect rc for Carbon
//but for VCL it should be inside
rc.origin.x+=1;
rc.origin.y-=TAB_HEIGHT_NORMAL/2;
rc.size.height+=TAB_HEIGHT_NORMAL/2;
rc.size.width-=2;
-
+
HIThemeDrawTabPane(&rc, &aTabPaneDrawInfo, mrContext, kHIThemeOrientationNormal);
-
+
bOK = true;
}
break;
-
+
case CTRL_TAB_ITEM:
{
HIThemeTabDrawInfo aTabItemDrawInfo;
@@ -948,22 +948,22 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTabItemDrawInfo.direction=kThemeTabNorth;
aTabItemDrawInfo.size=kHIThemeTabSizeNormal;
aTabItemDrawInfo.adornment=kHIThemeTabAdornmentTrailingSeparator;
- //State
+ //State
if(nState & CTRL_STATE_SELECTED) {
aTabItemDrawInfo.style=kThemeTabFront;
}
if(nState & CTRL_STATE_FOCUSED) {
aTabItemDrawInfo.adornment|=kHIThemeTabAdornmentFocus;
}
-
+
//first, last or middle tab
aTabItemDrawInfo.position=kHIThemeTabPositionMiddle;
-
+
TabitemValue* pTabValue = (TabitemValue *) &aValue;
unsigned int nAlignment = pTabValue->mnAlignment;
//TABITEM_LEFTALIGNED (and TABITEM_RIGHTALIGNED) for the leftmost (or rightmost) tab
- //when there are several lines of tabs because there is only one first tab and one
- //last tab and TABITEM_FIRST_IN_GROUP (and TABITEM_LAST_IN_GROUP) because when the
+ //when there are several lines of tabs because there is only one first tab and one
+ //last tab and TABITEM_FIRST_IN_GROUP (and TABITEM_LAST_IN_GROUP) because when the
//line width is different from window width, there may not be TABITEM_RIGHTALIGNED
if( ( (nAlignment & TABITEM_LEFTALIGNED)&&(nAlignment & TABITEM_RIGHTALIGNED) ) ||
( (nAlignment & TABITEM_FIRST_IN_GROUP)&&(nAlignment & TABITEM_LAST_IN_GROUP) )
@@ -971,26 +971,26 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTabItemDrawInfo.position=kHIThemeTabPositionOnly;
else if((nAlignment & TABITEM_LEFTALIGNED)||(nAlignment & TABITEM_FIRST_IN_GROUP))
aTabItemDrawInfo.position=kHIThemeTabPositionFirst;
- else if((nAlignment & TABITEM_RIGHTALIGNED)||(nAlignment & TABITEM_LAST_IN_GROUP))
+ else if((nAlignment & TABITEM_RIGHTALIGNED)||(nAlignment & TABITEM_LAST_IN_GROUP))
aTabItemDrawInfo.position=kHIThemeTabPositionLast;
-
+
//support for RTL
//see issue 79748
if( Application::GetSettings().GetLayoutRTL() ) {
- if( aTabItemDrawInfo.position == kHIThemeTabPositionFirst )
+ if( aTabItemDrawInfo.position == kHIThemeTabPositionFirst )
aTabItemDrawInfo.position = kHIThemeTabPositionLast;
- else if( aTabItemDrawInfo.position == kHIThemeTabPositionLast )
+ else if( aTabItemDrawInfo.position == kHIThemeTabPositionLast )
aTabItemDrawInfo.position = kHIThemeTabPositionFirst;
}
-
+
rc.size.width+=2;//because VCL has 2 empty pixels between 2 tabs
rc.origin.x-=1;
-
+
HIThemeDrawTab(&rc, &aTabItemDrawInfo, mrContext, kHIThemeOrientationNormal, &rc );
-
+
bOK=true;
}
- break;
+ break;
#endif
case CTRL_LISTBOX:
@@ -1008,7 +1008,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aListInfo.adornment = kThemeAdornmentDefault;
if( (nState & CTRL_STATE_FOCUSED) != 0 )
aListInfo.adornment |= kThemeAdornmentFocus;
-
+
HIThemeDrawButton(&rc, &aListInfo, mrContext, kHIThemeOrientationNormal,&rc);
bOK = true;
break;
@@ -1020,19 +1020,19 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTextDrawInfo.kind=kHIThemeFrameTextFieldSquare;
aTextDrawInfo.state=getState( nState );
aTextDrawInfo.isFocused=false;
-
+
rc.size.width+=1;//else there's a white space because aqua theme hasn't a 3D border
rc.size.height+=1;
HIThemeDrawFrame(&rc, &aTextDrawInfo, mrContext, kHIThemeOrientationNormal);
-
+
if(nState & CTRL_STATE_FOCUSED) HIThemeDrawFocusRect(&rc, true, mrContext, kHIThemeOrientationNormal);
-
+
bOK=true;
break;
}
}
break;
-
+
case CTRL_EDITBOX:
case CTRL_MULTILINE_EDITBOX:
{
@@ -1041,11 +1041,11 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTextDrawInfo.kind=kHIThemeFrameTextFieldSquare;
aTextDrawInfo.state=getState( nState );
aTextDrawInfo.isFocused=false;
-
+
rc.size.width += 1; // else there may be a white space because aqua theme hasn't a 3D border
// change rc so that the frame will encompass only the content region
// see counterpart in GetNativeControlRegion
- rc.size.width += 2;
+ rc.size.width += 2;
rc.size.height += 2;
//CGContextSetFillColorWithColor
@@ -1053,13 +1053,13 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
//fill a white background, because drawFrame only draws the border
HIThemeDrawFrame(&rc, &aTextDrawInfo, mrContext, kHIThemeOrientationNormal);
-
+
if(nState & CTRL_STATE_FOCUSED) HIThemeDrawFocusRect(&rc, true, mrContext, kHIThemeOrientationNormal);
-
+
bOK=true;
}
break;
-
+
case CTRL_SPINBOX:
{
if(nPart == PART_ENTIRE_CONTROL)
@@ -1070,7 +1070,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aTextDrawInfo.kind=kHIThemeFrameTextFieldSquare;
aTextDrawInfo.state=getState( nState );
aTextDrawInfo.isFocused=false;
-
+
//rc.size.width contains the full size of the spinbox ie textfield + button
//so we remove the button width and the space between the button and the textfield
rc.size.width -= SPIN_BUTTON_SPACE + SPIN_BUTTON_WIDTH + 2*FOCUS_RING_WIDTH;
@@ -1082,9 +1082,9 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
//fill a white background, because drawFrame only draws the border
HIThemeDrawFrame(&rc, &aTextDrawInfo, mrContext, kHIThemeOrientationNormal);
-
+
if(nState & CTRL_STATE_FOCUSED) HIThemeDrawFocusRect(&rc, true, mrContext, kHIThemeOrientationNormal);
-
+
//buttons:
SpinbuttonValue* pSpinButtonVal = (SpinbuttonValue *)&aValue;
ControlState nUpperState = CTRL_STATE_ENABLED;//state of the upper button
@@ -1107,17 +1107,17 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
aSpinInfo.state = kThemeStateInactive;
else if((nUpperState & CTRL_STATE_ROLLOVER)||(nLowerState & CTRL_STATE_ROLLOVER))
aSpinInfo.state = kThemeStateRollover;
-
+
Rectangle aSpinRect( pSpinButtonVal->maUpperRect );
aSpinRect.Union( pSpinButtonVal->maLowerRect );
HIRect buttonRc = ImplGetHIRectFromRectangle(aSpinRect);
-
+
// FIXME: without this fuzz factor there is some unwanted clipping
if( Application::GetSettings().GetLayoutRTL() )
buttonRc.origin.x -= FOCUS_RING_WIDTH - CLIP_FUZZ;
else
buttonRc.origin.x += FOCUS_RING_WIDTH + CLIP_FUZZ;
-
+
switch( aValue.getTristateVal() )
{
case BUTTONVALUE_ON: aSpinInfo.value = kThemeButtonOn;
@@ -1125,27 +1125,27 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
case BUTTONVALUE_OFF: aSpinInfo.value = kThemeButtonOff;
break;
case BUTTONVALUE_MIXED:
- case BUTTONVALUE_DONTKNOW:
+ case BUTTONVALUE_DONTKNOW:
default: aSpinInfo.value = kThemeButtonMixed;
break;
}
-
+
aSpinInfo.adornment = ( ((nUpperState & CTRL_STATE_DEFAULT) != 0 ) ||
((nLowerState & CTRL_STATE_DEFAULT) != 0 )) ?
- kThemeAdornmentDefault :
+ kThemeAdornmentDefault :
kThemeAdornmentNone;
if( ((nUpperState & CTRL_STATE_FOCUSED) != 0 ) || ((nLowerState & CTRL_STATE_FOCUSED) != 0 ))
aSpinInfo.adornment |= kThemeAdornmentFocus;
-
+
HIThemeDrawButton( &buttonRc, &aSpinInfo, mrContext, kHIThemeOrientationNormal, NULL );
}
-
+
bOK=true;
}
-
+
}
break;
-
+
case CTRL_FRAME:
{
USHORT nStyle = aValue.getNumericVal();
@@ -1159,38 +1159,38 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
{
CGMutablePathRef rPath = CGPathCreateMutable();
CGPathAddRect( rPath, NULL, CGRectMake( 0, 0, mpFrame->maGeometry.nWidth-1, mpFrame->maGeometry.nHeight-1 ) );
-
+
CGContextBeginPath( mrContext );
CGContextAddPath( mrContext, rPath );
- CGContextClip( mrContext );
+ CGContextClip( mrContext );
CGPathRelease( rPath );
}
-
+
HIThemeFrameDrawInfo aTextDrawInfo;
aTextDrawInfo.version=0;
aTextDrawInfo.kind=kHIThemeFrameListBox;
aTextDrawInfo.state=kThemeStateActive;
aTextDrawInfo.isFocused=false;
-
+
HIThemeDrawFrame(&rc, &aTextDrawInfo, mrContext, kHIThemeOrientationNormal);
-
+
bOK=true;
}
}
}
break;
-
+
case CTRL_LISTNET:
{
//do nothing as there isn't net for listviews on macos
bOK=true;
}
break;
-
+
}
CGContextRestoreGState( mrContext );
-
+
/* #i90291# in most cases invalidating the whole control region instead
of just the unclipped part of it is sufficient (and probably faster).
However for the window background we should not unnecessarily enlarge
@@ -1206,10 +1206,10 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
if( aRect.size.width != 0 && aRect.size.height != 0 )
buttonRect.Intersection( Rectangle( Point( static_cast<long int>(aRect.origin.x),
static_cast<long int>(aRect.origin.y) ),
- Size( static_cast<long int>(aRect.size.width),
+ Size( static_cast<long int>(aRect.size.width),
static_cast<long int>(aRect.size.height) ) ) );
}
-
+
RefreshRect( buttonRect.Left(), buttonRect.Top(), buttonRect.GetWidth(), buttonRect.GetHeight() );
return bOK;
@@ -1221,9 +1221,9 @@ BOOL AquaSalGraphics::drawNativeControl(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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
BOOL AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
@@ -1242,9 +1242,9 @@ BOOL AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPar
* 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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
@@ -1257,7 +1257,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
short x = aCtrlBoundRect.Left();
short y = aCtrlBoundRect.Top();
short w, h;
-
+
sal_uInt8 nBorderCleanup = 0;
switch (nType)
@@ -1280,7 +1280,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
}
}
break;
-
+
case CTRL_SCROLLBAR:
{
Rectangle aRect;
@@ -1306,16 +1306,16 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
// checkbox and radio borders need cleanup after unchecking them
nBorderCleanup = 4;
-
+
// TEXT_SEPARATOR to respect Aqua HIG
w = BUTTON_WIDTH + TEXT_SEPARATOR;
h = BUTTON_HEIGHT;
-
+
}
-
+
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
-
+
toReturn = TRUE;
}
break;
@@ -1331,7 +1331,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
toReturn = TRUE;
}
break;
-
+
case CTRL_INTROPROGRESS:
{
Rectangle aRect( aCtrlBoundRect );
@@ -1341,11 +1341,11 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
toReturn = TRUE;
}
break;
-
+
case CTRL_TAB_ITEM:
-
+
w = aCtrlBoundRect.GetWidth() + 2*TAB_TEXT_OFFSET - 2*VCL_TAB_TEXT_OFFSET;
-
+
#ifdef OLD_TAB_STYLE
h = TAB_HEIGHT_NORMAL;
#else
@@ -1355,9 +1355,9 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = TRUE;
-
+
break;
-
+
case CTRL_EDITBOX:
{
w = aCtrlBoundRect.GetWidth();
@@ -1369,7 +1369,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
-
+
toReturn = TRUE;
}
break;
@@ -1380,10 +1380,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
w = aCtrlBoundRect.GetWidth();
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
-
+
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
-
+
toReturn = TRUE;
}
else if( nPart == PART_BUTTON_DOWN )
@@ -1392,14 +1392,14 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
-
+
x += w-DROPDOWN_BUTTON_WIDTH - FOCUS_RING_WIDTH;
y += FOCUS_RING_WIDTH;
w = DROPDOWN_BUTTON_WIDTH;
-
+
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) );
-
+
toReturn = true;
}
else if( nPart == PART_SUB_EDIT )
@@ -1415,10 +1415,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
if( nType == CTRL_LISTBOX )
w -= 9; // HIG specifies 9 units distance between dropdown button area and content
h -= 4; // don't draw into lower border
-
+
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) );
-
+
toReturn = true;
}
}
@@ -1429,10 +1429,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
if( w < 3+2*FOCUS_RING_WIDTH+SPIN_BUTTON_SPACE+SPIN_BUTTON_WIDTH )
w = 3+2*FOCUS_RING_WIDTH+SPIN_BUTTON_SPACE+SPIN_BUTTON_WIDTH;
h = TEXT_EDIT_HEIGHT_NORMAL;
-
+
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
-
+
toReturn = TRUE;
}
else if( nPart == PART_SUB_EDIT ) {
@@ -1442,10 +1442,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
y += 2; // don't draw into upper border
w -= 8; // offset for left and right rounded border
h -= 4; // don't draw into upper or ower border
-
+
rNativeContentRegion = Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
-
+
toReturn = TRUE;
}
else if( nPart == PART_BUTTON_UP ) {
@@ -1456,10 +1456,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
y += FOCUS_RING_WIDTH - CLIP_FUZZ;
w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ;
h = SPIN_UPPER_BUTTON_HEIGHT + 2*CLIP_FUZZ;
-
+
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
-
+
toReturn = TRUE;
}
else if( nPart == PART_BUTTON_DOWN ) {
@@ -1467,10 +1467,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
y += SPIN_UPPER_BUTTON_HEIGHT + FOCUS_RING_WIDTH - CLIP_FUZZ;
w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ;
h = SPIN_LOWER_BUTTON_HEIGHT + 2*CLIP_FUZZ;
-
+
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
-
+
toReturn = TRUE;
}
break;
@@ -1483,38 +1483,38 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
Rectangle aRect(aCtrlBoundRect);
if( nStyle & FRAME_DRAW_DOUBLEIN )
{
- aRect.Left() += 1;
- aRect.Top() += 1;
- //rRect.Right() -= 1;
- //rRect.Bottom() -= 1;
+ aRect.Left() += 1;
+ aRect.Top() += 1;
+ //rRect.Right() -= 1;
+ //rRect.Bottom() -= 1;
}
else
{
- aRect.Left() += 1;
- aRect.Top() += 1;
- aRect.Right() -= 1;
- aRect.Bottom() -= 1;
+ aRect.Left() += 1;
+ aRect.Top() += 1;
+ aRect.Right() -= 1;
+ aRect.Bottom() -= 1;
}
rNativeContentRegion = aRect;
rNativeBoundingRegion = aRect;
-
+
toReturn = TRUE;
}
}
break;
-
+
case CTRL_MENUBAR:
case CTRL_MENU_POPUP:
{
if(( nPart == PART_MENU_ITEM_CHECK_MARK )||( nPart == PART_MENU_ITEM_RADIO_MARK )) {
-
+
w=10;
h=10;//dimensions of the mark (10px font)
-
+
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
-
+
toReturn = TRUE;
}
}
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 28d554ba9054..686fdb2cba3b 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
NSString* pStr = CreateNSString( i_rQueue.maPrinterName );
mpPrinter = [NSPrinter printerWithName: pStr];
[pStr release];
-
+
NSPrintInfo* pShared = [NSPrintInfo sharedPrintInfo];
if( pShared )
{
@@ -83,13 +83,13 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
[mpPrintInfo setOrientation: NSPortraitOrientation];
}
-
+
mpGraphics = new AquaSalGraphics();
-
+
const int nWidth = 100, nHeight = 100;
maContextMemory.reset( reinterpret_cast<sal_uInt8*>( rtl_allocateMemory( nWidth * 4 * nHeight ) ),
boost::bind( rtl_freeMemory, _1 ) );
-
+
if( maContextMemory )
{
mrContext = CGBitmapContextCreate( maContextMemory.get(), nWidth, nHeight, 8, nWidth * 4, GetSalData()->mxRGBSpace, kCGImageAlphaNoneSkipFirst );
@@ -120,7 +120,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
// FIXME: get printer resolution
long nDPIX = 720, nDPIY = 720;
NSSize aPaperSize = [mpPrintInfo paperSize];
-
+
NSRect aImageRect = [mpPrintInfo imageablePageBounds];
if( mePageOrientation == ORIENTATION_PORTRAIT )
{
@@ -228,7 +228,7 @@ static Paper recognizePaper( double i_fWidth, double i_fHeight )
aPaper = PAPER_USER;
break;
}
-
+
if( aPaper == PAPER_USER )
{
// search with fuzz factor
@@ -243,7 +243,7 @@ static Paper recognizePaper( double i_fWidth, double i_fHeight )
}
}
}
-
+
return aPaper;
}
@@ -253,9 +253,9 @@ BOOL AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
if( io_pSetupData && io_pSetupData->mpDriverData )
return SetData( ~0, io_pSetupData );
-
+
BOOL bSuccess = TRUE;
-
+
// set system type
io_pSetupData->mnSystem = JOBSETUP_SYSTEM_MAC;
@@ -277,17 +277,17 @@ BOOL AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
io_pSetupData->mnPaperHeight = 0;
}
- // set orientation
+ // set orientation
io_pSetupData->meOrientation = mePageOrientation;
-
+
io_pSetupData->mnPaperBin = 0;
io_pSetupData->mpDriverData = reinterpret_cast<BYTE*>(rtl_allocateMemory( 4 ));
io_pSetupData->mnDriverDataLen = 4;
}
else
bSuccess = FALSE;
-
-
+
+
return bSuccess;
}
@@ -295,10 +295,10 @@ BOOL AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
void AquaSalInfoPrinter::setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation )
{
-
+
Orientation ePaperOrientation = ORIENTATION_PORTRAIT;
const PaperInfo* pPaper = matchPaper( i_nWidth, i_nHeight, ePaperOrientation );
-
+
if( pPaper )
{
NSString* pPaperName = [CreateNSString( rtl::OStringToOUString(PaperInfo::toPSName(pPaper->getPaper()), RTL_TEXTENCODING_ASCII_US) ) autorelease];
@@ -320,7 +320,7 @@ BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
if( ! io_pSetupData || io_pSetupData->mnSystem != JOBSETUP_SYSTEM_MAC )
return FALSE;
-
+
if( mpPrintInfo )
{
if( (i_nFlags & SAL_JOBSET_ORIENTATION) != 0 )
@@ -346,11 +346,11 @@ BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
width = static_cast<long>(PtTo10Mu( w ));
height = static_cast<long>(PtTo10Mu( h ));
}
-
+
setPaperSize( width, height, mePageOrientation );
- }
+ }
}
-
+
return mpPrintInfo != nil;
}
@@ -484,7 +484,7 @@ void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
o_rPageOffY = static_cast<long>( (aPaperSize.height - aImageRect.size.height - aImageRect.origin.y) * fYScaling );
o_rOutWidth = static_cast<long>( aImageRect.size.width * fXScaling );
o_rOutHeight = static_cast<long>( aImageRect.size.height * fYScaling );
-
+
if( mePageOrientation == ORIENTATION_LANDSCAPE )
{
std::swap( o_rOutWidth, o_rOutHeight );
@@ -521,20 +521,20 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
{
if( mbJob )
return FALSE;
-
+
BOOL bSuccess = FALSE;
bool bWasAborted = false;
AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
PrintAccessoryViewState aAccViewState;
sal_Int32 nAllPages = 0;
-
+
// reset IsLastPage
i_rController.setLastPage( sal_False );
// update job data
if( i_pSetupData )
SetData( ~0, i_pSetupData );
-
+
// do we want a progress panel ?
sal_Bool bShowProgressPanel = sal_True;
beans::PropertyValue* pMonitor = i_rController.getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MonitorVisible" ) ) );
@@ -575,21 +575,21 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
mnCurPageRangeCount = 0;
nAllPages = i_rController.getFilteredPageCount();
}
-
+
aAccViewState.bNeedRestart = false;
-
+
Size aCurSize( 21000, 29700 );
if( nAllPages > 0 )
{
mnCurPageRangeCount = 1;
aCurSize = getPageSize( i_rController, mnCurPageRangeStart );
Size aNextSize( aCurSize );
-
+
// print pages up to a different size
while( mnCurPageRangeCount + mnCurPageRangeStart < nAllPages )
{
aNextSize = getPageSize( i_rController, mnCurPageRangeStart + mnCurPageRangeCount );
- if( aCurSize == aNextSize // same page size
+ if( aCurSize == aNextSize // same page size
||
(aCurSize.Width() == aNextSize.Height() && aCurSize.Height() == aNextSize.Width()) // same size, but different orientation
)
@@ -602,7 +602,7 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
}
else
mnCurPageRangeCount = 0;
-
+
// now for the current run
mnStartPageOffsetX = mnStartPageOffsetY = 0;
// setup the paper size and orientation
@@ -614,12 +614,12 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
boost::shared_ptr<Printer> pPrinter( i_rController.getPrinter() );
pPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
pPrinter->SetPaperSizeUser( aCurSize, true );
-
+
// create view
NSView* pPrintView = [[AquaPrintView alloc] initWithController: &i_rController withInfoPrinter: this];
-
+
NSMutableDictionary* pPrintDict = [mpPrintInfo dictionary];
-
+
// set filename
if( i_pFileName )
{
@@ -628,7 +628,7 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
[pPrintDict setObject: pPath forKey: NSPrintSavePath];
[pPath release];
}
-
+
[pPrintDict setObject: [[NSNumber numberWithInt: nCopies] autorelease] forKey: NSPrintCopies];
if( nCopies > 1 )
[pPrintDict setObject: [[NSNumber numberWithBool: pPrinter->IsCollateCopy()] autorelease] forKey: NSPrintMustCollate];
@@ -638,25 +638,25 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
// leads do a double free malloc error. Why this value should behave differently from all the others
// is a mystery.
[pPrintDict setObject: [NSNumber numberWithInt: mnCurPageRangeCount] forKey: NSPrintLastPage];
-
-
+
+
// create print operation
NSPrintOperation* pPrintOperation = [NSPrintOperation printOperationWithView: pPrintView printInfo: mpPrintInfo];
-
+
if( pPrintOperation )
{
NSObject* pReleaseAfterUse = nil;
bool bShowPanel = (! i_rController.isDirectPrint() && getUseNativeDialog() && i_rController.isShowDialogs() );
[pPrintOperation setShowsPrintPanel: bShowPanel ? YES : NO ];
[pPrintOperation setShowsProgressPanel: bShowProgressPanel ? YES : NO];
-
+
// set job title (since MacOSX 10.5)
if( [pPrintOperation respondsToSelector: @selector(setJobTitle:)] )
[pPrintOperation performSelector: @selector(setJobTitle:) withObject: [CreateNSString( i_rJobName ) autorelease]];
-
+
if( bShowPanel && mnCurPageRangeStart == 0 && nCurJob == 0) // only the first range of pages (in the first job) gets the accesory view
pReleaseAfterUse = [AquaPrintAccessoryView setupPrinterPanel: pPrintOperation withController: &i_rController withState: &aAccViewState];
-
+
bSuccess = TRUE;
mbJob = true;
pInst->startedPrintJob();
@@ -667,12 +667,12 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
if( pReleaseAfterUse )
[pReleaseAfterUse release];
}
-
+
mnCurPageRangeStart += mnCurPageRangeCount;
mnCurPageRangeCount = 1;
} while( aAccViewState.bNeedRestart || mnCurPageRangeStart + mnCurPageRangeCount < nAllPages );
}
-
+
// inform application that it can release its data
// this is awkward, but the XRenderable interface has no method for this,
// so we need to call XRenderadble::render one last time with IsLastPage = TRUE
@@ -681,11 +681,11 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
if( mrContext )
SetupPrinterGraphics( mrContext );
i_rController.getFilteredPageFile( 0, aPageFile );
-
+
i_rController.setJobState( bWasAborted
? view::PrintableState_JOB_ABORTED
: view::PrintableState_JOB_SPOOLED );
-
+
mnCurPageRangeStart = mnCurPageRangeCount = 0;
return bSuccess;
@@ -705,7 +705,7 @@ BOOL AquaSalInfoPrinter::EndJob()
BOOL AquaSalInfoPrinter::AbortJob()
{
mbJob = false;
-
+
// FIXME: implementation
return FALSE;
}
@@ -716,11 +716,11 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, BOOL i_b
{
if( i_bNewJobData && i_pSetupData )
SetPrinterData( i_pSetupData );
-
+
CGContextRef rContext = reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
-
+
SetupPrinterGraphics( rContext );
-
+
return mpGraphics;
}
@@ -816,7 +816,7 @@ void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* i_pSetupData )
{
m_aPaperFormats.clear();
m_bPapersInit = true;
-
+
if( mpPrinter )
{
if( [mpPrinter statusForTable: @"PPD"] == NSPrinterTableOK )
@@ -845,7 +845,7 @@ const PaperInfo* AquaSalInfoPrinter::matchPaper( long i_nWidth, long i_nHeight,
{
if( ! m_bPapersInit )
const_cast<AquaSalInfoPrinter*>(this)->InitPaperFormats( NULL );
-
+
const PaperInfo* pMatch = NULL;
o_rOrientation = ORIENTATION_PORTRAIT;
for( int n = 0; n < 2 ; n++ )
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index de09867e4071..d67aea8d3657 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ SalVirtualDevice* AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
{
// #i92075# can be called first in a thread
SalData::ensureThreadAutoreleasePool();
-
+
return new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), nDX, nDY, nBitCount, pData );
}
@@ -58,10 +58,10 @@ void AquaSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
// =======================================================================
AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData )
-: mbGraphicsUsed( false )
-, mxBitmapContext( NULL )
-, mnBitmapDepth( 0 )
-, mxLayer( NULL )
+: mbGraphicsUsed( false )
+, mxBitmapContext( NULL )
+, mnBitmapDepth( 0 )
+, mxLayer( NULL )
{
if( pGraphic && pData && pData->rCGContext )
{
@@ -91,7 +91,7 @@ AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX,
if( nDX && nDY )
SetSize( nDX, nDY );
-
+
// NOTE: if SetSize does not succeed, we just ignore the nDX and nDY
}
}
@@ -203,9 +203,9 @@ BOOL AquaSalVirtualDevice::SetSize( long nDX, long nDY )
xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]);
}
}
-
+
DBG_ASSERT( xCGContext, "no context" );
-
+
const CGSize aNewSize = { nDX, nDY };
mxLayer = CGLayerCreateWithContext( xCGContext, aNewSize, NULL );
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index e280a583b3d5..745152fd2e28 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -2,7 +2,7 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -93,7 +93,7 @@ AquaSalFrame::AquaSalFrame( SalFrame* pParent, ULONG salFrameStyle ) :
maSysData.nSize = sizeof( SystemEnvData );
mpParent = dynamic_cast<AquaSalFrame*>(pParent);
-
+
initWindowAndView();
SalData* pSalData = GetSalData();
@@ -112,20 +112,20 @@ AquaSalFrame::~AquaSalFrame()
// cleanup clipping stuff
ResetClipRegion();
-
+
[SalFrameView unsetMouseFrame: this];
-
+
SalData* pSalData = GetSalData();
pSalData->maFrames.remove( this );
pSalData->maFrameCheck.erase( this );
-
+
DBG_ASSERT( this != s_pCaptureFrame, "capture frame destroyed" );
if( this == s_pCaptureFrame )
s_pCaptureFrame = NULL;
if ( mpGraphics )
delete mpGraphics;
-
+
if( mpDockMenuEntry )
// life cycle comment: the menu has ownership of the item, so no release
[AquaSalInstance::GetDynamicDockMenu() removeItem: mpDockMenuEntry];
@@ -151,12 +151,12 @@ void AquaSalFrame::initWindowAndView()
// calculate some default geometry
NSRect aVisibleRect = [pScreen visibleFrame];
CocoaToVCL( aVisibleRect );
-
+
maGeometry.nX = static_cast<int>(aVisibleRect.origin.x + aVisibleRect.size.width / 10);
maGeometry.nY = static_cast<int>(aVisibleRect.origin.y + aVisibleRect.size.height / 10);
maGeometry.nWidth = static_cast<unsigned int>(aVisibleRect.size.width * 0.8);
maGeometry.nHeight = static_cast<unsigned int>(aVisibleRect.size.height * 0.8);
-
+
// calculate style mask
if( (mnStyle & SAL_FRAME_STYLE_FLOAT) ||
(mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
@@ -191,7 +191,7 @@ void AquaSalFrame::initWindowAndView()
if( mnStyleMask != 0 )
mnStyleMask |= NSTitledWindowMask;
}
-
+
mpWindow = [[SalFrameWindow alloc] initWithSalFrame: this];
mpView = [[SalFrameView alloc] initWithSalFrame: this];
if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) )
@@ -200,14 +200,14 @@ void AquaSalFrame::initWindowAndView()
[mpWindow setAcceptsMouseMovedEvents: YES];
[mpWindow setHasShadow: YES];
[mpWindow setDelegate: mpWindow];
-
+
NSRect aRect = { { 0,0 }, { maGeometry.nWidth, maGeometry.nHeight } };
mnTrackingRectTag = [mpView addTrackingRect: aRect owner: mpView userData: nil assumeInside: NO];
-
+
maSysData.pView = mpView;
-
+
UpdateFrameGeometry();
-
+
// setContentView causes a display; in multithreaded use this can deadlock
//YieldMutexReleaser aRel;
[mpWindow setContentView: mpView];
@@ -252,7 +252,7 @@ void AquaSalFrame::VCLToCocoa( NSPoint& io_rPoint, bool bRelativeToScreen )
void AquaSalFrame::screenParametersChanged()
{
UpdateFrameGeometry();
-
+
if( mpGraphics )
mpGraphics->updateResolution();
CallCallback( SALEVENT_DISPLAYCHANGED, 0 );
@@ -296,7 +296,7 @@ void AquaSalFrame::SetTitle(const XubString& rTitle)
{
NSString* pTitle = CreateNSString( rTitle );
[mpWindow setTitle: pTitle];
-
+
// create an entry in the dock menu
const ULONG nAppWindowStyle = (SAL_FRAME_STYLE_CLOSEABLE | SAL_FRAME_STYLE_MOVEABLE);
if( mpParent == NULL &&
@@ -310,14 +310,14 @@ void AquaSalFrame::SetTitle(const XubString& rTitle)
keyEquivalent: @""
atIndex: 0];
[mpDockMenuEntry setTarget: mpWindow];
-
+
// TODO: image (either the generic window image or an icon
// check mark (for "main" window ?)
}
else
[mpDockMenuEntry setTitle: pTitle];
}
-
+
if (pTitle)
[pTitle release];
}
@@ -379,7 +379,7 @@ void AquaSalFrame::initShow()
SetPosSize( nNewX, nNewY, 0, 0, SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y );
}
}
-
+
// make sure the view is present in the wrapper list before any children receive focus
[AquaA11yFactory registerView: mpView];
}
@@ -394,7 +394,7 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect )
aPaintEvt.mnBoundWidth = pRect->GetWidth();
aPaintEvt.mnBoundHeight = pRect->GetHeight();
}
-
+
CallCallback(SALEVENT_PAINT, &aPaintEvt);
}
@@ -407,23 +407,23 @@ void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
{
if( mbInitShow )
initShow();
-
+
CallCallback(SALEVENT_RESIZE, 0);
// trigger filling our backbuffer
SendPaintEvent();
-
+
//YieldMutexReleaser aRel;
if( bNoActivate || [mpWindow canBecomeKeyWindow] == NO )
[mpWindow orderFront: NSApp];
else
[mpWindow makeKeyAndOrderFront: NSApp];
-
+
if( mpParent )
{
/* #i92674# #i96433# we do not want an invisible parent to show up (which adding a visible
child implicitly does). However we also do not want a parentless toolbar.
-
+
HACK: try to decide when we should not insert a child to its parent
floaters and ownerdraw windows have not yet shown up in cases where
we don't want the parent to become visible
@@ -433,7 +433,7 @@ void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
[mpParent->mpWindow addChildWindow: mpWindow ordered: NSWindowAbove];
}
}
-
+
if( mbPresentation )
[mpWindow makeMainWindow];
}
@@ -450,11 +450,11 @@ void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
// if a child gets hidden for a parent window
if( mpParent && mpParent->mbShown && [mpWindow isKeyWindow] )
[mpParent->mpWindow makeKeyAndOrderFront: NSApp];
-
+
[SalFrameView unsetMouseFrame: this];
if( mpParent && [mpWindow parentWindow] == mpParent->mpWindow )
[mpParent->mpWindow removeChildWindow: mpWindow];
-
+
[mpWindow orderOut: NSApp];
}
}
@@ -520,7 +520,7 @@ void AquaSalFrame::SetClientSize( long nWidth, long nHeight )
if( mpWindow )
{
NSSize aSize = { nWidth, nHeight };
-
+
[mpWindow setContentSize: aSize];
UpdateFrameGeometry();
if( mbShown )
@@ -563,7 +563,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
aStateRect.size.height = float(pState->mnHeight);
VCLToCocoa( aStateRect );
aStateRect = [NSWindow frameRectForContentRect: aStateRect styleMask: mnStyleMask];
-
+
// relase and acquire mutex again since this call can block waiting for an internal lock
{
//YieldMutexReleaser aRel;
@@ -571,10 +571,10 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
}
// FIXME: HTH maximized state ?
-
+
// get new geometry
UpdateFrameGeometry();
-
+
USHORT nEvent = 0;
if( pState->mnMask & (SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_X) )
{
@@ -598,7 +598,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
// tell the system the views need to be updated
//YieldMutexReleaser aRel;
-
+
[mpWindow display];
}
}
@@ -620,9 +620,9 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
pState->mnY = long(aStateRect.origin.y);
pState->mnWidth = long(aStateRect.size.width);
pState->mnHeight = long(aStateRect.size.height);
-
+
// FIXME: HTH maximized state ?
-
+
if( [mpWindow isMiniaturized] )
pState->mnState = SAL_FRAMESTATE_MINIMIZED;
else if( ! [mpWindow isZoomed] )
@@ -645,7 +645,7 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
// get new screen frame
pScreen = [pScreens objectAtIndex: nScreen];
NSRect aNewScreen = [pScreen frame];
-
+
// get current screen frame
pScreen = [mpWindow screen];
if( pScreen )
@@ -674,14 +674,14 @@ void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
{
if( mbFullScreen == bFullScreen )
return;
-
+
mbFullScreen = bFullScreen;
if( bFullScreen )
{
// hide the dock and the menubar if we are on the menu screen
// which is always on index 0 according to documentation
bool bHideMenu = (nDisplay == 0);
-
+
NSRect aNewContentRect = { { 0, 0 }, { 0, 0 } };
// get correct screen
NSScreen* pScreen = nil;
@@ -721,7 +721,7 @@ void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
pScreen = [mpWindow screen];
if( pScreen == nil )
pScreen = [NSScreen mainScreen];
-
+
aNewContentRect = [pScreen frame];
}
@@ -768,11 +768,11 @@ public:
SetTimeout( 30000 );
Start();
}
-
+
virtual ~PreventSleepTimer()
{
}
-
+
virtual void Timeout()
{
UpdateSystemActivity(OverallAct);
@@ -843,12 +843,12 @@ NSCursor* AquaSalFrame::getCurrentCursor() const
case POINTER_WINDOW_WSIZE:
pCursor = [NSCursor resizeLeftRightCursor]; break;
case POINTER_REFHAND: pCursor = [NSCursor pointingHandCursor]; break;
-
+
default:
pCursor = GetSalData()->getCursor( mePointerStyle );
if( pCursor == nil )
{
- DBG_ERROR( "unmapped cursor" );
+ DBG_ERROR( "unmapped cursor" );
pCursor = [NSCursor arrowCursor];
}
break;
@@ -861,7 +861,7 @@ void AquaSalFrame::SetPointer( PointerStyle ePointerStyle )
if( ePointerStyle >= POINTER_COUNT || ePointerStyle == mePointerStyle )
return;
mePointerStyle = ePointerStyle;
-
+
[mpWindow invalidateCursorRectsForView: mpView];
}
@@ -870,7 +870,7 @@ void AquaSalFrame::SetPointer( PointerStyle ePointerStyle )
void AquaSalFrame::SetPointerPos( long nX, long nY )
{
// FIXME: use Cocoa functions
-
+
// FIXME: multiscreen support
CGPoint aPoint = { nX + maGeometry.nX, nY + maGeometry.nY };
CGDirectDisplayID mainDisplayID = CGMainDisplayID();
@@ -922,7 +922,7 @@ void AquaSalFrame::Sync()
if( mbGraphics && mpGraphics && mpView && mbShown )
{
//YieldMutexReleaser aRel;
-
+
[mpView setNeedsDisplay: YES];
[mpView display];
}
@@ -937,7 +937,7 @@ void AquaSalFrame::SetInputContext( SalInputContext* pContext )
mnICOptions = 0;
return;
}
-
+
mnICOptions = pContext->mnOptions;
if(!(pContext->mnOptions & SAL_INPUTCONTEXT_TEXT))
@@ -969,7 +969,7 @@ XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
aKey.append( sal_Int32( i - KEY_F1 + 1 ) );
aKeyMap[ i ] = aKey.makeStringAndClear();
}
-
+
aKeyMap[ KEY_DOWN ] = rtl::OUString( sal_Unicode( 0x21e3 ) );
aKeyMap[ KEY_UP ] = rtl::OUString( sal_Unicode( 0x21e1 ) );
aKeyMap[ KEY_LEFT ] = rtl::OUString( sal_Unicode( 0x21e0 ) );
@@ -991,7 +991,7 @@ XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
aKeyMap[ KEY_POINT ] = rtl::OUString( sal_Unicode( '.' ) );
aKeyMap[ KEY_COMMA ] = rtl::OUString( sal_Unicode( ',' ) );
aKeyMap[ KEY_LESS ] = rtl::OUString( sal_Unicode( '<' ) );
- aKeyMap[ KEY_GREATER ] = rtl::OUString( sal_Unicode( '>' ) );
+ aKeyMap[ KEY_GREATER ] = rtl::OUString( sal_Unicode( '>' ) );
aKeyMap[ KEY_EQUAL ] = rtl::OUString( sal_Unicode( '=' ) );
aKeyMap[ KEY_OPEN ] = rtl::OUString( sal_Unicode( 0x23cf ) );
@@ -1015,9 +1015,9 @@ XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
*/
}
-
+
rtl::OUStringBuffer aResult( 16 );
-
+
USHORT nUnmodifiedCode = (nKeyCode & KEY_CODE);
std::map< USHORT, rtl::OUString >::const_iterator it = aKeyMap.find( nUnmodifiedCode );
if( it != aKeyMap.end() )
@@ -1030,10 +1030,10 @@ XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
// we map it to MOD3, whichis actually Command
if( (nKeyCode & (KEY_MOD2|KEY_MOD3)) != 0 )
aResult.append( sal_Unicode( 0x2303 ) );
-
+
aResult.append( it->second );
}
-
+
return aResult.makeStringAndClear();
}
@@ -1053,7 +1053,7 @@ static void getAppleScrollBarVariant(void)
CFStringRef AppleScrollBarType = CFSTR("AppleScrollBarVariant");
if( AppleScrollBarType )
{
- CFStringRef ScrollBarVariant = ((CFStringRef)CFPreferencesCopyAppValue( AppleScrollBarType, kCFPreferencesCurrentApplication ));
+ CFStringRef ScrollBarVariant = ((CFStringRef)CFPreferencesCopyAppValue( AppleScrollBarType, kCFPreferencesCurrentApplication ));
if( ScrollBarVariant )
{
if( CFGetTypeID( ScrollBarVariant ) == CFStringGetTypeID() )
@@ -1079,7 +1079,7 @@ static void getAppleScrollBarVariant(void)
CFStringRef jumpScroll = CFSTR("AppleScrollerPagingBehavior");
if( jumpScroll )
{
- CFBooleanRef jumpStr = ((CFBooleanRef)CFPreferencesCopyAppValue( jumpScroll, kCFPreferencesCurrentApplication ));
+ CFBooleanRef jumpStr = ((CFBooleanRef)CFPreferencesCopyAppValue( jumpScroll, kCFPreferencesCurrentApplication ));
if( jumpStr )
{
if( CFGetTypeID( jumpStr ) == CFBooleanGetTypeID() )
@@ -1123,7 +1123,7 @@ static Font getFont( NSFont* pFont, long nDPIY, const Font& rDefault )
aResult.SetItalic( ([pFont italicAngle] != 0.0) ? ITALIC_NORMAL : ITALIC_NONE );
// FIMXE: bold ?
}
-
+
return aResult;
}
@@ -1146,7 +1146,7 @@ void AquaSalFrame::getResolution( long& o_rDPIX, long& o_rDPIY )
void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
{
[mpView lockFocus];
-
+
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
// Background Color
@@ -1156,7 +1156,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
Color aInactiveTabColor( aBackgroundColor );
aInactiveTabColor.DecreaseLuminance( 32 );
aStyleSettings.SetInactiveTabColor( aInactiveTabColor );
-
+
aStyleSettings.SetDialogColor( aBackgroundColor );
aStyleSettings.SetLightBorderColor( aBackgroundColor );
Color aShadowColor( aStyleSettings.GetShadowColor() );
@@ -1176,7 +1176,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetAppFont( aAppFont );
aStyleSettings.SetHelpFont( aAppFont );
aStyleSettings.SetPushButtonFont( aAppFont );
-
+
Font aTitleFont( getFont( [NSFont titleBarFontOfSize: 0], nDPIY, aAppFont ) );
aStyleSettings.SetTitleFont( aTitleFont );
aStyleSettings.SetFloatTitleFont( aTitleFont );
@@ -1200,14 +1200,14 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
Color aHighlightTextColor( getColor( [NSColor selectedTextColor],
aStyleSettings.GetHighlightTextColor(), mpWindow ) );
aStyleSettings.SetHighlightTextColor( aHighlightTextColor );
-
+
Color aMenuHighlightColor( getColor( [NSColor selectedMenuItemColor],
aStyleSettings.GetMenuHighlightColor(), mpWindow ) );
aStyleSettings.SetMenuHighlightColor( aMenuHighlightColor );
Color aMenuHighlightTextColor( getColor( [NSColor selectedMenuItemTextColor],
aStyleSettings.GetMenuHighlightTextColor(), mpWindow ) );
aStyleSettings.SetMenuHighlightTextColor( aMenuHighlightTextColor );
-
+
aStyleSettings.SetMenuColor( aBackgroundColor );
Color aMenuTextColor( getColor( [NSColor textColor],
aStyleSettings.GetMenuTextColor(), mpWindow ) );
@@ -1215,18 +1215,18 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetMenuBarTextColor( aMenuTextColor );
aStyleSettings.SetCursorBlinkTime( 500 );
-
+
// no mnemonics on aqua
aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_NOMNEMONICS );
-
+
getAppleScrollBarVariant();
-
+
// set scrollbar size
aStyleSettings.SetScrollBarSize( static_cast<long int>([NSScroller scrollerWidth]) );
// images in menus false for MacOSX
aStyleSettings.SetPreferredUseImagesInMenus( false );
-
+
rSettings.SetStyleSettings( aStyleSettings );
[mpView unlockFocus];
@@ -1277,7 +1277,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
NSRect aFrameRect = [mpWindow frame];
NSRect aContentRect = [NSWindow contentRectForFrameRect: aFrameRect styleMask: mnStyleMask];
-
+
// position is always relative to parent frame
NSRect aParentContentRect;
@@ -1295,10 +1295,10 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
}
else
aParentContentRect = maScreenRect; // use screen if no parent
-
+
CocoaToVCL( aContentRect );
CocoaToVCL( aParentContentRect );
-
+
bool bPaint = false;
if( (nFlags & (SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT)) != 0 )
{
@@ -1317,7 +1317,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
aContentRect.size.width = nWidth;
if( (nFlags & SAL_FRAME_POSSIZE_HEIGHT) != 0)
aContentRect.size.height = nHeight;
-
+
VCLToCocoa( aContentRect );
// do not display yet, we need to update our backbuffer
@@ -1325,7 +1325,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
//YieldMutexReleaser aRel;
[mpWindow setFrame: [NSWindow frameRectForContentRect: aContentRect styleMask: mnStyleMask] display: NO];
}
-
+
UpdateFrameGeometry();
if (nEvent)
@@ -1355,11 +1355,11 @@ void AquaSalFrame::GetWorkArea( Rectangle& rRect )
rRect.nBottom = static_cast<long>(aRect.origin.y + aRect.size.height - 1);
}
-SalPointerState AquaSalFrame::GetPointerState()
+SalPointerState AquaSalFrame::GetPointerState()
{
SalPointerState state;
state.mnState = 0;
-
+
// get position
NSPoint aPt = [mpWindow mouseLocationOutsideOfEventStream];
CocoaToVCL( aPt, false );
@@ -1399,7 +1399,7 @@ SalPointerState AquaSalFrame::GetPointerState()
state.mnState |= KEY_MOD2;
if( (nMask & NSCommandKeyMask) != 0 )
state.mnState |= KEY_MOD1;
-
+
}
else
{
@@ -1410,7 +1410,7 @@ SalPointerState AquaSalFrame::GetPointerState()
// and all mouse events for button state in VCL_NSApllication::sendEvent,
// but it is unclear whether this will get us the same result.
// leave in GetCurrentEventButtonState and GetCurrentEventKeyModifiers for now
-
+
// fill in button state
UInt32 nState = GetCurrentEventButtonState();
state.mnState = 0;
@@ -1420,7 +1420,7 @@ SalPointerState AquaSalFrame::GetPointerState()
state.mnState |= MOUSE_RIGHT; // secondary button
if( nState & 4 )
state.mnState |= MOUSE_MIDDLE; // tertiary button
-
+
// fill in modifier state
nState = GetCurrentEventKeyModifiers();
if( nState & shiftKey )
@@ -1432,8 +1432,8 @@ SalPointerState AquaSalFrame::GetPointerState()
if( nState & cmdKey )
state.mnState |= KEY_MOD1;
}
-
-
+
+
return state;
}
@@ -1512,13 +1512,13 @@ void AquaSalFrame::SetParent( SalFrame* pNewParent )
mpParent = (AquaSalFrame*)pNewParent;
// insert to correct parent and paint
Show( bShown );
-}
+}
void AquaSalFrame::UpdateFrameGeometry()
{
// keep in mind that view and window coordinates are lower left
// whereas vcl's are upper left
-
+
// update screen rect
NSScreen * pScreen = [mpWindow screen];
if( pScreen )
@@ -1528,7 +1528,7 @@ void AquaSalFrame::UpdateFrameGeometry()
if( pScreens )
maGeometry.nScreenNumber = [pScreens indexOfObject: pScreen];
}
-
+
NSRect aFrameRect = [mpWindow frame];
NSRect aContentRect = [NSWindow contentRectForFrameRect: aFrameRect styleMask: mnStyleMask];
@@ -1548,7 +1548,7 @@ void AquaSalFrame::UpdateFrameGeometry()
maGeometry.nLeftDecoration = static_cast<unsigned int>(aContentRect.origin.x - aFrameRect.origin.x);
maGeometry.nRightDecoration = static_cast<unsigned int>((aFrameRect.origin.x + aFrameRect.size.width) -
(aContentRect.origin.x + aContentRect.size.width));
-
+
maGeometry.nTopDecoration = static_cast<unsigned int>(aContentRect.origin.y - aFrameRect.origin.y);
maGeometry.nBottomDecoration = static_cast<unsigned int>((aFrameRect.origin.y + aFrameRect.size.height) -
(aContentRect.origin.y + aContentRect.size.height));
@@ -1566,15 +1566,15 @@ void AquaSalFrame::CaptureMouse( BOOL bCapture )
on MacOSX (neither carbon nor cocoa) there is a
CaptureMouse equivalent (in Carbon there is TrackMouseLocation
but this is useless to use since it is blocking)
-
+
However on cocoa the active frame seems to get mouse events
also outside the window, so we'll try to forward mouse events
to the capture frame in the hope that one of our frames
gets a mouse event.
-
+
This will break as soon as the user activates another app, but
a mouse click will normally lead to a release of the mouse anyway.
-
+
Let's see how far we get this way. Alternatively we could use one
large overlay window like we did for the carbon implementation,
however that is resource intensive.
@@ -1591,7 +1591,7 @@ void AquaSalFrame::ResetClipRegion()
// release old path and indicate no clipping
CGPathRelease( mrClippingPath );
mrClippingPath = NULL;
-
+
if( mpView && mbShown )
[mpView setNeedsDisplay: YES];
if( mpWindow )
@@ -1609,7 +1609,7 @@ void AquaSalFrame::BeginSetClipRegion( ULONG nRects )
CGPathRelease( mrClippingPath );
mrClippingPath = NULL;
}
-
+
if( maClippingRects.size() > SAL_CLIPRECT_COUNT && nRects < maClippingRects.size() )
{
std::vector<CGRect> aEmptyVec;
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index df1de50d8709..4423a1e6f964 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -108,7 +108,7 @@ static void initAppMenu()
{
// create the action selector
pMainMenuSelector = [[MainMenuSelector alloc] init];
-
+
// get the proper submenu
NSMenu* pAppMenu = [[pMainMenu itemAtIndex: 0] submenu];
if( pAppMenu )
@@ -127,7 +127,7 @@ static void initAppMenu()
[pNewItem setTarget: pMainMenuSelector];
[pAppMenu insertItem: [NSMenuItem separatorItem] atIndex: 1];
}
-
+
// insert preferences entry
String aPref( ResId( SV_STDTEXT_PREFERENCES, *pMgr ) );
pString = CreateNSString( aPref );
@@ -143,9 +143,9 @@ static void initAppMenu()
[pNewItem setTarget: pMainMenuSelector];
[pAppMenu insertItem: [NSMenuItem separatorItem] atIndex: 3];
}
-
+
// WARNING: ultra ugly code ahead
-
+
// rename standard entries
// rename "Services"
pNewItem = [pAppMenu itemAtIndex: 4];
@@ -207,7 +207,7 @@ static void initAppMenu()
SalMenu* AquaSalInstance::CreateMenu( BOOL bMenuBar )
{
initAppMenu();
-
+
AquaSalMenu *pAquaSalMenu = new AquaSalMenu( bMenuBar );
return pAquaSalMenu;
@@ -267,11 +267,11 @@ AquaSalMenu::~AquaSalMenu()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) && mpFrame->mpMenu == this )
const_cast<AquaSalFrame*>(mpFrame)->mpMenu = NULL;
- // this should normally be empty already, but be careful...
+ // this should normally be empty already, but be careful...
for( size_t i = 0; i < maButtons.size(); i++ )
releaseButtonEntry( maButtons[i] );
maButtons.clear();
-
+
// is this leaking in some cases ? the release often leads to a duplicate release
// it seems the parent item gets ownership of the menu
if( mpMenu )
@@ -279,7 +279,7 @@ AquaSalMenu::~AquaSalMenu()
if( mbMenuBar )
{
if( pCurrentMenuBar == this )
- {
+ {
// if the current menubar gets destroyed, set the default menubar
setDefaultMenu();
}
@@ -289,7 +289,7 @@ AquaSalMenu::~AquaSalMenu()
{
// so set the pointer to this AquaSalMenu to NULL
// to protect from calling a dead object
-
+
// in ! mbMenuBar case our mpMenu is actually a SalNSMenu*
// so we can safely cast here
[static_cast<SalNSMenu*>(mpMenu) setSalMenu: NULL];
@@ -351,7 +351,7 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR
NSView * pParentNSView = [pParentNSWindow contentView];
NSView * pPopupNSView = ((AquaSalFrame *) pWin->ImplGetWindow()->ImplGetFrame())->mpView;
NSRect popupFrame = [pPopupNSView frame];
-
+
// since we manipulate the menu below (removing entries)
// let's rather make a copy here and work with that
NSMenu* pCopyMenu = [mpMenu copy];
@@ -370,11 +370,11 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR
displayPopupFrame.origin.x = pWin->ImplGetFrame()->maGeometry.nX - pParentAquaSalFrame->maGeometry.nX + offset;
displayPopupFrame.origin.y = pWin->ImplGetFrame()->maGeometry.nY - pParentAquaSalFrame->maGeometry.nY + offset;
pParentAquaSalFrame->VCLToCocoa(displayPopupFrame, false);
-
+
// #i111992# if this menu was opened due to a key event, prevent dispatching that yet again
if( [pParentNSView respondsToSelector: @selector(clearLastEvent)] )
[pParentNSView performSelector:@selector(clearLastEvent)];
-
+
// open popup menu
NSPopUpButtonCell * pPopUpButtonCell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO];
[pPopUpButtonCell setMenu: pCopyMenu];
@@ -383,7 +383,7 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR
[pPopUpButtonCell performClickWithFrame:displayPopupFrame inView:pParentNSView];
[pPopUpButtonCell release];
[AquaA11yWrapper setPopupMenuOpen: NO];
-
+
// clean up the copy
[pCopyMenu release];
return true;
@@ -414,7 +414,7 @@ void AquaSalMenu::unsetMainMenu()
// remove items from main menu
NSMenu* pMenu = [NSApp mainMenu];
for( int nItems = [pMenu numberOfItems]; nItems > 1; nItems-- )
- [pMenu removeItemAtIndex: 1];
+ [pMenu removeItemAtIndex: 1];
}
void AquaSalMenu::setMainMenu()
@@ -432,7 +432,7 @@ void AquaSalMenu::setMainMenu()
[mpMenu insertItem: pItem atIndex: i+1];
}
pCurrentMenuBar = this;
-
+
// change status item
statusLayout();
}
@@ -488,7 +488,7 @@ void AquaSalMenu::addFallbackMenuItem( NSMenuItem* pNewItem )
// push the item to the back and retain it
[pNewItem retain];
rFallbackMenu.push_back( pNewItem );
-
+
if( pCurrentMenuBar == NULL )
setDefaultMenu();
}
@@ -580,9 +580,9 @@ void AquaSalMenu::RemoveItem( unsigned nPos )
DBG_ERROR( "invalid item index in remove" );
return;
}
-
+
pRemoveItem->mpParentMenu = NULL;
-
+
if( ! mbMenuBar || pCurrentMenuBar == this )
[mpMenu removeItemAtIndex: getItemIndexByPos(nPos)];
}
@@ -599,7 +599,7 @@ void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsi
{
subAquaSalMenu->mpParentSalMenu = this;
[pAquaSalMenuItem->mpMenuItem setSubmenu: subAquaSalMenu->mpMenu];
-
+
// set title of submenu
[subAquaSalMenu->mpMenu setTitle: [pAquaSalMenuItem->mpMenuItem title]];
}
@@ -610,7 +610,7 @@ void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsi
// let's hope that NSMenu copy does the right thing
NSMenu* pCopy = [subAquaSalMenu->mpMenu copy];
[pAquaSalMenuItem->mpMenuItem setSubmenu: pCopy];
-
+
// set title of submenu
[pCopy setTitle: [pAquaSalMenuItem->mpMenuItem title]];
}
@@ -652,7 +652,7 @@ void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSMI, const Image& r
return;
NSImage* pImage = CreateNSImage( rImage );
-
+
[pSalMenuItem->mpMenuItem setImage: pImage];
if( pImage )
[pImage release];
@@ -669,7 +669,7 @@ void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, con
// Delete mnemonics
aText.EraseAllChars( '~' );
-
+
/* #i90015# until there is a correct solution
strip out any appended (.*) in menubar entries
*/
@@ -683,7 +683,7 @@ void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, con
aText.Erase( nPos, nPos2-nPos+1 );
}
}
-
+
NSString* pString = CreateNSString( aText );
if (pString)
{
@@ -746,7 +746,7 @@ void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, cons
}
else // not even a code ? nonsense -> ignore
return;
-
+
DBG_ASSERT( nCommandKey, "unmapped accelerator key" );
nModifier=rKeyCode.GetAllModifier();
@@ -766,7 +766,7 @@ void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, cons
if(nModifier & KEY_MOD2)
nItemModifier |= NSAlternateKeyMask;
-
+
if(nModifier & KEY_MOD3)
nItemModifier |= NSControlKeyMask;
@@ -822,7 +822,7 @@ bool AquaSalMenu::AddMenuBarButton( const SalMenuButtonItem& i_rNewItem )
{
if( ! mbMenuBar || ! VisibleMenuBar() )
return false;
-
+
MenuBarButtonEntry* pEntry = findButtonItem( i_rNewItem.mnId );
if( pEntry )
{
@@ -838,13 +838,13 @@ bool AquaSalMenu::AddMenuBarButton( const SalMenuButtonItem& i_rNewItem )
maButtons.back().mpNSImage = CreateNSImage( i_rNewItem.maImage );
maButtons.back().mpToolTipString = CreateNSString( i_rNewItem.maToolTipText );
}
-
+
// lazy create status item
SalData::getStatusItem();
-
+
if( pCurrentMenuBar == this )
statusLayout();
-
+
return true;
}
@@ -866,19 +866,19 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_
{
if( GetSalData()->mnSystemVersion < VER_LEOPARD )
return Rectangle( Point( -1, -1 ), Size( 1, 1 ) );
-
+
if( ! i_pReferenceFrame || ! AquaSalFrame::isAlive( static_cast<AquaSalFrame*>(i_pReferenceFrame) ) )
return Rectangle();
-
+
MenuBarButtonEntry* pEntry = findButtonItem( i_nItemId );
-
+
if( ! pEntry )
return Rectangle();
-
+
NSStatusItem* pItem = SalData::getStatusItem();
if( ! pItem )
return Rectangle();
-
+
NSView* pView = [pItem view];
if( ! pView )
return Rectangle();
@@ -888,18 +888,18 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_
NSRect aRect = [pWin frame];
aRect.origin = [pWin convertBaseToScreen: NSMakePoint( 0, 0 )];
-
+
// make coordinates relative to reference frame
static_cast<AquaSalFrame*>(i_pReferenceFrame)->CocoaToVCL( aRect.origin );
aRect.origin.x -= i_pReferenceFrame->maGeometry.nX;
aRect.origin.y -= i_pReferenceFrame->maGeometry.nY + aRect.size.height;
-
- return Rectangle( Point(static_cast<long int>(aRect.origin.x),
+
+ return Rectangle( Point(static_cast<long int>(aRect.origin.x),
static_cast<long int>(aRect.origin.y)
- ),
+ ),
Size( static_cast<long int>(aRect.size.width),
static_cast<long int>(aRect.size.height)
- )
+ )
);
}
diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx
index 23df35581ecb..ef8d59f391a3 100644
--- a/vcl/aqua/source/window/salobj.cxx
+++ b/vcl/aqua/source/window/salobj.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +51,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
{
maSysData.nSize = sizeof( maSysData );
maSysData.pView = NULL;
-
+
NSRect aInitFrame = { { 0, 0 }, { 20, 20 } };
mpClipView = [[NSClipView alloc] initWithFrame: aInitFrame ];
if( mpClipView )
@@ -91,7 +91,7 @@ AquaSalObject::~AquaSalObject()
similar effect to non-rectangular windows is achieved by using a
non-opaque window and not painting where one wants the background
to shine through.
-
+
With respect to SalObject this leaves us to having an NSClipView
containing the child view. Even a QTMovieView respects the boundaries of
that, which gives us a clip "region" consisting of one rectangle.
@@ -179,7 +179,7 @@ void AquaSalObject::setClippedPosSize()
NSView *pView = maSysData.pView;
[pView setFrame: aViewRect];
}
-
+
NSRect aClipViewRect = { { mnX, mnY }, { mnWidth, mnHeight } };
NSPoint aClipPt = { 0, 0 };
if( mbClip )
@@ -192,10 +192,10 @@ void AquaSalObject::setClippedPosSize()
if( mnClipY == 0 )
aClipPt.y = mnHeight - mnClipHeight;;
}
-
+
mpFrame->VCLToCocoa( aClipViewRect, false );
[mpClipView setFrame: aClipViewRect];
-
+
[mpClipView scrollToPoint: aClipPt];
}
diff --git a/vcl/inc/cupsmgr.hxx b/vcl/inc/cupsmgr.hxx
index 4a9f25ee7317..e7b835e9870e 100644
--- a/vcl/inc/cupsmgr.hxx
+++ b/vcl/inc/cupsmgr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +48,23 @@ struct FPtrHash
class CUPSManager : public PrinterInfoManager
{
- CUPSWrapper* m_pCUPSWrapper;
- std::hash_map< FILE*, rtl::OString, FPtrHash > m_aSpoolFiles;
- int m_nDests;
- void* m_pDests;
- bool m_bNewDests;
- std::hash_map< rtl::OUString, int, rtl::OUStringHash > m_aCUPSDestMap;
+ CUPSWrapper* m_pCUPSWrapper;
+ std::hash_map< FILE*, rtl::OString, FPtrHash > m_aSpoolFiles;
+ int m_nDests;
+ void* m_pDests;
+ bool m_bNewDests;
+ std::hash_map< rtl::OUString, int, rtl::OUStringHash > m_aCUPSDestMap;
std::hash_map< rtl::OUString, PPDContext, rtl::OUStringHash > m_aDefaultContexts;
- rtl::OString m_aUser;
+ rtl::OString m_aUser;
// this is a security risk, but the CUPS API demands
// to deliver a pointer to a static buffer containing
// the password, so this cannot be helped
- rtl::OString m_aPassword;
+ rtl::OString m_aPassword;
- osl::Mutex m_aCUPSMutex;
- oslThread m_aDestThread;
+ osl::Mutex m_aCUPSMutex;
+ oslThread m_aDestThread;
CUPSManager( CUPSWrapper* );
virtual ~CUPSManager();
@@ -76,7 +76,7 @@ class CUPSManager : public PrinterInfoManager
public:
// public for stub
static void runDestThread(void* pMgr);
-
+
static CUPSManager* tryLoadCUPS();
const PPDParser* createCUPSParser( const rtl::OUString& rPrinter );
@@ -100,7 +100,7 @@ public:
virtual bool removePrinter( const rtl::OUString& rPrinterName, bool bCheckOnly = false );
virtual bool writePrinterConfig();
virtual bool setDefaultPrinter( const rtl::OUString& rPrinterName );
-
+
virtual bool addOrRemovePossible() const;
};
diff --git a/vcl/inc/list.h b/vcl/inc/list.h
index 78c7edce2839..224bfe784514 100644
--- a/vcl/inc/list.h
+++ b/vcl/inc/list.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ extern "C"
typedef struct _list *list;
typedef void (*list_destructor)(void *);
-
+
/*- constructors and a destructor */
list listNewEmpty(void);
#ifdef TEST
diff --git a/vcl/inc/pch/precompiled_vcl.cxx b/vcl/inc/pch/precompiled_vcl.cxx
index 66c95bc3b2e1..dfebb860dd7f 100644
--- a/vcl/inc/pch/precompiled_vcl.cxx
+++ b/vcl/inc/pch/precompiled_vcl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index c07523757071..7b713cdbf9e8 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/sft.hxx b/vcl/inc/sft.hxx
index 8e18a2d539e1..85e6faf0e87b 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
* C3 - CRC-32 of the array of encoding numbers used to generate the subset
*
*/
-
+
#ifndef __SUBFONT_H
#define __SUBFONT_H
@@ -73,7 +73,7 @@
namespace vcl
{
-
+
/*@{*/
typedef sal_Int16 F2Dot14; /**< fixed: 2.14 */
typedef sal_Int32 F16Dot16; /**< fixed: 16.16 */
@@ -166,8 +166,8 @@ namespace vcl
};
#endif
-
-
+
+
/** Structure used by GetTTSimpleGlyphMetrics() and GetTTSimpleCharMetrics() functions */
typedef struct {
@@ -208,11 +208,11 @@ namespace vcl
typedef struct {
char *family; /**< family name */
- sal_uInt16 *ufamily; /**< family name UCS2 */
+ sal_uInt16 *ufamily; /**< family name UCS2 */
char *subfamily; /**< subfamily name */
sal_uInt16 *usubfamily; /**< subfamily name UCS2 */
char *psname; /**< PostScript name */
- sal_uInt16 macStyle; /**< macstyle bits from 'HEAD' table */
+ sal_uInt16 macStyle; /**< macstyle bits from 'HEAD' table */
int weight; /**< value of WeightClass or 0 if can't be determined */
int width; /**< value of WidthClass or 0 if can't be determined */
int pitch; /**< 0: proportianal font, otherwise: monospaced */
@@ -280,7 +280,7 @@ namespace vcl
/**
- * TrueTypeFont constructor.
+ * TrueTypeFont constructor.
* The font file has to be provided as a memory buffer and length
* @param facenum - logical font number within a TTC file. This value is ignored
* for TrueType fonts
@@ -290,7 +290,7 @@ namespace vcl
int OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf); /*FOLD01*/
#if !defined(WIN32) && !defined(OS2)
/**
- * TrueTypeFont constructor.
+ * TrueTypeFont constructor.
* Reads the font file and allocates the memory for the structure.
* on WIN32 the font has to be provided as a memory buffer and length
* @param facenum - logical font number within a TTC file. This value is ignored
@@ -561,23 +561,23 @@ namespace vcl
* Returns nonzero if font is a symbol encoded font
*/
int CheckSymbolEncoding(TrueTypeFont* ttf);
-
+
/**
* returns the number of glyphs in a font
*/
int GetTTGlyphCount( TrueTypeFont* ttf );
-
+
/**
* provide access to the raw data of a SFNT-container's subtable
*/
bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
const sal_uInt8** ppRawBytes, int* pRawLength );
-
+
/*- private definitions */ /*FOLD00*/
struct _TrueTypeFont {
sal_uInt32 tag;
-
+
char *fname;
sal_Int32 fsize;
sal_uInt8 *ptr;
diff --git a/vcl/inc/vcl/ImageListProvider.hxx b/vcl/inc/vcl/ImageListProvider.hxx
index 7fc678b485fd..79f90659ebaa 100644
--- a/vcl/inc/vcl/ImageListProvider.hxx
+++ b/vcl/inc/vcl/ImageListProvider.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/abstdlg.hxx b/vcl/inc/vcl/abstdlg.hxx
index 3e2ef6554079..ab5ee9f44d88 100644
--- a/vcl/inc/vcl/abstdlg.hxx
+++ b/vcl/inc/vcl/abstdlg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +41,9 @@ class Link;
class VCL_DLLPUBLIC VclAbstractDialog
{
public:
- virtual short Execute() = 0;
- //virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) = 0;
- virtual ~VclAbstractDialog();
+ virtual short Execute() = 0;
+ //virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) = 0;
+ virtual ~VclAbstractDialog();
};
class VCL_DLLPUBLIC VclAbstractDialog2
@@ -57,7 +57,7 @@ public:
class VCL_DLLPUBLIC VclAbstractTerminatedDialog : public VclAbstractDialog
{
public:
- virtual void EndDialog(long nResult =0) = 0;
+ virtual void EndDialog(long nResult =0) = 0;
};
class VCL_DLLPUBLIC VclAbstractRefreshableDialog : public VclAbstractDialog
@@ -80,13 +80,13 @@ public:
class VCL_DLLPUBLIC VclAbstractDialogFactory
{
public:
- virtual ~VclAbstractDialogFactory(); // needed for export of vtable
- static VclAbstractDialogFactory* Create();
+ virtual ~VclAbstractDialogFactory(); // needed for export of vtable
+ static VclAbstractDialogFactory* Create();
// nDialogId was previously a ResId without ResMgr; the ResourceId is now
// an implementation detail of the factory
- virtual VclAbstractDialog* CreateVclDialog( Window* pParent, sal_uInt32 nResId ) = 0;
-
- // creates instance of PasswordToOpenModifyDialog from cui
+ virtual VclAbstractDialog* CreateVclDialog( Window* pParent, sal_uInt32 nResId ) = 0;
+
+ // creates instance of PasswordToOpenModifyDialog from cui
virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) = 0;
};
diff --git a/vcl/inc/vcl/accel.h b/vcl/inc/vcl/accel.h
index aec7e7c1bbd2..86ce9835c5e1 100644
--- a/vcl/inc/vcl/accel.h
+++ b/vcl/inc/vcl/accel.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +43,11 @@ class Accelerator;
class ImplAccelEntry
{
public:
- USHORT mnId;
- KeyCode maKeyCode;
- Accelerator* mpAccel;
- Accelerator* mpAutoAccel;
- BOOL mbEnabled;
+ USHORT mnId;
+ KeyCode maKeyCode;
+ Accelerator* mpAccel;
+ Accelerator* mpAutoAccel;
+ BOOL mbEnabled;
};
// -----------------
@@ -57,6 +57,6 @@ public:
// in KEYCOD.CXX
void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& rCode3, USHORT& rCode4 );
-#endif // _SV_ACCEL_H
+#endif // _SV_ACCEL_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/accel.hxx b/vcl/inc/vcl/accel.hxx
index 8c5ee6dfeb68..7973bb0608f1 100644
--- a/vcl/inc/vcl/accel.hxx
+++ b/vcl/inc/vcl/accel.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +47,18 @@ class VCL_DLLPUBLIC Accelerator : public Resource
friend class ImplAccelManager;
private:
- ImplAccelData* mpData;
- XubString maHelpStr;
- Link maActivateHdl;
- Link maDeactivateHdl;
- Link maSelectHdl;
+ ImplAccelData* mpData;
+ XubString maHelpStr;
+ Link maActivateHdl;
+ Link maDeactivateHdl;
+ Link maSelectHdl;
// Werden vom AcceleratorManager gesetzt
- KeyCode maCurKeyCode;
- USHORT mnCurId;
- USHORT mnCurRepeat;
- BOOL mbIsCancel;
- BOOL* mpDel;
+ KeyCode maCurKeyCode;
+ USHORT mnCurId;
+ USHORT mnCurRepeat;
+ BOOL mbIsCancel;
+ BOOL* mpDel;
SAL_DLLPRIVATE void ImplInit();
SAL_DLLPRIVATE void ImplCopyData( ImplAccelData& rAccelData );
@@ -75,55 +75,55 @@ public:
Accelerator();
Accelerator( const Accelerator& rAccel );
Accelerator( const ResId& rResId );
- virtual ~Accelerator();
-
- virtual void Activate();
- virtual void Deactivate();
- virtual void Select();
-
- void InsertItem( USHORT nItemId, const KeyCode& rKeyCode );
- void InsertItem( const ResId& rResId );
- void RemoveItem( USHORT nItemId );
- void RemoveItem( const KeyCode rKeyCode );
- void Clear();
-
- USHORT GetCurItemId() const { return mnCurId; }
- const KeyCode& GetCurKeyCode() const { return maCurKeyCode; }
- USHORT GetCurRepeat() const { return mnCurRepeat; }
- BOOL IsCancel() const { return mbIsCancel; }
-
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- KeyCode GetItemKeyCode( USHORT nPos ) const;
- USHORT GetItemId( const KeyCode& rKeyCode ) const;
- KeyCode GetKeyCode( USHORT nItemId ) const;
- BOOL IsIdValid( USHORT nItemId ) const;
- BOOL IsKeyCodeValid( const KeyCode rKeyCode ) const;
- BOOL Call( const KeyCode& rKeyCode, USHORT nRepeat = 0 );
-
- void SetAccel( USHORT nItemId, Accelerator* pAccel );
- Accelerator* GetAccel( USHORT nItemId ) const;
- void SetAccel( const KeyCode rKeyCode, Accelerator* pAccel );
- Accelerator* GetAccel( const KeyCode rKeyCode ) const;
-
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
- void EnableItem( const KeyCode rKeyCode, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( const KeyCode rKeyCode ) const;
-
- void SetHelpText( const XubString& rHelpText ) { maHelpStr = rHelpText; }
+ virtual ~Accelerator();
+
+ virtual void Activate();
+ virtual void Deactivate();
+ virtual void Select();
+
+ void InsertItem( USHORT nItemId, const KeyCode& rKeyCode );
+ void InsertItem( const ResId& rResId );
+ void RemoveItem( USHORT nItemId );
+ void RemoveItem( const KeyCode rKeyCode );
+ void Clear();
+
+ USHORT GetCurItemId() const { return mnCurId; }
+ const KeyCode& GetCurKeyCode() const { return maCurKeyCode; }
+ USHORT GetCurRepeat() const { return mnCurRepeat; }
+ BOOL IsCancel() const { return mbIsCancel; }
+
+ USHORT GetItemCount() const;
+ USHORT GetItemId( USHORT nPos ) const;
+ KeyCode GetItemKeyCode( USHORT nPos ) const;
+ USHORT GetItemId( const KeyCode& rKeyCode ) const;
+ KeyCode GetKeyCode( USHORT nItemId ) const;
+ BOOL IsIdValid( USHORT nItemId ) const;
+ BOOL IsKeyCodeValid( const KeyCode rKeyCode ) const;
+ BOOL Call( const KeyCode& rKeyCode, USHORT nRepeat = 0 );
+
+ void SetAccel( USHORT nItemId, Accelerator* pAccel );
+ Accelerator* GetAccel( USHORT nItemId ) const;
+ void SetAccel( const KeyCode rKeyCode, Accelerator* pAccel );
+ Accelerator* GetAccel( const KeyCode rKeyCode ) const;
+
+ void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
+ BOOL IsItemEnabled( USHORT nItemId ) const;
+ void EnableItem( const KeyCode rKeyCode, BOOL bEnable = TRUE );
+ BOOL IsItemEnabled( const KeyCode rKeyCode ) const;
+
+ void SetHelpText( const XubString& rHelpText ) { maHelpStr = rHelpText; }
const XubString& GetHelpText() const { return maHelpStr; }
- void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
- const Link& GetActivateHdl() const { return maActivateHdl; }
- void SetDeactivateHdl( const Link& rLink ) { maDeactivateHdl = rLink; }
- const Link& GetDeactivateHdl() const { return maDeactivateHdl; }
- void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return maSelectHdl; }
+ void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
+ const Link& GetActivateHdl() const { return maActivateHdl; }
+ void SetDeactivateHdl( const Link& rLink ) { maDeactivateHdl = rLink; }
+ const Link& GetDeactivateHdl() const { return maDeactivateHdl; }
+ void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
+ const Link& GetSelectHdl() const { return maSelectHdl; }
- Accelerator& operator=( const Accelerator& rAccel );
+ Accelerator& operator=( const Accelerator& rAccel );
};
-#endif // _SV_ACCEL_HXX
+#endif // _SV_ACCEL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/accmgr.hxx b/vcl/inc/vcl/accmgr.hxx
index cafbd5750b57..e36201420589 100644
--- a/vcl/inc/vcl/accmgr.hxx
+++ b/vcl/inc/vcl/accmgr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/alpha.hxx b/vcl/inc/vcl/alpha.hxx
index a31e68832ba1..9d4647fee9dd 100644
--- a/vcl/inc/vcl/alpha.hxx
+++ b/vcl/inc/vcl/alpha.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,25 +58,25 @@ public:
AlphaMask( const Size& rSizePixel, BYTE* pEraseTransparency = NULL );
~AlphaMask();
- AlphaMask& operator=( const Bitmap& rBitmap );
- AlphaMask& operator=( const AlphaMask& rAlphaMask ) { return (AlphaMask&) Bitmap::operator=( rAlphaMask ); }
- BOOL operator!() const { return Bitmap::operator!(); }
- BOOL operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); }
- BOOL operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); }
+ AlphaMask& operator=( const Bitmap& rBitmap );
+ AlphaMask& operator=( const AlphaMask& rAlphaMask ) { return (AlphaMask&) Bitmap::operator=( rAlphaMask ); }
+ BOOL operator!() const { return Bitmap::operator!(); }
+ BOOL operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); }
+ BOOL operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); }
- const MapMode& GetPrefMapMode() const { return Bitmap::GetPrefMapMode(); }
- void SetPrefMapMode( const MapMode& rMapMode ) { Bitmap::SetPrefMapMode( rMapMode ); }
+ const MapMode& GetPrefMapMode() const { return Bitmap::GetPrefMapMode(); }
+ void SetPrefMapMode( const MapMode& rMapMode ) { Bitmap::SetPrefMapMode( rMapMode ); }
- const Size& GetPrefSize() const { return Bitmap::GetPrefSize(); }
- void SetPrefSize( const Size& rSize ) { Bitmap::SetPrefSize( rSize ); }
+ const Size& GetPrefSize() const { return Bitmap::GetPrefSize(); }
+ void SetPrefSize( const Size& rSize ) { Bitmap::SetPrefSize( rSize ); }
- Size GetSizePixel() const { return Bitmap::GetSizePixel(); }
- void SetSizePixel( const Size& rNewSize ) { Bitmap::SetSizePixel( rNewSize ); }
+ Size GetSizePixel() const { return Bitmap::GetSizePixel(); }
+ void SetSizePixel( const Size& rNewSize ) { Bitmap::SetSizePixel( rNewSize ); }
- ULONG GetSizeBytes() const { return Bitmap::GetSizeBytes(); }
- ULONG GetChecksum() const { return Bitmap::GetChecksum(); }
+ ULONG GetSizeBytes() const { return Bitmap::GetSizeBytes(); }
+ ULONG GetChecksum() const { return Bitmap::GetChecksum(); }
- Bitmap GetBitmap() const;
+ Bitmap GetBitmap() const;
public:
@@ -96,14 +96,14 @@ public:
public:
- BitmapReadAccess* AcquireReadAccess() { return Bitmap::AcquireReadAccess(); }
- BitmapWriteAccess* AcquireWriteAccess() { return Bitmap::AcquireWriteAccess(); }
- void ReleaseAccess( BitmapReadAccess* pAccess );
+ BitmapReadAccess* AcquireReadAccess() { return Bitmap::AcquireReadAccess(); }
+ BitmapWriteAccess* AcquireWriteAccess() { return Bitmap::AcquireWriteAccess(); }
+ void ReleaseAccess( BitmapReadAccess* pAccess );
public:
- BOOL Read( SvStream& rIStm, BOOL bFileHeader = TRUE ) { return Bitmap::Read( rIStm, bFileHeader ); }
- BOOL Write( SvStream& rOStm, BOOL bCompressed = TRUE, BOOL bFileHeader = TRUE ) const { return Bitmap::Write( rOStm, bCompressed, bFileHeader ); }
+ BOOL Read( SvStream& rIStm, BOOL bFileHeader = TRUE ) { return Bitmap::Read( rIStm, bFileHeader ); }
+ BOOL Write( SvStream& rOStm, BOOL bCompressed = TRUE, BOOL bFileHeader = TRUE ) const { return Bitmap::Write( rOStm, bCompressed, bFileHeader ); }
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx );
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx );
diff --git a/vcl/inc/vcl/animate.hxx b/vcl/inc/vcl/animate.hxx
index 5a9b1b6dfc4f..b7b816c2b822 100644
--- a/vcl/inc/vcl/animate.hxx
+++ b/vcl/inc/vcl/animate.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ enum Disposal
DISPOSE_NOT,
DISPOSE_BACK,
DISPOSE_FULL,
- DISPOSE_PREVIOUS
+ DISPOSE_PREVIOUS
};
enum CycleMode
@@ -66,25 +66,25 @@ enum CycleMode
struct VCL_DLLPUBLIC AnimationBitmap
{
- BitmapEx aBmpEx;
- Point aPosPix;
- Size aSizePix;
- long nWait;
- Disposal eDisposal;
- BOOL bUserInput;
+ BitmapEx aBmpEx;
+ Point aPosPix;
+ Size aSizePix;
+ long nWait;
+ Disposal eDisposal;
+ BOOL bUserInput;
AnimationBitmap() {}
AnimationBitmap( const BitmapEx& rBmpEx, const Point& rPosPix,
const Size& rSizePix, long _nWait = 0L,
Disposal _eDisposal = DISPOSE_NOT ) :
- aBmpEx ( rBmpEx ),
- aPosPix ( rPosPix ),
- aSizePix ( rSizePix ),
- nWait ( _nWait ),
- eDisposal ( _eDisposal ),
- bUserInput ( FALSE ) {}
-
- BOOL operator==( const AnimationBitmap& rAnimBmp ) const
+ aBmpEx ( rBmpEx ),
+ aPosPix ( rPosPix ),
+ aSizePix ( rSizePix ),
+ nWait ( _nWait ),
+ eDisposal ( _eDisposal ),
+ bUserInput ( FALSE ) {}
+
+ BOOL operator==( const AnimationBitmap& rAnimBmp ) const
{
return( rAnimBmp.aBmpEx == aBmpEx &&
rAnimBmp.aPosPix == aPosPix &&
@@ -94,9 +94,9 @@ struct VCL_DLLPUBLIC AnimationBitmap
rAnimBmp.bUserInput == bUserInput );
}
- BOOL operator!=( const AnimationBitmap& rAnimBmp ) const { return !( *this == rAnimBmp ); }
+ BOOL operator!=( const AnimationBitmap& rAnimBmp ) const { return !( *this == rAnimBmp ); }
- BOOL IsEqual( const AnimationBitmap& rAnimBmp ) const
+ BOOL IsEqual( const AnimationBitmap& rAnimBmp ) const
{
return( rAnimBmp.aPosPix == aPosPix &&
rAnimBmp.aSizePix == aSizePix &&
@@ -106,7 +106,7 @@ struct VCL_DLLPUBLIC AnimationBitmap
rAnimBmp.aBmpEx.IsEqual( aBmpEx ) );
}
- ULONG GetChecksum() const;
+ ULONG GetChecksum() const;
};
// -------------------
@@ -115,21 +115,21 @@ struct VCL_DLLPUBLIC AnimationBitmap
struct AInfo
{
- Bitmap aLastSaveBitmap;
- Bitmap aBackBitmap;
- Rectangle aClipRect;
- Size aLastSaveSize;
- Point aLastSavePoint;
- Point aStartOrg;
- Size aStartSize;
- OutputDevice* pOutDev;
- void* pViewData;
- long nExtraData;
- BOOL bWithSize;
- BOOL bPause;
-
- AInfo() : pOutDev( NULL ),
- pViewData( NULL ),
+ Bitmap aLastSaveBitmap;
+ Bitmap aBackBitmap;
+ Rectangle aClipRect;
+ Size aLastSaveSize;
+ Point aLastSavePoint;
+ Point aStartOrg;
+ Size aStartSize;
+ OutputDevice* pOutDev;
+ void* pViewData;
+ long nExtraData;
+ BOOL bWithSize;
+ BOOL bPause;
+
+ AInfo() : pOutDev( NULL ),
+ pViewData( NULL ),
nExtraData( 0L ),
bWithSize( FALSE ),
bPause( FALSE ) {}
@@ -141,26 +141,26 @@ struct AInfo
class VCL_DLLPUBLIC Animation
{
- SAL_DLLPRIVATE static ULONG mnAnimCount;
-
- List maList;
- List maAInfoList;
- Link maNotifyLink;
- BitmapEx maBitmapEx;
- Timer maTimer;
- Size maGlobalSize;
- List* mpViewList;
- void* mpExtraData;
- long mnLoopCount;
- long mnLoops;
- long mnPos;
- Disposal meLastDisposal;
- CycleMode meCycleMode;
- BOOL mbFirst;
- BOOL mbIsInAnimation;
- BOOL mbWithSize;
- BOOL mbLoopTerminated;
- BOOL mbIsWaiting;
+ SAL_DLLPRIVATE static ULONG mnAnimCount;
+
+ List maList;
+ List maAInfoList;
+ Link maNotifyLink;
+ BitmapEx maBitmapEx;
+ Timer maTimer;
+ Size maGlobalSize;
+ List* mpViewList;
+ void* mpExtraData;
+ long mnLoopCount;
+ long mnLoops;
+ long mnPos;
+ Disposal meLastDisposal;
+ CycleMode meCycleMode;
+ BOOL mbFirst;
+ BOOL mbIsInAnimation;
+ BOOL mbWithSize;
+ BOOL mbLoopTerminated;
+ BOOL mbIsWaiting;
SAL_DLLPRIVATE void ImplRestartTimer( ULONG nTimeout );
@@ -173,81 +173,81 @@ public:
SAL_DLLPRIVATE ULONG ImplGetCurPos() const { return mnPos; }
-public:
+public:
Animation();
Animation( const Animation& rAnimation );
~Animation();
- Animation& operator=( const Animation& rAnimation );
- BOOL operator==( const Animation& rAnimation ) const;
- BOOL operator!=( const Animation& rAnimation ) const { return !(*this==rAnimation); }
+ Animation& operator=( const Animation& rAnimation );
+ BOOL operator==( const Animation& rAnimation ) const;
+ BOOL operator!=( const Animation& rAnimation ) const { return !(*this==rAnimation); }
- BOOL IsEqual( const Animation& rAnimation ) const;
+ BOOL IsEqual( const Animation& rAnimation ) const;
- BOOL IsEmpty() const;
- void SetEmpty();
+ BOOL IsEmpty() const;
+ void SetEmpty();
- void Clear();
+ void Clear();
- BOOL Start( OutputDevice* pOutDev, const Point& rDestPt, long nExtraData = 0,
+ BOOL Start( OutputDevice* pOutDev, const Point& rDestPt, long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = NULL );
- BOOL Start( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, long nExtraData = 0,
+ BOOL Start( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = NULL );
- void Stop( OutputDevice* pOutDev = NULL, long nExtraData = 0 );
+ void Stop( OutputDevice* pOutDev = NULL, long nExtraData = 0 );
- void Draw( OutputDevice* pOutDev, const Point& rDestPt ) const;
- void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz ) const;
+ void Draw( OutputDevice* pOutDev, const Point& rDestPt ) const;
+ void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz ) const;
- BOOL IsInAnimation() const { return mbIsInAnimation; }
- BOOL IsTransparent() const;
- BOOL IsTerminated() const { return mbLoopTerminated; }
+ BOOL IsInAnimation() const { return mbIsInAnimation; }
+ BOOL IsTransparent() const;
+ BOOL IsTerminated() const { return mbLoopTerminated; }
- const Size& GetDisplaySizePixel() const { return maGlobalSize; }
- void SetDisplaySizePixel( const Size& rSize ) { maGlobalSize = rSize; }
+ const Size& GetDisplaySizePixel() const { return maGlobalSize; }
+ void SetDisplaySizePixel( const Size& rSize ) { maGlobalSize = rSize; }
- const BitmapEx& GetBitmapEx() const { return maBitmapEx; }
- void SetBitmapEx( const BitmapEx& rBmpEx ) { maBitmapEx = rBmpEx; }
+ const BitmapEx& GetBitmapEx() const { return maBitmapEx; }
+ void SetBitmapEx( const BitmapEx& rBmpEx ) { maBitmapEx = rBmpEx; }
- ULONG GetLoopCount() const { return mnLoopCount; }
- void SetLoopCount( const ULONG nLoopCount );
- void ResetLoopCount();
+ ULONG GetLoopCount() const { return mnLoopCount; }
+ void SetLoopCount( const ULONG nLoopCount );
+ void ResetLoopCount();
- void SetCycleMode( CycleMode eMode );
- CycleMode GetCycleMode() const { return meCycleMode; }
+ void SetCycleMode( CycleMode eMode );
+ CycleMode GetCycleMode() const { return meCycleMode; }
- void SetNotifyHdl( const Link& rLink ) { maNotifyLink = rLink; }
- const Link& GetNotifyHdl() const { return maNotifyLink; }
+ void SetNotifyHdl( const Link& rLink ) { maNotifyLink = rLink; }
+ const Link& GetNotifyHdl() const { return maNotifyLink; }
- USHORT Count() const { return (USHORT) maList.Count(); }
- BOOL Insert( const AnimationBitmap& rAnimationBitmap );
- const AnimationBitmap& Get( USHORT nAnimation ) const;
- void Replace( const AnimationBitmap& rNewAnimationBmp, USHORT nAnimation );
+ USHORT Count() const { return (USHORT) maList.Count(); }
+ BOOL Insert( const AnimationBitmap& rAnimationBitmap );
+ const AnimationBitmap& Get( USHORT nAnimation ) const;
+ void Replace( const AnimationBitmap& rNewAnimationBmp, USHORT nAnimation );
- List* GetAInfoList() { return &maAInfoList; }
- ULONG GetSizeBytes() const;
- ULONG GetChecksum() const;
+ List* GetAInfoList() { return &maAInfoList; }
+ ULONG GetSizeBytes() const;
+ ULONG GetChecksum() const;
public:
- BOOL Convert( BmpConversion eConversion );
- BOOL ReduceColors( USHORT nNewColorCount,
+ BOOL Convert( BmpConversion eConversion );
+ BOOL ReduceColors( USHORT nNewColorCount,
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
- BOOL Invert();
- BOOL Mirror( ULONG nMirrorFlags );
- BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
- BOOL Adjust( short nLuminancePercent = 0,
+ BOOL Invert();
+ BOOL Mirror( ULONG nMirrorFlags );
+ BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
+ BOOL Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
- short nChannelRPercent = 0,
- short nChannelGPercent = 0,
+ short nChannelRPercent = 0,
+ short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
BOOL bInvert = FALSE );
- BOOL Filter( BmpFilter eFilter,
+ BOOL Filter( BmpFilter eFilter,
const BmpFilterParam* pFilterParam = NULL,
const Link* pProgress = NULL );
- friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, Animation& rAnimation );
- friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const Animation& rAnimation );
+ friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, Animation& rAnimation );
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const Animation& rAnimation );
};
#endif // _SV_ANIMATE_HXX
diff --git a/vcl/inc/vcl/apptypes.hxx b/vcl/inc/vcl/apptypes.hxx
index eba7f779ee81..b2f17a34e8f1 100644
--- a/vcl/inc/vcl/apptypes.hxx
+++ b/vcl/inc/vcl/apptypes.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/arrange.hxx b/vcl/inc/vcl/arrange.hxx
index 45433f4f351e..8cb5af4a77c3 100644
--- a/vcl/inc/vcl/arrange.hxx
+++ b/vcl/inc/vcl/arrange.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace vcl
{}
void deleteChild() { m_pChild.reset(); }
-
+
sal_Int32 getExpandPriority() const;
Size getOptimalSize( WindowSizeType ) const;
bool isVisible() const;
@@ -101,11 +101,11 @@ namespace vcl
WindowArranger* m_pParentArranger;
Rectangle m_aManagedArea;
long m_nOuterBorder;
-
+
virtual Element* getElement( size_t i_nIndex ) = 0;
const Element* getConstElement( size_t i_nIndex ) const
{ return const_cast<WindowArranger*>(this)->getElement( i_nIndex ); }
-
+
public:
WindowArranger( WindowArranger* i_pParent = NULL )
@@ -125,7 +125,7 @@ namespace vcl
// be direct children of that window
// violating that condition will result in undefined behavior
virtual void setParentWindow( Window* );
-
+
virtual void setParent( WindowArranger* );
virtual size_t countElements() const = 0;
@@ -139,21 +139,21 @@ namespace vcl
const Element* pEle = getConstElement( i_nIndex );
return pEle ? pEle->m_pElement : NULL;
}
-
+
virtual bool isVisible() const; // true if any element is visible
-
+
sal_Int32 getExpandPriority( size_t i_nIndex ) const
{
const Element* pEle = getConstElement( i_nIndex );
return pEle ? pEle->getExpandPriority() : 0;
}
-
+
Size getMinimumSize( size_t i_nIndex ) const
{
const Element* pEle = getConstElement( i_nIndex );
return pEle ? pEle->m_aMinSize : Size();
}
-
+
bool setMinimumSize( size_t i_nIndex, const Size& i_rMinSize )
{
Element* pEle = getElement( i_nIndex );
@@ -173,7 +173,7 @@ namespace vcl
pEle->m_nBottomBorder = i_nBottom;
}
}
-
+
void show( bool i_bShow = true, bool i_bImmediateUpdate = true );
void setManagedArea( const Rectangle& i_rArea )
@@ -227,7 +227,7 @@ namespace vcl
size_t addChild( WindowArranger* i_pNewChild, sal_Int32 i_nExpandPrio = 0, size_t i_nIndex = ~0 )
{ return addChild( boost::shared_ptr<WindowArranger>( i_pNewChild ), i_nExpandPrio, i_nIndex ); }
void remove( boost::shared_ptr<WindowArranger> const & );
-
+
long getBorderWidth() const { return m_nBorderWidth; }
};
@@ -268,13 +268,13 @@ namespace vcl
void setElement( boost::shared_ptr<WindowArranger> const & );
void setLabelColumnWidth( long i_nWidth )
{ m_nLabelColumnWidth = i_nWidth; }
-
+
Size getLabelSize( WindowSizeType i_eType ) const
{ return m_aLabel.getOptimalSize( i_eType ); }
Size getElementSize( WindowSizeType i_eType ) const
{ return m_aElement.getOptimalSize( i_eType ); }
};
-
+
class LabelColumn : public RowOrColumn
{
long getLabelWidth() const;
@@ -283,10 +283,10 @@ namespace vcl
: RowOrColumn( i_pParent, true, i_nBorderWidth )
{}
virtual ~LabelColumn();
-
+
virtual Size getOptimalSize( WindowSizeType ) const;
virtual void resize();
-
+
// returns the index of the added label
size_t addRow( Window* i_pLabel, boost::shared_ptr<WindowArranger> const& i_rElement, long i_nIndent = 0 );
size_t addRow( Window* i_pLabel, Window* i_pElement, long i_nIndent = 0 );
@@ -325,7 +325,7 @@ namespace vcl
void setChild( WindowArranger* i_pChild, sal_Int32 i_nExpandPrio = 0 )
{ setChild( boost::shared_ptr<WindowArranger>( i_pChild ), i_nExpandPrio ); }
};
-
+
class Spacer : public WindowArranger
{
WindowArranger::Element m_aElement;
@@ -356,18 +356,18 @@ namespace vcl
{
long m_nBorderX;
long m_nBorderY;
-
+
struct MatrixElement : public WindowArranger::Element
{
sal_uInt32 m_nX;
sal_uInt32 m_nY;
-
+
MatrixElement()
: WindowArranger::Element()
, m_nX( 0 )
, m_nY( 0 )
{}
-
+
MatrixElement( Window* i_pWin,
sal_uInt32 i_nX, sal_uInt32 i_nY,
boost::shared_ptr<WindowArranger> const & i_pChild = boost::shared_ptr<WindowArranger>(),
@@ -382,7 +382,7 @@ namespace vcl
std::vector< MatrixElement > m_aElements;
std::map< sal_uInt64, size_t > m_aMatrixMap; // maps (x | (y << 32)) to index in m_aElements
-
+
sal_uInt64 getMap( sal_uInt32 i_nX, sal_uInt32 i_nY )
{ return static_cast< sal_uInt64 >(i_nX) | (static_cast< sal_uInt64>(i_nY) << 32 ); }
diff --git a/vcl/inc/vcl/bitmap.hxx b/vcl/inc/vcl/bitmap.hxx
index b84ed70db927..58195e9ae7dd 100644
--- a/vcl/inc/vcl/bitmap.hxx
+++ b/vcl/inc/vcl/bitmap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,35 +39,35 @@
// - Defines -
// -----------
-#define BMP_MIRROR_NONE 0x00000000UL
-#define BMP_MIRROR_HORZ 0x00000001UL
-#define BMP_MIRROR_VERT 0x00000002UL
+#define BMP_MIRROR_NONE 0x00000000UL
+#define BMP_MIRROR_HORZ 0x00000001UL
+#define BMP_MIRROR_VERT 0x00000002UL
// -----------------------------------------------------------------------------
-#define BMP_SCALE_NONE 0x00000000UL
-#define BMP_SCALE_FAST 0x00000001UL
-#define BMP_SCALE_INTERPOLATE 0x00000002UL
+#define BMP_SCALE_NONE 0x00000000UL
+#define BMP_SCALE_FAST 0x00000001UL
+#define BMP_SCALE_INTERPOLATE 0x00000002UL
// -----------------------------------------------------------------------------
-#define BMP_DITHER_NONE 0x00000000UL
-#define BMP_DITHER_MATRIX 0x00000001UL
-#define BMP_DITHER_FLOYD 0x00000002UL
-#define BMP_DITHER_FLOYD_16 0x00000004UL
+#define BMP_DITHER_NONE 0x00000000UL
+#define BMP_DITHER_MATRIX 0x00000001UL
+#define BMP_DITHER_FLOYD 0x00000002UL
+#define BMP_DITHER_FLOYD_16 0x00000004UL
// -----------------------------------------------------------------------------
-#define BMP_VECTORIZE_NONE BMP_VECTORIZE_OUTER
-#define BMP_VECTORIZE_INNER 0x00000001UL
-#define BMP_VECTORIZE_OUTER 0x00000002UL
-#define BMP_VECTORIZE_BOUND_ONLY 0x00000004UL
-#define BMP_VECTORIZE_REDUCE_EDGES 0x00000008UL
+#define BMP_VECTORIZE_NONE BMP_VECTORIZE_OUTER
+#define BMP_VECTORIZE_INNER 0x00000001UL
+#define BMP_VECTORIZE_OUTER 0x00000002UL
+#define BMP_VECTORIZE_BOUND_ONLY 0x00000004UL
+#define BMP_VECTORIZE_REDUCE_EDGES 0x00000008UL
// -----------------------------------------------------------------------------
-#define BMP_COL_TRANS Color( 252, 3, 251 )
-#define BMP_COLOR_MONOCHROME_THRESHOLD 128
+#define BMP_COL_TRANS Color( 252, 3, 251 )
+#define BMP_COLOR_MONOCHROME_THRESHOLD 128
// ---------
// - Enums -
@@ -164,9 +164,9 @@ class VCL_DLLPUBLIC BmpFilterParam
friend class Animation;
private:
- BmpFilter meFilter;
- ULONG mnProgressStart;
- ULONG mnProgressEnd;
+ BmpFilter meFilter;
+ ULONG mnProgressStart;
+ ULONG mnProgressEnd;
public:
struct MosaicTileSize
@@ -184,8 +184,8 @@ public:
private:
union
{
- USHORT mnSepiaPercent;
- BYTE mcSolarGreyThreshold;
+ USHORT mnSepiaPercent;
+ BYTE mcSolarGreyThreshold;
MosaicTileSize maMosaicTileSize;
EmbossAngles maEmbossAngles;
@@ -231,8 +231,8 @@ class Color;
class SvStream;
struct DIBInfoHeader;
class ResId;
-class GDIMetaFile;
-class AlphaMask;
+class GDIMetaFile;
+class AlphaMask;
class OutputDevice;
class SalBitmap;
@@ -288,25 +288,25 @@ public:
SAL_DLLPRIVATE BOOL ImplMakeGreyscales( USHORT nGreyscales );
SAL_DLLPRIVATE BOOL ImplConvertUp( USHORT nBitCount, Color* pExtColor = NULL );
SAL_DLLPRIVATE BOOL ImplConvertDown( USHORT nBitCount, Color* pExtColor = NULL );
- SAL_DLLPRIVATE BOOL ImplConvertGhosted();
- SAL_DLLPRIVATE BOOL ImplDitherMatrix();
- SAL_DLLPRIVATE BOOL ImplDitherFloyd();
- SAL_DLLPRIVATE BOOL ImplDitherFloyd16();
- SAL_DLLPRIVATE BOOL ImplReduceSimple( USHORT nColorCount );
- SAL_DLLPRIVATE BOOL ImplReducePopular( USHORT nColorCount );
- SAL_DLLPRIVATE BOOL ImplReduceMedian( USHORT nColorCount );
- SAL_DLLPRIVATE void ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
+ SAL_DLLPRIVATE BOOL ImplConvertGhosted();
+ SAL_DLLPRIVATE BOOL ImplDitherMatrix();
+ SAL_DLLPRIVATE BOOL ImplDitherFloyd();
+ SAL_DLLPRIVATE BOOL ImplDitherFloyd16();
+ SAL_DLLPRIVATE BOOL ImplReduceSimple( USHORT nColorCount );
+ SAL_DLLPRIVATE BOOL ImplReducePopular( USHORT nColorCount );
+ SAL_DLLPRIVATE BOOL ImplReduceMedian( USHORT nColorCount );
+ SAL_DLLPRIVATE void ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
long nColors, long nPixels, long& rIndex );
- SAL_DLLPRIVATE BOOL ImplConvolute3( const long* pMatrix, long nDivisor,
+ SAL_DLLPRIVATE BOOL ImplConvolute3( const long* pMatrix, long nDivisor,
const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplMedianFilter( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplSobelGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplSolarize( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplSepia( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplMedianFilter( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplSobelGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplSolarize( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplSepia( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE BOOL ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress );
public:
@@ -322,11 +322,11 @@ public:
inline BOOL operator==( const Bitmap& rBitmap ) const;
inline BOOL operator!=( const Bitmap& rBitmap ) const;
- inline BOOL IsSameInstance( const Bitmap& rBmp ) const;
- BOOL IsEqual( const Bitmap& rBmp ) const;
+ inline BOOL IsSameInstance( const Bitmap& rBmp ) const;
+ BOOL IsEqual( const Bitmap& rBmp ) const;
- inline BOOL IsEmpty() const;
- void SetEmpty();
+ inline BOOL IsEmpty() const;
+ void SetEmpty();
inline const MapMode& GetPrefMapMode() const;
inline void SetPrefMapMode( const MapMode& rMapMode );
@@ -335,7 +335,7 @@ public:
inline void SetPrefSize( const Size& rSize );
Size GetSizePixel() const;
- void SetSizePixel( const Size& rNewSize );
+ void SetSizePixel( const Size& rNewSize );
/**
* The pixel size of a bitmap's source (e.g. an image file)
@@ -349,17 +349,17 @@ public:
USHORT GetBitCount() const;
inline ULONG GetColorCount() const;
inline ULONG GetSizeBytes() const;
- BOOL HasGreyPalette() const;
+ BOOL HasGreyPalette() const;
/** get system dependent bitmap data
-
+
@param rData
The system dependent BitmapSystemData structure to be filled
-
+
@return TRUE if the bitmap has a valid system object (e.g. not empty)
*/
bool GetSystemData( BitmapSystemData& rData ) const;
- ULONG GetChecksum() const;
+ ULONG GetChecksum() const;
Bitmap CreateDisplayBitmap( OutputDevice* pDisplay );
Bitmap GetColorTransformedBitmap( BmpColorMode eColorMode ) const;
@@ -390,7 +390,7 @@ public:
@return TRUE, if the color reduction operation was completed successfully.
*/
- BOOL ReduceColors( USHORT nNewColorCount,
+ BOOL ReduceColors( USHORT nNewColorCount,
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
/** Apply a dither algorithm to the bitmap
@@ -405,7 +405,7 @@ public:
@param pDitherPal
A custom palette to be used when dithering (not yet implemented, leave NULL)
*/
- BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
+ BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
/** Crop the bitmap
@@ -425,7 +425,7 @@ public:
/** Expand the bitmap by pixel padding
- @param nDX
+ @param nDX
Number of pixel to pad at the right border of the bitmap
@param nDY
@@ -438,7 +438,7 @@ public:
not only returned when the operation failed, but also if
nothing had to be done, e.g. because nDX and nDY were zero.
*/
- BOOL Expand( ULONG nDX, ULONG nDY,
+ BOOL Expand( ULONG nDX, ULONG nDY,
const Color* pInitColor = NULL );
/** Copy a rectangular area from another bitmap
@@ -471,7 +471,7 @@ public:
@param rMask
The mask bitmap in the selected combine operation
-
+
@param eCombine
The combine operation to perform on the bitmap
@@ -496,8 +496,8 @@ public:
@return TRUE, if blending was successful, FALSE otherwise
*/
- BOOL Blend( const AlphaMask& rAlpha,
- const Color& rBackgroundColor );
+ BOOL Blend( const AlphaMask& rAlpha,
+ const Color& rBackgroundColor );
/** Fill the entire bitmap with the given color
@@ -513,13 +513,13 @@ public:
@return TRUE, if the operation was completed successfully.
*/
BOOL Invert();
-
+
/** Mirror the bitmap
@param nMirrorFlags
About which axis (horizontal, vertical, or both) to mirror
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
BOOL Mirror( ULONG nMirrorFlags );
@@ -531,7 +531,7 @@ public:
@param nScaleFlag
The algorithm to be used for scaling
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
BOOL Scale( const Size& rNewSize,
ULONG nScaleFlag = BMP_SCALE_FAST );
@@ -544,9 +544,9 @@ public:
@param rScaleY
The scale factor in y direction.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Scale( const double& rScaleX, const double& rScaleY,
+ BOOL Scale( const double& rScaleX, const double& rScaleY,
ULONG nScaleFlag = BMP_SCALE_FAST );
/** Rotate bitmap by the specified angle
@@ -560,7 +560,7 @@ public:
in. The empty spaces around that rotated original bitmap are
then filled with this color.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
BOOL Rotate( long nAngle10, const Color& rFillColor );
@@ -593,17 +593,17 @@ public:
@return the generated region.
*/
- Region CreateRegion( const Color& rColor, const Rectangle& rRect ) const;
+ Region CreateRegion( const Color& rColor, const Rectangle& rRect ) const;
/** Replace all pixel where the given mask is on with the specified color
@param rMask
Mask specifying which pixel should be replaced
-
+
@param rReplaceColor
Color to be placed in all changed pixel
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
BOOL Replace( const Bitmap& rMask, const Color& rReplaceColor );
@@ -611,11 +611,11 @@ public:
@param rAlpha
Alpha mask specifying the amount of background color to merge in
-
+
@param rMergeColor
Background color to be used for merging
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
BOOL Replace( const AlphaMask& rAlpha, const Color& rMergeColor );
@@ -623,7 +623,7 @@ public:
@param rSearchColor
Color specifying which pixel should be replaced
-
+
@param rReplaceColor
Color to be placed in all changed pixel
@@ -632,7 +632,7 @@ public:
rSearchColor and the individual pixel values, such that the
corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
BOOL Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
@@ -640,7 +640,7 @@ public:
@param pSearchColor
Array of colors specifying which pixel should be replaced
-
+
@param pReplaceColor
Array of colors to be placed in all changed pixel
@@ -652,12 +652,12 @@ public:
pSearchColor colors and the individual pixel values, such that
the corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Replace( const Color* pSearchColors, const Color* rReplaceColors,
+ BOOL Replace( const Color* pSearchColors, const Color* rReplaceColors,
ULONG nColorCount, ULONG* pTols = NULL );
- /** Convert the bitmap to a PolyPolygon
+ /** Convert the bitmap to a PolyPolygon
This works by putting continuous areas of the same color into
a polygon, by tracing its bounding line.
@@ -672,9 +672,9 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Vectorize( PolyPolygon& rPolyPoly,
+ BOOL Vectorize( PolyPolygon& rPolyPoly,
ULONG nFlags = BMP_VECTORIZE_OUTER,
const Link* pProgress = NULL );
@@ -697,9 +697,9 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Vectorize( GDIMetaFile& rMtf, BYTE cReduce = 0,
+ BOOL Vectorize( GDIMetaFile& rMtf, BYTE cReduce = 0,
ULONG nFlags = BMP_VECTORIZE_INNER,
const Link* pProgress = NULL );
@@ -728,12 +728,12 @@ public:
@param bInvert
If TRUE, invert the channel values with the logical 'not' operator
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Adjust( short nLuminancePercent = 0,
+ BOOL Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
- short nChannelRPercent = 0,
- short nChannelGPercent = 0,
+ short nChannelRPercent = 0,
+ short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
BOOL bInvert = FALSE );
@@ -748,10 +748,10 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
-
- @return TRUE, if the operation was completed successfully.
+
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Filter( BmpFilter eFilter,
+ BOOL Filter( BmpFilter eFilter,
const BmpFilterParam* pFilterParam = NULL,
const Link* pProgress = NULL );
@@ -801,7 +801,7 @@ inline BOOL Bitmap::IsSameInstance( const Bitmap& rBitmap ) const
// ------------------------------------------------------------------
-inline BOOL Bitmap::IsEmpty() const
+inline BOOL Bitmap::IsEmpty() const
{
return( mpImpBmp == NULL );
}
diff --git a/vcl/inc/vcl/bitmapex.hxx b/vcl/inc/vcl/bitmapex.hxx
index 15e38cf1c286..79cee2120378 100644
--- a/vcl/inc/vcl/bitmapex.hxx
+++ b/vcl/inc/vcl/bitmapex.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
enum TransparentType
{
- TRANSPARENT_NONE,
+ TRANSPARENT_NONE,
TRANSPARENT_COLOR,
TRANSPARENT_BITMAP
};
@@ -55,12 +55,12 @@ class VCL_DLLPUBLIC BitmapEx
private:
- Bitmap aBitmap;
- Bitmap aMask;
- Size aBitmapSize;
- Color aTransparentColor;
- TransparentType eTransparent;
- BOOL bAlpha;
+ Bitmap aBitmap;
+ Bitmap aMask;
+ Size aBitmapSize;
+ Color aTransparentColor;
+ TransparentType eTransparent;
+ BOOL bAlpha;
public:
@@ -80,51 +80,51 @@ public:
BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor );
~BitmapEx();
- BitmapEx& operator=( const BitmapEx& rBitmapEx );
- BOOL operator==( const BitmapEx& rBitmapEx ) const;
- BOOL operator!=( const BitmapEx& rBitmapEx ) const { return !(*this==rBitmapEx); }
- BOOL operator!() const { return !aBitmap; }
+ BitmapEx& operator=( const BitmapEx& rBitmapEx );
+ BOOL operator==( const BitmapEx& rBitmapEx ) const;
+ BOOL operator!=( const BitmapEx& rBitmapEx ) const { return !(*this==rBitmapEx); }
+ BOOL operator!() const { return !aBitmap; }
- BOOL IsEqual( const BitmapEx& rBmpEx ) const;
+ BOOL IsEqual( const BitmapEx& rBmpEx ) const;
- BOOL IsEmpty() const;
- void SetEmpty();
- void Clear();
+ BOOL IsEmpty() const;
+ void SetEmpty();
+ void Clear();
- void Draw( OutputDevice* pOutDev,
+ void Draw( OutputDevice* pOutDev,
const Point& rDestPt ) const;
- void Draw( OutputDevice* pOutDev,
+ void Draw( OutputDevice* pOutDev,
const Point& rDestPt, const Size& rDestSize ) const;
- void Draw( OutputDevice* pOutDev,
+ void Draw( OutputDevice* pOutDev,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel ) const;
- BOOL IsTransparent() const;
- TransparentType GetTransparentType() const { return eTransparent; }
+ BOOL IsTransparent() const;
+ TransparentType GetTransparentType() const { return eTransparent; }
- Bitmap GetBitmap( const Color* pTransReplaceColor = NULL ) const;
- Bitmap GetMask() const;
+ Bitmap GetBitmap( const Color* pTransReplaceColor = NULL ) const;
+ Bitmap GetMask() const;
BitmapEx GetColorTransformedBitmapEx( BmpColorMode eColorMode ) const;
- BOOL IsAlpha() const;
- AlphaMask GetAlpha() const;
+ BOOL IsAlpha() const;
+ AlphaMask GetAlpha() const;
const Size& GetSizePixel() const { return aBitmapSize; }
- void SetSizePixel( const Size& rNewSize );
+ void SetSizePixel( const Size& rNewSize );
- const Size& GetPrefSize() const { return aBitmap.GetPrefSize(); }
- void SetPrefSize( const Size& rPrefSize ) { aBitmap.SetPrefSize( rPrefSize ); }
+ const Size& GetPrefSize() const { return aBitmap.GetPrefSize(); }
+ void SetPrefSize( const Size& rPrefSize ) { aBitmap.SetPrefSize( rPrefSize ); }
- const MapMode& GetPrefMapMode() const { return aBitmap.GetPrefMapMode(); }
- void SetPrefMapMode( const MapMode& rPrefMapMode ) { aBitmap.SetPrefMapMode( rPrefMapMode ); }
+ const MapMode& GetPrefMapMode() const { return aBitmap.GetPrefMapMode(); }
+ void SetPrefMapMode( const MapMode& rPrefMapMode ) { aBitmap.SetPrefMapMode( rPrefMapMode ); }
- const Color& GetTransparentColor() const { return aTransparentColor; }
- void SetTransparentColor( const Color& rColor ) { aTransparentColor = rColor; }
+ const Color& GetTransparentColor() const { return aTransparentColor; }
+ void SetTransparentColor( const Color& rColor ) { aTransparentColor = rColor; }
- USHORT GetBitCount() const { return aBitmap.GetBitCount(); }
- ULONG GetSizeBytes() const;
- ULONG GetChecksum() const;
+ USHORT GetBitCount() const { return aBitmap.GetBitCount(); }
+ ULONG GetSizeBytes() const;
+ ULONG GetChecksum() const;
public:
@@ -135,7 +135,7 @@ public:
@return TRUE, if the conversion was completed successfully.
*/
- BOOL Convert( BmpConversion eConversion );
+ BOOL Convert( BmpConversion eConversion );
/** Reduce number of colors for the bitmap
@@ -147,7 +147,7 @@ public:
@return TRUE, if the color reduction operation was completed successfully.
*/
- BOOL ReduceColors( USHORT nNewColorCount,
+ BOOL ReduceColors( USHORT nNewColorCount,
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
/** Apply a dither algorithm to the bitmap
@@ -159,7 +159,7 @@ public:
@param nDitherFlags
The algorithm to be used for dithering
*/
- BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
+ BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
/** Crop the bitmap
@@ -175,11 +175,11 @@ public:
nothing had to be cropped, because e.g. the crop rectangle
included the bitmap, FALSE is returned, too!
*/
- BOOL Crop( const Rectangle& rRectPixel );
+ BOOL Crop( const Rectangle& rRectPixel );
/** Expand the bitmap by pixel padding
- @param nDX
+ @param nDX
Number of pixel to pad at the right border of the bitmap
@param nDY
@@ -192,8 +192,8 @@ public:
not only returned when the operation failed, but also if
nothing had to be done, e.g. because nDX and nDY were zero.
*/
- BOOL Expand( ULONG nDX, ULONG nDY,
- const Color* pInitColor = NULL,
+ BOOL Expand( ULONG nDX, ULONG nDY,
+ const Color* pInitColor = NULL,
BOOL bExpandTransparent = FALSE );
/** Copy a rectangular area from another bitmap
@@ -218,7 +218,7 @@ public:
nothing had to be done, e.g. because one of the rectangles are
empty.
*/
- BOOL CopyPixel( const Rectangle& rRectDst,
+ BOOL CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc,
const BitmapEx* pBmpExSrc = NULL );
@@ -230,22 +230,22 @@ public:
@return TRUE, if the operation was completed successfully.
*/
- BOOL Erase( const Color& rFillColor );
+ BOOL Erase( const Color& rFillColor );
/** Perform the Invert operation on every pixel
@return TRUE, if the operation was completed successfully.
*/
- BOOL Invert();
+ BOOL Invert();
/** Mirror the bitmap
@param nMirrorFlags
About which axis (horizontal, vertical, or both) to mirror
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Mirror( ULONG nMirrorFlags );
+ BOOL Mirror( ULONG nMirrorFlags );
/** Scale the bitmap
@@ -255,9 +255,9 @@ public:
@param nScaleFlag
The algorithm to be used for scaling
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Scale( const Size& rNewSize, ULONG nScaleFlag = BMP_SCALE_FAST );
+ BOOL Scale( const Size& rNewSize, ULONG nScaleFlag = BMP_SCALE_FAST );
/** Scale the bitmap
@@ -267,9 +267,9 @@ public:
@param rScaleY
The scale factor in y direction.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag = BMP_SCALE_FAST );
+ BOOL Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag = BMP_SCALE_FAST );
/** Rotate bitmap by the specified angle
@@ -282,15 +282,15 @@ public:
in. The empty spaces around that rotated original bitmap are
then filled with this color.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Rotate( long nAngle10, const Color& rFillColor );
+ BOOL Rotate( long nAngle10, const Color& rFillColor );
/** Replace all pixel having the search color with the specified color
@param rSearchColor
Color specifying which pixel should be replaced
-
+
@param rReplaceColor
Color to be placed in all changed pixel
@@ -299,15 +299,15 @@ public:
rSearchColor and the individual pixel values, such that the
corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
+ BOOL Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
/** Replace all pixel having one the search colors with the corresponding replace color
@param pSearchColor
Array of colors specifying which pixel should be replaced
-
+
@param pReplaceColor
Array of colors to be placed in all changed pixel
@@ -319,9 +319,9 @@ public:
pSearchColor colors and the individual pixel values, such that
the corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Replace( const Color* pSearchColors, const Color* pReplaceColors,
+ BOOL Replace( const Color* pSearchColors, const Color* pReplaceColors,
ULONG nColorCount, const ULONG* pTols = NULL );
/** Change various global color characteristics
@@ -349,12 +349,12 @@ public:
@param bInvert
If TRUE, invert the channel values with the logical 'not' operator
- @return TRUE, if the operation was completed successfully.
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Adjust( short nLuminancePercent = 0,
+ BOOL Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
- short nChannelRPercent = 0,
- short nChannelGPercent = 0,
+ short nChannelRPercent = 0,
+ short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
BOOL bInvert = FALSE );
@@ -369,10 +369,10 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
-
- @return TRUE, if the operation was completed successfully.
+
+ @return TRUE, if the operation was completed successfully.
*/
- BOOL Filter( BmpFilter eFilter,
+ BOOL Filter( BmpFilter eFilter,
const BmpFilterParam* pFilterParam = NULL,
const Link* pProgress = NULL );
@@ -391,8 +391,8 @@ public:
public:
- friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx );
- friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx );
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx );
+ friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx );
static BitmapEx AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize);
};
diff --git a/vcl/inc/vcl/bmpacc.hxx b/vcl/inc/vcl/bmpacc.hxx
index e3530b786e65..3c1801b6b798 100644
--- a/vcl/inc/vcl/bmpacc.hxx
+++ b/vcl/inc/vcl/bmpacc.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ private:
BitmapReadAccess() {}
BitmapReadAccess( const BitmapReadAccess& ) {}
- BitmapReadAccess& operator=( const BitmapReadAccess& ) { return *this; }
+ BitmapReadAccess& operator=( const BitmapReadAccess& ) { return *this; }
protected:
Bitmap maBitmap;
@@ -168,8 +168,8 @@ public:
inline BitmapColor GetPixelFromData( const BYTE* pData, long nX ) const;
inline void SetPixelOnData( BYTE* pData, long nX, const BitmapColor& rBitmapColor );
inline BitmapColor GetPixel( long nY, long nX ) const;
- inline BitmapColor GetColor( long nY, long nX ) const;
- inline BYTE GetLuminance( long nY, long nX ) const;
+ inline BitmapColor GetColor( long nY, long nX ) const;
+ inline BYTE GetLuminance( long nY, long nX ) const;
};
// ---------------------
@@ -184,7 +184,7 @@ public:
virtual ~BitmapWriteAccess();
void CopyScanline( long nY, const BitmapReadAccess& rReadAcc );
- void CopyScanline( long nY, ConstScanline aSrcScanline,
+ void CopyScanline( long nY, ConstScanline aSrcScanline,
ULONG nSrcScanlineFormat, ULONG nSrcScanlineSize );
void CopyBuffer( const BitmapReadAccess& rReadAcc );
@@ -195,15 +195,15 @@ public:
inline void SetPixel( long nY, long nX, const BitmapColor& rBitmapColor );
- void SetLineColor();
- void SetLineColor( const Color& rColor );
- Color GetLineColor() const;
+ void SetLineColor();
+ void SetLineColor( const Color& rColor );
+ Color GetLineColor() const;
- void SetFillColor();
- void SetFillColor( const Color& rColor );
- Color GetFillColor() const;
+ void SetFillColor();
+ void SetFillColor( const Color& rColor );
+ Color GetFillColor() const;
- void Erase( const Color& rColor );
+ void Erase( const Color& rColor );
void DrawLine( const Point& rStart, const Point& rEnd );
@@ -219,18 +219,18 @@ public:
private:
BitmapColor* mpLineColor;
- BitmapColor* mpFillColor;
+ BitmapColor* mpFillColor;
BitmapWriteAccess() {}
BitmapWriteAccess( const BitmapWriteAccess& ) : BitmapReadAccess() {}
- BitmapWriteAccess& operator=( const BitmapWriteAccess& ) { return *this; }
+ BitmapWriteAccess& operator=( const BitmapWriteAccess& ) { return *this; }
};
// -------------------
// - Accessor Helper -
// -------------------
-/** This template handles BitmapAccess the RAII way.
+/** This template handles BitmapAccess the RAII way.
Please don't use directly, but the ready-made typedefs for
BitmapReadAccess and BitmapWriteAccess below.
@@ -250,23 +250,23 @@ public:
mrBitmap.ReleaseAccess( mpAccess );
}
- Access* get() { return mpAccess; }
- const Access* get() const { return mpAccess; }
+ Access* get() { return mpAccess; }
+ const Access* get() const { return mpAccess; }
- Access* operator->() { return mpAccess; }
- const Access* operator->() const { return mpAccess; }
+ Access* operator->() { return mpAccess; }
+ const Access* operator->() const { return mpAccess; }
- Access& operator*() { return *mpAccess; }
- const Access& operator*() const { return *mpAccess; }
+ Access& operator*() { return *mpAccess; }
+ const Access& operator*() const { return *mpAccess; }
private:
- Access* mpAccess;
- Bitmap& mrBitmap;
+ Access* mpAccess;
+ Bitmap& mrBitmap;
};
/** This wrapper handles BitmapReadAccess the RAII way.
- Use as follows:
+ Use as follows:
Bitmap aBitmap
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(), aBitmap );
pReadAccess->SetPixel()...
@@ -280,7 +280,7 @@ typedef ScopedBitmapAccess< BitmapReadAccess > ScopedBitmapReadAccess;
/** This wrapper handles BitmapWriteAccess the RAII way.
- Use as follows:
+ Use as follows:
Bitmap aBitmap
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(), aBitmap );
pWriteAccess->SetPixel()...
diff --git a/vcl/inc/vcl/bmpfast.hxx b/vcl/inc/vcl/bmpfast.hxx
index b43df0e115b2..ae4fe0b033af 100644
--- a/vcl/inc/vcl/bmpfast.hxx
+++ b/vcl/inc/vcl/bmpfast.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/brdwin.hxx b/vcl/inc/vcl/brdwin.hxx
index 016e50e1366e..219cbb84bba6 100644
--- a/vcl/inc/vcl/brdwin.hxx
+++ b/vcl/inc/vcl/brdwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,55 +38,55 @@ class ImplBorderWindowView;
// - ImplBorderWindow-Types -
// --------------------------
-#define BORDERWINDOW_STYLE_OVERLAP ((USHORT)0x0001)
-#define BORDERWINDOW_STYLE_BORDER ((USHORT)0x0002)
-#define BORDERWINDOW_STYLE_FLOAT ((USHORT)0x0004)
-#define BORDERWINDOW_STYLE_FRAME ((USHORT)0x0008)
-#define BORDERWINDOW_STYLE_APP ((USHORT)0x0010)
-
-#define BORDERWINDOW_HITTEST_TITLE ((USHORT)0x0001)
-#define BORDERWINDOW_HITTEST_LEFT ((USHORT)0x0002)
-#define BORDERWINDOW_HITTEST_MENU ((USHORT)0x0004)
-#define BORDERWINDOW_HITTEST_TOP ((USHORT)0x0008)
-#define BORDERWINDOW_HITTEST_RIGHT ((USHORT)0x0010)
-#define BORDERWINDOW_HITTEST_BOTTOM ((USHORT)0x0020)
-#define BORDERWINDOW_HITTEST_TOPLEFT ((USHORT)0x0040)
-#define BORDERWINDOW_HITTEST_TOPRIGHT ((USHORT)0x0080)
-#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((USHORT)0x0100)
-#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((USHORT)0x0200)
-#define BORDERWINDOW_HITTEST_CLOSE ((USHORT)0x0400)
-#define BORDERWINDOW_HITTEST_ROLL ((USHORT)0x0800)
-#define BORDERWINDOW_HITTEST_DOCK ((USHORT)0x1000)
-#define BORDERWINDOW_HITTEST_HIDE ((USHORT)0x2000)
-#define BORDERWINDOW_HITTEST_HELP ((USHORT)0x4000)
-#define BORDERWINDOW_HITTEST_PIN ((USHORT)0x8000)
-
-#define BORDERWINDOW_DRAW_TITLE ((USHORT)0x0001)
-#define BORDERWINDOW_DRAW_BORDER ((USHORT)0x0002)
-#define BORDERWINDOW_DRAW_FRAME ((USHORT)0x0004)
-#define BORDERWINDOW_DRAW_CLOSE ((USHORT)0x0008)
-#define BORDERWINDOW_DRAW_ROLL ((USHORT)0x0010)
-#define BORDERWINDOW_DRAW_DOCK ((USHORT)0x0020)
-#define BORDERWINDOW_DRAW_HIDE ((USHORT)0x0040)
-#define BORDERWINDOW_DRAW_HELP ((USHORT)0x0080)
-#define BORDERWINDOW_DRAW_PIN ((USHORT)0x0100)
-#define BORDERWINDOW_DRAW_MENU ((USHORT)0x0200)
-#define BORDERWINDOW_DRAW_ALL (BORDERWINDOW_DRAW_TITLE | \
- BORDERWINDOW_DRAW_BORDER | \
- BORDERWINDOW_DRAW_FRAME | \
- BORDERWINDOW_DRAW_CLOSE | \
- BORDERWINDOW_DRAW_ROLL | \
- BORDERWINDOW_DRAW_DOCK | \
- BORDERWINDOW_DRAW_HIDE | \
- BORDERWINDOW_DRAW_HELP | \
- BORDERWINDOW_DRAW_PIN | \
+#define BORDERWINDOW_STYLE_OVERLAP ((USHORT)0x0001)
+#define BORDERWINDOW_STYLE_BORDER ((USHORT)0x0002)
+#define BORDERWINDOW_STYLE_FLOAT ((USHORT)0x0004)
+#define BORDERWINDOW_STYLE_FRAME ((USHORT)0x0008)
+#define BORDERWINDOW_STYLE_APP ((USHORT)0x0010)
+
+#define BORDERWINDOW_HITTEST_TITLE ((USHORT)0x0001)
+#define BORDERWINDOW_HITTEST_LEFT ((USHORT)0x0002)
+#define BORDERWINDOW_HITTEST_MENU ((USHORT)0x0004)
+#define BORDERWINDOW_HITTEST_TOP ((USHORT)0x0008)
+#define BORDERWINDOW_HITTEST_RIGHT ((USHORT)0x0010)
+#define BORDERWINDOW_HITTEST_BOTTOM ((USHORT)0x0020)
+#define BORDERWINDOW_HITTEST_TOPLEFT ((USHORT)0x0040)
+#define BORDERWINDOW_HITTEST_TOPRIGHT ((USHORT)0x0080)
+#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((USHORT)0x0100)
+#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((USHORT)0x0200)
+#define BORDERWINDOW_HITTEST_CLOSE ((USHORT)0x0400)
+#define BORDERWINDOW_HITTEST_ROLL ((USHORT)0x0800)
+#define BORDERWINDOW_HITTEST_DOCK ((USHORT)0x1000)
+#define BORDERWINDOW_HITTEST_HIDE ((USHORT)0x2000)
+#define BORDERWINDOW_HITTEST_HELP ((USHORT)0x4000)
+#define BORDERWINDOW_HITTEST_PIN ((USHORT)0x8000)
+
+#define BORDERWINDOW_DRAW_TITLE ((USHORT)0x0001)
+#define BORDERWINDOW_DRAW_BORDER ((USHORT)0x0002)
+#define BORDERWINDOW_DRAW_FRAME ((USHORT)0x0004)
+#define BORDERWINDOW_DRAW_CLOSE ((USHORT)0x0008)
+#define BORDERWINDOW_DRAW_ROLL ((USHORT)0x0010)
+#define BORDERWINDOW_DRAW_DOCK ((USHORT)0x0020)
+#define BORDERWINDOW_DRAW_HIDE ((USHORT)0x0040)
+#define BORDERWINDOW_DRAW_HELP ((USHORT)0x0080)
+#define BORDERWINDOW_DRAW_PIN ((USHORT)0x0100)
+#define BORDERWINDOW_DRAW_MENU ((USHORT)0x0200)
+#define BORDERWINDOW_DRAW_ALL (BORDERWINDOW_DRAW_TITLE | \
+ BORDERWINDOW_DRAW_BORDER | \
+ BORDERWINDOW_DRAW_FRAME | \
+ BORDERWINDOW_DRAW_CLOSE | \
+ BORDERWINDOW_DRAW_ROLL | \
+ BORDERWINDOW_DRAW_DOCK | \
+ BORDERWINDOW_DRAW_HIDE | \
+ BORDERWINDOW_DRAW_HELP | \
+ BORDERWINDOW_DRAW_PIN | \
BORDERWINDOW_DRAW_MENU)
-#define BORDERWINDOW_TITLE_NORMAL ((USHORT)0x0001)
-#define BORDERWINDOW_TITLE_SMALL ((USHORT)0x0002)
-#define BORDERWINDOW_TITLE_TEAROFF ((USHORT)0x0004)
-#define BORDERWINDOW_TITLE_POPUP ((USHORT)0x0008)
-#define BORDERWINDOW_TITLE_NONE ((USHORT)0x0010)
+#define BORDERWINDOW_TITLE_NORMAL ((USHORT)0x0001)
+#define BORDERWINDOW_TITLE_SMALL ((USHORT)0x0002)
+#define BORDERWINDOW_TITLE_TEAROFF ((USHORT)0x0004)
+#define BORDERWINDOW_TITLE_POPUP ((USHORT)0x0008)
+#define BORDERWINDOW_TITLE_NONE ((USHORT)0x0010)
// --------------------
// - ImplBorderWindow -
@@ -100,34 +100,34 @@ class ImplBorderWindow : public Window
friend class ImplStdBorderWindowView;
private:
- ImplBorderWindowView* mpBorderView;
- Window* mpMenuBarWindow;
- long mnMinWidth;
- long mnMinHeight;
- long mnMaxWidth;
- long mnMaxHeight;
- long mnRollHeight;
- long mnOrgMenuHeight;
- USHORT mnTitleType;
- USHORT mnBorderStyle;
- BOOL mbFloatWindow;
- BOOL mbSmallOutBorder;
- BOOL mbFrameBorder;
- BOOL mbPined;
- BOOL mbRollUp;
- BOOL mbMenuHide;
- BOOL mbDockBtn;
- BOOL mbHideBtn;
- BOOL mbHelpBtn;
+ ImplBorderWindowView* mpBorderView;
+ Window* mpMenuBarWindow;
+ long mnMinWidth;
+ long mnMinHeight;
+ long mnMaxWidth;
+ long mnMaxHeight;
+ long mnRollHeight;
+ long mnOrgMenuHeight;
+ USHORT mnTitleType;
+ USHORT mnBorderStyle;
+ BOOL mbFloatWindow;
+ BOOL mbSmallOutBorder;
+ BOOL mbFrameBorder;
+ BOOL mbPined;
+ BOOL mbRollUp;
+ BOOL mbMenuHide;
+ BOOL mbDockBtn;
+ BOOL mbHideBtn;
+ BOOL mbHelpBtn;
BOOL mbMenuBtn;
- BOOL mbDisplayActive;
+ BOOL mbDisplayActive;
using Window::ImplInit;
- void ImplInit( Window* pParent,
+ void ImplInit( Window* pParent,
WinBits nStyle, USHORT nTypeStyle,
SystemParentData* pParentData );
- void ImplInit( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ void ImplInit( Window* pParent,
+ WinBits nStyle, USHORT nTypeStyle,
const ::com::sun::star::uno::Any& );
// Copy assignment is forbidden and not implemented.
@@ -142,53 +142,53 @@ public:
ImplBorderWindow( Window* pParent, WinBits nStyle = 0,
USHORT nTypeStyle = 0 );
ImplBorderWindow( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, USHORT nTypeStyle,
const ::com::sun::star::uno::Any& );
~ImplBorderWindow();
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Activate();
- virtual void Deactivate();
- virtual void Resize();
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- void InitView();
- void UpdateView( BOOL bNewView, const Size& rNewOutSize );
- void InvalidateBorder();
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Activate();
+ virtual void Deactivate();
+ virtual void Resize();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void InitView();
+ void UpdateView( BOOL bNewView, const Size& rNewOutSize );
+ void InvalidateBorder();
using Window::Draw;
- void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos );
-
- void SetDisplayActive( BOOL bActive );
- BOOL IsDisplayActive() const { return mbDisplayActive; }
- void SetTitleType( USHORT nTitleType, const Size& rSize );
- void SetBorderStyle( USHORT nStyle );
- USHORT GetBorderStyle() const { return mnBorderStyle; }
- void SetPin( BOOL bPin );
- void SetRollUp( BOOL bRollUp, const Size& rSize );
- void SetCloser();
- void SetDockButton( BOOL bDockButton );
- void SetHideButton( BOOL bHideButton );
- void SetHelpButton( BOOL bHelpButton );
- void SetMenuButton( BOOL bMenuButton );
-
- void UpdateMenuHeight();
- void SetMenuBarWindow( Window* pWindow );
- void SetMenuBarMode( BOOL bHide );
-
- void SetMinOutputSize( long nWidth, long nHeight )
+ void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos );
+
+ void SetDisplayActive( BOOL bActive );
+ BOOL IsDisplayActive() const { return mbDisplayActive; }
+ void SetTitleType( USHORT nTitleType, const Size& rSize );
+ void SetBorderStyle( USHORT nStyle );
+ USHORT GetBorderStyle() const { return mnBorderStyle; }
+ void SetPin( BOOL bPin );
+ void SetRollUp( BOOL bRollUp, const Size& rSize );
+ void SetCloser();
+ void SetDockButton( BOOL bDockButton );
+ void SetHideButton( BOOL bHideButton );
+ void SetHelpButton( BOOL bHelpButton );
+ void SetMenuButton( BOOL bMenuButton );
+
+ void UpdateMenuHeight();
+ void SetMenuBarWindow( Window* pWindow );
+ void SetMenuBarMode( BOOL bHide );
+
+ void SetMinOutputSize( long nWidth, long nHeight )
{ mnMinWidth = nWidth; mnMinHeight = nHeight; }
- void SetMaxOutputSize( long nWidth, long nHeight )
+ void SetMaxOutputSize( long nWidth, long nHeight )
{ mnMaxWidth = nWidth; mnMaxHeight = nHeight; }
- void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
+ void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- long CalcTitleWidth() const;
+ long CalcTitleWidth() const;
Rectangle GetMenuRect() const;
};
@@ -201,42 +201,42 @@ public:
struct ImplBorderFrameData
{
- ImplBorderWindow* mpBorderWindow;
- OutputDevice* mpOutDev;
- Rectangle maTitleRect;
- Rectangle maPinRect;
- Rectangle maCloseRect;
- Rectangle maRollRect;
- Rectangle maDockRect;
- Rectangle maMenuRect;
- Rectangle maHideRect;
- Rectangle maHelpRect;
- Point maMouseOff;
- long mnWidth;
- long mnHeight;
- long mnTrackX;
- long mnTrackY;
- long mnTrackWidth;
- long mnTrackHeight;
- sal_Int32 mnLeftBorder;
- sal_Int32 mnTopBorder;
- sal_Int32 mnRightBorder;
- sal_Int32 mnBottomBorder;
- long mnNoTitleTop;
- long mnBorderSize;
- long mnTitleHeight;
- long mnTitleOff;
- USHORT mnHitTest;
- USHORT mnPinState;
- USHORT mnCloseState;
- USHORT mnRollState;
- USHORT mnDockState;
- USHORT mnMenuState;
- USHORT mnHideState;
- USHORT mnHelpState;
- USHORT mnTitleType;
- BOOL mbFloatWindow;
- BOOL mbDragFull;
+ ImplBorderWindow* mpBorderWindow;
+ OutputDevice* mpOutDev;
+ Rectangle maTitleRect;
+ Rectangle maPinRect;
+ Rectangle maCloseRect;
+ Rectangle maRollRect;
+ Rectangle maDockRect;
+ Rectangle maMenuRect;
+ Rectangle maHideRect;
+ Rectangle maHelpRect;
+ Point maMouseOff;
+ long mnWidth;
+ long mnHeight;
+ long mnTrackX;
+ long mnTrackY;
+ long mnTrackWidth;
+ long mnTrackHeight;
+ sal_Int32 mnLeftBorder;
+ sal_Int32 mnTopBorder;
+ sal_Int32 mnRightBorder;
+ sal_Int32 mnBottomBorder;
+ long mnNoTitleTop;
+ long mnBorderSize;
+ long mnTitleHeight;
+ long mnTitleOff;
+ USHORT mnHitTest;
+ USHORT mnPinState;
+ USHORT mnCloseState;
+ USHORT mnRollState;
+ USHORT mnDockState;
+ USHORT mnMenuState;
+ USHORT mnHideState;
+ USHORT mnHelpState;
+ USHORT mnTitleType;
+ BOOL mbFloatWindow;
+ BOOL mbDragFull;
BOOL mbTitleClipped;
};
@@ -249,27 +249,27 @@ struct ImplBorderFrameData
class ImplBorderWindowView
{
public:
- virtual ~ImplBorderWindowView();
+ virtual ~ImplBorderWindowView();
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL Tracking( const TrackingEvent& rTEvt );
- virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL Tracking( const TrackingEvent& rTEvt );
+ virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect );
- virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0;
- virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
+ virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0;
+ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0;
- virtual long CalcTitleWidth() const = 0;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0;
+ virtual long CalcTitleWidth() const = 0;
+ virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0;
virtual Rectangle GetMenuRect() const;
- void ImplInitTitle( ImplBorderFrameData* pData );
- USHORT ImplHitTest( ImplBorderFrameData* pData, const Point& rPos );
- BOOL ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
- BOOL ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
- BOOL ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt );
- String ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect );
- long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const;
+ void ImplInitTitle( ImplBorderFrameData* pData );
+ USHORT ImplHitTest( ImplBorderFrameData* pData, const Point& rPos );
+ BOOL ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
+ BOOL ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
+ BOOL ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt );
+ String ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect );
+ long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const;
};
// =======================================================================
@@ -283,11 +283,11 @@ class ImplNoBorderWindowView : public ImplBorderWindowView
public:
ImplNoBorderWindowView( ImplBorderWindow* pBorderWindow );
- virtual void Init( OutputDevice* pDev, long nWidth, long nHeight );
- virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
+ virtual void Init( OutputDevice* pDev, long nWidth, long nHeight );
+ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- virtual long CalcTitleWidth() const;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
+ virtual long CalcTitleWidth() const;
+ virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
};
@@ -299,24 +299,24 @@ public:
class ImplSmallBorderWindowView : public ImplBorderWindowView
{
- ImplBorderWindow* mpBorderWindow;
- OutputDevice* mpOutDev;
- long mnWidth;
- long mnHeight;
- sal_Int32 mnLeftBorder;
- sal_Int32 mnTopBorder;
- sal_Int32 mnRightBorder;
- sal_Int32 mnBottomBorder;
+ ImplBorderWindow* mpBorderWindow;
+ OutputDevice* mpOutDev;
+ long mnWidth;
+ long mnHeight;
+ sal_Int32 mnLeftBorder;
+ sal_Int32 mnTopBorder;
+ sal_Int32 mnRightBorder;
+ sal_Int32 mnBottomBorder;
bool mbNWFBorder;
public:
ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow );
- virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight );
- virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
+ virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight );
+ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- virtual long CalcTitleWidth() const;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
+ virtual long CalcTitleWidth() const;
+ virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
};
@@ -329,28 +329,28 @@ public:
class ImplStdBorderWindowView : public ImplBorderWindowView
{
- ImplBorderFrameData maFrameData;
- VirtualDevice* mpATitleVirDev;
- VirtualDevice* mpDTitleVirDev;
+ ImplBorderFrameData maFrameData;
+ VirtualDevice* mpATitleVirDev;
+ VirtualDevice* mpDTitleVirDev;
public:
ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow );
~ImplStdBorderWindowView();
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL Tracking( const TrackingEvent& rTEvt );
- virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL Tracking( const TrackingEvent& rTEvt );
+ virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect );
virtual Rectangle GetMenuRect() const;
- virtual void Init( OutputDevice* pDev, long nWidth, long nHeight );
- virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
+ virtual void Init( OutputDevice* pDev, long nWidth, long nHeight );
+ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- virtual long CalcTitleWidth() const;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
+ virtual long CalcTitleWidth() const;
+ virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
};
-#endif // _SV_BRDWIN_HXX
+#endif // _SV_BRDWIN_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/btndlg.hxx b/vcl/inc/vcl/btndlg.hxx
index b5dca5cdad21..71f962538e76 100644
--- a/vcl/inc/vcl/btndlg.hxx
+++ b/vcl/inc/vcl/btndlg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +41,13 @@ class PushButton;
// - ButtonDialog-Types -
// ----------------------
-#define BUTTONDIALOG_BUTTON_NOTFOUND ((USHORT)0xFFFF)
+#define BUTTONDIALOG_BUTTON_NOTFOUND ((USHORT)0xFFFF)
-#define BUTTONDIALOG_DEFBUTTON ((USHORT)0x0001)
-#define BUTTONDIALOG_OKBUTTON ((USHORT)0x0002)
-#define BUTTONDIALOG_CANCELBUTTON ((USHORT)0x0004)
-#define BUTTONDIALOG_HELPBUTTON ((USHORT)0x0008)
-#define BUTTONDIALOG_FOCUSBUTTON ((USHORT)0x0010)
+#define BUTTONDIALOG_DEFBUTTON ((USHORT)0x0001)
+#define BUTTONDIALOG_OKBUTTON ((USHORT)0x0002)
+#define BUTTONDIALOG_CANCELBUTTON ((USHORT)0x0004)
+#define BUTTONDIALOG_HELPBUTTON ((USHORT)0x0008)
+#define BUTTONDIALOG_FOCUSBUTTON ((USHORT)0x0010)
// ----------------
// - ButtonDialog -
@@ -57,19 +57,19 @@ class VCL_DLLPUBLIC ButtonDialog : public Dialog
{
private:
ImplBtnDlgItemList* mpItemList;
- Size maPageSize;
- Size maCtrlSize;
- long mnButtonSize;
- USHORT mnCurButtonId;
- USHORT mnFocusButtonId;
- BOOL mbFormat;
- Link maClickHdl;
-
- SAL_DLLPRIVATE void ImplInitButtonDialogData();
- SAL_DLLPRIVATE PushButton* ImplCreatePushButton( USHORT nBtnFlags );
- SAL_DLLPRIVATE ImplBtnDlgItem* ImplGetItem( USHORT nId ) const;
+ Size maPageSize;
+ Size maCtrlSize;
+ long mnButtonSize;
+ USHORT mnCurButtonId;
+ USHORT mnFocusButtonId;
+ BOOL mbFormat;
+ Link maClickHdl;
+
+ SAL_DLLPRIVATE void ImplInitButtonDialogData();
+ SAL_DLLPRIVATE PushButton* ImplCreatePushButton( USHORT nBtnFlags );
+ SAL_DLLPRIVATE ImplBtnDlgItem* ImplGetItem( USHORT nId ) const;
DECL_DLLPRIVATE_LINK( ImplClickHdl, PushButton* pBtn );
- SAL_DLLPRIVATE void ImplPosControls();
+ SAL_DLLPRIVATE void ImplPosControls();
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE ButtonDialog( const ButtonDialog & );
@@ -83,38 +83,38 @@ public:
ButtonDialog( Window* pParent, const ResId& rResId );
~ButtonDialog();
- virtual void Resize();
- virtual void StateChanged( StateChangedType nStateChange );
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nStateChange );
- virtual void Click();
+ virtual void Click();
- void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
- const Size& GetPageSizePixel() const { return maPageSize; }
+ void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
+ const Size& GetPageSizePixel() const { return maPageSize; }
- USHORT GetCurButtonId() const { return mnCurButtonId; }
+ USHORT GetCurButtonId() const { return mnCurButtonId; }
- void AddButton( const XubString& rText, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
- void AddButton( StandardButtonType eType, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
- void AddButton( PushButton* pBtn, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
- void RemoveButton( USHORT nId );
- void Clear();
- USHORT GetButtonCount() const;
- USHORT GetButtonId( USHORT nButton ) const;
- PushButton* GetPushButton( USHORT nId ) const;
- void SetButtonText( USHORT nId, const XubString& rText );
- XubString GetButtonText( USHORT nId ) const;
- void SetButtonHelpText( USHORT nId, const XubString& rText );
- XubString GetButtonHelpText( USHORT nId ) const;
- void SetButtonHelpId( USHORT nId, ULONG nHelpId );
- ULONG GetButtonHelpId( USHORT nId ) const;
+ void AddButton( const XubString& rText, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
+ void AddButton( StandardButtonType eType, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
+ void AddButton( PushButton* pBtn, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
+ void RemoveButton( USHORT nId );
+ void Clear();
+ USHORT GetButtonCount() const;
+ USHORT GetButtonId( USHORT nButton ) const;
+ PushButton* GetPushButton( USHORT nId ) const;
+ void SetButtonText( USHORT nId, const XubString& rText );
+ XubString GetButtonText( USHORT nId ) const;
+ void SetButtonHelpText( USHORT nId, const XubString& rText );
+ XubString GetButtonHelpText( USHORT nId ) const;
+ void SetButtonHelpId( USHORT nId, ULONG nHelpId );
+ ULONG GetButtonHelpId( USHORT nId ) const;
- void SetFocusButton( USHORT nId = BUTTONDIALOG_BUTTON_NOTFOUND ) { mnFocusButtonId = nId; }
- USHORT GetFocusButton() const { return mnFocusButtonId; }
+ void SetFocusButton( USHORT nId = BUTTONDIALOG_BUTTON_NOTFOUND ) { mnFocusButtonId = nId; }
+ USHORT GetFocusButton() const { return mnFocusButtonId; }
- void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
- const Link& GetClickHdl() const { return maClickHdl; }
+ void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
+ const Link& GetClickHdl() const { return maClickHdl; }
};
-#endif // _SV_BTNDLG_HXX
+#endif // _SV_BTNDLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 706e831869a1..81da43294217 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +79,7 @@ public:
~Button();
virtual void Click();
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
const Link& GetClickHdl() const { return maClickHdl; }
@@ -340,14 +340,14 @@ protected:
virtual const Color&
GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
- inline void SetMouseRect( const Rectangle& _rMouseRect ) { maMouseRect = _rMouseRect; }
- inline const Rectangle& GetMouseRect( ) const { return maMouseRect; }
- inline void SetStateRect( const Rectangle& _rStateRect ) { maStateRect = _rStateRect; }
- inline const Rectangle& GetStateRect( ) const { return maStateRect; }
+ inline void SetMouseRect( const Rectangle& _rMouseRect ) { maMouseRect = _rMouseRect; }
+ inline const Rectangle& GetMouseRect( ) const { return maMouseRect; }
+ inline void SetStateRect( const Rectangle& _rStateRect ) { maStateRect = _rStateRect; }
+ inline const Rectangle& GetStateRect( ) const { return maStateRect; }
// draws the radio button (the knob image), in it's current state (pressed/checked)
// at the usual location, which can be overridden with SetStateRect
- void DrawRadioButtonState( );
+ void DrawRadioButtonState( );
public:
RadioButton( Window* pParent, WinBits nWinStyle = 0 );
@@ -391,17 +391,17 @@ public:
void SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
const Link& GetToggleHdl() const { return maToggleHdl; }
-
+
/** GetRadioButtonGroup returns a list of pointers to <code>RadioButton</code>s in the same group.
-
+
The pointers in the returned list are valid at the time call returns. However rescheduling
or giving up the SolarMutex may mean events get executed that lead to the pointers getting
invalid.
-
+
@param io_rGroup
gets cleared on entering the function. on return contains the <code>RadioButton</code>s
in the same group as this <code>RadioButton</code>.
-
+
@param bIncludeThis
defines whether <code>this</code> is contained in the returned list
*/
@@ -451,9 +451,9 @@ protected:
SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState();
SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; }
- SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; }
+ SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; }
public:
- SAL_DLLPRIVATE void ImplCheck();
+ SAL_DLLPRIVATE void ImplCheck();
SAL_DLLPRIVATE void ImplSetMinimumNWFSize();
public:
CheckBox( Window* pParent, WinBits nStyle = 0 );
diff --git a/vcl/inc/vcl/canvasbitmap.hxx b/vcl/inc/vcl/canvasbitmap.hxx
index 4c4ef77ff5f7..0ad9249fb6f0 100644
--- a/vcl/inc/vcl/canvasbitmap.hxx
+++ b/vcl/inc/vcl/canvasbitmap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 vcl
{
namespace unotools
{
- class VCL_DLLPUBLIC VclCanvasBitmap :
+ class VCL_DLLPUBLIC VclCanvasBitmap :
public cppu::WeakImplHelper3< com::sun::star::rendering::XIntegerReadOnlyBitmap,
com::sun::star::rendering::XBitmapPalette,
com::sun::star::rendering::XIntegerBitmapColorSpace >
@@ -120,7 +120,7 @@ namespace unotools
are not reflected in this object (copy on write).
*/
explicit VclCanvasBitmap( const BitmapEx& rBitmap );
-
+
/// Retrieve contained bitmap. Call me with locked Solar mutex!
BitmapEx getBitmapEx() const;
};
diff --git a/vcl/inc/vcl/canvastools.hxx b/vcl/inc/vcl/canvastools.hxx
index e82d397a92f0..556af319b871 100644
--- a/vcl/inc/vcl/canvastools.hxx
+++ b/vcl/inc/vcl/canvastools.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +57,7 @@ namespace basegfx
class B2DPolyPolygon;
}
-namespace com { namespace sun { namespace star { namespace geometry
+namespace com { namespace sun { namespace star { namespace geometry
{
struct RealPoint2D;
struct RealSize2D;
@@ -68,7 +68,7 @@ namespace com { namespace sun { namespace star { namespace geometry
struct RealBezierSegment2D;
} } } }
-namespace com { namespace sun { namespace star { namespace rendering
+namespace com { namespace sun { namespace star { namespace rendering
{
class XGraphicDevice;
class XBitmap;
@@ -86,40 +86,40 @@ namespace vcl
/** Create an XPolyPolygon from VCL/Tools polygon
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
- VCL_DLLPUBLIC xPolyPolygonFromPolygon( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
- const ::Polygon& inputPolygon );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
+ VCL_DLLPUBLIC xPolyPolygonFromPolygon( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
+ const ::Polygon& inputPolygon );
/** Create an XPolyPolygon from VCL/Tools polyPolygon
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
- VCL_DLLPUBLIC xPolyPolygonFromPolyPolygon( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
- const ::PolyPolygon& inputPolyPolygon );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
+ VCL_DLLPUBLIC xPolyPolygonFromPolyPolygon( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
+ const ::PolyPolygon& inputPolyPolygon );
/** Create an VCL/Tools polygon from a point sequence
*/
- ::Polygon VCL_DLLPUBLIC polygonFromPoint2DSequence(
- const ::com::sun::star::uno::Sequence<
+ ::Polygon VCL_DLLPUBLIC polygonFromPoint2DSequence(
+ const ::com::sun::star::uno::Sequence<
::com::sun::star::geometry::RealPoint2D >& rPoints );
/** Create an VCL/Tools polyPolygon from a point sequence sequence
*/
- ::PolyPolygon VCL_DLLPUBLIC polyPolygonFromPoint2DSequenceSequence(
- const ::com::sun::star::uno::Sequence<
+ ::PolyPolygon VCL_DLLPUBLIC polyPolygonFromPoint2DSequenceSequence(
+ const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& rPoints );
/** Create an VCL/Tools polygon from a bezier segment sequence
*/
- ::Polygon VCL_DLLPUBLIC polygonFromBezier2DSequence(
- const ::com::sun::star::uno::Sequence<
+ ::Polygon VCL_DLLPUBLIC polygonFromBezier2DSequence(
+ const ::com::sun::star::uno::Sequence<
::com::sun::star::geometry::RealBezierSegment2D >& rPoints );
/** Create an VCL/Tools polyPolygon from a bezier segment sequence sequence
*/
- ::PolyPolygon VCL_DLLPUBLIC polyPolygonFromBezier2DSequenceSequence(
- const ::com::sun::star::uno::Sequence<
+ ::PolyPolygon VCL_DLLPUBLIC polyPolygonFromBezier2DSequenceSequence(
+ const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& rPoints );
// Bitmap conversions
@@ -127,21 +127,21 @@ namespace vcl
/** Create an XBitmap from VCL Bitmap
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
- VCL_DLLPUBLIC xBitmapFromBitmap( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
- const ::Bitmap& inputBitmap );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
+ VCL_DLLPUBLIC xBitmapFromBitmap( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
+ const ::Bitmap& inputBitmap );
/** Create an XBitmap from VCL BitmapEx
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
- VCL_DLLPUBLIC xBitmapFromBitmapEx( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
- const ::BitmapEx& inputBitmap );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
+ VCL_DLLPUBLIC xBitmapFromBitmapEx( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
+ const ::BitmapEx& inputBitmap );
/** Create a BitmapEx from an XBitmap
*/
- ::BitmapEx VCL_DLLPUBLIC bitmapExFromXBitmap( const ::com::sun::star::uno::Reference<
+ ::BitmapEx VCL_DLLPUBLIC bitmapExFromXBitmap( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XIntegerReadOnlyBitmap >& xInputBitmap );
/** get a unique identifier for identification in XUnoTunnel interface
@@ -157,7 +157,7 @@ namespace vcl
Note that this method assumes a color space equivalent to
the one returned from createStandardColorSpace()
*/
- ::com::sun::star::uno::Sequence< double >
+ ::com::sun::star::uno::Sequence< double >
VCL_DLLPUBLIC colorToStdColorSpaceSequence( const Color& rColor );
/** Convert color to device color sequence
@@ -168,9 +168,9 @@ namespace vcl
@param xColorSpace
Color space to convert into
*/
- ::com::sun::star::uno::Sequence< double >
+ ::com::sun::star::uno::Sequence< double >
VCL_DLLPUBLIC colorToDoubleSequence( const Color& rColor,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace >& xColorSpace );
/** Convert from standard device color space to VCL/Tools color
@@ -178,7 +178,7 @@ namespace vcl
Note that this method assumes a color space equivalent to
the one returned from createStandardColorSpace()
*/
- Color VCL_DLLPUBLIC stdColorSpaceSequenceToColor(
+ Color VCL_DLLPUBLIC stdColorSpaceSequenceToColor(
const ::com::sun::star::uno::Sequence< double >& rColor );
/** Convert color to device color sequence
@@ -190,7 +190,7 @@ namespace vcl
Color space to convert from
*/
Color VCL_DLLPUBLIC doubleSequenceToColor( const ::com::sun::star::uno::Sequence< double > rColor,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace >& xColorSpace );
/// Convert [0,1] double value to [0,255] int
@@ -213,41 +213,41 @@ namespace vcl
// Geometry conversions (vcl/tools <-> x)
// ===================================================================
- // geometry::Real
- ::com::sun::star::geometry::RealSize2D VCL_DLLPUBLIC size2DFromSize( const Size& );
- ::com::sun::star::geometry::RealPoint2D VCL_DLLPUBLIC point2DFromPoint( const Point& );
- ::com::sun::star::geometry::RealRectangle2D VCL_DLLPUBLIC rectangle2DFromRectangle( const Rectangle& );
+ // geometry::Real
+ ::com::sun::star::geometry::RealSize2D VCL_DLLPUBLIC size2DFromSize( const Size& );
+ ::com::sun::star::geometry::RealPoint2D VCL_DLLPUBLIC point2DFromPoint( const Point& );
+ ::com::sun::star::geometry::RealRectangle2D VCL_DLLPUBLIC rectangle2DFromRectangle( const Rectangle& );
- Size VCL_DLLPUBLIC sizeFromRealSize2D( const ::com::sun::star::geometry::RealSize2D& );
- Point VCL_DLLPUBLIC pointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& );
- Rectangle VCL_DLLPUBLIC rectangleFromRealRectangle2D( const ::com::sun::star::geometry::RealRectangle2D& );
+ Size VCL_DLLPUBLIC sizeFromRealSize2D( const ::com::sun::star::geometry::RealSize2D& );
+ Point VCL_DLLPUBLIC pointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& );
+ Rectangle VCL_DLLPUBLIC rectangleFromRealRectangle2D( const ::com::sun::star::geometry::RealRectangle2D& );
- // geometry::Integer
- ::com::sun::star::geometry::IntegerSize2D VCL_DLLPUBLIC integerSize2DFromSize( const Size& );
- ::com::sun::star::geometry::IntegerPoint2D VCL_DLLPUBLIC integerPoint2DFromPoint( const Point& );
- ::com::sun::star::geometry::IntegerRectangle2D VCL_DLLPUBLIC integerRectangle2DFromRectangle( const Rectangle& );
+ // geometry::Integer
+ ::com::sun::star::geometry::IntegerSize2D VCL_DLLPUBLIC integerSize2DFromSize( const Size& );
+ ::com::sun::star::geometry::IntegerPoint2D VCL_DLLPUBLIC integerPoint2DFromPoint( const Point& );
+ ::com::sun::star::geometry::IntegerRectangle2D VCL_DLLPUBLIC integerRectangle2DFromRectangle( const Rectangle& );
- Size VCL_DLLPUBLIC sizeFromIntegerSize2D( const ::com::sun::star::geometry::IntegerSize2D& );
- Point VCL_DLLPUBLIC pointFromIntegerPoint2D( const ::com::sun::star::geometry::IntegerPoint2D& );
- Rectangle VCL_DLLPUBLIC rectangleFromIntegerRectangle2D( const ::com::sun::star::geometry::IntegerRectangle2D& );
+ Size VCL_DLLPUBLIC sizeFromIntegerSize2D( const ::com::sun::star::geometry::IntegerSize2D& );
+ Point VCL_DLLPUBLIC pointFromIntegerPoint2D( const ::com::sun::star::geometry::IntegerPoint2D& );
+ Rectangle VCL_DLLPUBLIC rectangleFromIntegerRectangle2D( const ::com::sun::star::geometry::IntegerRectangle2D& );
- // basegfx::B2D
- Size VCL_DLLPUBLIC sizeFromB2DSize( const ::basegfx::B2DVector& );
- Point VCL_DLLPUBLIC pointFromB2DPoint( const ::basegfx::B2DPoint& );
- Rectangle VCL_DLLPUBLIC rectangleFromB2DRectangle( const ::basegfx::B2DRange& );
+ // basegfx::B2D
+ Size VCL_DLLPUBLIC sizeFromB2DSize( const ::basegfx::B2DVector& );
+ Point VCL_DLLPUBLIC pointFromB2DPoint( const ::basegfx::B2DPoint& );
+ Rectangle VCL_DLLPUBLIC rectangleFromB2DRectangle( const ::basegfx::B2DRange& );
- basegfx::B2DVector VCL_DLLPUBLIC b2DSizeFromSize( const Size& );
- basegfx::B2DPoint VCL_DLLPUBLIC b2DPointFromPoint( const Point& );
- basegfx::B2DRange VCL_DLLPUBLIC b2DRectangleFromRectangle( const Rectangle& );
+ basegfx::B2DVector VCL_DLLPUBLIC b2DSizeFromSize( const Size& );
+ basegfx::B2DPoint VCL_DLLPUBLIC b2DPointFromPoint( const Point& );
+ basegfx::B2DRange VCL_DLLPUBLIC b2DRectangleFromRectangle( const Rectangle& );
// basegfx::B2I
- Size VCL_DLLPUBLIC sizeFromB2ISize( const ::basegfx::B2IVector& );
- Point VCL_DLLPUBLIC pointFromB2IPoint( const ::basegfx::B2IPoint& );
- Rectangle VCL_DLLPUBLIC rectangleFromB2IRectangle( const ::basegfx::B2IRange& );
+ Size VCL_DLLPUBLIC sizeFromB2ISize( const ::basegfx::B2IVector& );
+ Point VCL_DLLPUBLIC pointFromB2IPoint( const ::basegfx::B2IPoint& );
+ Rectangle VCL_DLLPUBLIC rectangleFromB2IRectangle( const ::basegfx::B2IRange& );
- basegfx::B2IVector VCL_DLLPUBLIC b2ISizeFromSize( const Size& );
- basegfx::B2IPoint VCL_DLLPUBLIC b2IPointFromPoint( const Point& );
- basegfx::B2IRange VCL_DLLPUBLIC b2IRectangleFromRectangle( const Rectangle& );
+ basegfx::B2IVector VCL_DLLPUBLIC b2ISizeFromSize( const Size& );
+ basegfx::B2IPoint VCL_DLLPUBLIC b2IPointFromPoint( const Point& );
+ basegfx::B2IRange VCL_DLLPUBLIC b2IRectangleFromRectangle( const Rectangle& );
}
}
diff --git a/vcl/inc/vcl/cmdevt.h b/vcl/inc/vcl/cmdevt.h
index 0ecf03ca22bb..2143d40b398a 100644
--- a/vcl/inc/vcl/cmdevt.h
+++ b/vcl/inc/vcl/cmdevt.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,31 +33,31 @@
// - CommandVoiceData -
// --------------------
-#define DICTATIONCOMMAND_SYSTEM 0x1000
-#define DICTATIONCOMMAND_USER 0x2000
+#define DICTATIONCOMMAND_SYSTEM 0x1000
+#define DICTATIONCOMMAND_USER 0x2000
-#define DICTATIONCOMMAND_UNKNOWN 0x0001
-#define DICTATIONCOMMAND_NEWPARAGRAPH 0x0002
-#define DICTATIONCOMMAND_NEWLINE 0x0003
-#define DICTATIONCOMMAND_BOLD_ON 0x0004
-#define DICTATIONCOMMAND_BOLD_OFF 0x0005
-#define DICTATIONCOMMAND_ITALIC_ON 0x0006
-#define DICTATIONCOMMAND_ITALIC_OFF 0x0007
-#define DICTATIONCOMMAND_UNDERLINE_ON 0x0008
-#define DICTATIONCOMMAND_UNDERLINE_OFF 0x0009
-#define DICTATIONCOMMAND_NUMBERING_ON 0x0010
-#define DICTATIONCOMMAND_NUMBERING_OFF 0x0011
-#define DICTATIONCOMMAND_TAB 0x0012
-#define DICTATIONCOMMAND_LEFT 0x0013
-#define DICTATIONCOMMAND_RIGHT 0x0014
-#define DICTATIONCOMMAND_UP 0x0015
-#define DICTATIONCOMMAND_DOWN 0x0016
-#define DICTATIONCOMMAND_UNDO 0x0017
-#define DICTATIONCOMMAND_REPEAT 0x0018
-#define DICTATIONCOMMAND_DEL 0x0019
+#define DICTATIONCOMMAND_UNKNOWN 0x0001
+#define DICTATIONCOMMAND_NEWPARAGRAPH 0x0002
+#define DICTATIONCOMMAND_NEWLINE 0x0003
+#define DICTATIONCOMMAND_BOLD_ON 0x0004
+#define DICTATIONCOMMAND_BOLD_OFF 0x0005
+#define DICTATIONCOMMAND_ITALIC_ON 0x0006
+#define DICTATIONCOMMAND_ITALIC_OFF 0x0007
+#define DICTATIONCOMMAND_UNDERLINE_ON 0x0008
+#define DICTATIONCOMMAND_UNDERLINE_OFF 0x0009
+#define DICTATIONCOMMAND_NUMBERING_ON 0x0010
+#define DICTATIONCOMMAND_NUMBERING_OFF 0x0011
+#define DICTATIONCOMMAND_TAB 0x0012
+#define DICTATIONCOMMAND_LEFT 0x0013
+#define DICTATIONCOMMAND_RIGHT 0x0014
+#define DICTATIONCOMMAND_UP 0x0015
+#define DICTATIONCOMMAND_DOWN 0x0016
+#define DICTATIONCOMMAND_UNDO 0x0017
+#define DICTATIONCOMMAND_REPEAT 0x0018
+#define DICTATIONCOMMAND_DEL 0x0019
-#define DICTATIONCOMMAND_COMMANDMODE (DICTATIONCOMMAND_SYSTEM + 1)
-#define DICTATIONCOMMAND_DICTATIONMODE (DICTATIONCOMMAND_SYSTEM + 2)
+#define DICTATIONCOMMAND_COMMANDMODE (DICTATIONCOMMAND_SYSTEM + 1)
+#define DICTATIONCOMMAND_DICTATIONMODE (DICTATIONCOMMAND_SYSTEM + 2)
#endif // _VCL_CMDEVT_H
diff --git a/vcl/inc/vcl/cmdevt.hxx b/vcl/inc/vcl/cmdevt.hxx
index 24508a3b3e2f..02ffb79bd3f4 100644
--- a/vcl/inc/vcl/cmdevt.hxx
+++ b/vcl/inc/vcl/cmdevt.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -164,7 +164,7 @@ public:
{ return ((mnCode & KEY_MOD1) != 0); }
BOOL IsMod2() const
{ return ((mnCode & KEY_MOD2) != 0); }
- BOOL IsMod3() const
+ BOOL IsMod3() const
{ return ((mnCode & KEY_MOD3) != 0); }
};
@@ -319,7 +319,7 @@ class VCL_DLLPUBLIC CommandDialogData
CommandDialogData( int nDialogId = SHOWDIALOG_ID_PREFERENCES )
: m_nDialogId( nDialogId )
{}
-
+
int GetDialogId() const { return m_nDialogId; }
};
@@ -327,23 +327,23 @@ class VCL_DLLPUBLIC CommandDialogData
// Media Commands
// --------------
-#define MEDIA_COMMAND_CHANNEL_DOWN ((sal_Int16)1) // Decrement the channel value, for example, for a TV or radio tuner.
-#define MEDIA_COMMAND_CHANNEL_UP ((sal_Int16)2) // Increment the channel value, for example, for a TV or radio tuner.
-#define MEDIA_COMMAND_NEXTTRACK ((sal_Int16)3) // Go to next media track/slide.
-#define MEDIA_COMMAND_PAUSE ((sal_Int16)4) // Pause. If already paused, take no further action. This is a direct PAUSE command that has no state.
-#define MEDIA_COMMAND_PLAY ((sal_Int16)5) // Begin playing at the current position. If already paused, it will resume. This is a direct PLAY command that has no state.
-#define MEDIA_COMMAND_PLAY_PAUSE ((sal_Int16)6) // Play or pause playback.
-#define MEDIA_COMMAND_PREVIOUSTRACK ((sal_Int16)7) // Go to previous media track/slide.
-#define MEDIA_COMMAND_RECORD ((sal_Int16)8) // Begin recording the current stream.
-#define MEDIA_COMMAND_REWIND ((sal_Int16)9)// Go backward in a stream at a higher rate of speed.
-#define MEDIA_COMMAND_STOP ((sal_Int16)10)// Stop playback.
-#define MEDIA_COMMAND_MIC_ON_OFF_TOGGLE ((sal_Int16)11)// Toggle the microphone.
+#define MEDIA_COMMAND_CHANNEL_DOWN ((sal_Int16)1) // Decrement the channel value, for example, for a TV or radio tuner.
+#define MEDIA_COMMAND_CHANNEL_UP ((sal_Int16)2) // Increment the channel value, for example, for a TV or radio tuner.
+#define MEDIA_COMMAND_NEXTTRACK ((sal_Int16)3) // Go to next media track/slide.
+#define MEDIA_COMMAND_PAUSE ((sal_Int16)4) // Pause. If already paused, take no further action. This is a direct PAUSE command that has no state.
+#define MEDIA_COMMAND_PLAY ((sal_Int16)5) // Begin playing at the current position. If already paused, it will resume. This is a direct PLAY command that has no state.
+#define MEDIA_COMMAND_PLAY_PAUSE ((sal_Int16)6) // Play or pause playback.
+#define MEDIA_COMMAND_PREVIOUSTRACK ((sal_Int16)7) // Go to previous media track/slide.
+#define MEDIA_COMMAND_RECORD ((sal_Int16)8) // Begin recording the current stream.
+#define MEDIA_COMMAND_REWIND ((sal_Int16)9)// Go backward in a stream at a higher rate of speed.
+#define MEDIA_COMMAND_STOP ((sal_Int16)10)// Stop playback.
+#define MEDIA_COMMAND_MIC_ON_OFF_TOGGLE ((sal_Int16)11)// Toggle the microphone.
#define MEDIA_COMMAND_MICROPHONE_VOLUME_DOWN ((sal_Int16)12)// Increase microphone volume.
#define MEDIA_COMMAND_MICROPHONE_VOLUME_MUTE ((sal_Int16)13)// Mute the microphone.
#define MEDIA_COMMAND_MICROPHONE_VOLUME_UP ((sal_Int16)14)// Decrease microphone volume.
-#define MEDIA_COMMAND_VOLUME_DOWN ((sal_Int16)15)// Lower the volume.
-#define MEDIA_COMMAND_VOLUME_MUTE ((sal_Int16)16)// Mute the volume.
-#define MEDIA_COMMAND_VOLUME_UP ((sal_Int16)17)// Raise the volume.
+#define MEDIA_COMMAND_VOLUME_DOWN ((sal_Int16)15)// Lower the volume.
+#define MEDIA_COMMAND_VOLUME_MUTE ((sal_Int16)16)// Mute the volume.
+#define MEDIA_COMMAND_VOLUME_UP ((sal_Int16)17)// Raise the volume.
#define MEDIA_COMMAND_MENU ((sal_Int16)18)// Button Menu pressed.
#define MEDIA_COMMAND_MENU_HOLD ((sal_Int16)19)// Button Menu (long) pressed.
#define MEDIA_COMMAND_PLAY_HOLD ((sal_Int16)20)// Button Play (long) pressed.
@@ -401,7 +401,7 @@ inline CommandSelectionChangeData::CommandSelectionChangeData( ULONG nStart,
#define COMMAND_HANGUL_HANJA_CONVERSION ((USHORT)14)
#define COMMAND_INPUTLANGUAGECHANGE ((USHORT)15)
#define COMMAND_SHOWDIALOG ((USHORT)16)
-#define COMMAND_MEDIA ((USHORT)17)
+#define COMMAND_MEDIA ((USHORT)17)
#define COMMAND_SELECTIONCHANGE ((USHORT)18)
#define COMMAND_PREPARERECONVERSION ((USHORT)19)
#define COMMAND_USER ((USHORT)4096)
@@ -429,9 +429,9 @@ public:
const CommandWheelData* GetWheelData() const;
const CommandScrollData* GetAutoScrollData() const;
const CommandVoiceData* GetVoiceData() const;
- const CommandModKeyData* GetModKeyData() const;
+ const CommandModKeyData* GetModKeyData() const;
const CommandDialogData* GetDialogData() const;
- sal_Int16 GetMediaCommand() const;
+ sal_Int16 GetMediaCommand() const;
const CommandSelectionChangeData* GetSelectionChangeData() const;
};
diff --git a/vcl/inc/vcl/combobox.h b/vcl/inc/vcl/combobox.h
index cfcec12d75bc..14057dfcce0d 100644
--- a/vcl/inc/vcl/combobox.h
+++ b/vcl/inc/vcl/combobox.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +29,12 @@
#ifndef _SV_COMBOBOX_H
#define _SV_COMBOBOX_H
-#define COMBOBOX_APPEND ((USHORT)0xFFFF)
-#define COMBOBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
-#define COMBOBOX_ERROR ((USHORT)0xFFFF)
+#define COMBOBOX_APPEND ((USHORT)0xFFFF)
+#define COMBOBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
+#define COMBOBOX_ERROR ((USHORT)0xFFFF)
-#define COMBOBOX_USERDRAW_SELECTED ((USHORT)0x0001)
+#define COMBOBOX_USERDRAW_SELECTED ((USHORT)0x0001)
-#endif // _SV_COMBOBOX_H
+#endif // _SV_COMBOBOX_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index 3ab9f6dfa630..b232de1bc54c 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -107,11 +107,11 @@ public:
virtual void SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL );
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{ Edit::SetPosSizePixel( rNewPos, rNewSize ); }
- void SetDropDownSizePixel( const Size& rNewSize )
+ void SetDropDownSizePixel( const Size& rNewSize )
{ if( IsDropDownBox() ) SetPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(), WINDOW_POSSIZE_SIZE | WINDOW_POSSIZE_DROPDOWN ); }
- Rectangle GetDropDownPosSizePixel() const;
- Rectangle GetListPosSizePixel() const;
+ Rectangle GetDropDownPosSizePixel() const;
+ Rectangle GetListPosSizePixel() const;
// returns empty rectangle in DropDown mode,
// else it returns the PosSize of the ListBox
@@ -143,7 +143,7 @@ public:
BOOL IsTravelSelect() const;
BOOL IsInDropDown() const;
- void ToggleDropDown();
+ void ToggleDropDown();
long CalcWindowSizePixel( USHORT nLines ) const;
@@ -188,20 +188,20 @@ public:
void SetEntryData( USHORT nPos, void* pNewData );
void* GetEntryData( USHORT nPos ) const;
- void SetTopEntry( USHORT nPos );
+ void SetTopEntry( USHORT nPos );
void ShowProminentEntry( USHORT nPos );
- USHORT GetTopEntry() const;
+ USHORT GetTopEntry() const;
void SetProminentEntryType( ProminentEntry eType );
ProminentEntry GetProminentEntryType() const;
- USHORT GetDisplayLineCount() const;
+ USHORT GetDisplayLineCount() const;
- USHORT GetSelectEntryCount() const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
- BOOL IsEntryPosSelected( USHORT nPos ) const;
- void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
- void SetNoSelection();
+ USHORT GetSelectEntryCount() const;
+ USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ BOOL IsEntryPosSelected( USHORT nPos ) const;
+ void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
+ void SetNoSelection();
Rectangle GetBoundingRectangle( USHORT nItem ) const;
/** checks whether a certain point lies within the bounds of
diff --git a/vcl/inc/vcl/configsettings.hxx b/vcl/inc/vcl/configsettings.hxx
index c40e9681513d..e33e76d4520f 100644
--- a/vcl/inc/vcl/configsettings.hxx
+++ b/vcl/inc/vcl/configsettings.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace vcl
const rtl::OUString& getValue( const rtl::OUString& rGroup, const rtl::OUString& rKey ) const;
void setValue( const rtl::OUString& rGroup, const rtl::OUString& rKey, const rtl::OUString& rValue );
-
+
virtual void Commit();
};
diff --git a/vcl/inc/vcl/controldata.hxx b/vcl/inc/vcl/controldata.hxx
index b30184be2481..0306a8d395f6 100644
--- a/vcl/inc/vcl/controldata.hxx
+++ b/vcl/inc/vcl/controldata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/controllayout.hxx b/vcl/inc/vcl/controllayout.hxx
index 0cad923c6b33..3d43f0177061 100644
--- a/vcl/inc/vcl/controllayout.hxx
+++ b/vcl/inc/vcl/controllayout.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ struct VCL_DLLPUBLIC ControlLayoutData
// contains the string really displayed
// there must be exactly one bounding rectangle in m_aUnicodeBoundRects
// for every character in m_aDisplayText
- String m_aDisplayText;
+ String m_aDisplayText;
// the bounding rectangle of every character
// where one character may consist of many glyphs
- std::vector< Rectangle > m_aUnicodeBoundRects;
+ std::vector< Rectangle > m_aUnicodeBoundRects;
// start indices of lines
- std::vector< long > m_aLineIndices;
+ std::vector< long > m_aLineIndices;
// notify parent control on destruction
- const Control* m_pParent;
+ const Control* m_pParent;
ControlLayoutData() : m_pParent( NULL ) {}
~ControlLayoutData();
diff --git a/vcl/inc/vcl/ctrl.hxx b/vcl/inc/vcl/ctrl.hxx
index 1790096f8cdd..f9d423a7b6d4 100644
--- a/vcl/inc/vcl/ctrl.hxx
+++ b/vcl/inc/vcl/ctrl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +48,9 @@ protected:
::vcl::ImplControlData* mpControlData;
private:
- BOOL mbHasFocus;
- Link maGetFocusHdl;
- Link maLoseFocusHdl;
+ BOOL mbHasFocus;
+ Link maGetFocusHdl;
+ Link maLoseFocusHdl;
SAL_DLLPRIVATE void ImplInitControlData();
@@ -60,10 +60,10 @@ private:
protected:
Control( WindowType nType );
- virtual void FillLayoutData() const;
+ virtual void FillLayoutData() const;
// helper method for composite controls
- void AppendLayoutData( const Control& rSubControl ) const;
+ void AppendLayoutData( const Control& rSubControl ) const;
/// creates the mpData->mpLayoutData structure
void CreateLayoutData() const;
@@ -87,7 +87,7 @@ protected:
@return
if the Control instance has been destroyed in any of the call
*/
- BOOL ImplCallEventListenersAndHandler(
+ BOOL ImplCallEventListenersAndHandler(
ULONG nEvent, const Link& rHandler, void* pCaller
);
@@ -137,15 +137,15 @@ public:
Control( Window* pParent, const ResId& rResId );
~Control();
- virtual void GetFocus();
- virtual void LoseFocus();
- virtual long Notify( NotifyEvent& rNEvt );
- virtual void StateChanged( StateChangedType nStateChange );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
virtual void Resize();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
// invalidates layout data
- virtual void SetText( const String& rStr );
+ virtual void SetText( const String& rStr );
// gets the displayed text
virtual String GetDisplayText() const;
// returns the bounding box for the character at index nIndex (in control coordinates)
@@ -173,12 +173,12 @@ public:
*/
long ToRelativeLineIndex( long nIndex ) const;
- void SetGetFocusHdl( const Link& rLink ) { maGetFocusHdl = rLink; }
- const Link& GetGetFocusHdl() const { return maGetFocusHdl; }
- void SetLoseFocusHdl( const Link& rLink ) { maLoseFocusHdl = rLink; }
- const Link& GetLoseFocusHdl() const { return maLoseFocusHdl; }
+ void SetGetFocusHdl( const Link& rLink ) { maGetFocusHdl = rLink; }
+ const Link& GetGetFocusHdl() const { return maGetFocusHdl; }
+ void SetLoseFocusHdl( const Link& rLink ) { maLoseFocusHdl = rLink; }
+ const Link& GetLoseFocusHdl() const { return maLoseFocusHdl; }
- void SetLayoutDataParent( const Control* pParent ) const;
+ void SetLayoutDataParent( const Control* pParent ) const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
@@ -197,6 +197,6 @@ public:
}
};
-#endif // _SV_CTRL_HXX
+#endif // _SV_CTRL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx
index f1f07957db96..afa8c9324705 100644
--- a/vcl/inc/vcl/cursor.hxx
+++ b/vcl/inc/vcl/cursor.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class Window;
// - Cursor-Styles -
// -----------------
-#define CURSOR_SHADOW ((USHORT)0x0001)
+#define CURSOR_SHADOW ((USHORT)0x0001)
#define CURSOR_DIRECTION_NONE ((unsigned char)0x00)
#define CURSOR_DIRECTION_LTR ((unsigned char)0x01)
#define CURSOR_DIRECTION_RTL ((unsigned char)0x02)
@@ -54,67 +54,67 @@ class Window;
class VCL_DLLPUBLIC Cursor
{
private:
- ImplCursorData* mpData; // Interne Daten
- Window* mpWindow; // Window (only for shadow cursor)
- long mnSlant; // Schraegstellung
- long mnOffsetY; // Offset fuer Rotation
- Size maSize; // Groesse
- Point maPos; // Position
- short mnOrientation; // Rotation
- USHORT mnStyle; // Style
- BOOL mbVisible; // Ist Cursor sichtbar
- unsigned char mnDirection; // indicates direction
+ ImplCursorData* mpData; // Interne Daten
+ Window* mpWindow; // Window (only for shadow cursor)
+ long mnSlant; // Schraegstellung
+ long mnOffsetY; // Offset fuer Rotation
+ Size maSize; // Groesse
+ Point maPos; // Position
+ short mnOrientation; // Rotation
+ USHORT mnStyle; // Style
+ BOOL mbVisible; // Ist Cursor sichtbar
+ unsigned char mnDirection; // indicates direction
public:
- SAL_DLLPRIVATE void ImplDraw();
- SAL_DLLPRIVATE void ImplRestore();
+ SAL_DLLPRIVATE void ImplDraw();
+ SAL_DLLPRIVATE void ImplRestore();
DECL_DLLPRIVATE_LINK( ImplTimerHdl, AutoTimer* );
- SAL_DLLPRIVATE void ImplShow( BOOL bDrawDirect = TRUE );
- SAL_DLLPRIVATE void ImplHide();
- SAL_DLLPRIVATE void ImplNew();
+ SAL_DLLPRIVATE void ImplShow( BOOL bDrawDirect = TRUE );
+ SAL_DLLPRIVATE void ImplHide();
+ SAL_DLLPRIVATE void ImplNew();
public:
Cursor();
Cursor( const Cursor& rCursor );
~Cursor();
- void SetStyle( USHORT nStyle );
- USHORT GetStyle() const { return mnStyle; }
+ void SetStyle( USHORT nStyle );
+ USHORT GetStyle() const { return mnStyle; }
- void Show();
- void Hide();
- BOOL IsVisible() const { return mbVisible; }
+ void Show();
+ void Hide();
+ BOOL IsVisible() const { return mbVisible; }
- void SetWindow( Window* pWindow );
- Window* GetWindow() const { return mpWindow; }
+ void SetWindow( Window* pWindow );
+ Window* GetWindow() const { return mpWindow; }
- void SetPos( const Point& rNewPos );
- const Point& GetPos() const { return maPos; }
- void SetOffsetY( long mnOffsetY = 0 );
- long GetOffsetY() const { return mnOffsetY; }
+ void SetPos( const Point& rNewPos );
+ const Point& GetPos() const { return maPos; }
+ void SetOffsetY( long mnOffsetY = 0 );
+ long GetOffsetY() const { return mnOffsetY; }
- void SetSize( const Size& rNewSize );
- const Size& GetSize() const { return maSize; }
- void SetWidth( long nNewWidth );
- long GetWidth() const { return maSize.Width(); }
- void SetHeight( long nNewHeight );
- long GetHeight() const { return maSize.Height(); }
+ void SetSize( const Size& rNewSize );
+ const Size& GetSize() const { return maSize; }
+ void SetWidth( long nNewWidth );
+ long GetWidth() const { return maSize.Width(); }
+ void SetHeight( long nNewHeight );
+ long GetHeight() const { return maSize.Height(); }
- void SetSlant( long nSlant = 0 );
- long GetSlant() const { return mnSlant; }
+ void SetSlant( long nSlant = 0 );
+ long GetSlant() const { return mnSlant; }
- void SetOrientation( short nOrientation = 0 );
- short GetOrientation() const { return mnOrientation; }
+ void SetOrientation( short nOrientation = 0 );
+ short GetOrientation() const { return mnOrientation; }
- void SetDirection( unsigned char nDirection = 0 );
- unsigned char GetDirection() const { return mnDirection; }
+ void SetDirection( unsigned char nDirection = 0 );
+ unsigned char GetDirection() const { return mnDirection; }
- Cursor& operator=( const Cursor& rCursor );
- BOOL operator==( const Cursor& rCursor ) const;
- BOOL operator!=( const Cursor& rCursor ) const
+ Cursor& operator=( const Cursor& rCursor );
+ BOOL operator==( const Cursor& rCursor ) const;
+ BOOL operator!=( const Cursor& rCursor ) const
{ return !(Cursor::operator==( rCursor )); }
};
-#endif // _SV_CURSOR_HXX
+#endif // _SV_CURSOR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/cvtgrf.hxx b/vcl/inc/vcl/cvtgrf.hxx
index 37a3c271b52c..259f28c84b40 100644
--- a/vcl/inc/vcl/cvtgrf.hxx
+++ b/vcl/inc/vcl/cvtgrf.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +37,15 @@
// - GraphicConverter -
// --------------------
-struct ConvertData;
-class Graphic;
+struct ConvertData;
+class Graphic;
class VCL_DLLPUBLIC GraphicConverter
{
private:
- Link maFilterHdl;
- ConvertData* mpConvertData;
+ Link maFilterHdl;
+ ConvertData* mpConvertData;
public:
SAL_DLLPRIVATE ULONG ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
@@ -56,13 +56,13 @@ public:
GraphicConverter();
~GraphicConverter();
- static ULONG Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat = CVT_UNKNOWN );
- static ULONG Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat );
+ static ULONG Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat = CVT_UNKNOWN );
+ static ULONG Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat );
- ConvertData* GetConvertData() { return mpConvertData; }
+ ConvertData* GetConvertData() { return mpConvertData; }
- void SetFilterHdl( const Link& rLink ) { maFilterHdl = rLink; }
- const Link& GetFilterHdl() const { return maFilterHdl; }
+ void SetFilterHdl( const Link& rLink ) { maFilterHdl = rLink; }
+ const Link& GetFilterHdl() const { return maFilterHdl; }
};
#endif // _SV_CVTGRF_HXX
diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx
index f7c45f50ed16..0b41f6f64338 100644
--- a/vcl/inc/vcl/cvtsvm.hxx
+++ b/vcl/inc/vcl/cvtsvm.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,55 +37,55 @@
// - Defines -
// -----------
-#define CONVERT_TO_SVM1 0x00000001UL
-#define CONVERT_FROM_SVM1 0x00000002UL
+#define CONVERT_TO_SVM1 0x00000001UL
+#define CONVERT_FROM_SVM1 0x00000002UL
-#define GDI_PIXEL_ACTION 1
-#define GDI_POINT_ACTION 2
-#define GDI_LINE_ACTION 3
-#define GDI_RECT_ACTION 4
-#define GDI_ELLIPSE_ACTION 5
-#define GDI_ARC_ACTION 6
-#define GDI_PIE_ACTION 7
-#define GDI_INVERTRECT_ACTION 8
-#define GDI_HIGHLIGHTRECT_ACTION 9
-#define GDI_POLYLINE_ACTION 10
-#define GDI_POLYGON_ACTION 11
-#define GDI_POLYPOLYGON_ACTION 12
-#define GDI_TEXT_ACTION 13
-#define GDI_TEXTARRAY_ACTION 14
-#define GDI_STRETCHTEXT_ACTION 15
-#define GDI_ICON_ACTION 16
-#define GDI_BITMAP_ACTION 17
-#define GDI_BITMAPSCALE_ACTION 18
-#define GDI_PEN_ACTION 19
-#define GDI_FONT_ACTION 20
-#define GDI_BACKBRUSH_ACTION 21
-#define GDI_FILLBRUSH_ACTION 22
-#define GDI_MAPMODE_ACTION 23
-#define GDI_CLIPREGION_ACTION 24
-#define GDI_RASTEROP_ACTION 25
-#define GDI_PUSH_ACTION 26
-#define GDI_POP_ACTION 27
-#define GDI_MOVECLIPREGION_ACTION 28
-#define GDI_ISECTCLIPREGION_ACTION 29
-#define GDI_MTF_ACTION 30
-#define GDI_BITMAPSCALEPART_ACTION 32
-#define GDI_GRADIENT_ACTION 33
+#define GDI_PIXEL_ACTION 1
+#define GDI_POINT_ACTION 2
+#define GDI_LINE_ACTION 3
+#define GDI_RECT_ACTION 4
+#define GDI_ELLIPSE_ACTION 5
+#define GDI_ARC_ACTION 6
+#define GDI_PIE_ACTION 7
+#define GDI_INVERTRECT_ACTION 8
+#define GDI_HIGHLIGHTRECT_ACTION 9
+#define GDI_POLYLINE_ACTION 10
+#define GDI_POLYGON_ACTION 11
+#define GDI_POLYPOLYGON_ACTION 12
+#define GDI_TEXT_ACTION 13
+#define GDI_TEXTARRAY_ACTION 14
+#define GDI_STRETCHTEXT_ACTION 15
+#define GDI_ICON_ACTION 16
+#define GDI_BITMAP_ACTION 17
+#define GDI_BITMAPSCALE_ACTION 18
+#define GDI_PEN_ACTION 19
+#define GDI_FONT_ACTION 20
+#define GDI_BACKBRUSH_ACTION 21
+#define GDI_FILLBRUSH_ACTION 22
+#define GDI_MAPMODE_ACTION 23
+#define GDI_CLIPREGION_ACTION 24
+#define GDI_RASTEROP_ACTION 25
+#define GDI_PUSH_ACTION 26
+#define GDI_POP_ACTION 27
+#define GDI_MOVECLIPREGION_ACTION 28
+#define GDI_ISECTCLIPREGION_ACTION 29
+#define GDI_MTF_ACTION 30
+#define GDI_BITMAPSCALEPART_ACTION 32
+#define GDI_GRADIENT_ACTION 33
-#define GDI_TRANSPARENT_COMMENT 1024
-#define GDI_HATCH_COMMENT 1025
-#define GDI_REFPOINT_COMMENT 1026
-#define GDI_TEXTLINECOLOR_COMMENT 1027
-#define GDI_TEXTLINE_COMMENT 1028
-#define GDI_FLOATTRANSPARENT_COMMENT 1029
-#define GDI_GRADIENTEX_COMMENT 1030
-#define GDI_COMMENT_COMMENT 1031
-#define GDI_UNICODE_COMMENT 1032
+#define GDI_TRANSPARENT_COMMENT 1024
+#define GDI_HATCH_COMMENT 1025
+#define GDI_REFPOINT_COMMENT 1026
+#define GDI_TEXTLINECOLOR_COMMENT 1027
+#define GDI_TEXTLINE_COMMENT 1028
+#define GDI_FLOATTRANSPARENT_COMMENT 1029
+#define GDI_GRADIENTEX_COMMENT 1030
+#define GDI_COMMENT_COMMENT 1031
+#define GDI_UNICODE_COMMENT 1032
-#define GDI_LINEJOIN_ACTION 1033
-#define GDI_EXTENDEDPOLYGON_ACTION 1034
-#define GDI_LINEDASHDOT_ACTION 1035
+#define GDI_LINEJOIN_ACTION 1033
+#define GDI_EXTENDEDPOLYGON_ACTION 1034
+#define GDI_LINEDASHDOT_ACTION 1035
// ----------------
// - SVMConverter -
@@ -96,9 +96,9 @@ class Stack;
class VCL_DLLPUBLIC SVMConverter
{
private:
- SAL_DLLPRIVATE void ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf );
- SAL_DLLPRIVATE void ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf );
- SAL_DLLPRIVATE ULONG ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
+ SAL_DLLPRIVATE void ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf );
+ SAL_DLLPRIVATE void ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf );
+ SAL_DLLPRIVATE ULONG ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
VirtualDevice& rSaveVDev, BOOL& rRop_0_1,
Color& rLineCol, Stack& rLineColStack,
rtl_TextEncoding& rActualCharSet );
@@ -110,7 +110,7 @@ public:
private:
// Not implemented
SVMConverter( const SVMConverter& );
- SVMConverter& operator=( const SVMConverter& );
+ SVMConverter& operator=( const SVMConverter& );
};
#endif // _SV_CVTMTF_HXX
diff --git a/vcl/inc/vcl/dbggui.hxx b/vcl/inc/vcl/dbggui.hxx
index 326111273a1c..55777f7b06e3 100644
--- a/vcl/inc/vcl/dbggui.hxx
+++ b/vcl/inc/vcl/dbggui.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/decoview.hxx b/vcl/inc/vcl/decoview.hxx
index f5317c204a29..1b81be0bbbfe 100644
--- a/vcl/inc/vcl/decoview.hxx
+++ b/vcl/inc/vcl/decoview.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,45 +43,45 @@ class OutputDevice;
// ------------------------
// Flags for DrawSymbol()
-#define SYMBOL_DRAW_MONO ((USHORT)0x0001)
-#define SYMBOL_DRAW_DISABLE ((USHORT)0x0002)
+#define SYMBOL_DRAW_MONO ((USHORT)0x0001)
+#define SYMBOL_DRAW_DISABLE ((USHORT)0x0002)
// Flags for DrawFrame()
-#define FRAME_DRAW_IN ((USHORT)0x0001)
-#define FRAME_DRAW_OUT ((USHORT)0x0002)
-#define FRAME_DRAW_GROUP ((USHORT)0x0003)
-#define FRAME_DRAW_DOUBLEIN ((USHORT)0x0004)
-#define FRAME_DRAW_DOUBLEOUT ((USHORT)0x0005)
+#define FRAME_DRAW_IN ((USHORT)0x0001)
+#define FRAME_DRAW_OUT ((USHORT)0x0002)
+#define FRAME_DRAW_GROUP ((USHORT)0x0003)
+#define FRAME_DRAW_DOUBLEIN ((USHORT)0x0004)
+#define FRAME_DRAW_DOUBLEOUT ((USHORT)0x0005)
#define FRAME_DRAW_MENU ((USHORT)0x0010)
#define FRAME_DRAW_WINDOWBORDER ((USHORT)0x0020)
#define FRAME_DRAW_BORDERWINDOWBORDER ((USHORT)0x0040)
-#define FRAME_DRAW_MONO ((USHORT)0x1000)
-#define FRAME_DRAW_NODRAW ((USHORT)0x8000)
-#define FRAME_DRAW_STYLE ((USHORT)0x000F)
+#define FRAME_DRAW_MONO ((USHORT)0x1000)
+#define FRAME_DRAW_NODRAW ((USHORT)0x8000)
+#define FRAME_DRAW_STYLE ((USHORT)0x000F)
// Flags for DrawHighlightFrame()
-#define FRAME_HIGHLIGHT_IN ((USHORT)0x0001)
-#define FRAME_HIGHLIGHT_OUT ((USHORT)0x0002)
-#define FRAME_HIGHLIGHT_TESTBACKGROUND ((USHORT)0x4000)
-#define FRAME_HIGHLIGHT_STYLE ((USHORT)0x000F)
+#define FRAME_HIGHLIGHT_IN ((USHORT)0x0001)
+#define FRAME_HIGHLIGHT_OUT ((USHORT)0x0002)
+#define FRAME_HIGHLIGHT_TESTBACKGROUND ((USHORT)0x4000)
+#define FRAME_HIGHLIGHT_STYLE ((USHORT)0x000F)
// Flags for DrawButton()
-#define BUTTON_DRAW_DEFAULT ((USHORT)0x0001)
-#define BUTTON_DRAW_NOLIGHTBORDER ((USHORT)0x0002)
-#define BUTTON_DRAW_PRESSED ((USHORT)0x0004)
-#define BUTTON_DRAW_CHECKED ((USHORT)0x0008)
-#define BUTTON_DRAW_DONTKNOW ((USHORT)0x0010)
-#define BUTTON_DRAW_MONO ((USHORT)0x0020)
-#define BUTTON_DRAW_NOFILL ((USHORT)0x0040)
-#define BUTTON_DRAW_DISABLED ((USHORT)0x0080)
-#define BUTTON_DRAW_HIGHLIGHT ((USHORT)0x0100)
-#define BUTTON_DRAW_FLAT ((USHORT)0x0200)
-#define BUTTON_DRAW_NOTOPLIGHTBORDER ((USHORT)0x0400)
-#define BUTTON_DRAW_NOBOTTOMSHADOWBORDER ((USHORT)0x0800)
-#define BUTTON_DRAW_NOLEFTLIGHTBORDER ((USHORT)0x1000)
-#define BUTTON_DRAW_NOTEXT ((USHORT)0x2000)
-#define BUTTON_DRAW_NOIMAGE ((USHORT)0x4000)
-#define BUTTON_DRAW_NODRAW ((USHORT)0x8000)
+#define BUTTON_DRAW_DEFAULT ((USHORT)0x0001)
+#define BUTTON_DRAW_NOLIGHTBORDER ((USHORT)0x0002)
+#define BUTTON_DRAW_PRESSED ((USHORT)0x0004)
+#define BUTTON_DRAW_CHECKED ((USHORT)0x0008)
+#define BUTTON_DRAW_DONTKNOW ((USHORT)0x0010)
+#define BUTTON_DRAW_MONO ((USHORT)0x0020)
+#define BUTTON_DRAW_NOFILL ((USHORT)0x0040)
+#define BUTTON_DRAW_DISABLED ((USHORT)0x0080)
+#define BUTTON_DRAW_HIGHLIGHT ((USHORT)0x0100)
+#define BUTTON_DRAW_FLAT ((USHORT)0x0200)
+#define BUTTON_DRAW_NOTOPLIGHTBORDER ((USHORT)0x0400)
+#define BUTTON_DRAW_NOBOTTOMSHADOWBORDER ((USHORT)0x0800)
+#define BUTTON_DRAW_NOLEFTLIGHTBORDER ((USHORT)0x1000)
+#define BUTTON_DRAW_NOTEXT ((USHORT)0x2000)
+#define BUTTON_DRAW_NOIMAGE ((USHORT)0x4000)
+#define BUTTON_DRAW_NODRAW ((USHORT)0x8000)
// ------------------
// - DecorationView -
@@ -90,21 +90,21 @@ class OutputDevice;
class VCL_DLLPUBLIC DecorationView
{
private:
- OutputDevice* mpOutDev;
+ OutputDevice* mpOutDev;
public:
DecorationView( OutputDevice* pOutDev )
{ mpOutDev = pOutDev; }
- void DrawSymbol( const Rectangle& rRect, SymbolType eType,
+ void DrawSymbol( const Rectangle& rRect, SymbolType eType,
const Color& rColor, USHORT nStyle = 0 );
- void DrawFrame( const Rectangle& rRect,
+ void DrawFrame( const Rectangle& rRect,
const Color& rLeftTopColor,
const Color& rRightBottomColor );
- void DrawHighlightFrame( const Rectangle& rRect,
+ void DrawHighlightFrame( const Rectangle& rRect,
USHORT nStyle = FRAME_HIGHLIGHT_OUT );
- Rectangle DrawFrame( const Rectangle& rRect, USHORT nStyle = FRAME_DRAW_OUT );
- Rectangle DrawButton( const Rectangle& rRect, USHORT nStyle );
+ Rectangle DrawFrame( const Rectangle& rRect, USHORT nStyle = FRAME_DRAW_OUT );
+ Rectangle DrawButton( const Rectangle& rRect, USHORT nStyle );
void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
};
diff --git a/vcl/inc/vcl/dialog.hxx b/vcl/inc/vcl/dialog.hxx
index 404b18127af8..0f7dbfd0082a 100644
--- a/vcl/inc/vcl/dialog.hxx
+++ b/vcl/inc/vcl/dialog.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +46,15 @@ struct DialogImpl;
class VCL_DLLPUBLIC Dialog : public SystemWindow
{
private:
- Window* mpDialogParent;
- Dialog* mpPrevExecuteDlg;
+ Window* mpDialogParent;
+ Dialog* mpPrevExecuteDlg;
DialogImpl* mpDialogImpl;
- long mnMousePositioned;
- BOOL mbInExecute;
- BOOL mbOldSaveBack;
- BOOL mbInClose;
- BOOL mbModalMode;
- sal_Int8 mnCancelClose; //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
+ long mnMousePositioned;
+ BOOL mbInExecute;
+ BOOL mbOldSaveBack;
+ BOOL mbInClose;
+ BOOL mbModalMode;
+ sal_Int8 mnCancelClose; //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
SAL_DLLPRIVATE void ImplInitDialogData();
SAL_DLLPRIVATE void ImplInitSettings();
@@ -75,24 +75,24 @@ public:
protected:
Dialog( WindowType nType );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
public:
Dialog( Window* pParent, WinBits nStyle = WB_STDDIALOG );
Dialog( Window* pParent, const ResId& rResId );
virtual ~Dialog();
- virtual long Notify( NotifyEvent& rNEvt );
- virtual void StateChanged( StateChangedType nStateChange );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual BOOL Close();
+ virtual BOOL Close();
- virtual short Execute();
- BOOL IsInExecute() const { return mbInExecute; }
+ virtual short Execute();
+ BOOL IsInExecute() const { return mbInExecute; }
- sal_Int8 GetCloseFlag() const { return mnCancelClose; } //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
- void SetCloseFlag( sal_Int8 nCancel ) { mnCancelClose = nCancel; } //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
+ sal_Int8 GetCloseFlag() const { return mnCancelClose; } //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
+ void SetCloseFlag( sal_Int8 nCancel ) { mnCancelClose = nCancel; } //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
////////////////////////////////////////
// Dialog::Execute replacement API
@@ -109,17 +109,17 @@ public:
// Dialog::Execute replacement API
////////////////////////////////////////
- void EndDialog( long nResult = 0 );
- static void EndAllDialogs( Window* pParent=NULL );
+ void EndDialog( long nResult = 0 );
+ static void EndAllDialogs( Window* pParent=NULL );
void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- void SetModalInputMode( BOOL bModal );
- void SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs );
- BOOL IsModalInputMode() const { return mbModalMode; }
+ void SetModalInputMode( BOOL bModal );
+ void SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs );
+ BOOL IsModalInputMode() const { return mbModalMode; }
- void GrabFocusToFirstControl();
+ void GrabFocusToFirstControl();
};
// ------------------
@@ -149,15 +149,15 @@ public:
private:
using Window::Show;
- void Show( BOOL bVisible = TRUE );
+ void Show( BOOL bVisible = TRUE );
using Window::Hide;
- void Hide();
+ void Hide();
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE ModalDialog (const ModalDialog &);
SAL_DLLPRIVATE ModalDialog & operator= (const ModalDialog &);
};
-#endif // _SV_DIALOG_HXX
+#endif // _SV_DIALOG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/dllapi.h b/vcl/inc/vcl/dllapi.h
index dfe59bb5b739..3be73d34f0e5 100644
--- a/vcl/inc/vcl/dllapi.h
+++ b/vcl/inc/vcl/dllapi.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/dndevdis.hxx b/vcl/inc/vcl/dndevdis.hxx
index 41be5ba3fc38..e568cb582b5e 100644
--- a/vcl/inc/vcl/dndevdis.hxx
+++ b/vcl/inc/vcl/dndevdis.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +36,10 @@
#include <cppuhelper/implbase3.hxx>
#include <vcl/window.hxx>
-class DNDEventDispatcher: public ::cppu::WeakImplHelper3<
+class DNDEventDispatcher: public ::cppu::WeakImplHelper3<
::com::sun::star::datatransfer::dnd::XDropTargetListener,
::com::sun::star::datatransfer::dnd::XDropTargetDragContext,
- ::com::sun::star::datatransfer::dnd::XDragGestureListener >
+ ::com::sun::star::datatransfer::dnd::XDragGestureListener >
{
Window * m_pTopWindow;
Window * m_pCurrentWindow;
@@ -51,24 +51,24 @@ class DNDEventDispatcher: public ::cppu::WeakImplHelper3<
/*
* fire the events on the dnd listener container of the specified window
*/
-
- sal_Int32 fireDragEnterEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext,
- const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction,
+
+ sal_Int32 fireDragEnterEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext,
+ const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction,
const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& aFlavorList ) throw(::com::sun::star::uno::RuntimeException);
- sal_Int32 fireDragOverEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext,
- const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 fireDragOverEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext,
+ const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException);
sal_Int32 fireDragExitEvent( Window *pWindow ) throw(::com::sun::star::uno::RuntimeException);
- sal_Int32 fireDropActionChangedEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext,
- const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Int32 fireDropActionChangedEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext,
+ const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException);
- sal_Int32 fireDropEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& xContext,
- const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction,
+ sal_Int32 fireDropEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& xContext,
+ const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction,
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable ) throw(::com::sun::star::uno::RuntimeException);
- sal_Int32 fireDragGestureEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& xSource,
+ sal_Int32 fireDragGestureEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& xSource,
const ::com::sun::star::uno::Any event, const Point& rOrigin, const sal_Int8 nDragAction )throw(::com::sun::star::uno::RuntimeException);
public:
@@ -96,7 +96,7 @@ public:
/*
* XDragGestureListener
*/
-
+
virtual void SAL_CALL dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& dge ) throw(::com::sun::star::uno::RuntimeException);
@@ -104,11 +104,11 @@ public:
* XEventListener
*/
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& eo ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& eo ) throw(::com::sun::star::uno::RuntimeException);
};
//==================================================================================================
-//
+//
//==================================================================================================
#endif
diff --git a/vcl/inc/vcl/dndhelp.hxx b/vcl/inc/vcl/dndhelp.hxx
index 73adc8a4508a..b8d7749b1707 100644
--- a/vcl/inc/vcl/dndhelp.hxx
+++ b/vcl/inc/vcl/dndhelp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,14 +91,14 @@ class VCL_DLLPUBLIC DragAndDropWrapper :
private:
DragAndDropClient* mpClient;
-public:
+public:
DragAndDropWrapper( DragAndDropClient* pClient );
~DragAndDropWrapper();
// ::com::sun::star::uno::XInterface
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
- void SAL_CALL release() throw() { OWeakObject::release(); }
+ ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ void SAL_CALL release() throw() { OWeakObject::release(); }
// ::com::sun::star::lang::XEventListener
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
@@ -121,7 +121,7 @@ public:
void SAL_CALL dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw (::com::sun::star::uno::RuntimeException);
};
-}} // namespace vcl::unohelper
+}} // namespace vcl::unohelper
#endif // _VCL_DNDHELP_HXX
diff --git a/vcl/inc/vcl/dndlcon.hxx b/vcl/inc/vcl/dndlcon.hxx
index 1c3654c1a9ea..62ddbecafa1f 100644
--- a/vcl/inc/vcl/dndlcon.hxx
+++ b/vcl/inc/vcl/dndlcon.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +38,8 @@
#include <vcl/unohelp2.hxx>
-class DNDListenerContainer : public ::vcl::unohelper::MutexHelper,
- public ::cppu::WeakComponentImplHelper4<
+class DNDListenerContainer : public ::vcl::unohelper::MutexHelper,
+ public ::cppu::WeakComponentImplHelper4<
::com::sun::star::datatransfer::dnd::XDragGestureRecognizer, \
::com::sun::star::datatransfer::dnd::XDropTargetDragContext,
::com::sun::star::datatransfer::dnd::XDropTargetDropContext,
@@ -56,7 +56,7 @@ public:
DNDListenerContainer( sal_Int8 nDefaultActions );
virtual ~DNDListenerContainer();
- sal_uInt32 fireDropEvent(
+ sal_uInt32 fireDropEvent(
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& context,
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable );
@@ -77,14 +77,14 @@ public:
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions );
sal_uInt32 fireDragGestureEvent(
- sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY,
+ sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY,
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& dragSource,
const ::com::sun::star::uno::Any& triggerEvent );
/*
* XDragGestureRecognizer
*/
-
+
virtual void SAL_CALL addDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL resetRecognizer( ) throw(::com::sun::star::uno::RuntimeException);
@@ -108,7 +108,7 @@ public:
/*
* XDropTarget
*/
-
+
virtual void SAL_CALL addDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL isActive( ) throw(::com::sun::star::uno::RuntimeException);
@@ -119,7 +119,7 @@ public:
//==================================================================================================
-//
+//
//==================================================================================================
#endif
diff --git a/vcl/inc/vcl/dockingarea.hxx b/vcl/inc/vcl/dockingarea.hxx
index cc56a57f3315..3cda9021551b 100644
--- a/vcl/inc/vcl/dockingarea.hxx
+++ b/vcl/inc/vcl/dockingarea.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 <vcl/window.hxx>
// ------------------------------------------
-// A simple container for docked toolbars
+// A simple container for docked toolbars
// - its main purpose is theming support
// ------------------------------------------
diff --git a/vcl/inc/vcl/dockwin.hxx b/vcl/inc/vcl/dockwin.hxx
index 4950e267a786..33e5a4b201c5 100644
--- a/vcl/inc/vcl/dockwin.hxx
+++ b/vcl/inc/vcl/dockwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,30 +88,30 @@ class ImplDockingWindowWrapper
private:
// the original 'Docking'window
- Window *mpDockingWindow;
+ Window *mpDockingWindow;
// the original DockingWindow members
FloatingWindow* mpFloatWin;
- Window* mpOldBorderWin;
- Window* mpParent;
- Point maFloatPos;
- Point maDockPos;
- Point maMouseOff;
- Point maMouseStart;
- Size maRollUpOutSize;
- Size maMinOutSize;
- Size maMaxOutSize;
+ Window* mpOldBorderWin;
+ Window* mpParent;
+ Point maFloatPos;
+ Point maDockPos;
+ Point maMouseOff;
+ Point maMouseStart;
+ Size maRollUpOutSize;
+ Size maMinOutSize;
+ Size maMaxOutSize;
Rectangle maDragArea;
- long mnTrackX;
- long mnTrackY;
- long mnTrackWidth;
- long mnTrackHeight;
- sal_Int32 mnDockLeft;
- sal_Int32 mnDockTop;
- sal_Int32 mnDockRight;
- sal_Int32 mnDockBottom;
- WinBits mnFloatBits;
- BOOL mbDockCanceled:1,
+ long mnTrackX;
+ long mnTrackY;
+ long mnTrackWidth;
+ long mnTrackHeight;
+ sal_Int32 mnDockLeft;
+ sal_Int32 mnDockTop;
+ sal_Int32 mnDockRight;
+ sal_Int32 mnDockBottom;
+ WinBits mnFloatBits;
+ BOOL mbDockCanceled:1,
mbFloatPrevented:1,
mbDockable:1,
mbDocking:1,
@@ -126,7 +126,7 @@ private:
mbStartDockingEnabled:1,
mbLocked:1;
- void ImplInitData();
+ void ImplInitData();
DECL_LINK( PopupModeEnd, void* );
void ImplEnableStartDocking( BOOL bEnable = TRUE ) { mbStartDockingEnabled = bEnable; }
@@ -140,11 +140,11 @@ public:
BOOL ImplStartDocking( const Point& rPos );
// those methods actually call the corresponding handlers
- void StartDocking( const Point& rPos, Rectangle& rRect );
- BOOL Docking( const Point& rPos, Rectangle& rRect );
- void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
- BOOL PrepareToggleFloatingMode();
- void ToggleFloatingMode();
+ void StartDocking( const Point& rPos, Rectangle& rRect );
+ BOOL Docking( const Point& rPos, Rectangle& rRect );
+ void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ BOOL PrepareToggleFloatingMode();
+ void ToggleFloatingMode();
void SetDragArea( const Rectangle& rRect );
Rectangle GetDragArea() const;
@@ -156,60 +156,60 @@ public:
void StartPopupMode( ToolBox* pParentToolBox, ULONG nPopupModeFlags );
BOOL IsInPopupMode() const;
- void TitleButtonClick( USHORT nButton );
- void Pin();
- void Roll();
- void PopupModeEnd();
- void Resizing( Size& rSize );
- BOOL Close();
- void Tracking( const TrackingEvent& rTEvt );
- long Notify( NotifyEvent& rNEvt );
+ void TitleButtonClick( USHORT nButton );
+ void Pin();
+ void Roll();
+ void PopupModeEnd();
+ void Resizing( Size& rSize );
+ BOOL Close();
+ void Tracking( const TrackingEvent& rTEvt );
+ long Notify( NotifyEvent& rNEvt );
- void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
- BOOL IsTitleButtonVisible( USHORT nButton ) const;
+ void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
+ BOOL IsTitleButtonVisible( USHORT nButton ) const;
- void SetPin( BOOL bPin );
- BOOL IsPined() const;
+ void SetPin( BOOL bPin );
+ BOOL IsPined() const;
- void RollUp();
- void RollDown();
- BOOL IsRollUp() const;
+ void RollUp();
+ void RollDown();
+ BOOL IsRollUp() const;
- void SetRollUpOutputSizePixel( const Size& rSize );
- Size GetRollUpOutputSizePixel() const;
+ void SetRollUpOutputSizePixel( const Size& rSize );
+ Size GetRollUpOutputSizePixel() const;
- void SetMinOutputSizePixel( const Size& rSize );
- const Size& GetMinOutputSizePixel() const;
+ void SetMinOutputSizePixel( const Size& rSize );
+ const Size& GetMinOutputSizePixel() const;
- void SetMaxOutputSizePixel( const Size& rSize );
- const Size& GetMaxOutputSizePixel() const;
+ void SetMaxOutputSizePixel( const Size& rSize );
+ const Size& GetMaxOutputSizePixel() const;
- BOOL IsDocking() const { return mbDocking; }
- BOOL IsDockable() const { return mbDockable; }
- BOOL IsDockingCanceled() const { return mbDockCanceled; }
- BOOL IsFloatingPrevented() const { return mbFloatPrevented; }
+ BOOL IsDocking() const { return mbDocking; }
+ BOOL IsDockable() const { return mbDockable; }
+ BOOL IsDockingCanceled() const { return mbDockCanceled; }
+ BOOL IsFloatingPrevented() const { return mbFloatPrevented; }
- void SetFloatingMode( BOOL bFloatMode = FALSE );
- BOOL IsFloatingMode() const;
+ void SetFloatingMode( BOOL bFloatMode = FALSE );
+ BOOL IsFloatingMode() const;
FloatingWindow* GetFloatingWindow() const { return mpFloatWin; }
- void SetFloatingPos( const Point& rNewPos );
- Point GetFloatingPos() const;
+ void SetFloatingPos( const Point& rNewPos );
+ Point GetFloatingPos() const;
- void SetFloatStyle( WinBits nWinStyle );
- WinBits GetFloatStyle() const;
- void SetTabStop();
+ void SetFloatStyle( WinBits nWinStyle );
+ WinBits GetFloatStyle() const;
+ void SetTabStop();
- virtual void SetPosSizePixel( long nX, long nY,
+ virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
USHORT nFlags = WINDOW_POSSIZE_ALL );
- void SetPosSizePixel( const Point& rNewPos,
+ void SetPosSizePixel( const Point& rNewPos,
const Size& rNewSize )
{ mpDockingWindow->SetPosSizePixel( rNewPos, rNewSize ); }
- Point GetPosPixel() const;
- Size GetSizePixel() const;
- void SetOutputSizePixel( const Size& rNewSize );
- Size GetOutputSizePixel() const;
+ Point GetPosPixel() const;
+ Size GetSizePixel() const;
+ void SetOutputSizePixel( const Size& rNewSize );
+ Size GetOutputSizePixel() const;
};
class VCL_DLLPUBLIC DockingManager
@@ -238,11 +238,11 @@ public:
void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin, ULONG nPopupModeFlags );
BOOL IsInPopupMode( const Window *pWin );
- void EndPopupMode( const Window *pWin );
+ void EndPopupMode( const Window *pWin );
// required because those methods are not virtual in Window (!!!) and must
// be availbale from the toolkit
- void SetPosSizePixel( Window *pWin, long nX, long nY,
+ void SetPosSizePixel( Window *pWin, long nX, long nY,
long nWidth, long nHeight,
USHORT nFlags = WINDOW_POSSIZE_ALL );
Rectangle GetPosSizePixel( const Window *pWin );
@@ -257,24 +257,24 @@ class VCL_DLLPUBLIC DockingWindow : public Window
class ImplData;
private:
FloatingWindow* mpFloatWin;
- Window* mpOldBorderWin;
+ Window* mpOldBorderWin;
ImplData* mpImplData;
- Point maFloatPos;
- Point maDockPos;
- Point maMouseOff;
- Point maMouseStart;
- Size maRollUpOutSize;
- Size maMinOutSize;
- long mnTrackX;
- long mnTrackY;
- long mnTrackWidth;
- long mnTrackHeight;
- sal_Int32 mnDockLeft;
- sal_Int32 mnDockTop;
- sal_Int32 mnDockRight;
- sal_Int32 mnDockBottom;
- WinBits mnFloatBits;
- BOOL mbDockCanceled:1,
+ Point maFloatPos;
+ Point maDockPos;
+ Point maMouseOff;
+ Point maMouseStart;
+ Size maRollUpOutSize;
+ Size maMinOutSize;
+ long mnTrackX;
+ long mnTrackY;
+ long mnTrackWidth;
+ long mnTrackHeight;
+ sal_Int32 mnDockLeft;
+ sal_Int32 mnDockTop;
+ sal_Int32 mnDockRight;
+ sal_Int32 mnDockBottom;
+ WinBits mnFloatBits;
+ BOOL mbDockCanceled:1,
mbDockPrevented:1,
mbFloatPrevented:1,
mbDockable:1,
@@ -311,69 +311,69 @@ public:
DockingWindow( Window* pParent, const ResId& rResId );
~DockingWindow();
- virtual void StartDocking();
- virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
- virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
- virtual BOOL PrepareToggleFloatingMode();
- virtual void ToggleFloatingMode();
-
- virtual void TitleButtonClick( USHORT nButton );
- virtual void Pin();
- virtual void Roll();
- virtual void PopupModeEnd();
- virtual void Resizing( Size& rSize );
- virtual BOOL Close();
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual long Notify( NotifyEvent& rNEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
- BOOL IsTitleButtonVisible( USHORT nButton ) const;
-
- void SetPin( BOOL bPin );
- BOOL IsPined() const;
-
- void RollUp();
- void RollDown();
- BOOL IsRollUp() const;
-
- void SetRollUpOutputSizePixel( const Size& rSize );
- Size GetRollUpOutputSizePixel() const;
-
- void SetMinOutputSizePixel( const Size& rSize );
- const Size& GetMinOutputSizePixel() const;
-
- void SetMaxOutputSizePixel( const Size& rSize );
- const Size& GetMaxOutputSizePixel() const;
-
- BOOL IsDocking() const { return mbDocking; }
- BOOL IsDockable() const { return mbDockable; }
- BOOL IsDockingCanceled() const { return mbDockCanceled; }
- BOOL IsDockingPrevented() const { return mbDockPrevented; }
- BOOL IsFloatingPrevented() const { return mbFloatPrevented; }
-
- void SetFloatingMode( BOOL bFloatMode = FALSE );
- BOOL IsFloatingMode() const;
+ virtual void StartDocking();
+ virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ virtual BOOL PrepareToggleFloatingMode();
+ virtual void ToggleFloatingMode();
+
+ virtual void TitleButtonClick( USHORT nButton );
+ virtual void Pin();
+ virtual void Roll();
+ virtual void PopupModeEnd();
+ virtual void Resizing( Size& rSize );
+ virtual BOOL Close();
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
+ BOOL IsTitleButtonVisible( USHORT nButton ) const;
+
+ void SetPin( BOOL bPin );
+ BOOL IsPined() const;
+
+ void RollUp();
+ void RollDown();
+ BOOL IsRollUp() const;
+
+ void SetRollUpOutputSizePixel( const Size& rSize );
+ Size GetRollUpOutputSizePixel() const;
+
+ void SetMinOutputSizePixel( const Size& rSize );
+ const Size& GetMinOutputSizePixel() const;
+
+ void SetMaxOutputSizePixel( const Size& rSize );
+ const Size& GetMaxOutputSizePixel() const;
+
+ BOOL IsDocking() const { return mbDocking; }
+ BOOL IsDockable() const { return mbDockable; }
+ BOOL IsDockingCanceled() const { return mbDockCanceled; }
+ BOOL IsDockingPrevented() const { return mbDockPrevented; }
+ BOOL IsFloatingPrevented() const { return mbFloatPrevented; }
+
+ void SetFloatingMode( BOOL bFloatMode = FALSE );
+ BOOL IsFloatingMode() const;
FloatingWindow* GetFloatingWindow() const { return mpFloatWin; }
- void SetFloatingPos( const Point& rNewPos );
- Point GetFloatingPos() const;
+ void SetFloatingPos( const Point& rNewPos );
+ Point GetFloatingPos() const;
- void SetFloatStyle( WinBits nWinStyle );
- WinBits GetFloatStyle() const;
- void SetTabStop();
+ void SetFloatStyle( WinBits nWinStyle );
+ WinBits GetFloatStyle() const;
+ void SetTabStop();
- virtual void SetPosSizePixel( long nX, long nY,
+ virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
USHORT nFlags = WINDOW_POSSIZE_ALL );
- void SetPosSizePixel( const Point& rNewPos,
+ void SetPosSizePixel( const Point& rNewPos,
const Size& rNewSize )
{ Window::SetPosSizePixel( rNewPos, rNewSize ); }
- Point GetPosPixel() const;
- Size GetSizePixel() const;
- void SetOutputSizePixel( const Size& rNewSize );
- Size GetOutputSizePixel() const;
+ Point GetPosPixel() const;
+ Size GetSizePixel() const;
+ void SetOutputSizePixel( const Size& rNewSize );
+ Size GetOutputSizePixel() const;
};
inline void DockingWindow::SetPin( BOOL bPin )
@@ -448,6 +448,6 @@ inline void DockingWindow::SetFloatingPos( const Point& rNewPos )
}
-#endif // _SV_DOCKWIN_HXX
+#endif // _SV_DOCKWIN_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx
index 6b0ca12eae8e..b8549cdf855e 100644
--- a/vcl/inc/vcl/edit.hxx
+++ b/vcl/inc/vcl/edit.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +53,8 @@ struct Impl_IMEInfos;
// - Edit-Types -
// --------------
-#define EDIT_NOLIMIT STRING_LEN
-#define EDIT_UPDATEDATA_TIMEOUT 350
+#define EDIT_NOLIMIT STRING_LEN
+#define EDIT_UPDATEDATA_TIMEOUT 350
typedef XubString (*FncGetSpecialChars)( Window* pWin, const Font& rFont );
@@ -68,20 +68,20 @@ class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropCli
{
private:
Edit* mpSubEdit;
- Timer* mpUpdateDataTimer;
- DDInfo* mpDDInfo;
- Impl_IMEInfos* mpIMEInfos;
- XubString maText;
- XubString maSaveValue;
- XubString maUndoText;
- XubString maRedoText;
- long mnXOffset;
- Selection maSelection;
- USHORT mnAlign;
- xub_StrLen mnMaxTextLen;
- AutocompleteAction meAutocompleteAction;
- xub_Unicode mcEchoChar;
- BOOL mbModified:1,
+ Timer* mpUpdateDataTimer;
+ DDInfo* mpDDInfo;
+ Impl_IMEInfos* mpIMEInfos;
+ XubString maText;
+ XubString maSaveValue;
+ XubString maUndoText;
+ XubString maRedoText;
+ long mnXOffset;
+ Selection maSelection;
+ USHORT mnAlign;
+ xub_StrLen mnMaxTextLen;
+ AutocompleteAction meAutocompleteAction;
+ xub_Unicode mcEchoChar;
+ BOOL mbModified:1,
mbInternModified:1,
mbReadOnly:1,
mbInsertMode:1,
@@ -89,9 +89,9 @@ private:
mbIsSubEdit:1,
mbInMBDown:1,
mbActivePopup:1;
- Link maModifyHdl;
- Link maUpdateDataHdl;
- Link maAutocompleteHdl;
+ Link maModifyHdl;
+ Link maUpdateDataHdl;
+ Link maAutocompleteHdl;
DECL_DLLPRIVATE_LINK( ImplUpdateDataHdl, Timer* );
@@ -111,7 +111,7 @@ private:
SAL_DLLPRIVATE void ImplAlignAndPaint();
SAL_DLLPRIVATE xub_StrLen ImplGetCharPos( const Point& rWindowPos ) const;
SAL_DLLPRIVATE void ImplSetCursorPos( xub_StrLen nChar, BOOL bSelect );
- SAL_DLLPRIVATE void ImplShowDDCursor();
+ SAL_DLLPRIVATE void ImplShowDDCursor();
SAL_DLLPRIVATE void ImplHideDDCursor();
SAL_DLLPRIVATE BOOL ImplHandleKeyEvent( const KeyEvent& rKEvt );
SAL_DLLPRIVATE void ImplCopyToSelectionClipboard();
@@ -160,91 +160,91 @@ public:
Edit( Window* pParent, const ResId& rResId, bool bDisableAccessibleLabeledByRelation );
virtual ~Edit();
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void KeyInput( const KeyEvent& rKEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
- virtual void GetFocus();
- virtual void LoseFocus();
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void Command( const CommandEvent& rCEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual Window* GetPreferredKeyInputWindow();
- virtual void Modify();
- virtual void UpdateData();
+ virtual void Modify();
+ virtual void UpdateData();
- static BOOL IsCharInput( const KeyEvent& rKEvt );
+ static BOOL IsCharInput( const KeyEvent& rKEvt );
- virtual void SetModifyFlag();
- virtual void ClearModifyFlag();
- virtual BOOL IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
+ virtual void SetModifyFlag();
+ virtual void ClearModifyFlag();
+ virtual BOOL IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
- virtual void EnableUpdateData( ULONG nTimeout = EDIT_UPDATEDATA_TIMEOUT );
- virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = NULL; }
- virtual ULONG IsUpdateDataEnabled() const;
+ virtual void EnableUpdateData( ULONG nTimeout = EDIT_UPDATEDATA_TIMEOUT );
+ virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = NULL; }
+ virtual ULONG IsUpdateDataEnabled() const;
- void SetEchoChar( xub_Unicode c );
- xub_Unicode GetEchoChar() const { return mcEchoChar; }
+ void SetEchoChar( xub_Unicode c );
+ xub_Unicode GetEchoChar() const { return mcEchoChar; }
- virtual void SetReadOnly( BOOL bReadOnly = TRUE );
- virtual BOOL IsReadOnly() const { return mbReadOnly; }
+ virtual void SetReadOnly( BOOL bReadOnly = TRUE );
+ virtual BOOL IsReadOnly() const { return mbReadOnly; }
- void SetInsertMode( BOOL bInsert );
- BOOL IsInsertMode() const;
+ void SetInsertMode( BOOL bInsert );
+ BOOL IsInsertMode() const;
- virtual void SetMaxTextLen( xub_StrLen nMaxLen = EDIT_NOLIMIT );
- virtual xub_StrLen GetMaxTextLen() const { return mnMaxTextLen; }
+ virtual void SetMaxTextLen( xub_StrLen nMaxLen = EDIT_NOLIMIT );
+ virtual xub_StrLen GetMaxTextLen() const { return mnMaxTextLen; }
- virtual void SetSelection( const Selection& rSelection );
- virtual const Selection& GetSelection() const;
+ virtual void SetSelection( const Selection& rSelection );
+ virtual const Selection& GetSelection() const;
- virtual void ReplaceSelected( const XubString& rStr );
- virtual void DeleteSelected();
- virtual XubString GetSelected() const;
+ virtual void ReplaceSelected( const XubString& rStr );
+ virtual void DeleteSelected();
+ virtual XubString GetSelected() const;
- virtual void Cut();
- virtual void Copy();
- virtual void Paste();
- void Undo();
+ virtual void Cut();
+ virtual void Copy();
+ virtual void Paste();
+ void Undo();
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
- virtual XubString GetText() const;
+ virtual void SetText( const XubString& rStr );
+ virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
+ virtual XubString GetText() const;
- void SaveValue() { maSaveValue = GetText(); }
- const XubString& GetSavedValue() const { return maSaveValue; }
+ void SaveValue() { maSaveValue = GetText(); }
+ const XubString& GetSavedValue() const { return maSaveValue; }
- virtual void SetModifyHdl( const Link& rLink ) { maModifyHdl = rLink; }
- virtual const Link& GetModifyHdl() const { return maModifyHdl; }
- virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; }
+ virtual void SetModifyHdl( const Link& rLink ) { maModifyHdl = rLink; }
+ virtual const Link& GetModifyHdl() const { return maModifyHdl; }
+ virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; }
virtual const Link& GetUpdateDataHdl() const { return maUpdateDataHdl; }
- void SetSubEdit( Edit* pEdit );
- Edit* GetSubEdit() const { return mpSubEdit; }
+ void SetSubEdit( Edit* pEdit );
+ Edit* GetSubEdit() const { return mpSubEdit; }
- void SetAutocompleteHdl( const Link& rHdl );
- const Link& GetAutocompleteHdl() const { return maAutocompleteHdl; }
- AutocompleteAction GetAutocompleteAction() const { return meAutocompleteAction; }
+ void SetAutocompleteHdl( const Link& rHdl );
+ const Link& GetAutocompleteHdl() const { return maAutocompleteHdl; }
+ AutocompleteAction GetAutocompleteAction() const { return meAutocompleteAction; }
- virtual Size CalcMinimumSize() const;
+ virtual Size CalcMinimumSize() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
- virtual Size CalcSize( USHORT nChars ) const;
- virtual xub_StrLen GetMaxVisChars() const;
+ virtual Size CalcSize( USHORT nChars ) const;
+ virtual xub_StrLen GetMaxVisChars() const;
xub_StrLen GetCharPos( const Point& rWindowPos ) const;
-
+
// shows a warning box saying "text too long, truncated"
static void ShowTruncationWarning( Window* pParent );
- static void SetGetSpecialCharsFunction( FncGetSpecialChars fn );
- static FncGetSpecialChars GetGetSpecialCharsFunction();
+ static void SetGetSpecialCharsFunction( FncGetSpecialChars fn );
+ static FncGetSpecialChars GetGetSpecialCharsFunction();
- static PopupMenu* CreatePopupMenu();
- static void DeletePopupMenu( PopupMenu* pMenu );
+ static PopupMenu* CreatePopupMenu();
+ static void DeletePopupMenu( PopupMenu* pMenu );
virtual XubString GetSurroundingText() const;
virtual Selection GetSurroundingTextSelection() const;
@@ -258,6 +258,6 @@ inline ULONG Edit::IsUpdateDataEnabled() const
return FALSE;
}
-#endif // _SV_EDIT_HXX
+#endif // _SV_EDIT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/event.hxx b/vcl/inc/vcl/event.hxx
index ef4eb87a9b18..64377b6a7ac2 100644
--- a/vcl/inc/vcl/event.hxx
+++ b/vcl/inc/vcl/event.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace com { namespace sun { namespace star { namespace awt {
enum TextDirectionality {
TextDirectionality_LeftToRight_TopToBottom,
TextDirectionality_RightToLeft_TopToBottom,
- TextDirectionality_TopToBottom_RightToLeft
+ TextDirectionality_TopToBottom_RightToLeft
};
// ------------
@@ -219,7 +219,7 @@ public:
const Point& GetMousePosPixel() const;
USHORT GetMode() const { return mnMode; }
BOOL KeyboardActivated() const { return mbKeyboardActivated; }
- void SetKeyboardActivated( BOOL bKeyboard ) { mbKeyboardActivated = bKeyboard; }
+ void SetKeyboardActivated( BOOL bKeyboard ) { mbKeyboardActivated = bKeyboard; }
};
inline HelpEvent::HelpEvent()
diff --git a/vcl/inc/vcl/evntpost.hxx b/vcl/inc/vcl/evntpost.hxx
index 2a27bbfff033..aa70ed36f528 100644
--- a/vcl/inc/vcl/evntpost.hxx
+++ b/vcl/inc/vcl/evntpost.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/extoutdevdata.hxx b/vcl/inc/vcl/extoutdevdata.hxx
index 28f9a05c5b9f..c23c8b27b7a2 100644
--- a/vcl/inc/vcl/extoutdevdata.hxx
+++ b/vcl/inc/vcl/extoutdevdata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx
index c5cfe8947796..a1e989c29329 100644
--- a/vcl/inc/vcl/field.hxx
+++ b/vcl/inc/vcl/field.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -209,10 +209,10 @@ public:
void SetUseThousandSep( BOOL b );
BOOL IsUseThousandSep() const { return mbThousandSep; }
-
+
void SetShowTrailingZeros( BOOL bShowTrailingZeros );
BOOL IsShowTrailingZeros() const { return mbShowTrailingZeros; }
-
+
void SetUserValue( sal_Int64 nNewValue );
virtual void SetValue( sal_Int64 nNewValue );
@@ -598,7 +598,7 @@ public:
FieldUnit eInUnit, MapUnit eOutUnit );
static double ConvertDoubleValue( double nValue, USHORT nDecDigits,
MapUnit eInUnit, FieldUnit eOutUnit );
-
+
// for backwards compatibility
// caution: conversion to double loses precision
static double ConvertDoubleValue( sal_Int64 nValue, sal_Int64 nBaseValue, USHORT nDecDigits,
diff --git a/vcl/inc/vcl/fixbrd.hxx b/vcl/inc/vcl/fixbrd.hxx
index 70916cfb8704..295de6de5e82 100644
--- a/vcl/inc/vcl/fixbrd.hxx
+++ b/vcl/inc/vcl/fixbrd.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +38,11 @@
// - FixedBorder-Types -
// ---------------------
-#define FIXEDBORDER_TYPE_IN (FRAME_DRAW_IN)
-#define FIXEDBORDER_TYPE_OUT (FRAME_DRAW_OUT)
-#define FIXEDBORDER_TYPE_GROUP (FRAME_DRAW_GROUP)
-#define FIXEDBORDER_TYPE_DOUBLEIN (FRAME_DRAW_DOUBLEIN)
-#define FIXEDBORDER_TYPE_DOUBLEOUT (FRAME_DRAW_DOUBLEOUT)
+#define FIXEDBORDER_TYPE_IN (FRAME_DRAW_IN)
+#define FIXEDBORDER_TYPE_OUT (FRAME_DRAW_OUT)
+#define FIXEDBORDER_TYPE_GROUP (FRAME_DRAW_GROUP)
+#define FIXEDBORDER_TYPE_DOUBLEIN (FRAME_DRAW_DOUBLEIN)
+#define FIXEDBORDER_TYPE_DOUBLEOUT (FRAME_DRAW_DOUBLEOUT)
// ---------------
// - FixedBorder -
@@ -51,16 +51,16 @@
class VCL_DLLPUBLIC FixedBorder : public Control
{
private:
- USHORT mnType;
- BOOL mbTransparent;
+ USHORT mnType;
+ BOOL mbTransparent;
private:
using Control::ImplInitSettings;
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplInitSettings();
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize );
public:
@@ -68,18 +68,18 @@ public:
FixedBorder( Window* pParent, const ResId& rResId );
~FixedBorder();
- virtual void Paint( const Rectangle& rRect );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
- virtual void Resize();
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void SetTransparent( BOOL bTransparent );
- BOOL IsTransparent() const { return mbTransparent; }
- void SetBorderType( USHORT nType );
- USHORT GetBorderType() const { return mnType; }
+ void SetTransparent( BOOL bTransparent );
+ BOOL IsTransparent() const { return mbTransparent; }
+ void SetBorderType( USHORT nType );
+ USHORT GetBorderType() const { return mnType; }
};
-#endif // _SV_FIXBRD_HXX
+#endif // _SV_FIXBRD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index d14cc750d6ea..a2a52ef598b1 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,7 @@ private:
SAL_DLLPRIVATE void ImplDraw( bool bLayout = false );
protected:
- virtual void FillLayoutData() const;
+ virtual void FillLayoutData() const;
virtual const Font&
GetCanonicalFont( const StyleSettings& _rStyle ) const;
virtual const Color&
diff --git a/vcl/inc/vcl/fldunit.hxx b/vcl/inc/vcl/fldunit.hxx
index 93c89ada98a0..c5a84fcaa8a0 100644
--- a/vcl/inc/vcl/fldunit.hxx
+++ b/vcl/inc/vcl/fldunit.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/floatwin.hxx b/vcl/inc/vcl/floatwin.hxx
index eb15b116938e..7007c7ec7724 100644
--- a/vcl/inc/vcl/floatwin.hxx
+++ b/vcl/inc/vcl/floatwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,34 +40,34 @@ class PopupModeEvent;
// - FloatingWindow-Types -
// ------------------------
-#define FLOATWIN_POPUPMODE_ALLOWTEAROFF ((ULONG)0x00000001)
-#define FLOATWIN_POPUPMODE_ANIMATIONSLIDE ((ULONG)0x00000002)
-#define FLOATWIN_POPUPMODE_NOAUTOARRANGE ((ULONG)0x00000004)
-#define FLOATWIN_POPUPMODE_NOANIMATION ((ULONG)0x00000008)
-#define FLOATWIN_POPUPMODE_DOWN ((ULONG)0x00000010)
-#define FLOATWIN_POPUPMODE_UP ((ULONG)0x00000020)
-#define FLOATWIN_POPUPMODE_LEFT ((ULONG)0x00000040)
-#define FLOATWIN_POPUPMODE_RIGHT ((ULONG)0x00000080)
-#define FLOATWIN_POPUPMODE_NOFOCUSCLOSE ((ULONG)0x00000100)
-#define FLOATWIN_POPUPMODE_NOKEYCLOSE ((ULONG)0x00000200)
-#define FLOATWIN_POPUPMODE_NOMOUSECLOSE ((ULONG)0x00000400)
-#define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE ((ULONG)0x00000800)
-#define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE ((ULONG)0x00001000)
-#define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ((ULONG)0x00002000)
+#define FLOATWIN_POPUPMODE_ALLOWTEAROFF ((ULONG)0x00000001)
+#define FLOATWIN_POPUPMODE_ANIMATIONSLIDE ((ULONG)0x00000002)
+#define FLOATWIN_POPUPMODE_NOAUTOARRANGE ((ULONG)0x00000004)
+#define FLOATWIN_POPUPMODE_NOANIMATION ((ULONG)0x00000008)
+#define FLOATWIN_POPUPMODE_DOWN ((ULONG)0x00000010)
+#define FLOATWIN_POPUPMODE_UP ((ULONG)0x00000020)
+#define FLOATWIN_POPUPMODE_LEFT ((ULONG)0x00000040)
+#define FLOATWIN_POPUPMODE_RIGHT ((ULONG)0x00000080)
+#define FLOATWIN_POPUPMODE_NOFOCUSCLOSE ((ULONG)0x00000100)
+#define FLOATWIN_POPUPMODE_NOKEYCLOSE ((ULONG)0x00000200)
+#define FLOATWIN_POPUPMODE_NOMOUSECLOSE ((ULONG)0x00000400)
+#define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE ((ULONG)0x00000800)
+#define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE ((ULONG)0x00001000)
+#define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ((ULONG)0x00002000)
#define FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ((ULONG)0x00004000)
-#define FLOATWIN_POPUPMODE_NEWLEVEL ((ULONG)0x00008000)
-#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ((ULONG)0x00010000)
-#define FLOATWIN_POPUPMODE_GRABFOCUS ((ULONG)0x00020000)
+#define FLOATWIN_POPUPMODE_NEWLEVEL ((ULONG)0x00008000)
+#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ((ULONG)0x00010000)
+#define FLOATWIN_POPUPMODE_GRABFOCUS ((ULONG)0x00020000)
-#define FLOATWIN_POPUPMODEEND_CANCEL ((USHORT)0x0001)
-#define FLOATWIN_POPUPMODEEND_TEAROFF ((USHORT)0x0002)
-#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((USHORT)0x0004)
-#define FLOATWIN_POPUPMODEEND_CLOSEALL ((USHORT)0x0008)
+#define FLOATWIN_POPUPMODEEND_CANCEL ((USHORT)0x0001)
+#define FLOATWIN_POPUPMODEEND_TEAROFF ((USHORT)0x0002)
+#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((USHORT)0x0004)
+#define FLOATWIN_POPUPMODEEND_CLOSEALL ((USHORT)0x0008)
-#define FLOATWIN_TITLE_NORMAL ((USHORT)0x0001)
-#define FLOATWIN_TITLE_TEAROFF ((USHORT)0x0002)
-#define FLOATWIN_TITLE_POPUP ((USHORT)0x0004)
-#define FLOATWIN_TITLE_NONE ((USHORT)0x0008)
+#define FLOATWIN_TITLE_NORMAL ((USHORT)0x0001)
+#define FLOATWIN_TITLE_TEAROFF ((USHORT)0x0002)
+#define FLOATWIN_TITLE_POPUP ((USHORT)0x0004)
+#define FLOATWIN_TITLE_NONE ((USHORT)0x0008)
// ------------------
// - FloatingWindow -
@@ -78,22 +78,22 @@ class VCL_DLLPUBLIC FloatingWindow : public SystemWindow
class ImplData;
private:
FloatingWindow* mpNextFloat;
- Window* mpFirstPopupModeWin;
+ Window* mpFirstPopupModeWin;
ImplData* mpImplData;
- Rectangle maFloatRect;
- ULONG mnPostId;
- ULONG mnPopupModeFlags;
- USHORT mnTitle;
- USHORT mnOldTitle;
- BOOL mbInPopupMode;
- BOOL mbPopupMode;
- BOOL mbPopupModeCanceled;
- BOOL mbPopupModeTearOff;
- BOOL mbMouseDown;
- BOOL mbOldSaveBackMode;
- BOOL mbGrabFocus; // act as key input window, although focus is not set
- BOOL mbInCleanUp;
- Link maPopupModeEndHdl;
+ Rectangle maFloatRect;
+ ULONG mnPostId;
+ ULONG mnPopupModeFlags;
+ USHORT mnTitle;
+ USHORT mnOldTitle;
+ BOOL mbInPopupMode;
+ BOOL mbPopupMode;
+ BOOL mbPopupModeCanceled;
+ BOOL mbPopupModeTearOff;
+ BOOL mbMouseDown;
+ BOOL mbOldSaveBackMode;
+ BOOL mbGrabFocus; // act as key input window, although focus is not set
+ BOOL mbInCleanUp;
+ Link maPopupModeEndHdl;
SAL_DLLPRIVATE void ImplCallPopupModeEnd();
DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void* );
@@ -109,18 +109,18 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
-#define IMPL_FLOATWIN_HITTEST_OUTSIDE ((USHORT)0x0001)
-#define IMPL_FLOATWIN_HITTEST_WINDOW ((USHORT)0x0002)
-#define IMPL_FLOATWIN_HITTEST_RECT ((USHORT)0x0004)
+#define IMPL_FLOATWIN_HITTEST_OUTSIDE ((USHORT)0x0001)
+#define IMPL_FLOATWIN_HITTEST_WINDOW ((USHORT)0x0002)
+#define IMPL_FLOATWIN_HITTEST_RECT ((USHORT)0x0004)
SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( Window* pReference, const Point& rPos, USHORT& rHitTest );
SAL_DLLPRIVATE FloatingWindow* ImplFindLastLevelFloat();
- SAL_DLLPRIVATE BOOL ImplIsFloatPopupModeWindow( const Window* pWindow );
- SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = TRUE; }
- SAL_DLLPRIVATE BOOL ImplIsMouseDown() const { return mbMouseDown; }
- SAL_DLLPRIVATE static Point ImplCalcPos( Window* pWindow,
+ SAL_DLLPRIVATE BOOL ImplIsFloatPopupModeWindow( const Window* pWindow );
+ SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = TRUE; }
+ SAL_DLLPRIVATE BOOL ImplIsMouseDown() const { return mbMouseDown; }
+ SAL_DLLPRIVATE static Point ImplCalcPos( Window* pWindow,
const Rectangle& rRect, ULONG nFlags,
USHORT& rArrangeIndex );
- SAL_DLLPRIVATE void ImplEndPopupMode( USHORT nFlags = 0, ULONG nFocusId = 0 );
+ SAL_DLLPRIVATE void ImplEndPopupMode( USHORT nFlags = 0, ULONG nFocusId = 0 );
SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect();
SAL_DLLPRIVATE BOOL ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
@@ -129,29 +129,29 @@ public:
FloatingWindow( Window* pParent, const ResId& rResId );
~FloatingWindow();
- virtual long Notify( NotifyEvent& rNEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- virtual void PopupModeEnd();
-
- void SetTitleType( USHORT nTitle );
- USHORT GetTitleType() const { return mnTitle; }
-
- void StartPopupMode( const Rectangle& rRect, ULONG nFlags = 0 );
- void StartPopupMode( ToolBox* pBox, ULONG nFlags = 0 );
- void EndPopupMode( USHORT nFlags = 0 );
- void AddPopupModeWindow( Window* pWindow );
- void RemovePopupModeWindow( Window* pWindow );
- ULONG GetPopupModeFlags() const { return mnPopupModeFlags; }
- void SetPopupModeFlags( ULONG nFlags ) { mnPopupModeFlags = nFlags; }
- BOOL IsInPopupMode() const { return mbPopupMode; }
- BOOL IsInCleanUp() const { return mbInCleanUp; }
- BOOL IsPopupModeCanceled() const { return mbPopupModeCanceled; }
- BOOL IsPopupModeTearOff() const { return mbPopupModeTearOff; }
-
- void SetPopupModeEndHdl( const Link& rLink ) { maPopupModeEndHdl = rLink; }
- const Link& GetPopupModeEndHdl() const { return maPopupModeEndHdl; }
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual void PopupModeEnd();
+
+ void SetTitleType( USHORT nTitle );
+ USHORT GetTitleType() const { return mnTitle; }
+
+ void StartPopupMode( const Rectangle& rRect, ULONG nFlags = 0 );
+ void StartPopupMode( ToolBox* pBox, ULONG nFlags = 0 );
+ void EndPopupMode( USHORT nFlags = 0 );
+ void AddPopupModeWindow( Window* pWindow );
+ void RemovePopupModeWindow( Window* pWindow );
+ ULONG GetPopupModeFlags() const { return mnPopupModeFlags; }
+ void SetPopupModeFlags( ULONG nFlags ) { mnPopupModeFlags = nFlags; }
+ BOOL IsInPopupMode() const { return mbPopupMode; }
+ BOOL IsInCleanUp() const { return mbInCleanUp; }
+ BOOL IsPopupModeCanceled() const { return mbPopupModeCanceled; }
+ BOOL IsPopupModeTearOff() const { return mbPopupModeTearOff; }
+
+ void SetPopupModeEndHdl( const Link& rLink ) { maPopupModeEndHdl = rLink; }
+ const Link& GetPopupModeEndHdl() const { return maPopupModeEndHdl; }
BOOL GrabsFocus() const { return mbGrabFocus; }
diff --git a/vcl/inc/vcl/fntstyle.hxx b/vcl/inc/vcl/fntstyle.hxx
index 72705fde16f2..103863dbe272 100644
--- a/vcl/inc/vcl/fntstyle.hxx
+++ b/vcl/inc/vcl/fntstyle.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +48,9 @@ enum FontRelief { RELIEF_NONE, RELIEF_EMBOSSED, RELIEF_ENGRAVED, FontRelief_FORC
// --------------
typedef BYTE FontKerning;
-#define KERNING_FONTSPECIFIC ((FontKerning)0x01)
-#define KERNING_ASIAN ((FontKerning)0x02)
+#define KERNING_FONTSPECIFIC ((FontKerning)0x01)
+#define KERNING_ASIAN ((FontKerning)0x02)
-#endif // _VCL_FNTSTYLE_HXX
+#endif // _VCL_FNTSTYLE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/font.hxx b/vcl/inc/vcl/font.hxx
index d9c4d62f57d0..e59575d9407f 100644
--- a/vcl/inc/vcl/font.hxx
+++ b/vcl/inc/vcl/font.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +50,8 @@ class ImplFontAttributes;
class VCL_DLLPUBLIC Font
{
private:
- Impl_Font* mpImplFont;
- void MakeUnique();
+ Impl_Font* mpImplFont;
+ void MakeUnique();
public:
Font();
@@ -61,83 +61,83 @@ public:
Font( FontFamily eFamily, const Size& );
~Font();
- void SetColor( const Color& );
- const Color& GetColor() const;
- void SetFillColor( const Color& );
- const Color& GetFillColor() const;
- void SetTransparent( BOOL bTransparent );
- BOOL IsTransparent() const;
- void SetAlign( FontAlign );
- FontAlign GetAlign() const;
-
- void SetName( const String& rFamilyName );
- const String& GetName() const;
- void SetStyleName( const String& rStyleName );
- const String& GetStyleName() const;
- void SetSize( const Size& );
- const Size& GetSize() const;
- void SetHeight( long nHeight );
- long GetHeight() const;
- void SetWidth( long nWidth );
- long GetWidth() const;
-
- void SetFamily( FontFamily );
- FontFamily GetFamily() const;
- void SetCharSet( rtl_TextEncoding );
- rtl_TextEncoding GetCharSet() const;
- void SetLanguage( LanguageType );
- LanguageType GetLanguage() const;
- void SetCJKContextLanguage( LanguageType );
- LanguageType GetCJKContextLanguage() const;
- void SetPitch( FontPitch ePitch );
- FontPitch GetPitch() const;
-
- void SetOrientation( short nLineOrientation );
- short GetOrientation() const;
- void SetVertical( BOOL bVertical );
- BOOL IsVertical() const;
- void SetKerning( FontKerning nKerning );
- FontKerning GetKerning() const;
- BOOL IsKerning() const;
-
- void SetWeight( FontWeight );
- FontWeight GetWeight() const;
- void SetWidthType( FontWidth );
- FontWidth GetWidthType() const;
- void SetItalic( FontItalic );
- FontItalic GetItalic() const;
- void SetOutline( BOOL bOutline );
- BOOL IsOutline() const;
- void SetShadow( BOOL bShadow );
- BOOL IsShadow() const;
- void SetRelief( FontRelief );
- FontRelief GetRelief() const;
- void SetUnderline( FontUnderline );
- FontUnderline GetUnderline() const;
- void SetOverline( FontUnderline );
- FontUnderline GetOverline() const;
- void SetStrikeout( FontStrikeout );
- FontStrikeout GetStrikeout() const;
- void SetEmphasisMark( FontEmphasisMark );
- FontEmphasisMark GetEmphasisMark() const;
- void SetWordLineMode( BOOL bWordLine );
- BOOL IsWordLineMode() const;
-
- void Merge( const Font& rFont );
+ void SetColor( const Color& );
+ const Color& GetColor() const;
+ void SetFillColor( const Color& );
+ const Color& GetFillColor() const;
+ void SetTransparent( BOOL bTransparent );
+ BOOL IsTransparent() const;
+ void SetAlign( FontAlign );
+ FontAlign GetAlign() const;
+
+ void SetName( const String& rFamilyName );
+ const String& GetName() const;
+ void SetStyleName( const String& rStyleName );
+ const String& GetStyleName() const;
+ void SetSize( const Size& );
+ const Size& GetSize() const;
+ void SetHeight( long nHeight );
+ long GetHeight() const;
+ void SetWidth( long nWidth );
+ long GetWidth() const;
+
+ void SetFamily( FontFamily );
+ FontFamily GetFamily() const;
+ void SetCharSet( rtl_TextEncoding );
+ rtl_TextEncoding GetCharSet() const;
+ void SetLanguage( LanguageType );
+ LanguageType GetLanguage() const;
+ void SetCJKContextLanguage( LanguageType );
+ LanguageType GetCJKContextLanguage() const;
+ void SetPitch( FontPitch ePitch );
+ FontPitch GetPitch() const;
+
+ void SetOrientation( short nLineOrientation );
+ short GetOrientation() const;
+ void SetVertical( BOOL bVertical );
+ BOOL IsVertical() const;
+ void SetKerning( FontKerning nKerning );
+ FontKerning GetKerning() const;
+ BOOL IsKerning() const;
+
+ void SetWeight( FontWeight );
+ FontWeight GetWeight() const;
+ void SetWidthType( FontWidth );
+ FontWidth GetWidthType() const;
+ void SetItalic( FontItalic );
+ FontItalic GetItalic() const;
+ void SetOutline( BOOL bOutline );
+ BOOL IsOutline() const;
+ void SetShadow( BOOL bShadow );
+ BOOL IsShadow() const;
+ void SetRelief( FontRelief );
+ FontRelief GetRelief() const;
+ void SetUnderline( FontUnderline );
+ FontUnderline GetUnderline() const;
+ void SetOverline( FontUnderline );
+ FontUnderline GetOverline() const;
+ void SetStrikeout( FontStrikeout );
+ FontStrikeout GetStrikeout() const;
+ void SetEmphasisMark( FontEmphasisMark );
+ FontEmphasisMark GetEmphasisMark() const;
+ void SetWordLineMode( BOOL bWordLine );
+ BOOL IsWordLineMode() const;
+
+ void Merge( const Font& rFont );
void GetFontAttributes( ImplFontAttributes& rAttrs ) const;
- Font& operator=( const Font& );
- BOOL operator==( const Font& ) const;
- BOOL operator!=( const Font& rFont ) const
+ Font& operator=( const Font& );
+ BOOL operator==( const Font& ) const;
+ BOOL operator!=( const Font& rFont ) const
{ return !(Font::operator==( rFont )); }
- BOOL IsSameInstance( const Font& ) const;
-
- friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Font& );
- friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const Font& );
+ BOOL IsSameInstance( const Font& ) const;
+ friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Font& );
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const Font& );
+
static Font identifyFont( const void* pBuffer, sal_uInt32 nLen );
};
-#endif // _VCL_FONT_HXX
+#endif // _VCL_FONT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/fontcache.hxx b/vcl/inc/vcl/fontcache.hxx
index 726549ae6e5b..8beb1e4c6a70 100644
--- a/vcl/inc/vcl/fontcache.hxx
+++ b/vcl/inc/vcl/fontcache.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,24 +49,24 @@ class VCL_DLLPUBLIC FontCache
typedef std::list< PrintFontManager::PrintFont* > FontCacheEntry;
struct FontFile
{
- FontCacheEntry m_aEntry;
+ FontCacheEntry m_aEntry;
};
typedef std::hash_map< ::rtl::OString, FontFile, ::rtl::OStringHash > FontDirMap;
struct FontDir
{
- sal_Int64 m_nTimestamp;
- bool m_bNoFiles;
+ sal_Int64 m_nTimestamp;
+ bool m_bNoFiles;
bool m_bUserOverrideOnly;
- FontDirMap m_aEntries;
+ FontDirMap m_aEntries;
FontDir() : m_nTimestamp(0), m_bNoFiles(false), m_bUserOverrideOnly( false ) {}
};
-
+
typedef std::hash_map< int, FontDir > FontCacheData;
- FontCacheData m_aCache;
- String m_aCacheFile;
- bool m_bDoFlush;
+ FontCacheData m_aCache;
+ String m_aCacheFile;
+ bool m_bDoFlush;
void read();
void clearCache();
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index ef9175cde698..8a97e0449053 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,7 +80,7 @@ enum type {
UltraExpanded = 9
};
}
-
+
namespace pitch
{
enum type {
@@ -110,13 +110,13 @@ enum type {
namespace family
{
enum type {
- Unknown = 0,
- Decorative = 1,
+ Unknown = 0,
+ Decorative = 1,
Modern = 2,
- Roman = 3,
- Script = 4,
- Swiss = 5,
- System = 6
+ Roman = 3,
+ Script = 4,
+ Swiss = 5,
+ System = 6
};
}
@@ -130,12 +130,12 @@ enum type {
};
}
-namespace fcstatus
+namespace fcstatus
{
-enum type {
+enum type {
istrue,
isunset,
- isfalse
+ isfalse
};
}
@@ -151,19 +151,19 @@ enum type {
struct FastPrintFontInfo
{
- fontID m_nID; // FontID
- fonttype::type m_eType;
-
+ fontID m_nID; // FontID
+ fonttype::type m_eType;
+
// font attributes
- rtl::OUString m_aFamilyName;
+ rtl::OUString m_aFamilyName;
rtl::OUString m_aStyleName;
- std::list< rtl::OUString > m_aAliases;
- family::type m_eFamilyStyle;
- italic::type m_eItalic;
- width::type m_eWidth;
- weight::type m_eWeight;
- pitch::type m_ePitch;
- rtl_TextEncoding m_aEncoding;
+ std::list< rtl::OUString > m_aAliases;
+ family::type m_eFamilyStyle;
+ italic::type m_eItalic;
+ width::type m_eWidth;
+ weight::type m_eWeight;
+ pitch::type m_ePitch;
+ rtl_TextEncoding m_aEncoding;
bool m_bSubsettable;
bool m_bEmbeddable;
@@ -181,10 +181,10 @@ struct FastPrintFontInfo
struct PrintFontInfo : public FastPrintFontInfo
{
- int m_nAscend;
- int m_nDescend;
- int m_nLeading;
- int m_nWidth;
+ int m_nAscend;
+ int m_nDescend;
+ int m_nLeading;
+ int m_nWidth;
PrintFontInfo() :
FastPrintFontInfo(),
@@ -257,20 +257,20 @@ class VCL_DLLPUBLIC PrintFontManager
bool m_bKernPairsQueried;
std::list< KernPair > m_aXKernPairs;
std::list< KernPair > m_aYKernPairs;
- std::hash_map< sal_Unicode, bool > m_bVerticalSubstitutions;
+ std::hash_map< sal_Unicode, bool > m_bVerticalSubstitutions;
PrintFontMetrics() : m_bKernPairsQueried( false ) {}
-
+
bool isEmpty() const { return m_aMetrics.empty(); }
};
struct PrintFont
{
fonttype::type m_eType;
-
+
// font attributes
int m_nFamilyName; // atom
- std::list< int > m_aAliases;
+ std::list< int > m_aAliases;
int m_nPSName; // atom
rtl::OUString m_aStyleName;
italic::type m_eItalic;
@@ -278,22 +278,22 @@ class VCL_DLLPUBLIC PrintFontManager
weight::type m_eWeight;
pitch::type m_ePitch;
rtl_TextEncoding m_aEncoding;
- bool m_bFontEncodingOnly; // set if font should be only accessed by builtin encoding
+ bool m_bFontEncodingOnly; // set if font should be only accessed by builtin encoding
CharacterMetric m_aGlobalMetricX;
CharacterMetric m_aGlobalMetricY;
PrintFontMetrics* m_pMetrics;
int m_nAscend;
int m_nDescend;
int m_nLeading;
- int m_nXMin; // font bounding box
- int m_nYMin;
- int m_nXMax;
- int m_nYMax;
- bool m_bHaveVerticalSubstitutedGlyphs;
+ int m_nXMin; // font bounding box
+ int m_nYMin;
+ int m_nXMax;
+ int m_nYMax;
+ bool m_bHaveVerticalSubstitutedGlyphs;
bool m_bUserOverride;
- std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
- std::map< sal_Unicode, rtl::OString > m_aNonEncoded;
+ std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
+ std::map< sal_Unicode, rtl::OString > m_aNonEncoded;
PrintFont( fonttype::type eType );
virtual ~PrintFont();
@@ -319,11 +319,11 @@ class VCL_DLLPUBLIC PrintFontManager
struct TrueTypeFontFile : public PrintFont
{
- int m_nDirectory; // atom containing system dependent path
+ int m_nDirectory; // atom containing system dependent path
rtl::OString m_aFontFile; // relative to directory
rtl::OString m_aXLFD; // mainly for administration, contains the XLFD from fonts.dir
int m_nCollectionEntry; // -1 for regular fonts, 0 to ... for fonts stemming from collections
- unsigned int m_nTypeFlags; // copyright bits and PS-OpenType flag
+ unsigned int m_nTypeFlags; // copyright bits and PS-OpenType flag
TrueTypeFontFile();
virtual ~TrueTypeFontFile();
@@ -342,25 +342,25 @@ class VCL_DLLPUBLIC PrintFontManager
struct XLFDEntry
{
- static const int MaskFoundry = 1;
- static const int MaskFamily = 2;
- static const int MaskAddStyle = 4;
- static const int MaskItalic = 8;
- static const int MaskWeight = 16;
- static const int MaskWidth = 32;
- static const int MaskPitch = 64;
- static const int MaskEncoding = 128;
-
- int nMask; // contains a bit set for every valid member
-
- rtl::OString aFoundry;
- rtl::OString aFamily;
- rtl::OString aAddStyle;
- italic::type eItalic;
- weight::type eWeight;
- width::type eWidth;
- pitch::type ePitch;
- rtl_TextEncoding aEncoding;
+ static const int MaskFoundry = 1;
+ static const int MaskFamily = 2;
+ static const int MaskAddStyle = 4;
+ static const int MaskItalic = 8;
+ static const int MaskWeight = 16;
+ static const int MaskWidth = 32;
+ static const int MaskPitch = 64;
+ static const int MaskEncoding = 128;
+
+ int nMask; // contains a bit set for every valid member
+
+ rtl::OString aFoundry;
+ rtl::OString aFamily;
+ rtl::OString aAddStyle;
+ italic::type eItalic;
+ weight::type eWeight;
+ width::type eWidth;
+ pitch::type ePitch;
+ rtl_TextEncoding aEncoding;
XLFDEntry() { nMask = 0; }
@@ -375,7 +375,7 @@ class VCL_DLLPUBLIC PrintFontManager
std::hash_map< int, family::type > m_aFamilyTypes;
std::list< rtl::OUString > m_aPrinterDrivers;
std::list< rtl::OString > m_aFontDirectories;
- std::list< int > m_aPrivateFontDirectories;
+ std::list< int > m_aPrivateFontDirectories;
std::map< struct XLFDEntry, std::list< struct XLFDEntry > >
m_aXLFD_Aliases;
utl::MultiAtomProvider* m_pAtoms;
@@ -392,14 +392,14 @@ class VCL_DLLPUBLIC PrintFontManager
m_aAdobenameToUnicode;
std::hash_multimap< sal_Unicode, rtl::OString >
m_aUnicodeToAdobename;
- std::hash_multimap< sal_Unicode, sal_uInt8 > m_aUnicodeToAdobecode;
- std::hash_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode;
+ std::hash_multimap< sal_Unicode, sal_uInt8 > m_aUnicodeToAdobecode;
+ std::hash_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode;
mutable FontCache* m_pFontCache;
bool m_bFontconfigSuccess;
mutable std::vector< fontID > m_aOverrideFonts;
-
+
rtl::OString getAfmFile( PrintFont* pFont ) const;
rtl::OString getFontFile( PrintFont* pFont ) const;
@@ -447,18 +447,18 @@ class VCL_DLLPUBLIC PrintFontManager
since fontconfig is asked for font substitutes before OOo will check for font availability
and fontconfig will happily substitute fonts it doesn't know (e.g. "Arial Narrow" -> "DejaVu Sans Book"!)
- it becomes necessary to tell the library about all the hidden font treasures
-
+ it becomes necessary to tell the library about all the hidden font treasures
+
@returns
true if libfontconfig accepted the directory
false else (e.g. no libfontconfig found)
*/
bool addFontconfigDir(const rtl::OString& rDirectory);
-
+
static bool parseXLFD( const rtl::OString& rXLFD, XLFDEntry& rEntry );
void parseXLFD_appendAliases( const std::list< rtl::OString >& rXLFDs, std::list< XLFDEntry >& rEntries ) const;
void initFontsAlias();
-
+
bool readOverrideMetrics();
PrintFontManager();
@@ -466,17 +466,17 @@ class VCL_DLLPUBLIC PrintFontManager
public:
static PrintFontManager& get(); // one instance only
- int addFontFile( const rtl::OString& rFileName, int nFaceNum );
+ int addFontFile( const rtl::OString& rFileName, int nFaceNum );
void initialize();
// returns the number of managed fonts
int getFontCount() const { return m_aFonts.size(); }
-
+
// caution: the getFontList* methods can change the font list on demand
// depending on the pParser argument. That is getFontCount() may
// return a larger value after getFontList()
-
+
// returns the ids of all managed fonts. on pParser != NULL
// all fonttype::Builtin type fonts are not listed
// which do not occur in the PPD of pParser
@@ -503,7 +503,7 @@ public:
// get a specific fonts family name aliases
void getFontFamilyAliases( fontID nFontID ) const;
-
+
// get a specific fonts type
fonttype::type getFontType( fontID nFontID ) const
{
@@ -733,8 +733,8 @@ public:
bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale );
bool getFontOptions( const FastPrintFontInfo&, int nSize, void (*subcallback)(void*), ImplFontOptions& rResult ) const;
- rtl::OUString Substitute( const rtl::OUString& rFontName, rtl::OUString& rMissingCodes,
- const rtl::OString& rLangAttrib, italic::type& rItalic, weight::type& rWeight,
+ rtl::OUString Substitute( const rtl::OUString& rFontName, rtl::OUString& rMissingCodes,
+ const rtl::OString& rLangAttrib, italic::type& rItalic, weight::type& rWeight,
width::type& rWidth, pitch::type& rPitch) const;
bool hasFontconfig() const { return m_bFontconfigSuccess; }
diff --git a/vcl/inc/vcl/fontsubset.hxx b/vcl/inc/vcl/fontsubset.hxx
index f710434698de..392ad42a7c56 100644
--- a/vcl/inc/vcl/fontsubset.hxx
+++ b/vcl/inc/vcl/fontsubset.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,60 +38,60 @@ namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font
class FontSubsetInfo
{
public:
- explicit FontSubsetInfo( void );
- virtual ~FontSubsetInfo( void );
+ explicit FontSubsetInfo( void );
+ virtual ~FontSubsetInfo( void );
enum FontType {
- NO_FONT = 0,
- SFNT_TTF = 1<<1, // SFNT container with TrueType glyphs
- SFNT_CFF = 1<<2, // SFNT container with CFF-container
- TYPE1_PFA = 1<<3, // PSType1 Postscript Font Ascii
- TYPE1_PFB = 1<<4, // PSType1 Postscript Font Binary
- CFF_FONT = 1<<5, // CFF-container with PSType2 glyphs
- TYPE3_FONT = 1<<6, // PSType3 Postscript font
- TYPE42_FONT = 1<<7, // PSType42 wrapper for an SFNT_TTF
- ANY_SFNT = SFNT_TTF | SFNT_CFF,
- ANY_TYPE1 = TYPE1_PFA | TYPE1_PFB,
- ANY_FONT = 0xFF
+ NO_FONT = 0,
+ SFNT_TTF = 1<<1, // SFNT container with TrueType glyphs
+ SFNT_CFF = 1<<2, // SFNT container with CFF-container
+ TYPE1_PFA = 1<<3, // PSType1 Postscript Font Ascii
+ TYPE1_PFB = 1<<4, // PSType1 Postscript Font Binary
+ CFF_FONT = 1<<5, // CFF-container with PSType2 glyphs
+ TYPE3_FONT = 1<<6, // PSType3 Postscript font
+ TYPE42_FONT = 1<<7, // PSType42 wrapper for an SFNT_TTF
+ ANY_SFNT = SFNT_TTF | SFNT_CFF,
+ ANY_TYPE1 = TYPE1_PFA | TYPE1_PFB,
+ ANY_FONT = 0xFF
};
- bool LoadFont( FontType eInFontType,
+ bool LoadFont( FontType eInFontType,
const unsigned char* pFontBytes, int nByteLength );
- bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont );
+ bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont );
- bool CreateFontSubset( int nOutFontTypeMask,
+ bool CreateFontSubset( int nOutFontTypeMask,
FILE* pOutFile, const char* pOutFontName,
const long* pReqGlyphIds, const sal_uInt8* pEncodedIds,
int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL );
public: // TODO: make subsetter results private and provide accessor methods instead
// subsetter-provided subset details needed by e.g. Postscript or PDF
- String m_aPSName;
- int m_nAscent; // all metrics in PS font units
- int m_nDescent;
- int m_nCapHeight;
- Rectangle m_aFontBBox;
- FontType m_nFontType; // font-type of subset result
+ String m_aPSName;
+ int m_nAscent; // all metrics in PS font units
+ int m_nDescent;
+ int m_nCapHeight;
+ Rectangle m_aFontBBox;
+ FontType m_nFontType; // font-type of subset result
private:
// input-font-specific details
- unsigned const char* mpInFontBytes;
- int mnInByteLength;
- FontType meInFontType; // allowed mask of input font-types
- vcl::_TrueTypeFont* mpSftTTFont;
+ unsigned const char* mpInFontBytes;
+ int mnInByteLength;
+ FontType meInFontType; // allowed mask of input font-types
+ vcl::_TrueTypeFont* mpSftTTFont;
// subset-request details
- int mnReqFontTypeMask; // allowed subset-target font types
- FILE* mpOutFile;
- const char* mpReqFontName;
- const long* mpReqGlyphIds;
- const sal_uInt8* mpReqEncodedIds;
- int mnReqGlyphCount;
+ int mnReqFontTypeMask; // allowed subset-target font types
+ FILE* mpOutFile;
+ const char* mpReqFontName;
+ const long* mpReqGlyphIds;
+ const sal_uInt8* mpReqEncodedIds;
+ int mnReqGlyphCount;
protected:
- bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL );
- bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL );
- bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL );
+ bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL );
+ bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL );
+ bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL );
};
#endif // _SV_FONTSUBSET_HXX
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index 9e40829a26f6..14cc127aae02 100644
--- a/vcl/inc/vcl/gdimtf.hxx
+++ b/vcl/inc/vcl/gdimtf.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,20 +55,20 @@ class Gradient;
#define GDI_METAFILE_LABEL_NOTFOUND ((ULONG)0xFFFFFFFF)
#ifndef METAFILE_END
-#define METAFILE_END GDI_METAFILE_END
+#define METAFILE_END GDI_METAFILE_END
#endif
#ifndef METAFILE_LABEL_NOTFOUND
-#define METAFILE_LABEL_NOTFOUND GDI_METAFILE_LABEL_NOTFOUND
+#define METAFILE_LABEL_NOTFOUND GDI_METAFILE_LABEL_NOTFOUND
#endif
// -----------
// - Defines -
// -----------
-#define MTF_MIRROR_NONE 0x00000000UL
-#define MTF_MIRROR_HORZ 0x00000001UL
-#define MTF_MIRROR_VERT 0x00000002UL
+#define MTF_MIRROR_NONE 0x00000000UL
+#define MTF_MIRROR_HORZ 0x00000001UL
+#define MTF_MIRROR_VERT 0x00000002UL
// ---------
// - Enums -
@@ -112,29 +112,29 @@ private:
SAL_DLLPRIVATE static Color ImplColAdjustFnc( const Color& rColor, const void* pColParam );
SAL_DLLPRIVATE static BitmapEx ImplBmpAdjustFnc( const BitmapEx& rBmpEx, const void* pBmpParam );
- SAL_DLLPRIVATE static Color ImplColConvertFnc( const Color& rColor, const void* pColParam );
+ SAL_DLLPRIVATE static Color ImplColConvertFnc( const Color& rColor, const void* pColParam );
SAL_DLLPRIVATE static BitmapEx ImplBmpConvertFnc( const BitmapEx& rBmpEx, const void* pBmpParam );
- SAL_DLLPRIVATE static Color ImplColMonoFnc( const Color& rColor, const void* pColParam );
+ SAL_DLLPRIVATE static Color ImplColMonoFnc( const Color& rColor, const void* pColParam );
SAL_DLLPRIVATE static BitmapEx ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpParam );
- SAL_DLLPRIVATE static Color ImplColReplaceFnc( const Color& rColor, const void* pColParam );
+ SAL_DLLPRIVATE static Color ImplColReplaceFnc( const Color& rColor, const void* pColParam );
SAL_DLLPRIVATE static BitmapEx ImplBmpReplaceFnc( const BitmapEx& rBmpEx, const void* pBmpParam );
- SAL_DLLPRIVATE void ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pColParam,
+ SAL_DLLPRIVATE void ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pColParam,
BmpExchangeFnc pFncBmp, const void* pBmpParam );
- SAL_DLLPRIVATE Point ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt,
+ SAL_DLLPRIVATE Point ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos );
- SAL_DLLPRIVATE Polygon ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
+ SAL_DLLPRIVATE Polygon ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos );
- SAL_DLLPRIVATE PolyPolygon ImplGetRotatedPolyPolygon( const PolyPolygon& rPoly, const Point& rRotatePt,
+ SAL_DLLPRIVATE PolyPolygon ImplGetRotatedPolyPolygon( const PolyPolygon& rPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos );
- SAL_DLLPRIVATE void ImplAddGradientEx( GDIMetaFile& rMtf,
+ SAL_DLLPRIVATE void ImplAddGradientEx( GDIMetaFile& rMtf,
const OutputDevice& rMapDev,
const PolyPolygon& rPolyPoly,
- const Gradient& rGrad );
- SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rDestSize );
+ const Gradient& rGrad );
+ SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rDestSize );
SAL_DLLPRIVATE void ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct, OutputDevice* pOut );
@@ -146,16 +146,16 @@ protected:
public:
GDIMetaFile();
GDIMetaFile( const GDIMetaFile& rMtf );
- virtual ~GDIMetaFile();
+ virtual ~GDIMetaFile();
using List::operator==;
using List::operator!=;
GDIMetaFile& operator=( const GDIMetaFile& rMtf );
- BOOL operator==( const GDIMetaFile& rMtf ) const;
- BOOL operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
+ BOOL operator==( const GDIMetaFile& rMtf ) const;
+ BOOL operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
void Clear();
- sal_Bool IsEqual( const GDIMetaFile& rMtf ) const;
+ sal_Bool IsEqual( const GDIMetaFile& rMtf ) const;
BOOL Mirror( ULONG nMirrorFlags );
void Move( long nX, long nY );
// additional Move method getting specifics how to handle MapMode( MAP_PIXEL )
@@ -173,12 +173,12 @@ public:
*/
Rectangle GetBoundRect( OutputDevice& i_rReference );
- void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0,
- short nChannelRPercent = 0, short nChannelGPercent = 0,
+ void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0,
+ short nChannelRPercent = 0, short nChannelGPercent = 0,
short nChannelBPercent = 0, double fGamma = 1.0, BOOL bInvert = FALSE );
- void Convert( MtfConversion eConversion );
- void ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
- void ReplaceColors( const Color* pSearchColors, const Color* rReplaceColors,
+ void Convert( MtfConversion eConversion );
+ void ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
+ void ReplaceColors( const Color* pSearchColors, const Color* rReplaceColors,
ULONG nColorCount, ULONG* pTols = NULL );
GDIMetaFile GetMonochromeMtf( const Color& rCol ) const;
@@ -205,12 +205,12 @@ public:
ULONG GetActionCount() const { return Count(); }
void AddAction( MetaAction* pAction );
void AddAction( MetaAction* pAction, ULONG nPos );
- void RemoveAction( ULONG nPos );
+ void RemoveAction( ULONG nPos );
MetaAction* CopyAction( ULONG nPos ) const;
MetaAction* GetCurAction() const { return (MetaAction*) GetCurObject(); }
MetaAction* GetAction( ULONG nAction ) const { return (MetaAction*) GetObject( nAction ); }
- MetaAction* FirstAction() { return (MetaAction*) First(); }
- MetaAction* NextAction() { return (MetaAction*) Next(); }
+ MetaAction* FirstAction() { return (MetaAction*) First(); }
+ MetaAction* NextAction() { return (MetaAction*) Next(); }
MetaAction* ReplaceAction( MetaAction* pAction, ULONG nAction ) { return (MetaAction*) Replace( pAction, nAction ); }
ULONG GetActionPos( const String& rLabel );
@@ -231,13 +231,13 @@ public:
void SetHookHdl( const Link& rLink ) { aHookHdlLink = rLink; }
const Link& GetHookHdl() const { return aHookHdlLink; }
- ULONG GetChecksum() const;
+ ULONG GetChecksum() const;
ULONG GetSizeBytes() const;
// Methoden zum Lesen und Schreiben des neuen Formats;
// die Read-Methode kann auch das alte Format lesen
- SvStream& Read( SvStream& rIStm );
- SvStream& Write( SvStream& rOStm );
+ SvStream& Read( SvStream& rIStm );
+ SvStream& Write( SvStream& rOStm );
// Stream-Operatoren schreiben das alte Format (noch)
// und lesen sowohl das alte wie auch das neue Format
diff --git a/vcl/inc/vcl/gfxlink.hxx b/vcl/inc/vcl/gfxlink.hxx
index 5f1b593ba44a..29b6461b8f5a 100644
--- a/vcl/inc/vcl/gfxlink.hxx
+++ b/vcl/inc/vcl/gfxlink.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +40,8 @@
struct ImpBuffer
{
- ULONG mnRefCount;
- BYTE* mpBuffer;
+ ULONG mnRefCount;
+ BYTE* mpBuffer;
ImpBuffer( ULONG nSize )
{
@@ -60,18 +60,18 @@ struct ImpBuffer
struct ImpSwap
{
- rtl::OUString maURL;
- ULONG mnDataSize;
- ULONG mnRefCount;
+ rtl::OUString maURL;
+ ULONG mnDataSize;
+ ULONG mnRefCount;
ImpSwap( BYTE* pData, ULONG nDataSize );
~ImpSwap();
- BYTE* GetData() const;
+ BYTE* GetData() const;
- BOOL IsSwapped() const { return maURL.getLength() > 0; }
+ BOOL IsSwapped() const { return maURL.getLength() > 0; }
- void WriteTo( SvStream& rOStm ) const;
+ void WriteTo( SvStream& rOStm ) const;
};
// --------------
@@ -82,14 +82,14 @@ struct ImpGfxLink
{
MapMode maPrefMapMode;
Size maPrefSize;
- bool mbPrefMapModeValid;
- bool mbPrefSizeValid;
+ bool mbPrefMapModeValid;
+ bool mbPrefSizeValid;
- ImpGfxLink() :
+ ImpGfxLink() :
maPrefMapMode(),
maPrefSize(),
- mbPrefMapModeValid( false ),
- mbPrefSizeValid( false )
+ mbPrefMapModeValid( false ),
+ mbPrefSizeValid( false )
{}
};
@@ -101,20 +101,20 @@ struct ImpGfxLink
enum GfxLinkType
{
- GFX_LINK_TYPE_NONE = 0,
- GFX_LINK_TYPE_EPS_BUFFER = 1,
- GFX_LINK_TYPE_NATIVE_GIF = 2, // Don't forget to update the following defines
- GFX_LINK_TYPE_NATIVE_JPG = 3, // Don't forget to update the following defines
- GFX_LINK_TYPE_NATIVE_PNG = 4, // Don't forget to update the following defines
- GFX_LINK_TYPE_NATIVE_TIF = 5, // Don't forget to update the following defines
- GFX_LINK_TYPE_NATIVE_WMF = 6, // Don't forget to update the following defines
- GFX_LINK_TYPE_NATIVE_MET = 7, // Don't forget to update the following defines
- GFX_LINK_TYPE_NATIVE_PCT = 8, // Don't forget to update the following defines
- GFX_LINK_TYPE_USER = 0xffff
+ GFX_LINK_TYPE_NONE = 0,
+ GFX_LINK_TYPE_EPS_BUFFER = 1,
+ GFX_LINK_TYPE_NATIVE_GIF = 2, // Don't forget to update the following defines
+ GFX_LINK_TYPE_NATIVE_JPG = 3, // Don't forget to update the following defines
+ GFX_LINK_TYPE_NATIVE_PNG = 4, // Don't forget to update the following defines
+ GFX_LINK_TYPE_NATIVE_TIF = 5, // Don't forget to update the following defines
+ GFX_LINK_TYPE_NATIVE_WMF = 6, // Don't forget to update the following defines
+ GFX_LINK_TYPE_NATIVE_MET = 7, // Don't forget to update the following defines
+ GFX_LINK_TYPE_NATIVE_PCT = 8, // Don't forget to update the following defines
+ GFX_LINK_TYPE_USER = 0xffff
};
-#define GFX_LINK_FIRST_NATIVE_ID GFX_LINK_TYPE_NATIVE_GIF
-#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_PCT
+#define GFX_LINK_FIRST_NATIVE_ID GFX_LINK_TYPE_NATIVE_GIF
+#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_PCT
// -----------
// - GfxLink -
@@ -129,58 +129,58 @@ class VCL_DLLPUBLIC GfxLink
{
private:
- GfxLinkType meType;
- ImpBuffer* mpBuf;
- ImpSwap* mpSwap;
- sal_uInt32 mnBufSize;
- sal_uInt32 mnUserId;
+ GfxLinkType meType;
+ ImpBuffer* mpBuf;
+ ImpSwap* mpSwap;
+ sal_uInt32 mnBufSize;
+ sal_uInt32 mnUserId;
ImpGfxLink* mpImpData;
- ULONG mnExtra2;
+ ULONG mnExtra2;
- SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink );
+ SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink );
-public:
+public:
GfxLink();
GfxLink( const GfxLink& );
GfxLink( const String& rPath, GfxLinkType nType );
GfxLink( BYTE* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, BOOL bOwns );
~GfxLink();
- GfxLink& operator=( const GfxLink& );
- sal_Bool IsEqual( const GfxLink& ) const;
+ GfxLink& operator=( const GfxLink& );
+ sal_Bool IsEqual( const GfxLink& ) const;
- GfxLinkType GetType() const;
+ GfxLinkType GetType() const;
- void SetUserId( sal_uInt32 nUserId ) { mnUserId = nUserId; }
- sal_uInt32 GetUserId() const { return mnUserId; }
+ void SetUserId( sal_uInt32 nUserId ) { mnUserId = nUserId; }
+ sal_uInt32 GetUserId() const { return mnUserId; }
- sal_uInt32 GetDataSize() const;
- void SetData( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns );
- const BYTE* GetData() const;
+ sal_uInt32 GetDataSize() const;
+ void SetData( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns );
+ const BYTE* GetData() const;
- const Size& GetPrefSize() const;
- void SetPrefSize( const Size& rPrefSize );
- bool IsPrefSizeValid();
+ const Size& GetPrefSize() const;
+ void SetPrefSize( const Size& rPrefSize );
+ bool IsPrefSizeValid();
- const MapMode& GetPrefMapMode() const;
- void SetPrefMapMode( const MapMode& rPrefMapMode );
- bool IsPrefMapModeValid();
+ const MapMode& GetPrefMapMode() const;
+ void SetPrefMapMode( const MapMode& rPrefMapMode );
+ bool IsPrefMapModeValid();
- BOOL IsNative() const;
- BOOL IsUser() const { return( GFX_LINK_TYPE_USER == meType ); }
+ BOOL IsNative() const;
+ BOOL IsUser() const { return( GFX_LINK_TYPE_USER == meType ); }
- BOOL LoadNative( Graphic& rGraphic );
+ BOOL LoadNative( Graphic& rGraphic );
- BOOL ExportNative( SvStream& rOStream ) const;
+ BOOL ExportNative( SvStream& rOStream ) const;
- void SwapOut();
- void SwapIn();
- BOOL IsSwappedOut() const { return( mpSwap != NULL ); }
+ void SwapOut();
+ void SwapIn();
+ BOOL IsSwappedOut() const { return( mpSwap != NULL ); }
public:
- friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink );
- friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink );
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink );
+ friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink );
};
#endif
diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx
index 525ac7357271..9731440a6c98 100644
--- a/vcl/inc/vcl/glyphcache.hxx
+++ b/vcl/inc/vcl/glyphcache.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
explicit GlyphCache( GlyphCachePeer& );
/*virtual*/ ~GlyphCache();
- static GlyphCache& GetInstance();
+ static GlyphCache& GetInstance();
void LoadFonts();
void ClearFontPath();
diff --git a/vcl/inc/vcl/gradient.hxx b/vcl/inc/vcl/gradient.hxx
index 741af923ce8e..46abd8dd83a2 100644
--- a/vcl/inc/vcl/gradient.hxx
+++ b/vcl/inc/vcl/gradient.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,9 +80,9 @@ public:
class VCL_DLLPUBLIC Gradient
{
-private:
- Impl_Gradient* mpImplGradient;
- void MakeUnique();
+private:
+ Impl_Gradient* mpImplGradient;
+ void MakeUnique();
public:
Gradient();
diff --git a/vcl/inc/vcl/graph.h b/vcl/inc/vcl/graph.h
index 803df074882d..62a9a67cd99f 100644
--- a/vcl/inc/vcl/graph.h
+++ b/vcl/inc/vcl/graph.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx
index 78994327041e..1f98376234b5 100644
--- a/vcl/inc/vcl/graph.hxx
+++ b/vcl/inc/vcl/graph.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -203,7 +203,7 @@ public:
GfxLink GetLink() const;
BOOL IsLink() const;
- BOOL ExportNative( SvStream& rOStream ) const;
+ BOOL ExportNative( SvStream& rOStream ) const;
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const Graphic& rGraphic );
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, Graphic& rGraphic );
diff --git a/vcl/inc/vcl/graphictools.hxx b/vcl/inc/vcl/graphictools.hxx
index edd29ab9db01..5ace72cf27aa 100644
--- a/vcl/inc/vcl/graphictools.hxx
+++ b/vcl/inc/vcl/graphictools.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,29 +65,29 @@ class VCL_DLLPUBLIC SvtGraphicStroke
{
public:
/// Style for open stroke ends
- enum CapType
+ enum CapType
{
/// No additional cap
- capButt=0,
+ capButt=0,
/// Half-round cap at the line end, the center lying at the end point
- capRound,
+ capRound,
/// Half-square cap at the line end, the center lying at the end point
capSquare
};
/// Style for joins of individual stroke segments
- enum JoinType
+ enum JoinType
{
/// Extend segment edges, until they cross
- joinMiter=0,
+ joinMiter=0,
/// Connect segments by a filled round arc
- joinRound,
+ joinRound,
/// Connect segments by a direct straight line
- joinBevel,
+ joinBevel,
/// Perform no join, leads to visible gaps between thick line segments
joinNone
};
enum
- {
+ {
/// Width of stroke start/end arrow to exactly fit the joining stroke
normalizedArrowWidth=65536
};
@@ -98,19 +98,19 @@ public:
See accessor method descriptions for argument description
*/
- SvtGraphicStroke( const Polygon& rPath,
- const PolyPolygon& rStartArrow,
- const PolyPolygon& rEndArrow,
- double fTransparency,
- double fStrokeWidth,
- CapType aCap,
- JoinType aJoin,
- double fMiterLimit,
- const DashArray& rDashArray ); // TODO: Dash array offset (position where to start, see PS)
+ SvtGraphicStroke( const Polygon& rPath,
+ const PolyPolygon& rStartArrow,
+ const PolyPolygon& rEndArrow,
+ double fTransparency,
+ double fStrokeWidth,
+ CapType aCap,
+ JoinType aJoin,
+ double fMiterLimit,
+ const DashArray& rDashArray ); // TODO: Dash array offset (position where to start, see PS)
// accessors
/// Query path to stroke
- void getPath ( Polygon& ) const;
+ void getPath ( Polygon& ) const;
/** Get the polygon that is put at the start of the line
The polygon is in a special normalized position: the center of
@@ -124,7 +124,7 @@ public:
width, it has to fit every stroke with every stroke width
exactly.
*/
- void getStartArrow ( PolyPolygon& ) const;
+ void getStartArrow ( PolyPolygon& ) const;
/** Get the polygon that is put at the end of the line
The polygon is in a special normalized position, and already
@@ -138,28 +138,28 @@ public:
arrow does have this width, it has to fit every stroke with
every stroke width exactly.
*/
- void getEndArrow ( PolyPolygon& ) const;
+ void getEndArrow ( PolyPolygon& ) const;
/** Get stroke transparency
@return the transparency, ranging from 0.0 (opaque) to 1.0 (fully translucent)
*/
- double getTransparency () const;
+ double getTransparency () const;
/// Get width of the stroke
- double getStrokeWidth () const;
+ double getStrokeWidth () const;
/// Get the style in which open stroke ends are drawn
- CapType getCapType () const;
+ CapType getCapType () const;
/// Get the style in which the stroke segments are joined
- JoinType getJoinType () const;
+ JoinType getJoinType () const;
/// Get the maximum length of mitered joins
- double getMiterLimit () const;
+ double getMiterLimit () const;
/// Get an array of "on" and "off" lengths for stroke dashing
- void getDashArray ( DashArray& ) const;
+ void getDashArray ( DashArray& ) const;
/// Query a textual representation of the object's content
- ::rtl::OString toString () const;
+ ::rtl::OString toString () const;
// mutators
/// Set path to stroke
- void setPath ( const Polygon& );
+ void setPath ( const Polygon& );
/** Set the polygon that is put at the start of the line
The polygon has to be in a special normalized position, and
@@ -173,7 +173,7 @@ public:
arrow does have this width, it will fit every stroke with
every stroke width exactly.
*/
- void setStartArrow ( const PolyPolygon& );
+ void setStartArrow ( const PolyPolygon& );
/** Set the polygon that is put at the end of the line
The polygon has to be in a special normalized position, and
@@ -187,38 +187,38 @@ public:
arrow does have this width, it will fit every stroke with
every stroke width exactly.
*/
- void setEndArrow ( const PolyPolygon& );
+ void setEndArrow ( const PolyPolygon& );
/** Set stroke transparency
@param fTrans
The transparency, ranging from 0.0 (opaque) to 1.0 (fully translucent)
*/
- void setTransparency ( double fTrans );
+ void setTransparency ( double fTrans );
/// Set width of the stroke
- void setStrokeWidth ( double );
+ void setStrokeWidth ( double );
/// Set the style in which open stroke ends are drawn
- void setCapType ( CapType );
+ void setCapType ( CapType );
/// Set the style in which the stroke segments are joined
- void setJoinType ( JoinType );
+ void setJoinType ( JoinType );
/// Set the maximum length of mitered joins
- void setMiterLimit ( double );
+ void setMiterLimit ( double );
/// Set the array of "on" and "off" lengths for stroke dashing
- void setDashArray ( const DashArray& );
+ void setDashArray ( const DashArray& );
private:
// friends
VCL_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass );
VCL_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass );
- Polygon maPath;
- PolyPolygon maStartArrow;
- PolyPolygon maEndArrow;
- double mfTransparency;
- double mfStrokeWidth;
- CapType maCapType;
- JoinType maJoinType;
- double mfMiterLimit;
- DashArray maDashArray;
+ Polygon maPath;
+ PolyPolygon maStartArrow;
+ PolyPolygon maEndArrow;
+ double mfTransparency;
+ double mfStrokeWidth;
+ CapType maCapType;
+ JoinType maJoinType;
+ double mfMiterLimit;
+ DashArray maDashArray;
};
/** Encapsulates geometry and associated attributes of a filled area
@@ -249,7 +249,7 @@ public:
one. The part of the scanline where the winding number is
non-zero gets filled.
*/
- fillNonZero=0,
+ fillNonZero=0,
/** Even-odd fill rule
Fill shape scanline-wise. Starting at the left, count the
@@ -262,11 +262,11 @@ public:
enum FillType
{
/// Fill with a specified solid color
- fillSolid=0,
+ fillSolid=0,
/// Fill with the specified gradient
- fillGradient,
+ fillGradient,
/// Fill with the specified hatch
- fillHatch,
+ fillHatch,
/// Fill with the specified texture (a Graphic object)
fillTexture
};
@@ -274,9 +274,9 @@ public:
enum HatchType
{
/// horizontal parallel lines, one unit apart
- hatchSingle=0,
+ hatchSingle=0,
/// horizontal and verticall orthogonally crossing lines, one unit apart
- hatchDouble,
+ hatchDouble,
/// three crossing lines, like HatchType::hatchDouble, but
/// with an additional diagonal line, rising to the upper
/// right corner. The first diagonal line goes through the
@@ -313,40 +313,40 @@ public:
See accessor method descriptions for argument description
*/
- SvtGraphicFill( const PolyPolygon& rPath,
- Color aFillColor,
- double fTransparency,
- FillRule aFillRule,
- FillType aFillType, // TODO: Multitexturing
- const Transform& aFillTransform,
- bool bTiling,
- HatchType aHatchType, // TODO: vector of directions and start points
- Color aHatchColor,
- GradientType aGradientType, // TODO: Transparent gradients (orthogonal to normal ones)
- Color aGradient1stColor, // TODO: vector of colors and offsets
- Color aGradient2ndColor,
- int aGradientStepCount, // numbers of steps to render the gradient. gradientStepsInfinite means infinitely many.
- const Graphic& aFillGraphic );
+ SvtGraphicFill( const PolyPolygon& rPath,
+ Color aFillColor,
+ double fTransparency,
+ FillRule aFillRule,
+ FillType aFillType, // TODO: Multitexturing
+ const Transform& aFillTransform,
+ bool bTiling,
+ HatchType aHatchType, // TODO: vector of directions and start points
+ Color aHatchColor,
+ GradientType aGradientType, // TODO: Transparent gradients (orthogonal to normal ones)
+ Color aGradient1stColor, // TODO: vector of colors and offsets
+ Color aGradient2ndColor,
+ int aGradientStepCount, // numbers of steps to render the gradient. gradientStepsInfinite means infinitely many.
+ const Graphic& aFillGraphic );
// accessors
/// Query path to fill
- void getPath ( PolyPolygon& ) const;
+ void getPath ( PolyPolygon& ) const;
/// Get color used for solid fills
- Color getFillColor () const;
+ Color getFillColor () const;
/** Get stroke transparency
@return the transparency, ranging from 0.0 (opaque) to 1.0 (fully translucent)
*/
- double getTransparency () const;
+ double getTransparency () const;
/// Get fill rule used
- FillRule getFillRule () const;
+ FillRule getFillRule () const;
/** Get fill type used
Currently, only one of the fill types can be used
simultaneously. If you specify e.g. FillRule::fillGradient,
hatching, texture and solid fill color are ignored.
*/
- FillType getFillType () const;
+ FillType getFillType () const;
/** Get transformation applied to hatch, gradient or texture during fill
A fill operation generally starts at the top left position of
@@ -358,29 +358,29 @@ public:
top left corner plus the translation components.
*/
- void getTransform ( Transform& ) const;
+ void getTransform ( Transform& ) const;
/// deprecated
- bool IsTiling () const;
+ bool IsTiling () const;
/** Query state of texture tiling
@return true, if texture is tiled, false, if output only once.
*/
- bool isTiling () const;
+ bool isTiling () const;
/// Get type of hatch used
- HatchType getHatchType () const;
+ HatchType getHatchType () const;
/// Get color used for drawing the hatch
- Color getHatchColor () const;
+ Color getHatchColor () const;
/// Get type of gradient used
- GradientType getGradientType () const;
+ GradientType getGradientType () const;
/// Get start color of the gradient
- Color getGradient1stColor () const;
+ Color getGradient1stColor () const;
/// Get end color of the gradient
- Color getGradient2ndColor () const;
- /** Get the numbers of steps to render the gradient.
+ Color getGradient2ndColor () const;
+ /** Get the numbers of steps to render the gradient.
@return the step count. gradientStepsInfinite means infinitely many.
*/
- int getGradientStepCount() const;
+ int getGradientStepCount() const;
/** Get the texture graphic used
The Graphic object returned is used to fill the geometry, if
@@ -388,76 +388,76 @@ public:
assumed to be of size 1x1, the transformation is used to scale
it to the appropriate size.
*/
- void getGraphic ( Graphic& ) const;
+ void getGraphic ( Graphic& ) const;
/// Query a textual representation of the object's content
- ::rtl::OString toString () const;
+ ::rtl::OString toString () const;
// mutators
/// Set path to fill
- void setPath ( const PolyPolygon& rPath );
- /// Set color used for solid fills
- void setFillColor ( Color aFillColor );
+ void setPath ( const PolyPolygon& rPath );
+ /// Set color used for solid fills
+ void setFillColor ( Color aFillColor );
/** Set stroke transparency
@param fTransparency
The transparency, ranging from 0.0 (opaque) to 1.0 (fully translucent)
*/
- void setTransparency ( double fTransparency );
+ void setTransparency ( double fTransparency );
/// Set fill rule used
- void setFillRule ( FillRule aFillRule );
+ void setFillRule ( FillRule aFillRule );
/** Set fill type used
Currently, only one of the fill types can be used
simultaneously. If you specify e.g. FillRule::fillGradient,
hatching, texture and solid fill color are ignored.
*/
- void setFillType ( FillType aFillType );
+ void setFillType ( FillType aFillType );
/// Set transformation applied to hatch, gradient or texture during fill
- void setTransform ( const Transform& pTransform );
+ void setTransform ( const Transform& pTransform );
/** Set state of texture tiling
@param bTiling
If set to true, texture is tiled, if set to false, texture is output only once.
*/
- void setTiling ( bool bTiling = true );
+ void setTiling ( bool bTiling = true );
/// Set type of hatch used
- void setHatchType ( HatchType aHatchType );
+ void setHatchType ( HatchType aHatchType );
/// Set color used for drawing the hatch
- void setHatchColor ( Color aHatchColor );
+ void setHatchColor ( Color aHatchColor );
/// Set type of gradient used
- void setGradientType ( GradientType aGradType );
+ void setGradientType ( GradientType aGradType );
/// Set start color of the gradient
- void setGradient1stColor ( Color aColor );
+ void setGradient1stColor ( Color aColor );
/// Set end color of the gradient
- void setGradient2ndColor ( Color aColor );
- /** Set the numbers of steps to render the gradient.
+ void setGradient2ndColor ( Color aColor );
+ /** Set the numbers of steps to render the gradient.
@param aCount
The step count. gradientStepsInfinite means use infinitely many.
*/
- void setGradientStepCount( int aCount );
+ void setGradientStepCount( int aCount );
/// Set the texture graphic used
- void setGraphic ( const Graphic& rGraphic );
+ void setGraphic ( const Graphic& rGraphic );
private:
// friends
VCL_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass );
VCL_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, SvtGraphicFill& rClass );
- PolyPolygon maPath;
- Color maFillColor;
- double mfTransparency;
- FillRule maFillRule;
- FillType maFillType;
- Transform maFillTransform;
- bool mbTiling;
- HatchType maHatchType;
- Color maHatchColor;
- GradientType maGradientType;
- Color maGradient1stColor;
- Color maGradient2ndColor;
- int maGradientStepCount;
- Graphic maFillGraphic;
+ PolyPolygon maPath;
+ Color maFillColor;
+ double mfTransparency;
+ FillRule maFillRule;
+ FillType maFillType;
+ Transform maFillTransform;
+ bool mbTiling;
+ HatchType maHatchType;
+ Color maHatchColor;
+ GradientType maGradientType;
+ Color maGradient1stColor;
+ Color maGradient2ndColor;
+ int maGradientStepCount;
+ Graphic maFillGraphic;
};
#endif /* _VCL_GRAPHICTOOLS_HXX_ */
diff --git a/vcl/inc/vcl/graphite_adaptors.hxx b/vcl/inc/vcl/graphite_adaptors.hxx
index 62c1f97cd823..66413031f504 100644
--- a/vcl/inc/vcl/graphite_adaptors.hxx
+++ b/vcl/inc/vcl/graphite_adaptors.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/graphite_cache.hxx b/vcl/inc/vcl/graphite_cache.hxx
index 9891fb6aad7e..1c2aff06414f 100644
--- a/vcl/inc/vcl/graphite_cache.hxx
+++ b/vcl/inc/vcl/graphite_cache.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/graphite_features.hxx b/vcl/inc/vcl/graphite_features.hxx
index a817fa190f6e..1cb109e77aaa 100644
--- a/vcl/inc/vcl/graphite_features.hxx
+++ b/vcl/inc/vcl/graphite_features.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx
index 3192822db391..f3abdfe0623a 100644
--- a/vcl/inc/vcl/graphite_layout.hxx
+++ b/vcl/inc/vcl/graphite_layout.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/graphite_serverfont.hxx b/vcl/inc/vcl/graphite_serverfont.hxx
index 06a61db42f80..21873e0582a1 100644
--- a/vcl/inc/vcl/graphite_serverfont.hxx
+++ b/vcl/inc/vcl/graphite_serverfont.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/group.hxx b/vcl/inc/vcl/group.hxx
index 765021fbe89b..5eff89280e45 100644
--- a/vcl/inc/vcl/group.hxx
+++ b/vcl/inc/vcl/group.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ private:
SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout = false );
- virtual void FillLayoutData() const;
+ virtual void FillLayoutData() const;
virtual const Font&
GetCanonicalFont( const StyleSettings& _rStyle ) const;
virtual const Color&
diff --git a/vcl/inc/vcl/hatch.hxx b/vcl/inc/vcl/hatch.hxx
index 3cdcd0e24c2c..d8826ac5d199 100644
--- a/vcl/inc/vcl/hatch.hxx
+++ b/vcl/inc/vcl/hatch.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +42,17 @@ class SvStream;
struct ImplHatch
{
- ULONG mnRefCount;
- Color maColor;
- HatchStyle meStyle;
- long mnDistance;
- USHORT mnAngle;
+ ULONG mnRefCount;
+ Color maColor;
+ HatchStyle meStyle;
+ long mnDistance;
+ USHORT mnAngle;
ImplHatch();
ImplHatch( const ImplHatch& rImplHatch );
- friend SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch );
- friend SvStream& operator<<( SvStream& rOStm, const ImplHatch& rImplHatch );
+ friend SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch );
+ friend SvStream& operator<<( SvStream& rOStm, const ImplHatch& rImplHatch );
};
// ---------
@@ -61,10 +61,10 @@ struct ImplHatch
class VCL_DLLPUBLIC Hatch
{
-private:
+private:
- ImplHatch* mpImplHatch;
- SAL_DLLPRIVATE void ImplMakeUnique();
+ ImplHatch* mpImplHatch;
+ SAL_DLLPRIVATE void ImplMakeUnique();
public:
@@ -73,19 +73,19 @@ public:
Hatch( HatchStyle eStyle, const Color& rHatchColor, long nDistance, USHORT nAngle10 = 0 );
~Hatch();
- Hatch& operator=( const Hatch& rHatch );
+ Hatch& operator=( const Hatch& rHatch );
BOOL operator==( const Hatch& rHatch ) const;
BOOL operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); }
BOOL IsSameInstance( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch ); }
void SetStyle( HatchStyle eStyle );
- HatchStyle GetStyle() const { return mpImplHatch->meStyle; }
+ HatchStyle GetStyle() const { return mpImplHatch->meStyle; }
void SetColor( const Color& rColor );
- const Color& GetColor() const { return mpImplHatch->maColor; }
+ const Color& GetColor() const { return mpImplHatch->maColor; }
void SetDistance( long nDistance );
- long GetDistance() const { return mpImplHatch->mnDistance; }
+ long GetDistance() const { return mpImplHatch->mnDistance; }
void SetAngle( USHORT nAngle10 );
USHORT GetAngle() const { return mpImplHatch->mnAngle; }
diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx
index e91b459ee8cc..60ab16ae077c 100644
--- a/vcl/inc/vcl/help.hxx
+++ b/vcl/inc/vcl/help.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,20 +41,20 @@ class Window;
// - Help-Types -
// --------------
-#define QUICKHELP_LEFT ((USHORT)0x0001)
-#define QUICKHELP_CENTER ((USHORT)0x0002)
-#define QUICKHELP_RIGHT ((USHORT)0x0004)
-#define QUICKHELP_TOP ((USHORT)0x0008)
-#define QUICKHELP_VCENTER ((USHORT)0x0010)
-#define QUICKHELP_BOTTOM ((USHORT)0x0020)
+#define QUICKHELP_LEFT ((USHORT)0x0001)
+#define QUICKHELP_CENTER ((USHORT)0x0002)
+#define QUICKHELP_RIGHT ((USHORT)0x0004)
+#define QUICKHELP_TOP ((USHORT)0x0008)
+#define QUICKHELP_VCENTER ((USHORT)0x0010)
+#define QUICKHELP_BOTTOM ((USHORT)0x0020)
#define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM)
-#define QUICKHELP_CTRLTEXT ((USHORT)0x0040)
+#define QUICKHELP_CTRLTEXT ((USHORT)0x0040)
#define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000)
-#define QUICKHELP_BIDI_RTL ((USHORT)0x8000)
+#define QUICKHELP_BIDI_RTL ((USHORT)0x8000)
// By changes you must also change: rsc/vclrsc.hxx
-#define OOO_HELP_INDEX ((ULONG)0xFFFFFFFF)
-#define OOO_HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
+#define OOO_HELP_INDEX ((ULONG)0xFFFFFFFF)
+#define OOO_HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
// --------
// - Help -
@@ -63,64 +63,64 @@ class Window;
class VCL_DLLPUBLIC Help
{
private:
- String maHelpFile;
+ String maHelpFile;
public:
Help();
- virtual ~Help();
+ virtual ~Help();
- void SetHelpFile( const String& rFileName ) { maHelpFile = rFileName; }
- const String& GetHelpFile() const { return maHelpFile; }
+ void SetHelpFile( const String& rFileName ) { maHelpFile = rFileName; }
+ const String& GetHelpFile() const { return maHelpFile; }
- virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
- virtual BOOL Start( const XubString& rKeyWord, const Window* pWindow );
- virtual void OpenHelpAgent( ULONG nHelpId );
- virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
+ virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
+ virtual BOOL Start( const XubString& rKeyWord, const Window* pWindow );
+ virtual void OpenHelpAgent( ULONG nHelpId );
+ virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
virtual XubString GetHelpText( const String& aHelpURL, const Window* pWindow );
- static void EnableContextHelp();
- static void DisableContextHelp();
- static BOOL IsContextHelpEnabled();
- static BOOL StartContextHelp();
-
- static void EnableExtHelp();
- static void DisableExtHelp();
- static BOOL IsExtHelpEnabled();
- static BOOL StartExtHelp();
- static BOOL EndExtHelp();
- static BOOL IsExtHelpActive();
-
- static void EnableBalloonHelp();
- static void DisableBalloonHelp();
- static BOOL IsBalloonHelpEnabled();
- static BOOL ShowBalloon( Window* pParent,
+ static void EnableContextHelp();
+ static void DisableContextHelp();
+ static BOOL IsContextHelpEnabled();
+ static BOOL StartContextHelp();
+
+ static void EnableExtHelp();
+ static void DisableExtHelp();
+ static BOOL IsExtHelpEnabled();
+ static BOOL StartExtHelp();
+ static BOOL EndExtHelp();
+ static BOOL IsExtHelpActive();
+
+ static void EnableBalloonHelp();
+ static void DisableBalloonHelp();
+ static BOOL IsBalloonHelpEnabled();
+ static BOOL ShowBalloon( Window* pParent,
const Point& rScreenPos,
const XubString& rHelpText );
- static BOOL ShowBalloon( Window* pParent,
+ static BOOL ShowBalloon( Window* pParent,
const Point& rScreenPos,
const Rectangle&,
const XubString& rHelpText );
- static void EnableQuickHelp();
- static void DisableQuickHelp();
- static BOOL IsQuickHelpEnabled();
- static BOOL ShowQuickHelp( Window* pParent,
+ static void EnableQuickHelp();
+ static void DisableQuickHelp();
+ static BOOL IsQuickHelpEnabled();
+ static BOOL ShowQuickHelp( Window* pParent,
const Rectangle& rScreenRect,
const XubString& rHelpText,
const XubString& rLongHelpText,
USHORT nStyle = 0 );
- static BOOL ShowQuickHelp( Window* pParent,
+ static BOOL ShowQuickHelp( Window* pParent,
const Rectangle& rScreenRect,
const XubString& rHelpText,
USHORT nStyle = 0 )
{ return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, XubString(), nStyle ); }
- static ULONG ShowTip( Window* pParent,
+ static ULONG ShowTip( Window* pParent,
const Rectangle& rScreenRect,
const XubString& rText, USHORT nStyle = 0 );
- static void HideTip( ULONG nId );
+ static void HideTip( ULONG nId );
};
-#endif // _SV_HELP_HXX
+#endif // _SV_HELP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/helper.hxx b/vcl/inc/vcl/helper.hxx
index 732e98080c62..f5bb4816f210 100644
--- a/vcl/inc/vcl/helper.hxx
+++ b/vcl/inc/vcl/helper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/helpwin.hxx b/vcl/inc/vcl/helpwin.hxx
index 9066012d05f2..bf0fde690133 100644
--- a/vcl/inc/vcl/helpwin.hxx
+++ b/vcl/inc/vcl/helpwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,48 +39,48 @@
class HelpTextWindow : public FloatingWindow
{
private:
- Point maPos;
- Rectangle maHelpArea; // Wenn naechste Hilfe fuers gleiche Rectangle, gleicher Text, dann Fenster stehen lassen
+ Point maPos;
+ Rectangle maHelpArea; // Wenn naechste Hilfe fuers gleiche Rectangle, gleicher Text, dann Fenster stehen lassen
- Rectangle maTextRect; // Bei umgebrochenen Text in QuickHelp
+ Rectangle maTextRect; // Bei umgebrochenen Text in QuickHelp
- String maHelpText;
- String maStatusText;
+ String maHelpText;
+ String maStatusText;
- Timer maShowTimer;
- Timer maHideTimer;
+ Timer maShowTimer;
+ Timer maHideTimer;
- USHORT mnHelpWinStyle;
- USHORT mnStyle;
+ USHORT mnHelpWinStyle;
+ USHORT mnStyle;
protected:
DECL_LINK( TimerHdl, Timer* );
- virtual void Paint( const Rectangle& );
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual String GetText() const;
- void ImplShow();
+ virtual void Paint( const Rectangle& );
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual String GetText() const;
+ void ImplShow();
public:
HelpTextWindow( Window* pParent, const String& rText, USHORT nHelpWinStyle, USHORT nStyle );
~HelpTextWindow();
- const String& GetHelpText() const { return maHelpText; }
- void SetHelpText( const String& rHelpText );
- USHORT GetWinStyle() const { return mnHelpWinStyle; }
+ const String& GetHelpText() const { return maHelpText; }
+ void SetHelpText( const String& rHelpText );
+ USHORT GetWinStyle() const { return mnHelpWinStyle; }
// Nur merken:
- void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; }
- void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; }
+ void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; }
+ void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; }
- void ShowHelp( USHORT nDelayMode );
+ void ShowHelp( USHORT nDelayMode );
- Size CalcOutSize() const;
- const Rectangle& GetHelpArea() const { return maHelpArea; }
+ Size CalcOutSize() const;
+ const Rectangle& GetHelpArea() const { return maHelpArea; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
- BOOL RegisterAccessibleParent();
- void RevokeAccessibleParent();
+ BOOL RegisterAccessibleParent();
+ void RevokeAccessibleParent();
};
void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
diff --git a/vcl/inc/vcl/i18nhelp.hxx b/vcl/inc/vcl/i18nhelp.hxx
index 428032ae2017..d8b460338bd5 100644
--- a/vcl/inc/vcl/i18nhelp.hxx
+++ b/vcl/inc/vcl/i18nhelp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace com {
namespace sun {
namespace star {
namespace lang {
- class XMultiServiceFactory;
+ class XMultiServiceFactory;
}
}}}
@@ -57,7 +57,7 @@ namespace vcl
class VCL_DLLPUBLIC I18nHelper
{
private:
- ::osl::Mutex maMutex;
+ ::osl::Mutex maMutex;
::com::sun::star::lang::Locale maLocale;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
@@ -88,11 +88,11 @@ public:
String GetDate( const Date& rDate ) const;
String GetNum( long nNumber, USHORT nDecimals, BOOL bUseThousandSep = TRUE, BOOL bTrailingZeros = TRUE ) const;
-
+
static String filterFormattingChars( const String& );
};
-} // namespace vcl
+} // namespace vcl
#endif // _VCL_I18NHELP_HXX
diff --git a/vcl/inc/vcl/idlemgr.hxx b/vcl/inc/vcl/idlemgr.hxx
index 75729f5ab493..edb449d960a7 100644
--- a/vcl/inc/vcl/idlemgr.hxx
+++ b/vcl/inc/vcl/idlemgr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/ilstbox.hxx b/vcl/inc/vcl/ilstbox.hxx
index 110e57233550..17ddd3033a49 100644
--- a/vcl/inc/vcl/ilstbox.hxx
+++ b/vcl/inc/vcl/ilstbox.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +45,8 @@ class ScrollBarBox;
// - ListBox-Types -
// -----------------
-#define HORZ_SCROLL 4
-#define IMG_TXT_DISTANCE 6
+#define HORZ_SCROLL 4
+#define IMG_TXT_DISTANCE 6
enum LB_EVENT_TYPE
{
@@ -63,11 +63,11 @@ enum LB_EVENT_TYPE
struct ImplEntryType
{
- XubString maStr;
- Image maImage;
- void* mpUserData;
- BOOL mbIsSelected;
- long mnFlags;
+ XubString maStr;
+ Image maImage;
+ void* mpUserData;
+ BOOL mbIsSelected;
+ long mnFlags;
long mnHeight;
ImplEntryType( const XubString& rStr, const Image& rImage ) :
@@ -107,31 +107,31 @@ class ImplEntryList : private List
{
private:
Window* mpWindow; // For getting the current locale when matching strings
- USHORT mnLastSelected;
- USHORT mnSelectionAnchor;
- USHORT mnImages;
+ USHORT mnLastSelected;
+ USHORT mnSelectionAnchor;
+ USHORT mnImages;
- USHORT mnMRUCount;
- USHORT mnMaxMRUCount;
+ USHORT mnMRUCount;
+ USHORT mnMaxMRUCount;
- Link maSelectionChangedHdl;
- BOOL mbCallSelectionChangedHdl;
+ Link maSelectionChangedHdl;
+ BOOL mbCallSelectionChangedHdl;
- ImplEntryType* GetEntry( USHORT nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); }
+ ImplEntryType* GetEntry( USHORT nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); }
public:
ImplEntryList( Window* pWindow );
~ImplEntryList();
- USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort );
- void RemoveEntry( USHORT nPos );
- const ImplEntryType* GetEntryPtr( USHORT nPos ) const { return (const ImplEntryType*) GetObject( nPos ); }
- ImplEntryType* GetMutableEntryPtr( USHORT nPos ) const { return (ImplEntryType*) GetObject( nPos ); }
- void Clear();
+ USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort );
+ void RemoveEntry( USHORT nPos );
+ const ImplEntryType* GetEntryPtr( USHORT nPos ) const { return (const ImplEntryType*) GetObject( nPos ); }
+ ImplEntryType* GetMutableEntryPtr( USHORT nPos ) const { return (ImplEntryType*) GetObject( nPos ); }
+ void Clear();
- USHORT FindMatchingEntry( const XubString& rStr, USHORT nStart = 0, BOOL bForward = TRUE, BOOL bLazy = TRUE ) const;
- USHORT FindEntry( const XubString& rStr, BOOL bSearchMRUArea = FALSE ) const;
- USHORT FindEntry( const void* pData ) const;
+ USHORT FindMatchingEntry( const XubString& rStr, USHORT nStart = 0, BOOL bForward = TRUE, BOOL bLazy = TRUE ) const;
+ USHORT FindEntry( const XubString& rStr, BOOL bSearchMRUArea = FALSE ) const;
+ USHORT FindEntry( const void* pData ) const;
// helper: add up heights up to index nEndIndex.
// GetAddedHeight( 0 ) returns 0
@@ -140,54 +140,54 @@ public:
long GetAddedHeight( USHORT nEndIndex, USHORT nBeginIndex = 0, long nBeginHeight = 0 ) const;
long GetEntryHeight( USHORT nPos ) const;
- USHORT GetEntryCount() const { return (USHORT)List::Count(); }
- BOOL HasImages() const { return mnImages ? TRUE : FALSE; }
+ USHORT GetEntryCount() const { return (USHORT)List::Count(); }
+ BOOL HasImages() const { return mnImages ? TRUE : FALSE; }
- XubString GetEntryText( USHORT nPos ) const;
+ XubString GetEntryText( USHORT nPos ) const;
- BOOL HasEntryImage( USHORT nPos ) const;
- Image GetEntryImage( USHORT nPos ) const;
+ BOOL HasEntryImage( USHORT nPos ) const;
+ Image GetEntryImage( USHORT nPos ) const;
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( USHORT nPos, void* pNewData );
+ void* GetEntryData( USHORT nPos ) const;
- void SetEntryFlags( USHORT nPos, long nFlags );
- long GetEntryFlags( USHORT nPos ) const;
+ void SetEntryFlags( USHORT nPos, long nFlags );
+ long GetEntryFlags( USHORT nPos ) const;
- void SelectEntry( USHORT nPos, BOOL bSelect );
+ void SelectEntry( USHORT nPos, BOOL bSelect );
- USHORT GetSelectEntryCount() const;
- XubString GetSelectEntry( USHORT nIndex ) const;
- USHORT GetSelectEntryPos( USHORT nIndex ) const;
- BOOL IsEntrySelected( const XubString& rStr ) const;
- BOOL IsEntryPosSelected( USHORT nIndex ) const;
+ USHORT GetSelectEntryCount() const;
+ XubString GetSelectEntry( USHORT nIndex ) const;
+ USHORT GetSelectEntryPos( USHORT nIndex ) const;
+ BOOL IsEntrySelected( const XubString& rStr ) const;
+ BOOL IsEntryPosSelected( USHORT nIndex ) const;
- void SetLastSelected( USHORT nPos ) { mnLastSelected = nPos; }
- USHORT GetLastSelected() const { return mnLastSelected; }
+ void SetLastSelected( USHORT nPos ) { mnLastSelected = nPos; }
+ USHORT GetLastSelected() const { return mnLastSelected; }
- void SetSelectionAnchor( USHORT nPos ) { mnSelectionAnchor = nPos; }
- USHORT GetSelectionAnchor() const { return mnSelectionAnchor; }
+ void SetSelectionAnchor( USHORT nPos ) { mnSelectionAnchor = nPos; }
+ USHORT GetSelectionAnchor() const { return mnSelectionAnchor; }
- void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; }
- void SetCallSelectionChangedHdl( BOOL bCall ) { mbCallSelectionChangedHdl = bCall; }
+ void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; }
+ void SetCallSelectionChangedHdl( BOOL bCall ) { mbCallSelectionChangedHdl = bCall; }
- void SetMRUCount( USHORT n ) { mnMRUCount = n; }
- USHORT GetMRUCount() const { return mnMRUCount; }
+ void SetMRUCount( USHORT n ) { mnMRUCount = n; }
+ USHORT GetMRUCount() const { return mnMRUCount; }
- void SetMaxMRUCount( USHORT n ) { mnMaxMRUCount = n; }
- USHORT GetMaxMRUCount() const { return mnMaxMRUCount; }
+ void SetMaxMRUCount( USHORT n ) { mnMaxMRUCount = n; }
+ USHORT GetMaxMRUCount() const { return mnMaxMRUCount; }
- /** An Entry is selectable if its mnFlags does not have the
+ /** An Entry is selectable if its mnFlags does not have the
LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */
- bool IsEntrySelectable( USHORT nPos ) const;
+ bool IsEntrySelectable( USHORT nPos ) const;
/** returns the first entry found from the given position nPos that is selectable
or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable,
it returns the first selectable entry after nPos if bForward is true and the
first selectable entry after nPos is bForward is false.
*/
- USHORT FindFirstSelectable( USHORT nPos, bool bForward = true );
+ USHORT FindFirstSelectable( USHORT nPos, bool bForward = true );
};
// ---------------------
@@ -197,89 +197,89 @@ public:
class ImplListBoxWindow : public Control
{
private:
- ImplEntryList* mpEntryList; // EntryListe
- Rectangle maFocusRect;
- String maSearchStr;
- Timer maSearchTimeout;
+ ImplEntryList* mpEntryList; // EntryListe
+ Rectangle maFocusRect;
+ String maSearchStr;
+ Timer maSearchTimeout;
- Size maUserItemSize;
+ Size maUserItemSize;
- long mnMaxTxtHeight; // Maximale Hoehe eines Text-Items
- long mnMaxTxtWidth; // Maximale Breite eines Text-Items
+ long mnMaxTxtHeight; // Maximale Hoehe eines Text-Items
+ long mnMaxTxtWidth; // Maximale Breite eines Text-Items
// Entry ohne Image
- long mnMaxImgTxtWidth;// Maximale Breite eines Text-Items
+ long mnMaxImgTxtWidth;// Maximale Breite eines Text-Items
// Entry UND Image
- long mnMaxImgWidth; // Maximale Breite eines Image-Items
- long mnMaxImgHeight; // Maximale Hoehe eines Image-Items
- long mnMaxWidth; // Maximale Breite eines Eintrags
- long mnMaxHeight; // Maximale Hoehe eines Eintrags
+ long mnMaxImgWidth; // Maximale Breite eines Image-Items
+ long mnMaxImgHeight; // Maximale Hoehe eines Image-Items
+ long mnMaxWidth; // Maximale Breite eines Eintrags
+ long mnMaxHeight; // Maximale Hoehe eines Eintrags
- USHORT mnCurrentPos; // Position (Focus)
- USHORT mnTrackingSaveSelection; // Selektion vor Tracking();
+ USHORT mnCurrentPos; // Position (Focus)
+ USHORT mnTrackingSaveSelection; // Selektion vor Tracking();
- USHORT mnSeparatorPos; // Separator
+ USHORT mnSeparatorPos; // Separator
- USHORT mnUserDrawEntry;
+ USHORT mnUserDrawEntry;
- USHORT mnTop; // Ausgabe ab Zeile
- long mnLeft; // Ausgabe ab Spalte
- long mnBorder; // Abstand Rahmen - Text
- long mnTextHeight; // Texthoehe
+ USHORT mnTop; // Ausgabe ab Zeile
+ long mnLeft; // Ausgabe ab Spalte
+ long mnBorder; // Abstand Rahmen - Text
+ long mnTextHeight; // Texthoehe
ProminentEntry meProminentType; // where is the "prominent" entry
- USHORT mnSelectModifier; // Modifiers
-
- BOOL mbHasFocusRect: 1,
- mbSort: 1, // ListBox sortiert
- mbTrack: 1, // Tracking
- mbMulti: 1, // MultiListBox
- mbStackMode: 1, // StackSelection
- mbSimpleMode: 1, // SimpleMode fuer MultiListBox
- mbImgsDiffSz: 1, // Images haben verschiedene Groessen
- mbTravelSelect: 1, // TravelSelect
- mbTrackingSelect: 1, // Selektiert bei MouseMove
- mbSelectionChanged: 1, // Select() nicht zu oft rufen...
- mbMouseMoveSelect: 1, // Selektieren bei MouseMove
- mbGrabFocus: 1, // Focus bei MBDown grabben
- mbUserDrawEnabled: 1, // UserDraw possible
- mbInUserDraw: 1, // In UserDraw
- mbReadOnly: 1, // ReadOnly
- mbMirroring: 1, // pb: #106948# explicit mirroring for calc
+ USHORT mnSelectModifier; // Modifiers
+
+ BOOL mbHasFocusRect: 1,
+ mbSort: 1, // ListBox sortiert
+ mbTrack: 1, // Tracking
+ mbMulti: 1, // MultiListBox
+ mbStackMode: 1, // StackSelection
+ mbSimpleMode: 1, // SimpleMode fuer MultiListBox
+ mbImgsDiffSz: 1, // Images haben verschiedene Groessen
+ mbTravelSelect: 1, // TravelSelect
+ mbTrackingSelect: 1, // Selektiert bei MouseMove
+ mbSelectionChanged: 1, // Select() nicht zu oft rufen...
+ mbMouseMoveSelect: 1, // Selektieren bei MouseMove
+ mbGrabFocus: 1, // Focus bei MBDown grabben
+ mbUserDrawEnabled: 1, // UserDraw possible
+ mbInUserDraw: 1, // In UserDraw
+ mbReadOnly: 1, // ReadOnly
+ mbMirroring: 1, // pb: #106948# explicit mirroring for calc
mbRight: 1, // right align Text output
mbCenter: 1; // center Text output
- Link maScrollHdl;
- Link maSelectHdl;
- Link maCancelHdl;
- Link maDoubleClickHdl;
- Link maUserDrawHdl;
- Link maMRUChangedHdl;
+ Link maScrollHdl;
+ Link maSelectHdl;
+ Link maCancelHdl;
+ Link maDoubleClickHdl;
+ Link maUserDrawHdl;
+ Link maMRUChangedHdl;
protected:
- DECL_LINK( SearchStringTimeout, Timer* );
-
- virtual void KeyInput( const KeyEvent& rKEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void GetFocus();
- virtual void LoseFocus();
-
- BOOL SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift = FALSE, BOOL bCtrl = FALSE );
- void ImplPaint( USHORT nPos, BOOL bErase = FALSE, bool bLayout = false );
- void ImplDoPaint( const Rectangle& rRect, bool bLayout = false );
- void ImplCalcMetrics();
- void ImplUpdateEntryMetrics( ImplEntryType& rEntry );
- void ImplCallSelect();
+ DECL_LINK( SearchStringTimeout, Timer* );
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ BOOL SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift = FALSE, BOOL bCtrl = FALSE );
+ void ImplPaint( USHORT nPos, BOOL bErase = FALSE, bool bLayout = false );
+ void ImplDoPaint( const Rectangle& rRect, bool bLayout = false );
+ void ImplCalcMetrics();
+ void ImplUpdateEntryMetrics( ImplEntryType& rEntry );
+ void ImplCallSelect();
void ImplShowFocusRect();
void ImplHideFocusRect();
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
virtual void FillLayoutData() const;
@@ -287,99 +287,99 @@ public:
ImplListBoxWindow( Window* pParent, WinBits nWinStyle );
~ImplListBoxWindow();
- ImplEntryList* GetEntryList() const { return mpEntryList; }
+ ImplEntryList* GetEntryList() const { return mpEntryList; }
- USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry );
- void RemoveEntry( USHORT nPos );
- void Clear();
- void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; }
- USHORT GetCurrentPos() const { return mnCurrentPos; }
- USHORT GetDisplayLineCount() const;
+ USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry );
+ void RemoveEntry( USHORT nPos );
+ void Clear();
+ void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; }
+ USHORT GetCurrentPos() const { return mnCurrentPos; }
+ USHORT GetDisplayLineCount() const;
void SetEntryFlags( USHORT nPos, long nFlags );
- void DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false );
+ void DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false );
- void SelectEntry( USHORT nPos, BOOL bSelect );
- void DeselectAll();
- USHORT GetEntryPosForPoint( const Point& rPoint ) const;
+ void SelectEntry( USHORT nPos, BOOL bSelect );
+ void DeselectAll();
+ USHORT GetEntryPosForPoint( const Point& rPoint ) const;
USHORT GetLastVisibleEntry() const;
- BOOL ProcessKeyInput( const KeyEvent& rKEvt );
+ BOOL ProcessKeyInput( const KeyEvent& rKEvt );
- void SetTopEntry( USHORT nTop );
- USHORT GetTopEntry() const { return mnTop; }
+ void SetTopEntry( USHORT nTop );
+ USHORT GetTopEntry() const { return mnTop; }
// ShowProminentEntry will set the entry correspoding to nEntryPos
// either at top or in the middle depending on the chosen style
void ShowProminentEntry( USHORT nEntryPos );
void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; }
ProminentEntry GetProminentEntryType() const { return meProminentType; }
using Window::IsVisible;
- BOOL IsVisible( USHORT nEntry ) const;
+ BOOL IsVisible( USHORT nEntry ) const;
- long GetLeftIndent() const { return mnLeft; }
- void SetLeftIndent( long n );
- void ScrollHorz( long nDiff );
+ long GetLeftIndent() const { return mnLeft; }
+ void SetLeftIndent( long n );
+ void ScrollHorz( long nDiff );
- void AllowGrabFocus( BOOL b ) { mbGrabFocus = b; }
- BOOL IsGrabFocusAllowed() const { return mbGrabFocus; }
+ void AllowGrabFocus( BOOL b ) { mbGrabFocus = b; }
+ BOOL IsGrabFocusAllowed() const { return mbGrabFocus; }
- void SetSeparatorPos( USHORT n ) { mnSeparatorPos = n; }
- USHORT GetSeparatorPos() const { return mnSeparatorPos; }
+ void SetSeparatorPos( USHORT n ) { mnSeparatorPos = n; }
+ USHORT GetSeparatorPos() const { return mnSeparatorPos; }
void SetTravelSelect( BOOL bTravelSelect ) { mbTravelSelect = bTravelSelect; }
- BOOL IsTravelSelect() const { return mbTravelSelect; }
- BOOL IsTrackingSelect() const { return mbTrackingSelect; }
+ BOOL IsTravelSelect() const { return mbTravelSelect; }
+ BOOL IsTrackingSelect() const { return mbTrackingSelect; }
- void SetUserItemSize( const Size& rSz );
- const Size& GetUserItemSize() const { return maUserItemSize; }
+ void SetUserItemSize( const Size& rSz );
+ const Size& GetUserItemSize() const { return maUserItemSize; }
- void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
- BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; }
+ void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
+ BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; }
- void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; }
- BOOL IsMultiSelectionEnabled() const { return mbMulti; }
+ void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; }
+ BOOL IsMultiSelectionEnabled() const { return mbMulti; }
- void SetMultiSelectionSimpleMode( BOOL bSimple ) { mbSimpleMode = bSimple; }
- BOOL IsMultiSelectionSimpleMode() const { return mbSimpleMode; }
+ void SetMultiSelectionSimpleMode( BOOL bSimple ) { mbSimpleMode = bSimple; }
+ BOOL IsMultiSelectionSimpleMode() const { return mbSimpleMode; }
- void EnableMouseMoveSelect( BOOL bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; }
- BOOL IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; }
- BOOL IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; }
+ void EnableMouseMoveSelect( BOOL bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; }
+ BOOL IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; }
+ BOOL IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; }
- Size CalcSize( USHORT nMaxLines ) const;
+ Size CalcSize( USHORT nMaxLines ) const;
Rectangle GetBoundingRectangle( USHORT nItem ) const;
- long GetEntryHeight() const { return mnMaxHeight; }
- long GetMaxEntryWidth() const { return mnMaxWidth; }
+ long GetEntryHeight() const { return mnMaxHeight; }
+ long GetMaxEntryWidth() const { return mnMaxWidth; }
- void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
- const Link& GetScrollHdl() const { return maScrollHdl; }
- void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return maSelectHdl; }
- void SetCancelHdl( const Link& rLink ) { maCancelHdl = rLink; }
- const Link& GetCancelHdl() const { return maCancelHdl; }
- void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
- const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
- void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; }
- const Link& GetUserDrawHdl() const { return maUserDrawHdl; }
- void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; }
- const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; }
+ void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
+ const Link& GetScrollHdl() const { return maScrollHdl; }
+ void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
+ const Link& GetSelectHdl() const { return maSelectHdl; }
+ void SetCancelHdl( const Link& rLink ) { maCancelHdl = rLink; }
+ const Link& GetCancelHdl() const { return maCancelHdl; }
+ void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
+ const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
+ void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; }
+ const Link& GetUserDrawHdl() const { return maUserDrawHdl; }
+ void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; }
+ const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; }
- BOOL IsSelectionChanged() const { return mbSelectionChanged; }
- USHORT GetSelectModifier() const { return mnSelectModifier; }
+ BOOL IsSelectionChanged() const { return mbSelectionChanged; }
+ USHORT GetSelectModifier() const { return mnSelectModifier; }
- void EnableSort( BOOL b ) { mbSort = b; }
+ void EnableSort( BOOL b ) { mbSort = b; }
- void SetReadOnly( BOOL bReadOnly ) { mbReadOnly = bReadOnly; }
- BOOL IsReadOnly() const { return mbReadOnly; }
+ void SetReadOnly( BOOL bReadOnly ) { mbReadOnly = bReadOnly; }
+ BOOL IsReadOnly() const { return mbReadOnly; }
using Control::ImplInitSettings;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
USHORT ImplGetTextStyle() const;
// pb: #106948# explicit mirroring for calc
- inline void EnableMirroring() { mbMirroring = TRUE; }
- inline BOOL IsMirroring() const { return mbMirroring; }
+ inline void EnableMirroring() { mbMirroring = TRUE; }
+ inline BOOL IsMirroring() const { return mbMirroring; }
};
// ---------------
@@ -389,119 +389,119 @@ public:
class ImplListBox : public Control
{
private:
- ImplListBoxWindow maLBWindow;
- ScrollBar* mpHScrollBar;
- ScrollBar* mpVScrollBar;
- ScrollBarBox* mpScrollBarBox;
- BOOL mbVScroll : 1, // VScroll an oder aus
- mbHScroll : 1, // HScroll an oder aus
- mbAutoHScroll : 1; // AutoHScroll an oder aus
- Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird.
+ ImplListBoxWindow maLBWindow;
+ ScrollBar* mpHScrollBar;
+ ScrollBar* mpVScrollBar;
+ ScrollBarBox* mpScrollBarBox;
+ BOOL mbVScroll : 1, // VScroll an oder aus
+ mbHScroll : 1, // HScroll an oder aus
+ mbAutoHScroll : 1; // AutoHScroll an oder aus
+ Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird.
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer;
protected:
- virtual void GetFocus();
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void GetFocus();
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
- long Notify( NotifyEvent& rNEvt );
+ long Notify( NotifyEvent& rNEvt );
- void ImplResizeControls();
- void ImplCheckScrollBars();
- void ImplInitScrollBars();
+ void ImplResizeControls();
+ void ImplCheckScrollBars();
+ void ImplInitScrollBars();
- DECL_LINK( ScrollBarHdl, ScrollBar* );
- DECL_LINK( LBWindowScrolled, void* );
- DECL_LINK( MRUChanged, void* );
+ DECL_LINK( ScrollBarHdl, ScrollBar* );
+ DECL_LINK( LBWindowScrolled, void* );
+ DECL_LINK( MRUChanged, void* );
public:
ImplListBox( Window* pParent, WinBits nWinStyle );
~ImplListBox();
- const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); }
- ImplListBoxWindow* GetMainWindow() { return &maLBWindow; }
+ const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); }
+ ImplListBoxWindow* GetMainWindow() { return &maLBWindow; }
- virtual void Resize();
+ virtual void Resize();
virtual const Wallpaper& GetDisplayBackground() const;
virtual Window* GetPreferredKeyInputWindow();
- USHORT InsertEntry( USHORT nPos, const XubString& rStr );
- USHORT InsertEntry( USHORT nPos, const Image& rImage );
- USHORT InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage );
- void RemoveEntry( USHORT nPos );
- void SetEntryData( USHORT nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
- void Clear();
+ USHORT InsertEntry( USHORT nPos, const XubString& rStr );
+ USHORT InsertEntry( USHORT nPos, const Image& rImage );
+ USHORT InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage );
+ void RemoveEntry( USHORT nPos );
+ void SetEntryData( USHORT nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
+ void Clear();
- void SetEntryFlags( USHORT nPos, long nFlags );
- long GetEntryFlags( USHORT nPos ) const;
+ void SetEntryFlags( USHORT nPos, long nFlags );
+ long GetEntryFlags( USHORT nPos ) const;
- void SelectEntry( USHORT nPos, BOOL bSelect );
- void SetNoSelection();
- void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); }
- USHORT GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
+ void SelectEntry( USHORT nPos, BOOL bSelect );
+ void SetNoSelection();
+ void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); }
+ USHORT GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
- BOOL ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); }
- BOOL HandleWheelAsCursorTravel( const CommandEvent& rCEvt );
+ BOOL ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); }
+ BOOL HandleWheelAsCursorTravel( const CommandEvent& rCEvt );
- void SetSeparatorPos( USHORT n ) { maLBWindow.SetSeparatorPos( n ); }
- USHORT GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
+ void SetSeparatorPos( USHORT n ) { maLBWindow.SetSeparatorPos( n ); }
+ USHORT GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
- void SetTopEntry( USHORT nTop ) { maLBWindow.SetTopEntry( nTop ); }
- USHORT GetTopEntry() const { return maLBWindow.GetTopEntry(); }
+ void SetTopEntry( USHORT nTop ) { maLBWindow.SetTopEntry( nTop ); }
+ USHORT GetTopEntry() const { return maLBWindow.GetTopEntry(); }
void ShowProminentEntry( USHORT nPos ) { maLBWindow.ShowProminentEntry( nPos ); }
using Window::IsVisible;
- BOOL IsVisible( USHORT nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
+ BOOL IsVisible( USHORT nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); }
ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); }
- long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); }
- void SetLeftIndent( USHORT n ) { maLBWindow.SetLeftIndent( n ); }
- void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); }
+ long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); }
+ void SetLeftIndent( USHORT n ) { maLBWindow.SetLeftIndent( n ); }
+ void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); }
void SetTravelSelect( BOOL bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); }
- BOOL IsTravelSelect() const { return maLBWindow.IsTravelSelect(); }
- BOOL IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); }
-
- void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); }
- BOOL IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); }
-
- void SetMultiSelectionSimpleMode( BOOL bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); }
- BOOL IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); }
-
- void SetReadOnly( BOOL b ) { maLBWindow.SetReadOnly( b ); }
- BOOL IsReadOnly() const { return maLBWindow.IsReadOnly(); }
-
-
- Size CalcSize( USHORT nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
- long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); }
- long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); }
-
- void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
- const Link& GetScrollHdl() const { return maScrollHdl; }
- void SetSelectHdl( const Link& rLink ) { maLBWindow.SetSelectHdl( rLink ); }
- const Link& GetSelectHdl() const { return maLBWindow.GetSelectHdl(); }
- void SetCancelHdl( const Link& rLink ) { maLBWindow.SetCancelHdl( rLink ); }
- const Link& GetCancelHdl() const { return maLBWindow.GetCancelHdl(); }
- void SetDoubleClickHdl( const Link& rLink ) { maLBWindow.SetDoubleClickHdl( rLink ); }
- const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); }
- void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); }
- const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); }
-
- void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
- void SetCallSelectionChangedHdl( BOOL bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
- BOOL IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
- USHORT GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
-
- void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep );
- XubString GetMRUEntries( xub_Unicode cSep ) const;
- void SetMaxMRUCount( USHORT n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
- USHORT GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
- USHORT GetDisplayLineCount() const
+ BOOL IsTravelSelect() const { return maLBWindow.IsTravelSelect(); }
+ BOOL IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); }
+
+ void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); }
+ BOOL IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); }
+
+ void SetMultiSelectionSimpleMode( BOOL bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); }
+ BOOL IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); }
+
+ void SetReadOnly( BOOL b ) { maLBWindow.SetReadOnly( b ); }
+ BOOL IsReadOnly() const { return maLBWindow.IsReadOnly(); }
+
+
+ Size CalcSize( USHORT nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
+ long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); }
+ long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); }
+
+ void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; }
+ const Link& GetScrollHdl() const { return maScrollHdl; }
+ void SetSelectHdl( const Link& rLink ) { maLBWindow.SetSelectHdl( rLink ); }
+ const Link& GetSelectHdl() const { return maLBWindow.GetSelectHdl(); }
+ void SetCancelHdl( const Link& rLink ) { maLBWindow.SetCancelHdl( rLink ); }
+ const Link& GetCancelHdl() const { return maLBWindow.GetCancelHdl(); }
+ void SetDoubleClickHdl( const Link& rLink ) { maLBWindow.SetDoubleClickHdl( rLink ); }
+ const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); }
+ void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); }
+ const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); }
+
+ void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
+ void SetCallSelectionChangedHdl( BOOL bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
+ BOOL IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
+ USHORT GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
+
+ void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep );
+ XubString GetMRUEntries( xub_Unicode cSep ) const;
+ void SetMaxMRUCount( USHORT n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
+ USHORT GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
+ USHORT GetDisplayLineCount() const
{ return maLBWindow.GetDisplayLineCount(); }
// pb: #106948# explicit mirroring for calc
- inline void EnableMirroring() { maLBWindow.EnableMirroring(); }
+ inline void EnableMirroring() { maLBWindow.EnableMirroring(); }
inline void SetDropTraget(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ mxDNDListenerContainer= i_xDNDListenerContainer; }
};
@@ -512,40 +512,40 @@ public:
class ImplListBoxFloatingWindow : public FloatingWindow
{
private:
- ImplListBox* mpImplLB;
- Size maPrefSz;
- USHORT mnDDLineCount;
+ ImplListBox* mpImplLB;
+ Size maPrefSz;
+ USHORT mnDDLineCount;
USHORT mnPopupModeStartSaveSelection;
- BOOL mbAutoWidth;
+ BOOL mbAutoWidth;
protected:
- long PreNotify( NotifyEvent& rNEvt );
+ long PreNotify( NotifyEvent& rNEvt );
public:
ImplListBoxFloatingWindow( Window* pParent );
- void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; }
+ void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; }
- void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; }
- const Size& GetPrefSize() const { return maPrefSz; }
+ void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; }
+ const Size& GetPrefSize() const { return maPrefSz; }
- void SetAutoWidth( BOOL b ) { mbAutoWidth = b; }
+ void SetAutoWidth( BOOL b ) { mbAutoWidth = b; }
BOOL IsAutoWidth() const { return mbAutoWidth; }
- Size CalcFloatSize();
- void StartFloat( BOOL bStartTracking );
+ Size CalcFloatSize();
+ void StartFloat( BOOL bStartTracking );
- virtual void SetPosSizePixel( long nX, long nY,
+ virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL );
- void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
+ void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{ FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); }
- void SetDropDownLineCount( USHORT n ) { mnDDLineCount = n; }
- USHORT GetDropDownLineCount() const { return mnDDLineCount; }
+ void SetDropDownLineCount( USHORT n ) { mnDDLineCount = n; }
+ USHORT GetDropDownLineCount() const { return mnDDLineCount; }
USHORT GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; }
- virtual void Resize();
+ virtual void Resize();
};
// -----------
@@ -556,19 +556,19 @@ class ImplWin : public Control
{
private:
- USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle.
- XubString maString;
- Image maImage;
- Image maImageHC;
+ USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle.
+ XubString maString;
+ Image maImage;
+ Image maImageHC;
- Rectangle maFocusRect;
- Size maUserItemSize;
+ Rectangle maFocusRect;
+ Size maUserItemSize;
- Link maMBDownHdl;
- Link maUserDrawHdl;
+ Link maMBDownHdl;
+ Link maUserDrawHdl;
- BOOL mbUserDrawEnabled : 1,
- mbInUserDraw : 1;
+ BOOL mbUserDrawEnabled : 1,
+ mbInUserDraw : 1;
void ImplDraw( bool bLayout = false );
@@ -579,40 +579,40 @@ public:
ImplWin( Window* pParent, WinBits nWinStyle = 0 );
~ImplWin() {};
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void GetFocus();
- virtual void LoseFocus();
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual void GetFocus();
+ virtual void LoseFocus();
virtual long PreNotify( NotifyEvent& rNEvt );
- USHORT GetItemPos() const { return mnItemPos; }
- void SetItemPos( USHORT n ) { mnItemPos = n; }
+ USHORT GetItemPos() const { return mnItemPos; }
+ void SetItemPos( USHORT n ) { mnItemPos = n; }
const XubString& GetString() const { return maString; }
- void SetString( const XubString& rStr ) { maString = rStr; }
+ void SetString( const XubString& rStr ) { maString = rStr; }
- const Image& GetImage() const { return maImage; }
- void SetImage( const Image& rImg ) { maImage = rImg; }
+ const Image& GetImage() const { return maImage; }
+ void SetImage( const Image& rImg ) { maImage = rImg; }
BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
- virtual void MBDown();
- void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; }
- const Link& GetMBDownHdl() const { return maMBDownHdl; }
+ virtual void MBDown();
+ void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; }
+ const Link& GetMBDownHdl() const { return maMBDownHdl; }
- void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; }
- const Link& GetUserDrawHdl() const { return maUserDrawHdl; }
+ void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; }
+ const Link& GetUserDrawHdl() const { return maUserDrawHdl; }
- void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; }
- const Size& GetUserItemSize() const { return maUserItemSize; }
+ void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; }
+ const Size& GetUserItemSize() const { return maUserItemSize; }
- void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
- BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; }
+ void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
+ BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; }
- void DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false );
+ void DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false );
};
// -----------
@@ -622,25 +622,25 @@ public:
class ImplBtn : public PushButton
{
private:
- BOOL mbDown;
+ BOOL mbDown;
- Link maMBDownHdl;
+ Link maMBDownHdl;
public:
ImplBtn( Window* pParent, WinBits nWinStyle = 0 );
~ImplBtn() {};
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MBDown();
- void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; }
- const Link& GetMBDownHdl() const { return maMBDownHdl; }
+ virtual void MBDown();
+ void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; }
+ const Link& GetMBDownHdl() const { return maMBDownHdl; }
};
void ImplInitFieldSettings( Window* pWin, BOOL bFont, BOOL bForeground, BOOL bBackground );
void ImplInitDropDownButton( PushButton* pButton );
-#endif // _SV_ILSTBOX_HXX
+#endif // _SV_ILSTBOX_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/image.h b/vcl/inc/vcl/image.h
index 397cde3af506..0234d57f6811 100644
--- a/vcl/inc/vcl/image.h
+++ b/vcl/inc/vcl/image.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,34 +44,34 @@ public:
ImplImageBmp();
~ImplImageBmp();
- void Create( long nItemWidth, long nItemHeight, USHORT nInitSize );
- void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,USHORT nInitSize );
+ void Create( long nItemWidth, long nItemHeight, USHORT nInitSize );
+ void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,USHORT nInitSize );
- void Expand( USHORT nGrowSize );
+ void Expand( USHORT nGrowSize );
- void Replace( USHORT nPos, USHORT nSrcPos );
- void Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos );
- void Replace( USHORT nPos, const BitmapEx& rBmpEx );
+ void Replace( USHORT nPos, USHORT nSrcPos );
+ void Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos );
+ void Replace( USHORT nPos, const BitmapEx& rBmpEx );
void ReplaceColors( const Color* pSrcColors, const Color* pDstColors, ULONG nColorCount );
- void ColorTransform( BmpColorMode eColorMode );
- void Invert();
+ void ColorTransform( BmpColorMode eColorMode );
+ void Invert();
- BitmapEx GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const;
+ BitmapEx GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const;
- void Draw( USHORT nPos, OutputDevice* pDev, const Point& rPos, USHORT nStyle, const Size* pSize = NULL );
+ void Draw( USHORT nPos, OutputDevice* pDev, const Point& rPos, USHORT nStyle, const Size* pSize = NULL );
private:
- BitmapEx maBmpEx;
- BitmapEx maDisabledBmpEx;
- BitmapEx* mpDisplayBmp;
- Size maSize;
- BYTE* mpInfoAry;
- USHORT mnSize;
+ BitmapEx maBmpEx;
+ BitmapEx maDisabledBmpEx;
+ BitmapEx* mpDisplayBmp;
+ Size maSize;
+ BYTE* mpInfoAry;
+ USHORT mnSize;
- void ImplUpdateDisplayBmp( OutputDevice* pOutDev );
- void ImplUpdateDisabledBmpEx( int nPos );
+ void ImplUpdateDisplayBmp( OutputDevice* pOutDev );
+ void ImplUpdateDisabledBmpEx( int nPos );
private: // prevent assignment and copy construction
ImplImageBmp( const ImplImageBmp& );
@@ -90,9 +90,9 @@ enum ImageType { IMAGETYPE_BITMAP, IMAGETYPE_IMAGE };
struct ImageAryData
{
- ::rtl::OUString maName;
+ ::rtl::OUString maName;
// Images identified by either name, or by id
- USHORT mnId;
+ USHORT mnId;
BitmapEx maBitmapEx;
ImageAryData();
@@ -104,7 +104,7 @@ struct ImageAryData
bool IsLoadable() { return maBitmapEx.IsEmpty() && maName.getLength(); }
void Load(const rtl::OUString &rPrefix);
- ImageAryData& operator=( const ImageAryData& rData );
+ ImageAryData& operator=( const ImageAryData& rData );
};
// ------------------------------------------------------------------------------
@@ -118,7 +118,7 @@ struct ImplImageList
ImageAryDataVec maImages;
ImageAryDataNameHash maNameHash;
rtl::OUString maPrefix;
- Size maImageSize;
+ Size maImageSize;
ULONG mnRefCount;
ImplImageList();
@@ -137,13 +137,13 @@ struct ImplImageList
struct ImplImageRefData
{
- ImplImageList* mpImplData;
- USHORT mnIndex;
+ ImplImageList* mpImplData;
+ USHORT mnIndex;
- ImplImageRefData() {} // Um Warning zu umgehen
+ ImplImageRefData() {} // Um Warning zu umgehen
~ImplImageRefData();
- BOOL IsEqual( const ImplImageRefData& rData );
+ BOOL IsEqual( const ImplImageRefData& rData );
};
// ----------------
@@ -152,13 +152,13 @@ struct ImplImageRefData
struct ImplImageData
{
- ImplImageBmp* mpImageBitmap;
- BitmapEx maBmpEx;
+ ImplImageBmp* mpImageBitmap;
+ BitmapEx maBmpEx;
ImplImageData( const BitmapEx& rBmpEx );
~ImplImageData();
- BOOL IsEqual( const ImplImageData& rData );
+ BOOL IsEqual( const ImplImageData& rData );
};
// -------------
@@ -167,10 +167,10 @@ struct ImplImageData
struct ImplImage
{
- ULONG mnRefCount;
+ ULONG mnRefCount;
// TODO: use inheritance to get rid of meType+mpData
- void* mpData;
- ImageType meType;
+ void* mpData;
+ ImageType meType;
ImplImage();
~ImplImage();
diff --git a/vcl/inc/vcl/image.hxx b/vcl/inc/vcl/image.hxx
index c0c7cf63be51..600e86ecf652 100644
--- a/vcl/inc/vcl/image.hxx
+++ b/vcl/inc/vcl/image.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +46,8 @@ namespace com { namespace sun { namespace star { namespace graphic { class XGrap
// - Defines -
// -----------
-#define IMAGE_STDBTN_COLOR Color( 0xC0, 0xC0, 0xC0 )
-#define IMAGELIST_IMAGE_NOTFOUND ((USHORT)0xFFFF)
+#define IMAGE_STDBTN_COLOR Color( 0xC0, 0xC0, 0xC0 )
+#define IMAGELIST_IMAGE_NOTFOUND ((USHORT)0xFFFF)
// -----------------------
// - ImageColorTransform -
@@ -81,9 +81,9 @@ public:
Image( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic );
~Image();
- Size GetSizePixel() const;
+ Size GetSizePixel() const;
- BitmapEx GetBitmapEx() const;
+ BitmapEx GetBitmapEx() const;
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > GetXGraphic() const;
Image GetColorTransformedImage( ImageColorTransform eColorTransform ) const;
@@ -91,14 +91,14 @@ public:
void Invert();
- BOOL operator!() const { return( !mpImplData ? true : false ); }
- Image& operator=( const Image& rImage );
- BOOL operator==( const Image& rImage ) const;
- BOOL operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); }
+ BOOL operator!() const { return( !mpImplData ? true : false ); }
+ Image& operator=( const Image& rImage );
+ BOOL operator==( const Image& rImage ) const;
+ BOOL operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); }
private:
- ImplImage* mpImplData;
+ ImplImage* mpImplData;
SAL_DLLPRIVATE void ImplInit( const BitmapEx& rBmpEx );
};
@@ -118,53 +118,53 @@ public:
ImageList( const ImageList& rImageList );
~ImageList();
- void Clear();
- void InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
+ void Clear();
+ void InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
const std::vector< rtl::OUString > &rNameVector );
- void InsertFromHorizontalBitmap( const ResId& rResId,
+ void InsertFromHorizontalBitmap( const ResId& rResId,
USHORT nCount,
const Color *pNonAlphaMaskColor,
const Color *pSearchColors = NULL,
const Color *pReplaceColors = NULL,
ULONG nColorCount = 0);
- BitmapEx GetAsHorizontalStrip() const;
- USHORT GetImageCount() const;
- Size GetImageSize() const;
+ BitmapEx GetAsHorizontalStrip() const;
+ USHORT GetImageCount() const;
+ Size GetImageSize() const;
- void AddImage( USHORT nNewId, const Image& rImage );
- void AddImage( const ::rtl::OUString& rImageName, const Image& rImage );
+ void AddImage( USHORT nNewId, const Image& rImage );
+ void AddImage( const ::rtl::OUString& rImageName, const Image& rImage );
- void ReplaceImage( USHORT nId, const Image& rImage );
- void ReplaceImage( const ::rtl::OUString& rImageName, const Image& rImage );
+ void ReplaceImage( USHORT nId, const Image& rImage );
+ void ReplaceImage( const ::rtl::OUString& rImageName, const Image& rImage );
- void ReplaceImage( USHORT nId, USHORT nReplaceId );
- void ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OUString& rReplaceName );
+ void ReplaceImage( USHORT nId, USHORT nReplaceId );
+ void ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OUString& rReplaceName );
- void RemoveImage( USHORT nId );
- void RemoveImage( const ::rtl::OUString& rImageName );
+ void RemoveImage( USHORT nId );
+ void RemoveImage( const ::rtl::OUString& rImageName );
- Image GetImage( USHORT nId ) const;
- Image GetImage( const ::rtl::OUString& rImageName ) const;
+ Image GetImage( USHORT nId ) const;
+ Image GetImage( const ::rtl::OUString& rImageName ) const;
- USHORT GetImagePos( USHORT nId ) const;
- bool HasImageAtPos( USHORT nId ) const;
- USHORT GetImagePos( const ::rtl::OUString& rImageName ) const;
+ USHORT GetImagePos( USHORT nId ) const;
+ bool HasImageAtPos( USHORT nId ) const;
+ USHORT GetImagePos( const ::rtl::OUString& rImageName ) const;
- USHORT GetImageId( USHORT nPos ) const;
- void GetImageIds( ::std::vector< USHORT >& rIds ) const;
+ USHORT GetImageId( USHORT nPos ) const;
+ void GetImageIds( ::std::vector< USHORT >& rIds ) const;
- ::rtl::OUString GetImageName( USHORT nPos ) const;
- void GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const;
+ ::rtl::OUString GetImageName( USHORT nPos ) const;
+ void GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const;
- ImageList& operator=( const ImageList& rImageList );
- BOOL operator==( const ImageList& rImageList ) const;
- BOOL operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
+ ImageList& operator=( const ImageList& rImageList );
+ BOOL operator==( const ImageList& rImageList ) const;
+ BOOL operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
private:
- ImplImageList* mpImplData;
- USHORT mnInitSize;
- USHORT mnGrowSize;
+ ImplImageList* mpImplData;
+ USHORT mnInitSize;
+ USHORT mnGrowSize;
SAL_DLLPRIVATE void ImplInitBitmapEx( const ::rtl::OUString& rUserImageName,
const ::std::vector< ::rtl::OUString >& rImageNames,
@@ -176,6 +176,6 @@ private:
SAL_DLLPRIVATE void ImplMakeUnique();
};
-#endif // _SV_IMAGE_HXX
+#endif // _SV_IMAGE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/imagerepository.hxx b/vcl/inc/vcl/imagerepository.hxx
index 7f0a3da28648..a9009df3dd29 100644
--- a/vcl/inc/vcl/imagerepository.hxx
+++ b/vcl/inc/vcl/imagerepository.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/imgctrl.hxx b/vcl/inc/vcl/imgctrl.hxx
index 4b68d89130b4..c72743397f05 100644
--- a/vcl/inc/vcl/imgctrl.hxx
+++ b/vcl/inc/vcl/imgctrl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +41,8 @@
class VCL_DLLPUBLIC ImageControl : public FixedImage
{
private:
- BitmapEx maBmp;
- BitmapEx maBmpHC;
+ BitmapEx maBmp;
+ BitmapEx maBmpHC;
::sal_Int16 mnScaleMode;
public:
@@ -52,19 +52,19 @@ public:
void SetScaleMode( const ::sal_Int16 _nMode );
::sal_Int16 GetScaleMode() const { return mnScaleMode; }
- virtual void Resize();
- virtual void UserDraw( const UserDrawEvent& rUDEvt );
+ virtual void Resize();
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
virtual void Paint( const Rectangle& rRect );
virtual void GetFocus();
virtual void LoseFocus();
- void SetBitmap( const BitmapEx& rBmp );
+ void SetBitmap( const BitmapEx& rBmp );
using OutputDevice::GetBitmap;
const BitmapEx& GetBitmap() const { return maBmp; }
BOOL SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
const BitmapEx& GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
};
-#endif // _SV_IMGCTRL_HXX
+#endif // _SV_IMGCTRL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/impbmp.hxx b/vcl/inc/vcl/impbmp.hxx
index 1292cce59ef5..fedf9a11a993 100644
--- a/vcl/inc/vcl/impbmp.hxx
+++ b/vcl/inc/vcl/impbmp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ struct BitmapBuffer;
class SalBitmap;
class BitmapPalette;
class SalGraphics;
-class ImplServerBitmap;
+class ImplServerBitmap;
class Bitmap;
class OutputDevice;
class Color;
@@ -50,11 +50,11 @@ class ImpBitmap
{
private:
- ULONG mnRefCount;
- ULONG mnChecksum;
- SalBitmap* mpSalBitmap;
- Size maSourceSize;
-
+ ULONG mnRefCount;
+ ULONG mnChecksum;
+ SalBitmap* mpSalBitmap;
+ Size maSourceSize;
+
public:
ImpBitmap();
@@ -64,34 +64,34 @@ public:
public:
- void ImplSetSalBitmap( SalBitmap* pSalBitmap );
- SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; }
+ void ImplSetSalBitmap( SalBitmap* pSalBitmap );
+ SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; }
public:
- BOOL ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- BOOL ImplCreate( const ImpBitmap& rImpBitmap );
- BOOL ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics );
- BOOL ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount );
-
- void ImplDestroy();
-
- Size ImplGetSize() const;
- Size ImplGetSourceSize() const;
- void ImplSetSourceSize( const Size&);
- USHORT ImplGetBitCount() const;
-
- BitmapBuffer* ImplAcquireBuffer( BOOL bReadOnly );
- void ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly );
-
-public:
-
- ULONG ImplGetRefCount() const { return mnRefCount; }
- void ImplIncRefCount() { mnRefCount++; }
- void ImplDecRefCount() { mnRefCount--; }
-
- inline void ImplSetChecksum( ULONG nChecksum ) { mnChecksum = nChecksum; }
- inline ULONG ImplGetChecksum() const { return mnChecksum; }
+ BOOL ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
+ BOOL ImplCreate( const ImpBitmap& rImpBitmap );
+ BOOL ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics );
+ BOOL ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount );
+
+ void ImplDestroy();
+
+ Size ImplGetSize() const;
+ Size ImplGetSourceSize() const;
+ void ImplSetSourceSize( const Size&);
+ USHORT ImplGetBitCount() const;
+
+ BitmapBuffer* ImplAcquireBuffer( BOOL bReadOnly );
+ void ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly );
+
+public:
+
+ ULONG ImplGetRefCount() const { return mnRefCount; }
+ void ImplIncRefCount() { mnRefCount++; }
+ void ImplDecRefCount() { mnRefCount--; }
+
+ inline void ImplSetChecksum( ULONG nChecksum ) { mnChecksum = nChecksum; }
+ inline ULONG ImplGetChecksum() const { return mnChecksum; }
#endif // PRIVATE
};
diff --git a/vcl/inc/vcl/impbmpconv.hxx b/vcl/inc/vcl/impbmpconv.hxx
index 0d82ed119d6d..b949ea898c3f 100644
--- a/vcl/inc/vcl/impbmpconv.hxx
+++ b/vcl/inc/vcl/impbmpconv.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/impdel.hxx b/vcl/inc/vcl/impdel.hxx
index 90ab82bd1878..5e39eff5541e 100644
--- a/vcl/inc/vcl/impdel.hxx
+++ b/vcl/inc/vcl/impdel.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +28,14 @@
#ifndef _VCL_IMPDEL_HXX
#define _VCL_IMPDEL_HXX
-
+
#include <list>
-
+
namespace vcl
{
-
+
class DeletionListener;
-
+
class DeletionNotifier
{
std::list< DeletionListener* > m_aListeners;
@@ -44,23 +44,23 @@
~DeletionNotifier()
{ notifyDelete(); }
-
+
inline void notifyDelete();
- public:
+ public:
void addDel( DeletionListener* pListener )
{ m_aListeners.push_back( pListener ); }
-
+
void removeDel( DeletionListener* pListener )
{ m_aListeners.remove( pListener ); }
};
-
+
class DeletionListener
{
- DeletionNotifier* m_pNotifier;
+ DeletionNotifier* m_pNotifier;
public:
DeletionListener( DeletionNotifier* pNotifier )
- : m_pNotifier( pNotifier )
+ : m_pNotifier( pNotifier )
{
if( m_pNotifier )
m_pNotifier->addDel( this );
@@ -79,12 +79,12 @@
for( std::list< DeletionListener* >::const_iterator it =
m_aListeners.begin(); it != m_aListeners.end(); ++it )
(*it)->deleted();
-
+
m_aListeners.clear();
}
-
+
} // namespace vcl
-
+
#endif // _VCL_IMPDEL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx
index 06031c2c5df9..b7a0368f89bf 100644
--- a/vcl/inc/vcl/impfont.hxx
+++ b/vcl/inc/vcl/impfont.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,38 +59,38 @@ private:
friend class Font;
void AskConfig();
- int mnRefCount;
- String maFamilyName;
- String maStyleName;
- Size maSize;
- Color maColor; // compatibility, now on output device
- Color maFillColor; // compatibility, now on output device
- rtl_TextEncoding meCharSet;
- LanguageType meLanguage;
- LanguageType meCJKLanguage;
- FontFamily meFamily;
- FontPitch mePitch;
- TextAlign meAlign;
- FontWeight meWeight;
- FontWidth meWidthType;
- FontItalic meItalic;
- FontUnderline meUnderline;
- FontUnderline meOverline;
- FontStrikeout meStrikeout;
- FontRelief meRelief;
- FontEmphasisMark meEmphasisMark;
- FontType meType; // used by metrics only
- short mnOrientation;
- FontKerning mnKerning;
- BOOL mbWordLine:1,
+ int mnRefCount;
+ String maFamilyName;
+ String maStyleName;
+ Size maSize;
+ Color maColor; // compatibility, now on output device
+ Color maFillColor; // compatibility, now on output device
+ rtl_TextEncoding meCharSet;
+ LanguageType meLanguage;
+ LanguageType meCJKLanguage;
+ FontFamily meFamily;
+ FontPitch mePitch;
+ TextAlign meAlign;
+ FontWeight meWeight;
+ FontWidth meWidthType;
+ FontItalic meItalic;
+ FontUnderline meUnderline;
+ FontUnderline meOverline;
+ FontStrikeout meStrikeout;
+ FontRelief meRelief;
+ FontEmphasisMark meEmphasisMark;
+ FontType meType; // used by metrics only
+ short mnOrientation;
+ FontKerning mnKerning;
+ BOOL mbWordLine:1,
mbOutline:1,
mbConfigLookup:1, // there was a config lookup
mbShadow:1,
mbVertical:1,
- mbTransparent:1; // compatibility, now on output device
+ mbTransparent:1; // compatibility, now on output device
- friend SvStream& operator>>( SvStream& rIStm, Impl_Font& );
- friend SvStream& operator<<( SvStream& rOStm, const Impl_Font& );
+ friend SvStream& operator>>( SvStream& rIStm, Impl_Font& );
+ friend SvStream& operator<<( SvStream& rOStm, const Impl_Font& );
};
// ------------------
@@ -148,18 +148,18 @@ public:
FontHintStyle meHintStyle; // type of font hinting to be used
public:
ImplFontOptions() :
- meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW),
- meAntiAlias(ANTIALIAS_DONTKNOW),
- meAutoHint(AUTOHINT_DONTKNOW),
- meHinting(HINTING_DONTKNOW),
+ meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW),
+ meAntiAlias(ANTIALIAS_DONTKNOW),
+ meAutoHint(AUTOHINT_DONTKNOW),
+ meHinting(HINTING_DONTKNOW),
meHintStyle(HINT_SLIGHT)
{}
- ImplFontOptions( FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias,
+ ImplFontOptions( FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias,
FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) :
- meEmbeddedBitmap(eEmbeddedBitmap),
- meAntiAlias(eAntiAlias),
- meAutoHint(eAutoHint),
- meHinting(eHinting),
+ meEmbeddedBitmap(eEmbeddedBitmap),
+ meAntiAlias(eAntiAlias),
+ meAutoHint(eAutoHint),
+ meHinting(eHinting),
meHintStyle(eHintStyle)
{}
FontAutoHint GetUseAutoHint() const { return meAutoHint; }
@@ -226,16 +226,16 @@ class
CmapResult
{
public:
- explicit CmapResult( bool bSymbolic = false,
+ explicit CmapResult( bool bSymbolic = false,
const sal_uInt32* pRangeCodes = NULL, int nRangeCount = 0,
const int* pStartGlyphs = 0, const USHORT* pGlyphIds = NULL );
const sal_uInt32* mpRangeCodes;
const int* mpStartGlyphs;
const USHORT* mpGlyphIds;
- int mnRangeCount;
- bool mbSymbolic;
- bool mbRecoded;
+ int mnRangeCount;
+ bool mbSymbolic;
+ bool mbRecoded;
};
bool ParseCMAP( const unsigned char* pRawData, int nRawLength, CmapResult& );
diff --git a/vcl/inc/vcl/impgraph.hxx b/vcl/inc/vcl/impgraph.hxx
index dfb47a153f2d..fc6b12a7e863 100644
--- a/vcl/inc/vcl/impgraph.hxx
+++ b/vcl/inc/vcl/impgraph.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +42,17 @@
struct ImpSwapInfo
{
- MapMode maPrefMapMode;
- Size maPrefSize;
+ MapMode maPrefMapMode;
+ Size maPrefSize;
};
// --------------
// - ImpGraphic -
// --------------
-class OutputDevice;
-class GfxLink;
-struct ImpSwapFile;
+class OutputDevice;
+class GfxLink;
+struct ImpSwapFile;
class GraphicConversionParameters;
class ImpGraphic
@@ -61,20 +61,20 @@ class ImpGraphic
private:
- GDIMetaFile maMetaFile;
- BitmapEx maEx;
- ImpSwapInfo maSwapInfo;
- Animation* mpAnimation;
- GraphicReader* mpContext;
- ImpSwapFile* mpSwapFile;
- GfxLink* mpGfxLink;
- GraphicType meType;
- String maDocFileURLStr;
- ULONG mnDocFilePos;
+ GDIMetaFile maMetaFile;
+ BitmapEx maEx;
+ ImpSwapInfo maSwapInfo;
+ Animation* mpAnimation;
+ GraphicReader* mpContext;
+ ImpSwapFile* mpSwapFile;
+ GfxLink* mpGfxLink;
+ GraphicType meType;
+ String maDocFileURLStr;
+ ULONG mnDocFilePos;
mutable ULONG mnSizeBytes;
- ULONG mnRefCount;
- BOOL mbSwapOut;
- BOOL mbSwapUnderway;
+ ULONG mnRefCount;
+ BOOL mbSwapOut;
+ BOOL mbSwapUnderway;
private:
@@ -84,94 +84,94 @@ private:
ImpGraphic( const BitmapEx& rBmpEx );
ImpGraphic( const Animation& rAnimation );
ImpGraphic( const GDIMetaFile& rMtf );
- virtual ~ImpGraphic();
-
- ImpGraphic& operator=( const ImpGraphic& rImpGraphic );
- BOOL operator==( const ImpGraphic& rImpGraphic ) const;
- BOOL operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
+ virtual ~ImpGraphic();
- void ImplClearGraphics( BOOL bCreateSwapInfo );
- void ImplClear();
+ ImpGraphic& operator=( const ImpGraphic& rImpGraphic );
+ BOOL operator==( const ImpGraphic& rImpGraphic ) const;
+ BOOL operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
- GraphicType ImplGetType() const;
- void ImplSetDefaultType();
- BOOL ImplIsSupportedGraphic() const;
+ void ImplClearGraphics( BOOL bCreateSwapInfo );
+ void ImplClear();
- BOOL ImplIsTransparent() const;
- BOOL ImplIsAlpha() const;
- BOOL ImplIsAnimated() const;
+ GraphicType ImplGetType() const;
+ void ImplSetDefaultType();
+ BOOL ImplIsSupportedGraphic() const;
- Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const;
- BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const;
- Animation ImplGetAnimation() const;
- const GDIMetaFile& ImplGetGDIMetaFile() const;
+ BOOL ImplIsTransparent() const;
+ BOOL ImplIsAlpha() const;
+ BOOL ImplIsAnimated() const;
- Size ImplGetPrefSize() const;
- void ImplSetPrefSize( const Size& rPrefSize );
+ Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const;
+ BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const;
+ Animation ImplGetAnimation() const;
+ const GDIMetaFile& ImplGetGDIMetaFile() const;
- MapMode ImplGetPrefMapMode() const;
- void ImplSetPrefMapMode( const MapMode& rPrefMapMode );
+ Size ImplGetPrefSize() const;
+ void ImplSetPrefSize( const Size& rPrefSize );
+
+ MapMode ImplGetPrefMapMode() const;
+ void ImplSetPrefMapMode( const MapMode& rPrefMapMode );
- ULONG ImplGetSizeBytes() const;
+ ULONG ImplGetSizeBytes() const;
- void ImplDraw( OutputDevice* pOutDev,
+ void ImplDraw( OutputDevice* pOutDev,
const Point& rDestPt ) const;
- void ImplDraw( OutputDevice* pOutDev,
- const Point& rDestPt,
+ void ImplDraw( OutputDevice* pOutDev,
+ const Point& rDestPt,
const Size& rDestSize ) const;
- void ImplStartAnimation( OutputDevice* pOutDev,
+ void ImplStartAnimation( OutputDevice* pOutDev,
const Point& rDestPt,
long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = NULL );
- void ImplStartAnimation( OutputDevice* pOutDev,
+ void ImplStartAnimation( OutputDevice* pOutDev,
const Point& rDestPt,
- const Size& rDestSize,
+ const Size& rDestSize,
long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = NULL );
- void ImplStopAnimation( OutputDevice* pOutputDevice = NULL,
+ void ImplStopAnimation( OutputDevice* pOutputDevice = NULL,
long nExtraData = 0 );
- void ImplSetAnimationNotifyHdl( const Link& rLink );
- Link ImplGetAnimationNotifyHdl() const;
+ void ImplSetAnimationNotifyHdl( const Link& rLink );
+ Link ImplGetAnimationNotifyHdl() const;
- ULONG ImplGetAnimationLoopCount() const;
- void ImplResetAnimationLoopCount();
+ ULONG ImplGetAnimationLoopCount() const;
+ void ImplResetAnimationLoopCount();
- List* ImplGetAnimationInfoList() const;
+ List* ImplGetAnimationInfoList() const;
private:
- GraphicReader* ImplGetContext();
- void ImplSetContext( GraphicReader* pReader );
+ GraphicReader* ImplGetContext();
+ void ImplSetContext( GraphicReader* pReader );
private:
- void ImplSetDocFileName( const String& rName, ULONG nFilePos );
- const String& ImplGetDocFileName() const;
- ULONG ImplGetDocFilePos() const;
+ void ImplSetDocFileName( const String& rName, ULONG nFilePos );
+ const String& ImplGetDocFileName() const;
+ ULONG ImplGetDocFilePos() const;
- BOOL ImplReadEmbedded( SvStream& rIStream, BOOL bSwap = FALSE );
- BOOL ImplWriteEmbedded( SvStream& rOStream );
+ BOOL ImplReadEmbedded( SvStream& rIStream, BOOL bSwap = FALSE );
+ BOOL ImplWriteEmbedded( SvStream& rOStream );
- BOOL ImplSwapIn();
- BOOL ImplSwapIn( SvStream* pIStm );
+ BOOL ImplSwapIn();
+ BOOL ImplSwapIn( SvStream* pIStm );
- BOOL ImplSwapOut();
- BOOL ImplSwapOut( SvStream* pOStm );
+ BOOL ImplSwapOut();
+ BOOL ImplSwapOut( SvStream* pOStm );
- BOOL ImplIsSwapOut() const;
+ BOOL ImplIsSwapOut() const;
- void ImplSetLink( const GfxLink& );
- GfxLink ImplGetLink();
- BOOL ImplIsLink() const;
+ void ImplSetLink( const GfxLink& );
+ GfxLink ImplGetLink();
+ BOOL ImplIsLink() const;
- ULONG ImplGetChecksum() const;
+ ULONG ImplGetChecksum() const;
- BOOL ImplExportNative( SvStream& rOStm ) const;
+ BOOL ImplExportNative( SvStream& rOStm ) const;
- friend SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic );
- friend SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic );
+ friend SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic );
+ friend SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic );
};
#endif // _SV_IMPGRAPH_HXX
diff --git a/vcl/inc/vcl/impimagetree.hxx b/vcl/inc/vcl/impimagetree.hxx
index 849e98bb234c..8b694eb8625b 100644
--- a/vcl/inc/vcl/impimagetree.hxx
+++ b/vcl/inc/vcl/impimagetree.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/impoct.hxx b/vcl/inc/vcl/impoct.hxx
index 1679b4802c63..6437027db402 100644
--- a/vcl/inc/vcl/impoct.hxx
+++ b/vcl/inc/vcl/impoct.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ImpErrorQuad
{
- long nRed;
- long nGreen;
- long nBlue;
- long nReserved;
-
-public:
-
- inline ImpErrorQuad() {}
- inline ImpErrorQuad( const BitmapColor& rColor ) :
- nRed ( (long) rColor.GetRed() << 5L ),
- nGreen ( (long) rColor.GetGreen() << 5L ),
- nBlue ( (long) rColor.GetBlue() << 5L ) {}
-
- inline void operator=( const BitmapColor& rColor );
- inline ImpErrorQuad& operator-=( const BitmapColor& rColor );
-
- inline void ImplAddColorError1( const ImpErrorQuad& rErrQuad );
- inline void ImplAddColorError3( const ImpErrorQuad& rErrQuad );
- inline void ImplAddColorError5( const ImpErrorQuad& rErrQuad );
- inline void ImplAddColorError7( const ImpErrorQuad& rErrQuad );
-
- inline BitmapColor ImplGetColor();
+ long nRed;
+ long nGreen;
+ long nBlue;
+ long nReserved;
+
+public:
+
+ inline ImpErrorQuad() {}
+ inline ImpErrorQuad( const BitmapColor& rColor ) :
+ nRed ( (long) rColor.GetRed() << 5L ),
+ nGreen ( (long) rColor.GetGreen() << 5L ),
+ nBlue ( (long) rColor.GetBlue() << 5L ) {}
+
+ inline void operator=( const BitmapColor& rColor );
+ inline ImpErrorQuad& operator-=( const BitmapColor& rColor );
+
+ inline void ImplAddColorError1( const ImpErrorQuad& rErrQuad );
+ inline void ImplAddColorError3( const ImpErrorQuad& rErrQuad );
+ inline void ImplAddColorError5( const ImpErrorQuad& rErrQuad );
+ inline void ImplAddColorError7( const ImpErrorQuad& rErrQuad );
+
+ inline BitmapColor ImplGetColor();
};
// ------------------------------------------------------------------------
@@ -121,8 +121,8 @@ inline void ImpErrorQuad::ImplAddColorError7( const ImpErrorQuad& rErrQuad )
inline BitmapColor ImpErrorQuad::ImplGetColor()
{
- return BitmapColor( (BYTE) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ),
- (BYTE) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ),
+ return BitmapColor( (BYTE) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ),
+ (BYTE) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ),
(BYTE) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5L ) );
}
@@ -132,19 +132,19 @@ inline BitmapColor ImpErrorQuad::ImplGetColor()
class ImpNodeCache
{
- OctreeNode* pActNode;
- ULONG nNew;
- ULONG nDelete;
- ULONG nGet;
- ULONG nRelease;
-
-public:
-
+ OctreeNode* pActNode;
+ ULONG nNew;
+ ULONG nDelete;
+ ULONG nGet;
+ ULONG nRelease;
+
+public:
+
ImpNodeCache( const ULONG nInitSize );
~ImpNodeCache();
- inline OctreeNode* ImplGetFreeNode();
- inline void ImplReleaseNode( OctreeNode* pNode );
+ inline OctreeNode* ImplGetFreeNode();
+ inline void ImplReleaseNode( OctreeNode* pNode );
};
// ------------------------------------------------------------------------
diff --git a/vcl/inc/vcl/inputctx.hxx b/vcl/inc/vcl/inputctx.hxx
index 26a43530c8d0..474d84c85d34 100644
--- a/vcl/inc/vcl/inputctx.hxx
+++ b/vcl/inc/vcl/inputctx.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +37,10 @@
// - InputContext-Flags -
// ----------------------
-#define INPUTCONTEXT_TEXT ((ULONG)0x00000001)
-#define INPUTCONTEXT_EXTTEXTINPUT ((ULONG)0x00000002)
-#define INPUTCONTEXT_EXTTEXTINPUT_ON ((ULONG)0x00000004)
-#define INPUTCONTEXT_EXTTEXTINPUT_OFF ((ULONG)0x00000008)
+#define INPUTCONTEXT_TEXT ((ULONG)0x00000001)
+#define INPUTCONTEXT_EXTTEXTINPUT ((ULONG)0x00000002)
+#define INPUTCONTEXT_EXTTEXTINPUT_ON ((ULONG)0x00000004)
+#define INPUTCONTEXT_EXTTEXTINPUT_OFF ((ULONG)0x00000008)
// ----------------
// - InputContext -
@@ -49,8 +49,8 @@
class VCL_DLLPUBLIC InputContext
{
private:
- Font maFont;
- ULONG mnOptions;
+ Font maFont;
+ ULONG mnOptions;
public:
InputContext() { mnOptions = 0; }
@@ -61,29 +61,29 @@ public:
maFont( rFont )
{ mnOptions = nOptions; }
- void SetFont( const Font& rFont ) { maFont = rFont; }
- const Font& GetFont() const { return maFont; }
+ void SetFont( const Font& rFont ) { maFont = rFont; }
+ const Font& GetFont() const { return maFont; }
- void SetOptions( ULONG nOptions ) { mnOptions = nOptions; }
- ULONG GetOptions() const { return mnOptions; }
+ void SetOptions( ULONG nOptions ) { mnOptions = nOptions; }
+ ULONG GetOptions() const { return mnOptions; }
- InputContext& operator=( const InputContext& rInputContext );
- BOOL operator==( const InputContext& rInputContext ) const;
- BOOL operator!=( const InputContext& rInputContext ) const
+ InputContext& operator=( const InputContext& rInputContext );
+ BOOL operator==( const InputContext& rInputContext ) const;
+ BOOL operator!=( const InputContext& rInputContext ) const
{ return !(InputContext::operator==( rInputContext )); }
};
inline InputContext& InputContext::operator=( const InputContext& rInputContext )
{
- maFont = rInputContext.maFont;
- mnOptions = rInputContext.mnOptions;
+ maFont = rInputContext.maFont;
+ mnOptions = rInputContext.mnOptions;
return *this;
}
inline BOOL InputContext::operator==( const InputContext& rInputContext ) const
{
- return ((mnOptions == rInputContext.mnOptions) &&
- (maFont == rInputContext.maFont));
+ return ((mnOptions == rInputContext.mnOptions) &&
+ (maFont == rInputContext.maFont));
}
#endif // _VCL_INPUTCTX_HXX
diff --git a/vcl/inc/vcl/introwin.hxx b/vcl/inc/vcl/introwin.hxx
index e5503bc5dfd6..128f7afae15a 100644
--- a/vcl/inc/vcl/introwin.hxx
+++ b/vcl/inc/vcl/introwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/javachild.hxx b/vcl/inc/vcl/javachild.hxx
index 5765adfd26f1..413e0cf14fdf 100644
--- a/vcl/inc/vcl/javachild.hxx
+++ b/vcl/inc/vcl/javachild.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
JavaChildWindow( Window* pParent, const ResId& rResId );
~JavaChildWindow();
- sal_IntPtr getParentWindowHandleForJava();
+ sal_IntPtr getParentWindowHandleForJava();
private:
diff --git a/vcl/inc/vcl/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx
index b51282d57b1e..baefe2ac4819 100644
--- a/vcl/inc/vcl/jobdata.hxx
+++ b/vcl/inc/vcl/jobdata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +71,7 @@ struct JobData
JobData& operator=(const psp::JobData& rRight);
JobData( const JobData& rData ) { *this = rData; }
-
+
void setCollate( bool bCollate );
// creates a new buffer using new
diff --git a/vcl/inc/vcl/jobset.h b/vcl/inc/vcl/jobset.h
index 7d460b908a55..096f31020f5b 100644
--- a/vcl/inc/vcl/jobset.h
+++ b/vcl/inc/vcl/jobset.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +40,11 @@
// ------------------
// see com.sun.star.portal.client.JobSetupSystem.idl:
-#define JOBSETUP_SYSTEM_DONTKNOW 0
-#define JOBSETUP_SYSTEM_WINDOWS 1
-#define JOBSETUP_SYSTEM_OS2 2
-#define JOBSETUP_SYSTEM_UNIX 3
-#define JOBSETUP_SYSTEM_MAC 4
+#define JOBSETUP_SYSTEM_DONTKNOW 0
+#define JOBSETUP_SYSTEM_WINDOWS 1
+#define JOBSETUP_SYSTEM_OS2 2
+#define JOBSETUP_SYSTEM_UNIX 3
+#define JOBSETUP_SYSTEM_MAC 4
#define JOBSETUP_SYSTEM_JAVA 5
// ----------------
@@ -53,19 +53,19 @@
struct ImplJobSetup
{
- USHORT mnRefCount; // RefCount (only independ data)
- USHORT mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx
- String maPrinterName; // Printer-Name
- String maDriver; // Driver-Name
- Orientation meOrientation; // Orientation
+ USHORT mnRefCount; // RefCount (only independ data)
+ USHORT mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx
+ String maPrinterName; // Printer-Name
+ String maDriver; // Driver-Name
+ Orientation meOrientation; // Orientation
DuplexMode meDuplexMode; // Duplex
- USHORT mnPaperBin; // paper bin / in tray
- Paper mePaperFormat; // paper format
- long mnPaperWidth; // paper width (100th mm)
- long mnPaperHeight; // paper height (100th mm)
- ULONG mnDriverDataLen; // length of system specific data
- BYTE* mpDriverData; // system specific data (will be streamed a byte block)
- ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap;
+ USHORT mnPaperBin; // paper bin / in tray
+ Paper mePaperFormat; // paper format
+ long mnPaperWidth; // paper width (100th mm)
+ long mnPaperHeight; // paper height (100th mm)
+ ULONG mnDriverDataLen; // length of system specific data
+ BYTE* mpDriverData; // system specific data (will be streamed a byte block)
+ ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap;
ImplJobSetup();
ImplJobSetup( const ImplJobSetup& rJobSetup );
@@ -77,6 +77,6 @@ struct ImplJobSetup
// Papierbreite/hoehe wird wenn 0 im unabhaengigen Teil automatisch aus
// Papierformat berechnet, wenn dieses ungleich PAPER_USER ist
-#endif // _SV_JOBSET_H
+#endif // _SV_JOBSET_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx
index a5a3735c3da5..80f52d90068c 100644
--- a/vcl/inc/vcl/jobset.hxx
+++ b/vcl/inc/vcl/jobset.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +46,11 @@ class VCL_DLLPUBLIC JobSetup
friend class Printer;
private:
- ImplJobSetup* mpData;
+ ImplJobSetup* mpData;
public:
- SAL_DLLPRIVATE ImplJobSetup* ImplGetData();
- SAL_DLLPRIVATE ImplJobSetup* ImplGetConstData();
+ SAL_DLLPRIVATE ImplJobSetup* ImplGetData();
+ SAL_DLLPRIVATE ImplJobSetup* ImplGetConstData();
SAL_DLLPRIVATE const ImplJobSetup* ImplGetConstData() const;
public:
@@ -58,27 +58,27 @@ public:
JobSetup( const JobSetup& rJob );
~JobSetup();
- String GetPrinterName() const;
- String GetDriverName() const;
+ String GetPrinterName() const;
+ String GetDriverName() const;
- /* Get/SetValue are used to read/store additional
- * Parameters in the job setup that may be used
- * by the printer driver. One possible use are phone
- * numbers for faxes (which disguise as printers)
+ /* Get/SetValue are used to read/store additional
+ * Parameters in the job setup that may be used
+ * by the printer driver. One possible use are phone
+ * numbers for faxes (which disguise as printers)
*/
- String GetValue( const String& rKey ) const;
- void SetValue( const String& rKey, const String& rValue );
+ String GetValue( const String& rKey ) const;
+ void SetValue( const String& rKey, const String& rValue );
- JobSetup& operator=( const JobSetup& rJob );
+ JobSetup& operator=( const JobSetup& rJob );
- BOOL operator==( const JobSetup& rJobSetup ) const;
- BOOL operator!=( const JobSetup& rJobSetup ) const
+ BOOL operator==( const JobSetup& rJobSetup ) const;
+ BOOL operator!=( const JobSetup& rJobSetup ) const
{ return !(JobSetup::operator==( rJobSetup )); }
- friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup );
- friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup );
+ friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup );
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup );
};
-#endif // _SV_JOBSET_HXX
+#endif // _SV_JOBSET_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/keycod.hxx b/vcl/inc/vcl/keycod.hxx
index 8092f2a6d964..c1792fd715ea 100644
--- a/vcl/inc/vcl/keycod.hxx
+++ b/vcl/inc/vcl/keycod.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +63,7 @@ enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN,
class VCL_DLLPUBLIC KeyCode
{
private:
- USHORT nCode;
+ USHORT nCode;
KeyFuncType eFunc;
public:
@@ -74,40 +74,40 @@ public:
KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2, BOOL bMod3 );
KeyCode( KeyFuncType eFunction );
- USHORT GetFullCode() const { return nCode; }
- USHORT GetFullKeyCode() const { return (nCode) ; }
+ USHORT GetFullCode() const { return nCode; }
+ USHORT GetFullKeyCode() const { return (nCode) ; }
KeyFuncType GetFullFunction() const { return eFunc; }
- BOOL IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const;
+ BOOL IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const;
- USHORT GetCode() const
+ USHORT GetCode() const
{ return (nCode & KEY_CODE); }
- USHORT GetModifier() const
+ USHORT GetModifier() const
{ return (nCode & KEY_MODTYPE); }
- USHORT GetAllModifier() const
+ USHORT GetAllModifier() const
{ return (nCode & KEY_ALLMODTYPE); }
- BOOL IsShift() const
+ BOOL IsShift() const
{ return ((nCode & KEY_SHIFT) != 0); }
- BOOL IsMod1() const
+ BOOL IsMod1() const
{ return ((nCode & KEY_MOD1) != 0); }
- BOOL IsMod2() const
+ BOOL IsMod2() const
{ return ((nCode & KEY_MOD2) != 0); }
- BOOL IsMod3() const
- { return ((nCode & KEY_MOD3) != 0); }
- USHORT GetGroup() const
+ BOOL IsMod3() const
+ { return ((nCode & KEY_MOD3) != 0); }
+ USHORT GetGroup() const
{ return (nCode & KEYGROUP_TYPE); }
- XubString GetName( Window* pWindow = NULL ) const;
- XubString GetSymbolName( const XubString& rFontName, Window* pWindow = NULL ) const;
+ XubString GetName( Window* pWindow = NULL ) const;
+ XubString GetSymbolName( const XubString& rFontName, Window* pWindow = NULL ) const;
- BOOL IsFunction() const
+ BOOL IsFunction() const
{ return ((eFunc != KEYFUNC_DONTKNOW) ? TRUE : FALSE); }
KeyFuncType GetFunction() const;
KeyCode& operator = ( const KeyCode& rKeyCode );
- BOOL operator ==( const KeyCode& rKeyCode ) const;
- BOOL operator !=( const KeyCode& rKeyCode ) const;
+ BOOL operator ==( const KeyCode& rKeyCode ) const;
+ BOOL operator !=( const KeyCode& rKeyCode ) const;
};
inline KeyCode::KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2, BOOL bMod3 )
diff --git a/vcl/inc/vcl/keycodes.hxx b/vcl/inc/vcl/keycodes.hxx
index ace5df3343b4..41c21bc4d51d 100644
--- a/vcl/inc/vcl/keycodes.hxx
+++ b/vcl/inc/vcl/keycodes.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,118 +40,118 @@
// By changes you must also change: rsc/vclrsc.hxx
// Key-Gruppen
-#define KEYGROUP_NUM ((USHORT)::com::sun::star::awt::KeyGroup::NUM)
-#define KEYGROUP_ALPHA ((USHORT)::com::sun::star::awt::KeyGroup::ALPHA)
-#define KEYGROUP_FKEYS ((USHORT)::com::sun::star::awt::KeyGroup::FKEYS)
+#define KEYGROUP_NUM ((USHORT)::com::sun::star::awt::KeyGroup::NUM)
+#define KEYGROUP_ALPHA ((USHORT)::com::sun::star::awt::KeyGroup::ALPHA)
+#define KEYGROUP_FKEYS ((USHORT)::com::sun::star::awt::KeyGroup::FKEYS)
#define KEYGROUP_CURSOR ((USHORT)::com::sun::star::awt::KeyGroup::CURSOR)
-#define KEYGROUP_MISC ((USHORT)::com::sun::star::awt::KeyGroup::MISC)
-#define KEYGROUP_TYPE ((USHORT)::com::sun::star::awt::KeyGroup::TYPE)
+#define KEYGROUP_MISC ((USHORT)::com::sun::star::awt::KeyGroup::MISC)
+#define KEYGROUP_TYPE ((USHORT)::com::sun::star::awt::KeyGroup::TYPE)
// Key-Codes
-#define KEY_0 ((USHORT)::com::sun::star::awt::Key::NUM0)
-#define KEY_1 ((USHORT)::com::sun::star::awt::Key::NUM1)
-#define KEY_2 ((USHORT)::com::sun::star::awt::Key::NUM2)
-#define KEY_3 ((USHORT)::com::sun::star::awt::Key::NUM3)
-#define KEY_4 ((USHORT)::com::sun::star::awt::Key::NUM4)
-#define KEY_5 ((USHORT)::com::sun::star::awt::Key::NUM5)
-#define KEY_6 ((USHORT)::com::sun::star::awt::Key::NUM6)
-#define KEY_7 ((USHORT)::com::sun::star::awt::Key::NUM7)
-#define KEY_8 ((USHORT)::com::sun::star::awt::Key::NUM8)
-#define KEY_9 ((USHORT)::com::sun::star::awt::Key::NUM9)
-
-#define KEY_A ((USHORT)::com::sun::star::awt::Key::A)
-#define KEY_B ((USHORT)::com::sun::star::awt::Key::B)
-#define KEY_C ((USHORT)::com::sun::star::awt::Key::C)
-#define KEY_D ((USHORT)::com::sun::star::awt::Key::D)
-#define KEY_E ((USHORT)::com::sun::star::awt::Key::E)
-#define KEY_F ((USHORT)::com::sun::star::awt::Key::F)
-#define KEY_G ((USHORT)::com::sun::star::awt::Key::G)
-#define KEY_H ((USHORT)::com::sun::star::awt::Key::H)
-#define KEY_I ((USHORT)::com::sun::star::awt::Key::I)
-#define KEY_J ((USHORT)::com::sun::star::awt::Key::J)
-#define KEY_K ((USHORT)::com::sun::star::awt::Key::K)
-#define KEY_L ((USHORT)::com::sun::star::awt::Key::L)
-#define KEY_M ((USHORT)::com::sun::star::awt::Key::M)
-#define KEY_N ((USHORT)::com::sun::star::awt::Key::N)
-#define KEY_O ((USHORT)::com::sun::star::awt::Key::O)
-#define KEY_P ((USHORT)::com::sun::star::awt::Key::P)
-#define KEY_Q ((USHORT)::com::sun::star::awt::Key::Q)
-#define KEY_R ((USHORT)::com::sun::star::awt::Key::R)
-#define KEY_S ((USHORT)::com::sun::star::awt::Key::S)
-#define KEY_T ((USHORT)::com::sun::star::awt::Key::T)
-#define KEY_U ((USHORT)::com::sun::star::awt::Key::U)
-#define KEY_V ((USHORT)::com::sun::star::awt::Key::V)
-#define KEY_W ((USHORT)::com::sun::star::awt::Key::W)
-#define KEY_X ((USHORT)::com::sun::star::awt::Key::X)
-#define KEY_Y ((USHORT)::com::sun::star::awt::Key::Y)
-#define KEY_Z ((USHORT)::com::sun::star::awt::Key::Z)
-
-#define KEY_F1 ((USHORT)::com::sun::star::awt::Key::F1)
-#define KEY_F2 ((USHORT)::com::sun::star::awt::Key::F2)
-#define KEY_F3 ((USHORT)::com::sun::star::awt::Key::F3)
-#define KEY_F4 ((USHORT)::com::sun::star::awt::Key::F4)
-#define KEY_F5 ((USHORT)::com::sun::star::awt::Key::F5)
-#define KEY_F6 ((USHORT)::com::sun::star::awt::Key::F6)
-#define KEY_F7 ((USHORT)::com::sun::star::awt::Key::F7)
-#define KEY_F8 ((USHORT)::com::sun::star::awt::Key::F8)
-#define KEY_F9 ((USHORT)::com::sun::star::awt::Key::F9)
-#define KEY_F10 ((USHORT)::com::sun::star::awt::Key::F10)
-#define KEY_F11 ((USHORT)::com::sun::star::awt::Key::F11)
-#define KEY_F12 ((USHORT)::com::sun::star::awt::Key::F12)
-#define KEY_F13 ((USHORT)::com::sun::star::awt::Key::F13)
-#define KEY_F14 ((USHORT)::com::sun::star::awt::Key::F14)
-#define KEY_F15 ((USHORT)::com::sun::star::awt::Key::F15)
-#define KEY_F16 ((USHORT)::com::sun::star::awt::Key::F16)
-#define KEY_F17 ((USHORT)::com::sun::star::awt::Key::F17)
-#define KEY_F18 ((USHORT)::com::sun::star::awt::Key::F18)
-#define KEY_F19 ((USHORT)::com::sun::star::awt::Key::F19)
-#define KEY_F20 ((USHORT)::com::sun::star::awt::Key::F20)
-#define KEY_F21 ((USHORT)::com::sun::star::awt::Key::F21)
-#define KEY_F22 ((USHORT)::com::sun::star::awt::Key::F22)
-#define KEY_F23 ((USHORT)::com::sun::star::awt::Key::F23)
-#define KEY_F24 ((USHORT)::com::sun::star::awt::Key::F24)
-#define KEY_F25 ((USHORT)::com::sun::star::awt::Key::F25)
-#define KEY_F26 ((USHORT)::com::sun::star::awt::Key::F26)
-
-#define KEY_DOWN ((USHORT)::com::sun::star::awt::Key::DOWN)
-#define KEY_UP ((USHORT)::com::sun::star::awt::Key::UP)
-#define KEY_LEFT ((USHORT)::com::sun::star::awt::Key::LEFT)
-#define KEY_RIGHT ((USHORT)::com::sun::star::awt::Key::RIGHT)
-#define KEY_HOME ((USHORT)::com::sun::star::awt::Key::HOME)
-#define KEY_END ((USHORT)::com::sun::star::awt::Key::END)
-#define KEY_PAGEUP ((USHORT)::com::sun::star::awt::Key::PAGEUP)
-#define KEY_PAGEDOWN ((USHORT)::com::sun::star::awt::Key::PAGEDOWN)
-
-#define KEY_RETURN ((USHORT)::com::sun::star::awt::Key::RETURN)
-#define KEY_ESCAPE ((USHORT)::com::sun::star::awt::Key::ESCAPE)
-#define KEY_TAB ((USHORT)::com::sun::star::awt::Key::TAB)
-#define KEY_BACKSPACE ((USHORT)::com::sun::star::awt::Key::BACKSPACE)
-#define KEY_SPACE ((USHORT)::com::sun::star::awt::Key::SPACE)
-#define KEY_INSERT ((USHORT)::com::sun::star::awt::Key::INSERT)
-#define KEY_DELETE ((USHORT)::com::sun::star::awt::Key::DELETE)
-
-#define KEY_ADD ((USHORT)::com::sun::star::awt::Key::ADD)
-#define KEY_SUBTRACT ((USHORT)::com::sun::star::awt::Key::SUBTRACT)
-#define KEY_MULTIPLY ((USHORT)::com::sun::star::awt::Key::MULTIPLY)
-#define KEY_DIVIDE ((USHORT)::com::sun::star::awt::Key::DIVIDE)
-#define KEY_POINT ((USHORT)::com::sun::star::awt::Key::POINT)
-#define KEY_COMMA ((USHORT)::com::sun::star::awt::Key::COMMA)
-#define KEY_LESS ((USHORT)::com::sun::star::awt::Key::LESS)
-#define KEY_GREATER ((USHORT)::com::sun::star::awt::Key::GREATER)
-#define KEY_EQUAL ((USHORT)::com::sun::star::awt::Key::EQUAL)
-
-#define KEY_OPEN ((USHORT)::com::sun::star::awt::Key::OPEN)
-#define KEY_CUT ((USHORT)::com::sun::star::awt::Key::CUT)
-#define KEY_COPY ((USHORT)::com::sun::star::awt::Key::COPY)
-#define KEY_PASTE ((USHORT)::com::sun::star::awt::Key::PASTE)
-#define KEY_UNDO ((USHORT)::com::sun::star::awt::Key::UNDO)
-#define KEY_REPEAT ((USHORT)::com::sun::star::awt::Key::REPEAT)
-#define KEY_FIND ((USHORT)::com::sun::star::awt::Key::FIND)
-#define KEY_PROPERTIES ((USHORT)::com::sun::star::awt::Key::PROPERTIES)
-#define KEY_FRONT ((USHORT)::com::sun::star::awt::Key::FRONT)
+#define KEY_0 ((USHORT)::com::sun::star::awt::Key::NUM0)
+#define KEY_1 ((USHORT)::com::sun::star::awt::Key::NUM1)
+#define KEY_2 ((USHORT)::com::sun::star::awt::Key::NUM2)
+#define KEY_3 ((USHORT)::com::sun::star::awt::Key::NUM3)
+#define KEY_4 ((USHORT)::com::sun::star::awt::Key::NUM4)
+#define KEY_5 ((USHORT)::com::sun::star::awt::Key::NUM5)
+#define KEY_6 ((USHORT)::com::sun::star::awt::Key::NUM6)
+#define KEY_7 ((USHORT)::com::sun::star::awt::Key::NUM7)
+#define KEY_8 ((USHORT)::com::sun::star::awt::Key::NUM8)
+#define KEY_9 ((USHORT)::com::sun::star::awt::Key::NUM9)
+
+#define KEY_A ((USHORT)::com::sun::star::awt::Key::A)
+#define KEY_B ((USHORT)::com::sun::star::awt::Key::B)
+#define KEY_C ((USHORT)::com::sun::star::awt::Key::C)
+#define KEY_D ((USHORT)::com::sun::star::awt::Key::D)
+#define KEY_E ((USHORT)::com::sun::star::awt::Key::E)
+#define KEY_F ((USHORT)::com::sun::star::awt::Key::F)
+#define KEY_G ((USHORT)::com::sun::star::awt::Key::G)
+#define KEY_H ((USHORT)::com::sun::star::awt::Key::H)
+#define KEY_I ((USHORT)::com::sun::star::awt::Key::I)
+#define KEY_J ((USHORT)::com::sun::star::awt::Key::J)
+#define KEY_K ((USHORT)::com::sun::star::awt::Key::K)
+#define KEY_L ((USHORT)::com::sun::star::awt::Key::L)
+#define KEY_M ((USHORT)::com::sun::star::awt::Key::M)
+#define KEY_N ((USHORT)::com::sun::star::awt::Key::N)
+#define KEY_O ((USHORT)::com::sun::star::awt::Key::O)
+#define KEY_P ((USHORT)::com::sun::star::awt::Key::P)
+#define KEY_Q ((USHORT)::com::sun::star::awt::Key::Q)
+#define KEY_R ((USHORT)::com::sun::star::awt::Key::R)
+#define KEY_S ((USHORT)::com::sun::star::awt::Key::S)
+#define KEY_T ((USHORT)::com::sun::star::awt::Key::T)
+#define KEY_U ((USHORT)::com::sun::star::awt::Key::U)
+#define KEY_V ((USHORT)::com::sun::star::awt::Key::V)
+#define KEY_W ((USHORT)::com::sun::star::awt::Key::W)
+#define KEY_X ((USHORT)::com::sun::star::awt::Key::X)
+#define KEY_Y ((USHORT)::com::sun::star::awt::Key::Y)
+#define KEY_Z ((USHORT)::com::sun::star::awt::Key::Z)
+
+#define KEY_F1 ((USHORT)::com::sun::star::awt::Key::F1)
+#define KEY_F2 ((USHORT)::com::sun::star::awt::Key::F2)
+#define KEY_F3 ((USHORT)::com::sun::star::awt::Key::F3)
+#define KEY_F4 ((USHORT)::com::sun::star::awt::Key::F4)
+#define KEY_F5 ((USHORT)::com::sun::star::awt::Key::F5)
+#define KEY_F6 ((USHORT)::com::sun::star::awt::Key::F6)
+#define KEY_F7 ((USHORT)::com::sun::star::awt::Key::F7)
+#define KEY_F8 ((USHORT)::com::sun::star::awt::Key::F8)
+#define KEY_F9 ((USHORT)::com::sun::star::awt::Key::F9)
+#define KEY_F10 ((USHORT)::com::sun::star::awt::Key::F10)
+#define KEY_F11 ((USHORT)::com::sun::star::awt::Key::F11)
+#define KEY_F12 ((USHORT)::com::sun::star::awt::Key::F12)
+#define KEY_F13 ((USHORT)::com::sun::star::awt::Key::F13)
+#define KEY_F14 ((USHORT)::com::sun::star::awt::Key::F14)
+#define KEY_F15 ((USHORT)::com::sun::star::awt::Key::F15)
+#define KEY_F16 ((USHORT)::com::sun::star::awt::Key::F16)
+#define KEY_F17 ((USHORT)::com::sun::star::awt::Key::F17)
+#define KEY_F18 ((USHORT)::com::sun::star::awt::Key::F18)
+#define KEY_F19 ((USHORT)::com::sun::star::awt::Key::F19)
+#define KEY_F20 ((USHORT)::com::sun::star::awt::Key::F20)
+#define KEY_F21 ((USHORT)::com::sun::star::awt::Key::F21)
+#define KEY_F22 ((USHORT)::com::sun::star::awt::Key::F22)
+#define KEY_F23 ((USHORT)::com::sun::star::awt::Key::F23)
+#define KEY_F24 ((USHORT)::com::sun::star::awt::Key::F24)
+#define KEY_F25 ((USHORT)::com::sun::star::awt::Key::F25)
+#define KEY_F26 ((USHORT)::com::sun::star::awt::Key::F26)
+
+#define KEY_DOWN ((USHORT)::com::sun::star::awt::Key::DOWN)
+#define KEY_UP ((USHORT)::com::sun::star::awt::Key::UP)
+#define KEY_LEFT ((USHORT)::com::sun::star::awt::Key::LEFT)
+#define KEY_RIGHT ((USHORT)::com::sun::star::awt::Key::RIGHT)
+#define KEY_HOME ((USHORT)::com::sun::star::awt::Key::HOME)
+#define KEY_END ((USHORT)::com::sun::star::awt::Key::END)
+#define KEY_PAGEUP ((USHORT)::com::sun::star::awt::Key::PAGEUP)
+#define KEY_PAGEDOWN ((USHORT)::com::sun::star::awt::Key::PAGEDOWN)
+
+#define KEY_RETURN ((USHORT)::com::sun::star::awt::Key::RETURN)
+#define KEY_ESCAPE ((USHORT)::com::sun::star::awt::Key::ESCAPE)
+#define KEY_TAB ((USHORT)::com::sun::star::awt::Key::TAB)
+#define KEY_BACKSPACE ((USHORT)::com::sun::star::awt::Key::BACKSPACE)
+#define KEY_SPACE ((USHORT)::com::sun::star::awt::Key::SPACE)
+#define KEY_INSERT ((USHORT)::com::sun::star::awt::Key::INSERT)
+#define KEY_DELETE ((USHORT)::com::sun::star::awt::Key::DELETE)
+
+#define KEY_ADD ((USHORT)::com::sun::star::awt::Key::ADD)
+#define KEY_SUBTRACT ((USHORT)::com::sun::star::awt::Key::SUBTRACT)
+#define KEY_MULTIPLY ((USHORT)::com::sun::star::awt::Key::MULTIPLY)
+#define KEY_DIVIDE ((USHORT)::com::sun::star::awt::Key::DIVIDE)
+#define KEY_POINT ((USHORT)::com::sun::star::awt::Key::POINT)
+#define KEY_COMMA ((USHORT)::com::sun::star::awt::Key::COMMA)
+#define KEY_LESS ((USHORT)::com::sun::star::awt::Key::LESS)
+#define KEY_GREATER ((USHORT)::com::sun::star::awt::Key::GREATER)
+#define KEY_EQUAL ((USHORT)::com::sun::star::awt::Key::EQUAL)
+
+#define KEY_OPEN ((USHORT)::com::sun::star::awt::Key::OPEN)
+#define KEY_CUT ((USHORT)::com::sun::star::awt::Key::CUT)
+#define KEY_COPY ((USHORT)::com::sun::star::awt::Key::COPY)
+#define KEY_PASTE ((USHORT)::com::sun::star::awt::Key::PASTE)
+#define KEY_UNDO ((USHORT)::com::sun::star::awt::Key::UNDO)
+#define KEY_REPEAT ((USHORT)::com::sun::star::awt::Key::REPEAT)
+#define KEY_FIND ((USHORT)::com::sun::star::awt::Key::FIND)
+#define KEY_PROPERTIES ((USHORT)::com::sun::star::awt::Key::PROPERTIES)
+#define KEY_FRONT ((USHORT)::com::sun::star::awt::Key::FRONT)
#define KEY_CONTEXTMENU ((USHORT)::com::sun::star::awt::Key::CONTEXTMENU)
-#define KEY_MENU ((USHORT)::com::sun::star::awt::Key::MENU)
-#define KEY_HELP ((USHORT)::com::sun::star::awt::Key::HELP)
+#define KEY_MENU ((USHORT)::com::sun::star::awt::Key::MENU)
+#define KEY_HELP ((USHORT)::com::sun::star::awt::Key::HELP)
#define KEY_HANGUL_HANJA ((USHORT)::com::sun::star::awt::Key::HANGUL_HANJA)
#define KEY_DECIMAL ((USHORT)::com::sun::star::awt::Key::DECIMAL)
#define KEY_TILDE ((USHORT)::com::sun::star::awt::Key::TILDE)
@@ -164,15 +164,15 @@
#define KEY_NUMLOCK ((USHORT)::com::sun::star::awt::Key::NUMLOCK)
#define KEY_SCROLLLOCK ((USHORT)::com::sun::star::awt::Key::SCROLLLOCK)
-#define KEY_CODE ((USHORT)0x0FFF)
+#define KEY_CODE ((USHORT)0x0FFF)
// Modifier-Tasten
-#define KEY_SHIFT ((USHORT)0x1000)
-#define KEY_MOD1 ((USHORT)0x2000)
-#define KEY_MOD2 ((USHORT)0x4000)
-#define KEY_MOD3 ((USHORT)0x8000)
-#define KEY_MODTYPE ((USHORT)0xF000)
-#define KEY_ALLMODTYPE ((USHORT)0xF000)
+#define KEY_SHIFT ((USHORT)0x1000)
+#define KEY_MOD1 ((USHORT)0x2000)
+#define KEY_MOD2 ((USHORT)0x4000)
+#define KEY_MOD3 ((USHORT)0x8000)
+#define KEY_MODTYPE ((USHORT)0xF000)
+#define KEY_ALLMODTYPE ((USHORT)0xF000)
// extended Modifier-Keys (only used for modkey events)
#define MODKEY_LSHIFT 0x0001
@@ -192,9 +192,9 @@
// - Mouse-Types -
// ---------------
-#define MOUSE_LEFT ((USHORT)0x0001)
-#define MOUSE_MIDDLE ((USHORT)0x0002)
-#define MOUSE_RIGHT ((USHORT)0x0004)
+#define MOUSE_LEFT ((USHORT)0x0001)
+#define MOUSE_MIDDLE ((USHORT)0x0002)
+#define MOUSE_RIGHT ((USHORT)0x0004)
// -------------------
// - Indicator-Types -
diff --git a/vcl/inc/vcl/lazydelete.hxx b/vcl/inc/vcl/lazydelete.hxx
index 46804f3b54cb..713e22ef022a 100644
--- a/vcl/inc/vcl/lazydelete.hxx
+++ b/vcl/inc/vcl/lazydelete.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +43,23 @@
namespace vcl
{
/* Helpers for lazy object deletion
-
+
With vcl it is often necessary to delete objects (especially Windows)
in the right order as well as in a way ensuring that the deleted objects
are not still on the stack (e.g. deleting a Window in its key handler). To
make this easier a helper class is given here which takes care of both
sorting as well as lazy deletion.
-
+
The grisly details:
LazyDelete is a class that LazyDeletor register to. When vcl's event
loop (that is Application::Yield or Application::Reschedule) comes out
of the last level, the LazyDelete::flush is called. This will cause
LazyDelete to delete all registered LazyDeletor objects.
-
+
LazyDeletor<T> is a one instance object that contains a list of
<T> objects to be deleted in sorted order. It is derived from
LazyDeletorBase as to be able to register itself in LazyDelete.
-
+
The user calls the static method LazyDeletor<T>::Delete( T* ) with the
object to be destroyed lazy. The static method creates the LazyDeletor<T>
(which in turn registers itself in LazyDelete) if this is the first time
@@ -68,19 +68,19 @@ namespace vcl
that will ensure the correct order of deletion via the specialized is_less method
(e.g. if a Window is a child of another Window and therefore should be destroyed
first it is "less" in this sense)
-
+
LazyDelete::flush will be called when the top of the nested event loop is
reached again and will then destroy each registered LazyDeletor<T> which
in turn destroys the objects needed to be destroyed lazily. After this
the state is as before entering the event loop.
-
+
Preconditions:
- The class <T> of which objects are to be destroyed needs a virtual
destructor or must be final, else the wrong type will be destroyed.
- The destructor of <T> should call LazyDeletor<T>::Undelete( this ). This
prevents duplicate deletionin case someone destroys the object prematurely.
*/
-
+
class LazyDeletorBase;
class VCL_DLLPUBLIC LazyDelete
{
@@ -105,27 +105,27 @@ namespace vcl
class VCL_DLLPUBLIC LazyDeletor : public LazyDeletorBase
{
static LazyDeletor< T >* s_pOneInstance;
-
+
struct DeleteObjectEntry
{
T* m_pObject;
bool m_bDeleted;
-
+
DeleteObjectEntry() :
m_pObject( NULL ),
m_bDeleted( false )
{}
-
+
DeleteObjectEntry( T* i_pObject ) :
m_pObject( i_pObject ),
m_bDeleted( false )
{}
};
-
+
std::vector< DeleteObjectEntry > m_aObjects;
typedef std::hash_map< sal_IntPtr, unsigned int > PtrToIndexMap;
PtrToIndexMap m_aPtrToIndex;
-
+
/** strict weak ordering funtion to bring objects to be destroyed lazily
in correct order, e.g. for Window objects children before parents
*/
@@ -140,7 +140,7 @@ namespace vcl
#endif
if( s_pOneInstance == this ) // sanity check
s_pOneInstance = NULL;
-
+
// do the actual work
unsigned int nCount = m_aObjects.size();
std::vector<T*> aRealDelete;
@@ -169,7 +169,7 @@ namespace vcl
delete aRealDelete[n];
}
}
-
+
public:
/** mark an object for lazy deletion
*/
@@ -203,7 +203,7 @@ namespace vcl
}
}
};
-
+
/*
class DeleteOnDeinit matches a similar need as LazyDelete for static objects:
you may not access vcl objects after DeInitVCL has been called this includes their destruction
@@ -211,36 +211,36 @@ namespace vcl
To work around this use DeleteOnDeinit<BitmapEx> which will allow you to have a static object container,
that will have its contents destroyed on DeinitVCL. The single drawback is that you need to check on the
container object whether it still contains content before actually accessing it.
-
+
caveat: when constructing a vcl object, you certainly want to ensure that InitVCL has run already.
However this is not necessarily the case when using a class static member or a file level static variable.
In these cases make judicious use of the set() method of DeleteOnDeinit, but beware of the changing
ownership.
-
+
example use case: use a lazy initialized on call BitmapEx in a paint method. Of course a paint method
would not normally be called after DeInitVCL anyway, so the check might not be necessary in a
Window::Paint implementation, but always checking is a good idea.
-
+
SomeWindow::Paint()
{
static vcl::DeleteOnDeinit< BitmapEx > aBmp( new BitmapEx( ResId( 1000, myResMgr ) ) );
-
+
if( aBmp.get() ) // check whether DeInitVCL has been called already
DrawBitmapEx( Point( 10, 10 ), *aBmp.get() );
}
*/
-
+
class VCL_DLLPUBLIC DeleteOnDeinitBase
{
public:
static void SAL_DLLPRIVATE ImplDeleteOnDeInit();
virtual ~DeleteOnDeinitBase();
protected:
- static void addDeinitContainer( DeleteOnDeinitBase* i_pContainer );
+ static void addDeinitContainer( DeleteOnDeinitBase* i_pContainer );
virtual void doCleanup() = 0;
};
-
+
template < typename T >
class DeleteOnDeinit : public DeleteOnDeinitBase
{
@@ -249,10 +249,10 @@ namespace vcl
public:
DeleteOnDeinit( T* i_pT ) : m_pT( i_pT ) { addDeinitContainer( this ); }
virtual ~DeleteOnDeinit() {}
-
+
// get contents
T* get() { return m_pT; }
-
+
// set contents, returning old contents
// ownership is transfered !
T* set( T* i_pNew ) { T* pOld = m_pT; m_pT = i_pNew; return pOld; }
diff --git a/vcl/inc/vcl/lineinfo.hxx b/vcl/inc/vcl/lineinfo.hxx
index be17988dd71d..333b61f9ca3f 100644
--- a/vcl/inc/vcl/lineinfo.hxx
+++ b/vcl/inc/vcl/lineinfo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +43,22 @@ namespace basegfx { class B2DPolyPolygon; }
struct ImplLineInfo
{
- ULONG mnRefCount;
- LineStyle meStyle;
- long mnWidth;
- USHORT mnDashCount;
- long mnDashLen;
- USHORT mnDotCount;
- long mnDotLen;
- long mnDistance;
-
+ ULONG mnRefCount;
+ LineStyle meStyle;
+ long mnWidth;
+ USHORT mnDashCount;
+ long mnDashLen;
+ USHORT mnDotCount;
+ long mnDotLen;
+ long mnDistance;
+
basegfx::B2DLineJoin meLineJoin;
ImplLineInfo();
ImplLineInfo( const ImplLineInfo& rImplLineInfo );
- friend SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo );
- friend SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo );
+ friend SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo );
+ friend SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo );
};
// ------------
@@ -67,12 +67,12 @@ struct ImplLineInfo
class VCL_DLLPUBLIC LineInfo
{
-private:
+private:
- ImplLineInfo* mpImplLineInfo;
- long n1;
- long n2;
- long n3;
+ ImplLineInfo* mpImplLineInfo;
+ long n1;
+ long n2;
+ long n3;
SAL_DLLPRIVATE void ImplMakeUnique();
@@ -82,36 +82,36 @@ public:
LineInfo( const LineInfo& rLineInfo );
~LineInfo();
- LineInfo& operator=( const LineInfo& rLineInfo );
+ LineInfo& operator=( const LineInfo& rLineInfo );
BOOL operator==( const LineInfo& rLineInfo ) const;
BOOL operator!=( const LineInfo& rLineInfo ) const { return !(LineInfo::operator==( rLineInfo ) ); }
BOOL IsSameInstance( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo ); }
void SetStyle( LineStyle eStyle );
- LineStyle GetStyle() const { return mpImplLineInfo->meStyle; }
+ LineStyle GetStyle() const { return mpImplLineInfo->meStyle; }
void SetWidth( long nWidth );
- long GetWidth() const { return mpImplLineInfo->mnWidth; }
+ long GetWidth() const { return mpImplLineInfo->mnWidth; }
- void SetDashCount( USHORT nDashCount );
- USHORT GetDashCount() const { return mpImplLineInfo->mnDashCount; }
+ void SetDashCount( USHORT nDashCount );
+ USHORT GetDashCount() const { return mpImplLineInfo->mnDashCount; }
- void SetDashLen( long nDashLen );
- long GetDashLen() const { return mpImplLineInfo->mnDashLen; }
+ void SetDashLen( long nDashLen );
+ long GetDashLen() const { return mpImplLineInfo->mnDashLen; }
- void SetDotCount( USHORT nDotCount );
- USHORT GetDotCount() const { return mpImplLineInfo->mnDotCount; }
+ void SetDotCount( USHORT nDotCount );
+ USHORT GetDotCount() const { return mpImplLineInfo->mnDotCount; }
- void SetDotLen( long nDotLen );
- long GetDotLen() const { return mpImplLineInfo->mnDotLen; }
+ void SetDotLen( long nDotLen );
+ long GetDotLen() const { return mpImplLineInfo->mnDotLen; }
- void SetDistance( long nDistance );
- long GetDistance() const { return mpImplLineInfo->mnDistance; }
+ void SetDistance( long nDistance );
+ long GetDistance() const { return mpImplLineInfo->mnDistance; }
void SetLineJoin(basegfx::B2DLineJoin eLineJoin);
basegfx::B2DLineJoin GetLineJoin() const { return mpImplLineInfo->meLineJoin; }
- BOOL IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) ); }
+ BOOL IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) ); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, LineInfo& rLineInfo );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const LineInfo& rLineInfo );
diff --git a/vcl/inc/vcl/longcurr.hxx b/vcl/inc/vcl/longcurr.hxx
index fdbb36f7af6c..31c7752da3d4 100644
--- a/vcl/inc/vcl/longcurr.hxx
+++ b/vcl/inc/vcl/longcurr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,24 +46,24 @@ private:
SAL_DLLPRIVATE void ImpInit();
protected:
- BigInt mnFieldValue;
- BigInt mnLastValue;
- BigInt mnMin;
- BigInt mnMax;
- BigInt mnCorrectedValue;
+ BigInt mnFieldValue;
+ BigInt mnLastValue;
+ BigInt mnMin;
+ BigInt mnMax;
+ BigInt mnCorrectedValue;
String maCurrencySymbol;
- USHORT mnType;
+ USHORT mnType;
USHORT mnDecimalDigits;
BOOL mbThousandSep;
LongCurrencyFormatter();
- SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
+ SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
~LongCurrencyFormatter();
- virtual void Reformat();
- virtual void ReformatAll();
+ virtual void Reformat();
+ virtual void ReformatAll();
void SetUseThousandSep( BOOL b );
BOOL IsUseThousandSep() const { return mbThousandSep; }
@@ -71,25 +71,25 @@ public:
void SetCurrencySymbol( const String& rStr );
String GetCurrencySymbol() const;
- void SetMin( BigInt nNewMin );
- BigInt GetMin() const { return mnMin; }
- void SetMax( BigInt nNewMax );
- BigInt GetMax() const { return mnMax; }
+ void SetMin( BigInt nNewMin );
+ BigInt GetMin() const { return mnMin; }
+ void SetMax( BigInt nNewMax );
+ BigInt GetMax() const { return mnMax; }
- void SetDecimalDigits( USHORT nDigits );
- USHORT GetDecimalDigits() const;
- void SetValue( BigInt nNewValue );
- void SetUserValue( BigInt nNewValue );
- BigInt GetValue() const;
- BOOL IsValueModified() const;
+ void SetDecimalDigits( USHORT nDigits );
+ USHORT GetDecimalDigits() const;
+ void SetValue( BigInt nNewValue );
+ void SetUserValue( BigInt nNewValue );
+ BigInt GetValue() const;
+ BOOL IsValueModified() const;
- void SetEmptyValue();
- BOOL IsEmptyValue() const { return !GetField()->GetText().Len(); }
+ void SetEmptyValue();
+ BOOL IsEmptyValue() const { return !GetField()->GetText().Len(); }
- BigInt GetCorrectedValue() const { return mnCorrectedValue; }
+ BigInt GetCorrectedValue() const { return mnCorrectedValue; }
- BigInt Normalize( BigInt nValue ) const;
- BigInt Denormalize( BigInt nValue ) const;
+ BigInt Normalize( BigInt nValue ) const;
+ BigInt Denormalize( BigInt nValue ) const;
};
// ---------------------
@@ -101,9 +101,9 @@ class VCL_DLLPUBLIC LongCurrencyField : public SpinField, public LongCurrencyFor
friend void ImplNewLongCurrencyFieldValue( LongCurrencyField*, BigInt );
private:
- BigInt mnSpinSize;
- BigInt mnFirst;
- BigInt mnLast;
+ BigInt mnSpinSize;
+ BigInt mnFirst;
+ BigInt mnLast;
protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
@@ -113,21 +113,21 @@ public:
LongCurrencyField( Window* pParent, const ResId& rResId );
~LongCurrencyField();
- long PreNotify( NotifyEvent& rNEvt );
- long Notify( NotifyEvent& rNEvt );
-
- void Modify();
- void Up();
- void Down();
- void First();
- void Last();
-
- void SetFirst( BigInt nNewFirst ) { mnFirst = nNewFirst; }
- BigInt GetFirst() const { return mnFirst; }
- void SetLast( BigInt nNewLast ) { mnLast = nNewLast; }
- BigInt GetLast() const { return mnLast; }
- void SetSpinSize( BigInt nNewSize ) { mnSpinSize = nNewSize; }
- BigInt GetSpinSize() const { return mnSpinSize; }
+ long PreNotify( NotifyEvent& rNEvt );
+ long Notify( NotifyEvent& rNEvt );
+
+ void Modify();
+ void Up();
+ void Down();
+ void First();
+ void Last();
+
+ void SetFirst( BigInt nNewFirst ) { mnFirst = nNewFirst; }
+ BigInt GetFirst() const { return mnFirst; }
+ void SetLast( BigInt nNewLast ) { mnLast = nNewLast; }
+ BigInt GetLast() const { return mnLast; }
+ void SetSpinSize( BigInt nNewSize ) { mnSpinSize = nNewSize; }
+ BigInt GetSpinSize() const { return mnSpinSize; }
};
// -------------------
@@ -141,19 +141,19 @@ public:
LongCurrencyBox( Window* pParent, const ResId& rResId );
~LongCurrencyBox();
- long PreNotify( NotifyEvent& rNEvt );
- long Notify( NotifyEvent& rNEvt );
+ long PreNotify( NotifyEvent& rNEvt );
+ long Notify( NotifyEvent& rNEvt );
- void Modify();
- void ReformatAll();
+ void Modify();
+ void ReformatAll();
- void InsertValue( BigInt nValue,
+ void InsertValue( BigInt nValue,
USHORT nPos = COMBOBOX_APPEND );
- void RemoveValue( BigInt nValue );
- BigInt GetValue() const
+ void RemoveValue( BigInt nValue );
+ BigInt GetValue() const
{ return LongCurrencyFormatter::GetValue(); }
- BigInt GetValue( USHORT nPos ) const;
- USHORT GetValuePos( BigInt nValue ) const;
+ BigInt GetValue( USHORT nPos ) const;
+ USHORT GetValuePos( BigInt nValue ) const;
};
#endif // _LONGCURR_HXX
diff --git a/vcl/inc/vcl/lstbox.h b/vcl/inc/vcl/lstbox.h
index 454156f83627..1a4824ca23b2 100644
--- a/vcl/inc/vcl/lstbox.h
+++ b/vcl/inc/vcl/lstbox.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +29,11 @@
#ifndef _SV_LSTBOX_H
#define _SV_LSTBOX_H
-#define LISTBOX_APPEND ((USHORT)0xFFFF)
-#define LISTBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
-#define LISTBOX_ERROR ((USHORT)0xFFFF)
+#define LISTBOX_APPEND ((USHORT)0xFFFF)
+#define LISTBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
+#define LISTBOX_ERROR ((USHORT)0xFFFF)
-#define LISTBOX_USERDRAW_SELECTED ((USHORT)0x0001)
+#define LISTBOX_USERDRAW_SELECTED ((USHORT)0x0001)
// --------------------------------------------------------------------
@@ -42,14 +42,14 @@
// !! Do not use these flags for user data as they are reserved !!
// !! to change the internal behaviour of the ListBox implementation !!
-// !! for specific entries. !!
+// !! for specific entries. !!
/** this flag disables a selection of an entry completly. It is not
possible to select such entries either from the user interface
nor from the ListBox methods. Cursor traveling is handled correctly.
This flag can be used to add titles to a ListBox.
*/
-#define LISTBOX_ENTRY_FLAG_DISABLE_SELECTION 0x0000001
+#define LISTBOX_ENTRY_FLAG_DISABLE_SELECTION 0x0000001
/** this flag can be used to make an entry multine capable
A normal entry is single line and will therefore be clipped
@@ -63,6 +63,6 @@
*/
#define LISTBOX_ENTRY_FLAG_DRAW_DISABLED 0x0000004
-#endif // _SV_LSTBOX_H
+#endif // _SV_LSTBOX_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx
index 5d74ce5c7a99..0b0a69265a75 100644
--- a/vcl/inc/vcl/lstbox.hxx
+++ b/vcl/inc/vcl/lstbox.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,21 +40,21 @@ class ImplBtn;
class ImplWin;
// --------------------------------------------------------------------
-// - ListBox -
+// - ListBox -
// --------------------------------------------------------------------
class VCL_DLLPUBLIC ListBox : public Control
{
private:
- ImplListBox* mpImplLB;
- ImplListBoxFloatingWindow* mpFloatWin;
- ImplWin* mpImplWin;
- ImplBtn* mpBtn;
- USHORT mnDDHeight;
- USHORT mnSaveValue;
- BOOL mbDDAutoSize;
- Link maSelectHdl;
- Link maDoubleClickHdl;
+ ImplListBox* mpImplLB;
+ ImplListBoxFloatingWindow* mpFloatWin;
+ ImplWin* mpImplWin;
+ ImplBtn* mpBtn;
+ USHORT mnDDHeight;
+ USHORT mnSaveValue;
+ BOOL mbDDAutoSize;
+ Link maSelectHdl;
+ Link maDoubleClickHdl;
USHORT mnLineCount;
private:
@@ -74,7 +74,7 @@ protected:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- BOOL IsDropDownBox() const { return mpFloatWin ? TRUE : FALSE; }
+ BOOL IsDropDownBox() const { return mpFloatWin ? TRUE : FALSE; }
protected:
ListBox( WindowType nType );
@@ -86,66 +86,66 @@ public:
ListBox( Window* pParent, const ResId& rResId );
~ListBox();
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
- virtual void Resize();
- virtual long PreNotify( NotifyEvent& rNEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void UserDraw( const UserDrawEvent& rUDEvt );
-
- virtual void Select();
- virtual void DoubleClick();
- virtual void GetFocus();
- virtual void LoseFocus();
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Resize();
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
+
+ virtual void Select();
+ virtual void DoubleClick();
+ virtual void GetFocus();
+ virtual void LoseFocus();
virtual Window* GetPreferredKeyInputWindow();
virtual const Wallpaper& GetDisplayBackground() const;
- virtual void SetPosSizePixel( long nX, long nY,
+ virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL );
- void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
+ void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{ Control::SetPosSizePixel( rNewPos, rNewSize ); }
- void SetDropDownSizePixel( const Size& rNewSize )
+ void SetDropDownSizePixel( const Size& rNewSize )
{ if( IsDropDownBox() ) SetPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(), WINDOW_POSSIZE_SIZE | WINDOW_POSSIZE_DROPDOWN ); }
- Rectangle GetDropDownPosSizePixel() const;
+ Rectangle GetDropDownPosSizePixel() const;
- void SetDropDownLineCount( USHORT nLines );
- USHORT GetDropDownLineCount() const;
+ void SetDropDownLineCount( USHORT nLines );
+ USHORT GetDropDownLineCount() const;
- void EnableAutoSize( BOOL bAuto );
- BOOL IsAutoSizeEnabled() const { return mbDDAutoSize; }
+ void EnableAutoSize( BOOL bAuto );
+ BOOL IsAutoSizeEnabled() const { return mbDDAutoSize; }
void EnableDDAutoWidth( BOOL b );
BOOL IsDDAutoWidthEnabled() const;
- virtual USHORT InsertEntry( const XubString& rStr, USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( const Image& rImage, USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos = LISTBOX_APPEND );
- virtual void RemoveEntry( const XubString& rStr );
- virtual void RemoveEntry( USHORT nPos );
+ virtual USHORT InsertEntry( const XubString& rStr, USHORT nPos = LISTBOX_APPEND );
+ virtual USHORT InsertEntry( const Image& rImage, USHORT nPos = LISTBOX_APPEND );
+ virtual USHORT InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos = LISTBOX_APPEND );
+ virtual void RemoveEntry( const XubString& rStr );
+ virtual void RemoveEntry( USHORT nPos );
- virtual void Clear();
+ virtual void Clear();
- virtual USHORT GetEntryPos( const XubString& rStr ) const;
- virtual USHORT GetEntryPos( const void* pData ) const;
+ virtual USHORT GetEntryPos( const XubString& rStr ) const;
+ virtual USHORT GetEntryPos( const void* pData ) const;
Image GetEntryImage( USHORT nPos ) const;
virtual XubString GetEntry( USHORT nPos ) const;
- virtual USHORT GetEntryCount() const;
+ virtual USHORT GetEntryCount() const;
- virtual void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE );
- virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
+ virtual void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE );
+ virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
- virtual USHORT GetSelectEntryCount() const;
- virtual XubString GetSelectEntry( USHORT nSelIndex = 0 ) const;
- virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ virtual USHORT GetSelectEntryCount() const;
+ virtual XubString GetSelectEntry( USHORT nSelIndex = 0 ) const;
+ virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
- virtual BOOL IsEntrySelected( const XubString& rStr ) const;
- virtual BOOL IsEntryPosSelected( USHORT nPos ) const;
- virtual void SetNoSelection();
+ virtual BOOL IsEntrySelected( const XubString& rStr ) const;
+ virtual BOOL IsEntryPosSelected( USHORT nPos ) const;
+ virtual void SetNoSelection();
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( USHORT nPos, void* pNewData );
+ void* GetEntryData( USHORT nPos ) const;
/** this methods stores a combination of flags from the
LISTBOX_ENTRY_FLAG_* defines at the given entry.
@@ -155,71 +155,71 @@ public:
to change the internal behaviour of the ListBox implementation
for specific entries.
*/
- void SetEntryFlags( USHORT nPos, long nFlags );
+ void SetEntryFlags( USHORT nPos, long nFlags );
/** this methods gets the current combination of flags from the
LISTBOX_ENTRY_FLAG_* defines from the given entry.
See description of the possible LISTBOX_ENTRY_FLAG_* flags
for details.
*/
- long GetEntryFlags( USHORT nPos ) const;
+ long GetEntryFlags( USHORT nPos ) const;
- void SetTopEntry( USHORT nPos );
+ void SetTopEntry( USHORT nPos );
void ShowProminentEntry( USHORT nPos );
- void SetTopEntryStr( const XubString& rStr );
- USHORT GetTopEntry() const;
+ void SetTopEntryStr( const XubString& rStr );
+ USHORT GetTopEntry() const;
void SetProminentEntryType( ProminentEntry eType );
ProminentEntry GetProminentEntryType() const;
- void SaveValue() { mnSaveValue = GetSelectEntryPos(); }
- USHORT GetSavedValue() const { return mnSaveValue; }
+ void SaveValue() { mnSaveValue = GetSelectEntryPos(); }
+ USHORT GetSavedValue() const { return mnSaveValue; }
- void SetSeparatorPos( USHORT n );
- void SetSeparatorPos();
- USHORT GetSeparatorPos() const;
+ void SetSeparatorPos( USHORT n );
+ void SetSeparatorPos();
+ USHORT GetSeparatorPos() const;
- BOOL IsTravelSelect() const;
- BOOL IsInDropDown() const;
- void ToggleDropDown();
+ BOOL IsTravelSelect() const;
+ BOOL IsInDropDown() const;
+ void ToggleDropDown();
- void EnableMultiSelection( BOOL bMulti, BOOL bStackSelection );
- void EnableMultiSelection( BOOL bMulti );
- BOOL IsMultiSelectionEnabled() const;
+ void EnableMultiSelection( BOOL bMulti, BOOL bStackSelection );
+ void EnableMultiSelection( BOOL bMulti );
+ BOOL IsMultiSelectionEnabled() const;
- void SetReadOnly( BOOL bReadOnly = TRUE );
- BOOL IsReadOnly() const;
+ void SetReadOnly( BOOL bReadOnly = TRUE );
+ BOOL IsReadOnly() const;
- long CalcWindowSizePixel( USHORT nLines ) const;
+ long CalcWindowSizePixel( USHORT nLines ) const;
Rectangle GetBoundingRectangle( USHORT nItem ) const;
- void SetUserItemSize( const Size& rSz );
- const Size& GetUserItemSize() const;
+ void SetUserItemSize( const Size& rSz );
+ const Size& GetUserItemSize() const;
- void EnableUserDraw( BOOL bUserDraw );
- BOOL IsUserDrawEnabled() const;
+ void EnableUserDraw( BOOL bUserDraw );
+ BOOL IsUserDrawEnabled() const;
- void DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE );
+ void DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE );
- void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return maSelectHdl; }
- void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
- const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
+ void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
+ const Link& GetSelectHdl() const { return maSelectHdl; }
+ void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
+ const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
- Size CalcMinimumSize() const;
+ Size CalcMinimumSize() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
- Size CalcAdjustedSize( const Size& rPrefSize ) const;
- Size CalcSize( USHORT nColumns, USHORT nLines ) const;
- void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const;
+ Size CalcAdjustedSize( const Size& rPrefSize ) const;
+ Size CalcSize( USHORT nColumns, USHORT nLines ) const;
+ void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const;
- void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep = ';' );
- XubString GetMRUEntries( xub_Unicode cSep = ';' ) const;
- void SetMaxMRUCount( USHORT n );
- USHORT GetMaxMRUCount() const;
+ void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep = ';' );
+ XubString GetMRUEntries( xub_Unicode cSep = ';' ) const;
+ void SetMaxMRUCount( USHORT n );
+ USHORT GetMaxMRUCount() const;
- USHORT GetDisplayLineCount() const;
+ USHORT GetDisplayLineCount() const;
- void EnableMirroring();
+ void EnableMirroring();
/** checks whether a certain point lies within the bounds of
a listbox item and returns the item as well as the character position
@@ -254,14 +254,14 @@ public:
using ListBox::GetSavedValue;
private:
// Bei MultiListBox nicht erlaubt...
- void SaveValue();
- USHORT GetSavedValue();
+ void SaveValue();
+ USHORT GetSavedValue();
public:
MultiListBox( Window* pParent, WinBits nStyle = 0 );
MultiListBox( Window* pParent, const ResId& rResId );
};
-#endif // _SV_LSTBOX_HXX
+#endif // _SV_LSTBOX_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/mapmod.hxx b/vcl/inc/vcl/mapmod.hxx
index 53cea6801cb2..6888595135a5 100644
--- a/vcl/inc/vcl/mapmod.hxx
+++ b/vcl/inc/vcl/mapmod.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,20 +42,20 @@ class SvStream;
// - ImplMapMode -
// --------------
-class OutputDevice;
+class OutputDevice;
class ImplMapMode
{
- friend class MapMode;
- friend class OutputDevice;
+ friend class MapMode;
+ friend class OutputDevice;
private:
- ULONG mnRefCount;
- MapUnit meUnit;
- Point maOrigin;
- Fraction maScaleX;
- Fraction maScaleY;
- BOOL mbSimple;
+ ULONG mnRefCount;
+ MapUnit meUnit;
+ Point maOrigin;
+ Fraction maScaleX;
+ Fraction maScaleY;
+ BOOL mbSimple;
friend SvStream& operator>>( SvStream& rIStm, ImplMapMode& rMapMode );
friend SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rMapMode );
@@ -72,10 +72,10 @@ public:
class VCL_DLLPUBLIC MapMode
{
- friend class OutputDevice;
+ friend class OutputDevice;
private:
- ImplMapMode* mpImplMapMode;
+ ImplMapMode* mpImplMapMode;
SAL_DLLPRIVATE void ImplMakeUnique();
@@ -87,33 +87,33 @@ public:
const Fraction& rScaleX, const Fraction& rScaleY );
~MapMode();
- void SetMapUnit( MapUnit eUnit );
- MapUnit GetMapUnit() const
+ void SetMapUnit( MapUnit eUnit );
+ MapUnit GetMapUnit() const
{ return mpImplMapMode->meUnit; }
- void SetOrigin( const Point& rOrigin );
- const Point& GetOrigin() const
+ void SetOrigin( const Point& rOrigin );
+ const Point& GetOrigin() const
{ return mpImplMapMode->maOrigin; }
- void SetScaleX( const Fraction& rScaleX );
+ void SetScaleX( const Fraction& rScaleX );
const Fraction& GetScaleX() const
{ return mpImplMapMode->maScaleX; }
- void SetScaleY( const Fraction& rScaleY );
+ void SetScaleY( const Fraction& rScaleY );
const Fraction& GetScaleY() const
{ return mpImplMapMode->maScaleY; }
- MapMode& operator=( const MapMode& rMapMode );
- BOOL operator==( const MapMode& rMapMode ) const;
- BOOL operator!=( const MapMode& rMapMode ) const
+ MapMode& operator=( const MapMode& rMapMode );
+ BOOL operator==( const MapMode& rMapMode ) const;
+ BOOL operator!=( const MapMode& rMapMode ) const
{ return !(MapMode::operator==( rMapMode )); }
- BOOL IsDefault() const;
- BOOL IsSameInstance( const MapMode& rMapMode ) const
+ BOOL IsDefault() const;
+ BOOL IsSameInstance( const MapMode& rMapMode ) const
{ return (mpImplMapMode == rMapMode.mpImplMapMode); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, MapMode& rMapMode );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const MapMode& rMapMode );
};
-#endif // _SV_MAPMOD_HXX
+#endif // _SV_MAPMOD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/mapunit.hxx b/vcl/inc/vcl/mapunit.hxx
index f8fb7581c469..dfb5c121abd7 100644
--- a/vcl/inc/vcl/mapunit.hxx
+++ b/vcl/inc/vcl/mapunit.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,6 +31,6 @@
#include <tools/mapunit.hxx>
-#endif // _VCL_MAPUNIT_HXX
+#endif // _VCL_MAPUNIT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 751f4ac16ca5..4351f1cd49a0 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +68,12 @@ namespace vcl { struct MenuLayoutData; }
// - Menu-Types -
// --------------
-#define MENU_APPEND ((USHORT)0xFFFF)
-#define MENU_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define MENU_APPEND ((USHORT)0xFFFF)
+#define MENU_ITEM_NOTFOUND ((USHORT)0xFFFF)
-#define POPUPMENU_EXECUTE_DOWN ((USHORT)0x0001)
-#define POPUPMENU_EXECUTE_UP ((USHORT)0x0002)
-#define POPUPMENU_EXECUTE_LEFT ((USHORT)0x0004)
+#define POPUPMENU_EXECUTE_DOWN ((USHORT)0x0001)
+#define POPUPMENU_EXECUTE_UP ((USHORT)0x0002)
+#define POPUPMENU_EXECUTE_LEFT ((USHORT)0x0004)
#define POPUPMENU_EXECUTE_RIGHT ((USHORT)0x0008)
#define POPUPMENU_NOMOUSEUPCLOSE ((USHORT)0x0010)
@@ -84,22 +84,22 @@ enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_IMAGE,
// By changes you must also change: rsc/vclrsc.hxx
typedef USHORT MenuItemBits;
-#define MIB_CHECKABLE ((MenuItemBits)0x0001)
-#define MIB_RADIOCHECK ((MenuItemBits)0x0002)
-#define MIB_AUTOCHECK ((MenuItemBits)0x0004)
-#define MIB_ABOUT ((MenuItemBits)0x0008)
-#define MIB_HELP ((MenuItemBits)0x0010)
-#define MIB_POPUPSELECT ((MenuItemBits)0x0020)
+#define MIB_CHECKABLE ((MenuItemBits)0x0001)
+#define MIB_RADIOCHECK ((MenuItemBits)0x0002)
+#define MIB_AUTOCHECK ((MenuItemBits)0x0004)
+#define MIB_ABOUT ((MenuItemBits)0x0008)
+#define MIB_HELP ((MenuItemBits)0x0010)
+#define MIB_POPUPSELECT ((MenuItemBits)0x0020)
// not in rsc/vclsrc.hxx because only a prelimitary solution
-#define MIB_NOSELECT ((MenuItemBits)0x0040)
-#define MIB_ICON ((MenuItemBits)0x0080)
-#define MIB_TEXT ((MenuItemBits)0x0100)
+#define MIB_NOSELECT ((MenuItemBits)0x0040)
+#define MIB_ICON ((MenuItemBits)0x0080)
+#define MIB_TEXT ((MenuItemBits)0x0100)
-#define MENU_FLAG_NOAUTOMNEMONICS 0x0001
-#define MENU_FLAG_HIDEDISABLEDENTRIES 0x0002
+#define MENU_FLAG_NOAUTOMNEMONICS 0x0001
+#define MENU_FLAG_HIDEDISABLEDENTRIES 0x0002
// overrides default hiding of disabled entries in popup menus
-#define MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES 0x0004
+#define MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES 0x0004
// forces images & toggle visibility for toolbar config popup
#define MENU_FLAG_SHOWCHECKIMAGES 0x0008
@@ -121,9 +121,9 @@ struct ImplMenuDelData
struct MenuLogo
{
- BitmapEx aBitmap;
- Color aStartColor;
- Color aEndColor;
+ BitmapEx aBitmap;
+ Color aStartColor;
+ Color aEndColor;
};
class VCL_DLLPUBLIC Menu : public Resource
@@ -135,205 +135,205 @@ class VCL_DLLPUBLIC Menu : public Resource
friend class SystemWindow;
friend struct ImplMenuDelData;
private:
- ImplMenuDelData* mpFirstDel;
- MenuItemList* pItemList; // Liste mit den MenuItems
- MenuLogo* pLogo;
- Menu* pStartedFrom;
- Window* pWindow;
-
- Link aActivateHdl; // Active-Handler
- Link aDeactivateHdl; // Deactivate-Handler
- Link aHighlightHdl; // Highlight-Handler
- Link aSelectHdl; // Highlight-Handler
-
+ ImplMenuDelData* mpFirstDel;
+ MenuItemList* pItemList; // Liste mit den MenuItems
+ MenuLogo* pLogo;
+ Menu* pStartedFrom;
+ Window* pWindow;
+
+ Link aActivateHdl; // Active-Handler
+ Link aDeactivateHdl; // Deactivate-Handler
+ Link aHighlightHdl; // Highlight-Handler
+ Link aSelectHdl; // Highlight-Handler
+
VclEventListeners maEventListeners;
VclEventListeners maChildEventListeners;
- XubString aTitleText; // PopupMenu-Text
+ XubString aTitleText; // PopupMenu-Text
- ULONG nEventId;
- USHORT mnHighlightedItemPos; // for native menues: keeps track of the highlighted item
- USHORT nMenuFlags;
- USHORT nDefaultItem; // Id vom Default-Item
- USHORT nSelectedId;
+ ULONG nEventId;
+ USHORT mnHighlightedItemPos; // for native menues: keeps track of the highlighted item
+ USHORT nMenuFlags;
+ USHORT nDefaultItem; // Id vom Default-Item
+ USHORT nSelectedId;
// Fuer Ausgabe:
- USHORT nCheckPos;
- USHORT nImagePos;
- USHORT nTextPos;
+ USHORT nCheckPos;
+ USHORT nImagePos;
+ USHORT nTextPos;
- BOOL bIsMenuBar : 1, // Handelt es sich um den MenuBar
- bCanceled : 1, // Waehrend eines Callbacks abgebrochen
- bInCallback : 1, // In Activate/Deactivate
- bKilled : 1; // Gekillt...
+ BOOL bIsMenuBar : 1, // Handelt es sich um den MenuBar
+ bCanceled : 1, // Waehrend eines Callbacks abgebrochen
+ bInCallback : 1, // In Activate/Deactivate
+ bKilled : 1; // Gekillt...
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible;
mutable vcl::MenuLayoutData* mpLayoutData;
- SalMenu* mpSalMenu;
+ SalMenu* mpSalMenu;
protected:
- SAL_DLLPRIVATE void ImplInit();
- SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE Menu* ImplGetStartMenu();
- SAL_DLLPRIVATE Menu* ImplFindSelectMenu();
- SAL_DLLPRIVATE Menu* ImplFindMenu( USHORT nId );
- SAL_DLLPRIVATE Size ImplCalcSize( Window* pWin );
- SAL_DLLPRIVATE BOOL ImplIsVisible( USHORT nPos ) const;
+ SAL_DLLPRIVATE void ImplInit();
+ SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
+ SAL_DLLPRIVATE Menu* ImplGetStartMenu();
+ SAL_DLLPRIVATE Menu* ImplFindSelectMenu();
+ SAL_DLLPRIVATE Menu* ImplFindMenu( USHORT nId );
+ SAL_DLLPRIVATE Size ImplCalcSize( Window* pWin );
+ SAL_DLLPRIVATE BOOL ImplIsVisible( USHORT nPos ) const;
SAL_DLLPRIVATE BOOL ImplIsSelectable( USHORT nPos ) const;
- SAL_DLLPRIVATE USHORT ImplGetVisibleItemCount() const;
- SAL_DLLPRIVATE USHORT ImplGetFirstVisible() const;
- SAL_DLLPRIVATE USHORT ImplGetPrevVisible( USHORT nPos ) const;
- SAL_DLLPRIVATE USHORT ImplGetNextVisible( USHORT nPos ) const;
- SAL_DLLPRIVATE void ImplPaint( Window* pWin, USHORT nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, BOOL bHighlighted = FALSE, bool bLayout = false ) const;
- SAL_DLLPRIVATE void ImplSelect();
- SAL_DLLPRIVATE void ImplCallHighlight( USHORT nHighlightItem );
+ SAL_DLLPRIVATE USHORT ImplGetVisibleItemCount() const;
+ SAL_DLLPRIVATE USHORT ImplGetFirstVisible() const;
+ SAL_DLLPRIVATE USHORT ImplGetPrevVisible( USHORT nPos ) const;
+ SAL_DLLPRIVATE USHORT ImplGetNextVisible( USHORT nPos ) const;
+ SAL_DLLPRIVATE void ImplPaint( Window* pWin, USHORT nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, BOOL bHighlighted = FALSE, bool bLayout = false ) const;
+ SAL_DLLPRIVATE void ImplSelect();
+ SAL_DLLPRIVATE void ImplCallHighlight( USHORT nHighlightItem );
SAL_DLLPRIVATE void ImplCallEventListeners( ULONG nEvent, USHORT nPos );
DECL_DLLPRIVATE_LINK( ImplCallSelect, Menu* );
- SAL_DLLPRIVATE void ImplFillLayoutData() const;
+ SAL_DLLPRIVATE void ImplFillLayoutData() const;
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
SAL_DLLPRIVATE const XubString& ImplGetHelpText( USHORT nItemId ) const;
-
+
// returns native check and option menu symbol height;
- // return value is Max( rCheckHeight, rRadioHeight )
+ // return value is Max( rCheckHeight, rRadioHeight )
SAL_DLLPRIVATE long ImplGetNativeCheckAndRadioSize( Window*, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) const;
SAL_DLLPRIVATE void ImplAddDel( ImplMenuDelData &rDel );
SAL_DLLPRIVATE void ImplRemoveDel( ImplMenuDelData &rDel );
public:
- SAL_DLLPRIVATE void ImplKillLayoutData() const;
+ SAL_DLLPRIVATE void ImplKillLayoutData() const;
SAL_DLLPRIVATE Menu* ImplGetStartedFrom() const;
Menu();
Menu( BOOL bMenuBar );
SAL_DLLPRIVATE Window* ImplGetWindow() const { return pWindow; }
-
+
SAL_DLLPRIVATE void ImplSelectWithStart( Menu* pStartMenu = NULL );
public:
- virtual ~Menu();
+ virtual ~Menu();
- virtual void Activate();
- virtual void Deactivate();
- virtual void Highlight();
- virtual void Select();
- virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void Activate();
+ virtual void Deactivate();
+ virtual void Highlight();
+ virtual void Select();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
- void InsertItem( USHORT nItemId, const XubString& rStr,
+ void InsertItem( USHORT nItemId, const XubString& rStr,
MenuItemBits nItemBits = 0,
USHORT nPos = MENU_APPEND );
- void InsertItem( USHORT nItemId, const Image& rImage,
+ void InsertItem( USHORT nItemId, const Image& rImage,
MenuItemBits nItemBits = 0,
USHORT nPos = MENU_APPEND );
- void InsertItem( USHORT nItemId,
+ void InsertItem( USHORT nItemId,
const XubString& rString, const Image& rImage,
MenuItemBits nItemBits = 0,
USHORT nPos = MENU_APPEND );
- void InsertItem( const ResId& rResId, USHORT nPos = MENU_APPEND );
- void InsertSeparator( USHORT nPos = MENU_APPEND );
- void RemoveItem( USHORT nPos );
- void CopyItem( const Menu& rMenu, USHORT nPos,
+ void InsertItem( const ResId& rResId, USHORT nPos = MENU_APPEND );
+ void InsertSeparator( USHORT nPos = MENU_APPEND );
+ void RemoveItem( USHORT nPos );
+ void CopyItem( const Menu& rMenu, USHORT nPos,
USHORT nNewPos = MENU_APPEND );
- void Clear();
+ void Clear();
void CreateAutoMnemonics();
- void SetMenuFlags( USHORT nFlags ) { nMenuFlags = nFlags; }
- USHORT GetMenuFlags() const { return nMenuFlags; }
+ void SetMenuFlags( USHORT nFlags ) { nMenuFlags = nFlags; }
+ USHORT GetMenuFlags() const { return nMenuFlags; }
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- MenuItemType GetItemType( USHORT nPos ) const;
- USHORT GetCurItemId() const;
+ USHORT GetItemCount() const;
+ USHORT GetItemId( USHORT nPos ) const;
+ USHORT GetItemPos( USHORT nItemId ) const;
+ MenuItemType GetItemType( USHORT nPos ) const;
+ USHORT GetCurItemId() const;
- void SetDefaultItem( USHORT nItemId ) { nDefaultItem = nItemId; }
- USHORT GetDefaultItem() const { return nDefaultItem; }
+ void SetDefaultItem( USHORT nItemId ) { nDefaultItem = nItemId; }
+ USHORT GetDefaultItem() const { return nDefaultItem; }
- void SetItemBits( USHORT nItemId, MenuItemBits nBits );
- MenuItemBits GetItemBits( USHORT nItemId ) const;
+ void SetItemBits( USHORT nItemId, MenuItemBits nBits );
+ MenuItemBits GetItemBits( USHORT nItemId ) const;
- void SetUserValue( USHORT nItemId, ULONG nValue );
- ULONG GetUserValue( USHORT nItemId ) const;
+ void SetUserValue( USHORT nItemId, ULONG nValue );
+ ULONG GetUserValue( USHORT nItemId ) const;
- void SetPopupMenu( USHORT nItemId, PopupMenu* pMenu );
- PopupMenu* GetPopupMenu( USHORT nItemId ) const;
+ void SetPopupMenu( USHORT nItemId, PopupMenu* pMenu );
+ PopupMenu* GetPopupMenu( USHORT nItemId ) const;
- void SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode );
- KeyCode GetAccelKey( USHORT nItemId ) const;
+ void SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode );
+ KeyCode GetAccelKey( USHORT nItemId ) const;
- void CheckItem( USHORT nItemId, BOOL bCheck = TRUE );
- BOOL IsItemChecked( USHORT nItemId ) const;
+ void CheckItem( USHORT nItemId, BOOL bCheck = TRUE );
+ BOOL IsItemChecked( USHORT nItemId ) const;
- void SelectItem( USHORT nItemId );
- void DeSelect() { SelectItem( 0xFFFF ); } // MENUITEMPOS_INVALID
+ void SelectItem( USHORT nItemId );
+ void DeSelect() { SelectItem( 0xFFFF ); } // MENUITEMPOS_INVALID
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
+ void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
+ BOOL IsItemEnabled( USHORT nItemId ) const;
void ShowItem( USHORT nItemId, BOOL bVisible = TRUE );
void HideItem( USHORT nItemId ) { ShowItem( nItemId, FALSE ); }
- BOOL IsItemVisible( USHORT nItemId ) const;
- BOOL IsItemPosVisible( USHORT nItemPos ) const;
- BOOL IsMenuVisible() const;
- BOOL IsMenuBar() const { return bIsMenuBar; }
+ BOOL IsItemVisible( USHORT nItemId ) const;
+ BOOL IsItemPosVisible( USHORT nItemPos ) const;
+ BOOL IsMenuVisible() const;
+ BOOL IsMenuBar() const { return bIsMenuBar; }
- void RemoveDisabledEntries( BOOL bCheckPopups = TRUE, BOOL bRemoveEmptyPopups = FALSE );
- BOOL HasValidEntries( BOOL bCheckPopups = TRUE );
+ void RemoveDisabledEntries( BOOL bCheckPopups = TRUE, BOOL bRemoveEmptyPopups = FALSE );
+ BOOL HasValidEntries( BOOL bCheckPopups = TRUE );
- void SetItemText( USHORT nItemId, const XubString& rStr );
- XubString GetItemText( USHORT nItemId ) const;
+ void SetItemText( USHORT nItemId, const XubString& rStr );
+ XubString GetItemText( USHORT nItemId ) const;
- void SetItemImage( USHORT nItemId, const Image& rImage );
- Image GetItemImage( USHORT nItemId ) const;
- void SetItemImageAngle( USHORT nItemId, long nAngle10 );
- long GetItemImageAngle( USHORT nItemId ) const;
- void SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror );
- BOOL GetItemImageMirrorMode( USHORT ) const;
+ void SetItemImage( USHORT nItemId, const Image& rImage );
+ Image GetItemImage( USHORT nItemId ) const;
+ void SetItemImageAngle( USHORT nItemId, long nAngle10 );
+ long GetItemImageAngle( USHORT nItemId ) const;
+ void SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror );
+ BOOL GetItemImageMirrorMode( USHORT ) const;
- void SetItemCommand( USHORT nItemId, const XubString& rCommand );
- const XubString& GetItemCommand( USHORT nItemId ) const;
+ void SetItemCommand( USHORT nItemId, const XubString& rCommand );
+ const XubString& GetItemCommand( USHORT nItemId ) const;
- void SetHelpText( USHORT nItemId, const XubString& rString );
- const XubString& GetHelpText( USHORT nItemId ) const;
+ void SetHelpText( USHORT nItemId, const XubString& rString );
+ const XubString& GetHelpText( USHORT nItemId ) const;
- void SetTipHelpText( USHORT nItemId, const XubString& rString );
- const XubString& GetTipHelpText( USHORT nItemId ) const;
+ void SetTipHelpText( USHORT nItemId, const XubString& rString );
+ const XubString& GetTipHelpText( USHORT nItemId ) const;
void SetHelpCommand( USHORT nItemId, const XubString& rString );
const XubString& GetHelpCommand( USHORT nItemId ) const;
+
+ void SetHelpId( USHORT nItemId, ULONG nHelpId );
+ ULONG GetHelpId( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
-
- void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
- const Link& GetActivateHdl() const { return aActivateHdl; }
+ void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
+ const Link& GetActivateHdl() const { return aActivateHdl; }
- void SetDeactivateHdl( const Link& rLink ) { aDeactivateHdl = rLink; }
- const Link& GetDeactivateHdl() const { return aDeactivateHdl; }
+ void SetDeactivateHdl( const Link& rLink ) { aDeactivateHdl = rLink; }
+ const Link& GetDeactivateHdl() const { return aDeactivateHdl; }
- void SetHighlightHdl( const Link& rLink ) { aHighlightHdl = rLink; }
- const Link& GetHighlightHdl() const { return aHighlightHdl; }
+ void SetHighlightHdl( const Link& rLink ) { aHighlightHdl = rLink; }
+ const Link& GetHighlightHdl() const { return aHighlightHdl; }
- void SetSelectHdl( const Link& rLink ) { aSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return aSelectHdl; }
-
- void SetLogo( const MenuLogo& rLogo );
- void SetLogo();
- BOOL HasLogo() const { return pLogo ? TRUE : FALSE; }
- MenuLogo GetLogo() const;
+ void SetSelectHdl( const Link& rLink ) { aSelectHdl = rLink; }
+ const Link& GetSelectHdl() const { return aSelectHdl; }
+ void SetLogo( const MenuLogo& rLogo );
+ void SetLogo();
+ BOOL HasLogo() const { return pLogo ? TRUE : FALSE; }
+ MenuLogo GetLogo() const;
+
void AddEventListener( const Link& rEventListener );
void RemoveEventListener( const Link& rEventListener );
//void AddChildEventListener( const Link& rEventListener );
//void RemoveChildEventListener( const Link& rEventListener );
-
- Menu& operator =( const Menu& rMenu );
+
+ Menu& operator =( const Menu& rMenu );
// Fuer Menu-'Funktionen'
- MenuItemList* GetItemList() const { return pItemList; }
+ MenuItemList* GetItemList() const { return pItemList; }
// returns the system's menu handle if native menues are supported
// pData must point to a SystemMenuData structure
@@ -369,21 +369,21 @@ public:
// gets the activation key of the specified item
KeyEvent GetActivationKey( USHORT nItemId ) const;
- Window* GetWindow() const { return pWindow; }
-
- void SetAccessibleName( USHORT nItemId, const XubString& rStr );
- XubString GetAccessibleName( USHORT nItemId ) const;
+ Window* GetWindow() const { return pWindow; }
- void SetAccessibleDescription( USHORT nItemId, const XubString& rStr );
- XubString GetAccessibleDescription( USHORT nItemId ) const;
+ void SetAccessibleName( USHORT nItemId, const XubString& rStr );
+ XubString GetAccessibleName( USHORT nItemId ) const;
+ void SetAccessibleDescription( USHORT nItemId, const XubString& rStr );
+ XubString GetAccessibleDescription( USHORT nItemId ) const;
+
// returns whether the item a position nItemPos is highlighted or not.
bool IsHighlighted( USHORT nItemPos ) const;
void HighlightItem( USHORT nItemPos );
void DeHighlight() { HighlightItem( 0xFFFF ); } // MENUITEMPOS_INVALID
-
-
+
+
void doLazyDelete();
};
@@ -393,13 +393,13 @@ public:
class VCL_DLLPUBLIC MenuBar : public Menu
{
- Link maCloserHdl;
- Link maFloatHdl;
- Link maHideHdl;
- BOOL mbCloserVisible;
- BOOL mbFloatBtnVisible;
- BOOL mbHideBtnVisible;
- BOOL mbDisplayable;
+ Link maCloserHdl;
+ Link maFloatHdl;
+ Link maHideHdl;
+ BOOL mbCloserVisible;
+ BOOL mbFloatBtnVisible;
+ BOOL mbHideBtnVisible;
+ BOOL mbDisplayable;
friend class Application;
friend class Menu;
@@ -407,9 +407,9 @@ class VCL_DLLPUBLIC MenuBar : public Menu
friend class MenuFloatingWindow;
friend class SystemWindow;
- SAL_DLLPRIVATE static Window* ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu );
- SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, BOOL bDelete );
- SAL_DLLPRIVATE BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE );
+ SAL_DLLPRIVATE static Window* ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu );
+ SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, BOOL bDelete );
+ SAL_DLLPRIVATE BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE );
public:
MenuBar();
@@ -417,29 +417,29 @@ public:
MenuBar( const MenuBar& rMenu );
~MenuBar();
- MenuBar& operator =( const MenuBar& rMenu );
+ MenuBar& operator =( const MenuBar& rMenu );
- void ShowCloser( BOOL bShow = TRUE );
- BOOL HasCloser() const { return mbCloserVisible; }
- void ShowFloatButton( BOOL bShow = TRUE );
- BOOL HasFloatButton() const { return mbFloatBtnVisible; }
- void ShowHideButton( BOOL bShow = TRUE );
- BOOL HasHideButton() const { return mbHideBtnVisible; }
- void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide );
+ void ShowCloser( BOOL bShow = TRUE );
+ BOOL HasCloser() const { return mbCloserVisible; }
+ void ShowFloatButton( BOOL bShow = TRUE );
+ BOOL HasFloatButton() const { return mbFloatBtnVisible; }
+ void ShowHideButton( BOOL bShow = TRUE );
+ BOOL HasHideButton() const { return mbHideBtnVisible; }
+ void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide );
- void SelectEntry( USHORT nId );
+ void SelectEntry( USHORT nId );
BOOL HandleMenuActivateEvent( Menu *pMenu ) const;
BOOL HandleMenuDeActivateEvent( Menu *pMenu ) const;
BOOL HandleMenuHighlightEvent( Menu *pMenu, USHORT nEventId ) const;
BOOL HandleMenuCommandEvent( Menu *pMenu, USHORT nEventId ) const;
BOOL HandleMenuButtonEvent( Menu *pMenu, USHORT nEventId ) const;
- void SetCloserHdl( const Link& rLink ) { maCloserHdl = rLink; }
- const Link& GetCloserHdl() const { return maCloserHdl; }
- void SetFloatButtonClickHdl( const Link& rLink ) { maFloatHdl = rLink; }
- const Link& GetFloatButtonClickHdl() const { return maFloatHdl; }
- void SetHideButtonClickHdl( const Link& rLink ) { maHideHdl = rLink; }
- const Link& GetHideButtonClickHdl() const { return maHideHdl; }
+ void SetCloserHdl( const Link& rLink ) { maCloserHdl = rLink; }
+ const Link& GetCloserHdl() const { return maCloserHdl; }
+ void SetFloatButtonClickHdl( const Link& rLink ) { maFloatHdl = rLink; }
+ const Link& GetFloatButtonClickHdl() const { return maFloatHdl; }
+ void SetHideButtonClickHdl( const Link& rLink ) { maHideHdl = rLink; }
+ const Link& GetHideButtonClickHdl() const { return maHideHdl; }
// - by default a menubar is displayable
// - if a menubar is not displayable, its MenuBarWindow will never be shown
@@ -491,14 +491,14 @@ class VCL_DLLPUBLIC PopupMenu : public Menu
friend struct MenuItemData;
private:
- Menu** pRefAutoSubMenu; // keeps track if a pointer to this Menu is stored in the MenuItemData
+ Menu** pRefAutoSubMenu; // keeps track if a pointer to this Menu is stored in the MenuItemData
SAL_DLLPRIVATE MenuFloatingWindow* ImplGetFloatingWindow() const { return (MenuFloatingWindow*)Menu::ImplGetWindow(); }
protected:
SAL_DLLPRIVATE USHORT ImplExecute( Window* pWindow, const Rectangle& rRect, ULONG nPopupFlags, Menu* pStaredFrom, BOOL bPreSelectFirst );
- SAL_DLLPRIVATE long ImplCalcHeight( USHORT nEntries ) const;
- SAL_DLLPRIVATE USHORT ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry = 0, USHORT* pLastVisible = NULL ) const;
+ SAL_DLLPRIVATE long ImplCalcHeight( USHORT nEntries ) const;
+ SAL_DLLPRIVATE USHORT ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry = 0, USHORT* pLastVisible = NULL ) const;
public:
PopupMenu();
@@ -506,21 +506,21 @@ public:
PopupMenu( const ResId& rResId );
~PopupMenu();
- void SetText( const XubString& rTitle ) { aTitleText = rTitle; }
- const XubString& GetText() const { return aTitleText; }
+ void SetText( const XubString& rTitle ) { aTitleText = rTitle; }
+ const XubString& GetText() const { return aTitleText; }
- USHORT Execute( Window* pWindow, const Point& rPopupPos );
- USHORT Execute( Window* pWindow, const Rectangle& rRect, USHORT nFlags = 0 );
+ USHORT Execute( Window* pWindow, const Point& rPopupPos );
+ USHORT Execute( Window* pWindow, const Rectangle& rRect, USHORT nFlags = 0 );
// Fuer das TestTool
- void EndExecute( USHORT nSelect = 0 );
- void SelectEntry( USHORT nId );
+ void EndExecute( USHORT nSelect = 0 );
+ void SelectEntry( USHORT nId );
void SetSelectedEntry( USHORT nId ); // for use by native submenu only
- static BOOL IsInExecute();
- static PopupMenu* GetActivePopupMenu();
+ static BOOL IsInExecute();
+ static PopupMenu* GetActivePopupMenu();
- PopupMenu& operator =( const PopupMenu& rMenu );
+ PopupMenu& operator =( const PopupMenu& rMenu );
};
inline PopupMenu& PopupMenu::operator =( const PopupMenu& rMenu )
diff --git a/vcl/inc/vcl/menubtn.hxx b/vcl/inc/vcl/menubtn.hxx
index 588bdd4772cd..f55ffdffd206 100644
--- a/vcl/inc/vcl/menubtn.hxx
+++ b/vcl/inc/vcl/menubtn.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class PopupMenu;
// - MenuButton-Types -
// --------------------
-#define MENUBUTTON_MENUMODE_TIMED ((USHORT)0x0001)
+#define MENUBUTTON_MENUMODE_TIMED ((USHORT)0x0001)
// --------------
// - MenuButton -
@@ -49,14 +49,14 @@ class PopupMenu;
class VCL_DLLPUBLIC MenuButton : public PushButton
{
private:
- Rectangle maFocusRect;
- Timer* mpMenuTimer;
- PopupMenu* mpOwnMenu;
- PopupMenu* mpMenu;
- USHORT mnCurItemId;
- USHORT mnMenuMode;
- Link maActivateHdl;
- Link maSelectHdl;
+ Rectangle maFocusRect;
+ Timer* mpMenuTimer;
+ PopupMenu* mpOwnMenu;
+ PopupMenu* mpMenu;
+ USHORT mnCurItemId;
+ USHORT mnMenuMode;
+ Link maActivateHdl;
+ Link maSelectHdl;
SAL_DLLPRIVATE void ImplInitMenuButtonData();
SAL_DLLPRIVATE void ImplExecuteMenu();
@@ -76,26 +76,26 @@ public:
MenuButton( Window* pParent, const ResId& rResId );
~MenuButton();
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
- virtual void Activate();
- virtual void Select();
+ virtual void Activate();
+ virtual void Select();
- void SetMenuMode( USHORT nMode );
- USHORT GetMenuMode() const { return mnMenuMode; }
+ void SetMenuMode( USHORT nMode );
+ USHORT GetMenuMode() const { return mnMenuMode; }
- void SetPopupMenu( PopupMenu* pNewMenu );
- PopupMenu* GetPopupMenu() const { return mpMenu; }
+ void SetPopupMenu( PopupMenu* pNewMenu );
+ PopupMenu* GetPopupMenu() const { return mpMenu; }
- USHORT GetCurItemId() const { return mnCurItemId; }
+ USHORT GetCurItemId() const { return mnCurItemId; }
- void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
- const Link& GetActivateHdl() const { return maActivateHdl; }
- void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return maSelectHdl; }
+ void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
+ const Link& GetActivateHdl() const { return maActivateHdl; }
+ void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
+ const Link& GetSelectHdl() const { return maSelectHdl; }
};
-#endif // _SV_MENUBTN_HXX
+#endif // _SV_MENUBTN_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/metaact.hxx b/vcl/inc/vcl/metaact.hxx
index f507063982bb..5a85e3b7fbb3 100644
--- a/vcl/inc/vcl/metaact.hxx
+++ b/vcl/inc/vcl/metaact.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,91 +50,91 @@ class SvStream;
// - Defines -
// -----------
-#define META_NULL_ACTION (0)
-#define META_PIXEL_ACTION (100)
-#define META_POINT_ACTION (101)
-#define META_LINE_ACTION (102)
-#define META_RECT_ACTION (103)
-#define META_ROUNDRECT_ACTION (104)
-#define META_ELLIPSE_ACTION (105)
-#define META_ARC_ACTION (106)
-#define META_PIE_ACTION (107)
-#define META_CHORD_ACTION (108)
-#define META_POLYLINE_ACTION (109)
-#define META_POLYGON_ACTION (110)
-#define META_POLYPOLYGON_ACTION (111)
-#define META_TEXT_ACTION (112)
-#define META_TEXTARRAY_ACTION (113)
-#define META_STRETCHTEXT_ACTION (114)
-#define META_TEXTRECT_ACTION (115)
-#define META_BMP_ACTION (116)
-#define META_BMPSCALE_ACTION (117)
-#define META_BMPSCALEPART_ACTION (118)
-#define META_BMPEX_ACTION (119)
-#define META_BMPEXSCALE_ACTION (120)
-#define META_BMPEXSCALEPART_ACTION (121)
-#define META_MASK_ACTION (122)
-#define META_MASKSCALE_ACTION (123)
-#define META_MASKSCALEPART_ACTION (124)
-#define META_GRADIENT_ACTION (125)
-#define META_HATCH_ACTION (126)
-#define META_WALLPAPER_ACTION (127)
-#define META_CLIPREGION_ACTION (128)
-#define META_ISECTRECTCLIPREGION_ACTION (129)
-#define META_ISECTREGIONCLIPREGION_ACTION (130)
-#define META_MOVECLIPREGION_ACTION (131)
-#define META_LINECOLOR_ACTION (132)
-#define META_FILLCOLOR_ACTION (133)
-#define META_TEXTCOLOR_ACTION (134)
-#define META_TEXTFILLCOLOR_ACTION (135)
-#define META_TEXTALIGN_ACTION (136)
-#define META_MAPMODE_ACTION (137)
-#define META_FONT_ACTION (138)
-#define META_PUSH_ACTION (139)
-#define META_POP_ACTION (140)
-#define META_RASTEROP_ACTION (141)
-#define META_TRANSPARENT_ACTION (142)
-#define META_EPS_ACTION (143)
-#define META_REFPOINT_ACTION (144)
-#define META_TEXTLINECOLOR_ACTION (145)
-#define META_TEXTLINE_ACTION (146)
-#define META_FLOATTRANSPARENT_ACTION (147)
-#define META_GRADIENTEX_ACTION (148)
-#define META_LAYOUTMODE_ACTION (149)
-#define META_TEXTLANGUAGE_ACTION (150)
-#define META_OVERLINECOLOR_ACTION (151)
-
-#define META_COMMENT_ACTION (512)
+#define META_NULL_ACTION (0)
+#define META_PIXEL_ACTION (100)
+#define META_POINT_ACTION (101)
+#define META_LINE_ACTION (102)
+#define META_RECT_ACTION (103)
+#define META_ROUNDRECT_ACTION (104)
+#define META_ELLIPSE_ACTION (105)
+#define META_ARC_ACTION (106)
+#define META_PIE_ACTION (107)
+#define META_CHORD_ACTION (108)
+#define META_POLYLINE_ACTION (109)
+#define META_POLYGON_ACTION (110)
+#define META_POLYPOLYGON_ACTION (111)
+#define META_TEXT_ACTION (112)
+#define META_TEXTARRAY_ACTION (113)
+#define META_STRETCHTEXT_ACTION (114)
+#define META_TEXTRECT_ACTION (115)
+#define META_BMP_ACTION (116)
+#define META_BMPSCALE_ACTION (117)
+#define META_BMPSCALEPART_ACTION (118)
+#define META_BMPEX_ACTION (119)
+#define META_BMPEXSCALE_ACTION (120)
+#define META_BMPEXSCALEPART_ACTION (121)
+#define META_MASK_ACTION (122)
+#define META_MASKSCALE_ACTION (123)
+#define META_MASKSCALEPART_ACTION (124)
+#define META_GRADIENT_ACTION (125)
+#define META_HATCH_ACTION (126)
+#define META_WALLPAPER_ACTION (127)
+#define META_CLIPREGION_ACTION (128)
+#define META_ISECTRECTCLIPREGION_ACTION (129)
+#define META_ISECTREGIONCLIPREGION_ACTION (130)
+#define META_MOVECLIPREGION_ACTION (131)
+#define META_LINECOLOR_ACTION (132)
+#define META_FILLCOLOR_ACTION (133)
+#define META_TEXTCOLOR_ACTION (134)
+#define META_TEXTFILLCOLOR_ACTION (135)
+#define META_TEXTALIGN_ACTION (136)
+#define META_MAPMODE_ACTION (137)
+#define META_FONT_ACTION (138)
+#define META_PUSH_ACTION (139)
+#define META_POP_ACTION (140)
+#define META_RASTEROP_ACTION (141)
+#define META_TRANSPARENT_ACTION (142)
+#define META_EPS_ACTION (143)
+#define META_REFPOINT_ACTION (144)
+#define META_TEXTLINECOLOR_ACTION (145)
+#define META_TEXTLINE_ACTION (146)
+#define META_FLOATTRANSPARENT_ACTION (147)
+#define META_GRADIENTEX_ACTION (148)
+#define META_LAYOUTMODE_ACTION (149)
+#define META_TEXTLANGUAGE_ACTION (150)
+#define META_OVERLINECOLOR_ACTION (151)
+
+#define META_COMMENT_ACTION (512)
// ------------------------------------------------------------------------
struct ImplMetaReadData
{
- rtl_TextEncoding meActualCharSet;
+ rtl_TextEncoding meActualCharSet;
};
// ------------------------------------------------------------------------
struct ImplMetaWriteData
{
- rtl_TextEncoding meActualCharSet;
+ rtl_TextEncoding meActualCharSet;
};
// ------------------------------------------------------------------------
-#define DECL_META_ACTION( Name, nType ) \
- Meta##Name##Action(); \
+#define DECL_META_ACTION( Name, nType ) \
+ Meta##Name##Action(); \
protected: \
- virtual ~Meta##Name##Action(); \
+ virtual ~Meta##Name##Action(); \
public: \
- virtual void Execute( OutputDevice* pOut ); \
- virtual MetaAction* Clone(); \
- virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); \
- virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
-
-#define IMPL_META_ACTION( Name, nType ) \
-Meta##Name##Action::Meta##Name##Action() : \
- MetaAction( nType ) {} \
+ virtual void Execute( OutputDevice* pOut ); \
+ virtual MetaAction* Clone(); \
+ virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); \
+ virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
+
+#define IMPL_META_ACTION( Name, nType ) \
+Meta##Name##Action::Meta##Name##Action() : \
+ MetaAction( nType ) {} \
Meta##Name##Action::~Meta##Name##Action() {}
// --------------
@@ -144,38 +144,38 @@ Meta##Name##Action::~Meta##Name##Action() {}
class VCL_DLLPUBLIC MetaAction
{
private:
- ULONG mnRefCount;
- UINT16 mnType;
+ ULONG mnRefCount;
+ UINT16 mnType;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
protected:
- virtual ~MetaAction();
+ virtual ~MetaAction();
public:
MetaAction();
MetaAction( USHORT nType );
- virtual void Execute( OutputDevice* pOut );
+ virtual void Execute( OutputDevice* pOut );
virtual MetaAction* Clone();
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
- virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
+ virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
+ virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
- sal_Bool IsEqual( const MetaAction& ) const;
+ sal_Bool IsEqual( const MetaAction& ) const;
- USHORT GetType() const { return mnType; }
- ULONG GetRefCount() const { return mnRefCount; }
- void ResetRefCount() { mnRefCount = 1; }
- void Duplicate() { mnRefCount++; }
- void Delete() { if ( 0 == --mnRefCount ) delete this; }
+ USHORT GetType() const { return mnType; }
+ ULONG GetRefCount() const { return mnRefCount; }
+ void ResetRefCount() { mnRefCount = 1; }
+ void Duplicate() { mnRefCount++; }
+ void Delete() { if ( 0 == --mnRefCount ) delete this; }
public:
- static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
+ static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
};
// -------------------
@@ -185,21 +185,21 @@ public:
class VCL_DLLPUBLIC MetaPixelAction : public MetaAction
{
private:
- Point maPt;
- Color maColor;
+ Point maPt;
+ Color maColor;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Pixel, META_PIXEL_ACTION )
MetaPixelAction( const Point& rPt, const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Point& GetPoint() const { return maPt; }
- const Color& GetColor() const { return maColor; }
+ const Point& GetPoint() const { return maPt; }
+ const Color& GetColor() const { return maColor; }
};
// -------------------
@@ -209,19 +209,19 @@ public:
class VCL_DLLPUBLIC MetaPointAction : public MetaAction
{
private:
- Point maPt;
+ Point maPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Point, META_POINT_ACTION )
MetaPointAction( const Point& rPt );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Point& GetPoint() const { return maPt; }
+ const Point& GetPoint() const { return maPt; }
};
// ------------------
@@ -232,11 +232,11 @@ class VCL_DLLPUBLIC MetaLineAction : public MetaAction
{
private:
- LineInfo maLineInfo;
- Point maStartPt;
- Point maEndPt;
+ LineInfo maLineInfo;
+ Point maStartPt;
+ Point maEndPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Line, META_LINE_ACTION )
@@ -245,12 +245,12 @@ public:
MetaLineAction( const Point& rStart, const Point& rEnd,
const LineInfo& rLineInfo );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Point& GetStartPoint() const { return maStartPt; }
- const Point& GetEndPoint() const { return maEndPt; }
- const LineInfo& GetLineInfo() const { return maLineInfo; }
+ const Point& GetStartPoint() const { return maStartPt; }
+ const Point& GetEndPoint() const { return maEndPt; }
+ const LineInfo& GetLineInfo() const { return maLineInfo; }
};
// ------------------
@@ -261,18 +261,18 @@ class VCL_DLLPUBLIC MetaRectAction : public MetaAction
{
private:
- Rectangle maRect;
+ Rectangle maRect;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Rect, META_RECT_ACTION )
MetaRectAction( const Rectangle& rRect );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
+ const Rectangle& GetRect() const { return maRect; }
};
// -----------------------
@@ -283,11 +283,11 @@ class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction
{
private:
- Rectangle maRect;
- sal_uInt32 mnHorzRound;
- sal_uInt32 mnVertRound;
+ Rectangle maRect;
+ sal_uInt32 mnHorzRound;
+ sal_uInt32 mnVertRound;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION )
@@ -295,12 +295,12 @@ public:
MetaRoundRectAction( const Rectangle& rRect,
sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- sal_uInt32 GetHorzRound() const { return mnHorzRound; }
- sal_uInt32 GetVertRound() const { return mnVertRound; }
+ const Rectangle& GetRect() const { return maRect; }
+ sal_uInt32 GetHorzRound() const { return mnHorzRound; }
+ sal_uInt32 GetVertRound() const { return mnVertRound; }
};
// ---------------------
@@ -311,19 +311,19 @@ class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction
{
private:
- Rectangle maRect;
+ Rectangle maRect;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Ellipse, META_ELLIPSE_ACTION )
MetaEllipseAction( const Rectangle& rRect );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
+ const Rectangle& GetRect() const { return maRect; }
};
// -----------------
@@ -334,11 +334,11 @@ class VCL_DLLPUBLIC MetaArcAction : public MetaAction
{
private:
- Rectangle maRect;
- Point maStartPt;
- Point maEndPt;
+ Rectangle maRect;
+ Point maStartPt;
+ Point maEndPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Arc, META_ARC_ACTION )
@@ -346,12 +346,12 @@ public:
MetaArcAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- const Point& GetStartPoint() const { return maStartPt; }
- const Point& GetEndPoint() const { return maEndPt; }
+ const Rectangle& GetRect() const { return maRect; }
+ const Point& GetStartPoint() const { return maStartPt; }
+ const Point& GetEndPoint() const { return maEndPt; }
};
// -----------------
@@ -362,11 +362,11 @@ class VCL_DLLPUBLIC MetaPieAction : public MetaAction
{
private:
- Rectangle maRect;
- Point maStartPt;
- Point maEndPt;
+ Rectangle maRect;
+ Point maStartPt;
+ Point maEndPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Pie, META_PIE_ACTION )
@@ -374,12 +374,12 @@ public:
MetaPieAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- const Point& GetStartPoint() const { return maStartPt; }
- const Point& GetEndPoint() const { return maEndPt; }
+ const Rectangle& GetRect() const { return maRect; }
+ const Point& GetStartPoint() const { return maStartPt; }
+ const Point& GetEndPoint() const { return maEndPt; }
};
// -------------------
@@ -390,11 +390,11 @@ class VCL_DLLPUBLIC MetaChordAction : public MetaAction
{
private:
- Rectangle maRect;
- Point maStartPt;
- Point maEndPt;
+ Rectangle maRect;
+ Point maStartPt;
+ Point maEndPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Chord, META_CHORD_ACTION )
@@ -402,12 +402,12 @@ public:
MetaChordAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- const Point& GetStartPoint() const { return maStartPt; }
- const Point& GetEndPoint() const { return maEndPt; }
+ const Rectangle& GetRect() const { return maRect; }
+ const Point& GetStartPoint() const { return maStartPt; }
+ const Point& GetEndPoint() const { return maEndPt; }
};
// ----------------------
@@ -418,10 +418,10 @@ class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction
{
private:
- LineInfo maLineInfo;
- Polygon maPoly;
+ LineInfo maLineInfo;
+ Polygon maPoly;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( PolyLine, META_POLYLINE_ACTION )
@@ -429,11 +429,11 @@ public:
MetaPolyLineAction( const Polygon& rPoly );
MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Polygon& GetPolygon() const { return maPoly; }
- const LineInfo& GetLineInfo() const { return maLineInfo; }
+ const Polygon& GetPolygon() const { return maPoly; }
+ const LineInfo& GetLineInfo() const { return maLineInfo; }
};
// ---------------------
@@ -444,19 +444,19 @@ class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction
{
private:
- Polygon maPoly;
+ Polygon maPoly;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Polygon, META_POLYGON_ACTION )
MetaPolygonAction( const Polygon& rPoly );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Polygon& GetPolygon() const { return maPoly; }
+ const Polygon& GetPolygon() const { return maPoly; }
};
// -------------------------
@@ -467,19 +467,19 @@ class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction
{
private:
- PolyPolygon maPolyPoly;
+ PolyPolygon maPolyPoly;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION )
MetaPolyPolygonAction( const PolyPolygon& rPolyPoly );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
+ const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
};
// ------------------
@@ -490,12 +490,12 @@ class VCL_DLLPUBLIC MetaTextAction : public MetaAction
{
private:
- Point maPt;
- XubString maStr;
- USHORT mnIndex;
- USHORT mnLen;
+ Point maPt;
+ XubString maStr;
+ USHORT mnIndex;
+ USHORT mnLen;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Text, META_TEXT_ACTION )
@@ -503,13 +503,13 @@ public:
MetaTextAction( const Point& rPt, const XubString& rStr,
USHORT nIndex, USHORT nLen );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Point& GetPoint() const { return maPt; }
- const XubString& GetText() const { return maStr; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ const Point& GetPoint() const { return maPt; }
+ const XubString& GetText() const { return maStr; }
+ USHORT GetIndex() const { return mnIndex; }
+ USHORT GetLen() const { return mnLen; }
};
// -----------------------
@@ -520,16 +520,16 @@ class VCL_DLLPUBLIC MetaTextArrayAction : public MetaAction
{
private:
- Point maStartPt;
- XubString maStr;
- sal_Int32* mpDXAry;
- USHORT mnIndex;
- USHORT mnLen;
+ Point maStartPt;
+ XubString maStr;
+ sal_Int32* mpDXAry;
+ USHORT mnIndex;
+ USHORT mnLen;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
protected:
- virtual ~MetaTextArrayAction();
+ virtual ~MetaTextArrayAction();
public:
MetaTextArrayAction();
@@ -540,21 +540,21 @@ public:
USHORT nIndex,
USHORT nLen );
- virtual void Execute( OutputDevice* pOut );
+ virtual void Execute( OutputDevice* pOut );
virtual MetaAction* Clone();
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
- virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
+ virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
+ virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
- const Point& GetPoint() const { return maStartPt; }
- const XubString& GetText() const { return maStr; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
- sal_Int32* GetDXArray() const { return mpDXAry; }
+ const Point& GetPoint() const { return maStartPt; }
+ const XubString& GetText() const { return maStr; }
+ USHORT GetIndex() const { return mnIndex; }
+ USHORT GetLen() const { return mnLen; }
+ sal_Int32* GetDXArray() const { return mpDXAry; }
};
// -------------------------
@@ -565,13 +565,13 @@ class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
{
private:
- Point maPt;
- XubString maStr;
- sal_uInt32 mnWidth;
- USHORT mnIndex;
- USHORT mnLen;
+ Point maPt;
+ XubString maStr;
+ sal_uInt32 mnWidth;
+ USHORT mnIndex;
+ USHORT mnLen;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
@@ -580,14 +580,14 @@ public:
const XubString& rStr,
USHORT nIndex, USHORT nLen );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Point& GetPoint() const { return maPt; }
- const XubString& GetText() const { return maStr; }
- sal_uInt32 GetWidth() const { return mnWidth; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ const Point& GetPoint() const { return maPt; }
+ const XubString& GetText() const { return maStr; }
+ sal_uInt32 GetWidth() const { return mnWidth; }
+ USHORT GetIndex() const { return mnIndex; }
+ USHORT GetLen() const { return mnLen; }
};
// ----------------------
@@ -598,11 +598,11 @@ class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction
{
private:
- Rectangle maRect;
- XubString maStr;
- USHORT mnStyle;
+ Rectangle maRect;
+ XubString maStr;
+ USHORT mnStyle;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
@@ -610,12 +610,12 @@ public:
MetaTextRectAction( const Rectangle& rRect,
const XubString& rStr, USHORT nStyle );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- const XubString& GetText() const { return maStr; }
- USHORT GetStyle() const { return mnStyle; }
+ const Rectangle& GetRect() const { return maRect; }
+ const XubString& GetText() const { return maStr; }
+ USHORT GetStyle() const { return mnStyle; }
};
// ----------------------
@@ -626,13 +626,13 @@ class VCL_DLLPUBLIC MetaTextLineAction : public MetaAction
{
private:
- Point maPos;
- long mnWidth;
- FontStrikeout meStrikeout;
- FontUnderline meUnderline;
- FontUnderline meOverline;
+ Point maPos;
+ long mnWidth;
+ FontStrikeout meStrikeout;
+ FontUnderline meUnderline;
+ FontUnderline meOverline;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextLine, META_TEXTLINE_ACTION )
@@ -641,14 +641,14 @@ public:
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
-
- const Point& GetStartPoint() const { return maPos; }
- long GetWidth() const { return mnWidth; }
- FontStrikeout GetStrikeout() const { return meStrikeout; }
- FontUnderline GetUnderline() const { return meUnderline; }
- FontUnderline GetOverline() const { return meOverline; }
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
+
+ const Point& GetStartPoint() const { return maPos; }
+ long GetWidth() const { return mnWidth; }
+ FontStrikeout GetStrikeout() const { return meStrikeout; }
+ FontUnderline GetUnderline() const { return meUnderline; }
+ FontUnderline GetOverline() const { return meOverline; }
};
// -----------------
@@ -659,21 +659,21 @@ class VCL_DLLPUBLIC MetaBmpAction : public MetaAction
{
private:
- Bitmap maBmp;
- Point maPt;
+ Bitmap maBmp;
+ Point maPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Bmp, META_BMP_ACTION )
MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Bitmap& GetBitmap() const { return maBmp; }
- const Point& GetPoint() const { return maPt; }
+ const Bitmap& GetBitmap() const { return maBmp; }
+ const Point& GetPoint() const { return maPt; }
};
// ----------------------
@@ -684,11 +684,11 @@ class VCL_DLLPUBLIC MetaBmpScaleAction : public MetaAction
{
private:
- Bitmap maBmp;
- Point maPt;
- Size maSz;
+ Bitmap maBmp;
+ Point maPt;
+ Size maSz;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( BmpScale, META_BMPSCALE_ACTION )
@@ -696,12 +696,12 @@ public:
MetaBmpScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Bitmap& GetBitmap() const { return maBmp; }
- const Point& GetPoint() const { return maPt; }
- const Size& GetSize() const { return maSz; }
+ const Bitmap& GetBitmap() const { return maBmp; }
+ const Point& GetPoint() const { return maPt; }
+ const Size& GetSize() const { return maSz; }
};
// --------------------------
@@ -712,13 +712,13 @@ class VCL_DLLPUBLIC MetaBmpScalePartAction : public MetaAction
{
private:
- Bitmap maBmp;
- Point maDstPt;
- Size maDstSz;
- Point maSrcPt;
- Size maSrcSz;
+ Bitmap maBmp;
+ Point maDstPt;
+ Size maDstSz;
+ Point maSrcPt;
+ Size maSrcSz;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION )
@@ -727,14 +727,14 @@ public:
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Bitmap& GetBitmap() const { return maBmp; }
- const Point& GetDestPoint() const { return maDstPt; }
- const Size& GetDestSize() const { return maDstSz; }
- const Point& GetSrcPoint() const { return maSrcPt; }
- const Size& GetSrcSize() const { return maSrcSz; }
+ const Bitmap& GetBitmap() const { return maBmp; }
+ const Point& GetDestPoint() const { return maDstPt; }
+ const Size& GetDestSize() const { return maDstSz; }
+ const Point& GetSrcPoint() const { return maSrcPt; }
+ const Size& GetSrcSize() const { return maSrcSz; }
};
// -----------------
@@ -745,21 +745,21 @@ class VCL_DLLPUBLIC MetaBmpExAction : public MetaAction
{
private:
- BitmapEx maBmpEx;
- Point maPt;
+ BitmapEx maBmpEx;
+ Point maPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( BmpEx, META_BMPEX_ACTION )
MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const BitmapEx& GetBitmapEx() const { return maBmpEx; }
- const Point& GetPoint() const { return maPt; }
+ const BitmapEx& GetBitmapEx() const { return maBmpEx; }
+ const Point& GetPoint() const { return maPt; }
};
// ----------------------
@@ -770,11 +770,11 @@ class VCL_DLLPUBLIC MetaBmpExScaleAction : public MetaAction
{
private:
- BitmapEx maBmpEx;
- Point maPt;
- Size maSz;
+ BitmapEx maBmpEx;
+ Point maPt;
+ Size maSz;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION )
@@ -782,12 +782,12 @@ public:
MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx ) ;
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const BitmapEx& GetBitmapEx() const { return maBmpEx; }
- const Point& GetPoint() const { return maPt; }
- const Size& GetSize() const { return maSz; }
+ const BitmapEx& GetBitmapEx() const { return maBmpEx; }
+ const Point& GetPoint() const { return maPt; }
+ const Size& GetSize() const { return maSz; }
};
// ----------------------------
@@ -798,13 +798,13 @@ class VCL_DLLPUBLIC MetaBmpExScalePartAction : public MetaAction
{
private:
- BitmapEx maBmpEx;
- Point maDstPt;
- Size maDstSz;
- Point maSrcPt;
- Size maSrcSz;
+ BitmapEx maBmpEx;
+ Point maDstPt;
+ Size maDstSz;
+ Point maSrcPt;
+ Size maSrcSz;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION )
@@ -813,14 +813,14 @@ public:
const Point& rSrcPt, const Size& rSrcSz,
const BitmapEx& rBmpEx );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const BitmapEx& GetBitmapEx() const { return maBmpEx; }
- const Point& GetDestPoint() const { return maDstPt; }
- const Size& GetDestSize() const { return maDstSz; }
- const Point& GetSrcPoint() const { return maSrcPt; }
- const Size& GetSrcSize() const { return maSrcSz; }
+ const BitmapEx& GetBitmapEx() const { return maBmpEx; }
+ const Point& GetDestPoint() const { return maDstPt; }
+ const Size& GetDestSize() const { return maDstSz; }
+ const Point& GetSrcPoint() const { return maSrcPt; }
+ const Size& GetSrcSize() const { return maSrcSz; }
};
// ------------------
@@ -831,11 +831,11 @@ class VCL_DLLPUBLIC MetaMaskAction : public MetaAction
{
private:
- Bitmap maBmp;
- Color maColor;
- Point maPt;
+ Bitmap maBmp;
+ Color maColor;
+ Point maPt;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Mask, META_MASK_ACTION )
@@ -844,12 +844,12 @@ public:
const Bitmap& rBmp,
const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Bitmap& GetBitmap() const { return maBmp; }
- const Color& GetColor() const { return maColor; }
- const Point& GetPoint() const { return maPt; }
+ const Bitmap& GetBitmap() const { return maBmp; }
+ const Color& GetColor() const { return maColor; }
+ const Point& GetPoint() const { return maPt; }
};
// -----------------------
@@ -860,12 +860,12 @@ class VCL_DLLPUBLIC MetaMaskScaleAction : public MetaAction
{
private:
- Bitmap maBmp;
- Color maColor;
- Point maPt;
- Size maSz;
+ Bitmap maBmp;
+ Color maColor;
+ Point maPt;
+ Size maSz;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( MaskScale, META_MASKSCALE_ACTION )
@@ -874,13 +874,13 @@ public:
const Bitmap& rBmp,
const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Bitmap& GetBitmap() const { return maBmp; }
- const Color& GetColor() const { return maColor; }
- const Point& GetPoint() const { return maPt; }
- const Size& GetSize() const { return maSz; }
+ const Bitmap& GetBitmap() const { return maBmp; }
+ const Color& GetColor() const { return maColor; }
+ const Point& GetPoint() const { return maPt; }
+ const Size& GetSize() const { return maSz; }
};
// ---------------------------
@@ -891,14 +891,14 @@ class VCL_DLLPUBLIC MetaMaskScalePartAction : public MetaAction
{
private:
- Bitmap maBmp;
- Color maColor;
- Point maDstPt;
- Size maDstSz;
- Point maSrcPt;
- Size maSrcSz;
+ Bitmap maBmp;
+ Color maColor;
+ Point maDstPt;
+ Size maDstSz;
+ Point maSrcPt;
+ Size maSrcSz;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( MaskScalePart, META_MASKSCALEPART_ACTION )
@@ -908,15 +908,15 @@ public:
const Bitmap& rBmp,
const Color& rColor );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Bitmap& GetBitmap() const { return maBmp; }
- const Color& GetColor() const { return maColor; }
- const Point& GetDestPoint() const { return maDstPt; }
- const Size& GetDestSize() const { return maDstSz; }
- const Point& GetSrcPoint() const { return maSrcPt; }
- const Size& GetSrcSize() const { return maSrcSz; }
+ const Bitmap& GetBitmap() const { return maBmp; }
+ const Color& GetColor() const { return maColor; }
+ const Point& GetDestPoint() const { return maDstPt; }
+ const Size& GetDestSize() const { return maDstSz; }
+ const Point& GetSrcPoint() const { return maSrcPt; }
+ const Size& GetSrcSize() const { return maSrcSz; }
};
// ----------------------
@@ -927,21 +927,21 @@ class VCL_DLLPUBLIC MetaGradientAction : public MetaAction
{
private:
- Rectangle maRect;
- Gradient maGradient;
+ Rectangle maRect;
+ Gradient maGradient;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Gradient, META_GRADIENT_ACTION )
MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- const Gradient& GetGradient() const { return maGradient; }
+ const Rectangle& GetRect() const { return maRect; }
+ const Gradient& GetGradient() const { return maGradient; }
};
// ------------------------
@@ -952,21 +952,21 @@ class VCL_DLLPUBLIC MetaGradientExAction : public MetaAction
{
private:
- PolyPolygon maPolyPoly;
- Gradient maGradient;
+ PolyPolygon maPolyPoly;
+ Gradient maGradient;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( GradientEx, META_GRADIENTEX_ACTION )
MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
- const Gradient& GetGradient() const { return maGradient; }
+ const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
+ const Gradient& GetGradient() const { return maGradient; }
};
// -------------------
@@ -977,21 +977,21 @@ class VCL_DLLPUBLIC MetaHatchAction : public MetaAction
{
private:
- PolyPolygon maPolyPoly;
- Hatch maHatch;
+ PolyPolygon maPolyPoly;
+ Hatch maHatch;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Hatch, META_HATCH_ACTION )
MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
- const Hatch& GetHatch() const { return maHatch; }
+ const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
+ const Hatch& GetHatch() const { return maHatch; }
};
// -----------------------
@@ -1002,10 +1002,10 @@ class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction
{
private:
- Rectangle maRect;
- Wallpaper maWallpaper;
+ Rectangle maRect;
+ Wallpaper maWallpaper;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION )
@@ -1013,11 +1013,11 @@ public:
MetaWallpaperAction( const Rectangle& rRect,
const Wallpaper& rPaper );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
- const Wallpaper& GetWallpaper() const { return maWallpaper; }
+ const Rectangle& GetRect() const { return maRect; }
+ const Wallpaper& GetWallpaper() const { return maWallpaper; }
};
// ------------------------
@@ -1028,21 +1028,21 @@ class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction
{
private:
- Region maRegion;
- BOOL mbClip;
+ Region maRegion;
+ BOOL mbClip;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
MetaClipRegionAction( const Region& rRegion, BOOL bClip );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Region& GetRegion() const { return maRegion; }
- BOOL IsClipping() const { return mbClip; }
+ const Region& GetRegion() const { return maRegion; }
+ BOOL IsClipping() const { return mbClip; }
};
// ---------------------------------
@@ -1053,19 +1053,19 @@ class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction
{
private:
- Rectangle maRect;
+ Rectangle maRect;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION )
MetaISectRectClipRegionAction( const Rectangle& rRect );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Rectangle& GetRect() const { return maRect; }
+ const Rectangle& GetRect() const { return maRect; }
};
// -----------------------------------
@@ -1076,19 +1076,19 @@ class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction
{
private:
- Region maRegion;
+ Region maRegion;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION )
MetaISectRegionClipRegionAction( const Region& rRegion );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Region& GetRegion() const { return maRegion; }
+ const Region& GetRegion() const { return maRegion; }
};
// ----------------------------
@@ -1099,20 +1099,20 @@ class VCL_DLLPUBLIC MetaMoveClipRegionAction : public MetaAction
{
private:
- long mnHorzMove;
- long mnVertMove;
+ long mnHorzMove;
+ long mnVertMove;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION )
MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Scale( double fScaleX, double fScaleY );
- long GetHorzMove() const { return mnHorzMove; }
- long GetVertMove() const { return mnVertMove; }
+ long GetHorzMove() const { return mnHorzMove; }
+ long GetVertMove() const { return mnVertMove; }
};
// -----------------------
@@ -1123,18 +1123,18 @@ class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction
{
private:
- Color maColor;
- BOOL mbSet;
+ Color maColor;
+ BOOL mbSet;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
MetaLineColorAction( const Color& rColor, BOOL bSet );
- const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ const Color& GetColor() const { return maColor; }
+ BOOL IsSetting() const { return mbSet; }
};
// -----------------------
@@ -1145,18 +1145,18 @@ class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction
{
private:
- Color maColor;
- BOOL mbSet;
+ Color maColor;
+ BOOL mbSet;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
MetaFillColorAction( const Color& rColor, BOOL bSet );
- const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ const Color& GetColor() const { return maColor; }
+ BOOL IsSetting() const { return mbSet; }
};
// -----------------------
@@ -1167,16 +1167,16 @@ class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction
{
private:
- Color maColor;
+ Color maColor;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION )
MetaTextColorAction( const Color& rColor );
- const Color& GetColor() const { return maColor; }
+ const Color& GetColor() const { return maColor; }
};
// ---------------------------
@@ -1187,18 +1187,18 @@ class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction
{
private:
- Color maColor;
- BOOL mbSet;
+ Color maColor;
+ BOOL mbSet;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
MetaTextFillColorAction( const Color& rColor, BOOL bSet );
- const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ const Color& GetColor() const { return maColor; }
+ BOOL IsSetting() const { return mbSet; }
};
// ---------------------------
@@ -1209,18 +1209,18 @@ class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction
{
private:
- Color maColor;
- BOOL mbSet;
+ Color maColor;
+ BOOL mbSet;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
MetaTextLineColorAction( const Color& rColor, BOOL bSet );
- const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ const Color& GetColor() const { return maColor; }
+ BOOL IsSetting() const { return mbSet; }
};
// ---------------------------
@@ -1231,18 +1231,18 @@ class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction
{
private:
- Color maColor;
- BOOL mbSet;
+ Color maColor;
+ BOOL mbSet;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
MetaOverlineColorAction( const Color& rColor, BOOL bSet );
- const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ const Color& GetColor() const { return maColor; }
+ BOOL IsSetting() const { return mbSet; }
};
// -----------------------
@@ -1253,16 +1253,16 @@ class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction
{
private:
- TextAlign maAlign;
+ TextAlign maAlign;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION )
MetaTextAlignAction( TextAlign aAlign );
- TextAlign GetTextAlign() const { return maAlign; }
+ TextAlign GetTextAlign() const { return maAlign; }
};
// ---------------------
@@ -1273,18 +1273,18 @@ class VCL_DLLPUBLIC MetaMapModeAction : public MetaAction
{
private:
- MapMode maMapMode;
+ MapMode maMapMode;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( MapMode, META_MAPMODE_ACTION )
MetaMapModeAction( const MapMode& rMapMode );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Scale( double fScaleX, double fScaleY );
- const MapMode& GetMapMode() const { return maMapMode; }
+ const MapMode& GetMapMode() const { return maMapMode; }
};
// ---------------------
@@ -1295,18 +1295,18 @@ class VCL_DLLPUBLIC MetaFontAction : public MetaAction
{
private:
- Font maFont;
+ Font maFont;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Font, META_FONT_ACTION )
MetaFontAction( const Font& rFont );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Scale( double fScaleX, double fScaleY );
- const Font& GetFont() const { return maFont; }
+ const Font& GetFont() const { return maFont; }
};
// ------------------
@@ -1317,16 +1317,16 @@ class VCL_DLLPUBLIC MetaPushAction : public MetaAction
{
private:
- USHORT mnFlags;
+ USHORT mnFlags;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Push, META_PUSH_ACTION )
MetaPushAction( USHORT nFlags );
- USHORT GetFlags() const { return mnFlags; }
+ USHORT GetFlags() const { return mnFlags; }
};
// -----------------
@@ -1348,16 +1348,16 @@ class VCL_DLLPUBLIC MetaRasterOpAction : public MetaAction
{
private:
- RasterOp meRasterOp;
+ RasterOp meRasterOp;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( RasterOp, META_RASTEROP_ACTION )
MetaRasterOpAction( RasterOp eRasterOp );
- RasterOp GetRasterOp() const { return meRasterOp; }
+ RasterOp GetRasterOp() const { return meRasterOp; }
};
// -------------------------
@@ -1368,21 +1368,21 @@ class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction
{
private:
- PolyPolygon maPolyPoly;
- USHORT mnTransPercent;
+ PolyPolygon maPolyPoly;
+ USHORT mnTransPercent;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
MetaTransparentAction( const PolyPolygon& rPolyPoly, USHORT nTransPercent );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
- USHORT GetTransparence() const { return mnTransPercent; }
+ const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
+ USHORT GetTransparence() const { return mnTransPercent; }
};
// ------------------------------
@@ -1393,12 +1393,12 @@ class VCL_DLLPUBLIC MetaFloatTransparentAction : public MetaAction
{
private:
- GDIMetaFile maMtf;
- Point maPoint;
- Size maSize;
- Gradient maGradient;
+ GDIMetaFile maMtf;
+ Point maPoint;
+ Size maSize;
+ Gradient maGradient;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION )
@@ -1406,13 +1406,13 @@ public:
MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
const Size& rSize, const Gradient& rGradient );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
- const Point& GetPoint() const { return maPoint; }
- const Size& GetSize() const { return maSize; }
- const Gradient& GetGradient() const { return maGradient; }
+ const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
+ const Point& GetPoint() const { return maPoint; }
+ const Size& GetSize() const { return maSize; }
+ const Gradient& GetGradient() const { return maGradient; }
};
// ---------------------
@@ -1423,12 +1423,12 @@ class VCL_DLLPUBLIC MetaEPSAction : public MetaAction
{
private:
- GfxLink maGfxLink;
- GDIMetaFile maSubst;
- Point maPoint;
- Size maSize;
+ GfxLink maGfxLink;
+ GDIMetaFile maSubst;
+ Point maPoint;
+ Size maSize;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( EPS, META_EPS_ACTION )
@@ -1436,13 +1436,13 @@ public:
MetaEPSAction( const Point& rPoint, const Size& rSize,
const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- const GfxLink& GetLink() const { return maGfxLink; }
- const GDIMetaFile& GetSubstitute() const { return maSubst; }
- const Point& GetPoint() const { return maPoint; }
- const Size& GetSize() const { return maSize; }
+ const GfxLink& GetLink() const { return maGfxLink; }
+ const GDIMetaFile& GetSubstitute() const { return maSubst; }
+ const Point& GetPoint() const { return maPoint; }
+ const Size& GetSize() const { return maSize; }
};
// ----------------------
@@ -1453,18 +1453,18 @@ class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction
{
private:
- Point maRefPoint;
- BOOL mbSet;
+ Point maRefPoint;
+ BOOL mbSet;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
MetaRefPointAction( const Point& rRefPoint, BOOL bSet );
- const Point& GetRefPoint() const { return maRefPoint; }
- BOOL IsSetting() const { return mbSet; }
+ const Point& GetRefPoint() const { return maRefPoint; }
+ BOOL IsSetting() const { return mbSet; }
};
// ---------------------
@@ -1475,13 +1475,13 @@ class VCL_DLLPUBLIC MetaCommentAction : public MetaAction
{
private:
- ByteString maComment;
- sal_Int32 mnValue;
- sal_uInt32 mnDataSize;
- BYTE* mpData;
+ ByteString maComment;
+ sal_Int32 mnValue;
+ sal_uInt32 mnDataSize;
+ BYTE* mpData;
- SAL_DLLPRIVATE void ImplInitDynamicData( const BYTE* pData, sal_uInt32 nDataSize );
- virtual sal_Bool Compare( const MetaAction& ) const;
+ SAL_DLLPRIVATE void ImplInitDynamicData( const BYTE* pData, sal_uInt32 nDataSize );
+ virtual sal_Bool Compare( const MetaAction& ) const;
protected:
~MetaCommentAction();
@@ -1492,18 +1492,18 @@ public:
MetaCommentAction( const ByteString& rComment, sal_Int32 nValue = 0L, const BYTE* pData = NULL, sal_uInt32 nDataSize = 0UL );
MetaCommentAction( const BYTE* pData, sal_uInt32 nDataSize );
- virtual void Move( long nHorzMove, long nVertMove );
- virtual void Scale( double fScaleX, double fScaleY );
+ virtual void Move( long nHorzMove, long nVertMove );
+ virtual void Scale( double fScaleX, double fScaleY );
- virtual void Execute( OutputDevice* pOut );
+ virtual void Execute( OutputDevice* pOut );
virtual MetaAction* Clone();
- virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
- virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
+ virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
+ virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
- const ByteString& GetComment() const { return maComment; }
- sal_Int32 GetValue() const { return mnValue; }
- sal_uInt32 GetDataSize() const { return mnDataSize; }
- const BYTE* GetData() const { return mpData; }
+ const ByteString& GetComment() const { return maComment; }
+ sal_Int32 GetValue() const { return mnValue; }
+ sal_uInt32 GetDataSize() const { return mnDataSize; }
+ const BYTE* GetData() const { return mpData; }
};
// ------------------------
@@ -1514,15 +1514,15 @@ class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction
{
private:
- sal_uInt32 mnLayoutMode;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ sal_uInt32 mnLayoutMode;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION )
MetaLayoutModeAction( sal_uInt32 nLayoutMode );
- sal_uInt32 GetLayoutMode() const { return mnLayoutMode; }
+ sal_uInt32 GetLayoutMode() const { return mnLayoutMode; }
};
// ------------------------
@@ -1533,15 +1533,15 @@ class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction
{
private:
- LanguageType meTextLanguage;
- virtual sal_Bool Compare( const MetaAction& ) const;
+ LanguageType meTextLanguage;
+ virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION )
MetaTextLanguageAction( LanguageType );
- LanguageType GetTextLanguage() const { return meTextLanguage; }
+ LanguageType GetTextLanguage() const { return meTextLanguage; }
};
#endif // _SV_METAACT_HXX
diff --git a/vcl/inc/vcl/metric.hxx b/vcl/inc/vcl/metric.hxx
index 41cb707ffd62..b78ce5df9247 100644
--- a/vcl/inc/vcl/metric.hxx
+++ b/vcl/inc/vcl/metric.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +46,22 @@ class VCL_DLLPUBLIC FontInfo : public Font
friend class OutputDevice;
protected:
- ImplFontMetric* mpImplMetric; // Implementation
+ ImplFontMetric* mpImplMetric; // Implementation
public:
FontInfo();
FontInfo( const FontInfo& );
~FontInfo();
- FontType GetType() const;
- BOOL IsDeviceFont() const;
- BOOL SupportsLatin() const;
- BOOL SupportsCJK() const;
- BOOL SupportsCTL() const;
+ FontType GetType() const;
+ BOOL IsDeviceFont() const;
+ BOOL SupportsLatin() const;
+ BOOL SupportsCJK() const;
+ BOOL SupportsCTL() const;
- FontInfo& operator=( const FontInfo& );
- BOOL operator==( const FontInfo& ) const;
- BOOL operator!=( const FontInfo& rInfo ) const
+ FontInfo& operator=( const FontInfo& );
+ BOOL operator==( const FontInfo& ) const;
+ BOOL operator!=( const FontInfo& rInfo ) const
{ return !operator==( rInfo ); }
};
@@ -76,16 +76,16 @@ public:
FontMetric( const FontMetric& );
~FontMetric() {}
- long GetAscent() const;
- long GetDescent() const;
- long GetIntLeading() const;
- long GetExtLeading() const;
- long GetLineHeight() const;
- long GetSlant() const;
+ long GetAscent() const;
+ long GetDescent() const;
+ long GetIntLeading() const;
+ long GetExtLeading() const;
+ long GetLineHeight() const;
+ long GetSlant() const;
- FontMetric& operator=( const FontMetric& rMetric );
- BOOL operator==( const FontMetric& rMetric ) const;
- BOOL operator!=( const FontMetric& rMetric ) const
+ FontMetric& operator=( const FontMetric& rMetric );
+ BOOL operator==( const FontMetric& rMetric ) const;
+ BOOL operator!=( const FontMetric& rMetric ) const
{ return !operator==( rMetric ); }
};
@@ -135,30 +135,30 @@ class VCL_DLLPUBLIC TextRectInfo
friend class OutputDevice;
private:
- long mnMaxWidth;
- USHORT mnLineCount;
- BOOL mbEllipsis;
+ long mnMaxWidth;
+ USHORT mnLineCount;
+ BOOL mbEllipsis;
public:
TextRectInfo();
- USHORT GetLineCount() const { return mnLineCount; }
- long GetMaxLineWidth() const { return mnMaxWidth; }
- BOOL IsEllipses() const { return mbEllipsis; }
+ USHORT GetLineCount() const { return mnLineCount; }
+ long GetMaxLineWidth() const { return mnMaxWidth; }
+ BOOL IsEllipses() const { return mbEllipsis; }
- BOOL operator ==( const TextRectInfo& rInfo ) const
- { return ((mnMaxWidth == rInfo.mnMaxWidth) &&
- (mnLineCount == rInfo.mnLineCount) &&
- (mbEllipsis == rInfo.mbEllipsis)); }
- BOOL operator !=( const TextRectInfo& rInfo ) const
+ BOOL operator ==( const TextRectInfo& rInfo ) const
+ { return ((mnMaxWidth == rInfo.mnMaxWidth) &&
+ (mnLineCount == rInfo.mnLineCount) &&
+ (mbEllipsis == rInfo.mbEllipsis)); }
+ BOOL operator !=( const TextRectInfo& rInfo ) const
{ return !(TextRectInfo::operator==( rInfo )); }
};
inline TextRectInfo::TextRectInfo()
{
- mnMaxWidth = 0;
- mnLineCount = 0;
- mbEllipsis = FALSE;
+ mnMaxWidth = 0;
+ mnLineCount = 0;
+ mbEllipsis = FALSE;
}
#endif // _SV_METRIC_HXX
diff --git a/vcl/inc/vcl/mnemonic.hxx b/vcl/inc/vcl/mnemonic.hxx
index 801ba7d26190..bdea35ffc471 100644
--- a/vcl/inc/vcl/mnemonic.hxx
+++ b/vcl/inc/vcl/mnemonic.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,25 +40,25 @@
// Mnemonic Chars, which we want support
// Latin 0-9
-#define MNEMONIC_RANGE_1_START 0x30
-#define MNEMONIC_RANGE_1_END 0x39
+#define MNEMONIC_RANGE_1_START 0x30
+#define MNEMONIC_RANGE_1_END 0x39
// Latin A-Z
-#define MNEMONIC_RANGE_2_START 0x41
-#define MNEMONIC_RANGE_2_END 0x5A
+#define MNEMONIC_RANGE_2_START 0x41
+#define MNEMONIC_RANGE_2_END 0x5A
// Cyrillic
-#define MNEMONIC_RANGE_3_START 0x0410
-#define MNEMONIC_RANGE_3_END 0x042F
+#define MNEMONIC_RANGE_3_START 0x0410
+#define MNEMONIC_RANGE_3_END 0x042F
// Greek
-#define MNEMONIC_RANGE_4_START 0x0391
-#define MNEMONIC_RANGE_4_END 0x03AB
-#define MNEMONIC_RANGES 4
-#define MAX_MNEMONICS ((MNEMONIC_RANGE_1_END-MNEMONIC_RANGE_1_START+1)+\
+#define MNEMONIC_RANGE_4_START 0x0391
+#define MNEMONIC_RANGE_4_END 0x03AB
+#define MNEMONIC_RANGES 4
+#define MAX_MNEMONICS ((MNEMONIC_RANGE_1_END-MNEMONIC_RANGE_1_START+1)+\
(MNEMONIC_RANGE_2_END-MNEMONIC_RANGE_2_START+1)+\
(MNEMONIC_RANGE_3_END-MNEMONIC_RANGE_3_START+1)+\
(MNEMONIC_RANGE_4_END-MNEMONIC_RANGE_4_START+1))
-#define MNEMONIC_CHAR ((sal_Unicode)'~')
-#define MNEMONIC_INDEX_NOTFOUND ((USHORT)0xFFFF)
+#define MNEMONIC_CHAR ((sal_Unicode)'~')
+#define MNEMONIC_INDEX_NOTFOUND ((USHORT)0xFFFF)
// -------------------------
// - MnemonicGenerator -
@@ -68,18 +68,18 @@ class VCL_DLLPUBLIC MnemonicGenerator
{
private:
// 0 == Mnemonic; >0 == count of characters
- BYTE maMnemonics[MAX_MNEMONICS];
+ BYTE maMnemonics[MAX_MNEMONICS];
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > mxCharClass;
protected:
- SAL_DLLPRIVATE USHORT ImplGetMnemonicIndex( sal_Unicode c );
- SAL_DLLPRIVATE sal_Unicode ImplFindMnemonic( const XubString& rKey );
+ SAL_DLLPRIVATE USHORT ImplGetMnemonicIndex( sal_Unicode c );
+ SAL_DLLPRIVATE sal_Unicode ImplFindMnemonic( const XubString& rKey );
public:
MnemonicGenerator();
- void RegisterMnemonic( const XubString& rKey );
- BOOL CreateMnemonic( XubString& rKey );
+ void RegisterMnemonic( const XubString& rKey );
+ BOOL CreateMnemonic( XubString& rKey );
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > GetCharClass();
// returns a string where all '~'-characters and CJK mnemonics of the form (~A) are completely removed
diff --git a/vcl/inc/vcl/mnemonicengine.hxx b/vcl/inc/vcl/mnemonicengine.hxx
index cf32d7b70626..3e196cbaf6bf 100644
--- a/vcl/inc/vcl/mnemonicengine.hxx
+++ b/vcl/inc/vcl/mnemonicengine.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/morebtn.hxx b/vcl/inc/vcl/morebtn.hxx
index fe787d2b1b26..0a9c930ebb80 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ private:
protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
+ SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
MoreButton( Window* pParent, WinBits nStyle = 0 );
diff --git a/vcl/inc/vcl/msgbox.hxx b/vcl/inc/vcl/msgbox.hxx
index 7b02444ed4d7..d3af9841f861 100644
--- a/vcl/inc/vcl/msgbox.hxx
+++ b/vcl/inc/vcl/msgbox.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,20 +45,20 @@ class CheckBox;
// Return-Werte von Execute
//!!! bei Aenderungen \basic\source\runtime\methods.cxx msgbox anpassen
-#define RET_OK TRUE
-#define RET_CANCEL FALSE
-#define RET_YES 2
-#define RET_NO 3
-#define RET_RETRY 4
+#define RET_OK TRUE
+#define RET_CANCEL FALSE
+#define RET_YES 2
+#define RET_NO 3
+#define RET_RETRY 4
#define RET_IGNORE 5
-#define BUTTONID_OK RET_OK
-#define BUTTONID_CANCEL RET_CANCEL
-#define BUTTONID_YES RET_YES
-#define BUTTONID_NO RET_NO
-#define BUTTONID_RETRY RET_RETRY
+#define BUTTONID_OK RET_OK
+#define BUTTONID_CANCEL RET_CANCEL
+#define BUTTONID_YES RET_YES
+#define BUTTONID_NO RET_NO
+#define BUTTONID_RETRY RET_RETRY
#define BUTTONID_IGNORE RET_IGNORE
-#define BUTTONID_HELP 10
+#define BUTTONID_HELP 10
// -----------
// - MessBox -
@@ -67,24 +67,24 @@ class CheckBox;
class VCL_DLLPUBLIC MessBox : public ButtonDialog
{
protected:
- FixedText* mpFixedText;
- FixedImage* mpFixedImage;
- XubString maMessText;
- Image maImage;
- Image maImageHC;
- USHORT mnSoundType;
- BOOL mbHelpBtn;
- BOOL mbSound;
+ FixedText* mpFixedText;
+ FixedImage* mpFixedImage;
+ XubString maMessText;
+ Image maImage;
+ Image maImageHC;
+ USHORT mnSoundType;
+ BOOL mbHelpBtn;
+ BOOL mbSound;
CheckBox* mpCheckBox;
XubString maCheckBoxText;
BOOL mbCheck;
- SAL_DLLPRIVATE void ImplInitMessBoxData();
- SAL_DLLPRIVATE void ImplInitButtons();
- SAL_DLLPRIVATE void ImplPosControls();
+ SAL_DLLPRIVATE void ImplInitMessBoxData();
+ SAL_DLLPRIVATE void ImplInitButtons();
+ SAL_DLLPRIVATE void ImplPosControls();
protected:
- SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
+ SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
MessBox( WindowType nType );
public:
@@ -93,13 +93,13 @@ public:
MessBox( Window* pParent, const ResId& rResId );
~MessBox();
- virtual void StateChanged( StateChangedType nStateChange );
+ virtual void StateChanged( StateChangedType nStateChange );
- void SetMessText( const XubString& rText ) { maMessText = rText; }
- const XubString& GetMessText() const { return maMessText; }
+ void SetMessText( const XubString& rText ) { maMessText = rText; }
+ const XubString& GetMessText() const { return maMessText; }
- void SetImage( const Image& rImage ) { maImage = rImage; }
- const Image& GetImage() const { return maImage; }
+ void SetImage( const Image& rImage ) { maImage = rImage; }
+ const Image& GetImage() const { return maImage; }
BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
@@ -120,14 +120,14 @@ public:
class VCL_DLLPUBLIC InfoBox : public MessBox
{
private:
- SAL_DLLPRIVATE void ImplInitInfoBoxData();
+ SAL_DLLPRIVATE void ImplInitInfoBoxData();
public:
InfoBox( Window* pParent, const XubString& rMessage );
InfoBox( Window* pParent, const ResId & rResId );
- static Image GetStandardImage();
- static Image GetStandardImageHC();
+ static Image GetStandardImage();
+ static Image GetStandardImageHC();
};
// --------------
@@ -137,7 +137,7 @@ public:
class VCL_DLLPUBLIC WarningBox : public MessBox
{
private:
- SAL_DLLPRIVATE void ImplInitWarningBoxData();
+ SAL_DLLPRIVATE void ImplInitWarningBoxData();
public:
WarningBox( Window* pParent, WinBits nStyle,
@@ -146,8 +146,8 @@ public:
void SetDefaultCheckBoxText();
- static Image GetStandardImage();
- static Image GetStandardImageHC();
+ static Image GetStandardImage();
+ static Image GetStandardImageHC();
};
// ------------
@@ -157,15 +157,15 @@ public:
class VCL_DLLPUBLIC ErrorBox : public MessBox
{
private:
- SAL_DLLPRIVATE void ImplInitErrorBoxData();
+ SAL_DLLPRIVATE void ImplInitErrorBoxData();
public:
ErrorBox( Window* pParent, WinBits nStyle,
const XubString& rMessage );
ErrorBox( Window* pParent, const ResId& rResId );
- static Image GetStandardImage();
- static Image GetStandardImageHC();
+ static Image GetStandardImage();
+ static Image GetStandardImageHC();
};
// ------------
@@ -175,7 +175,7 @@ public:
class VCL_DLLPUBLIC QueryBox : public MessBox
{
private:
- SAL_DLLPRIVATE void ImplInitQueryBoxData();
+ SAL_DLLPRIVATE void ImplInitQueryBoxData();
public:
QueryBox( Window* pParent, WinBits nStyle,
@@ -184,10 +184,10 @@ public:
void SetDefaultCheckBoxText();
- static Image GetStandardImage();
- static Image GetStandardImageHC();
+ static Image GetStandardImage();
+ static Image GetStandardImageHC();
};
-#endif // _SV_MSGBOX_HXX
+#endif // _SV_MSGBOX_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/octree.hxx b/vcl/inc/vcl/octree.hxx
index 085ef648f98f..08f5153b7754 100644
--- a/vcl/inc/vcl/octree.hxx
+++ b/vcl/inc/vcl/octree.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +36,8 @@
// - Defines -
// -----------
-#define OCTREE_BITS 5
-#define OCTREE_BITS_1 10
+#define OCTREE_BITS 5
+#define OCTREE_BITS_1 10
// --------------
// - OctreeNode -
@@ -45,19 +45,19 @@
typedef struct OctreeNode
{
- ULONG nCount;
- ULONG nRed;
- ULONG nGreen;
- ULONG nBlue;
+ ULONG nCount;
+ ULONG nRed;
+ ULONG nGreen;
+ ULONG nBlue;
OctreeNode* pChild[ 8 ];
- OctreeNode* pNext;
- OctreeNode* pNextInCache;
- USHORT nPalIndex;
- BOOL bLeaf;
+ OctreeNode* pNext;
+ OctreeNode* pNextInCache;
+ USHORT nPalIndex;
+ BOOL bLeaf;
} NODE;
-typedef NODE* PNODE;
-typedef PNODE* PPNODE;
+typedef NODE* PNODE;
+typedef PNODE* PPNODE;
// ----------
// - Octree -
@@ -70,37 +70,37 @@ class VCL_DLLPUBLIC Octree
{
private:
- BitmapPalette aPal;
- ULONG nMax;
- ULONG nLeafCount;
- ULONG nLevel;
- PNODE pTree;
- PNODE pReduce[ OCTREE_BITS + 1 ];
- BitmapColor* pColor;
- ImpNodeCache* pNodeCache;
- const BitmapReadAccess* pAcc;
- USHORT nPalIndex;
+ BitmapPalette aPal;
+ ULONG nMax;
+ ULONG nLeafCount;
+ ULONG nLevel;
+ PNODE pTree;
+ PNODE pReduce[ OCTREE_BITS + 1 ];
+ BitmapColor* pColor;
+ ImpNodeCache* pNodeCache;
+ const BitmapReadAccess* pAcc;
+ USHORT nPalIndex;
Octree() {};
- void CreatePalette( PNODE pNode );
- void GetPalIndex( PNODE pNode );
+ void CreatePalette( PNODE pNode );
+ void GetPalIndex( PNODE pNode );
SAL_DLLPRIVATE void ImplCreateOctree();
- SAL_DLLPRIVATE void ImplDeleteOctree( PPNODE ppNode );
- SAL_DLLPRIVATE void ImplAdd( PPNODE ppNode );
- SAL_DLLPRIVATE void ImplReduce();
+ SAL_DLLPRIVATE void ImplDeleteOctree( PPNODE ppNode );
+ SAL_DLLPRIVATE void ImplAdd( PPNODE ppNode );
+ SAL_DLLPRIVATE void ImplReduce();
-public:
+public:
Octree( const BitmapReadAccess& rReadAcc, ULONG nColors );
Octree( ULONG nColors );
~Octree();
- void AddColor( const BitmapColor& rColor );
+ void AddColor( const BitmapColor& rColor );
- inline const BitmapPalette& GetPalette();
- inline USHORT GetBestPaletteIndex( const BitmapColor& rColor );
+ inline const BitmapPalette& GetPalette();
+ inline USHORT GetBestPaletteIndex( const BitmapColor& rColor );
};
// ------------------------------------------------------------------------
@@ -132,27 +132,27 @@ class VCL_DLLPUBLIC InverseColorMap
{
private:
- BYTE* pBuffer;
- BYTE* pMap;
- const ULONG nBits;
+ BYTE* pBuffer;
+ BYTE* pMap;
+ const ULONG nBits;
- SAL_DLLPRIVATE void ImplCreateBuffers( const ULONG nMax );
+ SAL_DLLPRIVATE void ImplCreateBuffers( const ULONG nMax );
public:
InverseColorMap( const BitmapPalette& rPal );
~InverseColorMap();
- inline USHORT GetBestPaletteIndex( const BitmapColor& rColor );
+ inline USHORT GetBestPaletteIndex( const BitmapColor& rColor );
};
// ------------------------------------------------------------------------
inline USHORT InverseColorMap::GetBestPaletteIndex( const BitmapColor& rColor )
{
- return pMap[ ( ( (ULONG) rColor.GetRed() >> nBits ) << OCTREE_BITS_1 ) |
- ( ( (ULONG) rColor.GetGreen() >> nBits ) << OCTREE_BITS ) |
+ return pMap[ ( ( (ULONG) rColor.GetRed() >> nBits ) << OCTREE_BITS_1 ) |
+ ( ( (ULONG) rColor.GetGreen() >> nBits ) << OCTREE_BITS ) |
( (ULONG) rColor.GetBlue() >> nBits ) ];
}
diff --git a/vcl/inc/vcl/oldprintadaptor.hxx b/vcl/inc/vcl/oldprintadaptor.hxx
index 1a6705b42cb8..2d68a08eee53 100644
--- a/vcl/inc/vcl/oldprintadaptor.hxx
+++ b/vcl/inc/vcl/oldprintadaptor.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +40,10 @@ namespace vcl
public:
OldStylePrintAdaptor( const boost::shared_ptr< Printer >& );
virtual ~OldStylePrintAdaptor();
-
+
void StartPage();
void EndPage();
-
+
virtual int getPageCount() const;
virtual com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParameters( int i_nPage ) const;
virtual void printPage( int i_nPage ) const;
diff --git a/vcl/inc/vcl/outdata.hxx b/vcl/inc/vcl/outdata.hxx
index 2f4a9b5ed7aa..e0a3a541d42c 100644
--- a/vcl/inc/vcl/outdata.hxx
+++ b/vcl/inc/vcl/outdata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/outdev.h b/vcl/inc/vcl/outdev.h
index a25636987439..3b9b07eefb74 100644
--- a/vcl/inc/vcl/outdev.h
+++ b/vcl/inc/vcl/outdev.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -140,10 +140,10 @@ public:
// nowadays these substitutions are needed for backward compatibility and tight platform integration:
// - substitutions from configuration entries (Tools->Options->FontReplacement and/or fontconfig)
// - device specific substitutions (e.g. for PS printer builtin fonts)
-// - substitutions for missing fonts defined by configuration entries (generic and/or platform dependent fallbacks)
+// - substitutions for missing fonts defined by configuration entries (generic and/or platform dependent fallbacks)
// - substitutions for missing fonts defined by multi-token fontnames (e.g. fontname="SpecialFont;FallbackA;FallbackB")
// - substitutions for incomplete fonts (implicit, generic, EUDC and/or platform dependent fallbacks)
-// - substitutions for missing symbol fonts by translating code points into other symbol fonts
+// - substitutions for missing symbol fonts by translating code points into other symbol fonts
class ImplFontSubstitution
{
@@ -250,14 +250,14 @@ namespace basegfx { class B2DHomMatrix; }
struct ImplOutDevData
{
- VirtualDevice* mpRotateDev;
- vcl::ControlLayoutData* mpRecordLayout;
- Rectangle maRecordRect;
- ImplDirectFontSubstitution maDevFontSubst;
+ VirtualDevice* mpRotateDev;
+ vcl::ControlLayoutData* mpRecordLayout;
+ Rectangle maRecordRect;
+ ImplDirectFontSubstitution maDevFontSubst;
// #i75163#
- basegfx::B2DHomMatrix* mpViewTransform;
- basegfx::B2DHomMatrix* mpInverseViewTransform;
+ basegfx::B2DHomMatrix* mpViewTransform;
+ basegfx::B2DHomMatrix* mpInverseViewTransform;
};
void ImplFreeOutDevFontData();
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index cdabea609410..e975de6f7dbd 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -196,10 +196,10 @@ struct KerningPair
#define IMAGE_DRAW_DISABLE ((USHORT)0x0001)
#define IMAGE_DRAW_HIGHLIGHT ((USHORT)0x0002)
#define IMAGE_DRAW_DEACTIVE ((USHORT)0x0004)
-#define IMAGE_DRAW_COLORTRANSFORM ((USHORT)0x0008)
+#define IMAGE_DRAW_COLORTRANSFORM ((USHORT)0x0008)
#define IMAGE_DRAW_SEMITRANSPARENT ((USHORT)0x0010)
-#define IMAGE_DRAW_MONOCHROME_BLACK ((USHORT)0x0020)
-#define IMAGE_DRAW_MONOCHROME_WHITE ((USHORT)0x0040)
+#define IMAGE_DRAW_MONOCHROME_BLACK ((USHORT)0x0020)
+#define IMAGE_DRAW_MONOCHROME_WHITE ((USHORT)0x0040)
#define IMAGE_DRAW_3DLOOK 0
#define IMAGE_DRAW_BTNLOOK 0
@@ -310,19 +310,19 @@ private:
ImplOutDevData* mpOutDevData;
List* mpUnoGraphicsList;
vcl::PDFWriterImpl* mpPDFWriter;
- vcl::ExtOutDevData* mpExtOutDevData;
+ vcl::ExtOutDevData* mpExtOutDevData;
// TEMP TEMP TEMP
VirtualDevice* mpAlphaVDev;
/// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffOrigX;
+ long mnOutOffOrigX;
/// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffLogicX;
+ long mnOutOffLogicX;
/// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffOrigY;
+ long mnOutOffOrigY;
/// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
- long mnOutOffLogicY;
+ long mnOutOffLogicY;
/// Output offset for device output in pixel (pseudo window offset within window system's frames)
long mnOutOffX;
/// Output offset for device output in pixel (pseudo window offset within window system's frames)
@@ -380,25 +380,25 @@ private:
mbEnableRTL:1;
public:
- SAL_DLLPRIVATE sal_Int32 ImplGetDPIX() const { return mnDPIX; }
- SAL_DLLPRIVATE sal_Int32 ImplGetDPIY() const { return mnDPIY; }
- SAL_DLLPRIVATE int ImplGetGraphics() const;
- SAL_DLLPRIVATE void ImplReleaseGraphics( BOOL bRelease = TRUE );
+ SAL_DLLPRIVATE sal_Int32 ImplGetDPIX() const { return mnDPIX; }
+ SAL_DLLPRIVATE sal_Int32 ImplGetDPIY() const { return mnDPIY; }
+ SAL_DLLPRIVATE int ImplGetGraphics() const;
+ SAL_DLLPRIVATE void ImplReleaseGraphics( BOOL bRelease = TRUE );
SAL_DLLPRIVATE BOOL ImplHasMirroredGraphics();
SAL_DLLPRIVATE void ImplReMirror( Point &rPoint ) const;
SAL_DLLPRIVATE void ImplReMirror( Rectangle &rRect ) const;
SAL_DLLPRIVATE void ImplReMirror( Region &rRegion ) const;
- SAL_DLLPRIVATE void ImplInitOutDevData();
- SAL_DLLPRIVATE void ImplDeInitOutDevData();
- SAL_DLLPRIVATE void ImplInitLineColor();
- SAL_DLLPRIVATE void ImplInitFillColor();
- SAL_DLLPRIVATE bool ImplNewFont() const;
- SAL_DLLPRIVATE void ImplInitFont() const;
- SAL_DLLPRIVATE void ImplInitTextColor();
- SAL_DLLPRIVATE void ImplInitClipRegion();
- SAL_DLLPRIVATE bool ImplSelectClipRegion( const Region&, SalGraphics* pGraphics = NULL );
- SAL_DLLPRIVATE void ImplSetClipRegion( const Region* pRegion );
- SAL_DLLPRIVATE void ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon );
+ SAL_DLLPRIVATE void ImplInitOutDevData();
+ SAL_DLLPRIVATE void ImplDeInitOutDevData();
+ SAL_DLLPRIVATE void ImplInitLineColor();
+ SAL_DLLPRIVATE void ImplInitFillColor();
+ SAL_DLLPRIVATE bool ImplNewFont() const;
+ SAL_DLLPRIVATE void ImplInitFont() const;
+ SAL_DLLPRIVATE void ImplInitTextColor();
+ SAL_DLLPRIVATE void ImplInitClipRegion();
+ SAL_DLLPRIVATE bool ImplSelectClipRegion( const Region&, SalGraphics* pGraphics = NULL );
+ SAL_DLLPRIVATE void ImplSetClipRegion( const Region* pRegion );
+ SAL_DLLPRIVATE void ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon );
SAL_DLLPRIVATE SalLayout* ImplLayout( const String&, xub_StrLen nIndex,
xub_StrLen nLen, const Point& rLogicPos = Point(0,0),
@@ -425,78 +425,78 @@ public:
SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
SAL_DLLPRIVATE void ImplDrawText( SalLayout& );
SAL_DLLPRIVATE Rectangle ImplGetTextBoundRect( const SalLayout& );
- SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
+ SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
- SAL_DLLPRIVATE void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
+ SAL_DLLPRIVATE void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
- SAL_DLLPRIVATE void ImplInitTextLineSize();
- SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
- SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
+ SAL_DLLPRIVATE void ImplInitTextLineSize();
+ SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
+ SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, BOOL bIsAbove );
SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, BOOL bIsAbove );
SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
SAL_DLLPRIVATE void ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, BOOL bUnderlineAbove );
- SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
- SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
- SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, BOOL bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
+ SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
+ SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
+ SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, BOOL bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
static
SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const XubString& rStr, USHORT nStyle, const ::vcl::ITextLayout& _rLayout );
- SAL_DLLPRIVATE void ImplInitFontList() const;
- SAL_DLLPRIVATE void ImplUpdateFontData( bool bNewFontLists );
- SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
-
- SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
- SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
- SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
- SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
- SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
- SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
- SAL_DLLPRIVATE float ImplFloatLogicWidthToDevicePixel( float ) const;
- SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float ) const;
- SAL_DLLPRIVATE float ImplFloatDevicePixelToLogicWidth( float ) const;
- SAL_DLLPRIVATE float ImplFloatDevicePixelToLogicHeight( float ) const;
- SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
- SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
- SAL_DLLPRIVATE Rectangle ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const;
+ SAL_DLLPRIVATE void ImplInitFontList() const;
+ SAL_DLLPRIVATE void ImplUpdateFontData( bool bNewFontLists );
+ SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
+
+ SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
+ SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
+ SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
+ SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
+ SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
+ SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
+ SAL_DLLPRIVATE float ImplFloatLogicWidthToDevicePixel( float ) const;
+ SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float ) const;
+ SAL_DLLPRIVATE float ImplFloatDevicePixelToLogicWidth( float ) const;
+ SAL_DLLPRIVATE float ImplFloatDevicePixelToLogicHeight( float ) const;
+ SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
+ SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
+ SAL_DLLPRIVATE Rectangle ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const;
SAL_DLLPRIVATE ::basegfx::B2DPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolygon& ) const;
SAL_DLLPRIVATE ::basegfx::B2DPolyPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolyPolygon& ) const;
- SAL_DLLPRIVATE Polygon ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const;
- SAL_DLLPRIVATE PolyPolygon ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyPoly ) const;
- SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
- SAL_DLLPRIVATE Rectangle ImplDevicePixelToLogic( const Rectangle& rLogicRect ) const;
- SAL_DLLPRIVATE Region ImplPixelToDevicePixel( const Region& rRegion ) const;
- SAL_DLLPRIVATE void ImplInvalidateViewTransform();
+ SAL_DLLPRIVATE Polygon ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const;
+ SAL_DLLPRIVATE PolyPolygon ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyPoly ) const;
+ SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
+ SAL_DLLPRIVATE Rectangle ImplDevicePixelToLogic( const Rectangle& rLogicRect ) const;
+ SAL_DLLPRIVATE Region ImplPixelToDevicePixel( const Region& rRegion ) const;
+ SAL_DLLPRIVATE void ImplInvalidateViewTransform();
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
- SAL_DLLPRIVATE void ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL );
- SAL_DLLPRIVATE void ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL );
- SAL_DLLPRIVATE void ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly );
- SAL_DLLPRIVATE void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly );
- SAL_DLLPRIVATE void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly );
+ SAL_DLLPRIVATE void ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL );
+ SAL_DLLPRIVATE void ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL );
+ SAL_DLLPRIVATE void ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly );
+ SAL_DLLPRIVATE void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly );
+ SAL_DLLPRIVATE void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly );
- SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf );
- SAL_DLLPRIVATE void ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
- SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, BOOL bMtf );
+ SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf );
+ SAL_DLLPRIVATE void ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
+ SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, BOOL bMtf );
- SAL_DLLPRIVATE void ImplDrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
- SAL_DLLPRIVATE void ImplDrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
- SAL_DLLPRIVATE void ImplDrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
- SAL_DLLPRIVATE void ImplDrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
- SAL_DLLPRIVATE void ImplDraw2ColorFrame( const Rectangle& rRect, const Color& rLeftTopColor, const Color& rRightBottomColor );
+ SAL_DLLPRIVATE void ImplDrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void ImplDrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void ImplDrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void ImplDrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+ SAL_DLLPRIVATE void ImplDraw2ColorFrame( const Rectangle& rRect, const Color& rLeftTopColor, const Color& rRightBottomColor );
- SAL_DLLPRIVATE void ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pPosAry );
- SAL_DLLPRIVATE void ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
+ SAL_DLLPRIVATE void ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pPosAry );
+ SAL_DLLPRIVATE void ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const ULONG nAction );
- SAL_DLLPRIVATE void ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
+ SAL_DLLPRIVATE void ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const BitmapEx& rBitmapEx, const ULONG nAction );
- SAL_DLLPRIVATE void ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
+ SAL_DLLPRIVATE void ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor,
const ULONG nAction );
- SAL_DLLPRIVATE void ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
+ SAL_DLLPRIVATE void ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
SAL_DLLPRIVATE Bitmap ImplBlend( Bitmap aBmp,
@@ -522,20 +522,20 @@ public:
const sal_Int32 nDstWidth,
const long* pMapX,
const long* pMapY );
- SAL_DLLPRIVATE void ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask,
+ SAL_DLLPRIVATE void ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
- SAL_DLLPRIVATE void ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
+ SAL_DLLPRIVATE void ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
- SAL_DLLPRIVATE void ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
+ SAL_DLLPRIVATE void ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
const OutputDevice& rOutDev, const Region& rRegion );
- SAL_DLLPRIVATE void ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
+ SAL_DLLPRIVATE void ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
OutputDevice& rOutDev );
- SAL_DLLPRIVATE void ImplGetFrameBitmap( const Point& rPt, const Size& rSize,
+ SAL_DLLPRIVATE void ImplGetFrameBitmap( const Point& rPt, const Size& rSize,
Bitmap& rBitmap ) const;
- SAL_DLLPRIVATE BOOL ImplIsRecordLayout() const;
+ SAL_DLLPRIVATE BOOL ImplIsRecordLayout() const;
void ImplAddDevFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
@@ -543,7 +543,7 @@ public:
SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
SAL_DLLPRIVATE static BOOL ImplIsUnderlineAbove( const Font& );
-
+
// tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
@@ -551,7 +551,7 @@ public:
// Helper which holds the old line geometry creation and is extended to use AA when
// switched on. Advantage is that line geometry is only temporarily used for paint
SAL_DLLPRIVATE void ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo);
-
+
// #i101491#
// Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
// without MetaFile processing
@@ -585,8 +585,8 @@ public:
vcl::PDFWriterImpl* GetPDFWriter() const { return mpPDFWriter; }
- void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
- vcl::ExtOutDevData* GetExtOutDevData() const { return mpExtOutDevData; }
+ void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
+ vcl::ExtOutDevData* GetExtOutDevData() const { return mpExtOutDevData; }
void DrawTextLine( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
@@ -836,7 +836,7 @@ public:
void SetClipRegion();
void SetClipRegion( const Region& rRegion );
- void SetTriangleClipRegion( const PolyPolygon &rRegion );
+ void SetTriangleClipRegion( const PolyPolygon &rRegion );
Region GetClipRegion() const;
BOOL IsClipRegion() const { return mbClipRegion; }
Region GetActiveClipRegion() const;
@@ -932,7 +932,7 @@ public:
// #i75163#
basegfx::B2DHomMatrix GetViewTransformation() const;
basegfx::B2DHomMatrix GetInverseViewTransformation() const;
-
+
basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
@@ -959,7 +959,7 @@ public:
@param rOffset
The offset in pixel
*/
- void SetPixelOffset( const Size& rOffset );
+ void SetPixelOffset( const Size& rOffset );
/** Get the offset in pixel
@@ -967,7 +967,7 @@ public:
@return the current offset in pixel
*/
- Size GetPixelOffset() const;
+ Size GetPixelOffset() const;
Point LogicToPixel( const Point& rLogicPt ) const;
Size LogicToPixel( const Size& rLogicSize ) const;
@@ -1050,13 +1050,13 @@ public:
static basegfx::B2DPolyPolygon LogicToLogic( const basegfx::B2DPolyPolygon& rPolyPoly,
const MapMode& rMapModeSource,
const MapMode& rMapModeDest );
-
+
Size GetOutputSizePixel() const
{ return Size( mnOutWidth, mnOutHeight ); }
- long GetOutputWidthPixel() const { return mnOutWidth; }
- long GetOutputHeightPixel() const { return mnOutHeight; }
- long GetOutOffXPixel() const { return mnOutOffX; }
- long GetOutOffYPixel() const { return mnOutOffY; }
+ long GetOutputWidthPixel() const { return mnOutWidth; }
+ long GetOutputHeightPixel() const { return mnOutHeight; }
+ long GetOutOffXPixel() const { return mnOutOffX; }
+ long GetOutOffYPixel() const { return mnOutOffY; }
Size GetOutputSize() const
{ return PixelToLogic( GetOutputSizePixel() ); }
@@ -1084,7 +1084,7 @@ public:
// i60594
// validate kashida positions against the current font
// returns count of invalid kashida positions
- xub_StrLen ValidateKashidas ( const String& rTxt,
+ xub_StrLen ValidateKashidas ( const String& rTxt,
xub_StrLen nIdx, xub_StrLen nLen,
xub_StrLen nKashCount, // number of suggested kashida positions (in)
const xub_StrLen* pKashidaPos, // suggested kashida positions (in)
@@ -1111,7 +1111,7 @@ public:
@return TRUE, if this device has an alpha channel.
*/
- BOOL HasAlpha();
+ BOOL HasAlpha();
/** Added return value to see if EPS could be painted directly.
Theoreticaly, handing over a matrix would be needed to handle
@@ -1190,14 +1190,14 @@ public:
BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
// Query the native control to determine if it was acted upon
- BOOL HitTestNativeControl( ControlType nType,
+ BOOL HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
const Point& aPos,
BOOL& rIsInside );
// Request rendering of a particular control and/or part
- BOOL DrawNativeControl( ControlType nType,
+ BOOL DrawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -1205,7 +1205,7 @@ public:
::rtl::OUString aCaption );
// Request rendering of a caption string for a control
- BOOL DrawNativeControlText( ControlType nType,
+ BOOL DrawNativeControlText( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -1213,7 +1213,7 @@ public:
::rtl::OUString aCaption );
// Query the native control's actual drawing region (including adornment)
- BOOL GetNativeControlRegion( ControlType nType,
+ BOOL GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx
index 2bbc4d591ce6..5555930b8f35 100644
--- a/vcl/inc/vcl/outfont.hxx
+++ b/vcl/inc/vcl/outfont.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -273,7 +273,7 @@ public:
void ImplInitAboveTextLineSize();
public: // TODO: hide members behind accessor methods
- // font instance attributes from the font request
+ // font instance attributes from the font request
long mnWidth; // Reference Width
short mnOrientation; // Rotation in 1/10 degrees
diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index 804e8c03287e..59fdc76d354b 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +41,7 @@
class Graphic;
-namespace vcl { class PDFWriter; }
+namespace vcl { class PDFWriter; }
namespace vcl
{
@@ -53,8 +53,8 @@ namespace vcl
*/
struct PDFExtOutDevBookmarkEntry
{
- sal_Int32 nLinkId;
- rtl::OUString aBookmark;
+ sal_Int32 nLinkId;
+ rtl::OUString aBookmark;
};
/*
@@ -69,19 +69,19 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
const OutputDevice& mrOutDev;
sal_Bool mbTaggedPDF;
- sal_Bool mbExportNotes;
- sal_Bool mbTransitionEffects;
- sal_Bool mbUseLosslessCompression;
- sal_Bool mbReduceImageResolution;
+ sal_Bool mbExportNotes;
+ sal_Bool mbTransitionEffects;
+ sal_Bool mbUseLosslessCompression;
+ sal_Bool mbReduceImageResolution;
sal_Bool mbExportFormFields;
sal_Bool mbExportBookmarks;
sal_Bool mbExportNDests; //i56629
sal_Int32 mnFormsFormat;
- sal_Int32 mnPage;
+ sal_Int32 mnPage;
com::sun::star::lang::Locale maDocLocale;
- PageSyncData* mpPageSyncData;
- GlobalSyncData* mpGlobalSyncData;
+ PageSyncData* mpPageSyncData;
+ GlobalSyncData* mpGlobalSyncData;
std::vector< PDFExtOutDevBookmarkEntry > maBookmarks;
@@ -98,20 +98,20 @@ public :
- sal_Bool GetIsExportNotes() const;
- void SetIsExportNotes( const sal_Bool bExportNotes );
+ sal_Bool GetIsExportNotes() const;
+ void SetIsExportNotes( const sal_Bool bExportNotes );
- sal_Bool GetIsExportTaggedPDF() const;
- void SetIsExportTaggedPDF( const sal_Bool bTaggedPDF );
+ sal_Bool GetIsExportTaggedPDF() const;
+ void SetIsExportTaggedPDF( const sal_Bool bTaggedPDF );
- sal_Bool GetIsExportTransitionEffects() const;
- void SetIsExportTransitionEffects( const sal_Bool bTransitionalEffects );
+ sal_Bool GetIsExportTransitionEffects() const;
+ void SetIsExportTransitionEffects( const sal_Bool bTransitionalEffects );
sal_Bool GetIsExportFormFields() const;
void SetIsExportFormFields( const sal_Bool bExportFormFields );
- sal_Int32 GetFormsFormat() const;
- void SetFormsFormat( const sal_Int32 nFormsFormat );
+ sal_Int32 GetFormsFormat() const;
+ void SetFormsFormat( const sal_Int32 nFormsFormat );
sal_Bool GetIsExportBookmarks() const;
void SetIsExportBookmarks( const sal_Bool bExportBookmarks );
@@ -120,14 +120,14 @@ public :
void SetIsExportNamedDestinations( const sal_Bool bExportNDests ); //i56629
// PageNumber, Compression is being set by the PDFExport
- sal_Int32 GetCurrentPageNumber() const;
- void SetCurrentPageNumber( const sal_Int32 nPage );
+ sal_Int32 GetCurrentPageNumber() const;
+ void SetCurrentPageNumber( const sal_Int32 nPage );
- sal_Bool GetIsLosslessCompression() const;
- void SetIsLosslessCompression( const sal_Bool bLosslessCompression );
+ sal_Bool GetIsLosslessCompression() const;
+ void SetIsLosslessCompression( const sal_Bool bLosslessCompression );
- sal_Bool GetIsReduceImageResolution() const;
- void SetIsReduceImageResolution( const sal_Bool bReduceImageResolution );
+ sal_Bool GetIsReduceImageResolution() const;
+ void SetIsReduceImageResolution( const sal_Bool bReduceImageResolution );
const com::sun::star::lang::Locale& GetDocumentLocale() const;
void SetDocumentLocale( const com::sun::star::lang::Locale& rLoc );
@@ -138,14 +138,14 @@ public :
Use this method to group render output.
*/
- void BeginGroup();
+ void BeginGroup();
/** End render output
This method ends grouped render output without
further actions.
*/
- void EndGroup();
+ void EndGroup();
/** End render output
@@ -170,20 +170,20 @@ public :
The visible part of the output. This might be less than
rOutputRect, e.g. for cropped graphics.
*/
- void EndGroup( const Graphic& rGraphic,
- BYTE nTransparency,
- const Rectangle& rOutputRect,
- const Rectangle& rVisibleOutputRect );
+ void EndGroup( const Graphic& rGraphic,
+ BYTE nTransparency,
+ const Rectangle& rOutputRect,
+ const Rectangle& rVisibleOutputRect );
//--->i56629
/** Create a new named destination to be used in a link to this document from another PDF document
(see PDF spec 1.4, 8.2.1)
-
+
@parm sDestName
the name this destination will be addressed with from others PDF document
@param rRect
target rectangle on page to be displayed if dest is jumped to
-
+
@param nPageNr
number of page the dest is on (as returned by NewPage)
or -1 in which case the current page is used
@@ -202,7 +202,7 @@ public :
@param rRect
target rectangle on page to be displayed if dest is jumped to
-
+
@param nPageNr
number of page the dest is on (as returned by NewPage)
or -1 in which case the current page is used
@@ -248,14 +248,14 @@ public :
<p>will change a dest type link to an URL type link if necessary</p>
@param nLinkId
the link to be changed
-
+
@param rURL
the URL the link shall point to.
there will be no error checking or any kind of
conversion done to this parameter execept this:
it will be output as 7bit Ascii. The URL
will appear literally in the PDF file produced
-
+
@returns
0 for success
-1 in case the link id does not exist
@@ -307,7 +307,7 @@ public :
-1 if the item does not exist
*/
sal_Int32 SetOutlineItemText( sal_Int32 nItem, const rtl::OUString& rText );
-
+
/** Set an outline item's destination
@param nItem
@@ -374,7 +374,7 @@ public :
*/
sal_Int32 BeginStructureElement( PDFWriter::StructElement eType, const rtl::OUString& rAlias = rtl::OUString() );
/** end a logical structure element
-
+
@see BeginStructureElement
*/
void EndStructureElement();
@@ -399,14 +399,14 @@ public :
*/
bool SetCurrentStructureElement( sal_Int32 nElement );
/** get the current structure element id
-
+
@returns
the id of the current structure element
*/
sal_Int32 GetCurrentStructureElement();
/** set a structure attribute on the current structural element
-
+
SetStructureAttribute sets an attribute of the current structural element to a
new value. A consistency check is performed before actually setting the value;
if the check fails, the function returns <FALSE/> and the attribute remains
@@ -424,7 +424,7 @@ public :
*/
bool SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal );
/** set a structure attribute on the current structural element
-
+
SetStructureAttributeNumerical sets an attribute of the current structural element
to a new numerical value. A consistency check is performed before actually setting
the value; if the check fails, the function returns <FALSE/> and the attribute
diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index 4ea221e5ff54..c5d4dd136cfe 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +64,18 @@ namespace vcl
struct PDFDocInfo
{
- String Title; // document title
- String Author; // document author
- String Subject; // subject
- String Keywords; // keywords
- String Creator; // application that created the original document
- String Producer; // OpenOffice
+ String Title; // document title
+ String Author; // document author
+ String Subject; // subject
+ String Keywords; // keywords
+ String Creator; // application that created the original document
+ String Producer; // OpenOffice
};
struct PDFNote
{
- String Title; // optional title for the popup containing the note
- String Contents; // contents of the note
+ String Title; // optional title for the popup containing the note
+ String Contents; // contents of the note
};
class VCL_DLLPUBLIC PDFOutputStream
@@ -231,21 +231,21 @@ public:
struct VCL_DLLPUBLIC AnyWidget
{
protected:
- WidgetType Type; // primitive RTTI
+ WidgetType Type; // primitive RTTI
public:
- rtl::OUString Name; // a distinct name to identify the control
- rtl::OUString Description;// descriptive text for the contro (e.g. for tool tip)
- rtl::OUString Text; // user text to appear on the control
- USHORT TextStyle; // style flags
- bool ReadOnly;
- Rectangle Location; // describes the area filled by the control
- bool Border; // true: widget should have a border, false: no border
- Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings
- bool Background; // true: widget shall draw its background, false: no background
- Color BackgroundColor; // COL_TRANSPARENT and Background=true means get color from application settings
- Font TextFont; // an empty font will be replaced by the
+ rtl::OUString Name; // a distinct name to identify the control
+ rtl::OUString Description;// descriptive text for the contro (e.g. for tool tip)
+ rtl::OUString Text; // user text to appear on the control
+ USHORT TextStyle; // style flags
+ bool ReadOnly;
+ Rectangle Location; // describes the area filled by the control
+ bool Border; // true: widget should have a border, false: no border
+ Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings
+ bool Background; // true: widget shall draw its background, false: no background
+ Color BackgroundColor; // COL_TRANSPARENT and Background=true means get color from application settings
+ Font TextFont; // an empty font will be replaced by the
// appropriate font from the user settings
- Color TextColor; // COL_TRANSPARENT will be replaced by the appropriate color from application settings
+ Color TextColor; // COL_TRANSPARENT will be replaced by the appropriate color from application settings
sal_Int32 TabOrder; // lowest number is first in tab order
/* style flags for text are those for OutputDevice::DrawText
@@ -328,7 +328,7 @@ public:
will appear literally in the PDF file produced
*/
sal_Int32 Dest;
- rtl::OUString URL;
+ rtl::OUString URL;
bool Submit;
bool SubmitGet;
@@ -345,8 +345,8 @@ public:
struct CheckBoxWidget : public AnyWidget
{
- bool Checked;
- bool ButtonIsLeft;
+ bool Checked;
+ bool ButtonIsLeft;
CheckBoxWidget()
: AnyWidget( vcl::PDFWriter::CheckBox ),
@@ -362,9 +362,9 @@ public:
struct RadioButtonWidget : public AnyWidget
{
- bool Selected;
- sal_Int32 RadioGroup;
- bool ButtonIsLeft;
+ bool Selected;
+ sal_Int32 RadioGroup;
+ bool ButtonIsLeft;
rtl::OUString OnValue; // the value of the radio button if it is selected
RadioButtonWidget()
@@ -390,10 +390,10 @@ public:
struct EditWidget : public AnyWidget
{
- bool MultiLine; // whether multiple lines are allowed
- bool Password; // visible echo off
- bool FileSelect; // field is a file selector
- sal_Int32 MaxLen; // maximum field length in characters, 0 means unlimited
+ bool MultiLine; // whether multiple lines are allowed
+ bool Password; // visible echo off
+ bool FileSelect; // field is a file selector
+ sal_Int32 MaxLen; // maximum field length in characters, 0 means unlimited
EditWidget()
: AnyWidget( vcl::PDFWriter::Edit ),
@@ -411,10 +411,10 @@ public:
struct ListBoxWidget : public AnyWidget
{
- bool DropDown;
- bool Sort;
- bool MultiSelect;
- std::vector<rtl::OUString> Entries;
+ bool DropDown;
+ bool Sort;
+ bool MultiSelect;
+ std::vector<rtl::OUString> Entries;
std::vector<sal_Int32> SelectedEntries;
// if MultiSelect is false only the first entry of SelectedEntries
// will be taken into account. the same is implicit for PDF < 1.4
@@ -436,8 +436,8 @@ public:
// note: PDF only supports dropdown comboboxes
struct ComboBoxWidget : public AnyWidget
{
- bool Sort;
- std::vector<rtl::OUString> Entries;
+ bool Sort;
+ std::vector<rtl::OUString> Entries;
// set the current value in AnyWidget::Text
ComboBoxWidget()
@@ -493,7 +493,7 @@ The following structure describes the permissions used in PDF security
struct PDFSecPermissions
{
//for both 40 and 128 bit security, see 3.5.2 PDF v 1.4 table 3.15, v 1.5 and v 1.6 table 3.20.
- bool CanPrintTheDocument;
+ bool CanPrintTheDocument;
bool CanModifyTheContent;
bool CanCopyOrExtract;
bool CanAddOrModify;
@@ -504,23 +504,23 @@ The following structure describes the permissions used in PDF security
bool CanPrintFull;
//permission default set for 128 bit, accessibility only
PDFSecPermissions() :
- CanPrintTheDocument ( false ),
- CanModifyTheContent ( false ),
- CanCopyOrExtract ( false ),
- CanAddOrModify ( false ),
- CanFillInteractive ( false ),
- CanExtractForAccessibility ( true ),
- CanAssemble ( false ),
- CanPrintFull ( false )
+ CanPrintTheDocument ( false ),
+ CanModifyTheContent ( false ),
+ CanCopyOrExtract ( false ),
+ CanAddOrModify ( false ),
+ CanFillInteractive ( false ),
+ CanExtractForAccessibility ( true ),
+ CanAssemble ( false ),
+ CanPrintFull ( false )
{}
};
struct PDFWriterContext
{
/* must be a valid file: URL usable by osl */
- rtl::OUString URL;
+ rtl::OUString URL;
/* the URL of the document being exported, used for relative links*/
- rtl::OUString BaseURL;
+ rtl::OUString BaseURL;
/*if relative to file system should be formed*/
bool RelFsys;//i56629, i49415?, i64585?
/*the action to set the PDF hyperlink to*/
@@ -532,17 +532,17 @@ The following structure describes the permissions used in PDF security
bool ForcePDFAction;
/* decides the PDF language level to be produced */
- PDFVersion Version;
+ PDFVersion Version;
/* valid for PDF >= 1.4
causes the MarkInfo entry in the document catalog to be set
*/
- bool Tagged;
+ bool Tagged;
/* forces the embedding of PDF standard fonts */
bool EmbedStandardFonts;
/* determines in which format a form
will be submitted.
*/
- PDFWriter::ExportDataFormat SubmitFormat;
+ PDFWriter::ExportDataFormat SubmitFormat;
bool AllowDuplicateFieldNames;
bool FieldsUseSystemFonts;
/* the following data members are used to customize the PDF viewer
@@ -571,12 +571,12 @@ The following structure describes the permissions used in PDF security
sal_Int32 InitialPage;
sal_Int32 OpenBookmarkLevels; // -1 means all levels
- struct PDFSecPermissions AccessPermissions;
+ struct PDFSecPermissions AccessPermissions;
- bool Encrypt; // main encryption flag, must be true to encript
- bool Security128bit; // true to select 128 bit encryption, false for 40 bit
- rtl::OUString OwnerPassword; // owner password for PDF, in clear text
- rtl::OUString UserPassword; // user password for PDF, in clear text
+ bool Encrypt; // main encryption flag, must be true to encript
+ bool Security128bit; // true to select 128 bit encryption, false for 40 bit
+ rtl::OUString OwnerPassword; // owner password for PDF, in clear text
+ rtl::OUString UserPassword; // user password for PDF, in clear text
com::sun::star::lang::Locale DocumentLocale; // defines the document default language
@@ -667,8 +667,8 @@ The following structure describes the permissions used in PDF security
/* functions for graphics state */
/* flag values: see vcl/outdev.hxx */
- void Push( USHORT nFlags = 0xffff );
- void Pop();
+ void Push( USHORT nFlags = 0xffff );
+ void Pop();
void SetClipRegion();
void SetClipRegion( const basegfx::B2DPolyPolygon& rRegion );
@@ -703,81 +703,81 @@ The following structure describes the permissions used in PDF security
/* actual drawing functions */
- void DrawText( const Point& rPos, const String& rText );
+ void DrawText( const Point& rPos, const String& rText );
- void DrawTextLine( const Point& rPos, long nWidth,
+ void DrawTextLine( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
BOOL bUnderlineAbove = FALSE );
- void DrawTextArray( const Point& rStartPt, const XubString& rStr,
+ void DrawTextArray( const Point& rStartPt, const XubString& rStr,
const sal_Int32* pDXAry = NULL,
xub_StrLen nIndex = 0,
xub_StrLen nLen = STRING_LEN );
- void DrawStretchText( const Point& rStartPt, ULONG nWidth,
+ void DrawStretchText( const Point& rStartPt, ULONG nWidth,
const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN );
- void DrawText( const Rectangle& rRect,
+ void DrawText( const Rectangle& rRect,
const XubString& rStr, USHORT nStyle = 0 );
- void DrawPixel( const Point& rPt, const Color& rColor );
- void DrawPixel( const Point& rPt )
+ void DrawPixel( const Point& rPt, const Color& rColor );
+ void DrawPixel( const Point& rPt )
{ DrawPixel( rPt, Color( COL_TRANSPARENT ) ); }
- void DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
- void DrawPixel( const Polygon& rPts, const Color& rColor )
+ void DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
+ void DrawPixel( const Polygon& rPts, const Color& rColor )
{ Push(); SetLineColor( rColor ); DrawPixel( rPts ); Pop(); }
- void DrawLine( const Point& rStartPt, const Point& rEndPt );
- void DrawLine( const Point& rStartPt, const Point& rEndPt,
+ void DrawLine( const Point& rStartPt, const Point& rEndPt );
+ void DrawLine( const Point& rStartPt, const Point& rEndPt,
const LineInfo& rLineInfo );
- void DrawPolyLine( const Polygon& rPoly );
- void DrawPolyLine( const Polygon& rPoly,
+ void DrawPolyLine( const Polygon& rPoly );
+ void DrawPolyLine( const Polygon& rPoly,
const LineInfo& rLineInfo );
void DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo );
- void DrawPolygon( const Polygon& rPoly );
- void DrawPolyPolygon( const PolyPolygon& rPolyPoly );
- void DrawRect( const Rectangle& rRect );
- void DrawRect( const Rectangle& rRect,
+ void DrawPolygon( const Polygon& rPoly );
+ void DrawPolyPolygon( const PolyPolygon& rPolyPoly );
+ void DrawRect( const Rectangle& rRect );
+ void DrawRect( const Rectangle& rRect,
ULONG nHorzRount, ULONG nVertRound );
- void DrawEllipse( const Rectangle& rRect );
- void DrawArc( const Rectangle& rRect,
+ void DrawEllipse( const Rectangle& rRect );
+ void DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
- void DrawPie( const Rectangle& rRect,
+ void DrawPie( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
- void DrawChord( const Rectangle& rRect,
+ void DrawChord( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
- void DrawBitmap( const Point& rDestPt,
+ void DrawBitmap( const Point& rDestPt,
const Bitmap& rBitmap );
- void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
+ void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Bitmap& rBitmap );
- void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
+ void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap );
- void DrawBitmapEx( const Point& rDestPt,
+ void DrawBitmapEx( const Point& rDestPt,
const BitmapEx& rBitmapEx );
- void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
+ void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const BitmapEx& rBitmapEx );
- void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
+ void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const BitmapEx& rBitmapEx );
- void DrawMask( const Point& rDestPt,
+ void DrawMask( const Point& rDestPt,
const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawMask( const Point& rDestPt, const Size& rDestSize,
+ void DrawMask( const Point& rDestPt, const Size& rDestSize,
const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawMask( const Point& rDestPt, const Size& rDestSize,
+ void DrawMask( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
- void DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
+ void DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
+ void DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
- void DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
+ void DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
- void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
- void DrawTransparent( const PolyPolygon& rPolyPoly,
+ void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
+ void DrawTransparent( const PolyPolygon& rPolyPoly,
USHORT nTransparencePercent );
/** Start a transparency group
@@ -798,7 +798,7 @@ The following structure describes the permissions used in PDF security
will be ignored if the produced PDF has a lower version. The drawing
operations will be emitted normally.
*/
- void BeginTransparencyGroup();
+ void BeginTransparencyGroup();
/** End a transparency group with constant transparency factor
@@ -811,7 +811,7 @@ The following structure describes the permissions used in PDF security
@param nTransparencePercent
The transparency factor
*/
- void EndTransparencyGroup( const Rectangle& rBoundRect, USHORT nTransparencePercent );
+ void EndTransparencyGroup( const Rectangle& rBoundRect, USHORT nTransparencePercent );
/** End a transparency group with an alpha mask
@@ -824,7 +824,7 @@ The following structure describes the permissions used in PDF security
@param rAlphaMask
The transparency mask; must be an 8 bit grayscale image
*/
- void EndTransparencyGroup( const Rectangle& rBoundRect, const Bitmap& rAlphaMask );
+ void EndTransparencyGroup( const Rectangle& rBoundRect, const Bitmap& rAlphaMask );
/** Insert a JPG encoded image (optionally with mask)
@@ -845,7 +845,7 @@ The following structure describes the permissions used in PDF security
the same pixel size as the image and
be either 1 bit black&white or 8 bit grey
*/
- void DrawJPGBitmap( SvStream& rJPGData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask );
+ void DrawJPGBitmap( SvStream& rJPGData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask );
/** Create a new named destination to be used in a link from another PDF document
@@ -866,7 +866,7 @@ The following structure describes the permissions used in PDF security
the destination id (to be used in SetLinkDest) or
-1 if page id does not exist
*/
- sal_Int32 CreateNamedDest( const rtl::OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr = -1, DestAreaType eType = XYZ );
+ sal_Int32 CreateNamedDest( const rtl::OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr = -1, DestAreaType eType = XYZ );
/** Create a new destination to be used in a link
@param rRect
@@ -883,7 +883,7 @@ The following structure describes the permissions used in PDF security
the destination id (to be used in SetLinkDest) or
-1 if page id does not exist
*/
- sal_Int32 CreateDest( const Rectangle& rRect, sal_Int32 nPageNr = -1, DestAreaType eType = XYZ );
+ sal_Int32 CreateDest( const Rectangle& rRect, sal_Int32 nPageNr = -1, DestAreaType eType = XYZ );
/** Create a new link on a page
@param rRect
@@ -898,7 +898,7 @@ The following structure describes the permissions used in PDF security
the link id (to be used in SetLinkDest, SetLinkURL) or
-1 if page id does not exist
*/
- sal_Int32 CreateLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 );
+ sal_Int32 CreateLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 );
/** Set the destination for a link
<p>will change a URL type link to a dest link if necessary</p>
@@ -912,7 +912,7 @@ The following structure describes the permissions used in PDF security
-1 in case the link id does not exist
-2 in case the dest id does not exist
*/
- sal_Int32 SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
+ sal_Int32 SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
/** Set the URL for a link
<p>will change a dest type link to an URL type link if necessary</p>
@param nLinkId
@@ -927,7 +927,7 @@ The following structure describes the permissions used in PDF security
0 for success
-1 in case the link id does not exist
*/
- sal_Int32 SetLinkURL( sal_Int32 nLinkId, const rtl::OUString& rURL );
+ sal_Int32 SetLinkURL( sal_Int32 nLinkId, const rtl::OUString& rURL );
/** Resolve link in logical structure
<p>
If a link is created after the corresponding visual appearance was drawn
@@ -957,7 +957,7 @@ The following structure describes the permissions used in PDF security
the arbitrary id set in a <code>Link</code> structure element to address
the link with real id <code>nLinkId</code>
*/
- void SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyID );
+ void SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyID );
/** Create a new outline item
@param nParent
diff --git a/vcl/inc/vcl/pngread.hxx b/vcl/inc/vcl/pngread.hxx
index 64385f604537..c22ee413233b 100644
--- a/vcl/inc/vcl/pngread.hxx
+++ b/vcl/inc/vcl/pngread.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace vcl
class VCL_DLLPUBLIC PNGReader
{
- PNGReaderImpl* mpImpl;
+ PNGReaderImpl* mpImpl;
public:
@@ -54,15 +54,15 @@ namespace vcl
/* an empty preview size hint (=default) will read the whole image
*/
- BitmapEx Read( const Size& i_rPreviewHint = Size() );
+ BitmapEx Read( const Size& i_rPreviewHint = Size() );
// retrieve every chunk that resides inside the PNG
struct ChunkData
{
- sal_uInt32 nType;
- std::vector< sal_uInt8 > aData;
+ sal_uInt32 nType;
+ std::vector< sal_uInt8 > aData;
};
- const std::vector< ChunkData >& GetChunks() const;
+ const std::vector< ChunkData >& GetChunks() const;
void SetIgnoreGammaChunk( sal_Bool b );
};
diff --git a/vcl/inc/vcl/pngwrite.hxx b/vcl/inc/vcl/pngwrite.hxx
index 15c8c624a5ff..6894c651f047 100644
--- a/vcl/inc/vcl/pngwrite.hxx
+++ b/vcl/inc/vcl/pngwrite.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +45,7 @@ namespace vcl
class VCL_DLLPUBLIC PNGWriter
{
- PNGWriterImpl* mpImpl;
+ PNGWriterImpl* mpImpl;
public:
@@ -58,8 +58,8 @@ namespace vcl
// additional method to be able to modify all chunk before they are stored
struct ChunkData
{
- sal_uInt32 nType;
- std::vector< sal_uInt8 > aData;
+ sal_uInt32 nType;
+ std::vector< sal_uInt8 > aData;
};
std::vector< vcl::PNGWriter::ChunkData >& GetChunks();
};
diff --git a/vcl/inc/vcl/pointr.hxx b/vcl/inc/vcl/pointr.hxx
index f003300b1f56..642e3c9c5cb1 100644
--- a/vcl/inc/vcl/pointr.hxx
+++ b/vcl/inc/vcl/pointr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +41,7 @@ class Point;
class VCL_DLLPUBLIC Pointer
{
- PointerStyle meStyle;
+ PointerStyle meStyle;
public:
Pointer()
@@ -49,11 +49,11 @@ public:
Pointer( PointerStyle eStyle )
{ meStyle = eStyle; }
- PointerStyle GetStyle() const { return meStyle; }
+ PointerStyle GetStyle() const { return meStyle; }
- BOOL operator==( const Pointer& rPointer ) const
+ BOOL operator==( const Pointer& rPointer ) const
{ return (meStyle == rPointer.meStyle); }
- BOOL operator!=( const Pointer& rPointer ) const
+ BOOL operator!=( const Pointer& rPointer ) const
{ return !(Pointer::operator==( rPointer )); }
};
diff --git a/vcl/inc/vcl/polyscan.hxx b/vcl/inc/vcl/polyscan.hxx
index a8d9b6a31b5a..83859edec270 100644
--- a/vcl/inc/vcl/polyscan.hxx
+++ b/vcl/inc/vcl/polyscan.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +37,14 @@
struct ScanlinePoint
{
- long mnX;
- ScanlinePoint* mpNext;
+ long mnX;
+ ScanlinePoint* mpNext;
ScanlinePoint() : mnX( 0L ), mpNext( NULL ) {};
ScanlinePoint( long nX, ScanlinePoint* pNext ) : mnX( nX ), mpNext( pNext ) {};
~ScanlinePoint() {};
- void Set( long nX, ScanlinePoint* pNext ) { mnX = nX, mpNext = pNext; }
+ void Set( long nX, ScanlinePoint* pNext ) { mnX = nX, mpNext = pNext; }
};
// -------------------
@@ -53,11 +53,11 @@ struct ScanlinePoint
struct PolyScanSegment
{
- long mnStart;
- long mnEnd;
-
+ long mnStart;
+ long mnEnd;
+
PolyScanSegment() : mnStart( 0L ), mnEnd( 0L ) {};
- PolyScanSegment( long nStart, long nEnd ) : mnStart( nStart ), mnEnd( nEnd ) {};
+ PolyScanSegment( long nStart, long nEnd ) : mnStart( nStart ), mnEnd( nEnd ) {};
~PolyScanSegment() {};
};
@@ -65,36 +65,36 @@ struct PolyScanSegment
// - PolyScanline -
// ----------------
-struct ScanlinePoint;
-class Polygon;
-class PolyPolygon;
+struct ScanlinePoint;
+class Polygon;
+class PolyPolygon;
class PolyScanline
{
private:
- ScanlinePoint* mpFirst;
- ScanlinePoint* mpLast;
- ScanlinePoint* mpAct;
- long mnLeft;
- long mnRight;
-
- void ImplDelete();
-
+ ScanlinePoint* mpFirst;
+ ScanlinePoint* mpLast;
+ ScanlinePoint* mpAct;
+ long mnLeft;
+ long mnRight;
+
+ void ImplDelete();
+
public:
-
+
PolyScanline();
~PolyScanline();
-
- void Insert( long nX );
- void Set( long nStart, long nEnd );
- void Set( const PolyScanSegment& rSegment ) { Set( rSegment.mnStart, rSegment.mnEnd ); }
-
- inline BOOL GetFirstX( long& rX );
- inline BOOL GetNextX( long& rX );
-
- BOOL GetFirstSegment( PolyScanSegment& rSegment );
- BOOL GetNextSegment( PolyScanSegment& rSegment );
+
+ void Insert( long nX );
+ void Set( long nStart, long nEnd );
+ void Set( const PolyScanSegment& rSegment ) { Set( rSegment.mnStart, rSegment.mnEnd ); }
+
+ inline BOOL GetFirstX( long& rX );
+ inline BOOL GetNextX( long& rX );
+
+ BOOL GetFirstSegment( PolyScanSegment& rSegment );
+ BOOL GetNextSegment( PolyScanSegment& rSegment );
};
// ------------------------------------------------------------------------
@@ -119,18 +119,18 @@ inline BOOL PolyScanline::GetNextX( long& rX )
class PolyScanner
{
private:
-
- PolyScanline* mpArray;
- long mnLeft;
- long mnTop;
- long mnRight;
- long mnBottom;
+
+ PolyScanline* mpArray;
+ long mnLeft;
+ long mnTop;
+ long mnRight;
+ long mnBottom;
PolyScanner() {};
protected:
- void InsertLine( const Point& rStart, const Point& rEnd );
+ void InsertLine( const Point& rStart, const Point& rEnd );
public:
@@ -139,18 +139,18 @@ public:
PolyScanner( const PolyPolygon& rPolyPoly );
~PolyScanner();
- long Left() const { return mnLeft; }
- long Top() const { return mnTop; }
- long Right() const { return mnRight; }
- long Bottom() const { return mnBottom; }
+ long Left() const { return mnLeft; }
+ long Top() const { return mnTop; }
+ long Right() const { return mnRight; }
+ long Bottom() const { return mnBottom; }
- long Width() const { return( mnRight - mnLeft + 1L ); }
- long Height() const { return( mnBottom - mnTop + 1L ); }
+ long Width() const { return( mnRight - mnLeft + 1L ); }
+ long Height() const { return( mnBottom - mnTop + 1L ); }
- Rectangle GetBoundRect() const { return Rectangle( mnLeft, mnTop, mnRight, mnBottom ); }
+ Rectangle GetBoundRect() const { return Rectangle( mnLeft, mnTop, mnRight, mnBottom ); }
- ULONG Count() const { return Height(); }
- PolyScanline* operator[]( ULONG nPos ) const;
+ ULONG Count() const { return Height(); }
+ PolyScanline* operator[]( ULONG nPos ) const;
};
#endif // _SV_POLYSCAN_HXX
diff --git a/vcl/inc/vcl/popupmenuwindow.hxx b/vcl/inc/vcl/popupmenuwindow.hxx
index 9759ab42fb73..59cdad454a43 100644
--- a/vcl/inc/vcl/popupmenuwindow.hxx
+++ b/vcl/inc/vcl/popupmenuwindow.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index e306bf2dd61d..047b0677eca2 100644
--- a/vcl/inc/vcl/ppdparser.hxx
+++ b/vcl/inc/vcl/ppdparser.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,22 +66,22 @@ class PPDKey
typedef ::std::hash_map< ::rtl::OUString, PPDValue, ::rtl::OUStringHash > hash_type;
typedef ::std::vector< PPDValue* > value_type;
- String m_aKey;
- hash_type m_aValues;
- value_type m_aOrderedValues;
- const PPDValue* m_pDefaultValue;
- bool m_bQueryValue;
- PPDValue m_aQueryValue;
+ String m_aKey;
+ hash_type m_aValues;
+ value_type m_aOrderedValues;
+ const PPDValue* m_pDefaultValue;
+ bool m_bQueryValue;
+ PPDValue m_aQueryValue;
public:
enum UIType { PickOne, PickMany, Boolean };
enum SetupType { ExitServer, Prolog, DocumentSetup, PageSetup, JCLSetup, AnySetup };
private:
- bool m_bUIOption;
- UIType m_eUIType;
- int m_nOrderDependency;
- SetupType m_eSetupType;
+ bool m_bUIOption;
+ UIType m_eUIType;
+ int m_nOrderDependency;
+ SetupType m_eSetupType;
void eraseValue( const String& rOption );
public:
@@ -146,42 +146,42 @@ private:
static ::std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >*
pAllPPDFiles;
- hash_type m_aKeys;
- value_type m_aOrderedKeys;
- ::std::list< PPDConstraint > m_aConstraints;
+ hash_type m_aKeys;
+ value_type m_aOrderedKeys;
+ ::std::list< PPDConstraint > m_aConstraints;
// some identifying fields
- String m_aPrinterName;
- String m_aNickName;
+ String m_aPrinterName;
+ String m_aNickName;
// the full path of the PPD file
- String m_aFile;
+ String m_aFile;
// some basic attributes
- bool m_bColorDevice;
- bool m_bType42Capable;
- ULONG m_nLanguageLevel;
+ bool m_bColorDevice;
+ bool m_bType42Capable;
+ ULONG m_nLanguageLevel;
rtl_TextEncoding m_aFileEncoding;
// shortcuts to important keys and their default values
// imageable area
- const PPDValue* m_pDefaultImageableArea;
- const PPDKey* m_pImageableAreas;
+ const PPDValue* m_pDefaultImageableArea;
+ const PPDKey* m_pImageableAreas;
// paper dimensions
- const PPDValue* m_pDefaultPaperDimension;
- const PPDKey* m_pPaperDimensions;
+ const PPDValue* m_pDefaultPaperDimension;
+ const PPDKey* m_pPaperDimensions;
// paper trays
- const PPDValue* m_pDefaultInputSlot;
- const PPDKey* m_pInputSlots;
+ const PPDValue* m_pDefaultInputSlot;
+ const PPDKey* m_pInputSlots;
// resolutions
- const PPDValue* m_pDefaultResolution;
- const PPDKey* m_pResolutions;
+ const PPDValue* m_pDefaultResolution;
+ const PPDKey* m_pResolutions;
// duplex commands
- const PPDValue* m_pDefaultDuplexType;
- const PPDKey* m_pDuplexTypes;
+ const PPDValue* m_pDefaultDuplexType;
+ const PPDKey* m_pDuplexTypes;
// fonts
- const PPDKey* m_pFontList;
-
+ const PPDKey* m_pFontList;
+
// translations
PPDTranslator* m_pTranslator;
@@ -192,7 +192,7 @@ private:
void parseOpenUI( const ByteString& rLine );
void parseConstraint( const ByteString& rLine );
void parse( std::list< ByteString >& rLines );
-
+
String handleTranslation( const ByteString& i_rString, bool i_bIsGlobalized );
static void scanPPDDir( const String& rDir );
@@ -237,15 +237,15 @@ public:
// match the best paper for width and height
String matchPaper( int nWidth, int nHeight ) const;
-
+
bool getMargins( const String& rPaperName,
int &rLeft, int& rRight,
int &rUpper, int& rLower ) const;
// values in pt
// returns true if paper found
-
+
// values int pt
-
+
String getDefaultInputSlot() const;
int getInputSlots() const
{ return m_pInputSlots ? m_pInputSlots->countValues() : 0; }
@@ -277,8 +277,8 @@ public:
String& rEncoding,
String& rCharset ) const;
String getFont( int ) const;
-
-
+
+
rtl::OUString translateKey( const rtl::OUString& i_rKey,
const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const;
rtl::OUString translateOption( const rtl::OUString& i_rKey,
diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h
index 5928cd6649a5..57c4bf074395 100644
--- a/vcl/inc/vcl/print.h
+++ b/vcl/inc/vcl/print.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +48,8 @@ namespace vcl
struct ImplPrnQueueData
{
- QueueInfo* mpQueueInfo;
- SalPrinterQueueInfo* mpSalQueueInfo;
+ QueueInfo* mpQueueInfo;
+ SalPrinterQueueInfo* mpSalQueueInfo;
};
// --------------------
@@ -67,7 +67,7 @@ public:
ImplPrnQueueList() {}
~ImplPrnQueueList();
- void Add( SalPrinterQueueInfo* pData );
+ void Add( SalPrinterQueueInfo* pData );
ImplPrnQueueData* Get( const rtl::OUString& rPrinter );
};
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index 85f41d564686..db41a166dcd2 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace vcl {
// - Printer-Types -
// -----------------
-#define PAGEQUEUE_ALLPAGES 0xFFFF
+#define PAGEQUEUE_ALLPAGES 0xFFFF
enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
SUPPORT_SET_PAPERSIZE, SUPPORT_SET_PAPER,
@@ -106,29 +106,29 @@ class VCL_DLLPUBLIC QueueInfo
friend class Printer;
private:
- XubString maPrinterName;
- XubString maDriver;
- XubString maLocation;
- XubString maComment;
- sal_uInt32 mnStatus;
- sal_uInt32 mnJobs;
+ XubString maPrinterName;
+ XubString maDriver;
+ XubString maLocation;
+ XubString maComment;
+ sal_uInt32 mnStatus;
+ sal_uInt32 mnJobs;
public:
QueueInfo();
QueueInfo( const QueueInfo& rInfo );
~QueueInfo();
- const XubString& GetPrinterName() const { return maPrinterName; }
- const XubString& GetDriver() const { return maDriver; }
- const XubString& GetLocation() const { return maLocation; }
- const XubString& GetComment() const { return maComment; }
- sal_uInt32 GetStatus() const { return mnStatus; }
- sal_uInt32 GetJobs() const { return mnJobs; }
+ const XubString& GetPrinterName() const { return maPrinterName; }
+ const XubString& GetDriver() const { return maDriver; }
+ const XubString& GetLocation() const { return maLocation; }
+ const XubString& GetComment() const { return maComment; }
+ sal_uInt32 GetStatus() const { return mnStatus; }
+ sal_uInt32 GetJobs() const { return mnJobs; }
bool operator==( const QueueInfo& rInfo ) const;
- friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, QueueInfo& rInfo );
- friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const QueueInfo& rInfo );
+ friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, QueueInfo& rInfo );
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const QueueInfo& rInfo );
};
// ------------------
@@ -136,7 +136,7 @@ public:
// ------------------
enum PrinterTransparencyMode
-{
+{
PRINTER_TRANSPARENCY_AUTO = 0,
PRINTER_TRANSPARENCY_NONE = 1
};
@@ -144,7 +144,7 @@ enum PrinterTransparencyMode
// -----------------------------------------------------------------------------
enum PrinterGradientMode
-{
+{
PRINTER_GRADIENT_STRIPES = 0,
PRINTER_GRADIENT_COLOR = 1
};
@@ -152,7 +152,7 @@ enum PrinterGradientMode
// -----------------------------------------------------------------------------
enum PrinterBitmapMode
-{
+{
PRINTER_BITMAP_OPTIMAL = 0,
PRINTER_BITMAP_NORMAL = 1,
PRINTER_BITMAP_RESOLUTION = 2
@@ -176,31 +176,31 @@ private:
BOOL mbConvertToGreyscales;
public:
-
+
PrinterOptions();
~PrinterOptions();
BOOL IsReduceTransparency() const { return mbReduceTransparency; }
void SetReduceTransparency( BOOL bSet ) { mbReduceTransparency = bSet; }
-
+
PrinterTransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; }
void SetReducedTransparencyMode( PrinterTransparencyMode eMode ) { meReducedTransparencyMode = eMode; }
-
+
BOOL IsReduceGradients() const { return mbReduceGradients; }
void SetReduceGradients( BOOL bSet ) { mbReduceGradients = bSet; }
-
+
PrinterGradientMode GetReducedGradientMode() const { return meReducedGradientsMode; }
void SetReducedGradientMode( PrinterGradientMode eMode ) { meReducedGradientsMode = eMode; }
USHORT GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
void SetReducedGradientStepCount( USHORT nStepCount ) { mnReducedGradientStepCount = nStepCount; }
-
+
BOOL IsReduceBitmaps() const { return mbReduceBitmaps; }
void SetReduceBitmaps( BOOL bSet ) { mbReduceBitmaps = bSet; }
-
+
PrinterBitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; }
void SetReducedBitmapMode( PrinterBitmapMode eMode ) { meReducedBitmapMode = eMode; }
-
+
USHORT GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
void SetReducedBitmapResolution( USHORT nResolution ) { mnReducedBitmapResolution = nResolution; }
@@ -221,53 +221,53 @@ class VCL_DLLPUBLIC Printer : public OutputDevice
friend class ImplQPrinter;
private:
- SalInfoPrinter* mpInfoPrinter;
- SalPrinter* mpPrinter;
- SalGraphics* mpJobGraphics;
- Printer* mpPrev;
- Printer* mpNext;
- VirtualDevice* mpDisplayDev;
+ SalInfoPrinter* mpInfoPrinter;
+ SalPrinter* mpPrinter;
+ SalGraphics* mpJobGraphics;
+ Printer* mpPrev;
+ Printer* mpNext;
+ VirtualDevice* mpDisplayDev;
PrinterOptions* mpPrinterOptions;
- XubString maPrinterName;
- XubString maDriver;
- XubString maPrintFile;
- XubString maJobName;
- JobSetup maJobSetup;
- Point maPageOffset;
- Size maPaperSize;
- ULONG mnError;
- USHORT mnCurPage;
- USHORT mnCurPrintPage;
- USHORT mnPageQueueSize;
- USHORT mnCopyCount;
- BOOL mbDefPrinter;
- BOOL mbPrinting;
- BOOL mbJobActive;
- BOOL mbCollateCopy;
- BOOL mbPrintFile;
- BOOL mbInPrintPage;
- BOOL mbNewJobSetup;
- BOOL mbIsQueuePrinter;
- BOOL mbUserSetupCompleted;
- BOOL mbUserSetupResult;
- Link maErrorHdl;
-
- SAL_DLLPRIVATE void ImplInitData();
- SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
- SAL_DLLPRIVATE void ImplInitDisplay( const Window* pWindow );
+ XubString maPrinterName;
+ XubString maDriver;
+ XubString maPrintFile;
+ XubString maJobName;
+ JobSetup maJobSetup;
+ Point maPageOffset;
+ Size maPaperSize;
+ ULONG mnError;
+ USHORT mnCurPage;
+ USHORT mnCurPrintPage;
+ USHORT mnPageQueueSize;
+ USHORT mnCopyCount;
+ BOOL mbDefPrinter;
+ BOOL mbPrinting;
+ BOOL mbJobActive;
+ BOOL mbCollateCopy;
+ BOOL mbPrintFile;
+ BOOL mbInPrintPage;
+ BOOL mbNewJobSetup;
+ BOOL mbIsQueuePrinter;
+ BOOL mbUserSetupCompleted;
+ BOOL mbUserSetupResult;
+ Link maErrorHdl;
+
+ SAL_DLLPRIVATE void ImplInitData();
+ SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
+ SAL_DLLPRIVATE void ImplInitDisplay( const Window* pWindow );
SAL_DLLPRIVATE static SalPrinterQueueInfo* ImplGetQueueInfo( const XubString& rPrinterName,
const XubString* pDriver );
- SAL_DLLPRIVATE void ImplUpdatePageData();
- SAL_DLLPRIVATE void ImplUpdateFontList();
- SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
+ SAL_DLLPRIVATE void ImplUpdatePageData();
+ SAL_DLLPRIVATE void ImplUpdateFontList();
+ SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
DECL_DLLPRIVATE_LINK( ImplDestroyPrinterAsync, void* );
SAL_DLLPRIVATE bool StartJob( const rtl::OUString& rJobName, boost::shared_ptr<vcl::PrinterController>& );
-
+
static SAL_DLLPRIVATE ULONG ImplSalPrinterErrorCodeToVCL( ULONG nError );
private:
- SAL_DLLPRIVATE void ImplEndPrint();
+ SAL_DLLPRIVATE void ImplEndPrint();
SAL_DLLPRIVATE BOOL EndJob();
SAL_DLLPRIVATE Printer( const Printer& rPrinter );
SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter );
@@ -280,8 +280,8 @@ public:
protected:
- void SetSelfAsQueuePrinter( BOOL bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
- BOOL IsQueuePrinter() const { return mbIsQueuePrinter; }
+ void SetSelfAsQueuePrinter( BOOL bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
+ BOOL IsQueuePrinter() const { return mbIsQueuePrinter; }
public:
Printer();
@@ -289,84 +289,84 @@ public:
Printer( const JobSetup& rJobSetup );
Printer( const QueueInfo& rQueueInfo );
Printer( const XubString& rPrinterName );
- virtual ~Printer();
+ virtual ~Printer();
static const std::vector< rtl::OUString >& GetPrinterQueues();
static const QueueInfo* GetQueueInfo( const String& rPrinterName, bool bStatusUpdate );
- static XubString GetDefaultPrinterName();
+ static XubString GetDefaultPrinterName();
- virtual void Error();
+ virtual void Error();
- const XubString& GetName() const { return maPrinterName; }
- const XubString& GetDriverName() const { return maDriver; }
- BOOL IsDefPrinter() const { return mbDefPrinter; }
- BOOL IsDisplayPrinter() const { return mpDisplayDev != NULL; }
- BOOL IsValid() const { return !IsDisplayPrinter(); }
+ const XubString& GetName() const { return maPrinterName; }
+ const XubString& GetDriverName() const { return maDriver; }
+ BOOL IsDefPrinter() const { return mbDefPrinter; }
+ BOOL IsDisplayPrinter() const { return mpDisplayDev != NULL; }
+ BOOL IsValid() const { return !IsDisplayPrinter(); }
- ULONG GetCapabilities( USHORT nType ) const;
- BOOL HasSupport( PrinterSupport eFeature ) const;
+ ULONG GetCapabilities( USHORT nType ) const;
+ BOOL HasSupport( PrinterSupport eFeature ) const;
- BOOL SetJobSetup( const JobSetup& rSetup );
- const JobSetup& GetJobSetup() const { return maJobSetup; }
- String GetJobValue( const String& rKey ) const { return maJobSetup.GetValue( rKey ); }
- void SetJobValue( const String& rKey, const String& rValue ) { maJobSetup.SetValue( rKey, rValue ); }
+ BOOL SetJobSetup( const JobSetup& rSetup );
+ const JobSetup& GetJobSetup() const { return maJobSetup; }
+ String GetJobValue( const String& rKey ) const { return maJobSetup.GetValue( rKey ); }
+ void SetJobValue( const String& rKey, const String& rValue ) { maJobSetup.SetValue( rKey, rValue ); }
- BOOL Setup( Window* pWindow = NULL );
- BOOL SetPrinterProps( const Printer* pPrinter );
+ BOOL Setup( Window* pWindow = NULL );
+ BOOL SetPrinterProps( const Printer* pPrinter );
void SetPrinterOptions( const PrinterOptions& rOptions ) { *mpPrinterOptions = rOptions; }
const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
- BOOL SetOrientation( Orientation eOrient );
- Orientation GetOrientation() const;
+ BOOL SetOrientation( Orientation eOrient );
+ Orientation GetOrientation() const;
DuplexMode GetDuplexMode() const;
BOOL SetDuplexMode( DuplexMode );
// returns the angle that a landscape page will be turned counterclockwise
// wrt to portrait. The return value may be only valid for
// the current paper
- int GetLandscapeAngle() const;
- BOOL SetPaperBin( USHORT nPaperBin );
- USHORT GetPaperBin() const;
- BOOL SetPaper( Paper ePaper );
- BOOL SetPaperSizeUser( const Size& rSize );
- BOOL SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
- Paper GetPaper() const;
+ int GetLandscapeAngle() const;
+ BOOL SetPaperBin( USHORT nPaperBin );
+ USHORT GetPaperBin() const;
+ BOOL SetPaper( Paper ePaper );
+ BOOL SetPaperSizeUser( const Size& rSize );
+ BOOL SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
+ Paper GetPaper() const;
// returns number of available paper formats
- int GetPaperInfoCount() const;
+ int GetPaperInfoCount() const;
// returns info about paper format nPaper
- const PaperInfo& GetPaperInfo( int nPaper ) const;
- USHORT GetPaperBinCount() const;
- XubString GetPaperBinName( USHORT nPaperBin ) const;
-
- const Size& GetPaperSizePixel() const { return maPaperSize; }
- Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
- const Point& GetPageOffsetPixel() const { return maPageOffset; }
- Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
-
- BOOL SetCopyCount( USHORT nCopy, BOOL bCollate = FALSE );
- USHORT GetCopyCount() const { return mnCopyCount; }
- BOOL IsCollateCopy() const { return mbCollateCopy; }
-
- BOOL IsPrinting() const { return mbPrinting; }
-
- void SetPrintFile( const XubString& rFileName ) { maPrintFile = rFileName; }
- const XubString& GetPrintFile() const { return maPrintFile; }
- void EnablePrintFile( BOOL bEnable ) { mbPrintFile = bEnable; }
- BOOL IsPrintFileEnabled() const { return mbPrintFile; }
- BOOL AbortJob();
- const XubString& GetCurJobName() const { return maJobName; }
- USHORT GetCurPage() const { return mnCurPage; }
- BOOL IsJobActive() const { return mbJobActive; }
-
- ULONG GetError() const { return ERRCODE_TOERROR(mnError); }
- ULONG GetErrorCode() const { return mnError; }
-
- void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
- const Link& GetErrorHdl() const { return maErrorHdl; }
-
+ const PaperInfo& GetPaperInfo( int nPaper ) const;
+ USHORT GetPaperBinCount() const;
+ XubString GetPaperBinName( USHORT nPaperBin ) const;
+
+ const Size& GetPaperSizePixel() const { return maPaperSize; }
+ Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
+ const Point& GetPageOffsetPixel() const { return maPageOffset; }
+ Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
+
+ BOOL SetCopyCount( USHORT nCopy, BOOL bCollate = FALSE );
+ USHORT GetCopyCount() const { return mnCopyCount; }
+ BOOL IsCollateCopy() const { return mbCollateCopy; }
+
+ BOOL IsPrinting() const { return mbPrinting; }
+
+ void SetPrintFile( const XubString& rFileName ) { maPrintFile = rFileName; }
+ const XubString& GetPrintFile() const { return maPrintFile; }
+ void EnablePrintFile( BOOL bEnable ) { mbPrintFile = bEnable; }
+ BOOL IsPrintFileEnabled() const { return mbPrintFile; }
+ BOOL AbortJob();
+ const XubString& GetCurJobName() const { return maJobName; }
+ USHORT GetCurPage() const { return mnCurPage; }
+ BOOL IsJobActive() const { return mbJobActive; }
+
+ ULONG GetError() const { return ERRCODE_TOERROR(mnError); }
+ ULONG GetErrorCode() const { return mnError; }
+
+ void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
+ const Link& GetErrorHdl() const { return maErrorHdl; }
+
void Compat_OldPrinterMetrics( bool bSet );
-
+
/** checks the printer list and updates it necessary
*
* sends a DataChanged event of type DATACHANGED_PRINTER
@@ -375,9 +375,9 @@ public:
static void updatePrinters();
/** execute a print job
-
+
starts a print job asynchronously (that is will return
-
+
*/
static void PrintJob( const boost::shared_ptr<vcl::PrinterController>& i_pController,
const JobSetup& i_rInitSetup
@@ -417,7 +417,7 @@ public:
long nVerticalSpacing;
bool bDrawBorder;
PrinterController::NupOrderType nOrder;
-
+
MultiPageSetup()
: nRows( 1 ), nColumns( 1 ), nRepeat( 1 ), aPaperSize( 21000, 29700 )
, nLeftMargin( 0 ), nTopMargin( 0 )
@@ -428,30 +428,30 @@ public:
{
}
};
-
+
struct PageSize
{
Size aSize; // in 100th mm
bool bFullPaper; // full paper, not only imageable area is printed
-
+
PageSize( const Size& i_rSize = Size( 21000, 29700 ),
bool i_bFullPaper = false
) : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
};
-
+
PrinterController();
virtual ~PrinterController();
-
+
const boost::shared_ptr<Printer>& getPrinter() const;
/* for implementations: get current job properties as changed by e.g. print dialog
this gets the current set of properties initially told to Printer::PrintJob
-
+
For convenience a second sequence will be merged in to get a combined sequence.
In case of duplicate property names, the value of i_MergeList wins.
*/
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
getJobProperties( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rMergeList ) const;
-
+
/* get the PropertyValue of a Property
*/
com::sun::star::beans::PropertyValue* getValue( const rtl::OUString& i_rPropertyName );
@@ -462,12 +462,12 @@ public:
in case the property is unknown or not convertible to bool, i_bFallback is returned
*/
sal_Bool getBoolProperty( const rtl::OUString& i_rPropertyName, sal_Bool i_bFallback ) const;
-
+
/* set a property value - can also be used to add another UI property
*/
void setValue( const rtl::OUString& i_rPropertyName, const com::sun::star::uno::Any& i_rValue );
void setValue( const com::sun::star::beans::PropertyValue& i_rValue );
-
+
/* return the currently active UI options. These are the same that were passed to setUIOptions.
*/
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& getUIOptions() const;
@@ -486,7 +486,7 @@ public:
/* makeEnabled will chage the property rPropName depends on to the value
that makes rPropName enabled. If the dependency itself is also disabled,
no action will be performed.
-
+
returns the property name rPropName depends on or an empty string
if no change was made.
*/
@@ -505,14 +505,14 @@ public:
virtual void printPage( int i_nPage ) const = 0; // must be overloaded by the app
virtual void jobStarted(); // will be called after a possible dialog has been shown and the real printjob starts
virtual void jobFinished( com::sun::star::view::PrintableState );
-
+
com::sun::star::view::PrintableState getJobState() const;
-
+
void abortJob();
-
+
bool isShowDialogs() const;
bool isDirectPrint() const;
-
+
// implementation details, not usable outside vcl
SAL_DLLPRIVATE int getFilteredPageCount();
SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false );
@@ -530,10 +530,10 @@ public:
SAL_DLLPRIVATE void pushPropertiesToPrinter();
SAL_DLLPRIVATE void setJobState( com::sun::star::view::PrintableState );
SAL_DLLPRIVATE bool setupPrinter( Window* i_pDlgParent );
-
+
SAL_DLLPRIVATE int getPageCountProtected() const;
SAL_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParametersProtected( int i_nPage ) const;
-
+
SAL_DLLPRIVATE ULONG removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
};
@@ -567,7 +567,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper
bool hasProperty( const rtl::OUString& i_rPropertyName ) const;
bool hasProperty( const char* i_pPropertyName ) const
{ return hasProperty( rtl::OUString::createFromAscii( i_pPropertyName ) ); }
-
+
// returns an empty Any for not existing properties
com::sun::star::uno::Any getValue( const rtl::OUString& i_rPropertyName ) const;
// change a value in the property set; this will not have an effect to an eventual PrinterController
@@ -601,7 +601,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper
sal_Bool mbInternalOnly;
sal_Bool mbEnabled;
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > maAddProps;
-
+
UIControlOptions( const rtl::OUString& i_rDependsOnName = rtl::OUString(),
sal_Int32 i_nDependsOnEntry = -1,
sal_Bool i_bAttachToDependency = sal_False,
@@ -643,7 +643,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper
sal_Bool i_bValue,
const UIControlOptions& i_rControlOptions = UIControlOptions()
);
-
+
// create a set of choices (either a radio button group or a list box)
static com::sun::star::uno::Any getChoiceControlOpt( const rtl::OUString& i_rTitle,
const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpText,
@@ -678,6 +678,6 @@ class VCL_DLLPUBLIC PrinterOptionsHelper
}
-#endif // _SV_PRINT_HXX
+#endif // _SV_PRINT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/printergfx.hxx b/vcl/inc/vcl/printergfx.hxx
index 61ace3af65bf..e625cd9d13b7 100644
--- a/vcl/inc/vcl/printergfx.hxx
+++ b/vcl/inc/vcl/printergfx.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +61,10 @@ private:
public:
- PrinterColor () :
- meColorspace(eInvalid)
+ PrinterColor () :
+ meColorspace(eInvalid)
{}
- PrinterColor (sal_uInt16 nRed, sal_uInt16 nGreen,
+ PrinterColor (sal_uInt16 nRed, sal_uInt16 nGreen,
sal_uInt16 nBlue) :
mnRed (nRed),
mnGreen (nGreen),
@@ -92,11 +92,11 @@ public:
sal_uInt16 GetBlue () const
{ return mnBlue; }
sal_Bool operator== (const PrinterColor& aColor) const
- {
- return aColor.Is() && this->Is()
- && mnRed == aColor.mnRed
- && mnGreen == aColor.mnGreen
- && mnBlue == aColor.mnBlue;
+ {
+ return aColor.Is() && this->Is()
+ && mnRed == aColor.mnRed
+ && mnGreen == aColor.mnGreen
+ && mnBlue == aColor.mnBlue;
}
sal_Bool operator!= (const PrinterColor& aColor) const
{ return ! (aColor==*this); }
@@ -107,7 +107,7 @@ public:
mnGreen = aColor.mnGreen;
mnBlue = aColor.mnBlue;
- return *this;
+ return *this;
}
PrinterColor& operator= (sal_uInt32 nRGB)
@@ -117,7 +117,7 @@ public:
mnGreen = (nRGB & 0x0000ff00) >> 8;
mnRed = (nRGB & 0x00ff0000) >> 16;
- return *this;
+ return *this;
}
};
@@ -135,7 +135,7 @@ struct CharacterMetric;
/*
* Bitmap Interface, this has to be filled with your actual bitmap implementation
* sample implementations can be found in:
- * psprint/workben/cui/pspdem.cxx
+ * psprint/workben/cui/pspdem.cxx
* vcl/unx/source/gdi/salgdi2.cxx
*/
@@ -156,22 +156,22 @@ public:
typedef enum {
InvalidType = 0,
- TrueColorImage,
- MonochromeImage,
- PaletteImage,
+ TrueColorImage,
+ MonochromeImage,
+ PaletteImage,
GrayScaleImage
} ImageType;
/*
- * printer raster operations
+ * printer raster operations
*/
struct GraphicsStatus
{
rtl::OString maFont;
- rtl_TextEncoding maEncoding;
- bool mbArtItalic;
- bool mbArtBold;
+ rtl_TextEncoding maEncoding;
+ bool mbArtItalic;
+ bool mbArtBold;
sal_Int32 mnTextHeight;
sal_Int32 mnTextWidth;
PrinterColor maColor;
@@ -184,8 +184,8 @@ class Font3;
class PrinterGfx
{
-private:
-
+private:
+
/* common settings */
double mfScaleX;
@@ -201,18 +201,18 @@ private:
osl::File* mpPageHeader;
osl::File* mpPageBody;
- void TranslateCoordinates (sal_Int32 &rXOut, sal_Int32 &rYOut,
+ void TranslateCoordinates (sal_Int32 &rXOut, sal_Int32 &rYOut,
sal_Int32 nXIn, sal_Int32 nYIn )
{ rXOut = nXIn; rYOut = nYIn; }
void TranslateCoordinates (Point& rOut, const Point& rIn)
{ rOut = rIn; }
- /* text/font related data, for a type1 font it has to be checked
+ /* text/font related data, for a type1 font it has to be checked
whether this font has already been downloaded. A TrueType font
will be converted into one or more Type3 fonts, containing glyphs
- in no particular order. In addition to the existence of the
- glyph in one of the subfonts, the mapping from unicode to the
- glyph has to be remembered */
+ in no particular order. In addition to the existence of the
+ glyph in one of the subfonts, the mapping from unicode to the
+ glyph has to be remembered */
std::list< sal_Int32 > maPS1Font;
std::list< GlyphSet > maPS3Font;
@@ -221,10 +221,10 @@ private:
sal_Int32 mnFallbackID;
sal_Int32 mnTextAngle;
bool mbTextVertical;
- PrintFontManager& mrFontMgr;
+ PrintFontManager& mrFontMgr;
/* bitmap drawing implementation */
-
+
sal_Bool mbCompressBmp;
void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea);
@@ -254,9 +254,9 @@ private:
/* font / font substitution */
friend class Font3;
const ::std::hash_map< fontID, fontID >* mpFontSubstitutes;
- int getCharWidth (sal_Bool b_vert, sal_Unicode n_char,
+ int getCharWidth (sal_Bool b_vert, sal_Unicode n_char,
CharacterMetric *p_bbox);
- fontID getCharMetric (const Font3 &rFont, sal_Unicode n_char,
+ fontID getCharMetric (const Font3 &rFont, sal_Unicode n_char,
CharacterMetric *p_bbox);
fontID getFontSubstitute () const;
fontID getFallbackID () const { return mnFallbackID; }
@@ -273,7 +273,7 @@ public:
{ maVirtualStatus.maColor = rColor; }
void PSUploadPS1Font (sal_Int32 nFontID);
- void PSSetFont (const rtl::OString& rName,
+ void PSSetFont (const rtl::OString& rName,
rtl_TextEncoding nEncoding = RTL_TEXTENCODING_DONTKNOW)
{ maVirtualStatus.maFont = rName; maVirtualStatus.maEncoding = nEncoding; }
@@ -284,14 +284,14 @@ public:
/* PS helpers */
enum pspath_t { moveto = 0, lineto = 1 };
- void PSBinLineTo (const Point& rCurrent, Point& rOld,
+ void PSBinLineTo (const Point& rCurrent, Point& rOld,
sal_Int32& nColumn);
- void PSBinMoveTo (const Point& rCurrent, Point& rOld,
+ void PSBinMoveTo (const Point& rCurrent, Point& rOld,
sal_Int32& nColumn);
void PSBinStartPath ();
void PSBinEndPath ();
void PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath);
- void PSBinPath (const Point& rCurrent, Point& rOld,
+ void PSBinPath (const Point& rCurrent, Point& rOld,
pspath_t eType, sal_Int32& nColumn);
void PSRotate (sal_Int32 nAngle);
@@ -303,27 +303,27 @@ public:
void PSPointOp (const Point& rPoint, const sal_Char* pOperator);
void PSHexString (const sal_uChar* pString, sal_Int16 nLen);
void PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries);
- void PSShowText (const sal_uChar* pString,
- sal_Int16 nGlyphs, sal_Int16 nBytes,
+ void PSShowText (const sal_uChar* pString,
+ sal_Int16 nGlyphs, sal_Int16 nBytes,
const sal_Int32* pDeltaArray = NULL);
- void PSComment (const sal_Char* pComment );
- void LicenseWarning (const Point& rPoint, const sal_Unicode* pStr,
- sal_Int16 nLen, const sal_Int32* pDeltaArray);
+ void PSComment (const sal_Char* pComment );
+ void LicenseWarning (const Point& rPoint, const sal_Unicode* pStr,
+ sal_Int16 nLen, const sal_Int32* pDeltaArray);
- void OnEndPage ();
- void OnEndJob ();
- void writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts );
+ void OnEndPage ();
+ void OnEndJob ();
+ void writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts );
PrintFontManager& GetFontMgr () { return mrFontMgr; }
void drawVerticalizedText (const Point& rPoint,
const sal_Unicode* pStr,
sal_Int16 nLen,
const sal_Int32* pDeltaArray );
- void drawText (const Point& rPoint,
- const sal_Unicode* pStr, sal_Int16 nLen,
+ void drawText (const Point& rPoint,
+ const sal_Unicode* pStr, sal_Int16 nLen,
const sal_Int32* pDeltaArray = NULL);
- void drawGlyphs( const Point& rPoint,
+ void drawGlyphs( const Point& rPoint,
sal_GlyphId* pGlyphIds,
sal_Unicode* pUnicodes,
sal_Int16 nLen,
@@ -335,14 +335,14 @@ public:
sal_Bool Init (const JobData& rData);
void Clear();
- // query depth and size
+ // query depth and size
void GetResolution (sal_Int32 &rDpiX, sal_Int32 &rDpiY) const;
sal_uInt16 GetBitCount ();
// clip region
void ResetClipRegion ();
void BeginSetClipRegion (sal_uInt32);
- sal_Bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY,
+ sal_Bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY,
sal_Int32 nDX, sal_Int32 nDY);
void EndSetClipRegion ();
@@ -351,7 +351,7 @@ public:
{ maLineColor = rLineColor; }
void SetFillColor (const PrinterColor& rFillColor = PrinterColor())
{ maFillColor = rFillColor; }
-
+
// drawing primitives
void DrawPixel (const Point& rPoint, const PrinterColor& rPixelColor);
void DrawPixel (const Point& rPoint)
@@ -360,17 +360,17 @@ public:
void DrawRect (const Rectangle& rRectangle);
void DrawPolyLine (sal_uInt32 nPoints, const Point* pPath );
void DrawPolygon (sal_uInt32 nPoints, const Point* pPath);
- void DrawPolyPolygon (sal_uInt32 nPoly,
- const sal_uInt32 *pPolygonSize,
+ void DrawPolyPolygon (sal_uInt32 nPoly,
+ const sal_uInt32 *pPolygonSize,
const Point** pPolygonList);
- void DrawPolyLineBezier (sal_uInt32 nPoints,
+ void DrawPolyLineBezier (sal_uInt32 nPoints,
const Point* pPath,
const BYTE* pFlgAry );
- void DrawPolygonBezier (sal_uInt32 nPoints,
+ void DrawPolygonBezier (sal_uInt32 nPoints,
const Point* pPath,
const BYTE* pFlgAry);
void DrawPolyPolygonBezier (sal_uInt32 nPoly,
- const sal_uInt32* pPoints,
+ const sal_uInt32* pPoints,
const Point* const* pPtAry,
const BYTE* const* pFlgAry);
@@ -378,12 +378,12 @@ public:
sal_Bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize);
// image drawing
- void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
+ void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
const PrinterBmp& rBitmap);
- void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
- const PrinterBmp& rBitmap,
+ void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
+ const PrinterBmp& rBitmap,
const PrinterBmp& rTransBitmap);
- void DrawMask (const Rectangle& rDest, const Rectangle& rSrc,
+ void DrawMask (const Rectangle& rDest, const Rectangle& rSrc,
const PrinterBmp &rBitmap, PrinterColor& rMaskColor);
// font and text handling
@@ -401,37 +401,37 @@ public:
{ return mnTextAngle; }
sal_Int32 GetFontID () const
{ return mnFontID; }
- bool GetFontVertical() const
+ bool GetFontVertical() const
{ return mbTextVertical; }
sal_Int32 GetFontHeight () const
{ return maVirtualStatus.mnTextHeight; }
sal_Int32 GetFontWidth () const
{ return maVirtualStatus.mnTextWidth; }
- bool GetArtificialItalic() const
+ bool GetArtificialItalic() const
{ return maVirtualStatus.mbArtItalic; }
- bool GetArtificialBold() const
+ bool GetArtificialBold() const
{ return maVirtualStatus.mbArtBold; }
- void DrawText (const Point& rPoint,
- const sal_Unicode* pStr, sal_Int16 nLen,
+ void DrawText (const Point& rPoint,
+ const sal_Unicode* pStr, sal_Int16 nLen,
const sal_Int32* pDeltaArray = NULL);
void SetTextColor (PrinterColor& rTextColor)
{ maTextColor = rTextColor; }
- sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo,
+ sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo,
long *pWidthArray);
const ::std::list< KernPair >& getKernPairs( bool bVertical = false ) const;
// advanced font handling
sal_Bool GetGlyphBoundRect (sal_Unicode c, Rectangle& rOutRect);
- sal_uInt32 GetGlyphOutline (sal_Unicode c,
- sal_uInt16 **ppPolySizes, Point **ppPoints,
+ sal_uInt32 GetGlyphOutline (sal_Unicode c,
+ sal_uInt16 **ppPolySizes, Point **ppPoints,
sal_uInt8 **ppFlags);
// for CTL
- void DrawGlyphs( const Point& rPoint,
+ void DrawGlyphs( const Point& rPoint,
sal_GlyphId* pGlyphIds,
sal_Unicode* pUnicodes,
sal_Int16 nLen,
sal_Int32* pDeltaArray );
-
+
bool getStrictSO52Compatibility() const;
void setStrictSO52Compatibility( bool );
};
diff --git a/vcl/inc/vcl/printerinfomanager.hxx b/vcl/inc/vcl/printerinfomanager.hxx
index ad1debee266b..1d271d192016 100644
--- a/vcl/inc/vcl/printerinfomanager.hxx
+++ b/vcl/inc/vcl/printerinfomanager.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -127,16 +127,16 @@ protected:
std::list< WatchFile > m_aWatchFiles;
rtl::OUString m_aDefaultPrinter;
rtl::OUString m_aSystemPrintCommand;
-
+
std::list< SystemPrintQueue > m_aSystemPrintQueues;
- SystemQueueInfo* m_pQueueInfo;
+ SystemQueueInfo* m_pQueueInfo;
- Type m_eType;
+ Type m_eType;
bool m_bUseIncludeFeature;
bool m_bUseJobPatch;
rtl::OUString m_aSystemDefaultPaper;
-
+
bool m_bDisableCUPS;
PrinterInfoManager( Type eType = Default );
@@ -147,12 +147,12 @@ protected:
// fill in font substitutions
// the resulting hash_map maps from source to target font ids
void fillFontSubstitutions( PrinterInfo& rInfo ) const;
-
+
// fill default paper if not configured in config file
// default paper is e.g. locale dependent
// if a paper is already set it will not be overwritten
void setDefaultPaper( PPDContext& rInfo ) const;
-
+
void initSystemDefaultPaper();
public:
@@ -170,7 +170,7 @@ public:
// gets info about a named printer
const PrinterInfo& getPrinterInfo( const rtl::OUString& rPrinter ) const;
-
+
// gets the name of the default printer
const rtl::OUString& getDefaultPrinter() const { return m_aDefaultPrinter; }
@@ -209,7 +209,7 @@ public:
// primarily used internally but also by padmin
// returns the printer queue names
virtual const std::list< SystemPrintQueue >& getSystemPrintQueues();
-
+
// similar but returnse whole commandlines
virtual void getSystemPrintCommands( std::list< rtl::OUString >& rCommands );
@@ -220,23 +220,23 @@ public:
// close the FILE* returned by startSpool and does the actual spooling
// returns a numerical job id
virtual int endSpool( const rtl::OUString& rPrinterName, const rtl::OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData );
-
+
// for spadmin: whether adding or removing a printer is possible
virtual bool addOrRemovePossible() const;
-
+
bool getUseIncludeFeature() const { return m_bUseIncludeFeature; }
bool getUseJobPatch() const { return m_bUseJobPatch; }
-
+
// check whether a printer's feature string contains a subfeature
bool checkFeatureToken( const rtl::OUString& rPrinterName, const char* pToken ) const;
-
+
// set m_bDisableCUPS and update printer config
void setCUPSDisabled( bool );
-
+
// gets m_bDisableCUPS, initialized from printer config
bool isCUPSDisabled() const;
};
-
+
} // namespace
#endif // _PSPRINT_PRINTERINFOMANAGER_HXX_
diff --git a/vcl/inc/vcl/printerjob.hxx b/vcl/inc/vcl/printerjob.hxx
index 62a1c078bc32..1d70218437d4 100644
--- a/vcl/inc/vcl/printerjob.hxx
+++ b/vcl/inc/vcl/printerjob.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +41,14 @@ namespace psp {
class PrinterGfx;
-class PrinterJob
+class PrinterJob
{
private: // private data
rtl::OUString maSpoolDirName;
rtl::OUString maFileName; // empty: spool to command, else spool to named file
- rtl::OUString maJobTitle;
- int mnFileMode;
+ rtl::OUString maJobTitle;
+ int mnFileMode;
osl::File* mpJobHeader;
osl::File* mpJobTrailer;
@@ -80,21 +80,21 @@ private: // private data
sal_Int32 mnErrorCode;
bool m_bQuickJob;
-
+
private: // private methods
- osl::File* CreateSpoolFile (const rtl::OUString& rName,
+ osl::File* CreateSpoolFile (const rtl::OUString& rName,
const rtl::OUString& rExtension);
void InitPaperSize (const JobData& rJobSetup);
- bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
+ bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
bool writeSetup( osl::File* pFile, const JobData& );
bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures = true );
- void writeJobPatch( osl::File* File, const JobData& );
+ void writeJobPatch( osl::File* File, const JobData& );
bool writeProlog (osl::File* pFile, const JobData& );
public: // for usage in PrinterGfx
-
+
sal_uInt32 GetResolution () const { return mnResolution; }
void GetScale (double &rXScale, double &rYScale) const;
sal_uInt16 GetDepth () const;
@@ -138,7 +138,7 @@ public:
sal_Bool AbortJob ();
- sal_Bool StartPage (const JobData& rJobSetup);
+ sal_Bool StartPage (const JobData& rJobSetup);
sal_Bool EndPage ();
sal_uInt32 GetErrorCode ();
diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx
index f741cb6cd0d3..00265d725f4e 100644
--- a/vcl/inc/vcl/prndlg.hxx
+++ b/vcl/inc/vcl/prndlg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +60,12 @@ namespace vcl
VirtualDevice maPageVDev;
rtl::OUString maReplacementString;
rtl::OUString maToolTipString;
-
+
bool useHCColorReplacement() const;
public:
PrintPreviewWindow( Window* pParent, const ResId& );
virtual ~PrintPreviewWindow();
-
+
virtual void Paint( const Rectangle& rRect );
virtual void Command( const CommandEvent& );
virtual void Resize();
@@ -75,7 +75,7 @@ namespace vcl
sal_Int32 i_nDPIX, sal_Int32 i_nDPIY
);
};
-
+
class ShowNupOrderWindow : public Window
{
int mnOrderMode;
@@ -85,9 +85,9 @@ namespace vcl
public:
ShowNupOrderWindow( Window* pParent );
virtual ~ShowNupOrderWindow();
-
+
virtual void Paint( const Rectangle& );
-
+
void setValues( int i_nOrderMode, int i_nColumns, int i_nRows )
{
mnOrderMode = i_nOrderMode;
@@ -96,7 +96,7 @@ namespace vcl
Invalidate();
}
};
-
+
class NUpTabPage : public TabPage
{
public:
@@ -105,10 +105,10 @@ namespace vcl
RadioButton maBrochureBtn;
FixedText maPagesBoxTitleTxt;
ListBox maNupPagesBox;
-
+
// controls for "Custom" page mode
FixedText maNupNumPagesTxt;
- NumericField maNupColEdt;
+ NumericField maNupColEdt;
FixedText maNupTimesTxt;
NumericField maNupRowsEdt;
FixedText maPageMarginTxt1;
@@ -126,26 +126,26 @@ namespace vcl
ShowNupOrderWindow maNupOrderWin;
// border around each page
CheckBox maBorderCB;
-
+
vcl::RowOrColumn maLayout;
boost::shared_ptr< vcl::RowOrColumn > mxBrochureDep;
boost::shared_ptr< vcl::LabeledElement >mxPagesBtnLabel;
-
+
void setupLayout();
-
+
NUpTabPage( Window*, const ResId& );
virtual ~NUpTabPage();
-
+
void readFromSettings();
void storeToSettings();
void initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& );
void enableNupControls( bool bEnable );
-
+
void showAdvancedControls( bool );
-
+
virtual void Resize();
};
-
+
class JobTabPage : public TabPage
{
public:
@@ -158,38 +158,38 @@ namespace vcl
FixedText maLocationTxt;
FixedText maCommentLabel;
FixedText maCommentTxt;
-
+
PushButton maSetupButton;
-
+
FixedLine maCopies;
FixedLine maCopySpacer;
FixedText maCopyCount;
NumericField maCopyCountField;
CheckBox maCollateBox;
FixedImage maCollateImage;
-
+
Image maCollateImg;
Image maCollateHCImg;
Image maNoCollateImg;
Image maNoCollateHCImg;
-
+
long mnCollateUIMode;
vcl::RowOrColumn maLayout;
boost::shared_ptr<vcl::RowOrColumn> mxPrintRange;
boost::shared_ptr<vcl::WindowArranger> mxDetails;
-
+
JobTabPage( Window*, const ResId& );
virtual ~JobTabPage();
void readFromSettings();
void storeToSettings();
-
+
virtual void Resize();
-
+
void setupLayout();
};
-
+
class OutputOptPage : public TabPage
{
public:
@@ -200,7 +200,7 @@ namespace vcl
vcl::RowOrColumn maLayout;
boost::shared_ptr<vcl::RowOrColumn> mxOptGroup;
-
+
OutputOptPage( Window*, const ResId& );
virtual ~OutputOptPage();
@@ -220,21 +220,21 @@ namespace vcl
FixedText maNumPagesText;
PushButton maBackwardBtn;
PushButton maForwardBtn;
-
+
TabControl maTabCtrl;
NUpTabPage maNUpPage;
JobTabPage maJobPage;
OutputOptPage maOptionsPage;
-
+
FixedLine maButtonLine;
-
+
boost::shared_ptr< PrinterController > maPController;
-
+
rtl::OUString maPageStr;
rtl::OUString maNoPageStr;
sal_Int32 mnCurPage;
sal_Int32 mnCachedPages;
-
+
std::list< Window* > maControls;
std::map< Window*, rtl::OUString > maControlToPropertyMap;
std::map< rtl::OUString, std::vector< Window* > >
@@ -244,22 +244,22 @@ namespace vcl
Size maNupPortraitSize;
Size maNupLandscapeSize;
-
+
// internal, used for automatic Nup-Portrait/landscape
Size maFirstPageSize;
-
+
rtl::OUString maPrintToFileText;
rtl::OUString maPrintText;
rtl::OUString maDefPrtText;
-
+
vcl::RowOrColumn maLayout;
boost::shared_ptr<vcl::RowOrColumn> mxPreviewCtrls;
-
+
Size maDetailsCollapsedSize;
Size maDetailsExpandedSize;
-
+
sal_Bool mbShowLayoutPage;
-
+
Size getJobPageSize();
void updateNup();
void updateNupFromPages();
@@ -274,41 +274,41 @@ namespace vcl
void readFromSettings();
void storeToSettings();
com::sun::star::beans::PropertyValue* getValueForWindow( Window* ) const;
-
+
virtual void Resize();
virtual void Command( const CommandEvent& );
virtual void DataChanged( const DataChangedEvent& );
-
+
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( ClickHdl, Button* );
DECL_LINK( ModifyHdl, Edit* );
DECL_LINK( UIOptionsChanged, void* );
-
+
DECL_LINK( UIOption_CheckHdl, CheckBox* );
DECL_LINK( UIOption_RadioHdl, RadioButton* );
DECL_LINK( UIOption_SelectHdl, ListBox* );
DECL_LINK( UIOption_ModifyHdl, Edit* );
-
+
void setupLayout();
public:
PrintDialog( Window*, const boost::shared_ptr< PrinterController >& );
virtual ~PrintDialog();
-
+
bool isPrintToFile();
int getCopyCount();
bool isCollate();
bool isSingleJobs();
-
+
void previewForward();
void previewBackward();
};
-
+
class PrintProgressDialog : public ModelessDialog
{
String maStr;
FixedText maText;
CancelButton maButton;
-
+
bool mbCanceled;
sal_Int32 mnCur;
sal_Int32 mnMax;
@@ -317,17 +317,17 @@ namespace vcl
bool mbNativeProgress;
DECL_LINK( ClickHdl, Button* );
-
+
void implCalcProgressRect();
public:
PrintProgressDialog( Window* i_pParent, int i_nMax );
~PrintProgressDialog();
-
+
bool isCanceled() const { return mbCanceled; }
void setProgress( int i_nCurrent, int i_nMax = -1 );
void tick();
void reset();
-
+
virtual void Paint( const Rectangle& );
};
}
diff --git a/vcl/inc/vcl/prntypes.hxx b/vcl/inc/vcl/prntypes.hxx
index 086cc7314c7b..3e26ee5f175c 100644
--- a/vcl/inc/vcl/prntypes.hxx
+++ b/vcl/inc/vcl/prntypes.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,33 +49,33 @@ enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE };
// - QueueInfo-Types -
// -------------------
-#define QUEUE_STATUS_READY ((ULONG)0x00000001)
-#define QUEUE_STATUS_PAUSED ((ULONG)0x00000002)
-#define QUEUE_STATUS_PENDING_DELETION ((ULONG)0x00000004)
-#define QUEUE_STATUS_BUSY ((ULONG)0x00000008)
-#define QUEUE_STATUS_INITIALIZING ((ULONG)0x00000010)
-#define QUEUE_STATUS_WAITING ((ULONG)0x00000020)
-#define QUEUE_STATUS_WARMING_UP ((ULONG)0x00000040)
-#define QUEUE_STATUS_PROCESSING ((ULONG)0x00000080)
-#define QUEUE_STATUS_PRINTING ((ULONG)0x00000100)
-#define QUEUE_STATUS_OFFLINE ((ULONG)0x00000200)
-#define QUEUE_STATUS_ERROR ((ULONG)0x00000400)
-#define QUEUE_STATUS_SERVER_UNKNOWN ((ULONG)0x00000800)
-#define QUEUE_STATUS_PAPER_JAM ((ULONG)0x00001000)
-#define QUEUE_STATUS_PAPER_OUT ((ULONG)0x00002000)
-#define QUEUE_STATUS_MANUAL_FEED ((ULONG)0x00004000)
-#define QUEUE_STATUS_PAPER_PROBLEM ((ULONG)0x00008000)
-#define QUEUE_STATUS_IO_ACTIVE ((ULONG)0x00010000)
-#define QUEUE_STATUS_OUTPUT_BIN_FULL ((ULONG)0x00020000)
-#define QUEUE_STATUS_TONER_LOW ((ULONG)0x00040000)
-#define QUEUE_STATUS_NO_TONER ((ULONG)0x00080000)
-#define QUEUE_STATUS_PAGE_PUNT ((ULONG)0x00100000)
-#define QUEUE_STATUS_USER_INTERVENTION ((ULONG)0x00200000)
-#define QUEUE_STATUS_OUT_OF_MEMORY ((ULONG)0x00400000)
-#define QUEUE_STATUS_DOOR_OPEN ((ULONG)0x00800000)
-#define QUEUE_STATUS_POWER_SAVE ((ULONG)0x01000000)
+#define QUEUE_STATUS_READY ((ULONG)0x00000001)
+#define QUEUE_STATUS_PAUSED ((ULONG)0x00000002)
+#define QUEUE_STATUS_PENDING_DELETION ((ULONG)0x00000004)
+#define QUEUE_STATUS_BUSY ((ULONG)0x00000008)
+#define QUEUE_STATUS_INITIALIZING ((ULONG)0x00000010)
+#define QUEUE_STATUS_WAITING ((ULONG)0x00000020)
+#define QUEUE_STATUS_WARMING_UP ((ULONG)0x00000040)
+#define QUEUE_STATUS_PROCESSING ((ULONG)0x00000080)
+#define QUEUE_STATUS_PRINTING ((ULONG)0x00000100)
+#define QUEUE_STATUS_OFFLINE ((ULONG)0x00000200)
+#define QUEUE_STATUS_ERROR ((ULONG)0x00000400)
+#define QUEUE_STATUS_SERVER_UNKNOWN ((ULONG)0x00000800)
+#define QUEUE_STATUS_PAPER_JAM ((ULONG)0x00001000)
+#define QUEUE_STATUS_PAPER_OUT ((ULONG)0x00002000)
+#define QUEUE_STATUS_MANUAL_FEED ((ULONG)0x00004000)
+#define QUEUE_STATUS_PAPER_PROBLEM ((ULONG)0x00008000)
+#define QUEUE_STATUS_IO_ACTIVE ((ULONG)0x00010000)
+#define QUEUE_STATUS_OUTPUT_BIN_FULL ((ULONG)0x00020000)
+#define QUEUE_STATUS_TONER_LOW ((ULONG)0x00040000)
+#define QUEUE_STATUS_NO_TONER ((ULONG)0x00080000)
+#define QUEUE_STATUS_PAGE_PUNT ((ULONG)0x00100000)
+#define QUEUE_STATUS_USER_INTERVENTION ((ULONG)0x00200000)
+#define QUEUE_STATUS_OUT_OF_MEMORY ((ULONG)0x00400000)
+#define QUEUE_STATUS_DOOR_OPEN ((ULONG)0x00800000)
+#define QUEUE_STATUS_POWER_SAVE ((ULONG)0x01000000)
-#define QUEUE_JOBS_DONTKNOW ((ULONG)0xFFFFFFFF)
+#define QUEUE_JOBS_DONTKNOW ((ULONG)0xFFFFFFFF)
// -----------------
// - Printer-Types -
@@ -93,6 +93,6 @@ enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE };
#define PRINTER_CAPABILITIES_EXTERNALDIALOG ((USHORT)10)
#define PRINTER_CAPABILITIES_SETDUPLEX ((USHORT)11)
-#endif // _SV_PRNTYPES_HXX
+#endif // _SV_PRNTYPES_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/ptrstyle.hxx b/vcl/inc/vcl/ptrstyle.hxx
index 75502de85823..4ed6fd53ad17 100644
--- a/vcl/inc/vcl/ptrstyle.hxx
+++ b/vcl/inc/vcl/ptrstyle.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,94 +37,94 @@
typedef USHORT PointerStyle;
-#define POINTER_ARROW ((PointerStyle)0)
-#define POINTER_NULL ((PointerStyle)1)
-#define POINTER_WAIT ((PointerStyle)2)
-#define POINTER_TEXT ((PointerStyle)3)
-#define POINTER_HELP ((PointerStyle)4)
-#define POINTER_CROSS ((PointerStyle)5)
-#define POINTER_MOVE ((PointerStyle)6)
-#define POINTER_NSIZE ((PointerStyle)7)
-#define POINTER_SSIZE ((PointerStyle)8)
-#define POINTER_WSIZE ((PointerStyle)9)
-#define POINTER_ESIZE ((PointerStyle)10)
-#define POINTER_NWSIZE ((PointerStyle)11)
-#define POINTER_NESIZE ((PointerStyle)12)
-#define POINTER_SWSIZE ((PointerStyle)13)
-#define POINTER_SESIZE ((PointerStyle)14)
-#define POINTER_WINDOW_NSIZE ((PointerStyle)15)
-#define POINTER_WINDOW_SSIZE ((PointerStyle)16)
-#define POINTER_WINDOW_WSIZE ((PointerStyle)17)
-#define POINTER_WINDOW_ESIZE ((PointerStyle)18)
-#define POINTER_WINDOW_NWSIZE ((PointerStyle)19)
-#define POINTER_WINDOW_NESIZE ((PointerStyle)20)
-#define POINTER_WINDOW_SWSIZE ((PointerStyle)21)
-#define POINTER_WINDOW_SESIZE ((PointerStyle)22)
-#define POINTER_HSPLIT ((PointerStyle)23)
-#define POINTER_VSPLIT ((PointerStyle)24)
-#define POINTER_HSIZEBAR ((PointerStyle)25)
-#define POINTER_VSIZEBAR ((PointerStyle)26)
-#define POINTER_HAND ((PointerStyle)27)
-#define POINTER_REFHAND ((PointerStyle)28)
-#define POINTER_PEN ((PointerStyle)29)
-#define POINTER_MAGNIFY ((PointerStyle)30)
-#define POINTER_FILL ((PointerStyle)31)
-#define POINTER_ROTATE ((PointerStyle)32)
-#define POINTER_HSHEAR ((PointerStyle)33)
-#define POINTER_VSHEAR ((PointerStyle)34)
-#define POINTER_MIRROR ((PointerStyle)35)
-#define POINTER_CROOK ((PointerStyle)36)
-#define POINTER_CROP ((PointerStyle)37)
-#define POINTER_MOVEPOINT ((PointerStyle)38)
-#define POINTER_MOVEBEZIERWEIGHT ((PointerStyle)39)
-#define POINTER_MOVEDATA ((PointerStyle)40)
-#define POINTER_COPYDATA ((PointerStyle)41)
-#define POINTER_LINKDATA ((PointerStyle)42)
-#define POINTER_MOVEDATALINK ((PointerStyle)43)
-#define POINTER_COPYDATALINK ((PointerStyle)44)
-#define POINTER_MOVEFILE ((PointerStyle)45)
-#define POINTER_COPYFILE ((PointerStyle)46)
-#define POINTER_LINKFILE ((PointerStyle)47)
-#define POINTER_MOVEFILELINK ((PointerStyle)48)
-#define POINTER_COPYFILELINK ((PointerStyle)49)
-#define POINTER_MOVEFILES ((PointerStyle)50)
-#define POINTER_COPYFILES ((PointerStyle)51)
-#define POINTER_NOTALLOWED ((PointerStyle)52)
-#define POINTER_DRAW_LINE ((PointerStyle)53)
-#define POINTER_DRAW_RECT ((PointerStyle)54)
-#define POINTER_DRAW_POLYGON ((PointerStyle)55)
-#define POINTER_DRAW_BEZIER ((PointerStyle)56)
-#define POINTER_DRAW_ARC ((PointerStyle)57)
-#define POINTER_DRAW_PIE ((PointerStyle)58)
-#define POINTER_DRAW_CIRCLECUT ((PointerStyle)59)
-#define POINTER_DRAW_ELLIPSE ((PointerStyle)60)
-#define POINTER_DRAW_FREEHAND ((PointerStyle)61)
-#define POINTER_DRAW_CONNECT ((PointerStyle)62)
-#define POINTER_DRAW_TEXT ((PointerStyle)63)
-#define POINTER_DRAW_CAPTION ((PointerStyle)64)
-#define POINTER_CHART ((PointerStyle)65)
-#define POINTER_DETECTIVE ((PointerStyle)66)
-#define POINTER_PIVOT_COL ((PointerStyle)67)
-#define POINTER_PIVOT_ROW ((PointerStyle)68)
-#define POINTER_PIVOT_FIELD ((PointerStyle)69)
-#define POINTER_CHAIN ((PointerStyle)70)
-#define POINTER_CHAIN_NOTALLOWED ((PointerStyle)71)
-#define POINTER_TIMEEVENT_MOVE ((PointerStyle)72)
-#define POINTER_TIMEEVENT_SIZE ((PointerStyle)73)
-#define POINTER_AUTOSCROLL_N ((PointerStyle)74)
-#define POINTER_AUTOSCROLL_S ((PointerStyle)75)
-#define POINTER_AUTOSCROLL_W ((PointerStyle)76)
-#define POINTER_AUTOSCROLL_E ((PointerStyle)77)
-#define POINTER_AUTOSCROLL_NW ((PointerStyle)78)
-#define POINTER_AUTOSCROLL_NE ((PointerStyle)79)
-#define POINTER_AUTOSCROLL_SW ((PointerStyle)80)
-#define POINTER_AUTOSCROLL_SE ((PointerStyle)81)
-#define POINTER_AUTOSCROLL_NS ((PointerStyle)82)
-#define POINTER_AUTOSCROLL_WE ((PointerStyle)83)
-#define POINTER_AUTOSCROLL_NSWE ((PointerStyle)84)
-#define POINTER_AIRBRUSH ((PointerStyle)85)
-#define POINTER_TEXT_VERTICAL ((PointerStyle)86)
-#define POINTER_PIVOT_DELETE ((PointerStyle)87)
+#define POINTER_ARROW ((PointerStyle)0)
+#define POINTER_NULL ((PointerStyle)1)
+#define POINTER_WAIT ((PointerStyle)2)
+#define POINTER_TEXT ((PointerStyle)3)
+#define POINTER_HELP ((PointerStyle)4)
+#define POINTER_CROSS ((PointerStyle)5)
+#define POINTER_MOVE ((PointerStyle)6)
+#define POINTER_NSIZE ((PointerStyle)7)
+#define POINTER_SSIZE ((PointerStyle)8)
+#define POINTER_WSIZE ((PointerStyle)9)
+#define POINTER_ESIZE ((PointerStyle)10)
+#define POINTER_NWSIZE ((PointerStyle)11)
+#define POINTER_NESIZE ((PointerStyle)12)
+#define POINTER_SWSIZE ((PointerStyle)13)
+#define POINTER_SESIZE ((PointerStyle)14)
+#define POINTER_WINDOW_NSIZE ((PointerStyle)15)
+#define POINTER_WINDOW_SSIZE ((PointerStyle)16)
+#define POINTER_WINDOW_WSIZE ((PointerStyle)17)
+#define POINTER_WINDOW_ESIZE ((PointerStyle)18)
+#define POINTER_WINDOW_NWSIZE ((PointerStyle)19)
+#define POINTER_WINDOW_NESIZE ((PointerStyle)20)
+#define POINTER_WINDOW_SWSIZE ((PointerStyle)21)
+#define POINTER_WINDOW_SESIZE ((PointerStyle)22)
+#define POINTER_HSPLIT ((PointerStyle)23)
+#define POINTER_VSPLIT ((PointerStyle)24)
+#define POINTER_HSIZEBAR ((PointerStyle)25)
+#define POINTER_VSIZEBAR ((PointerStyle)26)
+#define POINTER_HAND ((PointerStyle)27)
+#define POINTER_REFHAND ((PointerStyle)28)
+#define POINTER_PEN ((PointerStyle)29)
+#define POINTER_MAGNIFY ((PointerStyle)30)
+#define POINTER_FILL ((PointerStyle)31)
+#define POINTER_ROTATE ((PointerStyle)32)
+#define POINTER_HSHEAR ((PointerStyle)33)
+#define POINTER_VSHEAR ((PointerStyle)34)
+#define POINTER_MIRROR ((PointerStyle)35)
+#define POINTER_CROOK ((PointerStyle)36)
+#define POINTER_CROP ((PointerStyle)37)
+#define POINTER_MOVEPOINT ((PointerStyle)38)
+#define POINTER_MOVEBEZIERWEIGHT ((PointerStyle)39)
+#define POINTER_MOVEDATA ((PointerStyle)40)
+#define POINTER_COPYDATA ((PointerStyle)41)
+#define POINTER_LINKDATA ((PointerStyle)42)
+#define POINTER_MOVEDATALINK ((PointerStyle)43)
+#define POINTER_COPYDATALINK ((PointerStyle)44)
+#define POINTER_MOVEFILE ((PointerStyle)45)
+#define POINTER_COPYFILE ((PointerStyle)46)
+#define POINTER_LINKFILE ((PointerStyle)47)
+#define POINTER_MOVEFILELINK ((PointerStyle)48)
+#define POINTER_COPYFILELINK ((PointerStyle)49)
+#define POINTER_MOVEFILES ((PointerStyle)50)
+#define POINTER_COPYFILES ((PointerStyle)51)
+#define POINTER_NOTALLOWED ((PointerStyle)52)
+#define POINTER_DRAW_LINE ((PointerStyle)53)
+#define POINTER_DRAW_RECT ((PointerStyle)54)
+#define POINTER_DRAW_POLYGON ((PointerStyle)55)
+#define POINTER_DRAW_BEZIER ((PointerStyle)56)
+#define POINTER_DRAW_ARC ((PointerStyle)57)
+#define POINTER_DRAW_PIE ((PointerStyle)58)
+#define POINTER_DRAW_CIRCLECUT ((PointerStyle)59)
+#define POINTER_DRAW_ELLIPSE ((PointerStyle)60)
+#define POINTER_DRAW_FREEHAND ((PointerStyle)61)
+#define POINTER_DRAW_CONNECT ((PointerStyle)62)
+#define POINTER_DRAW_TEXT ((PointerStyle)63)
+#define POINTER_DRAW_CAPTION ((PointerStyle)64)
+#define POINTER_CHART ((PointerStyle)65)
+#define POINTER_DETECTIVE ((PointerStyle)66)
+#define POINTER_PIVOT_COL ((PointerStyle)67)
+#define POINTER_PIVOT_ROW ((PointerStyle)68)
+#define POINTER_PIVOT_FIELD ((PointerStyle)69)
+#define POINTER_CHAIN ((PointerStyle)70)
+#define POINTER_CHAIN_NOTALLOWED ((PointerStyle)71)
+#define POINTER_TIMEEVENT_MOVE ((PointerStyle)72)
+#define POINTER_TIMEEVENT_SIZE ((PointerStyle)73)
+#define POINTER_AUTOSCROLL_N ((PointerStyle)74)
+#define POINTER_AUTOSCROLL_S ((PointerStyle)75)
+#define POINTER_AUTOSCROLL_W ((PointerStyle)76)
+#define POINTER_AUTOSCROLL_E ((PointerStyle)77)
+#define POINTER_AUTOSCROLL_NW ((PointerStyle)78)
+#define POINTER_AUTOSCROLL_NE ((PointerStyle)79)
+#define POINTER_AUTOSCROLL_SW ((PointerStyle)80)
+#define POINTER_AUTOSCROLL_SE ((PointerStyle)81)
+#define POINTER_AUTOSCROLL_NS ((PointerStyle)82)
+#define POINTER_AUTOSCROLL_WE ((PointerStyle)83)
+#define POINTER_AUTOSCROLL_NSWE ((PointerStyle)84)
+#define POINTER_AIRBRUSH ((PointerStyle)85)
+#define POINTER_TEXT_VERTICAL ((PointerStyle)86)
+#define POINTER_PIVOT_DELETE ((PointerStyle)87)
// --> FME 2004-07-30 #i32329# Enhanced table selection
#define POINTER_TAB_SELECT_S ((PointerStyle)88)
diff --git a/vcl/inc/vcl/regband.hxx b/vcl/inc/vcl/regband.hxx
index 39f0bd3b0a08..3de3fbf70bcb 100644
--- a/vcl/inc/vcl/regband.hxx
+++ b/vcl/inc/vcl/regband.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,10 +55,10 @@ IsOver.
// element for the list with x-separations
struct ImplRegionBandSep
{
- ImplRegionBandSep* mpNextSep;
- long mnXLeft;
- long mnXRight;
- BOOL mbRemoved;
+ ImplRegionBandSep* mpNextSep;
+ long mnXLeft;
+ long mnXRight;
+ BOOL mbRemoved;
};
enum LineType { LINE_ASCENDING, LINE_DESCENDING, LINE_HORIZONTAL };
@@ -66,11 +66,11 @@ enum LineType { LINE_ASCENDING, LINE_DESCENDING, LINE_HORIZONTAL };
// element for the list with x-separations
struct ImplRegionBandPoint
{
- ImplRegionBandPoint* mpNextBandPoint;
- long mnX;
- long mnLineId;
- BOOL mbEndPoint;
- LineType meLineType;
+ ImplRegionBandPoint* mpNextBandPoint;
+ long mnX;
+ long mnLineId;
+ BOOL mbEndPoint;
+ LineType meLineType;
};
// ------------------
@@ -80,13 +80,13 @@ struct ImplRegionBandPoint
class ImplRegionBand
{
public:
- ImplRegionBand* mpNextBand; // pointer to the next element of the list
- ImplRegionBand* mpPrevBand; // pointer to the previous element of the list (only used temporaery)
- ImplRegionBandSep* mpFirstSep; // root of the list with x-separations
- ImplRegionBandPoint* mpFirstBandPoint; // root of the list with lines
- long mnYTop; // actual boundary of the band
- long mnYBottom;
- BOOL mbTouched;
+ ImplRegionBand* mpNextBand; // pointer to the next element of the list
+ ImplRegionBand* mpPrevBand; // pointer to the previous element of the list (only used temporaery)
+ ImplRegionBandSep* mpFirstSep; // root of the list with x-separations
+ ImplRegionBandPoint* mpFirstBandPoint; // root of the list with lines
+ long mnYTop; // actual boundary of the band
+ long mnYBottom;
+ BOOL mbTouched;
// create y-band with boundaries
ImplRegionBand( long nYTop, long nYBottom );
@@ -107,34 +107,34 @@ public:
const bool bIgnorePoints = true);
~ImplRegionBand();
- long GetXLeftBoundary() const;
- long GetXRightBoundary() const;
+ long GetXLeftBoundary() const;
+ long GetXRightBoundary() const;
// combine overlapping bands
- BOOL OptimizeBand();
+ BOOL OptimizeBand();
// generate separations from lines and process
// union with existing separations
- void ProcessPoints();
+ void ProcessPoints();
// insert point in the list for later processing
- BOOL InsertPoint( long nX, long nLineID,
+ BOOL InsertPoint( long nX, long nLineID,
BOOL bEndPoint, LineType eLineType );
- void Union( long nXLeft, long nXRight );
- void Intersect( long nXLeft, long nXRight );
- void Exclude( long nXLeft, long nXRight );
- void XOr( long nXLeft, long nXRight );
+ void Union( long nXLeft, long nXRight );
+ void Intersect( long nXLeft, long nXRight );
+ void Exclude( long nXLeft, long nXRight );
+ void XOr( long nXLeft, long nXRight );
- void MoveX( long nHorzMove );
- void ScaleX( double fHorzScale );
+ void MoveX( long nHorzMove );
+ void ScaleX( double fHorzScale );
- BOOL IsInside( long nX );
- BOOL IsInside( long nLeft, long nRight );
- BOOL IsOver( long nLeft, long nRight );
+ BOOL IsInside( long nX );
+ BOOL IsInside( long nLeft, long nRight );
+ BOOL IsOver( long nLeft, long nRight );
- BOOL IsEmpty() const { return ((!mpFirstSep) && (!mpFirstBandPoint)); }
+ BOOL IsEmpty() const { return ((!mpFirstSep) && (!mpFirstBandPoint)); }
- BOOL operator==( const ImplRegionBand& rRegionBand ) const;
+ BOOL operator==( const ImplRegionBand& rRegionBand ) const;
/** Split the called band at the given vertical coordinate. After the
split the called band will cover the upper part not including nY.
@@ -148,6 +148,6 @@ public:
ImplRegionBand* SplitBand (const sal_Int32 nY);
};
-#endif // _SV_REGBAND_HXX
+#endif // _SV_REGBAND_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/region.h b/vcl/inc/vcl/region.h
index 62c5e51db070..3c83d0b3a136 100644
--- a/vcl/inc/vcl/region.h
+++ b/vcl/inc/vcl/region.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +47,10 @@ const char* ImplDbgTestRegion( const void* pObj );
struct ImplRegionHandle
{
- Region* mpRegion;
- ImplRegionBand* mpCurrRectBand;
- ImplRegionBandSep* mpCurrRectBandSep;
- BOOL mbFirst;
+ Region* mpRegion;
+ ImplRegionBand* mpCurrRectBand;
+ ImplRegionBandSep* mpCurrRectBandSep;
+ BOOL mbFirst;
};
// ------------------
@@ -59,8 +59,8 @@ struct ImplRegionHandle
struct ImplRegionInfo
{
- void* mpVoidCurrRectBand;
- void* mpVoidCurrRectBandSep;
+ void* mpVoidCurrRectBand;
+ void* mpVoidCurrRectBandSep;
};
// --------------
@@ -73,9 +73,9 @@ public:
ImplRegionBase( int nCount = 1 ); // TODO: replace manual refcounting
virtual ~ImplRegionBase();
public:
- ULONG mnRefCount;
- ULONG mnRectCount;
- PolyPolygon* mpPolyPoly;
+ ULONG mnRefCount;
+ ULONG mnRectCount;
+ PolyPolygon* mpPolyPoly;
basegfx::B2DPolyPolygon* mpB2DPolyPoly;
};
@@ -84,8 +84,8 @@ class ImplRegion : public ImplRegionBase
friend class Region;
private:
- ImplRegionBand* mpFirstBand; // root of the list with y-bands
- ImplRegionBand* mpLastCheckedBand;
+ ImplRegionBand* mpFirstBand; // root of the list with y-bands
+ ImplRegionBand* mpLastCheckedBand;
public:
ImplRegion();
@@ -94,17 +94,17 @@ public:
ImplRegion( const ImplRegion& rImplRegion );
~ImplRegion();
- ImplRegionBand* ImplGetFirstRegionBand() const { return mpFirstBand; }
- PolyPolygon* ImplGetPolyPoly() const { return mpPolyPoly; }
+ ImplRegionBand* ImplGetFirstRegionBand() const { return mpFirstBand; }
+ PolyPolygon* ImplGetPolyPoly() const { return mpPolyPoly; }
- void CreateBandRange( long nYTop, long nYBottom );
- void InsertBands( long nYTop, long nYBottom );
- BOOL InsertSingleBand( ImplRegionBand* mpImplRegionBand,
+ void CreateBandRange( long nYTop, long nYBottom );
+ void InsertBands( long nYTop, long nYBottom );
+ BOOL InsertSingleBand( ImplRegionBand* mpImplRegionBand,
long nYBandPosition );
- BOOL InsertLine( const Point & rFirstPoint,
+ BOOL InsertLine( const Point & rFirstPoint,
const Point & rSecondPoint,
long nLineID );
- BOOL InsertPoint( const Point &rPoint,
+ BOOL InsertPoint( const Point &rPoint,
long nLineID,
BOOL bEndPoint, LineType eLineType );
@@ -120,18 +120,18 @@ public:
*/
void InsertBand (ImplRegionBand* pPreviousBand,
ImplRegionBand* pBandToInsert);
-
- void Union( long nLeft, long nTop, long nRight, long nBottom );
- void Exclude( long nLeft, long nTop, long nRight, long nBottom );
- void XOr( long nLeft, long nTop, long nRight, long nBottom );
+
+ void Union( long nLeft, long nTop, long nRight, long nBottom );
+ void Exclude( long nLeft, long nTop, long nRight, long nBottom );
+ void XOr( long nLeft, long nTop, long nRight, long nBottom );
// remove emtpy rects
- BOOL OptimizeBandList();
+ BOOL OptimizeBandList();
- friend SvStream& operator>>( SvStream& rIStm, Region& rRegion );
- friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion );
+ friend SvStream& operator>>( SvStream& rIStm, Region& rRegion );
+ friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion );
};
-#endif // _SV_REGION_H
+#endif // _SV_REGION_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx
index 4a9c146a158c..52516552a442 100644
--- a/vcl/inc/vcl/region.hxx
+++ b/vcl/inc/vcl/region.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,25 +61,25 @@ class VCL_DLLPUBLIC Region
friend class Bitmap;
private:
- ImplRegion* mpImplRegion;
-
- SAL_DLLPRIVATE void ImplCopyData();
- SAL_DLLPRIVATE void ImplCreateRectRegion( const Rectangle& rRect );
- SAL_DLLPRIVATE void ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly );
- SAL_DLLPRIVATE void ImplPolyPolyRegionToBandRegionFunc();
- SAL_DLLPRIVATE inline void ImplPolyPolyRegionToBandRegion();
- SAL_DLLPRIVATE const ImplRegion* ImplGetImplRegion() const { return mpImplRegion; }
- SAL_DLLPRIVATE ImplRegion* ImplGetImplRegion() { return mpImplRegion; }
- SAL_DLLPRIVATE BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
+ ImplRegion* mpImplRegion;
+
+ SAL_DLLPRIVATE void ImplCopyData();
+ SAL_DLLPRIVATE void ImplCreateRectRegion( const Rectangle& rRect );
+ SAL_DLLPRIVATE void ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly );
+ SAL_DLLPRIVATE void ImplPolyPolyRegionToBandRegionFunc();
+ SAL_DLLPRIVATE inline void ImplPolyPolyRegionToBandRegion();
+ SAL_DLLPRIVATE const ImplRegion* ImplGetImplRegion() const { return mpImplRegion; }
+ SAL_DLLPRIVATE ImplRegion* ImplGetImplRegion() { return mpImplRegion; }
+ SAL_DLLPRIVATE BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
long& nX, long& nY, long& nWidth, long& nHeight ) const;
- SAL_DLLPRIVATE BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
+ SAL_DLLPRIVATE BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
long& nX, long& nY, long& nWidth, long& nHeight ) const;
- SAL_DLLPRIVATE void ImplBeginAddRect( );
- SAL_DLLPRIVATE BOOL ImplAddRect( const Rectangle& rRect );
- SAL_DLLPRIVATE void ImplEndAddRect( );
+ SAL_DLLPRIVATE void ImplBeginAddRect( );
+ SAL_DLLPRIVATE BOOL ImplAddRect( const Rectangle& rRect );
+ SAL_DLLPRIVATE void ImplEndAddRect( );
#ifdef DBG_UTIL
- friend const char* ImplDbgTestRegion( const void* pObj );
+ friend const char* ImplDbgTestRegion( const void* pObj );
#endif
public:
@@ -92,25 +92,25 @@ public:
Region( const Region& rRegion );
~Region();
- void Move( long nHorzMove, long nVertMove );
- void Scale( double fScaleX, double fScaleY );
- BOOL Union( const Rectangle& rRegion );
- BOOL Intersect( const Rectangle& rRegion );
- BOOL Exclude( const Rectangle& rRegion );
- BOOL XOr( const Rectangle& rRegion );
- BOOL Union( const Region& rRegion );
- BOOL Intersect( const Region& rRegion );
- BOOL Exclude( const Region& rRegion );
- BOOL XOr( const Region& rRegion );
+ void Move( long nHorzMove, long nVertMove );
+ void Scale( double fScaleX, double fScaleY );
+ BOOL Union( const Rectangle& rRegion );
+ BOOL Intersect( const Rectangle& rRegion );
+ BOOL Exclude( const Rectangle& rRegion );
+ BOOL XOr( const Rectangle& rRegion );
+ BOOL Union( const Region& rRegion );
+ BOOL Intersect( const Region& rRegion );
+ BOOL Exclude( const Region& rRegion );
+ BOOL XOr( const Region& rRegion );
- RegionType GetType() const;
- BOOL IsEmpty() const { return GetType() == REGION_EMPTY; };
- BOOL IsNull() const { return GetType() == REGION_NULL; };
+ RegionType GetType() const;
+ BOOL IsEmpty() const { return GetType() == REGION_EMPTY; };
+ BOOL IsNull() const { return GetType() == REGION_NULL; };
- void SetEmpty();
- void SetNull();
+ void SetEmpty();
+ void SetNull();
- Rectangle GetBoundRect() const;
+ Rectangle GetBoundRect() const;
BOOL HasPolyPolygon() const;
PolyPolygon GetPolyPolygon() const;
@@ -120,22 +120,22 @@ public:
// or created from the constituent rectangles
basegfx::B2DPolyPolygon ConvertToB2DPolyPolygon();
- ULONG GetRectCount() const;
- RegionHandle BeginEnumRects();
- BOOL GetEnumRects( RegionHandle hRegionHandle, Rectangle& rRect );
- BOOL GetNextEnumRect( RegionHandle hRegionHandle, Rectangle& rRect )
+ ULONG GetRectCount() const;
+ RegionHandle BeginEnumRects();
+ BOOL GetEnumRects( RegionHandle hRegionHandle, Rectangle& rRect );
+ BOOL GetNextEnumRect( RegionHandle hRegionHandle, Rectangle& rRect )
{ return GetEnumRects( hRegionHandle, rRect ); }
- void EndEnumRects( RegionHandle hRegionHandle );
+ void EndEnumRects( RegionHandle hRegionHandle );
- BOOL IsInside( const Point& rPoint ) const;
- BOOL IsInside( const Rectangle& rRect ) const;
- BOOL IsOver( const Rectangle& rRect ) const;
+ BOOL IsInside( const Point& rPoint ) const;
+ BOOL IsInside( const Rectangle& rRect ) const;
+ BOOL IsOver( const Rectangle& rRect ) const;
- Region& operator=( const Region& rRegion );
- Region& operator=( const Rectangle& rRect );
+ Region& operator=( const Region& rRegion );
+ Region& operator=( const Rectangle& rRect );
- BOOL operator==( const Region& rRegion ) const;
- BOOL operator!=( const Region& rRegion ) const
+ BOOL operator==( const Region& rRegion ) const;
+ BOOL operator!=( const Region& rRegion ) const
{ return !(Region::operator==( rRegion )); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Region& rRegion );
@@ -153,6 +153,6 @@ public:
static Region GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly );
};
-#endif // _SV_REGION_HXX
+#endif // _SV_REGION_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/salatype.hxx b/vcl/inc/vcl/salatype.hxx
index 7507c6607dbe..2fd87f31ca51 100644
--- a/vcl/inc/vcl/salatype.hxx
+++ b/vcl/inc/vcl/salatype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +37,13 @@
// Derzeit doppelt und in apptypes.hxx auch vorhanden
-#define INPUT_MOUSE 0x0001
-#define INPUT_KEYBOARD 0x0002
-#define INPUT_PAINT 0x0004
-#define INPUT_TIMER 0x0008
-#define INPUT_OTHER 0x0010
-#define INPUT_MOUSEANDKEYBOARD (INPUT_MOUSE | INPUT_KEYBOARD)
-#define INPUT_ANY (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | INPUT_TIMER | INPUT_OTHER)
+#define INPUT_MOUSE 0x0001
+#define INPUT_KEYBOARD 0x0002
+#define INPUT_PAINT 0x0004
+#define INPUT_TIMER 0x0008
+#define INPUT_OTHER 0x0010
+#define INPUT_MOUSEANDKEYBOARD (INPUT_MOUSE | INPUT_KEYBOARD)
+#define INPUT_ANY (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | INPUT_TIMER | INPUT_OTHER)
#endif // _SV_SALATYPE_HXX
diff --git a/vcl/inc/vcl/salbmp.hxx b/vcl/inc/vcl/salbmp.hxx
index e2234323e80d..95bb9ac37fe2 100644
--- a/vcl/inc/vcl/salbmp.hxx
+++ b/vcl/inc/vcl/salbmp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +45,23 @@ public:
SalBitmap() {}
virtual ~SalBitmap();
- virtual bool Create( const Size& rSize,
- USHORT nBitCount,
+ virtual bool Create( const Size& rSize,
+ USHORT nBitCount,
const BitmapPalette& rPal ) = 0;
- virtual bool Create( const SalBitmap& rSalBmp ) = 0;
- virtual bool Create( const SalBitmap& rSalBmp,
+ virtual bool Create( const SalBitmap& rSalBmp ) = 0;
+ virtual bool Create( const SalBitmap& rSalBmp,
SalGraphics* pGraphics ) = 0;
- virtual bool Create( const SalBitmap& rSalBmp,
+ virtual bool Create( const SalBitmap& rSalBmp,
USHORT nNewBitCount ) = 0;
- virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
+ virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
Size& rSize,
bool bMask = false ) = 0;
- virtual void Destroy() = 0;
- virtual Size GetSize() const = 0;
- virtual USHORT GetBitCount() const = 0;
+ virtual void Destroy() = 0;
+ virtual Size GetSize() const = 0;
+ virtual USHORT GetBitCount() const = 0;
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0;
- virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0;
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0;
+ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0;
virtual bool GetSystemData( BitmapSystemData& rData ) = 0;
};
diff --git a/vcl/inc/vcl/salbtype.hxx b/vcl/inc/vcl/salbtype.hxx
index 1721e201b1ae..5ace8c9afc93 100644
--- a/vcl/inc/vcl/salbtype.hxx
+++ b/vcl/inc/vcl/salbtype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,63 +43,63 @@
// - Memory -
// ----------
-typedef BYTE* HPBYTE;
-typedef HPBYTE Scanline;
-typedef const BYTE* ConstHPBYTE;
-typedef ConstHPBYTE ConstScanline;
+typedef BYTE* HPBYTE;
+typedef HPBYTE Scanline;
+typedef const BYTE* ConstHPBYTE;
+typedef ConstHPBYTE ConstScanline;
// ------------------
// - Bitmap formats -
// ------------------
-#define BMP_FORMAT_BOTTOM_UP 0x00000000UL
-#define BMP_FORMAT_TOP_DOWN 0x80000000UL
+#define BMP_FORMAT_BOTTOM_UP 0x00000000UL
+#define BMP_FORMAT_TOP_DOWN 0x80000000UL
-#define BMP_FORMAT_1BIT_MSB_PAL 0x00000001UL
-#define BMP_FORMAT_1BIT_LSB_PAL 0x00000002UL
+#define BMP_FORMAT_1BIT_MSB_PAL 0x00000001UL
+#define BMP_FORMAT_1BIT_LSB_PAL 0x00000002UL
-#define BMP_FORMAT_4BIT_MSN_PAL 0x00000004UL
-#define BMP_FORMAT_4BIT_LSN_PAL 0x00000008UL
+#define BMP_FORMAT_4BIT_MSN_PAL 0x00000004UL
+#define BMP_FORMAT_4BIT_LSN_PAL 0x00000008UL
-#define BMP_FORMAT_8BIT_PAL 0x00000010UL
-#define BMP_FORMAT_8BIT_TC_MASK 0x00000020UL
+#define BMP_FORMAT_8BIT_PAL 0x00000010UL
+#define BMP_FORMAT_8BIT_TC_MASK 0x00000020UL
-// #define BMP_FORMAT_16BIT_TC_MASK 0x00000040UL
+// #define BMP_FORMAT_16BIT_TC_MASK 0x00000040UL
-#define BMP_FORMAT_24BIT_TC_BGR 0x00000080UL
-#define BMP_FORMAT_24BIT_TC_RGB 0x00000100UL
-#define BMP_FORMAT_24BIT_TC_MASK 0x00000200UL
+#define BMP_FORMAT_24BIT_TC_BGR 0x00000080UL
+#define BMP_FORMAT_24BIT_TC_RGB 0x00000100UL
+#define BMP_FORMAT_24BIT_TC_MASK 0x00000200UL
-#define BMP_FORMAT_32BIT_TC_ABGR 0x00000400UL
-#define BMP_FORMAT_32BIT_TC_ARGB 0x00000800UL
-#define BMP_FORMAT_32BIT_TC_BGRA 0x00001000UL
-#define BMP_FORMAT_32BIT_TC_RGBA 0x00002000UL
-#define BMP_FORMAT_32BIT_TC_MASK 0x00004000UL
+#define BMP_FORMAT_32BIT_TC_ABGR 0x00000400UL
+#define BMP_FORMAT_32BIT_TC_ARGB 0x00000800UL
+#define BMP_FORMAT_32BIT_TC_BGRA 0x00001000UL
+#define BMP_FORMAT_32BIT_TC_RGBA 0x00002000UL
+#define BMP_FORMAT_32BIT_TC_MASK 0x00004000UL
-#define BMP_FORMAT_16BIT_TC_MSB_MASK 0x00008000UL
-#define BMP_FORMAT_16BIT_TC_LSB_MASK 0x00010000UL
+#define BMP_FORMAT_16BIT_TC_MSB_MASK 0x00008000UL
+#define BMP_FORMAT_16BIT_TC_LSB_MASK 0x00010000UL
-#define BMP_SCANLINE_ADJUSTMENT( Mac_nBmpFormat ) ( (Mac_nBmpFormat) & 0x80000000UL )
-#define BMP_SCANLINE_FORMAT( Mac_nBmpFormat ) ( (Mac_nBmpFormat) & 0x7FFFFFFFUL )
+#define BMP_SCANLINE_ADJUSTMENT( Mac_nBmpFormat ) ( (Mac_nBmpFormat) & 0x80000000UL )
+#define BMP_SCANLINE_FORMAT( Mac_nBmpFormat ) ( (Mac_nBmpFormat) & 0x7FFFFFFFUL )
// ------------------------------------------------------------------
-#define MASK_TO_COLOR( d_nVal, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_Col ) \
-ULONG _def_cR = (BYTE) ( d_RS < 0L ? ( (d_nVal) & d_RM ) << -d_RS : ( (d_nVal) & d_RM ) >> d_RS ); \
-ULONG _def_cG = (BYTE) ( d_GS < 0L ? ( (d_nVal) & d_GM ) << -d_GS : ( (d_nVal) & d_GM ) >> d_GS ); \
-ULONG _def_cB = (BYTE) ( d_BS < 0L ? ( (d_nVal) & d_BM ) << -d_BS : ( (d_nVal) & d_BM ) >> d_BS ); \
-d_Col = BitmapColor( (BYTE) ( _def_cR | ( ( _def_cR & mnROr ) >> mnROrShift ) ), \
- (BYTE) ( _def_cG | ( ( _def_cG & mnGOr ) >> mnGOrShift ) ), \
+#define MASK_TO_COLOR( d_nVal, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_Col ) \
+ULONG _def_cR = (BYTE) ( d_RS < 0L ? ( (d_nVal) & d_RM ) << -d_RS : ( (d_nVal) & d_RM ) >> d_RS ); \
+ULONG _def_cG = (BYTE) ( d_GS < 0L ? ( (d_nVal) & d_GM ) << -d_GS : ( (d_nVal) & d_GM ) >> d_GS ); \
+ULONG _def_cB = (BYTE) ( d_BS < 0L ? ( (d_nVal) & d_BM ) << -d_BS : ( (d_nVal) & d_BM ) >> d_BS ); \
+d_Col = BitmapColor( (BYTE) ( _def_cR | ( ( _def_cR & mnROr ) >> mnROrShift ) ), \
+ (BYTE) ( _def_cG | ( ( _def_cG & mnGOr ) >> mnGOrShift ) ), \
(BYTE) ( _def_cB | ( ( _def_cB & mnBOr ) >> mnBOrShift ) ) );
// ------------------------------------------------------------------
#define COLOR_TO_MASK( d_rCol, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS ) \
-( ( ( ( d_RS < 0L ) ? ( (UINT32) (d_rCol).GetRed() >> -d_RS ) : \
- ( (UINT32) (d_rCol).GetRed() << d_RS ) ) & d_RM ) | \
- ( ( ( d_GS < 0L ) ? ( (UINT32) (d_rCol).GetGreen() >> -d_GS ) : \
- ( (UINT32) (d_rCol).GetGreen() << d_GS ) ) & d_GM ) | \
- ( ( ( d_BS < 0L ) ? ( (UINT32) (d_rCol).GetBlue() >> -d_BS ) : \
+( ( ( ( d_RS < 0L ) ? ( (UINT32) (d_rCol).GetRed() >> -d_RS ) : \
+ ( (UINT32) (d_rCol).GetRed() << d_RS ) ) & d_RM ) | \
+ ( ( ( d_GS < 0L ) ? ( (UINT32) (d_rCol).GetGreen() >> -d_GS ) : \
+ ( (UINT32) (d_rCol).GetGreen() << d_GS ) ) & d_GM ) | \
+ ( ( ( d_BS < 0L ) ? ( (UINT32) (d_rCol).GetBlue() >> -d_BS ) : \
( (UINT32) (d_rCol).GetBlue() << d_BS ) ) & d_BM ) )
// ---------------
@@ -111,59 +111,59 @@ class Color;
class VCL_DLLPUBLIC BitmapColor
{
private:
-
+
// !!! Achtung:
// !!! da auf die Member dieser Klasse via memcpy
// !!! zugegriffen wird, darf diese Klasse weder
// !!! in der Groesse noch der Reihenfolge der
// !!! Member veraendert werden (KA 02.09.97)
- BYTE mcBlueOrIndex;
- BYTE mcGreen;
- BYTE mcRed;
- BYTE mbIndex;
+ BYTE mcBlueOrIndex;
+ BYTE mcGreen;
+ BYTE mcRed;
+ BYTE mbIndex;
public:
- inline BitmapColor();
- inline BitmapColor( const BitmapColor& rBitmapColor );
- inline BitmapColor( BYTE cRed, BYTE cGreen, BYTE cBlue );
- inline BitmapColor( const Color& rColor );
- inline BitmapColor( BYTE cIndex );
- inline ~BitmapColor() {};
+ inline BitmapColor();
+ inline BitmapColor( const BitmapColor& rBitmapColor );
+ inline BitmapColor( BYTE cRed, BYTE cGreen, BYTE cBlue );
+ inline BitmapColor( const Color& rColor );
+ inline BitmapColor( BYTE cIndex );
+ inline ~BitmapColor() {};
- inline BOOL operator==( const BitmapColor& rBitmapColor ) const;
- inline BOOL operator!=( const BitmapColor& rBitmapColor ) const;
+ inline BOOL operator==( const BitmapColor& rBitmapColor ) const;
+ inline BOOL operator!=( const BitmapColor& rBitmapColor ) const;
inline BitmapColor& operator=( const BitmapColor& rBitmapColor );
- inline BOOL IsIndex() const;
+ inline BOOL IsIndex() const;
- inline BYTE GetRed() const;
- inline void SetRed( BYTE cRed );
+ inline BYTE GetRed() const;
+ inline void SetRed( BYTE cRed );
- inline BYTE GetGreen() const;
- inline void SetGreen( BYTE cGreen );
+ inline BYTE GetGreen() const;
+ inline void SetGreen( BYTE cGreen );
- inline BYTE GetBlue() const;
- inline void SetBlue( BYTE cBlue );
+ inline BYTE GetBlue() const;
+ inline void SetBlue( BYTE cBlue );
- inline BYTE GetIndex() const;
- inline void SetIndex( BYTE cIndex );
+ inline BYTE GetIndex() const;
+ inline void SetIndex( BYTE cIndex );
- operator Color() const;
- inline operator BYTE() const;
+ operator Color() const;
+ inline operator BYTE() const;
inline BYTE GetBlueOrIndex() const;
inline BitmapColor& Invert();
- inline BYTE GetLuminance() const;
+ inline BYTE GetLuminance() const;
inline BitmapColor& IncreaseLuminance( BYTE cGreyInc );
inline BitmapColor& DecreaseLuminance( BYTE cGreyDec );
+
+ inline BitmapColor& Merge( const BitmapColor& rColor, BYTE cTransparency );
+ inline BitmapColor& Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTransparency );
- inline BitmapColor& Merge( const BitmapColor& rColor, BYTE cTransparency );
- inline BitmapColor& Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTransparency );
-
- inline ULONG GetColorError( const BitmapColor& rBitmapColor ) const;
+ inline ULONG GetColorError( const BitmapColor& rBitmapColor ) const;
};
// ---------------
@@ -179,35 +179,35 @@ class VCL_DLLPUBLIC BitmapPalette
private:
- BitmapColor* mpBitmapColor;
- USHORT mnCount;
+ BitmapColor* mpBitmapColor;
+ USHORT mnCount;
public:
-
+
SAL_DLLPRIVATE inline BitmapColor* ImplGetColorBuffer() const;
public:
- inline BitmapPalette();
- inline BitmapPalette( const BitmapPalette& rBitmapPalette );
- inline BitmapPalette( USHORT nCount );
- inline ~BitmapPalette();
+ inline BitmapPalette();
+ inline BitmapPalette( const BitmapPalette& rBitmapPalette );
+ inline BitmapPalette( USHORT nCount );
+ inline ~BitmapPalette();
- inline BitmapPalette& operator=( const BitmapPalette& rBitmapPalette );
- inline BOOL operator==( const BitmapPalette& rBitmapPalette ) const;
- inline BOOL operator!=( const BitmapPalette& rBitmapPalette ) const;
- inline BOOL operator!();
+ inline BitmapPalette& operator=( const BitmapPalette& rBitmapPalette );
+ inline BOOL operator==( const BitmapPalette& rBitmapPalette ) const;
+ inline BOOL operator!=( const BitmapPalette& rBitmapPalette ) const;
+ inline BOOL operator!();
- inline USHORT GetEntryCount() const;
- inline void SetEntryCount( USHORT nCount );
+ inline USHORT GetEntryCount() const;
+ inline void SetEntryCount( USHORT nCount );
- inline const BitmapColor& operator[]( USHORT nIndex ) const;
- inline BitmapColor& operator[]( USHORT nIndex );
+ inline const BitmapColor& operator[]( USHORT nIndex ) const;
+ inline BitmapColor& operator[]( USHORT nIndex );
- inline USHORT GetBestIndex( const BitmapColor& rCol ) const;
- bool IsGreyPalette() const;
+ inline USHORT GetBestIndex( const BitmapColor& rCol ) const;
+ bool IsGreyPalette() const;
};
// ---------------
@@ -216,43 +216,43 @@ public:
class VCL_DLLPUBLIC ColorMask
{
- ULONG mnRMask;
- ULONG mnGMask;
- ULONG mnBMask;
- long mnRShift;
- long mnGShift;
- long mnBShift;
- ULONG mnROrShift;
- ULONG mnGOrShift;
- ULONG mnBOrShift;
- ULONG mnROr;
- ULONG mnGOr;
- ULONG mnBOr;
+ ULONG mnRMask;
+ ULONG mnGMask;
+ ULONG mnBMask;
+ long mnRShift;
+ long mnGShift;
+ long mnBShift;
+ ULONG mnROrShift;
+ ULONG mnGOrShift;
+ ULONG mnBOrShift;
+ ULONG mnROr;
+ ULONG mnGOr;
+ ULONG mnBOr;
SAL_DLLPRIVATE inline long ImplCalcMaskShift( ULONG nMask, ULONG& rOr, ULONG& rOrShift ) const;
public:
- inline ColorMask( ULONG nRedMask = 0UL, ULONG nGreenMask = 0UL, ULONG nBlueMask = 0UL );
- inline ~ColorMask() {}
+ inline ColorMask( ULONG nRedMask = 0UL, ULONG nGreenMask = 0UL, ULONG nBlueMask = 0UL );
+ inline ~ColorMask() {}
- inline ULONG GetRedMask() const;
- inline ULONG GetGreenMask() const;
- inline ULONG GetBlueMask() const;
+ inline ULONG GetRedMask() const;
+ inline ULONG GetGreenMask() const;
+ inline ULONG GetBlueMask() const;
- inline void GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
- inline void SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
+ inline void GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
+ inline void SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
- inline void GetColorFor16BitMSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
- inline void SetColorFor16BitMSB( const BitmapColor& rColor, HPBYTE pPixel ) const;
- inline void GetColorFor16BitLSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
- inline void SetColorFor16BitLSB( const BitmapColor& rColor, HPBYTE pPixel ) const;
+ inline void GetColorFor16BitMSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
+ inline void SetColorFor16BitMSB( const BitmapColor& rColor, HPBYTE pPixel ) const;
+ inline void GetColorFor16BitLSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
+ inline void SetColorFor16BitLSB( const BitmapColor& rColor, HPBYTE pPixel ) const;
- inline void GetColorFor24Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
- inline void SetColorFor24Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
+ inline void GetColorFor24Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
+ inline void SetColorFor24Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
- inline void GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
- inline void SetColorFor32Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
+ inline void GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
+ inline void SetColorFor32Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
};
// ---------------
@@ -261,14 +261,14 @@ public:
struct VCL_DLLPUBLIC BitmapBuffer
{
- ULONG mnFormat;
- long mnWidth;
- long mnHeight;
- long mnScanlineSize;
- USHORT mnBitCount;
- ColorMask maColorMask;
- BitmapPalette maPalette;
- BYTE* mpBits;
+ ULONG mnFormat;
+ long mnWidth;
+ long mnHeight;
+ long mnScanlineSize;
+ USHORT mnBitCount;
+ ColorMask maColorMask;
+ BitmapPalette maPalette;
+ BYTE* mpBits;
BitmapBuffer(){}
~BitmapBuffer() {}
@@ -278,56 +278,56 @@ struct VCL_DLLPUBLIC BitmapBuffer
// - StretchAndConvert -
// ---------------------
-VCL_DLLPUBLIC BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
+VCL_DLLPUBLIC BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
ULONG nDstBitmapFormat, BitmapPalette* pDstPal = NULL, ColorMask* pDstMask = NULL );
// ------------------------------------------------------------------
inline BitmapColor::BitmapColor() :
- mcBlueOrIndex ( 0 ),
- mcGreen ( 0 ),
- mcRed ( 0 ),
- mbIndex ( FALSE )
+ mcBlueOrIndex ( 0 ),
+ mcGreen ( 0 ),
+ mcRed ( 0 ),
+ mbIndex ( FALSE )
{
}
// ------------------------------------------------------------------
inline BitmapColor::BitmapColor( BYTE cRed, BYTE cGreen, BYTE cBlue ) :
- mcBlueOrIndex ( cBlue ),
- mcGreen ( cGreen ),
- mcRed ( cRed ),
- mbIndex ( FALSE )
+ mcBlueOrIndex ( cBlue ),
+ mcGreen ( cGreen ),
+ mcRed ( cRed ),
+ mbIndex ( FALSE )
{
}
// ------------------------------------------------------------------
inline BitmapColor::BitmapColor( const BitmapColor& rBitmapColor ) :
- mcBlueOrIndex ( rBitmapColor.mcBlueOrIndex ),
- mcGreen ( rBitmapColor.mcGreen ),
- mcRed ( rBitmapColor.mcRed ),
- mbIndex ( rBitmapColor.mbIndex )
+ mcBlueOrIndex ( rBitmapColor.mcBlueOrIndex ),
+ mcGreen ( rBitmapColor.mcGreen ),
+ mcRed ( rBitmapColor.mcRed ),
+ mbIndex ( rBitmapColor.mbIndex )
{
}
// ------------------------------------------------------------------
inline BitmapColor::BitmapColor( const Color& rColor ) :
- mcBlueOrIndex ( rColor.GetBlue() ),
- mcGreen ( rColor.GetGreen() ),
- mcRed ( rColor.GetRed() ),
- mbIndex ( 0 )
+ mcBlueOrIndex ( rColor.GetBlue() ),
+ mcGreen ( rColor.GetGreen() ),
+ mcRed ( rColor.GetRed() ),
+ mbIndex ( 0 )
{
}
// ------------------------------------------------------------------
inline BitmapColor::BitmapColor( BYTE cIndex ) :
- mcBlueOrIndex ( cIndex ),
- mcGreen ( 0 ),
- mcRed ( 0 ),
- mbIndex ( TRUE )
+ mcBlueOrIndex ( cIndex ),
+ mcGreen ( 0 ),
+ mcRed ( 0 ),
+ mbIndex ( TRUE )
{
}
@@ -498,26 +498,26 @@ inline BitmapColor& BitmapColor::DecreaseLuminance( BYTE cGreyDec )
// ------------------------------------------------------------------
-inline BitmapColor& BitmapColor::Merge( const BitmapColor& rBitmapColor, BYTE cTransparency )
+inline BitmapColor& BitmapColor::Merge( const BitmapColor& rBitmapColor, BYTE cTransparency )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
DBG_ASSERT( !rBitmapColor.mbIndex, "Pixel represents index into colortable!" );
mcBlueOrIndex = COLOR_CHANNEL_MERGE( mcBlueOrIndex, rBitmapColor.mcBlueOrIndex, cTransparency );
mcGreen = COLOR_CHANNEL_MERGE( mcGreen, rBitmapColor.mcGreen, cTransparency );
mcRed = COLOR_CHANNEL_MERGE( mcRed, rBitmapColor.mcRed, cTransparency );
-
+
return *this;
}
// ------------------------------------------------------------------
-inline BitmapColor& BitmapColor::Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTransparency )
+inline BitmapColor& BitmapColor::Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTransparency )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
mcBlueOrIndex = COLOR_CHANNEL_MERGE( mcBlueOrIndex, cB, cTransparency );
mcGreen = COLOR_CHANNEL_MERGE( mcGreen, cG, cTransparency );
mcRed = COLOR_CHANNEL_MERGE( mcRed, cR, cTransparency );
-
+
return *this;
}
@@ -535,8 +535,8 @@ inline ULONG BitmapColor::GetColorError( const BitmapColor& rBitmapColor ) const
// ------------------------------------------------------------------
inline BitmapPalette::BitmapPalette() :
- mpBitmapColor ( NULL ),
- mnCount ( 0 )
+ mpBitmapColor ( NULL ),
+ mnCount ( 0 )
{
}
@@ -654,9 +654,9 @@ inline void BitmapPalette::SetEntryCount( USHORT nCount )
{
const ULONG nNewSize = nCount * sizeof( BitmapColor );
const ULONG nMinSize = Min( mnCount, nCount ) * sizeof( BitmapColor );
- BYTE* pNewColor = new BYTE[ nNewSize ];
+ BYTE* pNewColor = new BYTE[ nNewSize ];
- if ( nMinSize && mpBitmapColor )
+ if ( nMinSize && mpBitmapColor )
memcpy( pNewColor, mpBitmapColor, nMinSize );
delete[] (BYTE*) mpBitmapColor;
memset( pNewColor + nMinSize, 0, nNewSize - nMinSize );
@@ -737,9 +737,9 @@ inline ColorMask::ColorMask( ULONG nRedMask, ULONG nGreenMask, ULONG nBlueMask )
inline long ColorMask::ImplCalcMaskShift( ULONG nMask, ULONG& rOr, ULONG& rOrShift ) const
{
- long nShift;
- long nRet;
- ULONG nLen = 0UL;
+ long nShift;
+ long nRet;
+ ULONG nLen = 0UL;
// bei welchen Bits faengt die Maske an
for( nShift = 31L; ( nShift >= 0L ) && !( nMask & ( 1 << (ULONG) nShift ) ); nShift-- )
diff --git a/vcl/inc/vcl/salctrlhandle.hxx b/vcl/inc/vcl/salctrlhandle.hxx
index 2cdb5af3a3e5..d3fe8dec3e94 100644
--- a/vcl/inc/vcl/salctrlhandle.hxx
+++ b/vcl/inc/vcl/salctrlhandle.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 SalControlHandle
virtual ~SalControlHandle();
// TODO: derive Sal implementation
- //SalControlHandleData maData;
+ //SalControlHandleData maData;
};
#endif
diff --git a/vcl/inc/vcl/salctype.hxx b/vcl/inc/vcl/salctype.hxx
index c7136b98b5bf..5e9927551390 100644
--- a/vcl/inc/vcl/salctype.hxx
+++ b/vcl/inc/vcl/salctype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +35,17 @@
// - Defines -
// -----------
-#define CVT_UNKNOWN (0x00000000UL)
-#define CVT_BMP (0x00000001UL)
-#define CVT_GIF (0x00000002UL)
-#define CVT_JPG (0x00000003UL)
-#define CVT_MET (0x00000004UL)
-#define CVT_PCT (0x00000005UL)
-#define CVT_PNG (0x00000006UL)
-#define CVT_SVM (0x00000007UL)
-#define CVT_TIF (0x00000008UL)
-#define CVT_WMF (0x00000009UL)
-#define CVT_EMF (0x0000000aUL)
+#define CVT_UNKNOWN (0x00000000UL)
+#define CVT_BMP (0x00000001UL)
+#define CVT_GIF (0x00000002UL)
+#define CVT_JPG (0x00000003UL)
+#define CVT_MET (0x00000004UL)
+#define CVT_PCT (0x00000005UL)
+#define CVT_PNG (0x00000006UL)
+#define CVT_SVM (0x00000007UL)
+#define CVT_TIF (0x00000008UL)
+#define CVT_WMF (0x00000009UL)
+#define CVT_EMF (0x0000000aUL)
// ---------------
// - ConvertData -
@@ -61,9 +61,9 @@ private:
public:
- Graphic maGraphic;
- SvStream& mrStm;
- ULONG mnFormat;
+ Graphic maGraphic;
+ SvStream& mrStm;
+ ULONG mnFormat;
ConvertData( const Graphic& rGraphic, SvStream& rStm, ULONG nFormat ) :
maGraphic( rGraphic ), mrStm( rStm ), mnFormat( nFormat ) {}
@@ -74,7 +74,7 @@ public:
// - Callback -
// ------------
-typedef ULONG (*SALGRFCVTPROC)( void* pInst,
+typedef ULONG (*SALGRFCVTPROC)( void* pInst,
ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
ULONG nOutFormat, void** ppOutBuffer );
diff --git a/vcl/inc/vcl/saldatabasic.hxx b/vcl/inc/vcl/saldatabasic.hxx
index c4716507e7e6..77968c95aef4 100644
--- a/vcl/inc/vcl/saldatabasic.hxx
+++ b/vcl/inc/vcl/saldatabasic.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +36,8 @@
class VCL_DLLPUBLIC SalData
{
public:
- SalInstance* m_pInstance; // pointer to instance
- oslModule m_pPlugin; // plugin library handle
+ SalInstance* m_pInstance; // pointer to instance
+ oslModule m_pPlugin; // plugin library handle
SalData();
virtual ~SalData();
diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx
index 9e7a1ab0e007..3e4671dd3a7d 100644
--- a/vcl/inc/vcl/salframe.hxx
+++ b/vcl/inc/vcl/salframe.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ struct SystemEnvData;
#define SAL_FRAME_TOTOP_RESTOREWHENMIN ((USHORT)0x0001)
#define SAL_FRAME_TOTOP_FOREGROUNDTASK ((USHORT)0x0002)
#define SAL_FRAME_TOTOP_GRABFOCUS ((USHORT)0x0004)
-#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((USHORT)0x0008)
+#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((USHORT)0x0008)
#define SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE ((USHORT)0x0001)
#define SAL_FRAME_ENDEXTTEXTINPUT_CANCEL ((USHORT)0x0002)
@@ -143,76 +143,76 @@ struct SystemParentData;
class VCL_DLLPUBLIC SalFrame : public vcl::DeletionNotifier
{
// the VCL window corresponding to this frame
- Window* m_pWindow;
- SALFRAMEPROC m_pProc;
+ Window* m_pWindow;
+ SALFRAMEPROC m_pProc;
public: // public for Sal Implementation
SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {}
virtual ~SalFrame();
public: // public for Sal Implementation
- SalFrameGeometry maGeometry;
+ SalFrameGeometry maGeometry;
public:
// SalGraphics or NULL, but two Graphics for all SalFrames
// must be returned
- virtual SalGraphics* GetGraphics() = 0;
- virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
+ virtual SalGraphics* GetGraphics() = 0;
+ virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
// Event must be destroyed, when Frame is destroyed
// When Event is called, SalInstance::Yield() must be returned
- virtual BOOL PostEvent( void* pData ) = 0;
+ virtual BOOL PostEvent( void* pData ) = 0;
- virtual void SetTitle( const XubString& rTitle ) = 0;
- virtual void SetIcon( USHORT nIcon ) = 0;
+ virtual void SetTitle( const XubString& rTitle ) = 0;
+ virtual void SetIcon( USHORT nIcon ) = 0;
virtual void SetRepresentedURL( const rtl::OUString& );
virtual void SetMenu( SalMenu *pSalMenu ) = 0;
virtual void DrawMenuBar() = 0;
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) = 0;
-
+
// Before the window is visible, a resize event
// must be sent with the correct size
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0;
- virtual void Enable( BOOL bEnable ) = 0;
+ virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0;
+ virtual void Enable( BOOL bEnable ) = 0;
// Set ClientSize and Center the Window to the desktop
// and send/post a resize message
virtual void SetMinClientSize( long nWidth, long nHeight ) = 0;
virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0;
- virtual void GetClientSize( long& rWidth, long& rHeight ) = 0;
- virtual void GetWorkArea( Rectangle& rRect ) = 0;
- virtual SalFrame* GetParent() const = 0;
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0;
+ virtual void GetClientSize( long& rWidth, long& rHeight ) = 0;
+ virtual void GetWorkArea( Rectangle& rRect ) = 0;
+ virtual SalFrame* GetParent() const = 0;
// Note: x will be mirrored at parent if UI mirroring is active
- SalFrameGeometry GetGeometry();
- const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; }
- virtual void SetWindowState( const SalFrameState* pState ) = 0;
- virtual BOOL GetWindowState( SalFrameState* pState ) = 0;
- virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) = 0;
+ SalFrameGeometry GetGeometry();
+ const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; }
+ virtual void SetWindowState( const SalFrameState* pState ) = 0;
+ virtual BOOL GetWindowState( SalFrameState* pState ) = 0;
+ virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) = 0;
// Enable/Disable ScreenSaver, SystemAgents, ...
- virtual void StartPresentation( BOOL bStart ) = 0;
+ virtual void StartPresentation( BOOL bStart ) = 0;
// Show Window over all other Windows
- virtual void SetAlwaysOnTop( BOOL bOnTop ) = 0;
+ virtual void SetAlwaysOnTop( BOOL bOnTop ) = 0;
// Window to top and grab focus
- virtual void ToTop( USHORT nFlags ) = 0;
+ virtual void ToTop( USHORT nFlags ) = 0;
// this function can call with the same
// pointer style
- virtual void SetPointer( PointerStyle ePointerStyle ) = 0;
- virtual void CaptureMouse( BOOL bMouse ) = 0;
- virtual void SetPointerPos( long nX, long nY ) = 0;
+ virtual void SetPointer( PointerStyle ePointerStyle ) = 0;
+ virtual void CaptureMouse( BOOL bMouse ) = 0;
+ virtual void SetPointerPos( long nX, long nY ) = 0;
// flush output buffer
- virtual void Flush( void) = 0;
+ virtual void Flush( void) = 0;
virtual void Flush( const Rectangle& );
// flush output buffer, wait till outstanding operations are done
- virtual void Sync() = 0;
+ virtual void Sync() = 0;
- virtual void SetInputContext( SalInputContext* pContext ) = 0;
- virtual void EndExtTextInput( USHORT nFlags ) = 0;
+ virtual void SetInputContext( SalInputContext* pContext ) = 0;
+ virtual void EndExtTextInput( USHORT nFlags ) = 0;
- virtual String GetKeyName( USHORT nKeyCode ) = 0;
- virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ) = 0;
+ virtual String GetKeyName( USHORT nKeyCode ) = 0;
+ virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ) = 0;
// returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType'
// returns FALSE if no mapping exists or function not supported
@@ -221,17 +221,17 @@ public:
// returns the input language used for the last key stroke
// may be LANGUAGE_DONTKNOW if not supported by the OS
- virtual LanguageType GetInputLanguage() = 0;
+ virtual LanguageType GetInputLanguage() = 0;
- virtual SalBitmap* SnapShot() = 0;
+ virtual SalBitmap* SnapShot() = 0;
- virtual void UpdateSettings( AllSettings& rSettings ) = 0;
+ virtual void UpdateSettings( AllSettings& rSettings ) = 0;
- virtual void Beep( SoundType eSoundType ) = 0;
+ virtual void Beep( SoundType eSoundType ) = 0;
// returns system data (most prominent: window handle)
- virtual const SystemEnvData* GetSystemData() const = 0;
-
+ virtual const SystemEnvData* GetSystemData() const = 0;
+
// sets a background bitmap on the frame; the implementation
// must not make assumptions about the lifetime of the passed SalBitmap
// but should copy its contents to an own buffer
@@ -245,7 +245,7 @@ public:
Point maPos; // in frame coordinates
};
- virtual SalPointerState GetPointerState() = 0;
+ virtual SalPointerState GetPointerState() = 0;
struct SalIndicatorState
{
@@ -257,12 +257,12 @@ public:
virtual void SimulateKeyPress( USHORT nKeyCode ) = 0;
// set new parent window
- virtual void SetParent( SalFrame* pNewParent ) = 0;
+ virtual void SetParent( SalFrame* pNewParent ) = 0;
// reparent window to act as a plugin; implementation
// may choose to use a new system window inetrnally
// return false to indicate failure
- virtual bool SetPluginParent( SystemParentData* pNewParent ) = 0;
-
+ virtual bool SetPluginParent( SystemParentData* pNewParent ) = 0;
+
// move the frame to a new screen
virtual void SetScreenNumber( unsigned int nScreen ) = 0;
@@ -270,18 +270,18 @@ public:
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
- virtual void ResetClipRegion() = 0;
+ virtual void ResetClipRegion() = 0;
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects ) = 0;
+ virtual void BeginSetClipRegion( ULONG nRects ) = 0;
// add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
// done setting up the clipregion
- virtual void EndSetClipRegion() = 0;
+ virtual void EndSetClipRegion() = 0;
// Callbacks (indepent part in vcl/source/window/winproc.cxx)
// for default message handling return 0
- void SetCallback( Window* pWindow, SALFRAMEPROC pProc )
+ void SetCallback( Window* pWindow, SALFRAMEPROC pProc )
{ m_pWindow = pWindow; m_pProc = pProc; }
// returns the instance set
@@ -290,7 +290,7 @@ public:
// Call the callback set; this sometimes necessary for implementation classes
// that should not now more than necessary about the SalFrame implementation
// (e.g. input methods, printer update handlers).
- long CallCallback( USHORT nEvent, const void* pEvent ) const
+ long CallCallback( USHORT nEvent, const void* pEvent ) const
{ return m_pProc ? m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; }
};
diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx
index 0e29449ebda7..a92a7d91cdf1 100644
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ typedef std::vector< sal_Int32 > Int32Vector;
class VCL_DLLPUBLIC SalGraphics
{
- int m_nLayout; // 0: mirroring off, 1: mirror x-axis
+ int m_nLayout; // 0: mirroring off, 1: mirror x-axis
protected:
// flags which hold the SetAntialiasing() value from OutputDevice
@@ -115,48 +115,48 @@ public:
virtual ~SalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0;
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel( long nX, long nY ) = 0;
- virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0;
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) = 0;
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) = 0;
- virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0;
+ virtual void drawPixel( long nX, long nY ) = 0;
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0;
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) = 0;
+ virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) = 0;
+ virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0;
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ) = 0;
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ) = 0;
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0;
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0;
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) = 0;
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0;
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0;
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) = 0;
// CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
long nSrcHeight, USHORT nFlags ) = 0;
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
- virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0;
- virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0;
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0;
+ virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0;
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor ) = 0;
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
const SalBitmap& rMaskBitmap ) = 0;
- virtual void drawMask( const SalTwoRect* pPosAry,
+ virtual void drawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor ) = 0;
- virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual SalColor getPixel( long nX, long nY ) = 0;
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual SalColor getPixel( long nX, long nY ) = 0;
// invert --> ClipRegion (only Windows or VirDevs)
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0;
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0;
+ virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) = 0;
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) = 0;
// native widget rendering methods that require mirroring
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
@@ -183,7 +183,7 @@ protected:
otherwise. In this case, clients should try to emulate alpha
compositing themselves
*/
- virtual bool drawAlphaBitmap( const SalTwoRect&,
+ virtual bool drawAlphaBitmap( const SalTwoRect&,
const SalBitmap& rSourceBitmap,
const SalBitmap& rAlphaBitmap ) = 0;
/** Render solid rectangle with given transparency
@@ -192,61 +192,61 @@ protected:
Transparency value (0-255) to use. 0 blits and opaque, 255 a
fully transparent rectangle
*/
- virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) = 0;
+ virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) = 0;
public:
// public SalGraphics methods, the interface to the independent vcl part
// get device resolution
- virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
// get the depth of the device
- virtual USHORT GetBitCount() = 0;
+ virtual USHORT GetBitCount() = 0;
// get the width of the device
- virtual long GetGraphicsWidth() const = 0;
+ virtual long GetGraphicsWidth() const = 0;
// set the clip region to empty
- virtual void ResetClipRegion() = 0;
+ virtual void ResetClipRegion() = 0;
// begin setting the clip region, add rectangles to the
// region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount ) = 0;
+ virtual void BeginSetClipRegion( ULONG nCount ) = 0;
// all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion() = 0;
+ virtual void EndSetClipRegion() = 0;
// set the line color to transparent (= don't draw lines)
- virtual void SetLineColor() = 0;
+ virtual void SetLineColor() = 0;
// set the line color to a specific color
- virtual void SetLineColor( SalColor nSalColor ) = 0;
+ virtual void SetLineColor( SalColor nSalColor ) = 0;
// set the fill color to transparent (= don't fill)
- virtual void SetFillColor() = 0;
+ virtual void SetFillColor() = 0;
// set the fill color to a specific color, shapes will be
// filled accordingly
- virtual void SetFillColor( SalColor nSalColor ) = 0;
+ virtual void SetFillColor( SalColor nSalColor ) = 0;
// enable/disable XOR drawing
- virtual void SetXORMode( bool bSet, bool bInvertOnly ) = 0;
+ virtual void SetXORMode( bool bSet, bool bInvertOnly ) = 0;
// set line color for raster operations
- virtual void SetROPLineColor( SalROPColor nROPColor ) = 0;
+ virtual void SetROPLineColor( SalROPColor nROPColor ) = 0;
// set fill color for raster operations
- virtual void SetROPFillColor( SalROPColor nROPColor ) = 0;
+ virtual void SetROPFillColor( SalROPColor nROPColor ) = 0;
// set the text color to a specific color
- virtual void SetTextColor( SalColor nSalColor ) = 0;
+ virtual void SetTextColor( SalColor nSalColor ) = 0;
// set the font
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0;
// release the fonts
void ReleaseFonts() { SetFont( NULL, 0 ); }
// get the current font's metrics
- virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0;
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0;
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0;
+ virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0;
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const = 0;
// graphics must fill supplied font list
- virtual void GetDevFontList( ImplDevFontList* ) = 0;
+ virtual void GetDevFontList( ImplDevFontList* ) = 0;
// graphics should call ImplAddDevFontSubstitute on supplied
// OutputDevice for all its device specific preferred font substitutions
- virtual void GetDevFontSubstList( OutputDevice* ) = 0;
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0;
+ virtual void GetDevFontSubstList( OutputDevice* ) = 0;
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0;
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
// returns TRUE if creation of subset was successfull
@@ -259,7 +259,7 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -292,8 +292,8 @@ public:
FontSubsetInfo& rInfo,
long* pDataLen ) = 0;
// frees the font data again
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0;
-
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0;
+
// get the same widths as in CreateFontSubset and GetEmbedFontData
// in case of an embeddable font also fill the mapping
// between unicode and glyph id
@@ -307,7 +307,7 @@ public:
virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
- virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0;
+ virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0;
/** Filter text from DrawText commands in a device specific manner
<p>
This function allows a device (or rather the corresponding SalGraphics
@@ -340,16 +340,16 @@ public:
false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged
*/
virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
-
+
virtual bool supportsOperation( OutDevSupportType ) const = 0;
// mirroring specifica
- int GetLayout() { return m_nLayout; }
- void SetLayout( int aLayout ) { m_nLayout = aLayout;}
+ int GetLayout() { return m_nLayout; }
+ void SetLayout( int aLayout ) { m_nLayout = aLayout;}
- void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const;
- void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
- BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const;
+ void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const;
+ void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
+ BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const;
void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
void mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const;
void mirror( ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const;
@@ -359,8 +359,8 @@ public:
// non virtual methods; these do eventual coordinate mirroring and
// then delegate to protected virtual methods
- BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
- BOOL UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* );
+ BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
+ BOOL UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
void DrawPixel( long nX, long nY, const OutputDevice *pOutDev );
@@ -485,7 +485,7 @@ public:
const SalBitmap& rAlphaBitmap,
const OutputDevice *pOutDev );
- bool DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
+ bool DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
sal_uInt8 nTransparency, const OutputDevice *pOutDev );
virtual SystemGraphicsData GetGraphicsData() const = 0;
diff --git a/vcl/inc/vcl/salgeom.hxx b/vcl/inc/vcl/salgeom.hxx
index c512d0a195fa..48d8e39d5121 100644
--- a/vcl/inc/vcl/salgeom.hxx
+++ b/vcl/inc/vcl/salgeom.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ typedef struct _SalFrameGeometry {
nRightDecoration,
nBottomDecoration;
unsigned int nScreenNumber;
-
+
_SalFrameGeometry() :
nX( 0 ), nY( 0 ), nWidth( 1 ), nHeight( 1 ),
nLeftDecoration( 0 ), nTopDecoration( 0 ),
diff --git a/vcl/inc/vcl/salgtype.hxx b/vcl/inc/vcl/salgtype.hxx
index d6f0b6d7de2f..ea98f91c58f3 100644
--- a/vcl/inc/vcl/salgtype.hxx
+++ b/vcl/inc/vcl/salgtype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// ------------
typedef UINT32 SalColor;
-#define MAKE_SALCOLOR( r, g, b ) ((SalColor)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16))
-#define SALCOLOR_RED( n ) ((UINT8)((n)>>16))
-#define SALCOLOR_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8))
-#define SALCOLOR_BLUE( n ) ((UINT8)(n))
-#define SALCOLOR_NONE (~(SalColor)0)
+#define MAKE_SALCOLOR( r, g, b ) ((SalColor)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16))
+#define SALCOLOR_RED( n ) ((UINT8)((n)>>16))
+#define SALCOLOR_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8))
+#define SALCOLOR_BLUE( n ) ((UINT8)(n))
+#define SALCOLOR_NONE (~(SalColor)0)
// ------------
// - SalPoint -
// ------------
@@ -48,8 +48,8 @@ typedef UINT32 SalColor;
// must equal to class Point
struct SalPoint
{
- long mnX;
- long mnY;
+ long mnX;
+ long mnY;
};
typedef const SalPoint* PCONSTSALPOINT;
@@ -60,14 +60,14 @@ typedef const SalPoint* PCONSTSALPOINT;
struct SalTwoRect
{
- long mnSrcX;
- long mnSrcY;
- long mnSrcWidth;
- long mnSrcHeight;
- long mnDestX;
- long mnDestY;
- long mnDestWidth;
- long mnDestHeight;
+ long mnSrcX;
+ long mnSrcY;
+ long mnSrcWidth;
+ long mnSrcHeight;
+ long mnDestX;
+ long mnDestY;
+ long mnDestWidth;
+ long mnDestHeight;
};
// ---------------
@@ -75,18 +75,18 @@ struct SalTwoRect
// ---------------
typedef USHORT SalROPColor;
-#define SAL_ROP_0 ((SalROPColor)0)
-#define SAL_ROP_1 ((SalROPColor)1)
-#define SAL_ROP_INVERT ((SalROPColor)2)
+#define SAL_ROP_0 ((SalROPColor)0)
+#define SAL_ROP_1 ((SalROPColor)1)
+#define SAL_ROP_INVERT ((SalROPColor)2)
// -------------
// - SalInvert -
// -------------
typedef USHORT SalInvert;
-#define SAL_INVERT_HIGHLIGHT ((SalInvert)0x0001)
-#define SAL_INVERT_50 ((SalInvert)0x0002)
-#define SAL_INVERT_TRACKFRAME ((SalInvert)0x0004)
+#define SAL_INVERT_HIGHLIGHT ((SalInvert)0x0001)
+#define SAL_INVERT_50 ((SalInvert)0x0002)
+#define SAL_INVERT_TRACKFRAME ((SalInvert)0x0004)
#endif // _SV_SALGTYPE_HXX
diff --git a/vcl/inc/vcl/salimestatus.hxx b/vcl/inc/vcl/salimestatus.hxx
index 76255e4f495c..c43038b8ea0f 100644
--- a/vcl/inc/vcl/salimestatus.hxx
+++ b/vcl/inc/vcl/salimestatus.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx
index 30187dde2108..a69980c9acea 100644
--- a/vcl/inc/vcl/salinst.hxx
+++ b/vcl/inc/vcl/salinst.hxx
@@ -71,10 +71,10 @@ class VCL_DLLPUBLIC SalInstance
public:
typedef bool(*Callback)(void*,void*,int);
private:
- void* m_pEventInst;
- void* m_pErrorInst;
- Callback m_pEventCallback;
- Callback m_pErrorCallback;
+ void* m_pEventInst;
+ void* m_pErrorInst;
+ Callback m_pEventCallback;
+ Callback m_pErrorCallback;
public:
SalInstance() :
@@ -87,57 +87,57 @@ public:
// Frame
// DisplayName for Unix ???
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ) = 0;
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ) = 0;
- virtual void DestroyFrame( SalFrame* pFrame ) = 0;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ) = 0;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ) = 0;
+ virtual void DestroyFrame( SalFrame* pFrame ) = 0;
// Object (System Child Window)
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ) = 0;
- virtual void DestroyObject( SalObject* pObject ) = 0;
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ) = 0;
+ virtual void DestroyObject( SalObject* pObject ) = 0;
// 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 ) = 0;
- virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0;
+ virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0;
// 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 ) = 0;
- virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) = 0;
- virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) = 0;
- virtual void DestroyPrinter( SalPrinter* pPrinter ) = 0;
+ virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) = 0;
+ virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) = 0;
+ virtual void DestroyPrinter( SalPrinter* pPrinter ) = 0;
- virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0;
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0;
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0;
+ virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0;
+ virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0;
+ virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0;
virtual String GetDefaultPrinter() = 0;
// SalTimer
- virtual SalTimer* CreateSalTimer() = 0;
+ virtual SalTimer* CreateSalTimer() = 0;
// SalI18NImeStatus
- virtual SalI18NImeStatus* CreateI18NImeStatus() = 0;
+ virtual SalI18NImeStatus* CreateI18NImeStatus() = 0;
// SalSystem
- virtual SalSystem* CreateSalSystem() = 0;
+ virtual SalSystem* CreateSalSystem() = 0;
// SalBitmap
- virtual SalBitmap* CreateSalBitmap() = 0;
+ virtual SalBitmap* CreateSalBitmap() = 0;
// YieldMutex
virtual osl::SolarMutex* GetYieldMutex() = 0;
- virtual ULONG ReleaseYieldMutex() = 0;
- virtual void AcquireYieldMutex( ULONG nCount ) = 0;
+ virtual ULONG ReleaseYieldMutex() = 0;
+ virtual void AcquireYieldMutex( ULONG nCount ) = 0;
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
// and timer
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) = 0;
- virtual bool AnyInput( USHORT nType ) = 0;
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) = 0;
+ virtual bool AnyInput( USHORT nType ) = 0;
// Menues
virtual SalMenu* CreateMenu( BOOL bMenuBar ) = 0;
@@ -146,7 +146,7 @@ public:
virtual void DestroyMenuItem( SalMenuItem* pItem ) = 0;
// may return NULL to disable session management
- virtual SalSession* CreateSalSession() = 0;
+ virtual SalSession* CreateSalSession() = 0;
// methods for XDisplayConnection
@@ -154,21 +154,21 @@ public:
// void* pInst: pInstance form the SetCallback call
// void* pEvent: address of the system specific event structure
// int nBytes: length of the system specific event structure
- void SetEventCallback( void* pInstance, Callback pCallback )
+ void SetEventCallback( void* pInstance, Callback pCallback )
{ m_pEventInst = pInstance; m_pEventCallback = pCallback; }
Callback GetEventCallback() const
{ return m_pEventCallback; }
- bool CallEventCallback( void* pEvent, int nBytes )
+ bool CallEventCallback( void* pEvent, int nBytes )
{ return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; }
- void SetErrorEventCallback( void* pInstance, Callback pCallback )
+ void SetErrorEventCallback( void* pInstance, Callback pCallback )
{ m_pErrorInst = pInstance; m_pErrorCallback = pCallback; }
- Callback GetErrorEventCallback() const
+ Callback GetErrorEventCallback() const
{ return m_pErrorCallback; }
- bool CallErrorCallback( void* pEvent, int nBytes )
+ bool CallErrorCallback( void* pEvent, int nBytes )
{ return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; }
enum ConnectionIdentifierType { AsciiCString, Blob };
- virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0;
+ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0;
// this is a vehicle for PrintFontManager to bridge the gap between vcl and libvclplug_*
// this is only necessary because PrintFontManager is an exported vcl API and therefore
diff --git a/vcl/inc/vcl/sallayout.hxx b/vcl/inc/vcl/sallayout.hxx
index b26970c708d5..ffcec7f1f3e2 100644
--- a/vcl/inc/vcl/sallayout.hxx
+++ b/vcl/inc/vcl/sallayout.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -197,7 +197,7 @@ public:
int GetUnitsPerPixel() const { return mnUnitsPerPixel; }
int GetOrientation() const { return mnOrientation; }
-
+
virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const;
// methods using string indexing
@@ -330,9 +330,9 @@ public:
enum{ FALLBACK_MASK=0xFF, IS_IN_CLUSTER=0x100, IS_RTL_GLYPH=0x200, IS_DIACRITIC=0x400 };
- bool IsClusterStart() const { return ((mnFlags & IS_IN_CLUSTER) == 0); }
- bool IsRTLGlyph() const { return ((mnFlags & IS_RTL_GLYPH) != 0); }
- bool IsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); }
+ bool IsClusterStart() const { return ((mnFlags & IS_IN_CLUSTER) == 0); }
+ bool IsRTLGlyph() const { return ((mnFlags & IS_RTL_GLYPH) != 0); }
+ bool IsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); }
};
// ---------------
diff --git a/vcl/inc/vcl/salmenu.hxx b/vcl/inc/vcl/salmenu.hxx
index 3ddcb95d4475..44857692866f 100644
--- a/vcl/inc/vcl/salmenu.hxx
+++ b/vcl/inc/vcl/salmenu.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +41,12 @@ class SalFrame;
struct SalItemParams
{
- USHORT nId; // item Id
- MenuItemType eType; // MenuItem-Type
- MenuItemBits nBits; // MenuItem-Bits
- Menu* pMenu; // Pointer to Menu
- XubString aText; // Menu-Text
- Image aImage; // Image
+ USHORT nId; // item Id
+ MenuItemType eType; // MenuItem-Type
+ MenuItemBits nBits; // MenuItem-Bits
+ Menu* pMenu; // Pointer to Menu
+ XubString aText; // Menu-Text
+ Image aImage; // Image
};
@@ -55,7 +55,7 @@ struct SalMenuButtonItem
USHORT mnId;
Image maImage;
rtl::OUString maToolTipText;
-
+
SalMenuButtonItem() : mnId( 0 ) {}
SalMenuButtonItem( USHORT i_nId, const Image& rImg, const rtl::OUString& i_rTTText = rtl::OUString() )
: mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {}
@@ -90,7 +90,7 @@ public:
virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags);
virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure
virtual void RemoveMenuBarButton( USHORT nId );
-
+
// return an empty rectangle if not implemented
// return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented
// but rectangle cannot be determined
diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index 89b6be637005..be3eeb6c2022 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,32 +40,32 @@
* control if it were composite).
*/
-typedef sal_uInt32 ControlType;
+typedef sal_uInt32 ControlType;
// for use in general purpose ImplControlValue
#define CTRL_GENERIC 0
// Normal PushButton/Command Button
-#define CTRL_PUSHBUTTON 1
+#define CTRL_PUSHBUTTON 1
// Normal single radio button
-#define CTRL_RADIOBUTTON 2
+#define CTRL_RADIOBUTTON 2
// Normal single checkbox
-#define CTRL_CHECKBOX 10
+#define CTRL_CHECKBOX 10
// Combobox, i.e. a ListBox
// that allows data entry by user
-#define CTRL_COMBOBOX 20
+#define CTRL_COMBOBOX 20
// Control that allows text entry
-#define CTRL_EDITBOX 30
+#define CTRL_EDITBOX 30
// Control that allows text entry, but without the usual border
// Has to be handled separately, because this one cannot handle
// HAS_BACKGROUND_TEXTURE, which is drawn in the edit box'es
// border window.
-#define CTRL_EDITBOX_NOBORDER 31
+#define CTRL_EDITBOX_NOBORDER 31
// Control that allows text entry
// ( some systems distingish between single and multi line edit boxes )
@@ -73,61 +73,61 @@ typedef sal_uInt32 ControlType;
// Control that pops up a menu,
// but does NOT allow data entry
-#define CTRL_LISTBOX 35
+#define CTRL_LISTBOX 35
-// An edit field together with two little
+// An edit field together with two little
// buttons on the side (aka spin field)
-#define CTRL_SPINBOX 40
+#define CTRL_SPINBOX 40
// Two standalone spin buttons
// without an edit field
-#define CTRL_SPINBUTTONS 45
+#define CTRL_SPINBUTTONS 45
// A single tab
-#define CTRL_TAB_ITEM 50
+#define CTRL_TAB_ITEM 50
// The border around a tab area,
// but without the tabs themselves.
// May have a gap at the top for
// the active tab
-#define CTRL_TAB_PANE 55
+#define CTRL_TAB_PANE 55
// Background of a Tab Pane
-#define CTRL_TAB_BODY 56
+#define CTRL_TAB_BODY 56
// Normal scrollbar, including
// all parts like slider, buttons
-#define CTRL_SCROLLBAR 60
+#define CTRL_SCROLLBAR 60
#define CTRL_SLIDER 65
// Border around a group of related
// items, perhaps also displaying
// a label of identification
-#define CTRL_GROUPBOX 70
+#define CTRL_GROUPBOX 70
// A separator line
-#define CTRL_FIXEDLINE 80
+#define CTRL_FIXEDLINE 80
// A rectangular border, like a
// Tab Pane, but without the
// possible gap for a tab
-#define CTRL_FIXEDBORDER 90
+#define CTRL_FIXEDBORDER 90
// A toolbar control with buttons and a grip
-#define CTRL_TOOLBAR 100
+#define CTRL_TOOLBAR 100
// The menubar
-#define CTRL_MENUBAR 120
+#define CTRL_MENUBAR 120
// popup menu
#define CTRL_MENU_POPUP 121
// The statusbar
-#define CTRL_STATUSBAR 130
+#define CTRL_STATUSBAR 130
#define CTRL_PROGRESS 131
// Progress bar for the intro window
// (aka splash screen), in case some
-// wants native progress bar in the
+// wants native progress bar in the
// application but not for the splash
// screen (used in desktop/)
#define CTRL_INTROPROGRESS 132
@@ -155,24 +155,24 @@ typedef sal_uInt32 ControlType;
* for example the slider of a scroll bar.
*/
-typedef sal_uInt32 ControlPart;
+typedef sal_uInt32 ControlPart;
-#define PART_ENTIRE_CONTROL 1
+#define PART_ENTIRE_CONTROL 1
#define PART_WINDOW 5 // the static listbox window containing the list
-#define PART_BUTTON 100
-#define PART_BUTTON_UP 101
-#define PART_BUTTON_DOWN 102 // Also for ComboBoxes/ListBoxes
-#define PART_BUTTON_LEFT 103
-#define PART_BUTTON_RIGHT 104
-#define PART_ALL_BUTTONS 105
-#define PART_TRACK_HORZ_LEFT 200
-#define PART_TRACK_VERT_UPPER 201
-#define PART_TRACK_HORZ_RIGHT 202
-#define PART_TRACK_VERT_LOWER 203
-#define PART_TRACK_HORZ_AREA 204
-#define PART_TRACK_VERT_AREA 205
-#define PART_THUMB_HORZ 210 // Also used as toolbar grip
-#define PART_THUMB_VERT 211 // Also used as toolbar grip
+#define PART_BUTTON 100
+#define PART_BUTTON_UP 101
+#define PART_BUTTON_DOWN 102 // Also for ComboBoxes/ListBoxes
+#define PART_BUTTON_LEFT 103
+#define PART_BUTTON_RIGHT 104
+#define PART_ALL_BUTTONS 105
+#define PART_TRACK_HORZ_LEFT 200
+#define PART_TRACK_VERT_UPPER 201
+#define PART_TRACK_HORZ_RIGHT 202
+#define PART_TRACK_VERT_LOWER 203
+#define PART_TRACK_HORZ_AREA 204
+#define PART_TRACK_VERT_AREA 205
+#define PART_THUMB_HORZ 210 // Also used as toolbar grip
+#define PART_THUMB_VERT 211 // Also used as toolbar grip
#define PART_MENU_ITEM 250
#define PART_MENU_ITEM_CHECK_MARK 251
#define PART_MENU_ITEM_RADIO_MARK 252
@@ -184,10 +184,10 @@ typedef sal_uInt32 ControlPart;
However aqua draws a little outside. The canonical way would be to enhance the
HitTestNativeControl passing a ScrollbarValue additionally so all necessary
information is available in the call.
- .
+ .
However since there is only this one small exception we will deviate a little and
instead pass the respective rect as control region to allow for a small correction.
-
+
So all places using HitTestNativeControl on PART_THUMB_HORZ, PART_THUMB_VERT,
PART_TRACK_HORZ_LEFT, PART_TRACK_HORZ_RIGHT, PART_TRACK_VERT_UPPER, PART_TRACK_VERT_LOWER
do not use the control rectangle as region but the actuall part rectangle, making
@@ -208,12 +208,12 @@ typedef sal_uInt32 ControlPart;
// in to draw this part is expected to be the entire
// area of the control.
// A control may respond to one or both.
-#define PART_DRAW_BACKGROUND_HORZ 1000
-#define PART_DRAW_BACKGROUND_VERT 1001
+#define PART_DRAW_BACKGROUND_HORZ 1000
+#define PART_DRAW_BACKGROUND_VERT 1001
-// GTK+ also draws tabs right->left since there is a
+// GTK+ also draws tabs right->left since there is a
// hardcoded 2 pixel overlap between adjacent tabs
-#define PART_TABS_DRAW_RTL 3000
+#define PART_TABS_DRAW_RTL 3000
// For themes that do not want to have the focus
// rectangle part drawn by VCL but take care of the
@@ -240,16 +240,16 @@ typedef sal_uInt32 ControlPart;
* in the ControlState.
*/
-typedef sal_uInt32 ControlState;
+typedef sal_uInt32 ControlState;
-#define CTRL_STATE_ENABLED 0x0001
-#define CTRL_STATE_FOCUSED 0x0002
-#define CTRL_STATE_PRESSED 0x0004
-#define CTRL_STATE_ROLLOVER 0x0008
-#define CTRL_STATE_HIDDEN 0x0010
-#define CTRL_STATE_DEFAULT 0x0020
-#define CTRL_STATE_SELECTED 0x0040
-#define CTRL_CACHING_ALLOWED 0x8000 // set when the control is completely visible (i.e. not clipped)
+#define CTRL_STATE_ENABLED 0x0001
+#define CTRL_STATE_FOCUSED 0x0002
+#define CTRL_STATE_PRESSED 0x0004
+#define CTRL_STATE_ROLLOVER 0x0008
+#define CTRL_STATE_HIDDEN 0x0010
+#define CTRL_STATE_DEFAULT 0x0020
+#define CTRL_STATE_SELECTED 0x0040
+#define CTRL_CACHING_ALLOWED 0x8000 // set when the control is completely visible (i.e. not clipped)
/* ButtonValue:
*
@@ -276,7 +276,7 @@ class VCL_DLLPUBLIC ImplControlValue
private:
ControlType mType;
ButtonValue mTristate; // Tristate value: on, off, mixed
- long mNumber; // numeric value
+ long mNumber; // numeric value
protected:
ImplControlValue( ControlType i_eType, ButtonValue i_eTriState, long i_nNumber )
: mType( i_eType )
@@ -293,35 +293,35 @@ class VCL_DLLPUBLIC ImplControlValue
: mType( CTRL_GENERIC ), mTristate(BUTTONVALUE_DONTKNOW), mNumber(0) {}
virtual ~ImplControlValue();
-
+
ControlType getType() const { return mType; }
- inline ButtonValue getTristateVal( void ) const { return mTristate; }
- inline void setTristateVal( ButtonValue nTristate ) { mTristate = nTristate; }
+ inline ButtonValue getTristateVal( void ) const { return mTristate; }
+ inline void setTristateVal( ButtonValue nTristate ) { mTristate = nTristate; }
- inline long getNumericVal( void ) const { return mNumber; }
- inline void setNumericVal( long nNumeric ) { mNumber = nNumeric; }
+ inline long getNumericVal( void ) const { return mNumber; }
+ inline void setNumericVal( long nNumeric ) { mNumber = nNumeric; }
};
/* ScrollbarValue:
*
* Value container for scrollbars.
*/
- class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
+ class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
{
public:
- long mnMin;
- long mnMax;
- long mnCur;
- long mnVisibleSize;
- Rectangle maThumbRect;
- Rectangle maButton1Rect;
- Rectangle maButton2Rect;
- ControlState mnButton1State;
- ControlState mnButton2State;
- ControlState mnThumbState;
- ControlState mnPage1State;
- ControlState mnPage2State;
+ long mnMin;
+ long mnMax;
+ long mnCur;
+ long mnVisibleSize;
+ Rectangle maThumbRect;
+ Rectangle maButton1Rect;
+ Rectangle maButton2Rect;
+ ControlState mnButton1State;
+ ControlState mnButton2State;
+ ControlState mnThumbState;
+ ControlState mnPage1State;
+ ControlState mnPage2State;
inline ScrollbarValue()
: ImplControlValue( CTRL_SCROLLBAR, BUTTONVALUE_DONTKNOW, 0 )
@@ -336,12 +336,12 @@ class VCL_DLLPUBLIC ImplControlValue
class VCL_DLLPUBLIC SliderValue : public ImplControlValue
{
public:
- long mnMin;
- long mnMax;
- long mnCur;
+ long mnMin;
+ long mnMax;
+ long mnCur;
Rectangle maThumbRect;
ControlState mnThumbState;
-
+
SliderValue()
: ImplControlValue( CTRL_SLIDER, BUTTONVALUE_DONTKNOW, 0 )
, mnMin( 0 ), mnMax( 0 ), mnCur( 0 ), mnThumbState( 0 )
@@ -390,12 +390,12 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue
{
public:
- Rectangle maUpperRect;
- Rectangle maLowerRect;
- ControlState mnUpperState;
- ControlState mnLowerState;
- int mnUpperPart;
- int mnLowerPart;
+ Rectangle maUpperRect;
+ Rectangle maLowerRect;
+ ControlState mnUpperState;
+ ControlState mnLowerState;
+ int mnUpperPart;
+ int mnLowerPart;
inline SpinbuttonValue()
: ImplControlValue( CTRL_SPINBUTTONS, BUTTONVALUE_DONTKNOW, 0 )
@@ -405,7 +405,7 @@ class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue
virtual ~SpinbuttonValue();
};
-/* Toolbarvalue:
+/* Toolbarvalue:
*
* Value container for toolbars detailing the grip position
*/
@@ -415,12 +415,12 @@ public:
ToolbarValue() : ImplControlValue( CTRL_TOOLBAR, BUTTONVALUE_DONTKNOW, 0 )
{ mbIsTopDockingArea = FALSE; }
virtual ~ToolbarValue();
- Rectangle maGripRect;
+ Rectangle maGripRect;
BOOL mbIsTopDockingArea; // indicates that this is the top aligned dockingarea
// adjacent to the menubar
};
-/* MenubarValue:
+/* MenubarValue:
*
* Value container for menubars specifying height of adjacent docking area
*/
@@ -433,7 +433,7 @@ public:
int maTopDockingAreaHeight;
};
-/* PushButtonValue:
+/* PushButtonValue:
*
* Value container for pushbuttons specifying additional drawing hints
*/
@@ -444,7 +444,7 @@ public:
: ImplControlValue( CTRL_PUSHBUTTON, BUTTONVALUE_DONTKNOW, 0 )
, mbBevelButton( false ), mbSingleLine( true ) {}
virtual ~PushButtonValue();
-
+
bool mbBevelButton:1;
bool mbSingleLine:1;
};
diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx
index 6ba025befdbe..ca6880652d10 100644
--- a/vcl/inc/vcl/salobj.hxx
+++ b/vcl/inc/vcl/salobj.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +40,9 @@ struct SystemEnvData;
// - SalObject-Types -
// -------------------
-#define SAL_OBJECT_CLIP_INCLUDERECTS ((USHORT)0x0001)
-#define SAL_OBJECT_CLIP_EXCLUDERECTS ((USHORT)0x0002)
-#define SAL_OBJECT_CLIP_ABSOLUTE ((USHORT)0x0004)
+#define SAL_OBJECT_CLIP_INCLUDERECTS ((USHORT)0x0001)
+#define SAL_OBJECT_CLIP_EXCLUDERECTS ((USHORT)0x0002)
+#define SAL_OBJECT_CLIP_ABSOLUTE ((USHORT)0x0004)
// -------------
// - SalObject -
@@ -50,35 +50,35 @@ struct SystemEnvData;
class VCL_DLLPUBLIC SalObject
{
- void* m_pInst;
- SALOBJECTPROC m_pCallback;
+ void* m_pInst;
+ SALOBJECTPROC m_pCallback;
BOOL m_bMouseTransparent:1,
m_bEraseBackground:1;
public:
SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( FALSE ), m_bEraseBackground( TRUE ) {}
virtual ~SalObject();
- virtual void ResetClipRegion() = 0;
- virtual USHORT GetClipRegionType() = 0;
- virtual void BeginSetClipRegion( ULONG nRects ) = 0;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual void EndSetClipRegion() = 0;
+ virtual void ResetClipRegion() = 0;
+ virtual USHORT GetClipRegionType() = 0;
+ virtual void BeginSetClipRegion( ULONG nRects ) = 0;
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void EndSetClipRegion() = 0;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual void Show( BOOL bVisible ) = 0;
- virtual void Enable( BOOL nEnable ) = 0;
- virtual void GrabFocus() = 0;
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual void Show( BOOL bVisible ) = 0;
+ virtual void Enable( BOOL nEnable ) = 0;
+ virtual void GrabFocus() = 0;
- virtual void SetBackground() = 0;
- virtual void SetBackground( SalColor nSalColor ) = 0;
+ virtual void SetBackground() = 0;
+ virtual void SetBackground( SalColor nSalColor ) = 0;
- virtual void SetForwardKey( BOOL /*bEnable*/ ) {}
+ virtual void SetForwardKey( BOOL /*bEnable*/ ) {}
- virtual const SystemEnvData* GetSystemData() const = 0;
+ virtual const SystemEnvData* GetSystemData() const = 0;
- void SetCallback( void* pInst, SALOBJECTPROC pProc )
+ void SetCallback( void* pInst, SALOBJECTPROC pProc )
{ m_pInst = pInst; m_pCallback = pProc; }
- long CallCallback( USHORT nEvent, const void* pEvent )
+ long CallCallback( USHORT nEvent, const void* pEvent )
{ return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; }
void SetMouseTransparent( BOOL bMouseTransparent )
{ m_bMouseTransparent = bMouseTransparent; }
diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx
index be387b4f1c7f..9c8cea57d228 100644
--- a/vcl/inc/vcl/salprn.hxx
+++ b/vcl/inc/vcl/salprn.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +47,13 @@ namespace vcl { class PrinterController; }
struct VCL_DLLPUBLIC SalPrinterQueueInfo
{
- XubString maPrinterName;
- XubString maDriver;
- XubString maLocation;
- XubString maComment;
- ULONG mnStatus;
- ULONG mnJobs;
- void* mpSysData;
+ XubString maPrinterName;
+ XubString maDriver;
+ XubString maLocation;
+ XubString maComment;
+ ULONG mnStatus;
+ ULONG mnJobs;
+ void* mpSysData;
SalPrinterQueueInfo();
~SalPrinterQueueInfo();
@@ -66,8 +66,8 @@ struct VCL_DLLPUBLIC SalPrinterQueueInfo
class VCL_DLLPUBLIC SalInfoPrinter
{
public:
- std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats
- bool m_bPapersInit; // set to true after InitPaperFormats
+ std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats
+ bool m_bPapersInit; // set to true after InitPaperFormats
bool m_bCompatMetrics;
SalInfoPrinter() : m_bPapersInit( false ), m_bCompatMetrics( false ) {}
@@ -75,30 +75,30 @@ public:
// SalGraphics or NULL, but two Graphics for all SalFrames
// must be returned
- virtual SalGraphics* GetGraphics() = 0;
- virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
+ virtual SalGraphics* GetGraphics() = 0;
+ virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
- virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0;
+ virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0;
// This function set the driver data and
// set the new indepen data in pSetupData
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ) = 0;
+ virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ) = 0;
// This function merged the indepen driver data
// and set the new indepen data in pSetupData
// Only the data must changed, where the bit
// in nFlags is set
- virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ) = 0;
+ virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ) = 0;
- virtual void GetPageInfo( const ImplJobSetup* pSetupData,
+ virtual void GetPageInfo( const ImplJobSetup* pSetupData,
long& rOutWidth, long& rOutHeight,
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight ) = 0;
- virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) = 0;
- virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
- virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) = 0;
+ virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) = 0;
+ virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) = 0;
// fills m_aPaperFormats and sets m_bPapersInit to true
- virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0;
+ virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0;
// returns angle that a landscape page will be turned counterclockwise wrt to portrait
- virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0;
+ virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0;
};
// --------------
@@ -107,11 +107,11 @@ public:
class VCL_DLLPUBLIC SalPrinter
{
-public: // public for Sal Implementation
+public: // public for Sal Implementation
SalPrinter() {}
virtual ~SalPrinter();
- virtual BOOL StartJob( const String* pFileName,
+ virtual BOOL StartJob( const String* pFileName,
const String& rJobName,
const String& rAppName,
ULONG nCopies,
@@ -127,12 +127,12 @@ public: // public for Sal Implementation
ImplJobSetup* pSetupData,
vcl::PrinterController& rController );
- virtual BOOL EndJob() = 0;
- virtual BOOL AbortJob() = 0;
- virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0;
- virtual BOOL EndPage() = 0;
- virtual ULONG GetErrorCode() = 0;
-
+ virtual BOOL EndJob() = 0;
+ virtual BOOL AbortJob() = 0;
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0;
+ virtual BOOL EndPage() = 0;
+ virtual ULONG GetErrorCode() = 0;
+
};
#endif // _SV_SALPRN_HXX
diff --git a/vcl/inc/vcl/salptype.hxx b/vcl/inc/vcl/salptype.hxx
index 7ad8b2a2c5f9..aa0ba427b5f3 100644
--- a/vcl/inc/vcl/salptype.hxx
+++ b/vcl/inc/vcl/salptype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +48,8 @@
// - SalPrinterError -
// -------------------
-#define SAL_PRINTER_ERROR_GENERALERROR 1
-#define SAL_PRINTER_ERROR_ABORT 2
+#define SAL_PRINTER_ERROR_GENERALERROR 1
+#define SAL_PRINTER_ERROR_ABORT 2
// -------------------
// - SalPrinterProcs -
diff --git a/vcl/inc/vcl/salsession.hxx b/vcl/inc/vcl/salsession.hxx
index 5d2fc5cf34ff..8e38e78f33b1 100644
--- a/vcl/inc/vcl/salsession.hxx
+++ b/vcl/inc/vcl/salsession.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ enum SalSessionEventType
struct SalSessionEvent
{
- SalSessionEventType m_eType;
+ SalSessionEventType m_eType;
- SalSessionEvent( SalSessionEventType eType )
+ SalSessionEvent( SalSessionEventType eType )
: m_eType( eType )
{}
};
struct SalSessionInteractionEvent : public SalSessionEvent
{
- bool m_bInteractionGranted;
+ bool m_bInteractionGranted;
- SalSessionInteractionEvent( bool bGranted )
+ SalSessionInteractionEvent( bool bGranted )
: SalSessionEvent( Interaction ),
m_bInteractionGranted( bGranted )
{}
@@ -60,10 +60,10 @@ struct SalSessionInteractionEvent : public SalSessionEvent
struct SalSessionSaveRequestEvent : public SalSessionEvent
{
- bool m_bShutdown;
- bool m_bCancelable;
+ bool m_bShutdown;
+ bool m_bCancelable;
- SalSessionSaveRequestEvent( bool bShutdown, bool bCancelable )
+ SalSessionSaveRequestEvent( bool bShutdown, bool bCancelable )
: SalSessionEvent( SaveRequest ),
m_bShutdown( bShutdown ),
m_bCancelable( bCancelable )
@@ -72,14 +72,14 @@ struct SalSessionSaveRequestEvent : public SalSessionEvent
struct SalSessionShutdownCancelEvent : public SalSessionEvent
{
- SalSessionShutdownCancelEvent()
+ SalSessionShutdownCancelEvent()
: SalSessionEvent( ShutdownCancel )
{}
};
struct SalSessionQuitEvent : public SalSessionEvent
{
- SalSessionQuitEvent()
+ SalSessionQuitEvent()
: SalSessionEvent( Quit )
{}
};
@@ -88,14 +88,14 @@ typedef void(*SessionProc)( SalSessionEvent *pEvent);
class VCL_DLLPUBLIC SalSession
{
- SessionProc m_aProc;
+ SessionProc m_aProc;
public:
- SalSession()
+ SalSession()
: m_aProc( 0 )
{}
virtual ~SalSession();
-
- void SetCallback( SessionProc aCallback )
+
+ void SetCallback( SessionProc aCallback )
{
m_aProc = aCallback;
}
@@ -104,7 +104,7 @@ public:
if( m_aProc )
m_aProc( pEvent );
}
-
+
// query the session manager for a user interaction slot
virtual void queryInteraction() = 0;
// signal the session manager that we're done with user interaction
diff --git a/vcl/inc/vcl/salsys.hxx b/vcl/inc/vcl/salsys.hxx
index df8223ca8759..f197c77e4910 100644
--- a/vcl/inc/vcl/salsys.hxx
+++ b/vcl/inc/vcl/salsys.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +64,16 @@ class VCL_DLLPUBLIC SalSystem
public:
SalSystem() {}
virtual ~SalSystem();
-
+
// get info about the display
/* Gets the number of active screens attached to the display
-
+
@returns the number of active screens
*/
virtual unsigned int GetDisplayScreenCount() = 0;
/* Queries whether multiple screens are truly separate
-
+
@returns true if screens are distinct and windows cannot
be moved between them or span multiple of them
false if screens form up one big display
@@ -82,57 +82,57 @@ public:
/* Queries the default screen number. The default screen is the
screen on which windows will appear if no special positioning
is made.
-
+
@returns the default screen number
*/
virtual unsigned int GetDefaultDisplayNumber() = 0;
/* Gets relative position and size of the screens attached to the display
-
+
@param nScreen
The screen number to be queried
-
+
@returns position: (0,0) in case of IsMultiscreen() == true
else position relative to whole display
size: size of the screen
*/
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0;
/* Gets position and size of the work area of a screen attached to the display
-
+
@param nScreen
The screen number to be queried
-
+
@returns position and size relative to the scree
*/
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) = 0;
/* Gets the name of a screen
-
+
@param nScreen
The screen number to be queried
-
+
@returns the name of the screen
*/
virtual rtl::OUString GetScreenName( unsigned int nScreen ) = 0;
/* Shows a native message box with the specified title, message and button
- combination.
-
+ combination.
+
@param rTitle
The title to be shown by the dialog box.
-
+
@param rMessage
The message to be shown by the dialog box.
-
+
@param nButtonCombination
Specify which button combination the message box should display.
See button combinations above.
-
+
@param nDefaultButton
- Specifies which button has the focus initially.
- See button identifiers above.
+ Specifies which button has the focus initially.
+ See button identifiers above.
The effect of specifying a button that doesn't belong
to the specified button combination is undefined.
-
- @returns the identifier of the button that was pressed by the user.
+
+ @returns the identifier of the button that was pressed by the user.
See button identifier above. If the function fails the
return value is 0.
*/
diff --git a/vcl/inc/vcl/saltimer.hxx b/vcl/inc/vcl/saltimer.hxx
index 78c27769c7a6..ed79e586d97d 100644
--- a/vcl/inc/vcl/saltimer.hxx
+++ b/vcl/inc/vcl/saltimer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +45,22 @@
class VCL_DLLPUBLIC SalTimer
{
- SALTIMERPROC m_pProc;
+ SALTIMERPROC m_pProc;
public:
SalTimer() : m_pProc( NULL ) {}
virtual ~SalTimer();
// AutoRepeat and Restart
- virtual void Start( ULONG nMS ) = 0;
- virtual void Stop() = 0;
+ virtual void Start( ULONG nMS ) = 0;
+ virtual void Stop() = 0;
// Callbacks (indepen in \sv\source\app\timer.cxx)
- void SetCallback( SALTIMERPROC pProc )
+ void SetCallback( SALTIMERPROC pProc )
{
- m_pProc = pProc;
+ m_pProc = pProc;
}
- void CallCallback()
+ void CallCallback()
{
if( m_pProc )
m_pProc();
diff --git a/vcl/inc/vcl/salvd.hxx b/vcl/inc/vcl/salvd.hxx
index 2b6c6191add6..37e9958644de 100644
--- a/vcl/inc/vcl/salvd.hxx
+++ b/vcl/inc/vcl/salvd.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +46,14 @@ public: // public for Sal Implementation
// SalGraphics or NULL, but two Graphics for all SalVirtualDevices
// must be returned
- virtual SalGraphics* GetGraphics() = 0;
- virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
+ virtual SalGraphics* GetGraphics() = 0;
+ virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
// Set new size, without saving the old contents
virtual BOOL SetSize( long nNewDX, long nNewDY ) = 0;
/// Get actual VDev size in pixel
- virtual void GetSize( long& rWidth, long& rHeight ) = 0;
+ virtual void GetSize( long& rWidth, long& rHeight ) = 0;
};
#endif // _SV_SALVD_HXX
diff --git a/vcl/inc/vcl/salwtype.hxx b/vcl/inc/vcl/salwtype.hxx
index 90ccb92af6a2..fbc7832055bd 100644
--- a/vcl/inc/vcl/salwtype.hxx
+++ b/vcl/inc/vcl/salwtype.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ struct SalMenuEvent
{
USHORT mnId; // Menu item ID
void* mpMenu; // pointer to VCL menu (class Menu)
-
+
SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {}
SalMenuEvent( USHORT i_nId, void* i_pMenu )
: mnId( i_nId ), mpMenu( i_pMenu ) {}
@@ -158,7 +158,7 @@ struct SalPaintEvent
long mnBoundWidth; // BoundRect - Width
long mnBoundHeight; // BoundRect - Height
bool mbImmediateUpdate; // set to true to force an immediate update
-
+
SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) :
mnBoundX( x ), mnBoundY( y ),
mnBoundWidth( w ), mnBoundHeight( h ),
@@ -182,7 +182,7 @@ struct SalWheelMouseEvent
USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)
BOOL mbHorz; // Horizontal
BOOL mbDeltaIsPixel; // delta value is a pixel value (on mac)
-
+
SalWheelMouseEvent()
: mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( FALSE ), mbDeltaIsPixel( FALSE )
{}
diff --git a/vcl/inc/vcl/scrbar.hxx b/vcl/inc/vcl/scrbar.hxx
index fd675461cac5..8106317685fb 100644
--- a/vcl/inc/vcl/scrbar.hxx
+++ b/vcl/inc/vcl/scrbar.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,19 +79,19 @@ private:
SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt );
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle );
- SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE void ImplUpdateRects( BOOL bUpdate = TRUE );
- SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
- SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
- SAL_DLLPRIVATE void ImplCalc( BOOL bUpdate = TRUE );
- SAL_DLLPRIVATE void ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev );
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
+ SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle );
+ SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
+ SAL_DLLPRIVATE void ImplUpdateRects( BOOL bUpdate = TRUE );
+ SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
+ SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
+ SAL_DLLPRIVATE void ImplCalc( BOOL bUpdate = TRUE );
+ SAL_DLLPRIVATE void ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev );
using Window::ImplScroll;
- SAL_DLLPRIVATE long ImplScroll( long nNewPos, BOOL bCallEndScroll );
- SAL_DLLPRIVATE long ImplDoAction( BOOL bCallEndScroll );
- SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE );
- SAL_DLLPRIVATE void ImplInvert();
+ SAL_DLLPRIVATE long ImplScroll( long nNewPos, BOOL bCallEndScroll );
+ SAL_DLLPRIVATE long ImplDoAction( BOOL bCallEndScroll );
+ SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE );
+ SAL_DLLPRIVATE void ImplInvert();
SAL_DLLPRIVATE BOOL ImplDrawNative( USHORT nDrawFlags );
SAL_DLLPRIVATE void ImplDragThumb( const Point& rMousePos );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
diff --git a/vcl/inc/vcl/seleng.hxx b/vcl/inc/vcl/seleng.hxx
index b0ccdec69cbb..bcbe3a265860 100644
--- a/vcl/inc/vcl/seleng.hxx
+++ b/vcl/inc/vcl/seleng.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
virtual void BeginDrag() = 0;
virtual void CreateAnchor() = 0; // Anker-Pos := Cursor-Pos
- virtual void DestroyAnchor() = 0;
+ virtual void DestroyAnchor() = 0;
// Cursor neu setzen, dabei die beim Anker beginnende
// Selektion der neuen Cursor-Position anpassen. TRUE == Ok
@@ -77,7 +77,7 @@ public:
#define SELENG_HAS_ANCH 0x0020
#define SELENG_CMDEVT 0x0040
#define SELENG_WAIT_UPEVT 0x0080
-#define SELENG_EXPANDONMOVE 0x0100
+#define SELENG_EXPANDONMOVE 0x0100
class VCL_DLLPUBLIC SelectionEngine
{
@@ -94,7 +94,7 @@ private:
USHORT nFlags;
DECL_DLLPRIVATE_LINK( ImpWatchDog, Timer * );
- inline BOOL ShouldDeselect( BOOL bModifierKey1 ) const;
+ inline BOOL ShouldDeselect( BOOL bModifierKey1 ) const;
// determines to deselect or not when Ctrl-key is pressed on CursorPosChanging
public:
@@ -159,7 +159,7 @@ public:
void SetAnchor( BOOL bAnchor );
// wird im Ctor eingeschaltet
- void ExpandSelectionOnMouseMove( BOOL bExpand = TRUE )
+ void ExpandSelectionOnMouseMove( BOOL bExpand = TRUE )
{
if( bExpand )
nFlags |= SELENG_EXPANDONMOVE;
@@ -248,6 +248,6 @@ inline void SelectionEngine::SetAnchor( BOOL bAnchor )
nFlags &= (~SELENG_HAS_ANCH);
}
-#endif // _SV_SELENG_HXX
+#endif // _SV_SELENG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 9728e4eebc54..30308b26a55a 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -339,7 +339,7 @@ class ImplStyleData
private:
ULONG mnRefCount;
- void* mpStyleData_NotUsedYet;
+ void* mpStyleData_NotUsedYet;
Color maActiveBorderColor;
Color maActiveColor;
@@ -513,19 +513,19 @@ private:
#define STYLE_TABCONTROL_SINGLELINE ((USHORT)0x0001)
#define STYLE_TABCONTROL_COLOR ((USHORT)0x0002)
-#define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((ULONG)0)
-#define STYLE_TOOLBAR_ICONSIZE_SMALL ((ULONG)1)
-#define STYLE_TOOLBAR_ICONSIZE_LARGE ((ULONG)2)
+#define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((ULONG)0)
+#define STYLE_TOOLBAR_ICONSIZE_SMALL ((ULONG)1)
+#define STYLE_TOOLBAR_ICONSIZE_LARGE ((ULONG)2)
-#define STYLE_SYMBOLS_AUTO ((ULONG)0)
-#define STYLE_SYMBOLS_DEFAULT ((ULONG)1)
-#define STYLE_SYMBOLS_HICONTRAST ((ULONG)2)
-#define STYLE_SYMBOLS_INDUSTRIAL ((ULONG)3)
-#define STYLE_SYMBOLS_CRYSTAL ((ULONG)4)
+#define STYLE_SYMBOLS_AUTO ((ULONG)0)
+#define STYLE_SYMBOLS_DEFAULT ((ULONG)1)
+#define STYLE_SYMBOLS_HICONTRAST ((ULONG)2)
+#define STYLE_SYMBOLS_INDUSTRIAL ((ULONG)3)
+#define STYLE_SYMBOLS_CRYSTAL ((ULONG)4)
#define STYLE_SYMBOLS_TANGO ((ULONG)5)
#define STYLE_SYMBOLS_OXYGEN ((ULONG)6)
-#define STYLE_SYMBOLS_CLASSIC ((ULONG)7)
-#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)8)
+#define STYLE_SYMBOLS_CLASSIC ((ULONG)7)
+#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)8)
#define STYLE_MENUIMAGES_OFF ((USHORT)0)
#define STYLE_MENUIMAGES_ON ((USHORT)1)
@@ -735,33 +735,33 @@ public:
const Color& GetInactiveTabColor() const
{ return mpData->maInactiveTabColor; }
- void SetHighContrastMode( BOOL bHighContrast )
+ void SetHighContrastMode( BOOL bHighContrast )
{ CopyData(); mpData->mnHighContrast = bHighContrast; }
- BOOL GetHighContrastMode() const
+ BOOL GetHighContrastMode() const
{ return (BOOL) mpData->mnHighContrast; }
- BOOL IsHighContrastBlackAndWhite() const;
- void SetUseSystemUIFonts( BOOL bUseSystemUIFonts )
+ BOOL IsHighContrastBlackAndWhite() const;
+ void SetUseSystemUIFonts( BOOL bUseSystemUIFonts )
{ CopyData(); mpData->mnUseSystemUIFonts = bUseSystemUIFonts; }
- BOOL GetUseSystemUIFonts() const
+ BOOL GetUseSystemUIFonts() const
{ return (BOOL) mpData->mnUseSystemUIFonts; }
- void SetUseFlatBorders( BOOL bUseFlatBorders )
+ void SetUseFlatBorders( BOOL bUseFlatBorders )
{ CopyData(); mpData->mnUseFlatBorders = bUseFlatBorders; }
- BOOL GetUseFlatBorders() const
+ BOOL GetUseFlatBorders() const
{ return (BOOL) mpData->mnUseFlatBorders; }
- void SetUseFlatMenues( BOOL bUseFlatMenues )
+ void SetUseFlatMenues( BOOL bUseFlatMenues )
{ CopyData(); mpData->mnUseFlatMenues = bUseFlatMenues; }
- BOOL GetUseFlatMenues() const
+ BOOL GetUseFlatMenues() const
{ return (BOOL) mpData->mnUseFlatMenues; }
- void SetUseImagesInMenus( BOOL bUseImagesInMenus )
+ void SetUseImagesInMenus( BOOL bUseImagesInMenus )
{ CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; }
- BOOL GetUseImagesInMenus() const;
+ BOOL GetUseImagesInMenus() const;
void SetPreferredUseImagesInMenus( BOOL bPreferredUseImagesInMenus )
{ CopyData(); mpData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; }
BOOL GetPreferredUseImagesInMenus() const
{ return mpData->mbPreferredUseImagesInMenus; }
- void SetSkipDisabledInMenus( BOOL bSkipDisabledInMenus )
+ void SetSkipDisabledInMenus( BOOL bSkipDisabledInMenus )
{ CopyData(); mpData->mnSkipDisabledInMenus = bSkipDisabledInMenus; }
- BOOL GetSkipDisabledInMenus() const
+ BOOL GetSkipDisabledInMenus() const
{ return (BOOL) mpData->mnSkipDisabledInMenus; }
void SetCairoFontOptions( const void *pOptions )
@@ -936,9 +936,9 @@ public:
{ CopyData(); mpData->mnOptions = nOptions; }
ULONG GetOptions() const
{ return mpData->mnOptions; }
- void SetAutoMnemonic( BOOL bAutoMnemonic )
+ void SetAutoMnemonic( BOOL bAutoMnemonic )
{ CopyData(); mpData->mnAutoMnemonic = (USHORT)bAutoMnemonic; }
- BOOL GetAutoMnemonic() const
+ BOOL GetAutoMnemonic() const
{ return mpData->mnAutoMnemonic ? TRUE : FALSE; }
void SetFontColor( const Color& rColor )
@@ -946,34 +946,34 @@ public:
const Color& GetFontColor() const
{ return mpData->maFontColor; }
- void SetToolbarIconSize( ULONG nSize )
+ void SetToolbarIconSize( ULONG nSize )
{ CopyData(); mpData->mnToolbarIconSize = nSize; }
- ULONG GetToolbarIconSize() const
+ ULONG GetToolbarIconSize() const
{ return mpData->mnToolbarIconSize; }
- void SetSymbolsStyle( ULONG nStyle )
+ void SetSymbolsStyle( ULONG nStyle )
{ CopyData(); mpData->mnSymbolsStyle = nStyle; }
- ULONG GetSymbolsStyle() const
+ ULONG GetSymbolsStyle() const
{ return mpData->mnSymbolsStyle; }
- void SetPreferredSymbolsStyle( ULONG nStyle )
+ void SetPreferredSymbolsStyle( ULONG nStyle )
{ CopyData(); mpData->mnPreferredSymbolsStyle = nStyle; }
- void SetPreferredSymbolsStyleName( const ::rtl::OUString &rName );
- ULONG GetPreferredSymbolsStyle() const
+ void SetPreferredSymbolsStyleName( const ::rtl::OUString &rName );
+ ULONG GetPreferredSymbolsStyle() const
{ return mpData->mnPreferredSymbolsStyle; }
- // check whether the symbols style is supported (icons are installed)
- bool CheckSymbolStyle( ULONG nStyle ) const;
+ // check whether the symbols style is supported (icons are installed)
+ bool CheckSymbolStyle( ULONG nStyle ) const;
ULONG GetAutoSymbolsStyle() const;
- ULONG GetCurrentSymbolsStyle() const;
+ ULONG GetCurrentSymbolsStyle() const;
- void SetSymbolsStyleName( const ::rtl::OUString &rName )
+ void SetSymbolsStyleName( const ::rtl::OUString &rName )
{ return SetSymbolsStyle( ImplNameToSymbolsStyle( rName ) ); }
- ::rtl::OUString GetSymbolsStyleName() const
+ ::rtl::OUString GetSymbolsStyleName() const
{ return ImplSymbolsStyleToName( GetSymbolsStyle() ); }
- ::rtl::OUString GetCurrentSymbolsStyleName() const
+ ::rtl::OUString GetCurrentSymbolsStyleName() const
{ return ImplSymbolsStyleToName( GetCurrentSymbolsStyle() ); }
-
+
const Wallpaper& GetWorkspaceGradient() const
{ return mpData->maWorkspaceGradient; }
void SetWorkspaceGradient( const Wallpaper& rWall )
@@ -992,8 +992,8 @@ public:
{ return !(*this == rSet); }
protected:
- ::rtl::OUString ImplSymbolsStyleToName( ULONG nStyle ) const;
- ULONG ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const;
+ ::rtl::OUString ImplSymbolsStyleToName( ULONG nStyle ) const;
+ ULONG ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const;
};
// ----------------
@@ -1030,12 +1030,12 @@ public:
MiscSettings( const MiscSettings& rSet );
~MiscSettings();
- void SetEnableATToolSupport( BOOL bEnable );
- BOOL GetEnableATToolSupport() const;
- void SetDisablePrinting( BOOL bEnable );
- BOOL GetDisablePrinting() const;
- void SetEnableLocalizedDecimalSep( BOOL bEnable );
- BOOL GetEnableLocalizedDecimalSep() const;
+ void SetEnableATToolSupport( BOOL bEnable );
+ BOOL GetEnableATToolSupport() const;
+ void SetDisablePrinting( BOOL bEnable );
+ BOOL GetDisablePrinting() const;
+ void SetEnableLocalizedDecimalSep( BOOL bEnable );
+ BOOL GetEnableLocalizedDecimalSep() const;
const MiscSettings& operator =( const MiscSettings& rSet );
BOOL operator ==( const MiscSettings& rSet ) const;
@@ -1155,7 +1155,7 @@ public:
class LocaleConfigurationListener;
class ImplAllSettingsData
{
- friend class AllSettings;
+ friend class AllSettings;
ImplAllSettingsData();
ImplAllSettingsData( const ImplAllSettingsData& rData );
@@ -1182,8 +1182,8 @@ private:
CollatorWrapper* mpUICollatorWrapper;
vcl::I18nHelper* mpI18nHelper;
vcl::I18nHelper* mpUII18nHelper;
- LocaleConfigurationListener* mpLocaleCfgListener;
- SvtSysLocale maSysLocale;
+ LocaleConfigurationListener* mpLocaleCfgListener;
+ SvtSysLocale maSysLocale;
};
// ---------------
@@ -1207,7 +1207,7 @@ private:
SETTINGS_SOUND | SETTINGS_NOTIFICATION |\
SETTINGS_HELP |\
SETTINGS_LOCALE | SETTINGS_UILOCALE )
-#define SETTINGS_IN_UPDATE_SETTINGS ((ULONG)0x00000800) // this flag indicates that the data changed event was created
+#define SETTINGS_IN_UPDATE_SETTINGS ((ULONG)0x00000800) // this flag indicates that the data changed event was created
// in Windows::UpdateSettings probably because of a global
// settings changed
@@ -1300,8 +1300,8 @@ public:
BOOL operator ==( const AllSettings& rSet ) const;
BOOL operator !=( const AllSettings& rSet ) const
{ return !(*this == rSet); }
- static void LocaleSettingsChanged( sal_uInt32 nHint );
- SvtSysLocale& GetSysLocale() { return mpData->maSysLocale; }
+ static void LocaleSettingsChanged( sal_uInt32 nHint );
+ SvtSysLocale& GetSysLocale() { return mpData->maSysLocale; }
};
#endif // _SV_SETTINGS_HXX
diff --git a/vcl/inc/vcl/slider.hxx b/vcl/inc/vcl/slider.hxx
index 5208fffcfb54..fa8f5b40b277 100644
--- a/vcl/inc/vcl/slider.hxx
+++ b/vcl/inc/vcl/slider.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,92 +42,92 @@
class VCL_DLLPUBLIC Slider : public Control
{
private:
- Rectangle maChannel1Rect;
- Rectangle maChannel2Rect;
- Rectangle maThumbRect;
- long mnStartPos;
- long mnMouseOff;
- long mnThumbPixOffset;
- long mnThumbPixRange;
- long mnThumbPixPos;
- long mnChannelPixOffset;
- long mnChannelPixRange;
- long mnChannelPixTop;
- long mnChannelPixBottom;
- long mnMinRange;
- long mnMaxRange;
- long mnThumbPos;
- long mnLineSize;
- long mnPageSize;
- long mnDelta;
- USHORT mnDragDraw;
- USHORT mnStateFlags;
- ScrollType meScrollType;
- BOOL mbCalcSize;
- BOOL mbFullDrag;
- Link maSlideHdl;
- Link maEndSlideHdl;
+ Rectangle maChannel1Rect;
+ Rectangle maChannel2Rect;
+ Rectangle maThumbRect;
+ long mnStartPos;
+ long mnMouseOff;
+ long mnThumbPixOffset;
+ long mnThumbPixRange;
+ long mnThumbPixPos;
+ long mnChannelPixOffset;
+ long mnChannelPixRange;
+ long mnChannelPixTop;
+ long mnChannelPixBottom;
+ long mnMinRange;
+ long mnMaxRange;
+ long mnThumbPos;
+ long mnLineSize;
+ long mnPageSize;
+ long mnDelta;
+ USHORT mnDragDraw;
+ USHORT mnStateFlags;
+ ScrollType meScrollType;
+ BOOL mbCalcSize;
+ BOOL mbFullDrag;
+ Link maSlideHdl;
+ Link maEndSlideHdl;
using Control::ImplInitSettings;
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplUpdateRects( BOOL bUpdate = TRUE );
- SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
- SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
- SAL_DLLPRIVATE void ImplCalc( BOOL bUpdate = TRUE );
- SAL_DLLPRIVATE void ImplDraw( USHORT nDrawFlags );
- SAL_DLLPRIVATE BOOL ImplIsPageUp( const Point& rPos );
- SAL_DLLPRIVATE BOOL ImplIsPageDown( const Point& rPos );
- SAL_DLLPRIVATE long ImplSlide( long nNewPos, BOOL bCallEndSlide );
- SAL_DLLPRIVATE long ImplDoAction( BOOL bCallEndSlide );
- SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE );
- SAL_DLLPRIVATE long ImplDoSlide( long nNewPos );
- SAL_DLLPRIVATE long ImplDoSlideAction( ScrollType eScrollType );
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
+ SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
+ SAL_DLLPRIVATE void ImplInitSettings();
+ SAL_DLLPRIVATE void ImplUpdateRects( BOOL bUpdate = TRUE );
+ SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
+ SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
+ SAL_DLLPRIVATE void ImplCalc( BOOL bUpdate = TRUE );
+ SAL_DLLPRIVATE void ImplDraw( USHORT nDrawFlags );
+ SAL_DLLPRIVATE BOOL ImplIsPageUp( const Point& rPos );
+ SAL_DLLPRIVATE BOOL ImplIsPageDown( const Point& rPos );
+ SAL_DLLPRIVATE long ImplSlide( long nNewPos, BOOL bCallEndSlide );
+ SAL_DLLPRIVATE long ImplDoAction( BOOL bCallEndSlide );
+ SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE );
+ SAL_DLLPRIVATE long ImplDoSlide( long nNewPos );
+ SAL_DLLPRIVATE long ImplDoSlideAction( ScrollType eScrollType );
public:
Slider( Window* pParent, WinBits nStyle = WB_HORZ );
Slider( Window* pParent, const ResId& rResId );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void KeyInput( const KeyEvent& rKEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void Slide();
- virtual void EndSlide();
+ virtual void Slide();
+ virtual void EndSlide();
- void EnableDrag( BOOL bEnable = TRUE )
+ void EnableDrag( BOOL bEnable = TRUE )
{ mbFullDrag = bEnable; }
- BOOL IsDragEnabled() const { return mbFullDrag; }
+ BOOL IsDragEnabled() const { return mbFullDrag; }
- void SetRangeMin( long nNewRange );
- long GetRangeMin() const { return mnMinRange; }
- void SetRangeMax( long nNewRange );
- long GetRangeMax() const { return mnMaxRange; }
- void SetRange( const Range& rRange );
- Range GetRange() const { return Range( GetRangeMin(), GetRangeMax() ); }
- void SetThumbPos( long nThumbPos );
- long GetThumbPos() const { return mnThumbPos; }
- void SetLineSize( long nNewSize ) { mnLineSize = nNewSize; }
- long GetLineSize() const { return mnLineSize; }
- void SetPageSize( long nNewSize ) { mnPageSize = nNewSize; }
- long GetPageSize() const { return mnPageSize; }
+ void SetRangeMin( long nNewRange );
+ long GetRangeMin() const { return mnMinRange; }
+ void SetRangeMax( long nNewRange );
+ long GetRangeMax() const { return mnMaxRange; }
+ void SetRange( const Range& rRange );
+ Range GetRange() const { return Range( GetRangeMin(), GetRangeMax() ); }
+ void SetThumbPos( long nThumbPos );
+ long GetThumbPos() const { return mnThumbPos; }
+ void SetLineSize( long nNewSize ) { mnLineSize = nNewSize; }
+ long GetLineSize() const { return mnLineSize; }
+ void SetPageSize( long nNewSize ) { mnPageSize = nNewSize; }
+ long GetPageSize() const { return mnPageSize; }
- long GetDelta() const { return mnDelta; }
+ long GetDelta() const { return mnDelta; }
- Size CalcWindowSizePixel();
+ Size CalcWindowSizePixel();
- void SetSlideHdl( const Link& rLink ) { maSlideHdl = rLink; }
- const Link& GetSlideHdl() const { return maSlideHdl; }
- void SetEndSlideHdl( const Link& rLink ) { maEndSlideHdl = rLink; }
- const Link& GetEndSlideHdl() const { return maEndSlideHdl; }
+ void SetSlideHdl( const Link& rLink ) { maSlideHdl = rLink; }
+ const Link& GetSlideHdl() const { return maSlideHdl; }
+ void SetEndSlideHdl( const Link& rLink ) { maEndSlideHdl = rLink; }
+ const Link& GetEndSlideHdl() const { return maEndSlideHdl; }
};
#endif // _SV_SLIDER_HXX
diff --git a/vcl/inc/vcl/smartid.hxx b/vcl/inc/vcl/smartid.hxx
index fa005db25c80..e1ed09463ef5 100644
--- a/vcl/inc/vcl/smartid.hxx
+++ b/vcl/inc/vcl/smartid.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/sndstyle.hxx b/vcl/inc/vcl/sndstyle.hxx
index 62268d34a6ba..1767b2610bbe 100644
--- a/vcl/inc/vcl/sndstyle.hxx
+++ b/vcl/inc/vcl/sndstyle.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/sound.hxx b/vcl/inc/vcl/sound.hxx
index 1a32a27154ce..abb962a2501d 100644
--- a/vcl/inc/vcl/sound.hxx
+++ b/vcl/inc/vcl/sound.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/spin.h b/vcl/inc/vcl/spin.h
index e20cb9aaa86a..eb52925fcf66 100644
--- a/vcl/inc/vcl/spin.h
+++ b/vcl/inc/vcl/spin.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/spin.hxx b/vcl/inc/vcl/spin.hxx
index 6250c5020717..5a0d59feff54 100644
--- a/vcl/inc/vcl/spin.hxx
+++ b/vcl/inc/vcl/spin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/spinfld.hxx b/vcl/inc/vcl/spinfld.hxx
index db46c16d331b..f2b95084a382 100644
--- a/vcl/inc/vcl/spinfld.hxx
+++ b/vcl/inc/vcl/spinfld.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
class VCL_DLLPUBLIC SpinField : public Edit
{
protected:
- Edit* mpEdit;
- AutoTimer maRepeatTimer;
- Rectangle maUpperRect;
- Rectangle maLowerRect;
- Rectangle maDropDownRect; // noch nicht angebunden...
- Link maUpHdlLink;
- Link maDownHdlLink;
- Link maFirstHdlLink;
- Link maLastHdlLink;
- BOOL mbRepeat:1,
+ Edit* mpEdit;
+ AutoTimer maRepeatTimer;
+ Rectangle maUpperRect;
+ Rectangle maLowerRect;
+ Rectangle maDropDownRect; // noch nicht angebunden...
+ Link maUpHdlLink;
+ Link maDownHdlLink;
+ Link maFirstHdlLink;
+ Link maLastHdlLink;
+ BOOL mbRepeat:1,
mbSpin:1,
mbInitialUp:1,
mbInitialDown:1,
@@ -60,20 +60,20 @@ protected:
mbInDropDown:1;
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
private:
DECL_DLLPRIVATE_LINK( ImplTimeout, Timer* );
- SAL_DLLPRIVATE void ImplInitSpinFieldData();
- SAL_DLLPRIVATE void ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea );
+ SAL_DLLPRIVATE void ImplInitSpinFieldData();
+ SAL_DLLPRIVATE void ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea );
protected:
SpinField( WindowType nTyp );
- virtual long Notify( NotifyEvent& rNEvt );
- virtual void Command( const CommandEvent& rCEvt );
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void Command( const CommandEvent& rCEvt );
- void EndDropDown();
+ void EndDropDown();
virtual void FillLayoutData() const;
Rectangle * ImplFindPartRect( const Point& rPt );
@@ -82,35 +82,35 @@ public:
SpinField( Window* pParent, const ResId& rResId );
~SpinField();
- virtual BOOL ShowDropDown( BOOL bShow );
-
- virtual void Up();
- virtual void Down();
- virtual void First();
- virtual void Last();
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
- virtual void Resize();
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual BOOL ShowDropDown( BOOL bShow );
+
+ virtual void Up();
+ virtual void Down();
+ virtual void First();
+ virtual void Last();
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- void SetUpHdl( const Link& rLink ) { maUpHdlLink = rLink; }
- const Link& GetUpHdl() const { return maUpHdlLink; }
- void SetDownHdl( const Link& rLink ) { maDownHdlLink = rLink; }
- const Link& GetDownHdl() const { return maDownHdlLink; }
- void SetFirstHdl( const Link& rLink ) { maFirstHdlLink = rLink; }
- const Link& GetFirstHdl() const { return maFirstHdlLink; }
- void SetLastHdl( const Link& rLink ) { maLastHdlLink = rLink; }
- const Link& GetLastHdl() const { return maLastHdlLink; }
+ void SetUpHdl( const Link& rLink ) { maUpHdlLink = rLink; }
+ const Link& GetUpHdl() const { return maUpHdlLink; }
+ void SetDownHdl( const Link& rLink ) { maDownHdlLink = rLink; }
+ const Link& GetDownHdl() const { return maDownHdlLink; }
+ void SetFirstHdl( const Link& rLink ) { maFirstHdlLink = rLink; }
+ const Link& GetFirstHdl() const { return maFirstHdlLink; }
+ void SetLastHdl( const Link& rLink ) { maLastHdlLink = rLink; }
+ const Link& GetLastHdl() const { return maLastHdlLink; }
- virtual Size CalcMinimumSize() const;
+ virtual Size CalcMinimumSize() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
- virtual Size CalcSize( USHORT nChars ) const;
+ virtual Size CalcSize( USHORT nChars ) const;
};
#endif // _SV_SPINFLD_HXX
diff --git a/vcl/inc/vcl/split.hxx b/vcl/inc/vcl/split.hxx
index 9cd77275820a..d8a9634d2a97 100644
--- a/vcl/inc/vcl/split.hxx
+++ b/vcl/inc/vcl/split.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +57,8 @@ private:
Link maSplitHdl;
Link maEndSplitHdl;
- SAL_DLLPRIVATE void ImplInitSplitterData();
- SAL_DLLPRIVATE void ImplDrawSplitter();
+ SAL_DLLPRIVATE void ImplInitSplitterData();
+ SAL_DLLPRIVATE void ImplDrawSplitter();
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rPos );
SAL_DLLPRIVATE void ImplStartKbdSplitting();
SAL_DLLPRIVATE void ImplKbdTracking( KeyCode aKeyCode );
@@ -72,7 +72,7 @@ private:
protected:
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nWinStyle );
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nWinStyle );
public:
Splitter( Window* pParent, WinBits nStyle = WB_VSCROLL );
diff --git a/vcl/inc/vcl/splitwin.hxx b/vcl/inc/vcl/splitwin.hxx
index c6671f2799c0..cdc6d0e9928e 100644
--- a/vcl/inc/vcl/splitwin.hxx
+++ b/vcl/inc/vcl/splitwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +46,18 @@ typedef USHORT SplitWindowItemBits;
// - Bits fuer SplitWindow-Items -
// -------------------------------
-#define SWIB_FIXED ((SplitWindowItemBits)0x0001)
-#define SWIB_RELATIVESIZE ((SplitWindowItemBits)0x0002)
-#define SWIB_PERCENTSIZE ((SplitWindowItemBits)0x0004)
-#define SWIB_COLSET ((SplitWindowItemBits)0x0008)
-#define SWIB_INVISIBLE ((SplitWindowItemBits)0x0010)
+#define SWIB_FIXED ((SplitWindowItemBits)0x0001)
+#define SWIB_RELATIVESIZE ((SplitWindowItemBits)0x0002)
+#define SWIB_PERCENTSIZE ((SplitWindowItemBits)0x0004)
+#define SWIB_COLSET ((SplitWindowItemBits)0x0008)
+#define SWIB_INVISIBLE ((SplitWindowItemBits)0x0010)
// ---------------------
// - SplitWindow-Types -
// ---------------------
-#define SPLITWINDOW_APPEND ((USHORT)0xFFFF)
-#define SPLITWINDOW_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define SPLITWINDOW_APPEND ((USHORT)0xFFFF)
+#define SPLITWINDOW_ITEM_NOTFOUND ((USHORT)0xFFFF)
// ---------------
// - SplitWindow -
@@ -66,27 +66,27 @@ typedef USHORT SplitWindowItemBits;
class VCL_DLLPUBLIC SplitWindow : public DockingWindow
{
private:
- ImplSplitSet* mpMainSet;
- ImplSplitSet* mpBaseSet;
- ImplSplitSet* mpSplitSet;
- long* mpLastSizes;
- Rectangle maDragRect;
- long mnDX;
- long mnDY;
- long mnLeftBorder;
- long mnTopBorder;
- long mnRightBorder;
- long mnBottomBorder;
- long mnMaxSize;
- long mnMouseOff;
- long mnMStartPos;
- long mnMSplitPos;
- WinBits mnWinStyle;
- WindowAlign meAlign;
- USHORT mnSplitTest;
- USHORT mnSplitPos;
- USHORT mnMouseModifier;
- BOOL mbDragFull:1,
+ ImplSplitSet* mpMainSet;
+ ImplSplitSet* mpBaseSet;
+ ImplSplitSet* mpSplitSet;
+ long* mpLastSizes;
+ Rectangle maDragRect;
+ long mnDX;
+ long mnDY;
+ long mnLeftBorder;
+ long mnTopBorder;
+ long mnRightBorder;
+ long mnBottomBorder;
+ long mnMaxSize;
+ long mnMouseOff;
+ long mnMStartPos;
+ long mnMSplitPos;
+ WinBits mnWinStyle;
+ WindowAlign meAlign;
+ USHORT mnSplitTest;
+ USHORT mnSplitPos;
+ USHORT mnMouseModifier;
+ BOOL mbDragFull:1,
mbHorz:1,
mbBottomRight:1,
mbCalc:1,
@@ -106,30 +106,30 @@ private:
mbFadeOutPressed:1,
mbFadeNoButtonMode:1,
mbNoAlign:1;
- Link maStartSplitHdl;
- Link maSplitHdl;
- Link maSplitResizeHdl;
- Link maAutoHideHdl;
- Link maFadeInHdl;
- Link maFadeOutHdl;
+ Link maStartSplitHdl;
+ Link maSplitHdl;
+ Link maSplitResizeHdl;
+ Link maAutoHideHdl;
+ Link maFadeInHdl;
+ Link maFadeOutHdl;
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplCalcLayout();
- SAL_DLLPRIVATE void ImplUpdate();
- SAL_DLLPRIVATE void ImplUpdateSet( ImplSplitSet* pSet );
- SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
- SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos );
- SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const;
- SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
- SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
- SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
- SAL_DLLPRIVATE void ImplDrawButtonRect( const Rectangle& rRect, long nSize );
- SAL_DLLPRIVATE void ImplDrawAutoHide( BOOL bInPaint );
- SAL_DLLPRIVATE void ImplDrawFadeIn( BOOL bInPaint );
- SAL_DLLPRIVATE void ImplDrawFadeOut( BOOL bInPaint );
- SAL_DLLPRIVATE void ImplNewAlign();
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
+ SAL_DLLPRIVATE void ImplInitSettings();
+ SAL_DLLPRIVATE void ImplCalcLayout();
+ SAL_DLLPRIVATE void ImplUpdate();
+ SAL_DLLPRIVATE void ImplUpdateSet( ImplSplitSet* pSet );
+ SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
+ SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos );
+ SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const;
+ SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
+ SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
+ SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
+ SAL_DLLPRIVATE void ImplDrawButtonRect( const Rectangle& rRect, long nSize );
+ SAL_DLLPRIVATE void ImplDrawAutoHide( BOOL bInPaint );
+ SAL_DLLPRIVATE void ImplDrawFadeIn( BOOL bInPaint );
+ SAL_DLLPRIVATE void ImplDrawFadeOut( BOOL bInPaint );
+ SAL_DLLPRIVATE void ImplNewAlign();
SAL_DLLPRIVATE void ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft );
SAL_DLLPRIVATE void ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft );
SAL_DLLPRIVATE void ImplStartSplit( const MouseEvent& rMEvt );
@@ -156,116 +156,116 @@ public:
SplitWindow( Window* pParent, const ResId& rResId );
~SplitWindow();
- virtual void StartSplit();
- virtual void Split();
- virtual void SplitResize();
- virtual void AutoHide();
- virtual void FadeIn();
- virtual void FadeOut();
+ virtual void StartSplit();
+ virtual void Split();
+ virtual void SplitResize();
+ virtual void AutoHide();
+ virtual void FadeIn();
+ virtual void FadeOut();
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Move();
- virtual void Resize();
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Move();
+ virtual void Resize();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- void InsertItem( USHORT nId, Window* pWindow, long nSize,
+ void InsertItem( USHORT nId, Window* pWindow, long nSize,
USHORT nPos = SPLITWINDOW_APPEND, USHORT nSetId = 0,
SplitWindowItemBits nBits = 0 );
- void InsertItem( USHORT nId, long nSize,
+ void InsertItem( USHORT nId, long nSize,
USHORT nPos = SPLITWINDOW_APPEND, USHORT nSetId = 0,
SplitWindowItemBits nBits = 0 );
- void MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId = 0 );
- void RemoveItem( USHORT nId, BOOL bHide = TRUE );
- void Clear();
+ void MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId = 0 );
+ void RemoveItem( USHORT nId, BOOL bHide = TRUE );
+ void Clear();
- void SetBaseSet( USHORT nSetId = 0 );
- USHORT GetBaseSet() const;
+ void SetBaseSet( USHORT nSetId = 0 );
+ USHORT GetBaseSet() const;
- void SetSplitSize( USHORT nSetId, long nSplitSize,
+ void SetSplitSize( USHORT nSetId, long nSplitSize,
BOOL bWithChilds = FALSE );
- long GetSplitSize( USHORT nSetId ) const;
- void SetItemBackground( USHORT nSetId );
- void SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper );
- Wallpaper GetItemBackground( USHORT nSetId ) const;
- BOOL IsItemBackground( USHORT nSetId ) const;
- void SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap );
- Bitmap GetItemBitmap( USHORT nSetId ) const;
+ long GetSplitSize( USHORT nSetId ) const;
+ void SetItemBackground( USHORT nSetId );
+ void SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper );
+ Wallpaper GetItemBackground( USHORT nSetId ) const;
+ BOOL IsItemBackground( USHORT nSetId ) const;
+ void SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap );
+ Bitmap GetItemBitmap( USHORT nSetId ) const;
- void SplitItem( USHORT nId, long nNewSize,
+ void SplitItem( USHORT nId, long nNewSize,
BOOL bPropSmall = FALSE,
BOOL bPropGreat = FALSE );
- void SetItemSize( USHORT nId, long nNewSize );
- long GetItemSize( USHORT nId ) const;
- long GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const;
- void SetItemBits( USHORT nId, SplitWindowItemBits nNewBits );
+ void SetItemSize( USHORT nId, long nNewSize );
+ long GetItemSize( USHORT nId ) const;
+ long GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const;
+ void SetItemBits( USHORT nId, SplitWindowItemBits nNewBits );
SplitWindowItemBits GetItemBits( USHORT nId ) const;
- Window* GetItemWindow( USHORT nId ) const;
- USHORT GetSet( USHORT nId ) const;
- BOOL GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const;
- USHORT GetItemId( Window* pWindow ) const;
- USHORT GetItemId( const Point& rPos ) const;
- USHORT GetItemPos( USHORT nId, USHORT nSetId = 0 ) const;
- USHORT GetItemId( USHORT nPos, USHORT nSetId = 0 ) const;
- USHORT GetItemCount( USHORT nSetId = 0 ) const;
- BOOL IsItemValid( USHORT nId ) const;
+ Window* GetItemWindow( USHORT nId ) const;
+ USHORT GetSet( USHORT nId ) const;
+ BOOL GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const;
+ USHORT GetItemId( Window* pWindow ) const;
+ USHORT GetItemId( const Point& rPos ) const;
+ USHORT GetItemPos( USHORT nId, USHORT nSetId = 0 ) const;
+ USHORT GetItemId( USHORT nPos, USHORT nSetId = 0 ) const;
+ USHORT GetItemCount( USHORT nSetId = 0 ) const;
+ BOOL IsItemValid( USHORT nId ) const;
- void SetNoAlign( BOOL bNoAlign );
- BOOL IsNoAlign() const { return mbNoAlign; }
- void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP );
- WindowAlign GetAlign() const { return meAlign; }
- BOOL IsHorizontal() const { return mbHorz; }
+ void SetNoAlign( BOOL bNoAlign );
+ BOOL IsNoAlign() const { return mbNoAlign; }
+ void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP );
+ WindowAlign GetAlign() const { return meAlign; }
+ BOOL IsHorizontal() const { return mbHorz; }
- BOOL IsSplitting() const { return IsTracking(); }
+ BOOL IsSplitting() const { return IsTracking(); }
- void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; }
- long GetMaxSizePixel() const { return mnMaxSize; }
+ void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; }
+ long GetMaxSizePixel() const { return mnMaxSize; }
- static Size CalcWindowSizePixel( const Size& rSize,
+ static Size CalcWindowSizePixel( const Size& rSize,
WindowAlign eAlign,
WinBits nWinStyle,
BOOL bExtra = FALSE );
- Size CalcWindowSizePixel( const Size& rSize )
+ Size CalcWindowSizePixel( const Size& rSize )
{ return CalcWindowSizePixel( rSize, meAlign, mnWinStyle, (mbAutoHide || mbFadeOut) ); }
- Size CalcLayoutSizePixel( const Size& aNewSize );
+ Size CalcLayoutSizePixel( const Size& aNewSize );
- void ShowAutoHideButton( BOOL bShow = TRUE );
- BOOL IsAutoHideButtonVisible() const { return mbAutoHide; }
- void ShowFadeInHideButton( BOOL bShow = TRUE );
- void ShowFadeInButton( BOOL bShow = TRUE ) { ShowFadeInHideButton( bShow ); }
- BOOL IsFadeInButtonVisible() const { return mbFadeIn; }
- void ShowFadeOutButton( BOOL bShow = TRUE );
- BOOL IsFadeOutButtonVisible() const { return mbFadeOut; }
- long GetFadeInSize() const;
- BOOL IsFadeNoButtonMode() const { return mbFadeNoButtonMode; }
+ void ShowAutoHideButton( BOOL bShow = TRUE );
+ BOOL IsAutoHideButtonVisible() const { return mbAutoHide; }
+ void ShowFadeInHideButton( BOOL bShow = TRUE );
+ void ShowFadeInButton( BOOL bShow = TRUE ) { ShowFadeInHideButton( bShow ); }
+ BOOL IsFadeInButtonVisible() const { return mbFadeIn; }
+ void ShowFadeOutButton( BOOL bShow = TRUE );
+ BOOL IsFadeOutButtonVisible() const { return mbFadeOut; }
+ long GetFadeInSize() const;
+ BOOL IsFadeNoButtonMode() const { return mbFadeNoButtonMode; }
- void SetAutoHideState( BOOL bAutoHide );
- BOOL GetAutoHideState() const { return mbAutoHideIn; }
+ void SetAutoHideState( BOOL bAutoHide );
+ BOOL GetAutoHideState() const { return mbAutoHideIn; }
- Rectangle GetAutoHideRect() const;
- Rectangle GetFadeInRect() const;
- Rectangle GetFadeOutRect() const;
+ Rectangle GetAutoHideRect() const;
+ Rectangle GetFadeInRect() const;
+ Rectangle GetFadeOutRect() const;
- void SetStartSplitHdl( const Link& rLink ) { maStartSplitHdl = rLink; }
- const Link& GetStartSplitHdl() const { return maStartSplitHdl; }
- void SetSplitHdl( const Link& rLink ) { maSplitHdl = rLink; }
- const Link& GetSplitHdl() const { return maSplitHdl; }
- void SetSplitResizeHdl( const Link& rLink ) { maSplitResizeHdl = rLink; }
- const Link& GetSplitResizeHdl() const { return maSplitResizeHdl; }
- void SetAutoHideHdl( const Link& rLink ) { maAutoHideHdl = rLink; }
- const Link& GetAutoHideHdl() const { return maAutoHideHdl; }
- void SetFadeInHdl( const Link& rLink ) { maFadeInHdl = rLink; }
- const Link& GetFadeInHdl() const { return maFadeInHdl; }
- void SetFadeOutHdl( const Link& rLink ) { maFadeOutHdl = rLink; }
- const Link& GetFadeOutHdl() const { return maFadeOutHdl; }
+ void SetStartSplitHdl( const Link& rLink ) { maStartSplitHdl = rLink; }
+ const Link& GetStartSplitHdl() const { return maStartSplitHdl; }
+ void SetSplitHdl( const Link& rLink ) { maSplitHdl = rLink; }
+ const Link& GetSplitHdl() const { return maSplitHdl; }
+ void SetSplitResizeHdl( const Link& rLink ) { maSplitResizeHdl = rLink; }
+ const Link& GetSplitResizeHdl() const { return maSplitResizeHdl; }
+ void SetAutoHideHdl( const Link& rLink ) { maAutoHideHdl = rLink; }
+ const Link& GetAutoHideHdl() const { return maAutoHideHdl; }
+ void SetFadeInHdl( const Link& rLink ) { maFadeInHdl = rLink; }
+ const Link& GetFadeInHdl() const { return maFadeInHdl; }
+ void SetFadeOutHdl( const Link& rLink ) { maFadeOutHdl = rLink; }
+ const Link& GetFadeOutHdl() const { return maFadeOutHdl; }
};
-#endif // _SV_SPLITWIN_HXX
+#endif // _SV_SPLITWIN_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 7d5a9a1c9f2d..6574b6ac3c1e 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,22 +55,22 @@ typedef USHORT StatusBarItemBits;
// - Bits fuer StatusBarItems -
// ----------------------------
-#define SIB_LEFT ((StatusBarItemBits)0x0001)
-#define SIB_CENTER ((StatusBarItemBits)0x0002)
-#define SIB_RIGHT ((StatusBarItemBits)0x0004)
-#define SIB_IN ((StatusBarItemBits)0x0008)
-#define SIB_OUT ((StatusBarItemBits)0x0010)
-#define SIB_FLAT ((StatusBarItemBits)0x0020)
-#define SIB_AUTOSIZE ((StatusBarItemBits)0x0040)
-#define SIB_USERDRAW ((StatusBarItemBits)0x0080)
+#define SIB_LEFT ((StatusBarItemBits)0x0001)
+#define SIB_CENTER ((StatusBarItemBits)0x0002)
+#define SIB_RIGHT ((StatusBarItemBits)0x0004)
+#define SIB_IN ((StatusBarItemBits)0x0008)
+#define SIB_OUT ((StatusBarItemBits)0x0010)
+#define SIB_FLAT ((StatusBarItemBits)0x0020)
+#define SIB_AUTOSIZE ((StatusBarItemBits)0x0040)
+#define SIB_USERDRAW ((StatusBarItemBits)0x0080)
// -------------------
// - StatusBar-Types -
// -------------------
-#define STATUSBAR_APPEND ((USHORT)0xFFFF)
-#define STATUSBAR_ITEM_NOTFOUND ((USHORT)0xFFFF)
-#define STATUSBAR_OFFSET ((long)5)
+#define STATUSBAR_APPEND ((USHORT)0xFFFF)
+#define STATUSBAR_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define STATUSBAR_OFFSET ((long)5)
// -------------
// - StatusBar -
@@ -82,38 +82,38 @@ class VCL_DLLPUBLIC StatusBar : public Window
private:
ImplStatusItemList* mpItemList;
ImplData* mpImplData;
- XubString maPrgsTxt;
- Point maPrgsTxtPos;
- Rectangle maPrgsFrameRect;
- long mnPrgsSize;
- long mnItemsWidth;
- long mnDX;
- long mnDY;
- long mnCalcHeight;
- long mnTextY;
- long mnItemY;
- USHORT mnCurItemId;
- USHORT mnPercent;
- USHORT mnPercentCount;
- BOOL mbVisibleItems;
- BOOL mbFormat;
- BOOL mbProgressMode;
- BOOL mbInUserDraw;
- BOOL mbBottomBorder;
- Link maClickHdl;
- Link maDoubleClickHdl;
+ XubString maPrgsTxt;
+ Point maPrgsTxtPos;
+ Rectangle maPrgsFrameRect;
+ long mnPrgsSize;
+ long mnItemsWidth;
+ long mnDX;
+ long mnDY;
+ long mnCalcHeight;
+ long mnTextY;
+ long mnItemY;
+ USHORT mnCurItemId;
+ USHORT mnPercent;
+ USHORT mnPercentCount;
+ BOOL mbVisibleItems;
+ BOOL mbFormat;
+ BOOL mbProgressMode;
+ BOOL mbInUserDraw;
+ BOOL mbBottomBorder;
+ Link maClickHdl;
+ Link maDoubleClickHdl;
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SAL_DLLPRIVATE void ImplFormat();
- SAL_DLLPRIVATE BOOL ImplIsItemUpdate();
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
+ SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplFormat();
+ SAL_DLLPRIVATE BOOL ImplIsItemUpdate();
using OutputDevice::ImplDrawText;
- SAL_DLLPRIVATE void ImplDrawText( BOOL bOffScreen, long nOldTextWidth );
- SAL_DLLPRIVATE void ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL bDrawFrame );
- SAL_DLLPRIVATE void ImplDrawProgress( BOOL bPaint,
+ SAL_DLLPRIVATE void ImplDrawText( BOOL bOffScreen, long nOldTextWidth );
+ SAL_DLLPRIVATE void ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL bDrawFrame );
+ SAL_DLLPRIVATE void ImplDrawProgress( BOOL bPaint,
USHORT nOldPerc, USHORT nNewPerc );
- SAL_DLLPRIVATE void ImplCalcProgressRect();
+ SAL_DLLPRIVATE void ImplCalcProgressRect();
SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( USHORT nPos ) const;
SAL_DLLPRIVATE USHORT ImplGetFirstVisiblePos() const;
SAL_DLLPRIVATE void ImplCalcBorder();
@@ -124,104 +124,104 @@ public:
StatusBar( Window* pParent, const ResId& rResId );
~StatusBar();
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Move();
- virtual void Resize();
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Move();
+ virtual void Resize();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void Click();
- virtual void DoubleClick();
- virtual void UserDraw( const UserDrawEvent& rUDEvt );
+ virtual void Click();
+ virtual void DoubleClick();
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
- void InsertItem( USHORT nItemId, ULONG nWidth,
+ void InsertItem( USHORT nItemId, ULONG nWidth,
StatusBarItemBits nBits = SIB_CENTER | SIB_IN,
long nOffset = STATUSBAR_OFFSET,
USHORT nPos = STATUSBAR_APPEND );
- void RemoveItem( USHORT nItemId );
+ void RemoveItem( USHORT nItemId );
- void ShowItem( USHORT nItemId );
- void HideItem( USHORT nItemId );
- BOOL IsItemVisible( USHORT nItemId ) const;
+ void ShowItem( USHORT nItemId );
+ void HideItem( USHORT nItemId );
+ BOOL IsItemVisible( USHORT nItemId ) const;
- void ShowItems();
- void HideItems();
- BOOL AreItemsVisible() const { return mbVisibleItems; }
+ void ShowItems();
+ void HideItems();
+ BOOL AreItemsVisible() const { return mbVisibleItems; }
- void CopyItems( const StatusBar& rStatusBar );
- void Clear();
+ void CopyItems( const StatusBar& rStatusBar );
+ void Clear();
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- Point GetItemTextPos( USHORT nItemId ) const;
- USHORT GetCurItemId() const { return mnCurItemId; }
+ USHORT GetItemCount() const;
+ USHORT GetItemId( USHORT nPos ) const;
+ USHORT GetItemId( const Point& rPos ) const;
+ USHORT GetItemPos( USHORT nItemId ) const;
+ Rectangle GetItemRect( USHORT nItemId ) const;
+ Point GetItemTextPos( USHORT nItemId ) const;
+ USHORT GetCurItemId() const { return mnCurItemId; }
- ULONG GetItemWidth( USHORT nItemId ) const;
- StatusBarItemBits GetItemBits( USHORT nItemId ) const;
- long GetItemOffset( USHORT nItemId ) const;
+ ULONG GetItemWidth( USHORT nItemId ) const;
+ StatusBarItemBits GetItemBits( USHORT nItemId ) const;
+ long GetItemOffset( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rText );
- const XubString& GetItemText( USHORT nItemId ) const;
+ void SetItemText( USHORT nItemId, const XubString& rText );
+ const XubString& GetItemText( USHORT nItemId ) const;
- void SetItemData( USHORT nItemId, void* pNewData );
- void* GetItemData( USHORT nItemId ) const;
+ void SetItemData( USHORT nItemId, void* pNewData );
+ void* GetItemData( USHORT nItemId ) const;
void SetItemCommand( USHORT nItemId, const XubString& rCommand );
const XubString& GetItemCommand( USHORT nItemId );
- void SetHelpText( USHORT nItemId, const XubString& rText );
- const XubString& GetHelpText( USHORT nItemId ) const;
+ void SetHelpText( USHORT nItemId, const XubString& rText );
+ const XubString& GetHelpText( USHORT nItemId ) const;
using Window::SetQuickHelpText;
void SetQuickHelpText( USHORT nItemId, const XubString& rText );
using Window::GetQuickHelpText;
const XubString& GetQuickHelpText( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( USHORT nItemId, ULONG nHelpId );
+ ULONG GetHelpId( USHORT nItemId ) const;
- void SetBottomBorder( BOOL bBottomBorder = TRUE );
- BOOL IsBottomBorder() const { return mbBottomBorder; }
+ void SetBottomBorder( BOOL bBottomBorder = TRUE );
+ BOOL IsBottomBorder() const { return mbBottomBorder; }
- void SetTopBorder( BOOL bTopBorder = TRUE );
- BOOL IsTopBorder() const;
+ void SetTopBorder( BOOL bTopBorder = TRUE );
+ BOOL IsTopBorder() const;
- void StartProgressMode( const XubString& rText );
- void SetProgressValue( USHORT nPercent );
- void EndProgressMode();
- BOOL IsProgressMode() const { return mbProgressMode; }
- void ResetProgressMode();
+ void StartProgressMode( const XubString& rText );
+ void SetProgressValue( USHORT nPercent );
+ void EndProgressMode();
+ BOOL IsProgressMode() const { return mbProgressMode; }
+ void ResetProgressMode();
- void SetText( const XubString& rText );
+ void SetText( const XubString& rText );
- void SetHelpText( const XubString& rText )
+ void SetHelpText( const XubString& rText )
{ Window::SetHelpText( rText ); }
- const XubString& GetHelpText() const
+ const XubString& GetHelpText() const
{ return Window::GetHelpText(); }
- void SetHelpId( ULONG nId )
+ void SetHelpId( ULONG nId )
{ Window::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ ULONG GetHelpId() const
{ return Window::GetHelpId(); }
- Size CalcWindowSizePixel() const;
+ Size CalcWindowSizePixel() const;
- void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
- const Link& GetClickHdl() const { return maClickHdl; }
- void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
- const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
+ void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
+ const Link& GetClickHdl() const { return maClickHdl; }
+ void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; }
+ const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
using Window::SetAccessibleName;
- void SetAccessibleName( USHORT nItemId, const XubString& rName );
+ void SetAccessibleName( USHORT nItemId, const XubString& rName );
using Window::GetAccessibleName;
- const XubString& GetAccessibleName( USHORT nItemId ) const;
+ const XubString& GetAccessibleName( USHORT nItemId ) const;
};
-#endif // _SV_STATUS_HXX
+#endif // _SV_STATUS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/stdtext.hxx b/vcl/inc/vcl/stdtext.hxx
index 96bd7ec14a1f..3d10073d455c 100644
--- a/vcl/inc/vcl/stdtext.hxx
+++ b/vcl/inc/vcl/stdtext.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +39,9 @@ class Window;
// - Standard-Texte -
// ------------------
-#define STANDARD_TEXT_FIRST STANDARD_TEXT_SERVICE_NOT_AVAILABLE
-#define STANDARD_TEXT_SERVICE_NOT_AVAILABLE ((USHORT)0)
-#define STANDARD_TEXT_LAST STANDARD_TEXT_SERVICE_NOT_AVAILABLE
+#define STANDARD_TEXT_FIRST STANDARD_TEXT_SERVICE_NOT_AVAILABLE
+#define STANDARD_TEXT_SERVICE_NOT_AVAILABLE ((USHORT)0)
+#define STANDARD_TEXT_LAST STANDARD_TEXT_SERVICE_NOT_AVAILABLE
XubString VCL_DLLPUBLIC GetStandardText( USHORT nStdText );
@@ -51,6 +51,6 @@ XubString VCL_DLLPUBLIC GetStandardText( USHORT nStdText );
void VCL_DLLPUBLIC ShowServiceNotAvailableError( Window* pParent, const XubString& rServiceName, BOOL bError );
-#endif // _VCL_STDTEXT_HXX
+#endif // _VCL_STDTEXT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/strhelper.hxx b/vcl/inc/vcl/strhelper.hxx
index 3cb88ea14bdc..a41cd65c9a34 100644
--- a/vcl/inc/vcl/strhelper.hxx
+++ b/vcl/inc/vcl/strhelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/subedit.hxx b/vcl/inc/vcl/subedit.hxx
index 17b22e2b5587..310af9abbee8 100644
--- a/vcl/inc/vcl/subedit.hxx
+++ b/vcl/inc/vcl/subedit.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/sv.h b/vcl/inc/vcl/sv.h
index 543e08caec8f..5d6527a16602 100644
--- a/vcl/inc/vcl/sv.h
+++ b/vcl/inc/vcl/sv.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index e608b61d0b7f..860f41db193b 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -157,12 +157,12 @@ inline BOOL ApplicationAddress::IsConnectToSame( const ApplicationAddress& rAdr
return FALSE;
}
-#define APPEVENT_PARAM_DELIMITER '\n'
+#define APPEVENT_PARAM_DELIMITER '\n'
-#define APPEVENT_OPEN_STRING "Open"
-#define APPEVENT_PRINT_STRING "Print"
-#define APPEVENT_DISKINSERT_STRING "DiskInsert"
-#define APPEVENT_SAVEDOCUMENTS_STRING "SaveDocuments"
+#define APPEVENT_OPEN_STRING "Open"
+#define APPEVENT_PRINT_STRING "Print"
+#define APPEVENT_DISKINSERT_STRING "DiskInsert"
+#define APPEVENT_SAVEDOCUMENTS_STRING "SaveDocuments"
class VCL_DLLPUBLIC ApplicationEvent
{
@@ -314,7 +314,7 @@ public:
<TRUE/> if the system font is suitable for our UI
<FALSE/> if the test string could not be displayed with the system font
*/
- static bool ValidateSystemFont();
+ static bool ValidateSystemFont();
static void SetSettings( const AllSettings& rSettings );
static const AllSettings& GetSettings();
@@ -330,8 +330,8 @@ public:
static ULONG PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent );
static ULONG PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent );
- static void RemoveMouseAndKeyEvents( Window *pWin );
- static BOOL IsProcessedMouseOrKeyEvent( ULONG nEventId );
+ static void RemoveMouseAndKeyEvents( Window *pWin );
+ static BOOL IsProcessedMouseOrKeyEvent( ULONG nEventId );
static ULONG PostUserEvent( ULONG nEvent, void* pEventData = NULL );
static ULONG PostUserEvent( const Link& rLink, void* pCaller = NULL );
@@ -378,7 +378,7 @@ public:
static bool IsMultiDisplay();
static Rectangle GetScreenPosSizePixel( unsigned int nScreen );
static Rectangle GetWorkAreaPosSizePixel( unsigned int nScreen );
- static rtl::OUString GetScreenName( unsigned int nScreen );
+ static rtl::OUString GetScreenName( unsigned int nScreen );
static unsigned int GetDefaultDisplayNumber();
// if IsMultiDisplay() == false the return value will be
// nearest screen of the target rectangle
diff --git a/vcl/inc/vcl/svcompat.hxx b/vcl/inc/vcl/svcompat.hxx
index 2aa0c82ad284..2c7ef26c7af5 100644
--- a/vcl/inc/vcl/svcompat.hxx
+++ b/vcl/inc/vcl/svcompat.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// -----------
#define COMPAT_FORMAT( char1, char2, char3, char4 ) \
- ((ULONG)((((ULONG)(char)(char1)))| \
- (((ULONG)(char)(char2))<<8UL)| \
- (((ULONG)(char)(char3))<<16UL)| \
+ ((ULONG)((((ULONG)(char)(char1)))| \
+ (((ULONG)(char)(char2))<<8UL)| \
+ (((ULONG)(char)(char3))<<16UL)| \
((ULONG)(char)(char4))<<24UL))
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 3229b6f1654d..f2d0f6e08bd2 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -236,7 +236,7 @@ struct ImplSVWinData
USHORT mnTrackFlags; // tracking flags
USHORT mnAutoScrollFlags; // auto scroll flags
BOOL mbNoDeactivate; // TRUE: keine Deactivate durchfuehren
- BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus
+ BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus
BOOL mbNoSaveBackground; // TRUE: save background is unnecessary or even less performant
};
@@ -336,9 +336,9 @@ struct ImplSVData
ULONG mnThreadCount; // is VCL MultiThread enabled
ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block
ImplTimerData* mpFirstTimerData; // list of all running timers
- SalTimer* mpSalTimer; // interface to sal event loop/timers
- SalI18NImeStatus* mpImeStatus; // interface to ime status window
- SalSystem* mpSalSystem; // SalSystem interface
+ SalTimer* mpSalTimer; // interface to sal event loop/timers
+ SalI18NImeStatus* mpImeStatus; // interface to ime status window
+ SalSystem* mpSalSystem; // SalSystem interface
ResMgr* mpResMgr; // SV-Resource-Manager
ULONG mnTimerPeriod; // current timer period
ULONG mnTimerUpdate; // TimerCallbackProcs on stack
@@ -361,7 +361,7 @@ struct ImplSVData
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge;
com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient;
- ::vcl::SettingsConfigItem* mpSettingsConfigItem;
+ ::vcl::SettingsConfigItem* mpSettingsConfigItem;
std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList;
};
diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc
index 059ed1524b7c..1f688bc1be2e 100644
--- a/vcl/inc/vcl/svids.hrc
+++ b/vcl/inc/vcl/svids.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,47 +30,47 @@
#include "svl/solar.hrc"
-#define SV_RESID_STDOFFSET 0
-#define SV_RESID_WINOFFSET 1
-#define SV_RESID_OS2OFFSET 2
-#define SV_RESID_MACOFFSET 3
-#define SV_RESID_UNIXOFFSET 4
-#define SV_RESID_MONOOFFSET 5
+#define SV_RESID_STDOFFSET 0
+#define SV_RESID_WINOFFSET 1
+#define SV_RESID_OS2OFFSET 2
+#define SV_RESID_MACOFFSET 3
+#define SV_RESID_UNIXOFFSET 4
+#define SV_RESID_MONOOFFSET 5
// Achtung: Diese Id's muessen min. 10 Werte auseinanderliegen, da
// je nach Style noch ein Offset aufgerechnet wird
-#define SV_RESID_BITMAP_CHECK 1000
-#define SV_RESID_BITMAP_RADIO 1010
+#define SV_RESID_BITMAP_CHECK 1000
+#define SV_RESID_BITMAP_RADIO 1010
-#define SV_RESID_BITMAP_MSGBOX 1020
+#define SV_RESID_BITMAP_MSGBOX 1020
#define SV_RESID_BITMAP_MSGBOX_HC 1021
-#define SV_RESID_BITMAP_PIN 1030
+#define SV_RESID_BITMAP_PIN 1030
-#define SV_RESID_BITMAP_SPLITHPIN 1040
-#define SV_RESID_BITMAP_SPLITVPIN 1041
-#define SV_RESID_BITMAP_SPLITHARW 1042
-#define SV_RESID_BITMAP_SPLITVARW 1043
+#define SV_RESID_BITMAP_SPLITHPIN 1040
+#define SV_RESID_BITMAP_SPLITVPIN 1041
+#define SV_RESID_BITMAP_SPLITHARW 1042
+#define SV_RESID_BITMAP_SPLITVARW 1043
-#define SV_RESID_BITMAP_SCROLLMSK 1050
-#define SV_RESID_BITMAP_SCROLLBMP 1051
-#define SV_RESID_BITMAP_CLOSEDOC 1052
-#define SV_RESID_BITMAP_CLOSEDOCHC 1053
+#define SV_RESID_BITMAP_SCROLLMSK 1050
+#define SV_RESID_BITMAP_SCROLLBMP 1051
+#define SV_RESID_BITMAP_CLOSEDOC 1052
+#define SV_RESID_BITMAP_CLOSEDOCHC 1053
#define SV_DISCLOSURE_PLUS 1060
#define SV_DISCLOSURE_MINUS 1061
#define SV_DISCLOSURE_PLUS_HC 1062
#define SV_DISCLOSURE_MINUS_HC 1063
-#define SV_RESID_MENU_EDIT 2000
-#define SV_MENU_EDIT_UNDO 1
-#define SV_MENU_EDIT_CUT 2
-#define SV_MENU_EDIT_COPY 3
-#define SV_MENU_EDIT_PASTE 4
-#define SV_MENU_EDIT_DELETE 5
-#define SV_MENU_EDIT_SELECTALL 6
-#define SV_MENU_EDIT_INSERTSYMBOL 7
-#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001
+#define SV_RESID_MENU_EDIT 2000
+#define SV_MENU_EDIT_UNDO 1
+#define SV_MENU_EDIT_CUT 2
+#define SV_MENU_EDIT_COPY 3
+#define SV_MENU_EDIT_PASTE 4
+#define SV_MENU_EDIT_DELETE 5
+#define SV_MENU_EDIT_SELECTALL 6
+#define SV_MENU_EDIT_INSERTSYMBOL 7
+#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001
#define SV_MENU_MAC_SERVICES 2002
#define SV_MENU_MAC_HIDEAPP 2003
@@ -164,34 +164,34 @@
#define SV_PRINT_NOPRINTERWARNING 2051
#define SV_PRINT_NOCONTENT 2052
-#define SV_HELPTEXT_CLOSE 10000
-#define SV_HELPTEXT_MINIMIZE 10001
-#define SV_HELPTEXT_MAXIMIZE 10002
-#define SV_HELPTEXT_RESTORE 10003
-#define SV_HELPTEXT_ROLLDOWN 10004
-#define SV_HELPTEXT_ROLLUP 10005
-#define SV_HELPTEXT_HELP 10006
-#define SV_HELPTEXT_ALWAYSVISIBLE 10007
-#define SV_HELPTEXT_FADEIN 10008
-#define SV_HELPTEXT_FADEOUT 10009
-#define SV_HELPTEXT_SPLITFLOATING 10010
-#define SV_HELPTEXT_SPLITFIXED 10011
+#define SV_HELPTEXT_CLOSE 10000
+#define SV_HELPTEXT_MINIMIZE 10001
+#define SV_HELPTEXT_MAXIMIZE 10002
+#define SV_HELPTEXT_RESTORE 10003
+#define SV_HELPTEXT_ROLLDOWN 10004
+#define SV_HELPTEXT_ROLLUP 10005
+#define SV_HELPTEXT_HELP 10006
+#define SV_HELPTEXT_ALWAYSVISIBLE 10007
+#define SV_HELPTEXT_FADEIN 10008
+#define SV_HELPTEXT_FADEOUT 10009
+#define SV_HELPTEXT_SPLITFLOATING 10010
+#define SV_HELPTEXT_SPLITFIXED 10011
#define SV_HELPTEXT_CLOSEDOCUMENT 10012
-#define SV_BUTTONTEXT_OK 10100
-#define SV_BUTTONTEXT_CANCEL 10101
-#define SV_BUTTONTEXT_YES 10102
-#define SV_BUTTONTEXT_NO 10103
-#define SV_BUTTONTEXT_RETRY 10104
-#define SV_BUTTONTEXT_HELP 10105
-#define SV_BUTTONTEXT_CLOSE SV_HELPTEXT_CLOSE
-#define SV_BUTTONTEXT_MORE 10107
-#define SV_BUTTONTEXT_IGNORE 10108
-#define SV_BUTTONTEXT_ABORT 10109
-#define SV_BUTTONTEXT_LESS 10110
+#define SV_BUTTONTEXT_OK 10100
+#define SV_BUTTONTEXT_CANCEL 10101
+#define SV_BUTTONTEXT_YES 10102
+#define SV_BUTTONTEXT_NO 10103
+#define SV_BUTTONTEXT_RETRY 10104
+#define SV_BUTTONTEXT_HELP 10105
+#define SV_BUTTONTEXT_CLOSE SV_HELPTEXT_CLOSE
+#define SV_BUTTONTEXT_MORE 10107
+#define SV_BUTTONTEXT_IGNORE 10108
+#define SV_BUTTONTEXT_ABORT 10109
+#define SV_BUTTONTEXT_LESS 10110
-#define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE
-#define SV_STDTEXT_SERVICENOTAVAILABLE 10200
+#define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE
+#define SV_STDTEXT_SERVICENOTAVAILABLE 10200
#define SV_STDTEXT_DONTHINTAGAIN 10201
#define SV_STDTEXT_DONTASKAGAIN 10202
#define SV_STDTEXT_DONTWARNAGAIN 10203
@@ -199,20 +199,20 @@
#define SV_STDTEXT_PREFERENCES 10205
#define SV_MAC_SCREENNNAME 10206
#define SV_STDTEXT_ALLFILETYPES 10207
-#define SV_STDTEXT_LAST SV_STDTEXT_ALLFILETYPES
+#define SV_STDTEXT_LAST SV_STDTEXT_ALLFILETYPES
-#define SV_ACCESSERROR_FIRST SV_ACCESSERROR_WRONG_VERSION
-#define SV_ACCESSERROR_WRONG_VERSION 10500
-#define SV_ACCESSERROR_BRIDGE_MSG 10501
+#define SV_ACCESSERROR_FIRST SV_ACCESSERROR_WRONG_VERSION
+#define SV_ACCESSERROR_WRONG_VERSION 10500
+#define SV_ACCESSERROR_BRIDGE_MSG 10501
#define SV_ACCESSERROR_OK_CANCEL_MSG 10502
-#define SV_ACCESSERROR_MISSING_BRIDGE 10503
-#define SV_ACCESSERROR_FAULTY_JAVA 10504
-#define SV_ACCESSERROR_JAVA_MSG 10505
-#define SV_ACCESSERROR_MISSING_JAVA 10506
+#define SV_ACCESSERROR_MISSING_BRIDGE 10503
+#define SV_ACCESSERROR_FAULTY_JAVA 10504
+#define SV_ACCESSERROR_JAVA_MSG 10505
+#define SV_ACCESSERROR_MISSING_JAVA 10506
#define SV_ACCESSERROR_JAVA_NOT_CONFIGURED 10507
#define SV_ACCESSERROR_JAVA_DISABLED 10508
#define SV_ACCESSERROR_TURNAROUND_MSG 10509
-#define SV_ACCESSERROR_LAST SV_ACCESSERROR_TURNAROUND_MSG
+#define SV_ACCESSERROR_LAST SV_ACCESSERROR_TURNAROUND_MSG
#define SV_SHORTCUT_HELP 10600
#define SV_SHORTCUT_CONTEXTHELP 10601
@@ -258,4 +258,4 @@
#define HID_PRINTDLG HID_VCL_START
-#endif // _SV_SVIDS_HRC
+#endif // _SV_SVIDS_HRC
diff --git a/vcl/inc/vcl/symbol.hxx b/vcl/inc/vcl/symbol.hxx
index cb7074986911..7a745a433d9a 100644
--- a/vcl/inc/vcl/symbol.hxx
+++ b/vcl/inc/vcl/symbol.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,47 +37,47 @@
// By changes you must also change: rsc/vclrsc.hxx
typedef USHORT SymbolType;
-#define SYMBOL_DONTKNOW ((SymbolType)0)
-#define SYMBOL_IMAGE ((SymbolType)1)
-#define SYMBOL_ARROW_UP ((SymbolType)2)
-#define SYMBOL_ARROW_DOWN ((SymbolType)3)
-#define SYMBOL_ARROW_LEFT ((SymbolType)4)
-#define SYMBOL_ARROW_RIGHT ((SymbolType)5)
-#define SYMBOL_SPIN_UP ((SymbolType)6)
-#define SYMBOL_SPIN_DOWN ((SymbolType)7)
-#define SYMBOL_SPIN_LEFT ((SymbolType)8)
-#define SYMBOL_SPIN_RIGHT ((SymbolType)9)
-#define SYMBOL_FIRST ((SymbolType)10)
-#define SYMBOL_LAST ((SymbolType)11)
-#define SYMBOL_PREV ((SymbolType)12)
-#define SYMBOL_NEXT ((SymbolType)13)
-#define SYMBOL_PAGEUP ((SymbolType)14)
-#define SYMBOL_PAGEDOWN ((SymbolType)15)
-#define SYMBOL_PLAY ((SymbolType)16)
-#define SYMBOL_REVERSEPLAY ((SymbolType)17)
-#define SYMBOL_RECORD ((SymbolType)18)
-#define SYMBOL_STOP ((SymbolType)19)
-#define SYMBOL_PAUSE ((SymbolType)20)
-#define SYMBOL_WINDSTART ((SymbolType)21)
-#define SYMBOL_WINDEND ((SymbolType)22)
-#define SYMBOL_WINDBACKWARD ((SymbolType)23)
-#define SYMBOL_WINDFORWARD ((SymbolType)24)
-#define SYMBOL_CLOSE ((SymbolType)25)
-#define SYMBOL_ROLLUP ((SymbolType)26)
-#define SYMBOL_ROLLDOWN ((SymbolType)27)
-#define SYMBOL_CHECKMARK ((SymbolType)28)
-#define SYMBOL_RADIOCHECKMARK ((SymbolType)29)
-#define SYMBOL_SPIN_UPDOWN ((SymbolType)30)
-#define SYMBOL_FLOAT ((SymbolType)31)
-#define SYMBOL_DOCK ((SymbolType)32)
-#define SYMBOL_HIDE ((SymbolType)33)
-#define SYMBOL_HELP ((SymbolType)34)
-#define SYMBOL_OS2CLOSE ((SymbolType)35)
-#define SYMBOL_OS2FLOAT ((SymbolType)36)
-#define SYMBOL_OS2HIDE ((SymbolType)37)
-#define SYMBOL_MENU SYMBOL_SPIN_DOWN
+#define SYMBOL_DONTKNOW ((SymbolType)0)
+#define SYMBOL_IMAGE ((SymbolType)1)
+#define SYMBOL_ARROW_UP ((SymbolType)2)
+#define SYMBOL_ARROW_DOWN ((SymbolType)3)
+#define SYMBOL_ARROW_LEFT ((SymbolType)4)
+#define SYMBOL_ARROW_RIGHT ((SymbolType)5)
+#define SYMBOL_SPIN_UP ((SymbolType)6)
+#define SYMBOL_SPIN_DOWN ((SymbolType)7)
+#define SYMBOL_SPIN_LEFT ((SymbolType)8)
+#define SYMBOL_SPIN_RIGHT ((SymbolType)9)
+#define SYMBOL_FIRST ((SymbolType)10)
+#define SYMBOL_LAST ((SymbolType)11)
+#define SYMBOL_PREV ((SymbolType)12)
+#define SYMBOL_NEXT ((SymbolType)13)
+#define SYMBOL_PAGEUP ((SymbolType)14)
+#define SYMBOL_PAGEDOWN ((SymbolType)15)
+#define SYMBOL_PLAY ((SymbolType)16)
+#define SYMBOL_REVERSEPLAY ((SymbolType)17)
+#define SYMBOL_RECORD ((SymbolType)18)
+#define SYMBOL_STOP ((SymbolType)19)
+#define SYMBOL_PAUSE ((SymbolType)20)
+#define SYMBOL_WINDSTART ((SymbolType)21)
+#define SYMBOL_WINDEND ((SymbolType)22)
+#define SYMBOL_WINDBACKWARD ((SymbolType)23)
+#define SYMBOL_WINDFORWARD ((SymbolType)24)
+#define SYMBOL_CLOSE ((SymbolType)25)
+#define SYMBOL_ROLLUP ((SymbolType)26)
+#define SYMBOL_ROLLDOWN ((SymbolType)27)
+#define SYMBOL_CHECKMARK ((SymbolType)28)
+#define SYMBOL_RADIOCHECKMARK ((SymbolType)29)
+#define SYMBOL_SPIN_UPDOWN ((SymbolType)30)
+#define SYMBOL_FLOAT ((SymbolType)31)
+#define SYMBOL_DOCK ((SymbolType)32)
+#define SYMBOL_HIDE ((SymbolType)33)
+#define SYMBOL_HELP ((SymbolType)34)
+#define SYMBOL_OS2CLOSE ((SymbolType)35)
+#define SYMBOL_OS2FLOAT ((SymbolType)36)
+#define SYMBOL_OS2HIDE ((SymbolType)37)
+#define SYMBOL_MENU SYMBOL_SPIN_DOWN
-#define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW)
+#define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW)
#endif // _SV_SYMBOL_HXX
diff --git a/vcl/inc/vcl/syschild.hxx b/vcl/inc/vcl/syschild.hxx
index 459f97e68abd..ba1c2e5d1cdb 100644
--- a/vcl/inc/vcl/syschild.hxx
+++ b/vcl/inc/vcl/syschild.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +57,7 @@ public:
SystemChildWindow( Window* pParent, const ResId& rResId );
~SystemChildWindow();
- const SystemEnvData* GetSystemData() const;
+ const SystemEnvData* GetSystemData() const;
// per default systemchildwindows erase their background for better plugin support
// however, this might not always be required
diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx
index 2fd41c5df383..1a8f56dd369b 100644
--- a/vcl/inc/vcl/sysdata.hxx
+++ b/vcl/inc/vcl/sysdata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +48,23 @@ class NSView;
struct SystemEnvData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
#if defined( WNT ) || defined( OS2 )
- HWND hWnd; // the window hwnd
+ HWND hWnd; // the window hwnd
#elif defined( QUARTZ )
NSView* pView; // the cocoa (NSView *) implementing this object
#elif defined( UNX )
- void* pDisplay; // the relevant display connection
- long aWindow; // the window of the object
- void* pSalFrame; // contains a salframe, if object has one
- void* pWidget; // the corresponding widget
- void* pVisual; // the visual in use
- int nScreen; // the current screen of the window
- int nDepth; // depth of said visual
- long aColormap; // the colormap being used
- void* pAppContext; // the application context in use
- long aShellWindow; // the window of the frame's shell
- void* pShellWidget; // the frame's shell widget
+ void* pDisplay; // the relevant display connection
+ long aWindow; // the window of the object
+ void* pSalFrame; // contains a salframe, if object has one
+ void* pWidget; // the corresponding widget
+ void* pVisual; // the visual in use
+ int nScreen; // the current screen of the window
+ int nDepth; // depth of said visual
+ long aColormap; // the colormap being used
+ void* pAppContext; // the application context in use
+ long aShellWindow; // the window of the frame's shell
+ void* pShellWidget; // the frame's shell widget
#endif
};
@@ -76,13 +76,13 @@ struct SystemEnvData
struct SystemParentData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
#if defined( WNT ) || defined( OS2 )
- HWND hWnd; // the window hwnd
+ HWND hWnd; // the window hwnd
#elif defined( QUARTZ )
NSView* pView; // the cocoa (NSView *) implementing this object
#elif defined( UNX )
- long aWindow; // the window of the object
+ long aWindow; // the window of the object
bool bXEmbedSupport:1; // decides whether the object in question
// should support the XEmbed protocol
#endif
@@ -94,13 +94,13 @@ struct SystemParentData
struct SystemMenuData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
#if defined( WNT )
- HMENU hMenu; // the menu handle of the menu bar
+ HMENU hMenu; // the menu handle of the menu bar
#elif defined( QUARTZ )
//not defined
#elif defined( UNX )
- long aMenu; // ???
+ long aMenu; // ???
#endif
};
@@ -110,19 +110,19 @@ struct SystemMenuData
struct SystemGraphicsData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
#if defined( WNT )
- HDC hDC; // handle to a device context
+ HDC hDC; // handle to a device context
#elif defined( QUARTZ )
- CGContextRef rCGContext; // QUARTZ graphic context
+ CGContextRef rCGContext; // QUARTZ graphic context
#elif defined( UNX )
- void* pDisplay; // the relevant display connection
- long hDrawable; // a drawable
- void* pVisual; // the visual in use
- int nScreen; // the current screen of the drawable
- int nDepth; // depth of said visual
- long aColormap; // the colormap being used
- void* pRenderFormat; // render format for drawable
+ void* pDisplay; // the relevant display connection
+ long hDrawable; // a drawable
+ void* pVisual; // the visual in use
+ int nScreen; // the current screen of the drawable
+ int nDepth; // depth of said visual
+ long aColormap; // the colormap being used
+ void* pRenderFormat; // render format for drawable
#endif
};
@@ -133,11 +133,11 @@ struct SystemGraphicsData
struct SystemWindowData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
#if defined( WNT ) // meaningless on Windows
#elif defined( QUARTZ ) // meaningless on Mac OS X / Quartz
#elif defined( UNX )
- void* pVisual; // the visual to be used
+ void* pVisual; // the visual to be used
#endif
};
@@ -161,10 +161,10 @@ struct SystemGlyphData
struct SystemFontData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
#if defined( WNT )
HFONT hFont; // native font object
-#elif defined( QUARTZ )
+#elif defined( QUARTZ )
void* aATSUFontID; // native font object
#elif defined( UNX )
void* nFontId; // native font id
@@ -175,7 +175,7 @@ struct SystemFontData
bool bAntialias; // Should this font be antialiased
bool bVerticalCharacterType; // Is the font using vertical character type
};
-
+
// --------------------
// - SystemTextLayoutData -
// --------------------
@@ -183,7 +183,7 @@ struct SystemFontData
typedef std::vector<SystemGlyphData> SystemGlyphDataVector;
struct SystemTextLayoutData
{
- unsigned long nSize; // size in bytes of this structure
+ unsigned long nSize; // size in bytes of this structure
SystemGlyphDataVector rGlyphData; // glyph data
int orientation; // Text orientation
};
diff --git a/vcl/inc/vcl/syswin.hxx b/vcl/inc/vcl/syswin.hxx
index dcc287a4e2cc..db240c18f31f 100644
--- a/vcl/inc/vcl/syswin.hxx
+++ b/vcl/inc/vcl/syswin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ class TaskPaneList;
#define ICON_MATH_DOCUMENT 15
#define ICON_TEMPLATE 16
#define ICON_MACROLIBRARY 17
-#define ICON_PLAYER 100
+#define ICON_PLAYER 100
#define ICON_SETUP 500
// -------------------
@@ -179,7 +179,7 @@ private:
// Copy assignment is forbidden and not implemented.
SystemWindow (const SystemWindow &);
SystemWindow & operator= (const SystemWindow &);
-
+
SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin );
protected:
@@ -239,34 +239,34 @@ public:
void SetMenuBarMode( USHORT nMode );
USHORT GetMenuBarMode() const { return mnMenuBarMode; }
- TaskPaneList* GetTaskPaneList();
+ TaskPaneList* GetTaskPaneList();
void GetWindowStateData( WindowStateData& rData ) const;
-
+
/**
Returns the screen number the window is on
-
+
The screen number is counted the same way that
<code>Application::GetScreenPosSizePixel</code>,
<code>Application::GetWorkAreaPosSizePixel</code>,
<code>Application::GetScreenName</code>
and of course <code>SystemWindow::SetScreenNumber</code>
are counted in.
-
+
In case the window is positioned on multiple screens the
screen number returned will be of the screen containing the
upper left pixel of the frame area (that is of the client
area on system decorated windows, or the frame area of
undecorated resp. owner decorated windows.
-
+
@returns the screen number
-
+
@see SystemWindow::SetScreenNumber
*/
unsigned int GetScreenNumber() const;
/**
Move the Window to a new screen. The same rules for
positioning apply as in <code>SystemWindow::GetScreenNumber</code>
-
+
The screen number is counted the same way that
<code>Application::GetScreenPosSizePixel</code>,
<code>Application::GetWorkAreaPosSizePixel</code>,
diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx
index 25925a89b1d7..877772f284aa 100644
--- a/vcl/inc/vcl/tabctrl.hxx
+++ b/vcl/inc/vcl/tabctrl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,10 +91,10 @@ private:
SAL_DLLPRIVATE void ImplSetFirstPagePos( USHORT nPagePos );
SAL_DLLPRIVATE void ImplShowFocus();
SAL_DLLPRIVATE void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false, bool bLastInGroup = false, bool bIsCurrentItem = false );
- SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false );
- SAL_DLLPRIVATE void ImplFreeLayoutData();
- SAL_DLLPRIVATE long ImplHandleKeyEvent( const KeyEvent& rKeyEvent );
-
+ SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false );
+ SAL_DLLPRIVATE void ImplFreeLayoutData();
+ SAL_DLLPRIVATE long ImplHandleKeyEvent( const KeyEvent& rKeyEvent );
+
DECL_DLLPRIVATE_LINK( ImplScrollBtnHdl, PushButton* pBtn );
DECL_DLLPRIVATE_LINK( ImplListBoxSelectHdl, ListBox* );
DECL_DLLPRIVATE_LINK( ImplWindowEventListener, VclSimpleEvent* );
@@ -105,7 +105,7 @@ protected:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- virtual void FillLayoutData() const;
+ virtual void FillLayoutData() const;
virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const;
virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt );
@@ -180,7 +180,7 @@ public:
void SetHelpId( USHORT nPageId, ULONG nHelpId );
ULONG GetHelpId( USHORT nPageId ) const;
-
+
void SetPageImage( USHORT nPageId, const Image& rImage );
const Image* GetPageImage( USHORT nPageId ) const;
diff --git a/vcl/inc/vcl/tabdlg.hxx b/vcl/inc/vcl/tabdlg.hxx
index 51591522d8e5..ec340af68cbc 100644
--- a/vcl/inc/vcl/tabdlg.hxx
+++ b/vcl/inc/vcl/tabdlg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +43,13 @@ class TabControl;
class VCL_DLLPUBLIC TabDialog : public Dialog
{
private:
- FixedLine* mpFixedLine;
- Window* mpViewWindow;
- WindowAlign meViewAlign;
- BOOL mbPosControls;
+ FixedLine* mpFixedLine;
+ Window* mpViewWindow;
+ WindowAlign meViewAlign;
+ BOOL mbPosControls;
- SAL_DLLPRIVATE void ImplInitTabDialogData();
- SAL_DLLPRIVATE void ImplPosControls();
+ SAL_DLLPRIVATE void ImplInitTabDialogData();
+ SAL_DLLPRIVATE void ImplPosControls();
public:
TabDialog( Window* pParent,
@@ -57,17 +57,17 @@ public:
TabDialog( Window* pParent, const ResId& rResId );
~TabDialog();
- virtual void Resize();
- virtual void StateChanged( StateChangedType nStateChange );
-
- void AdjustLayout();
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nStateChange );
+
+ void AdjustLayout();
- void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; }
- Window* GetViewWindow() const { return mpViewWindow; }
- void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; }
- WindowAlign GetViewAlign() const { return meViewAlign; }
+ void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; }
+ Window* GetViewWindow() const { return mpViewWindow; }
+ void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; }
+ WindowAlign GetViewAlign() const { return meViewAlign; }
};
-#endif // _SV_TABDLG_HXX
+#endif // _SV_TABDLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/tabpage.hxx b/vcl/inc/vcl/tabpage.hxx
index 442ac960a011..bececc316fa4 100644
--- a/vcl/inc/vcl/tabpage.hxx
+++ b/vcl/inc/vcl/tabpage.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +41,8 @@ class VCL_DLLPUBLIC TabPage : public Window
{
private:
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings();
+ SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
+ SAL_DLLPRIVATE void ImplInitSettings();
public:
TabPage( Window* pParent, WinBits nStyle = 0 );
@@ -51,15 +51,15 @@ public:
virtual void Paint( const Rectangle& rRect );
virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
- virtual void StateChanged( StateChangedType nStateChange );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void ActivatePage();
- virtual void DeactivatePage();
+ virtual void ActivatePage();
+ virtual void DeactivatePage();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
};
-#endif // _SV_TABPAGE_HXX
+#endif // _SV_TABPAGE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/taskpanelist.hxx b/vcl/inc/vcl/taskpanelist.hxx
index 0eb4f20cd97d..0331c1220858 100644
--- a/vcl/inc/vcl/taskpanelist.hxx
+++ b/vcl/inc/vcl/taskpanelist.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/textlayout.hxx b/vcl/inc/vcl/textlayout.hxx
index 0f593ed00e21..7f42ecafe158 100644
--- a/vcl/inc/vcl/textlayout.hxx
+++ b/vcl/inc/vcl/textlayout.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/threadex.hxx b/vcl/inc/vcl/threadex.hxx
index 429b43e6ac7c..1e1ab0e69b23 100644
--- a/vcl/inc/vcl/threadex.hxx
+++ b/vcl/inc/vcl/threadex.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +41,9 @@ namespace vcl
{
class VCL_DLLPUBLIC ThreadExecutor
{
- oslThread m_aThread;
- oslCondition m_aFinish;
- long m_nReturn;
+ oslThread m_aThread;
+ oslCondition m_aFinish;
+ long m_nReturn;
#ifdef THREADEX_IMPLEMENTATION
public:
@@ -60,8 +60,8 @@ namespace vcl
class VCL_DLLPUBLIC SolarThreadExecutor
{
oslCondition m_aStart;
- oslCondition m_aFinish;
- long m_nReturn;
+ oslCondition m_aFinish;
+ long m_nReturn;
bool m_bTimeout;
DECL_DLLPRIVATE_LINK( worker, void* );
diff --git a/vcl/inc/vcl/timer.hxx b/vcl/inc/vcl/timer.hxx
index ae2ca9a3ba99..4cacc5662a35 100644
--- a/vcl/inc/vcl/timer.hxx
+++ b/vcl/inc/vcl/timer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ protected:
public:
Timer();
Timer( const Timer& rTimer );
- virtual ~Timer();
+ virtual ~Timer();
virtual void Timeout();
diff --git a/vcl/inc/vcl/toolbox.h b/vcl/inc/vcl/toolbox.h
index bc169c18e160..014be121b349 100644
--- a/vcl/inc/vcl/toolbox.h
+++ b/vcl/inc/vcl/toolbox.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,28 +59,28 @@ class Window;
struct ImplToolItem
{
- Window* mpWindow;
- void* mpUserData;
- Image maImage;
- Image maHighImage;
- long mnImageAngle;
- bool mbMirrorMode;
- XubString maText;
- XubString maQuickHelpText;
- XubString maHelpText;
- String maCommandStr;
- ULONG mnHelpId;
- Rectangle maRect;
- Rectangle maCalcRect;
+ Window* mpWindow;
+ void* mpUserData;
+ Image maImage;
+ Image maHighImage;
+ long mnImageAngle;
+ bool mbMirrorMode;
+ XubString maText;
+ XubString maQuickHelpText;
+ XubString maHelpText;
+ String maCommandStr;
+ ULONG mnHelpId;
+ Rectangle maRect;
+ Rectangle maCalcRect;
// the overall horizontal item size, including one or more of [image size + textlength + dropdown arrow]
- Size maItemSize;
- long mnSepSize;
+ Size maItemSize;
+ long mnSepSize;
long mnDropDownArrowWidth;
- ToolBoxItemType meType;
- ToolBoxItemBits mnBits;
- TriState meState;
- USHORT mnId;
- BOOL mbEnabled:1,
+ ToolBoxItemType meType;
+ ToolBoxItemBits mnBits;
+ TriState meState;
+ USHORT mnId;
+ BOOL mbEnabled:1,
mbVisible:1,
mbEmptyBtn:1,
mbShowWindow:1,
@@ -104,7 +104,7 @@ struct ImplToolItem
// the default size is the precomputed size for standard items
// ie those that are just ordinary buttons (no windows or text etc.)
// bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons
- Size GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize );
+ Size GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize );
// only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style
void DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbImage, BOOL& rbText ) const;
@@ -123,8 +123,8 @@ namespace vcl
struct ToolBoxLayoutData : public ControlLayoutData
{
- std::vector< USHORT > m_aLineItemIds;
- std::vector< USHORT > m_aLineItemPositions;
+ std::vector< USHORT > m_aLineItemIds;
+ std::vector< USHORT > m_aLineItemPositions;
};
@@ -133,8 +133,8 @@ struct ToolBoxLayoutData : public ControlLayoutData
struct ImplToolBoxPrivateData
{
- vcl::ToolBoxLayoutData* m_pLayoutData;
- std::vector< ImplToolItem > m_aItems;
+ vcl::ToolBoxLayoutData* m_pLayoutData;
+ std::vector< ImplToolItem > m_aItems;
ImplToolBoxPrivateData();
~ImplToolBoxPrivateData();
@@ -143,7 +143,7 @@ struct ImplToolBoxPrivateData
// called when dropdown items are clicked
Link maDropdownClickHdl;
- Timer maDropdownTimer; // for opening dropdown items on "long click"
+ Timer maDropdownTimer; // for opening dropdown items on "long click"
// large or small buttons ?
ToolBoxButtonSize meButtonSize;
@@ -154,14 +154,14 @@ struct ImplToolBoxPrivateData
ULONG mnEventId;
// called when menu button is clicked and before the popup menu is executed
- Link maMenuButtonHdl;
+ Link maMenuButtonHdl;
// a dummy item representing the custom menu button
ImplToolItem maMenubuttonItem;
long mnMenuButtonWidth;
-
+
Wallpaper maDisplayBackground;
-
+
// support for highcontrast
vcl::IImageListProvider* mpImageListProvider;
vcl::ImageListType meImageListType;
@@ -170,8 +170,8 @@ struct ImplToolBoxPrivateData
mbAssumeDocked:1, // only used during calculations to override current floating/popup mode
mbAssumeFloating:1,
mbAssumePopupMode:1,
- mbKeyInputDisabled:1, // no KEY input if all items disabled, closing/docking will be allowed though
- mbIsPaintLocked:1, // don't allow paints
+ mbKeyInputDisabled:1, // no KEY input if all items disabled, closing/docking will be allowed though
+ mbIsPaintLocked:1, // don't allow paints
mbMenubuttonSelected:1, // menu button is highlighted
mbPageScroll:1, // determines if we scroll a page at a time
mbNativeButtons:1, // system supports native toolbar buttons
@@ -180,6 +180,6 @@ struct ImplToolBoxPrivateData
};
-#endif // _SV_TOOLBOX_H
+#endif // _SV_TOOLBOX_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 094e831af702..e6b241729148 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -170,8 +170,8 @@ class VCL_DLLPUBLIC ToolBox : public DockingWindow
friend class ImplTBDragMgr;
private:
- ImplToolBoxPrivateData* mpData;
- VirtualDevice* mpBtnDev; // TODO: remove unused member
+ ImplToolBoxPrivateData* mpData;
+ VirtualDevice* mpBtnDev; // TODO: remove unused member
ImplToolSizeArray* mpFloatSizeAry;
XubString maCvtStr;
XubString maNextToolBoxStr;
@@ -199,7 +199,7 @@ private:
long mnLastResizeDY;
long mnActivateCount;
USHORT mnLastFocusItemId;
- USHORT mnFocusPos;
+ USHORT mnFocusPos;
USHORT mnOutStyle;
USHORT mnHighItemId;
USHORT mnCurItemId;
@@ -270,8 +270,8 @@ private:
SAL_DLLPRIVATE const XubString& ImplConvertMenuString( const XubString& rStr );
SAL_DLLPRIVATE BOOL ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat = FALSE );
SAL_DLLPRIVATE BOOL ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel = FALSE );
- SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus = FALSE );
- SAL_DLLPRIVATE BOOL ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle = FALSE );
+ SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus = FALSE );
+ SAL_DLLPRIVATE BOOL ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle = FALSE );
SAL_DLLPRIVATE USHORT ImplGetItemLine( ImplToolItem* pCurrentItem );
SAL_DLLPRIVATE ImplToolItem* ImplGetFirstValidItem( USHORT nLine );
SAL_DLLPRIVATE ImplToolItem* ImplGetLastValidItem( USHORT nLine );
@@ -279,8 +279,8 @@ private:
SAL_DLLPRIVATE BOOL ImplActivateItem( KeyCode aKeyCode );
SAL_DLLPRIVATE void ImplShowFocus();
SAL_DLLPRIVATE void ImplHideFocus();
- SAL_DLLPRIVATE void ImplUpdateInputEnable();
- SAL_DLLPRIVATE void ImplFillLayoutData() const;
+ SAL_DLLPRIVATE void ImplUpdateInputEnable();
+ SAL_DLLPRIVATE void ImplFillLayoutData() const;
SAL_DLLPRIVATE void ImplUpdateCustomMenu();
SAL_DLLPRIVATE BOOL ImplHasClippedItems();
SAL_DLLPRIVATE Point ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const;
@@ -410,7 +410,7 @@ public:
void RecalcItems();
const ImageList& GetImageList() const { return maImageList; }
- void SetImageList( const ImageList& rImageList );
+ void SetImageList( const ImageList& rImageList );
void SetButtonType( ButtonType eNewType = BUTTON_SYMBOL );
ButtonType GetButtonType() const { return meButtonType; }
@@ -455,7 +455,7 @@ public:
USHORT GetDownItemId() const { return mnDownItemId; }
USHORT GetClicks() const { return mnMouseClicks; }
USHORT GetModifier() const { return mnMouseModifier; }
- USHORT GetKeyModifier() const { return mnKeyModifier; }
+ USHORT GetKeyModifier() const { return mnKeyModifier; }
void SetItemBits( USHORT nItemId, ToolBoxItemBits nBits );
ToolBoxItemBits GetItemBits( USHORT nItemId ) const;
@@ -464,10 +464,10 @@ public:
void* GetItemData( USHORT nItemId ) const;
void SetItemImage( USHORT nItemId, const Image& rImage );
Image GetItemImage( USHORT nItemId ) const;
- void SetItemImageAngle( USHORT nItemId, long nAngle10 );
- long GetItemImageAngle( USHORT nItemId ) const;
- void SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror );
- BOOL GetItemImageMirrorMode( USHORT ) const;
+ void SetItemImageAngle( USHORT nItemId, long nAngle10 );
+ long GetItemImageAngle( USHORT nItemId ) const;
+ void SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror );
+ BOOL GetItemImageMirrorMode( USHORT ) const;
void SetItemHighImage( USHORT nItemId, const Image& rImage );
Image GetItemHighImage( USHORT nItemId ) const;
void SetItemText( USHORT nItemId, const XubString& rText );
diff --git a/vcl/inc/vcl/unobrok.hxx b/vcl/inc/vcl/unobrok.hxx
index 67c83ea83952..91916f4dfebe 100644
--- a/vcl/inc/vcl/unobrok.hxx
+++ b/vcl/inc/vcl/unobrok.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,6 +37,6 @@ namespace vcl_accept
sal_Bool accept(const ::rtl::OUString & accDcp, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> & rSMgr);
}
-#endif // _UNOBROK_HXX
+#endif // _UNOBROK_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/unohelp.hxx b/vcl/inc/vcl/unohelp.hxx
index 2126d5e77ba6..1dc6c226db22 100644
--- a/vcl/inc/vcl/unohelp.hxx
+++ b/vcl/inc/vcl/unohelp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 i18n {
class XCollator;
}
namespace lang {
- class XMultiServiceFactory;
+ class XMultiServiceFactory;
}
}}}
@@ -50,7 +50,7 @@ namespace com {
namespace sun {
namespace star {
namespace accessibility {
- struct AccessibleEventObject;
+ struct AccessibleEventObject;
}
}}}
@@ -65,7 +65,7 @@ namespace unohelper
::com::sun::star::uno::Reference < ::com::sun::star::i18n::XCollator > VCL_DLLPUBLIC CreateCollator();
::rtl::OUString VCL_DLLPUBLIC CreateLibraryName( const sal_Char* pModName, sal_Bool bSUPD );
void VCL_DLLPUBLIC NotifyAccessibleStateEventGlobally( const ::com::sun::star::accessibility::AccessibleEventObject& rEventObject );
-}} // namespace vcl::unohelper
+}} // namespace vcl::unohelper
#endif // _VCL_UNOHELP_HXX
diff --git a/vcl/inc/vcl/unohelp2.hxx b/vcl/inc/vcl/unohelp2.hxx
index 5824f016c57c..0a51a5eb909e 100644
--- a/vcl/inc/vcl/unohelp2.hxx
+++ b/vcl/inc/vcl/unohelp2.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +46,18 @@ namespace vcl { namespace unohelper {
public ::cppu::OWeakObject
{
private:
- String maText;
+ String maText;
- public:
+ public:
TextDataObject( const String& rText );
~TextDataObject();
- String& GetString() { return maText; }
+ String& GetString() { return maText; }
// ::com::sun::star::uno::XInterface
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
- void SAL_CALL release() throw() { OWeakObject::release(); }
+ ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ void SAL_CALL release() throw() { OWeakObject::release(); }
// ::com::sun::star::datatransfer::XTransferable
::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);
@@ -79,7 +79,7 @@ namespace vcl { namespace unohelper {
::osl::Mutex& GetMutex() { return maMutex; }
};
-}} // namespace vcl::unohelper
+}} // namespace vcl::unohelper
#endif // _VCL_UNOHELP2_HXX
diff --git a/vcl/inc/vcl/unowrap.hxx b/vcl/inc/vcl/unowrap.hxx
index 3691014d7477..258b49f59cce 100644
--- a/vcl/inc/vcl/unowrap.hxx
+++ b/vcl/inc/vcl/unowrap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +34,17 @@
#include <com/sun/star/uno/Reference.h>
class XWindowPeer;
-class XToolkit;
-class XVclToolkit;
-class EventList;
+class XToolkit;
+class XVclToolkit;
+class EventList;
class Window;
-class OutputDevice;
+class OutputDevice;
class MouseEvent;
class CommandEvent;
class KeyEvent;
class Rectangle;
class XVclComponentPeer;
-class Menu;
+class Menu;
namespace com {
namespace sun {
@@ -68,27 +68,27 @@ namespace accessibility {
class VCL_DLLPUBLIC UnoWrapperBase
{
-public:
- virtual void Destroy() = 0;
+public:
+ virtual void Destroy() = 0;
// Toolkit
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > GetVCLToolkit() = 0;
// Graphics
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > CreateGraphics( OutputDevice* pOutDev ) = 0;
- virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > CreateGraphics( OutputDevice* pOutDev ) = 0;
+ virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) = 0;
// Window
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> GetWindowInterface( Window* pWindow, sal_Bool bCreate ) = 0;
- virtual void SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xIFace ) = 0;
+ virtual void SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xIFace ) = 0;
- virtual void WindowDestroyed( Window* pWindow ) = 0;
+ virtual void WindowDestroyed( Window* pWindow ) = 0;
// Accessibility
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
CreateAccessible( Menu* pMenu, sal_Bool bIsMenuBar ) = 0;
};
-#endif // _VCL_UNOWRAP_HXX
+#endif // _VCL_UNOWRAP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/vclenum.hxx b/vcl/inc/vcl/vclenum.hxx
index 492f2293afaf..6fac4e31c438 100644
--- a/vcl/inc/vcl/vclenum.hxx
+++ b/vcl/inc/vcl/vclenum.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +67,13 @@ enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF
// ------------------------------------------------------------
// to avoid conflicts with enum's declared otherwise
-#define GRADIENT_LINEAR GradientStyle_LINEAR
-#define GRADIENT_AXIAL GradientStyle_AXIAL
-#define GRADIENT_RADIAL GradientStyle_RADIAL
-#define GRADIENT_ELLIPTICAL GradientStyle_ELLIPTICAL
-#define GRADIENT_SQUARE GradientStyle_SQUARE
-#define GRADIENT_RECT GradientStyle_RECT
-#define GRADIENT_FORCE_EQUAL_SIZE GradientStyle_FORCE_EQUAL_SIZE
+#define GRADIENT_LINEAR GradientStyle_LINEAR
+#define GRADIENT_AXIAL GradientStyle_AXIAL
+#define GRADIENT_RADIAL GradientStyle_RADIAL
+#define GRADIENT_ELLIPTICAL GradientStyle_ELLIPTICAL
+#define GRADIENT_SQUARE GradientStyle_SQUARE
+#define GRADIENT_RECT GradientStyle_RECT
+#define GRADIENT_FORCE_EQUAL_SIZE GradientStyle_FORCE_EQUAL_SIZE
#ifndef ENUM_GRADIENTSTYLE_DECLARED
#define ENUM_GRADIENTSTYLE_DECLARED
@@ -94,10 +94,10 @@ enum GradientStyle
// ------------------------------------------------------------
// to avoid conflicts with enum's declared otherwise
-#define HATCH_SINGLE HatchStyle_SINGLE
-#define HATCH_DOUBLE HatchStyle_DOUBLE
-#define HATCH_TRIPLE HatchStyle_TRIPLE
-#define HATCH_FORCE_EQUAL_SIZE HatchStyle_FORCE_EQUAL_SIZE
+#define HATCH_SINGLE HatchStyle_SINGLE
+#define HATCH_DOUBLE HatchStyle_DOUBLE
+#define HATCH_TRIPLE HatchStyle_TRIPLE
+#define HATCH_FORCE_EQUAL_SIZE HatchStyle_FORCE_EQUAL_SIZE
#ifndef ENUM_HATCHSTYLE_DECLARED
#define ENUM_HATCHSTYLE_DECLARED
@@ -115,10 +115,10 @@ enum HatchStyle
// ------------------------------------------------------------
// to avoid conflicts with enum's declared otherwise
-#define LINE_NONE LineStyle_NONE
-#define LINE_SOLID LineStyle_SOLID
-#define LINE_DASH LineStyle_DASH
-#define LINE_FORCE_EQUAL_SIZE LineStyle_FORCE_EQUAL_SIZE
+#define LINE_NONE LineStyle_NONE
+#define LINE_SOLID LineStyle_SOLID
+#define LINE_DASH LineStyle_DASH
+#define LINE_FORCE_EQUAL_SIZE LineStyle_FORCE_EQUAL_SIZE
#ifndef ENUM_LINESTYLE_DECLARED
#define ENUM_LINESTYLE_DECLARED
@@ -241,20 +241,20 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE,
#define ENUM_FONTEMPHASISMARK_DECLARED
typedef USHORT FontEmphasisMark;
-#define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000)
-#define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001)
-#define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002)
-#define EMPHASISMARK_DISC ((FontEmphasisMark)0x0003)
-#define EMPHASISMARK_ACCENT ((FontEmphasisMark)0x0004)
-#define EMPHASISMARK_STYLE ((FontEmphasisMark)0x00FF)
-#define EMPHASISMARK_POS_ABOVE ((FontEmphasisMark)0x1000)
-#define EMPHASISMARK_POS_BELOW ((FontEmphasisMark)0x2000)
+#define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000)
+#define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001)
+#define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002)
+#define EMPHASISMARK_DISC ((FontEmphasisMark)0x0003)
+#define EMPHASISMARK_ACCENT ((FontEmphasisMark)0x0004)
+#define EMPHASISMARK_STYLE ((FontEmphasisMark)0x00FF)
+#define EMPHASISMARK_POS_ABOVE ((FontEmphasisMark)0x1000)
+#define EMPHASISMARK_POS_BELOW ((FontEmphasisMark)0x2000)
// Only for kompability
-#define EMPHASISMARK_DOTS_ABOVE (EMPHASISMARK_DOT | EMPHASISMARK_POS_ABOVE)
-#define EMPHASISMARK_DOTS_BELOW (EMPHASISMARK_DOT | EMPHASISMARK_POS_BELOW)
-#define EMPHASISMARK_SIDE_DOTS (EMPHASISMARK_ACCENT | EMPHASISMARK_POS_ABOVE)
-#define EMPHASISMARK_CIRCLE_ABOVE (EMPHASISMARK_CIRCLE | EMPHASISMARK_POS_ABOVE)
+#define EMPHASISMARK_DOTS_ABOVE (EMPHASISMARK_DOT | EMPHASISMARK_POS_ABOVE)
+#define EMPHASISMARK_DOTS_BELOW (EMPHASISMARK_DOT | EMPHASISMARK_POS_BELOW)
+#define EMPHASISMARK_SIDE_DOTS (EMPHASISMARK_ACCENT | EMPHASISMARK_POS_ABOVE)
+#define EMPHASISMARK_CIRCLE_ABOVE (EMPHASISMARK_CIRCLE | EMPHASISMARK_POS_ABOVE)
#endif
@@ -317,7 +317,7 @@ enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE,
#endif
-typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
+typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
#ifndef ENUM_OUTDEVSUPPORT_DECLARED
#define ENUM_OUTDEVSUPPORT_DECLARED
@@ -326,6 +326,6 @@ enum OutDevSupportType { OutDevSupport_TransparentRect, OutDevSupport_B2DClip, O
#endif
-#endif // _VCL_VCLENUM_HXX
+#endif // _VCL_VCLENUM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index 42e76bc92bd8..f4cc2f5afff8 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -109,14 +109,14 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_LISTBOX_SCROLLED 1127
#define VCLEVENT_COMBOBOX_SCROLLED 1128
#define VCLEVENT_EDIT_SELECTIONCHANGED 1129
-#define VCLEVENT_DROPDOWN_OPEN 1130
-#define VCLEVENT_DROPDOWN_CLOSE 1131
+#define VCLEVENT_DROPDOWN_OPEN 1130
+#define VCLEVENT_DROPDOWN_CLOSE 1131
#define VCLEVENT_TOOLBOX_ITEMADDED 1132 // pData = itempos
#define VCLEVENT_TOOLBOX_ITEMREMOVED 1133 // pData = itempos
#define VCLEVENT_TOOLBOX_ALLITEMSCHANGED 1134
#define VCLEVENT_TOOLBOX_HIGHLIGHTOFF 1135 // pData = itempos
-#define VCLEVENT_WINDOW_MENUBARADDED 1136 // pData = pMenuBar
+#define VCLEVENT_WINDOW_MENUBARADDED 1136 // pData = pMenuBar
#define VCLEVENT_TABPAGE_ACTIVATE 1137 // pData = pageid
#define VCLEVENT_TABPAGE_DEACTIVATE 1138 // pData = pageid
#define VCLEVENT_TABBAR_PAGEENABLED 1139 // pData = pageid
@@ -146,8 +146,8 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_STATUSBAR_HIDEITEM 1163 // pData = itemid
#define VCLEVENT_STATUSBAR_SHOWALLITEMS 1164
#define VCLEVENT_STATUSBAR_HIDEALLITEMS 1165
-#define VCLEVENT_STATUSBAR_DRAWITEM 1166 // pData = itemid
-#define VCLEVENT_STATUSBAR_NAMECHANGED 1167 // pData = itemid
+#define VCLEVENT_STATUSBAR_DRAWITEM 1166 // pData = itemid
+#define VCLEVENT_STATUSBAR_NAMECHANGED 1167 // pData = itemid
#define VCLEVENT_TOOLBOX_ITEMENABLED 1168 // pData = itempos
#define VCLEVENT_TOOLBOX_ITEMDISABLED 1169 // pData = itempos
#define VCLEVENT_TABPAGE_PAGETEXTCHANGED 1170 // pData = pageid
@@ -173,10 +173,10 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_MENU_SUBMENUCHANGED 1209
#define VCLEVENT_MENU_DEHIGHLIGHT 1210
#define VCLEVENT_MENU_DISABLE 1211
-#define VCLEVENT_MENU_ITEMTEXTCHANGED 1212
-#define VCLEVENT_MENU_ITEMCHECKED 1213
-#define VCLEVENT_MENU_ITEMUNCHECKED 1214
-#define VCLEVENT_MENU_ACCESSIBLENAMECHANGED 1215
+#define VCLEVENT_MENU_ITEMTEXTCHANGED 1212
+#define VCLEVENT_MENU_ITEMCHECKED 1213
+#define VCLEVENT_MENU_ITEMUNCHECKED 1214
+#define VCLEVENT_MENU_ACCESSIBLENAMECHANGED 1215
#define VCLEVENT_MENU_SHOW 1250
#define VCLEVENT_MENU_HIDE 1251
@@ -193,7 +193,7 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED 1223 // pData = itempos
#define VCLEVENT_TABLECELL_NAMECHANGED 1224 // pData = struct(Entry, Column, oldText)
-#define VCLEVENT_TABLEROW_SELECT 1225
+#define VCLEVENT_TABLEROW_SELECT 1225
class VCL_DLLPUBLIC VclSimpleEvent
{
@@ -279,7 +279,7 @@ class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
{
std::list< Link >::iterator m_aIt;
bool m_bWasInvalidated;
-
+
ListenerIt(const std::list<Link>::iterator& rIt)
: m_aIt(rIt)
, m_bWasInvalidated( false )
@@ -287,15 +287,15 @@ class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
};
std::vector< ListenerIt > m_aIterators;
-
-
+
+
public:
VclEventListeners2();
~VclEventListeners2();
-
+
void addListener( const Link& );
void removeListener( const Link& );
-
+
void callListeners( VclSimpleEvent* );
};
diff --git a/vcl/inc/vcl/virdev.hxx b/vcl/inc/vcl/virdev.hxx
index f3e52813c486..c73713cc6788 100644
--- a/vcl/inc/vcl/virdev.hxx
+++ b/vcl/inc/vcl/virdev.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,26 +47,26 @@ class VCL_DLLPUBLIC VirtualDevice : public OutputDevice
friend class OutputDevice;
private:
- SalVirtualDevice* mpVirDev;
- VirtualDevice* mpPrev;
- VirtualDevice* mpNext;
- USHORT mnBitCount;
- BOOL mbScreenComp;
- sal_Int8 mnAlphaDepth;
- BYTE meRefDevMode;
+ SalVirtualDevice* mpVirDev;
+ VirtualDevice* mpPrev;
+ VirtualDevice* mpNext;
+ USHORT mnBitCount;
+ BOOL mbScreenComp;
+ sal_Int8 mnAlphaDepth;
+ BYTE meRefDevMode;
- SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData = NULL );
- SAL_DLLPRIVATE BOOL ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase );
+ SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData = NULL );
+ SAL_DLLPRIVATE BOOL ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase );
// Copy assignment is forbidden and not implemented.
VirtualDevice (const VirtualDevice &);
VirtualDevice & operator= (const VirtualDevice &);
- /** Used for alpha VDev, to set areas to opaque
+ /** Used for alpha VDev, to set areas to opaque
@since #i32109#
*/
- SAL_DLLPRIVATE void ImplFillOpaqueRectangle( const Rectangle& rRect );
+ SAL_DLLPRIVATE void ImplFillOpaqueRectangle( const Rectangle& rRect );
// TODO: add extra member for refdev backward compatibility options
#define REFDEV_FORCE_ZERO_EXTLEAD 0x80
@@ -101,10 +101,10 @@ public:
*/
VirtualDevice( const SystemGraphicsData *pData, USHORT nBitCount );
- virtual ~VirtualDevice();
+ virtual ~VirtualDevice();
- BOOL SetOutputSizePixel( const Size& rNewSize, BOOL bErase = TRUE );
- BOOL SetOutputSize( const Size& rNewSize, BOOL bErase = TRUE )
+ BOOL SetOutputSizePixel( const Size& rNewSize, BOOL bErase = TRUE );
+ BOOL SetOutputSize( const Size& rNewSize, BOOL bErase = TRUE )
{ return SetOutputSizePixel( LogicToPixel( rNewSize ), bErase ); }
// reference device modes for different compatibility levels
@@ -119,7 +119,7 @@ public:
void SetReferenceDevice( RefDevMode );
void Compat_ZeroExtleadBug(); // enable workaround for #i60495#
-
+
void SetReferenceDevice( sal_Int32 i_nDPIX, sal_Int32 i_nDPIY );
private:
diff --git a/vcl/inc/vcl/waitobj.hxx b/vcl/inc/vcl/waitobj.hxx
index 1bbdd04506e9..ee9874569f02 100644
--- a/vcl/inc/vcl/waitobj.hxx
+++ b/vcl/inc/vcl/waitobj.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/wall.hxx b/vcl/inc/vcl/wall.hxx
index 0011501392be..e69314ade2f4 100644
--- a/vcl/inc/vcl/wall.hxx
+++ b/vcl/inc/vcl/wall.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,37 +42,37 @@ class ImplWallpaper;
// - Wallpaper-Types -
// -------------------
-#define WALLPAPER_NULL WallpaperStyle_NULL
-#define WALLPAPER_TILE WallpaperStyle_TILE
-#define WALLPAPER_CENTER WallpaperStyle_CENTER
-#define WALLPAPER_SCALE WallpaperStyle_SCALE
-#define WALLPAPER_TOPLEFT WallpaperStyle_TOPLEFT
-#define WALLPAPER_TOP WallpaperStyle_TOP
-#define WALLPAPER_TOPRIGHT WallpaperStyle_TOPRIGHT
-#define WALLPAPER_LEFT WallpaperStyle_LEFT
-#define WALLPAPER_RIGHT WallpaperStyle_RIGHT
-#define WALLPAPER_BOTTOMLEFT WallpaperStyle_BOTTOMLEFT
-#define WALLPAPER_BOTTOM WallpaperStyle_BOTTOM
-#define WALLPAPER_BOTTOMRIGHT WallpaperStyle_BOTTOMRIGHT
-#define WALLPAPER_APPLICATIONGRADIENT WallpaperStyle_APPLICATIONGRADIENT
-#define WALLPAPER_FORCE_EQUAL_SIZE WallpaperStyle_FORCE_EQUAL_SIZE
+#define WALLPAPER_NULL WallpaperStyle_NULL
+#define WALLPAPER_TILE WallpaperStyle_TILE
+#define WALLPAPER_CENTER WallpaperStyle_CENTER
+#define WALLPAPER_SCALE WallpaperStyle_SCALE
+#define WALLPAPER_TOPLEFT WallpaperStyle_TOPLEFT
+#define WALLPAPER_TOP WallpaperStyle_TOP
+#define WALLPAPER_TOPRIGHT WallpaperStyle_TOPRIGHT
+#define WALLPAPER_LEFT WallpaperStyle_LEFT
+#define WALLPAPER_RIGHT WallpaperStyle_RIGHT
+#define WALLPAPER_BOTTOMLEFT WallpaperStyle_BOTTOMLEFT
+#define WALLPAPER_BOTTOM WallpaperStyle_BOTTOM
+#define WALLPAPER_BOTTOMRIGHT WallpaperStyle_BOTTOMRIGHT
+#define WALLPAPER_APPLICATIONGRADIENT WallpaperStyle_APPLICATIONGRADIENT
+#define WALLPAPER_FORCE_EQUAL_SIZE WallpaperStyle_FORCE_EQUAL_SIZE
#ifndef ENUM_WALLPAPERSTYLE_DECLARED
#define ENUM_WALLPAPERSTYLE_DECLARED
-enum WallpaperStyle
+enum WallpaperStyle
{
- WALLPAPER_NULL,
+ WALLPAPER_NULL,
WALLPAPER_TILE,
WALLPAPER_CENTER,
WALLPAPER_SCALE,
- WALLPAPER_TOPLEFT,
- WALLPAPER_TOP,
+ WALLPAPER_TOPLEFT,
+ WALLPAPER_TOP,
WALLPAPER_TOPRIGHT,
- WALLPAPER_LEFT,
+ WALLPAPER_LEFT,
WALLPAPER_RIGHT,
- WALLPAPER_BOTTOMLEFT,
- WALLPAPER_BOTTOM,
+ WALLPAPER_BOTTOMLEFT,
+ WALLPAPER_BOTTOM,
WALLPAPER_BOTTOMRIGHT,
WALLPAPER_APPLICATIONGRADIENT, // defines a gradient that internally covers the whole application
// and uses a color derived from the face color
@@ -88,9 +88,9 @@ enum WallpaperStyle
class VCL_DLLPUBLIC Wallpaper
{
private:
- ImplWallpaper* mpImplWallpaper;
+ ImplWallpaper* mpImplWallpaper;
- SAL_DLLPRIVATE void ImplMakeUnique( BOOL bReleaseCache = TRUE );
+ SAL_DLLPRIVATE void ImplMakeUnique( BOOL bReleaseCache = TRUE );
SAL_DLLPRIVATE Gradient ImplGetApplicationGradient() const;
public:
@@ -105,41 +105,41 @@ public:
Wallpaper( const Gradient& rGradient );
~Wallpaper();
- void SetColor( const Color& rColor );
- const Color& GetColor() const;
+ void SetColor( const Color& rColor );
+ const Color& GetColor() const;
- void SetStyle( WallpaperStyle eStyle );
- WallpaperStyle GetStyle() const;
+ void SetStyle( WallpaperStyle eStyle );
+ WallpaperStyle GetStyle() const;
- void SetBitmap( const BitmapEx& rBitmap );
- void SetBitmap();
- BitmapEx GetBitmap() const;
- BOOL IsBitmap() const;
+ void SetBitmap( const BitmapEx& rBitmap );
+ void SetBitmap();
+ BitmapEx GetBitmap() const;
+ BOOL IsBitmap() const;
- void SetGradient( const Gradient& rGradient );
- void SetGradient();
- Gradient GetGradient() const;
- BOOL IsGradient() const;
+ void SetGradient( const Gradient& rGradient );
+ void SetGradient();
+ Gradient GetGradient() const;
+ BOOL IsGradient() const;
- void SetRect( const Rectangle& rRect );
- void SetRect();
- Rectangle GetRect() const;
- BOOL IsRect() const;
+ void SetRect( const Rectangle& rRect );
+ void SetRect();
+ Rectangle GetRect() const;
+ BOOL IsRect() const;
- BOOL IsFixed() const;
- BOOL IsScrollable() const;
+ BOOL IsFixed() const;
+ BOOL IsScrollable() const;
- Wallpaper& operator=( const Wallpaper& rWallpaper );
- BOOL operator==( const Wallpaper& rWallpaper ) const;
- BOOL operator!=( const Wallpaper& rWallpaper ) const
+ Wallpaper& operator=( const Wallpaper& rWallpaper );
+ BOOL operator==( const Wallpaper& rWallpaper ) const;
+ BOOL operator!=( const Wallpaper& rWallpaper ) const
{ return !(Wallpaper::operator==( rWallpaper )); }
- BOOL IsSameInstance( const Wallpaper& rWallpaper ) const
+ BOOL IsSameInstance( const Wallpaper& rWallpaper ) const
{ return (mpImplWallpaper == rWallpaper.mpImplWallpaper); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Wallpaper& rWallpaper );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const Wallpaper& rWallpaper );
};
-#endif // _SV_WALL_HXX
+#endif // _SV_WALL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/wall2.hxx b/vcl/inc/vcl/wall2.hxx
index 311ad3b9cf1c..df95c48e6385 100644
--- a/vcl/inc/vcl/wall2.hxx
+++ b/vcl/inc/vcl/wall2.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +36,13 @@ class ImplWallpaper
friend class Wallpaper;
private:
- Color maColor;
- BitmapEx* mpBitmap;
- Gradient* mpGradient;
- Rectangle* mpRect;
- WallpaperStyle meStyle;
- ULONG mnRefCount;
- BitmapEx* mpCache;
+ Color maColor;
+ BitmapEx* mpBitmap;
+ Gradient* mpGradient;
+ Rectangle* mpRect;
+ WallpaperStyle meStyle;
+ ULONG mnRefCount;
+ BitmapEx* mpCache;
friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper );
friend SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper );
@@ -52,12 +52,12 @@ public:
ImplWallpaper( const ImplWallpaper& rImplWallpaper );
~ImplWallpaper();
- void ImplSetCachedBitmap( BitmapEx& rBmp );
- const BitmapEx* ImplGetCachedBitmap() { return mpCache; }
- void ImplReleaseCachedBitmap();
+ void ImplSetCachedBitmap( BitmapEx& rBmp );
+ const BitmapEx* ImplGetCachedBitmap() { return mpCache; }
+ void ImplReleaseCachedBitmap();
};
-#endif // _SV_WALL2_HXX
+#endif // _SV_WALL2_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/windata.hxx b/vcl/inc/vcl/windata.hxx
index bd8815b83f77..65a8acadbb92 100644
--- a/vcl/inc/vcl/windata.hxx
+++ b/vcl/inc/vcl/windata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/window.h b/vcl/inc/vcl/window.h
index d52616a1c183..8958a1e7e2a7 100644
--- a/vcl/inc/vcl/window.h
+++ b/vcl/inc/vcl/window.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -118,7 +118,7 @@ struct ImplWinData
Rectangle* mpFocusRect;
Rectangle* mpTrackRect;
USHORT mnTrackFlags;
- USHORT mnIsTopWindow;
+ USHORT mnIsTopWindow;
BOOL mbMouseOver; // tracks mouse over for native widget paint effect
BOOL mbEnableNativeWidget; // toggle native widget rendering
SmartId* mpSmartHelpId;
@@ -148,7 +148,7 @@ struct ImplOverlapData
struct ImplFrameData
{
Timer maPaintTimer; // paint timer
- Timer maResizeTimer; // resize timer
+ Timer maResizeTimer; // resize timer
InputContext maOldInputContext; // Last set Input Context
Window* mpNextFrame; // next frame window
Window* mpFirstOverlap; // first overlap window
@@ -236,7 +236,7 @@ public:
VclEventListeners maChildEventListeners;
// The canvas interface for this VCL window. Is persistent after the first GetCanvas() call
- ::com::sun::star::uno::WeakReference< ::com::sun::star::rendering::XCanvas > mxCanvas;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::rendering::XCanvas > mxCanvas;
ImplDelData* mpFirstDel;
void* mpUserData;
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index e6bd75afdcba..32c5621f2c59 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -317,7 +317,7 @@ typedef USHORT StateChangedType;
#define DLGWINDOW_NEXT 1
#define DLGWINDOW_FIRST 2
-enum WindowSizeType {
+enum WindowSizeType {
WINDOWSIZE_MINIMUM,
WINDOWSIZE_PREFERRED,
WINDOWSIZE_MAXIMUM
@@ -380,7 +380,7 @@ public:
SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE void ImplWindowRes( const ResId& rResId );
- SAL_DLLPRIVATE void ImplSetFrameParent( const Window* pParent );
+ SAL_DLLPRIVATE void ImplSetFrameParent( const Window* pParent );
SAL_DLLPRIVATE void ImplInsertWindow( Window* pParent );
SAL_DLLPRIVATE void ImplRemoveWindow( BOOL bRemoveFrameData );
SAL_DLLPRIVATE Window* ImplGetWindow();
@@ -480,7 +480,7 @@ public:
<TRUE/> if the font can be used as UI font
<FALSE/> if the font is unsuitable as UI font
*/
- SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont );
+ SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont );
SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl = TRUE );
SAL_DLLPRIVATE void ImplAlignChilds();
SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
@@ -545,15 +545,15 @@ public:
SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const;
SAL_DLLPRIVATE void ImplNotifyIconifiedState( BOOL bIconified );
- SAL_DLLPRIVATE bool ImplStopDnd();
- SAL_DLLPRIVATE void ImplStartDnd();
+ SAL_DLLPRIVATE bool ImplStopDnd();
+ SAL_DLLPRIVATE void ImplStartDnd();
SAL_DLLPRIVATE static void ImplInitAppFontData( Window* pWindow );
- SAL_DLLPRIVATE void ImplPaintToDevice( OutputDevice* pTargetOutDev, const Point& rPos );
+ SAL_DLLPRIVATE void ImplPaintToDevice( OutputDevice* pTargetOutDev, const Point& rPos );
SAL_DLLPRIVATE BOOL ImplIsInTaskPaneList();
SAL_DLLPRIVATE void ImplIsInTaskPaneList( BOOL mbIsInTaskList );
- SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >
ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const;
private:
@@ -728,7 +728,7 @@ public:
// while IsInPaint returns true ExpandPaintClipRegion adds the
// submitted region to the paint clip region so you can
// paint additional parts of your window if necessary
- void ExpandPaintClipRegion( const Region& rRegion );
+ void ExpandPaintClipRegion( const Region& rRegion );
void SetParent( Window* pNewParent );
Window* GetParent() const;
@@ -750,16 +750,16 @@ public:
void EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
const Window* pExcludeWindow = NULL );
BOOL IsInputEnabled() const;
-
+
/** Override <code>EnableInput</code>. This can be necessary due to other people
using EnableInput for whole window hierarchies.
-
-
+
+
<code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are
mutually exclusive; the last setter wins.
@param bAlways
sets always enabled flag
-
+
@param bChild
if true children are recursively set to AlwaysEnableInput
*/
@@ -773,13 +773,13 @@ public:
Windows with AlwaysDisableInput will not get key events even if enabled
and input enabled.This can be necessary due to other people using EnableInput
for whole window hierarchies.
-
+
<code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are
mutually exclusive; the last setter wins.
-
+
@param bAlways
sets always disable flag
-
+
@param bChild
if true children are recursively set to AlwaysDisableInput
*/
@@ -795,25 +795,25 @@ public:
not evaluate events but still react to those events externally. In these
rare cases call SetCallHandlersOnInputDisabled( true ) to have your handler
called anyway.
-
+
Currently only mouse events get this special treatment.
-
+
Use this sparingly, chances are if you want to use it you're wroking around
the real problem.
-
+
@param bCall
Enable/Disable calling event handlers for this disabled, modal or input disabled window.
This call is implicity done recursively for possible child windows.
*/
void SetCallHandlersOnInputDisabled( bool bCall );
/** get state of SetCallHandlersOnInputDisabled
-
+
@returns whether handlers are called regardless of input enabled state
*/
bool IsCallHandlersOnInputDisabled() const;
/** A window is in modal mode if one of its children or subchildren
is a running modal window (a modal dialog)
-
+
@returns TRUE if a child or subchild is a running modal window
*/
BOOL IsInModalMode() const;
@@ -887,10 +887,10 @@ public:
BOOL IsActive() const;
BOOL HasActiveChildFrame();
USHORT GetGetFocusFlags() const;
- void GrabFocusToDocument();
+ void GrabFocusToDocument();
- /**
- * Set this when you need to act as if the window has focus even if it
+ /**
+ * Set this when you need to act as if the window has focus even if it
* doesn't. This is necessary for implementing tab stops inside floating
* windows, but floating windows don't get focus from the system.
*/
@@ -928,11 +928,11 @@ public:
long CalcZoom( long n ) const;
virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual String GetText() const;
// return the actual text displayed
// this may have e.g. accellerators removed or portions
// replaced by ellipsis
- virtual String GetDisplayText() const;
+ virtual String GetDisplayText() const;
// gets the visible background color. for transparent windows
// this may be the parent's background color; for controls
// this may be a child's background color (e.g. ListBox)
@@ -1035,19 +1035,19 @@ public:
BOOL IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath = TRUE );
/// request XCanvas render interface for this window
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas > GetCanvas() const;
/// request XSpriteCanvas render interface for this window
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XSpriteCanvas > GetSpriteCanvas() const;
/// request fullscreen XSpriteCanvas render interface for this window
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XSpriteCanvas > GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const;
/* records all DrawText operations within the passed rectangle;
* a synchronous paint is sent to achieve this
*/
- void RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect );
+ void RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect );
// Setzen und Abfragen fuer das Toolkit
VCLXWindow* GetWindowPeer() const;
@@ -1057,11 +1057,11 @@ public:
BOOL IsCreatedWithToolkit() const;
void SetCreatedWithToolkit( BOOL b );
- Window* GetLabelFor() const;
- Window* GetLabeledBy() const;
- virtual Window* GetParentLabelFor( const Window* pLabel ) const;
- virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
- KeyEvent GetActivationKey() const;
+ Window* GetLabelFor() const;
+ Window* GetLabeledBy() const;
+ virtual Window* GetParentLabelFor( const Window* pLabel ) const;
+ virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
+ KeyEvent GetActivationKey() const;
// Drag and Drop interfaces
virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > GetDropTarget();
@@ -1087,7 +1087,7 @@ public:
// a helper method for a Control's Draw method
void PaintToDevice( OutputDevice* pDevice, const Point& rPos, const Size& rSize );
-
+
/* mark Window for deletion in top of event queue
*/
void doLazyDelete();
diff --git a/vcl/inc/vcl/wintypes.hxx b/vcl/inc/vcl/wintypes.hxx
index 55de8b4fb5be..2252ff9d2e4e 100644
--- a/vcl/inc/vcl/wintypes.hxx
+++ b/vcl/inc/vcl/wintypes.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/inc/vcl/wrkwin.hxx b/vcl/inc/vcl/wrkwin.hxx
index 50c1cf60dbb7..c188e30cd170 100644
--- a/vcl/inc/vcl/wrkwin.hxx
+++ b/vcl/inc/vcl/wrkwin.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -97,13 +97,13 @@ public:
BOOL IsMinimized() const;
- BOOL SetPluginParent( SystemParentData* pParent );
+ BOOL SetPluginParent( SystemParentData* pParent );
void Minimize();
void Restore();
- void Maximize( BOOL bMaximize = TRUE );
- BOOL IsMaximized() const;
+ void Maximize( BOOL bMaximize = TRUE );
+ BOOL IsMaximized() const;
};
#endif // _SV_WRKWIN_HXX
diff --git a/vcl/inc/vcl/xconnection.hxx b/vcl/inc/vcl/xconnection.hxx
index 1c4c5dd45140..c8faa3bbb659 100644
--- a/vcl/inc/vcl/xconnection.hxx
+++ b/vcl/inc/vcl/xconnection.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +43,12 @@ namespace vcl {
class DisplayConnection :
public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XDisplayConnection >
{
- ::osl::Mutex m_aMutex;
+ ::osl::Mutex m_aMutex;
::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > >
m_aHandlers;
::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > >
m_aErrorHandlers;
- ::com::sun::star::uno::Any m_aAny;
+ ::com::sun::star::uno::Any m_aAny;
public:
DisplayConnection();
virtual ~DisplayConnection();
diff --git a/vcl/os2/inc/salbmp.h b/vcl/os2/inc/salbmp.h
index 50ba652c051b..5b40fa564b79 100644
--- a/vcl/os2/inc/salbmp.h
+++ b/vcl/os2/inc/salbmp.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +50,8 @@ class Os2SalBitmap : public SalBitmap
private:
Size maSize;
- HANDLE mhDIB;
- HANDLE mhDIB1Subst;
+ HANDLE mhDIB;
+ HANDLE mhDIB1Subst;
HBITMAP mhDDB;
USHORT mnBitCount;
@@ -59,19 +59,19 @@ public:
HANDLE ImplGethDIB() const { return mhDIB; }
HBITMAP ImplGethDDB() const { return mhDDB; }
- HANDLE ImplGethDIB1Subst() const { return mhDIB1Subst; }
+ HANDLE ImplGethDIB1Subst() const { return mhDIB1Subst; }
- void ImplReplacehDIB1Subst( HANDLE hDIB1Subst );
+ void ImplReplacehDIB1Subst( HANDLE hDIB1Subst );
static HANDLE ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- static HANDLE ImplCreateDIB4FromDIB1( HANDLE hDIB1 );
+ static HANDLE ImplCreateDIB4FromDIB1( HANDLE hDIB1 );
static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, BOOL bDIB );
static USHORT ImplGetDIBColorCount( HANDLE hDIB );
static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
const Size& rSizePixel, BOOL bRLE4 );
//BOOL Create( HANDLE hBitmap, BOOL bDIB, BOOL bCopyHandle );
-
+
public:
Os2SalBitmap();
@@ -89,8 +89,8 @@ public:
//Size GetSize() const { return maSize; }
//USHORT GetBitCount() const { return mnBitCount; }
- //BitmapBuffer* AcquireBuffer( bool bReadOnly );
- //void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+ //BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ //void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle );
virtual bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
virtual bool Create( const SalBitmap& rSalBmpImpl );
@@ -102,7 +102,7 @@ public:
virtual Size GetSize() const { return maSize; }
virtual USHORT GetBitCount() const { return mnBitCount; }
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
virtual bool GetSystemData( BitmapSystemData& rData );
};
diff --git a/vcl/os2/inc/saldata.hxx b/vcl/os2/inc/saldata.hxx
index 2b2e3f03da7c..347989d9f85a 100644
--- a/vcl/os2/inc/saldata.hxx
+++ b/vcl/os2/inc/saldata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,19 +66,19 @@ typedef APIRET (APIENTRY ImQueryIMModeFunc)( HIMI himi, PULONG pulInputMode, PUL
struct SalIMEData
{
- HMODULE mhModIME;
- ImAssociateInstanceFunc* mpAssocIME;
- ImGetInstanceFunc* mpGetIME;
- ImReleaseInstanceFunc* mpReleaseIME;
- ImSetConversionFontFunc* mpSetConversionFont;
- ImSetConversionFontSizeFunc* mpSetConversionFontSize;
- ImGetConversionStringFunc* mpGetConversionString;
- ImGetResultStringFunc* mpGetResultString;
- ImSetCandidateWindowPosFunc* mpSetCandidateWin;
- ImQueryIMEPropertyFunc* mpQueryIMEProperty;
- ImRequestIMEFunc* mpRequestIME;
- ImSetIMModeFunc* mpSetIMEMode;
- ImQueryIMModeFunc* mpQueryIMEMode;
+ HMODULE mhModIME;
+ ImAssociateInstanceFunc* mpAssocIME;
+ ImGetInstanceFunc* mpGetIME;
+ ImReleaseInstanceFunc* mpReleaseIME;
+ ImSetConversionFontFunc* mpSetConversionFont;
+ ImSetConversionFontSizeFunc* mpSetConversionFontSize;
+ ImGetConversionStringFunc* mpGetConversionString;
+ ImGetResultStringFunc* mpGetResultString;
+ ImSetCandidateWindowPosFunc* mpSetCandidateWin;
+ ImQueryIMEPropertyFunc* mpQueryIMEProperty;
+ ImRequestIMEFunc* mpRequestIME;
+ ImSetIMModeFunc* mpSetIMEMode;
+ ImQueryIMModeFunc* mpQueryIMEMode;
};
#endif
@@ -102,31 +102,31 @@ struct SalIcon
struct SalData
{
- HAB mhAB; // anchor block handle
- HMQ mhMQ; // handle of os2 message queue
- int mnArgc; // commandline param count
- char** mpArgv; // commandline
- ULONG mnNewTimerMS; // Neue Zeit, mit dem der Timer gestartet werden soll
- ULONG mnTimerMS; // Current Time (in MS) of the Timer
- ULONG mnTimerOrgMS; // Current Original Time (in MS)
- ULONG mnNextTimerTime;
- ULONG mnLastEventTime;
- ULONG mnTimerId; // os2 timer id
- BOOL mbInTimerProc; // timer event is currently being dispatched
- //SALTIMERPROC mpTimerProc; // timer callback proc
- HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
- AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
- Os2SalInstance* mpFirstInstance; // pointer of first instance
- Os2SalFrame* mpFirstFrame; // pointer of first frame
- Os2SalFrame* mpCreateFrame; // Create-Frame for WM_CREATE
- Os2SalObject* mpFirstObject; // pointer of first object window
- ULONG mnAppThreadId; // Id from Applikation-Thread
- ULONG mnFontMetricCount; // number of entries in the font list
- PFONTMETRICS mpFontMetrics; // cached font list
- BOOL mbObjClassInit; // Ist SALOBJECTCLASS initialised
+ HAB mhAB; // anchor block handle
+ HMQ mhMQ; // handle of os2 message queue
+ int mnArgc; // commandline param count
+ char** mpArgv; // commandline
+ ULONG mnNewTimerMS; // Neue Zeit, mit dem der Timer gestartet werden soll
+ ULONG mnTimerMS; // Current Time (in MS) of the Timer
+ ULONG mnTimerOrgMS; // Current Original Time (in MS)
+ ULONG mnNextTimerTime;
+ ULONG mnLastEventTime;
+ ULONG mnTimerId; // os2 timer id
+ BOOL mbInTimerProc; // timer event is currently being dispatched
+ //SALTIMERPROC mpTimerProc; // timer callback proc
+ HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
+ AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
+ Os2SalInstance* mpFirstInstance; // pointer of first instance
+ Os2SalFrame* mpFirstFrame; // pointer of first frame
+ Os2SalFrame* mpCreateFrame; // Create-Frame for WM_CREATE
+ Os2SalObject* mpFirstObject; // pointer of first object window
+ ULONG mnAppThreadId; // Id from Applikation-Thread
+ ULONG mnFontMetricCount; // number of entries in the font list
+ PFONTMETRICS mpFontMetrics; // cached font list
+ BOOL mbObjClassInit; // Ist SALOBJECTCLASS initialised
#ifdef ENABLE_IME
- SalIMEData* mpIMEData; // SalIME-Data
- BOOL mbIMEInit; // SalIME-Data-Init
+ SalIMEData* mpIMEData; // SalIME-Data
+ BOOL mbIMEInit; // SalIME-Data-Init
#endif
SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none
@@ -141,15 +141,15 @@ inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData
// - SalShlData -
// --------------
-#define OS2_VER_211 211
-#define OS2_VER_WARP3 230
-#define OS2_VER_WARP4 240
+#define OS2_VER_211 211
+#define OS2_VER_WARP3 230
+#define OS2_VER_WARP4 240
struct SalShlData
{
- HMODULE mhMod; // Module handle of SAL-DLL
- USHORT mnVersion; // 211 = OS2 2.11; 230 = OS2 3.0; 240 = OS2 4.0
- PFNWP mpFrameProc; // old frame proc
+ HMODULE mhMod; // Module handle of SAL-DLL
+ USHORT mnVersion; // 211 = OS2 2.11; 230 = OS2 3.0; 240 = OS2 4.0
+ PFNWP mpFrameProc; // old frame proc
};
extern SalShlData aSalShlData;
@@ -205,46 +205,46 @@ void ImplReleaseSALIMEData();
// - Defines -
// -----------
-#define SAL_PROFILE_APPNAME ((PSZ)"StarOffice")
-#define SAL_PROFILE_USEDJP ((PSZ)"UseDJP")
-#define SAL_PROFILE_PRINTDJP ((PSZ)"PrintDJP")
-#define SAL_PROFILE_PRINTRAW ((PSZ)"PrintRAW")
+#define SAL_PROFILE_APPNAME ((PSZ)"StarOffice")
+#define SAL_PROFILE_USEDJP ((PSZ)"UseDJP")
+#define SAL_PROFILE_PRINTDJP ((PSZ)"PrintDJP")
+#define SAL_PROFILE_PRINTRAW ((PSZ)"PrintRAW")
-#define SAL_FRAME_WNDEXTRA sizeof(ULONG)
-#define SAL_FRAME_THIS 0
-#define SAL_FRAME_CLASSNAME "SALFRAME"
-#define SAL_SUBFRAME_CLASSNAME "SALSUBFRAME"
-#define SAL_OBJECT_WNDEXTRA sizeof(ULONG)
-#define SAL_OBJECT_THIS 0
-#define SAL_OBJECT_CLASSNAME "SALOBJECT"
-#define SAL_OBJECT_CHILDCLASSNAME "SALOBJECTCHILD"
-#define SAL_OBJECT_CLIPCLASSNAME "SALOBJECTCLIP"
-#define SAL_COM_CLASSNAME "SALCOMWND"
+#define SAL_FRAME_WNDEXTRA sizeof(ULONG)
+#define SAL_FRAME_THIS 0
+#define SAL_FRAME_CLASSNAME "SALFRAME"
+#define SAL_SUBFRAME_CLASSNAME "SALSUBFRAME"
+#define SAL_OBJECT_WNDEXTRA sizeof(ULONG)
+#define SAL_OBJECT_THIS 0
+#define SAL_OBJECT_CLASSNAME "SALOBJECT"
+#define SAL_OBJECT_CHILDCLASSNAME "SALOBJECTCHILD"
+#define SAL_OBJECT_CLIPCLASSNAME "SALOBJECTCLIP"
+#define SAL_COM_CLASSNAME "SALCOMWND"
-#define SAL_MOUSELEAVE_TIMEOUT 300
+#define SAL_MOUSELEAVE_TIMEOUT 300
// MP1 == 0; MP2 == pData
-#define SAL_MSG_USEREVENT (WM_USER+111)
+#define SAL_MSG_USEREVENT (WM_USER+111)
// MP1 == 0; MP2 == MousePosition relativ to upper left of screen
-#define SAL_MSG_MOUSELEAVE (WM_USER+112)
+#define SAL_MSG_MOUSELEAVE (WM_USER+112)
// MP1 == hDC; MP2 == 0
-#define SAL_MSG_PRINTABORTJOB (WM_USER+113)
+#define SAL_MSG_PRINTABORTJOB (WM_USER+113)
// MP1 == 0; MP2 == 0
-#define SAL_MSG_STARTTIMER (WM_USER+114)
+#define SAL_MSG_STARTTIMER (WM_USER+114)
// MP1 == nFrameStyle; MP2 == pParent; lResult pFrame
-#define SAL_MSG_CREATEFRAME (WM_USER+115)
+#define SAL_MSG_CREATEFRAME (WM_USER+115)
// MP1 == 0; MP2 == pParent; lResult pObject
-#define SAL_MSG_CREATEOBJECT (WM_USER+116)
+#define SAL_MSG_CREATEOBJECT (WM_USER+116)
// MP1 == bWait; MP2 == pMutex
-#define SAL_MSG_THREADYIELD (WM_USER+117)
+#define SAL_MSG_THREADYIELD (WM_USER+117)
// MP1 == 0; MP2 == 0
-#define SAL_MSG_RELEASEWAITYIELD (WM_USER+118)
+#define SAL_MSG_RELEASEWAITYIELD (WM_USER+118)
// MP1 == 0; MP2 == pData
-#define SAL_MSG_SYSPROCESSMENU (WM_USER+119)
+#define SAL_MSG_SYSPROCESSMENU (WM_USER+119)
// POSTFOCUS-Message; MP1 == nMP1; MP2 == nMP2 (SHORT1( bFocus ), 0)
-#define SAL_MSG_POSTFOCUS (WM_USER+120)
+#define SAL_MSG_POSTFOCUS (WM_USER+120)
// POSTSIZE-Message; MP1 == nMP1; MP2 == nMP2
-#define SAL_MSG_POSTSIZE (WM_USER+121)
+#define SAL_MSG_POSTSIZE (WM_USER+121)
// wParam == wParam; lParam == lParam
#define SAL_MSG_POSTMOVE (WM_USER+136)
@@ -256,9 +256,9 @@ void ImplReleaseSALIMEData();
#define SAL_MSG_SHOW (WM_USER+143)
// SysChild-ToTop; nMP1 = 0; nMP2 = 0
-#define SALOBJ_MSG_TOTOP (WM_USER+150)
+#define SALOBJ_MSG_TOTOP (WM_USER+150)
// POSTFOCUS-Message; MP1 == nMP1; MP2 == nMP2 (SHORT1( bFocus ), 0)
-#define SALOBJ_MSG_POSTFOCUS (WM_USER+151)
+#define SALOBJ_MSG_POSTFOCUS (WM_USER+151)
// wParam == 0; lParam == 0
#define SAL_MSG_DESTROYFRAME (WM_USER+160)
@@ -276,7 +276,7 @@ void ImplReleaseSALIMEData();
#define SAL_MSG_RECREATEHWND (WM_USER+166)
// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
#define SAL_MSG_RECREATECHILDHWND (WM_USER+167)
-// wParam == 0; lParam == HWND;
+// wParam == 0; lParam == HWND;
#define SAL_MSG_DESTROYHWND (WM_USER+168)
// POSTTIMER-Message; wparam = 0, lParam == time
#define SAL_MSG_POSTTIMER (WM_USER+169)
@@ -305,6 +305,6 @@ inline Os2SalObject* GetSalObjWindowPtr( HWND hWnd )
return (Os2SalObject*)WinQueryWindowULong( hWnd, SAL_OBJECT_THIS );
}
-#endif // _SV_SALDATA_HXX
+#endif // _SV_SALDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/os2/inc/salframe.h b/vcl/os2/inc/salframe.h
index cd3d910a7d30..2098050d1481 100644
--- a/vcl/os2/inc/salframe.h
+++ b/vcl/os2/inc/salframe.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,28 +61,28 @@ class Os2SalGraphics;
class Os2SalFrame : public SalFrame
{
public:
- HWND mhWndFrame; // HWND-Frame
- HWND mhWndClient; // HWND-Client
- HAB mhAB; // HAB
- HPOINTER mhPointer; // Current MousePointer
- void* mpInst; // VCL-Instance
- //SALFRAMEPROC mpProc; // VCL-Proc
- Os2SalGraphics* mpGraphics; // current frame graphics
- Os2SalFrame* mpNextFrame; // pointer to next frame
- SystemEnvData maSysData; // system data
- SalFrameState maState; // frame state
+ HWND mhWndFrame; // HWND-Frame
+ HWND mhWndClient; // HWND-Client
+ HAB mhAB; // HAB
+ HPOINTER mhPointer; // Current MousePointer
+ void* mpInst; // VCL-Instance
+ //SALFRAMEPROC mpProc; // VCL-Proc
+ Os2SalGraphics* mpGraphics; // current frame graphics
+ Os2SalFrame* mpNextFrame; // pointer to next frame
+ SystemEnvData maSysData; // system data
+ SalFrameState maState; // frame state
int mnShowState; // show state
- ULONG mnStyle; // SalFrameStyle
- long mnWidth; // Window-Witdth
- long mnHeight; // Window-Height
- SWP maFullScreenRect; // WindowRect befor FullScreenMode
- BOOL mbGraphics; // is Graphics used
- BOOL mbAllwayOnTop; // Allways on top modus
- BOOL mbVisible; // Visible Show/Hide-Status
- BOOL mbMinHide; // hide called from OS2
- BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages
- BOOL mbConversionMode; // TRUE: Wir befinden uns im Conversion-Modus
- BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
+ ULONG mnStyle; // SalFrameStyle
+ long mnWidth; // Window-Witdth
+ long mnHeight; // Window-Height
+ SWP maFullScreenRect; // WindowRect befor FullScreenMode
+ BOOL mbGraphics; // is Graphics used
+ BOOL mbAllwayOnTop; // Allways on top modus
+ BOOL mbVisible; // Visible Show/Hide-Status
+ BOOL mbMinHide; // hide called from OS2
+ BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages
+ BOOL mbConversionMode; // TRUE: Wir befinden uns im Conversion-Modus
+ BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
BOOL mbCaption; // has window a caption
BOOL mbBorder; // has window a border
BOOL mbFixBorder; // has window a fixed border
@@ -108,62 +108,62 @@ public:
static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting
private:
- Os2SalFrame* mpParentFrame; // parent frame pointer
+ Os2SalFrame* mpParentFrame; // parent frame pointer
public:
Os2SalFrame();
virtual ~Os2SalFrame();
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL PostEvent( void* pData );
- virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual BOOL PostEvent( void* pData );
+ virtual void SetTitle( const XubString& rTitle );
+ virtual void SetIcon( USHORT nIcon );
virtual void SetMenu( SalMenu* pSalMenu );
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( RECTL& rRect );
- 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 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 SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
+ virtual void GetClientSize( long& rWidth, long& rHeight );
+ virtual void GetWorkArea( RECTL& rRect );
+ 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 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 SalPointerState GetPointerState();
+ 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 SalIndicatorState GetIndicatorState();
virtual void SimulateKeyPress( USHORT nKeyCode );
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
+ virtual void SetParent( SalFrame* pNewParent );
+ virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber( unsigned int );
virtual void SetApplicationID( const rtl::OUString &rApplicationID );
- 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();
};
diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h
index a3991a80125f..621451d18178 100644
--- a/vcl/os2/inc/salgdi.h
+++ b/vcl/os2/inc/salgdi.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -119,137 +119,137 @@ public:
class Os2SalGraphics : public SalGraphics
{
public:
- HPS mhPS; // HPS
- HDC mhDC; // HDC
- HWND mhWnd; // HWND
- LONG mnHeight; // Height of frame Window
- ULONG mnClipElementCount; // number of clip rects in clip rect array
- RECTL* mpClipRectlAry; // clip rect array
- ULONG mnFontMetricCount; // number of entries in the font list
- PFONTMETRICS mpFontMetrics; // cached font list
- LONG mnOrientationX; // X-Font orientation
- LONG mnOrientationY; // Y-Font orientation
- BOOL mbLine; // draw lines
- BOOL mbFill; // fill areas
- BOOL mbPrinter; // is Printer
- BOOL mbVirDev; // is VirDev
- BOOL mbWindow; // is Window
- BOOL mbScreen; // is Screen compatible
- bool mbXORMode; // _every_ output with RasterOp XOR
- ULONG mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
- const ImplOs2FontData* mpOs2FontData[ MAX_FALLBACK ]; // pointer to the most recent font face
- ImplOs2FontEntry* mpOs2FontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
- ULONG mhDefFont; // DefaultFont
- float mfFontScale; // allows metrics emulation of huge font sizes
- BOOL mbFontKernInit; // FALSE: FontKerns must be queried
- KERNINGPAIRS* mpFontKernPairs; // Kerning Pairs of the current Font
- ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
-
- USHORT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, int );
+ HPS mhPS; // HPS
+ HDC mhDC; // HDC
+ HWND mhWnd; // HWND
+ LONG mnHeight; // Height of frame Window
+ ULONG mnClipElementCount; // number of clip rects in clip rect array
+ RECTL* mpClipRectlAry; // clip rect array
+ ULONG mnFontMetricCount; // number of entries in the font list
+ PFONTMETRICS mpFontMetrics; // cached font list
+ LONG mnOrientationX; // X-Font orientation
+ LONG mnOrientationY; // Y-Font orientation
+ BOOL mbLine; // draw lines
+ BOOL mbFill; // fill areas
+ BOOL mbPrinter; // is Printer
+ BOOL mbVirDev; // is VirDev
+ BOOL mbWindow; // is Window
+ BOOL mbScreen; // is Screen compatible
+ bool mbXORMode; // _every_ output with RasterOp XOR
+ ULONG mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
+ const ImplOs2FontData* mpOs2FontData[ MAX_FALLBACK ]; // pointer to the most recent font face
+ ImplOs2FontEntry* mpOs2FontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
+ ULONG mhDefFont; // DefaultFont
+ float mfFontScale; // allows metrics emulation of huge font sizes
+ BOOL mbFontKernInit; // FALSE: FontKerns must be queried
+ KERNINGPAIRS* mpFontKernPairs; // Kerning Pairs of the current Font
+ ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
+
+ USHORT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, int );
public:
Os2SalGraphics();
virtual ~Os2SalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- 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( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* 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 void drawPolyPolygon( ULONG nPoly, const ULONG* 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 sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
// CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
long nSrcHeight, USHORT nFlags );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
- virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
+ virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
+ 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 SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
// invert --> ClipRegion (only Windows or VirDevs)
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags);
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ 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, long nHeight, sal_uInt8 nTransparency );
+ virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
public:
// public SalGraphics methods, the interface to teh independent vcl part
// get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
+ virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount();
// get the width of the device
- virtual long GetGraphicsWidth() const;
+ virtual long GetGraphicsWidth() const;
// set the clip region to empty
- virtual void ResetClipRegion();
+ virtual void ResetClipRegion();
// begin setting the clip region, add rectangles to the
// region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
+ virtual void BeginSetClipRegion( ULONG nCount );
// all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion();
+ virtual void EndSetClipRegion();
// set the line color to transparent (= don't draw lines)
- virtual void SetLineColor();
+ virtual void SetLineColor();
// set the line color to a specific color
- virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetLineColor( SalColor nSalColor );
// set the fill color to transparent (= don't fill)
- virtual void SetFillColor();
+ virtual void SetFillColor();
// set the fill color to a specific color, shapes will be
// filled accordingly
- virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetFillColor( SalColor nSalColor );
// enable/disable XOR drawing
- virtual void SetXORMode( bool bSet, bool );
+ virtual void SetXORMode( bool bSet, bool );
// set line color for raster operations
- virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
// set fill color for raster operations
- virtual void SetROPFillColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
// set the text color to a specific color
- virtual void SetTextColor( SalColor nSalColor );
+ virtual void SetTextColor( SalColor nSalColor );
// set the font
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
// get the current font's etrics
- virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const;
// graphics must fill supplied font list
- virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontList( ImplDevFontList* );
// graphics should call ImplAddDevFontSubstitute on supplied
// OutputDevice for all its device specific preferred font substitutions
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
// returns TRUE if creation of subset was successfull
@@ -262,7 +262,7 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData* pFont,
long* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -287,13 +287,13 @@ public:
// pWidths MUST support at least 256 members;
// rInfo: additional outgoing information
// pDataLen: out parameter, contains the byte length of the returned buffer
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
// frees the font data again
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
virtual void GetGlyphWidths( const ImplFontData* pFont,
bool bVertical,
@@ -304,7 +304,7 @@ public:
virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
// Query the platform layer for control support
@@ -322,11 +322,11 @@ void ImplSalDeInitGraphics( Os2SalGraphics* mpData );
// - Defines -
// -----------
-#define RGBCOLOR(r,g,b) ((ULONG)(((BYTE)(b)|((USHORT)(g)<<8))|(((ULONG)(BYTE)(r))<<16)))
-#define TY( y ) (mnHeight-(y)-1)
+#define RGBCOLOR(r,g,b) ((ULONG)(((BYTE)(b)|((USHORT)(g)<<8))|(((ULONG)(BYTE)(r))<<16)))
+#define TY( y ) (mnHeight-(y)-1)
// offset for lcid field, used for fallback font selection
-#define LCID_BASE 100
+#define LCID_BASE 100
// -----------
// - Inlines -
diff --git a/vcl/os2/inc/salids.hrc b/vcl/os2/inc/salids.hrc
index b5f2260d307f..7a8dcc8c0568 100644
--- a/vcl/os2/inc/salids.hrc
+++ b/vcl/os2/inc/salids.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,74 +29,74 @@
#define _SV_SALIDS_HRC
// Pointer
-#define SAL_RESID_POINTER_NULL 10000
-#define SAL_RESID_POINTER_HELP 10001
-#define SAL_RESID_POINTER_CROSS 10002
-#define SAL_RESID_POINTER_MOVE 10003
-#define SAL_RESID_POINTER_HSPLIT 10004
-#define SAL_RESID_POINTER_VSPLIT 10005
-#define SAL_RESID_POINTER_HSIZEBAR 10006
-#define SAL_RESID_POINTER_VSIZEBAR 10007
-#define SAL_RESID_POINTER_HAND 10008
-#define SAL_RESID_POINTER_REFHAND 10009
-#define SAL_RESID_POINTER_PEN 10010
-#define SAL_RESID_POINTER_MAGNIFY 10011
-#define SAL_RESID_POINTER_FILL 10012
-#define SAL_RESID_POINTER_ROTATE 10013
-#define SAL_RESID_POINTER_HSHEAR 10014
-#define SAL_RESID_POINTER_VSHEAR 10015
-#define SAL_RESID_POINTER_MIRROR 10016
-#define SAL_RESID_POINTER_CROOK 10017
-#define SAL_RESID_POINTER_CROP 10018
-#define SAL_RESID_POINTER_MOVEPOINT 10019
-#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10020
-#define SAL_RESID_POINTER_MOVEDATA 10021
-#define SAL_RESID_POINTER_COPYDATA 10022
-#define SAL_RESID_POINTER_LINKDATA 10023
-#define SAL_RESID_POINTER_MOVEDATALINK 10024
-#define SAL_RESID_POINTER_COPYDATALINK 10025
-#define SAL_RESID_POINTER_MOVEFILE 10026
-#define SAL_RESID_POINTER_COPYFILE 10027
-#define SAL_RESID_POINTER_LINKFILE 10028
-#define SAL_RESID_POINTER_MOVEFILELINK 10029
-#define SAL_RESID_POINTER_COPYFILELINK 10030
-#define SAL_RESID_POINTER_MOVEFILES 10031
-#define SAL_RESID_POINTER_COPYFILES 10032
-#define SAL_RESID_POINTER_DRAW_LINE 10033
-#define SAL_RESID_POINTER_DRAW_RECT 10034
-#define SAL_RESID_POINTER_DRAW_POLYGON 10035
-#define SAL_RESID_POINTER_DRAW_BEZIER 10036
-#define SAL_RESID_POINTER_DRAW_ARC 10037
-#define SAL_RESID_POINTER_DRAW_PIE 10038
-#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10039
-#define SAL_RESID_POINTER_DRAW_ELLIPSE 10040
-#define SAL_RESID_POINTER_DRAW_FREEHAND 10041
-#define SAL_RESID_POINTER_DRAW_CONNECT 10042
-#define SAL_RESID_POINTER_DRAW_TEXT 10043
-#define SAL_RESID_POINTER_DRAW_CAPTION 10044
-#define SAL_RESID_POINTER_CHART 10045
-#define SAL_RESID_POINTER_DETECTIVE 10046
-#define SAL_RESID_POINTER_PIVOT_COL 10047
-#define SAL_RESID_POINTER_PIVOT_ROW 10048
-#define SAL_RESID_POINTER_PIVOT_FIELD 10049
-#define SAL_RESID_POINTER_CHAIN 10050
-#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10051
-#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10052
-#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10053
-#define SAL_RESID_POINTER_AUTOSCROLL_N 10054
-#define SAL_RESID_POINTER_AUTOSCROLL_S 10055
-#define SAL_RESID_POINTER_AUTOSCROLL_W 10056
-#define SAL_RESID_POINTER_AUTOSCROLL_E 10057
-#define SAL_RESID_POINTER_AUTOSCROLL_NW 10058
-#define SAL_RESID_POINTER_AUTOSCROLL_NE 10059
-#define SAL_RESID_POINTER_AUTOSCROLL_SW 10060
-#define SAL_RESID_POINTER_AUTOSCROLL_SE 10061
-#define SAL_RESID_POINTER_AUTOSCROLL_NS 10062
-#define SAL_RESID_POINTER_AUTOSCROLL_WE 10063
-#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10064
+#define SAL_RESID_POINTER_NULL 10000
+#define SAL_RESID_POINTER_HELP 10001
+#define SAL_RESID_POINTER_CROSS 10002
+#define SAL_RESID_POINTER_MOVE 10003
+#define SAL_RESID_POINTER_HSPLIT 10004
+#define SAL_RESID_POINTER_VSPLIT 10005
+#define SAL_RESID_POINTER_HSIZEBAR 10006
+#define SAL_RESID_POINTER_VSIZEBAR 10007
+#define SAL_RESID_POINTER_HAND 10008
+#define SAL_RESID_POINTER_REFHAND 10009
+#define SAL_RESID_POINTER_PEN 10010
+#define SAL_RESID_POINTER_MAGNIFY 10011
+#define SAL_RESID_POINTER_FILL 10012
+#define SAL_RESID_POINTER_ROTATE 10013
+#define SAL_RESID_POINTER_HSHEAR 10014
+#define SAL_RESID_POINTER_VSHEAR 10015
+#define SAL_RESID_POINTER_MIRROR 10016
+#define SAL_RESID_POINTER_CROOK 10017
+#define SAL_RESID_POINTER_CROP 10018
+#define SAL_RESID_POINTER_MOVEPOINT 10019
+#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10020
+#define SAL_RESID_POINTER_MOVEDATA 10021
+#define SAL_RESID_POINTER_COPYDATA 10022
+#define SAL_RESID_POINTER_LINKDATA 10023
+#define SAL_RESID_POINTER_MOVEDATALINK 10024
+#define SAL_RESID_POINTER_COPYDATALINK 10025
+#define SAL_RESID_POINTER_MOVEFILE 10026
+#define SAL_RESID_POINTER_COPYFILE 10027
+#define SAL_RESID_POINTER_LINKFILE 10028
+#define SAL_RESID_POINTER_MOVEFILELINK 10029
+#define SAL_RESID_POINTER_COPYFILELINK 10030
+#define SAL_RESID_POINTER_MOVEFILES 10031
+#define SAL_RESID_POINTER_COPYFILES 10032
+#define SAL_RESID_POINTER_DRAW_LINE 10033
+#define SAL_RESID_POINTER_DRAW_RECT 10034
+#define SAL_RESID_POINTER_DRAW_POLYGON 10035
+#define SAL_RESID_POINTER_DRAW_BEZIER 10036
+#define SAL_RESID_POINTER_DRAW_ARC 10037
+#define SAL_RESID_POINTER_DRAW_PIE 10038
+#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10039
+#define SAL_RESID_POINTER_DRAW_ELLIPSE 10040
+#define SAL_RESID_POINTER_DRAW_FREEHAND 10041
+#define SAL_RESID_POINTER_DRAW_CONNECT 10042
+#define SAL_RESID_POINTER_DRAW_TEXT 10043
+#define SAL_RESID_POINTER_DRAW_CAPTION 10044
+#define SAL_RESID_POINTER_CHART 10045
+#define SAL_RESID_POINTER_DETECTIVE 10046
+#define SAL_RESID_POINTER_PIVOT_COL 10047
+#define SAL_RESID_POINTER_PIVOT_ROW 10048
+#define SAL_RESID_POINTER_PIVOT_FIELD 10049
+#define SAL_RESID_POINTER_CHAIN 10050
+#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10051
+#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10052
+#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10053
+#define SAL_RESID_POINTER_AUTOSCROLL_N 10054
+#define SAL_RESID_POINTER_AUTOSCROLL_S 10055
+#define SAL_RESID_POINTER_AUTOSCROLL_W 10056
+#define SAL_RESID_POINTER_AUTOSCROLL_E 10057
+#define SAL_RESID_POINTER_AUTOSCROLL_NW 10058
+#define SAL_RESID_POINTER_AUTOSCROLL_NE 10059
+#define SAL_RESID_POINTER_AUTOSCROLL_SW 10060
+#define SAL_RESID_POINTER_AUTOSCROLL_SE 10061
+#define SAL_RESID_POINTER_AUTOSCROLL_NS 10062
+#define SAL_RESID_POINTER_AUTOSCROLL_WE 10063
+#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10064
#define SAL_RESID_POINTER_AIRBRUSH 10070
-#define SAL_RESID_POINTER_TEXT_VERTICAL 10071
-#define SAL_RESID_POINTER_PIVOT_DELETE 10072
+#define SAL_RESID_POINTER_TEXT_VERTICAL 10071
+#define SAL_RESID_POINTER_PIVOT_DELETE 10072
#define SAL_RESID_POINTER_TAB_SELECT_S 10073
#define SAL_RESID_POINTER_TAB_SELECT_E 10074
#define SAL_RESID_POINTER_TAB_SELECT_SE 10075
@@ -104,6 +104,6 @@
#define SAL_RESID_POINTER_TAB_SELECT_SW 10077
#define SAL_RESID_POINTER_PAINTBRUSH 10078
-#define SAL_RESID_ICON_DEFAULT 1
+#define SAL_RESID_ICON_DEFAULT 1
#endif // _SV_SALIDS_HRC
diff --git a/vcl/os2/inc/salinst.h b/vcl/os2/inc/salinst.h
index c533c0b8339c..aec53974e1f6 100644
--- a/vcl/os2/inc/salinst.h
+++ b/vcl/os2/inc/salinst.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,61 +39,61 @@
class SalYieldMutex;
-#define SAL_COMMANDLINENOINIT ((USHORT)0xFFFF)
-#define SAL_MAXPARAM 40
+#define SAL_COMMANDLINENOINIT ((USHORT)0xFFFF)
+#define SAL_MAXPARAM 40
class Os2SalInstance : public SalInstance
{
public:
- HAB mhAB; // anchor block handle
- HMQ mhMQ; // handle of os2 message queue
- HPOINTER mhAppIcon; // app icon
- int mnArgc; // commandline param count
- char** mpArgv; // commandline
- HWND mhComWnd; // window, for communication (between threads and the main thread)
- SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
+ HAB mhAB; // anchor block handle
+ HMQ mhMQ; // handle of os2 message queue
+ HPOINTER mhAppIcon; // app icon
+ int mnArgc; // commandline param count
+ char** mpArgv; // commandline
+ HWND mhComWnd; // window, for communication (between threads and the main thread)
+ SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
osl::Mutex* mpSalWaitMutex; // Sal-Wait-Mutex
- USHORT mnYieldWaitCount; // Wait-Count
+ USHORT mnYieldWaitCount; // Wait-Count
public:
Os2SalInstance();
virtual ~Os2SalInstance();
- 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 SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ 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 SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
USHORT nBitCount, const SystemGraphicsData *pData );
- 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 GetPrinterQueueInfo( ImplPrnQueueList* pList );
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
+ 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 String GetDefaultPrinter();
- virtual SalTimer* CreateSalTimer();
- virtual SalI18NImeStatus* CreateI18NImeStatus();
- virtual SalSystem* CreateSalSystem();
- virtual SalBitmap* CreateSalBitmap();
+ virtual SalTimer* CreateSalTimer();
+ virtual SalI18NImeStatus* CreateI18NImeStatus();
+ virtual SalSystem* CreateSalSystem();
+ virtual SalBitmap* CreateSalBitmap();
virtual osl::SolarMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
- virtual void Yield( bool, bool );
- virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* );
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* );
+ virtual ULONG ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( ULONG nCount );
+ virtual void Yield( bool, bool );
+ virtual bool AnyInput( USHORT nType );
+ virtual SalMenu* CreateMenu( BOOL bMenuBar );
+ virtual void DestroyMenu( SalMenu* );
+ virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
+ virtual void DestroyMenuItem( SalMenuItem* );
virtual SalSession* CreateSalSession();
- virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
- virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
+ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+ virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
};
SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle );
diff --git a/vcl/os2/inc/sallang.hxx b/vcl/os2/inc/sallang.hxx
index f9122cf2b3a4..05025044f021 100644
--- a/vcl/os2/inc/sallang.hxx
+++ b/vcl/os2/inc/sallang.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,28 +36,28 @@
// --------------------
// --- Key-Namen ---
-#define LSTR_KEY_SHIFT 0
-#define LSTR_KEY_CTRL 1
-#define LSTR_KEY_ALT 2
-#define LSTR_KEY_UP 3
-#define LSTR_KEY_DOWN 4
-#define LSTR_KEY_LEFT 5
-#define LSTR_KEY_RIGHT 6
-#define LSTR_KEY_HOME 7
-#define LSTR_KEY_END 8
-#define LSTR_KEY_PAGEUP 9
-#define LSTR_KEY_PAGEDOWN 10
-#define LSTR_KEY_RETURN 11
-#define LSTR_KEY_ESC 12
-#define LSTR_KEY_TAB 13
-#define LSTR_KEY_BACKSPACE 14
-#define LSTR_KEY_SPACE 15
-#define LSTR_KEY_INSERT 16
-#define LSTR_KEY_DELETE 17
+#define LSTR_KEY_SHIFT 0
+#define LSTR_KEY_CTRL 1
+#define LSTR_KEY_ALT 2
+#define LSTR_KEY_UP 3
+#define LSTR_KEY_DOWN 4
+#define LSTR_KEY_LEFT 5
+#define LSTR_KEY_RIGHT 6
+#define LSTR_KEY_HOME 7
+#define LSTR_KEY_END 8
+#define LSTR_KEY_PAGEUP 9
+#define LSTR_KEY_PAGEDOWN 10
+#define LSTR_KEY_RETURN 11
+#define LSTR_KEY_ESC 12
+#define LSTR_KEY_TAB 13
+#define LSTR_KEY_BACKSPACE 14
+#define LSTR_KEY_SPACE 15
+#define LSTR_KEY_INSERT 16
+#define LSTR_KEY_DELETE 17
// --- Anzahl der Texte ---
-#define LSTR_COUNT 18
+#define LSTR_COUNT 18
// --------------------------------------------
// - Methoden zum Abfragen der Sprach-Strings -
diff --git a/vcl/os2/inc/sallayout.h b/vcl/os2/inc/sallayout.h
index d08c36420405..d8bd3c4eae41 100644
--- a/vcl/os2/inc/sallayout.h
+++ b/vcl/os2/inc/sallayout.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/os2/inc/salmenu.h b/vcl/os2/inc/salmenu.h
index 8c46b638f063..d87384326219 100644
--- a/vcl/os2/inc/salmenu.h
+++ b/vcl/os2/inc/salmenu.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/os2/inc/salobj.h b/vcl/os2/inc/salobj.h
index fc4a1c027159..2712a1f2371e 100644
--- a/vcl/os2/inc/salobj.h
+++ b/vcl/os2/inc/salobj.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,32 +39,32 @@
class Os2SalObject : public SalObject
{
public:
- HWND mhWnd; // Window handle
- HWND mhWndChild; // Child Window handle
- HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte
- SystemChildData maSysData; // SystemEnvData
- HWND mhLastClipWnd; // LastClip-Window
- HWND mhOldLastClipWnd; // LastClip-Window befor BeginSetClipRegion
- long mnHeight; // Fenster-Hoehe fuer Positionsumrechnung
- Os2SalObject* mpNextObject; // pointer to next object
- void* mpInst; // instance handle for callback
- SALOBJECTPROC mpProc; // callback proc
+ HWND mhWnd; // Window handle
+ HWND mhWndChild; // Child Window handle
+ HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte
+ SystemChildData maSysData; // SystemEnvData
+ HWND mhLastClipWnd; // LastClip-Window
+ HWND mhOldLastClipWnd; // LastClip-Window befor BeginSetClipRegion
+ long mnHeight; // Fenster-Hoehe fuer Positionsumrechnung
+ Os2SalObject* mpNextObject; // pointer to next object
+ void* mpInst; // instance handle for callback
+ SALOBJECTPROC mpProc; // callback proc
Os2SalObject();
virtual ~Os2SalObject();
- 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/os2/inc/salprn.h b/vcl/os2/inc/salprn.h
index 1bcd47465aab..9f66d240cc9e 100644
--- a/vcl/os2/inc/salprn.h
+++ b/vcl/os2/inc/salprn.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,39 +48,39 @@ typedef ImplTrayInfo* PIMPLTRAYINFO;
class Os2SalInfoPrinter : public SalInfoPrinter
{
public:
- Os2SalGraphics* mpGraphics; // Graphics
- HDC mhDC; // printer hdc
- HPS mhPS; // printer hps
- ByteString maPrinterName; // pszPrinters
- ByteString maName; // pszName bzw. LogAdress
- ByteString maDriverName; // pszDriverName nach .
- ByteString maDeviceName; // pszDriverName bis .
- ByteString maJobSetupDeviceName; // DeviceName aus pDriverData
- PIMPLFORMINFO* mpFormArray; // PaperForm-Names
- USHORT mnFormCount; // PaperForm-Count
- PIMPLTRAYINFO* mpTrayArray; // PaperTray-Names
- USHORT mnTrayCount; // PaperTray-Count
- BOOL mbDJPSupported; // is driver DJP enabled
- BOOL mbGraphics; // is Graphics used
+ Os2SalGraphics* mpGraphics; // Graphics
+ HDC mhDC; // printer hdc
+ HPS mhPS; // printer hps
+ ByteString maPrinterName; // pszPrinters
+ ByteString maName; // pszName bzw. LogAdress
+ ByteString maDriverName; // pszDriverName nach .
+ ByteString maDeviceName; // pszDriverName bis .
+ ByteString maJobSetupDeviceName; // DeviceName aus pDriverData
+ PIMPLFORMINFO* mpFormArray; // PaperForm-Names
+ USHORT mnFormCount; // PaperForm-Count
+ PIMPLTRAYINFO* mpTrayArray; // PaperTray-Names
+ USHORT mnTrayCount; // PaperTray-Count
+ BOOL mbDJPSupported; // is driver DJP enabled
+ BOOL mbGraphics; // is Graphics used
public:
Os2SalInfoPrinter();
virtual ~Os2SalInfoPrinter();
- 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 );
};
// ------------------
@@ -90,16 +90,16 @@ public:
class SalPrinterData00
{
public:
- Os2SalGraphics* mpGraphics; // current Printer graphics
- SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
- HDC mhDC; // printer hdc
- HPS mhPS; // printer hps
- ULONG mnError; // Error Code
- BOOL mbFirstPage; // IsFirstPage
- BOOL mbAbort; // JobAborted
- BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
- char maCommentBuf[33]; // Comment
- char maCopyBuf[10]; // Kopien
+ Os2SalGraphics* mpGraphics; // current Printer graphics
+ SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ HDC mhDC; // printer hdc
+ HPS mhPS; // printer hps
+ ULONG mnError; // Error Code
+ BOOL mbFirstPage; // IsFirstPage
+ BOOL mbAbort; // JobAborted
+ BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
+ char maCommentBuf[33]; // Comment
+ char maCopyBuf[10]; // Kopien
};
// -----------------
@@ -109,39 +109,39 @@ public:
class Os2SalPrinter : public SalPrinter
{
public:
- Os2SalGraphics* mpGraphics; // current Printer graphics
- Os2SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
- Os2SalPrinter* mpNextPrinter; // next printing printer
- HDC mhDC; // printer hdc
- HPS mhPS; // printer hps
- ULONG mnError; // Error Code
- BOOL mbFirstPage; // IsFirstPage
- BOOL mbAbort; // JobAborted
- BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
- char maCommentBuf[33]; // Comment
- char maCopyBuf[16]; // Kopien
- //HDC mhDC; // printer hdc
- //ULONG mnError; // Error Code
- //ULONG mnCopies; // Kopien
- //BOOL mbCollate; // Sortierte Kopien
- //BOOL mbAbort; // Job Aborted
+ Os2SalGraphics* mpGraphics; // current Printer graphics
+ Os2SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ Os2SalPrinter* mpNextPrinter; // next printing printer
+ HDC mhDC; // printer hdc
+ HPS mhPS; // printer hps
+ ULONG mnError; // Error Code
+ BOOL mbFirstPage; // IsFirstPage
+ BOOL mbAbort; // JobAborted
+ BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
+ char maCommentBuf[33]; // Comment
+ char maCopyBuf[16]; // Kopien
+ //HDC mhDC; // printer hdc
+ //ULONG mnError; // Error Code
+ //ULONG mnCopies; // Kopien
+ //BOOL mbCollate; // Sortierte Kopien
+ //BOOL mbAbort; // Job Aborted
public:
Os2SalPrinter();
virtual ~Os2SalPrinter();
- 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();
};
#endif // _SV_SALPRN_H
diff --git a/vcl/os2/inc/salsound.h b/vcl/os2/inc/salsound.h
index 2445bbe3c1a0..27a7a9aa1aff 100644
--- a/vcl/os2/inc/salsound.h
+++ b/vcl/os2/inc/salsound.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,50 +46,50 @@
class Os2SalSound : public SalSound
{
private:
-
- static HMODULE mhMCILib;
- static ULONG mnSoundState;
- static void* mpMCIFnc;
- SALSOUNDPROC mpProc;
- void* mpInst;
- ULONG mnStartTime;
- ULONG mnPlayLen;
- HWND mhSoundWnd;
- USHORT mnDeviceId;
- BOOL mbLoop;
- BOOL mbPaused;
+
+ static HMODULE mhMCILib;
+ static ULONG mnSoundState;
+ static void* mpMCIFnc;
+ SALSOUNDPROC mpProc;
+ void* mpInst;
+ ULONG mnStartTime;
+ ULONG mnPlayLen;
+ HWND mhSoundWnd;
+ USHORT mnDeviceId;
+ BOOL mbLoop;
+ BOOL mbPaused;
public:
void ImplSetError( ULONG nMciErr );
- void ImplNotify( SoundNotification eNotification, ULONG nError );
+ void ImplNotify( SoundNotification eNotification, ULONG nError );
-public:
+public:
- BOOL Create();
- //static BOOL IsValid() { return( SOUND_STATE_VALID == Os2SalSound::mnSoundState ); }
- //BOOL Init( SalFrame* pFrame, const String& rSoundName, ULONG& rSoundLen );
- //BOOL Init( SalFrame* pFrame, const BYTE* pSound, ULONG nDataLen, ULONG& rSoundLen );
+ BOOL Create();
+ //static BOOL IsValid() { return( SOUND_STATE_VALID == Os2SalSound::mnSoundState ); }
+ //BOOL Init( SalFrame* pFrame, const String& rSoundName, ULONG& rSoundLen );
+ //BOOL Init( SalFrame* pFrame, const BYTE* pSound, ULONG nDataLen, ULONG& rSoundLen );
- void SetNotifyProc( void* pInst, SALSOUNDPROC pProc )
+ void SetNotifyProc( void* pInst, SALSOUNDPROC pProc )
{ mpInst = pInst; mpProc = pProc; }
public:
Os2SalSound();
virtual ~Os2SalSound();
+
+ virtual bool IsValid();
+ virtual bool Init( const String& rSoundName, ULONG& rSoundLen );
+ virtual void Play( ULONG nStartTime, ULONG nPlayTime, bool bLoop );
+ virtual void Stop();
+ virtual void Pause();
+ virtual void Continue();
+ virtual bool IsLoopMode() const;
+ virtual bool IsPlaying() const;
+ virtual bool IsPaused() const;
- virtual bool IsValid();
- virtual bool Init( const String& rSoundName, ULONG& rSoundLen );
- virtual void Play( ULONG nStartTime, ULONG nPlayTime, bool bLoop );
- virtual void Stop();
- virtual void Pause();
- virtual void Continue();
- virtual bool IsLoopMode() const;
- virtual bool IsPlaying() const;
- virtual bool IsPaused() const;
-
- bool ImplCreate();
- void ImplDestroy();
- static void Release();
+ bool ImplCreate();
+ void ImplDestroy();
+ static void Release();
};
#endif // _SV_SALSOUND_H
diff --git a/vcl/os2/inc/salsound.hxx b/vcl/os2/inc/salsound.hxx
index e46e3e666a2c..3007a861b1f0 100644
--- a/vcl/os2/inc/salsound.hxx
+++ b/vcl/os2/inc/salsound.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,40 +43,40 @@
class SalSound
{
private:
-
- static HMODULE mhMCILib;
- static ULONG mnSoundState;
- static void* mpMCIFnc;
- SALSOUNDPROC mpProc;
- void* mpInst;
- ULONG mnStartTime;
- ULONG mnPlayLen;
- HWND mhSoundWnd;
- USHORT mnDeviceId;
- BOOL mbLoop;
- BOOL mbPaused;
+
+ static HMODULE mhMCILib;
+ static ULONG mnSoundState;
+ static void* mpMCIFnc;
+ SALSOUNDPROC mpProc;
+ void* mpInst;
+ ULONG mnStartTime;
+ ULONG mnPlayLen;
+ HWND mhSoundWnd;
+ USHORT mnDeviceId;
+ BOOL mbLoop;
+ BOOL mbPaused;
public:
void ImplSetError( ULONG nMciErr );
- void ImplNotify( SoundNotification eNotification, ULONG nError );
-
-public:
+ void ImplNotify( SoundNotification eNotification, ULONG nError );
+public:
+
SalSound();
~SalSound();
- BOOL Create();
- static void Release();
- static BOOL IsValid() { return( SOUND_STATE_VALID == SalSound::mnSoundState ); }
+ BOOL Create();
+ static void Release();
+ static BOOL IsValid() { return( SOUND_STATE_VALID == SalSound::mnSoundState ); }
- BOOL Init( SalFrame* pFrame, const String& rSoundName, ULONG& rSoundLen );
- BOOL Init( SalFrame* pFrame, const BYTE* pSound, ULONG nDataLen, ULONG& rSoundLen );
- void Play( ULONG nStartTime, ULONG nPlayTime, BOOL bLoop );
- void Stop();
- void Pause();
+ BOOL Init( SalFrame* pFrame, const String& rSoundName, ULONG& rSoundLen );
+ BOOL Init( SalFrame* pFrame, const BYTE* pSound, ULONG nDataLen, ULONG& rSoundLen );
+ void Play( ULONG nStartTime, ULONG nPlayTime, BOOL bLoop );
+ void Stop();
+ void Pause();
- void SetNotifyProc( void* pInst, SALSOUNDPROC pProc )
+ void SetNotifyProc( void* pInst, SALSOUNDPROC pProc )
{ mpInst = pInst; mpProc = pProc; }
};
diff --git a/vcl/os2/inc/salsys.h b/vcl/os2/inc/salsys.h
index 24472a4c43d4..ac17c26991c9 100644
--- a/vcl/os2/inc/salsys.h
+++ b/vcl/os2/inc/salsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/os2/inc/saltimer.h b/vcl/os2/inc/saltimer.h
index de150fcfb10c..09e618bb6613 100644
--- a/vcl/os2/inc/saltimer.h
+++ b/vcl/os2/inc/saltimer.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +38,8 @@ public:
virtual ~Os2SalTimer();
// overload all pure virtual methods
- void Start( ULONG nMS );
- void Stop();
+ void Start( ULONG nMS );
+ void Stop();
};
#endif
diff --git a/vcl/os2/inc/salvd.h b/vcl/os2/inc/salvd.h
index b5250c913c7e..d613215290e9 100644
--- a/vcl/os2/inc/salvd.h
+++ b/vcl/os2/inc/salvd.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,21 +42,21 @@ class Os2SalGraphics;
class Os2SalVirtualDevice : public SalVirtualDevice
{
public:
- HPS mhPS; // HPS
- HDC mhDC; // HDC
- HBITMAP mhBmp; // Memory Bitmap
- HBITMAP mhDefBmp; // Default Bitmap
- Os2SalGraphics* mpGraphics; // current VirDev graphics
- USHORT mnBitCount; // BitCount (0 or 1)
- BOOL mbGraphics; // is Graphics used
+ HPS mhPS; // HPS
+ HDC mhDC; // HDC
+ HBITMAP mhBmp; // Memory Bitmap
+ HBITMAP mhDefBmp; // Default Bitmap
+ Os2SalGraphics* mpGraphics; // current VirDev graphics
+ USHORT mnBitCount; // BitCount (0 or 1)
+ BOOL mbGraphics; // is Graphics used
Os2SalVirtualDevice();
virtual ~Os2SalVirtualDevice();
- 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 void GetSize( long& rWidth, long& rHeight );
};
// Help-Functions
diff --git a/vcl/os2/inc/svsys.h b/vcl/os2/inc/svsys.h
index 354f53fb6d3a..d87dab98d707 100644
--- a/vcl/os2/inc/svsys.h
+++ b/vcl/os2/inc/svsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/os2/inc/wingdi.h b/vcl/os2/inc/wingdi.h
index c6cf93964df7..67e508afb89c 100644
--- a/vcl/os2/inc/wingdi.h
+++ b/vcl/os2/inc/wingdi.h
@@ -39,11 +39,11 @@ typedef struct tagTTPOLYGONHEADER
typedef struct
{
- UINT gmBlackBoxX;
- UINT gmBlackBoxY;
- POINT gmptGlyphOrigin;
- SHORT gmCellIncX;
- SHORT gmCellIncY;
+ UINT gmBlackBoxX;
+ UINT gmBlackBoxY;
+ POINT gmptGlyphOrigin;
+ SHORT gmCellIncX;
+ SHORT gmCellIncY;
} GLYPHMETRICS, *LPGLYPHMETRICS;
#define GGO_METRICS 0
diff --git a/vcl/os2/source/app/salinfo.cxx b/vcl/os2/source/app/salinfo.cxx
index 08ca8b031982..3eca27b13b92 100644
--- a/vcl/os2/source/app/salinfo.cxx
+++ b/vcl/os2/source/app/salinfo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -131,7 +131,7 @@ int Os2SalSystem::ShowNativeMessageBox(const String& rTitle, const String& rMess
pSVData->mpIntroWindow->Hide();
return WinMessageBox(
- HWND_DESKTOP, HWND_DESKTOP,
+ HWND_DESKTOP, HWND_DESKTOP,
(PSZ)CHAR_POINTER(rMessage),
(PSZ)CHAR_POINTER(rTitle),
0, nFlags);
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx
index 90483bdb3a9b..632263733a46 100644
--- a/vcl/os2/source/app/salinst.cxx
+++ b/vcl/os2/source/app/salinst.cxx
@@ -85,9 +85,9 @@ MRESULT EXPENTRY SalComWndProc( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nMP2
class SalYieldMutex : public vcl::SolarMutexObject
{
public:
- Os2SalInstance* mpInstData;
- ULONG mnCount;
- ULONG mnThreadId;
+ Os2SalInstance* mpInstData;
+ ULONG mnCount;
+ ULONG mnThreadId;
public:
SalYieldMutex( Os2SalInstance* pInstData );
@@ -96,16 +96,16 @@ public:
virtual void SAL_CALL release();
virtual sal_Bool SAL_CALL tryToAcquire();
- ULONG GetAcquireCount( ULONG nThreadId );
+ ULONG GetAcquireCount( ULONG nThreadId );
};
// -----------------------------------------------------------------------
SalYieldMutex::SalYieldMutex( Os2SalInstance* pInstData )
{
- mpInstData = pInstData;
- mnCount = 0;
- mnThreadId = 0;
+ mpInstData = pInstData;
+ mnCount = 0;
+ mnThreadId = 0;
}
// -----------------------------------------------------------------------
@@ -299,8 +299,8 @@ void ImplSalAcquireYieldMutex( ULONG nCount )
void ImplDbgTestSolarMutex()
{
- SalData* pSalData = GetSalData();
- ULONG nCurThreadId = GetCurrentThreadId();
+ SalData* pSalData = GetSalData();
+ ULONG nCurThreadId = GetCurrentThreadId();
if ( pSalData->mnAppThreadId != nCurThreadId )
{
if ( pSalData->mpFirstInstance )
@@ -404,7 +404,7 @@ printf("DeInitSalMain\n");
SalInstance* CreateSalInstance()
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
// determine the os2 version
ULONG nMayor;
@@ -449,12 +449,12 @@ SalInstance* CreateSalInstance()
Os2SalInstance* pInst = new Os2SalInstance;
// init instance (only one instance in this version !!!)
- pSalData->mpFirstInstance = pInst;
- pInst->mhAB = pSalData->mhAB;
- pInst->mhMQ = pSalData->mhMQ;
- pInst->mnArgc = pSalData->mnArgc;
- pInst->mpArgv = pSalData->mpArgv;
- pInst->mhComWnd = hComWnd;
+ pSalData->mpFirstInstance = pInst;
+ pInst->mhAB = pSalData->mhAB;
+ pInst->mhMQ = pSalData->mhMQ;
+ pInst->mnArgc = pSalData->mnArgc;
+ pInst->mpArgv = pSalData->mpArgv;
+ pInst->mhComWnd = hComWnd;
// AppIcon ermitteln
ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, pInst->mhAppIcon);
@@ -471,7 +471,7 @@ void DestroySalInstance( SalInstance* pInst )
{
SalData* pSalData = GetSalData();
- // (only one instance in this version !!!)
+ // (only one instance in this version !!!)
ImplFreeSalGDI();
#ifdef ENABLE_IME
@@ -491,9 +491,9 @@ void DestroySalInstance( SalInstance* pInst )
Os2SalInstance::Os2SalInstance()
{
- mhComWnd = 0;
- mpSalYieldMutex = new SalYieldMutex( this );
- mpSalWaitMutex = new osl::Mutex;
+ mhComWnd = 0;
+ mpSalYieldMutex = new SalYieldMutex( this );
+ mpSalWaitMutex = new osl::Mutex;
mnYieldWaitCount = 0;
mpSalYieldMutex->acquire();
::tools::SolarMutex::SetSolarMutex( mpSalYieldMutex );
@@ -534,7 +534,7 @@ void Os2SalInstance::AcquireYieldMutex( ULONG nCount )
static void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents )
{
- QMSG aMsg;
+ QMSG aMsg;
bool bWasMsg = false, bOneEvent = false;
bool bQuit = false;
@@ -579,11 +579,11 @@ static void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents )
void Os2SalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
- SalYieldMutex* pYieldMutex = mpSalYieldMutex;
- SalData* pSalData = GetSalData();
- ULONG nCurThreadId = GetCurrentThreadId();
- ULONG nCount = pYieldMutex->GetAcquireCount( nCurThreadId );
- ULONG n = nCount;
+ SalYieldMutex* pYieldMutex = mpSalYieldMutex;
+ SalData* pSalData = GetSalData();
+ ULONG nCurThreadId = GetCurrentThreadId();
+ ULONG nCount = pYieldMutex->GetAcquireCount( nCurThreadId );
+ ULONG n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -697,7 +697,7 @@ MRESULT EXPENTRY SalComWndProc( HWND hWnd, ULONG nMsg,
bool Os2SalInstance::AnyInput( USHORT nType )
{
SalData* pSalData = GetSalData();
- QMSG aQMSG;
+ QMSG aQMSG;
if ( (nType & (INPUT_ANY)) == INPUT_ANY )
{
@@ -803,8 +803,8 @@ void Os2SalInstance::DestroyObject( SalObject* pObject )
void* Os2SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
{
- rReturnedBytes = 1;
- rReturnedType = AsciiCString;
+ rReturnedBytes = 1;
+ rReturnedType = AsciiCString;
return (void*) "";
}
diff --git a/vcl/os2/source/app/sallang.cxx b/vcl/os2/source/app/sallang.cxx
index b93787013bbb..1701343a634d 100644
--- a/vcl/os2/source/app/sallang.cxx
+++ b/vcl/os2/source/app/sallang.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/os2/source/app/salshl.cxx b/vcl/os2/source/app/salshl.cxx
index de9e64e3a1fb..917f81b37595 100644
--- a/vcl/os2/source/app/salshl.cxx
+++ b/vcl/os2/source/app/salshl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ static HMODULE mhMod = ImplGetModule();
// =======================================================================
-APIRET APIENTRY DosQueryModFromEIP (HMODULE *phMod, ULONG *pObjNum,
- ULONG BuffLen, PCHAR pBuff, ULONG *pOffset, ULONG Address);
+APIRET APIENTRY DosQueryModFromEIP (HMODULE *phMod, ULONG *pObjNum,
+ ULONG BuffLen, PCHAR pBuff, ULONG *pOffset, ULONG Address);
HMODULE ImplGetModule(void)
{
- HMODULE hMod;
- ULONG ObjNum;
- CHAR Buff[2*_MAX_PATH];
- ULONG Offset;
- APIRET rc;
+ HMODULE hMod;
+ ULONG ObjNum;
+ CHAR Buff[2*_MAX_PATH];
+ ULONG Offset;
+ APIRET rc;
// get module handle (and name)
rc = DosQueryModFromEIP( &hMod, &ObjNum, sizeof( Buff), Buff, &Offset, (ULONG)ImplGetModule);
diff --git a/vcl/os2/source/app/saltimer.cxx b/vcl/os2/source/app/saltimer.cxx
index a27458edd793..c46e954dcfd8 100644
--- a/vcl/os2/source/app/saltimer.cxx
+++ b/vcl/os2/source/app/saltimer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +36,14 @@
// =======================================================================
// Maximale Periode
-#define MAX_SYSPERIOD 65533
-#define IDTIMER 10
+#define MAX_SYSPERIOD 65533
+#define IDTIMER 10
// =======================================================================
void ImplSalStartTimer( ULONG nMS, BOOL bMutex )
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
// Periode darf nicht zu gross sein, da OS2 2.11 mit USHORT arbeitet
// Remenber the time of the timer
@@ -91,7 +91,7 @@ void Os2SalTimer::Start( ULONG nMS )
void Os2SalTimer::Stop()
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
// Exitstiert ein Timer, dann diesen zerstoeren
if ( pSalData->mnTimerId ) {
diff --git a/vcl/os2/source/gdi/os2layout.cxx b/vcl/os2/source/gdi/os2layout.cxx
index 0d30679bf309..4724c9bb5185 100644
--- a/vcl/os2/source/gdi/os2layout.cxx
+++ b/vcl/os2/source/gdi/os2layout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
void SetKernData( int, const KERNINGPAIRS* );
int GetKerning( sal_Unicode, sal_Unicode ) const;
private:
- KERNINGPAIRS* mpKerningPairs;
+ KERNINGPAIRS* mpKerningPairs;
int mnKerningPairs;
#endif // GCP_KERN_HACK
@@ -111,8 +111,8 @@ public:
float GetFontScale() const { return mfFontScale; }
protected:
- HPS mhPS; // OS2 device handle
- FATTRS mhFont;
+ HPS mhPS; // OS2 device handle
+ FATTRS mhFont;
int mnBaseAdv; // x-offset relative to Layout origin
float mfFontScale; // allows metrics emulation of huge font sizes
@@ -334,7 +334,7 @@ bool Os2SalLayout::LayoutText( ImplLayoutArgs& rArgs )
nGcpOption |= GCP_USEKERNING;
#endif // GCP_KERN_HACK
- LONG lLcid = Ft2QueryCharSet( mhPS);
+ LONG lLcid = Ft2QueryCharSet( mhPS);
for( i = 0; i < mnGlyphCount; ++i )
mpOutGlyphs[i] = pBidiStr[ i ];
@@ -570,9 +570,9 @@ void Os2SalLayout::DrawText( SalGraphics& rGraphics ) const
if( mnGlyphCount <= 0 )
return;
- Point aPos = GetDrawPosition( Point( mnBaseAdv, 0 ) );
- POINTL aPt;
- APIRET rc;
+ Point aPos = GetDrawPosition( Point( mnBaseAdv, 0 ) );
+ POINTL aPt;
+ APIRET rc;
aPt.x = aPos.X();
aPt.y = static_cast<Os2SalGraphics&>(rGraphics).mnHeight - aPos.Y();
@@ -583,13 +583,13 @@ void Os2SalLayout::DrawText( SalGraphics& rGraphics ) const
// convert to codepage
ByteString str( mpOutGlyphs, gsl_getSystemTextEncoding() );
// gliph size is not recalculated, so it could be wrong!
- rc = Ft2CharStringPosAtA( static_cast<Os2SalGraphics&>(rGraphics).mhPS,
- &aPt, NULL, CHS_VECTOR, mnGlyphCount, (PSZ)str.GetBuffer(),
+ rc = Ft2CharStringPosAtA( static_cast<Os2SalGraphics&>(rGraphics).mhPS,
+ &aPt, NULL, CHS_VECTOR, mnGlyphCount, (PSZ)str.GetBuffer(),
(LONG*)mpGlyphAdvances, 0);
} else {
// try unicode rendering to screen
- rc = Ft2CharStringPosAtW( static_cast<Os2SalGraphics&>(rGraphics).mhPS,
- &aPt, NULL, CHS_VECTOR, mnGlyphCount, (LPWSTR)mpOutGlyphs,
+ rc = Ft2CharStringPosAtW( static_cast<Os2SalGraphics&>(rGraphics).mhPS,
+ &aPt, NULL, CHS_VECTOR, mnGlyphCount, (LPWSTR)mpOutGlyphs,
(LONG*)mpGlyphAdvances, 0);
if (rc == GPI_ERROR) {
// if *W fails, convert to codepage and use *A (fallback to GPI into ft2)
@@ -598,8 +598,8 @@ void Os2SalLayout::DrawText( SalGraphics& rGraphics ) const
debug_printf("Os2SalLayout::DrawText HPS %08x PosAtW failed '%s'!\n",static_cast<Os2SalGraphics&>(rGraphics).mhPS,str.GetBuffer());
#endif
// gliph size is not recalculated, so it could be wrong!
- rc = Ft2CharStringPosAtA( static_cast<Os2SalGraphics&>(rGraphics).mhPS,
- &aPt, NULL, CHS_VECTOR, mnGlyphCount, (PSZ)str.GetBuffer(),
+ rc = Ft2CharStringPosAtA( static_cast<Os2SalGraphics&>(rGraphics).mhPS,
+ &aPt, NULL, CHS_VECTOR, mnGlyphCount, (PSZ)str.GetBuffer(),
(LONG*)mpGlyphAdvances, 0);
}
}
diff --git a/vcl/os2/source/gdi/salbmp.cxx b/vcl/os2/source/gdi/salbmp.cxx
index c6ee24011212..414371847e17 100644
--- a/vcl/os2/source/gdi/salbmp.cxx
+++ b/vcl/os2/source/gdi/salbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -182,11 +182,11 @@ bool Os2SalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics )
if( rSalBmp.mhDIB )
{
- HPS hPS = pGraphics->mhPS;
- HBITMAP hNewDDB;
- BITMAPINFOHEADER2 aInfoHeader;
- const Size aSize( rSalBmp.GetSize() );
- long nFormat[ 2 ];
+ HPS hPS = pGraphics->mhPS;
+ HBITMAP hNewDDB;
+ BITMAPINFOHEADER2 aInfoHeader;
+ const Size aSize( rSalBmp.GetSize() );
+ long nFormat[ 2 ];
memset( &aInfoHeader, 0, sizeof( aInfoHeader ) );
aInfoHeader.cbFix = 16;
@@ -206,8 +206,8 @@ bool Os2SalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics )
// BitCount == 1 ist wegen aller moeglichen Treiberfehler nicht moeglich
if( rSalBmp.GetBitCount() == 1 )
{
- HANDLE hTmp = ImplCreateDIB4FromDIB1( rSalBmp.mhDIB );
- PBYTE pBits = (PBYTE) hTmp + *(ULONG*) hTmp + ImplGetDIBColorCount( hTmp ) * sizeof( RGB2 );
+ HANDLE hTmp = ImplCreateDIB4FromDIB1( rSalBmp.mhDIB );
+ PBYTE pBits = (PBYTE) hTmp + *(ULONG*) hTmp + ImplGetDIBColorCount( hTmp ) * sizeof( RGB2 );
hNewDDB = GpiCreateBitmap( hPS, &aInfoHeader, CBM_INIT, pBits, (PBITMAPINFO2) hTmp );
rtl_freeMemory( (void*)hTmp );
@@ -349,16 +349,16 @@ HANDLE Os2SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitma
if ( rSize.Width() && rSize.Height() && ( nBits == 1 || nBits == 4 || nBits == 8 || nBits == 24 ) )
{
- const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
- const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
+ const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
+ const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
hDIB = (HANDLE) rtl_allocateZeroMemory( sizeof( BITMAPINFOHEADER2 ) + nColors * sizeof( RGB2 ) + nImageSize );
if( hDIB )
{
// bitmap infos can be found at the beginning of the memory
- PBITMAPINFO2 pBI = (PBITMAPINFO2) hDIB;
- PBITMAPINFOHEADER2 pBIH = (PBITMAPINFOHEADER2) pBI;
+ PBITMAPINFO2 pBI = (PBITMAPINFO2) hDIB;
+ PBITMAPINFOHEADER2 pBIH = (PBITMAPINFOHEADER2) pBI;
pBIH->cbFix = sizeof( BITMAPINFOHEADER2 );
pBIH->cx = rSize.Width();
diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx
index 35930904d1c8..c5fc42c6efa3 100644
--- a/vcl/os2/source/gdi/salgdi.cxx
+++ b/vcl/os2/source/gdi/salgdi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// -----------
// ClipRegions funktionieren immer noch nicht auf allen getesteten Druckern
-#define SAL_PRINTER_CLIPPATH 1
+#define SAL_PRINTER_CLIPPATH 1
// #define SAL_PRINTER_POLYPATH 1
// =======================================================================
@@ -61,7 +61,7 @@ void ImplInitSalGDI()
void ImplFreeSalGDI()
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
// delete icon cache
SalIcon* pIcon = pSalData->mpFirstIcon;
@@ -101,19 +101,19 @@ Os2SalGraphics::Os2SalGraphics()
mfFontScale = 1.0;
- mhPS = 0;
- mhDC = 0;
- mbLine = FALSE;
- mbFill = FALSE;
- mbXORMode = FALSE;
- mnFontMetricCount = 0;
- mpFontMetrics = NULL;
- mpClipRectlAry = NULL;
+ mhPS = 0;
+ mhDC = 0;
+ mbLine = FALSE;
+ mbFill = FALSE;
+ mbXORMode = FALSE;
+ mnFontMetricCount = 0;
+ mpFontMetrics = NULL;
+ mpClipRectlAry = NULL;
- mhDefFont = 0;
- mpFontKernPairs = NULL;
- mnFontKernPairCount = 0;
- mbFontKernInit = FALSE;
+ mhDefFont = 0;
+ mpFontKernPairs = NULL;
+ mnFontKernPairCount = 0;
+ mbFontKernInit = FALSE;
}
@@ -218,7 +218,7 @@ void Os2SalGraphics::ResetClipRegion()
void Os2SalGraphics::BeginSetClipRegion( ULONG nCount )
{
- mpClipRectlAry = new RECTL[ nCount ];
+ mpClipRectlAry = new RECTL[ nCount ];
mnClipElementCount = 0;
}
@@ -493,11 +493,11 @@ void Os2SalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
void Os2SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
{
// convert all points to sys orientation
- POINTL* pOS2PtAry = new POINTL[ nPoints ];
- POINTL* pTempOS2PtAry = pOS2PtAry;
- const SalPoint* pTempPtAry = pPtAry;
- ULONG nTempPoints = nPoints;
- long nHeight = mnHeight - 1;
+ POINTL* pOS2PtAry = new POINTL[ nPoints ];
+ POINTL* pTempOS2PtAry = pOS2PtAry;
+ const SalPoint* pTempPtAry = pPtAry;
+ ULONG nTempPoints = nPoints;
+ long nHeight = mnHeight - 1;
while( nTempPoints-- )
{
@@ -523,10 +523,10 @@ void Os2SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
aPolygon.ulPoints = nPoints;
// convert all points to sys orientation
- POINTL* pTempOS2PtAry = aPolygon.aPointl;
- const SalPoint* pTempPtAry = pPtAry;
- ULONG nTempPoints = nPoints;
- long nHeight = mnHeight - 1;
+ POINTL* pTempOS2PtAry = aPolygon.aPointl;
+ const SalPoint* pTempPtAry = pPtAry;
+ ULONG nTempPoints = nPoints;
+ long nHeight = mnHeight - 1;
while( nTempPoints-- )
{
@@ -585,9 +585,9 @@ void Os2SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
void Os2SalGraphics::drawPolyPolygon( ULONG nPoly, const ULONG* pPoints,
PCONSTSALPOINT* pPtAry )
{
- ULONG i;
- long nHeight = mnHeight - 1;
- PM_POLYGON* aPolygonAry = new PM_POLYGON[ nPoly ];
+ ULONG i;
+ long nHeight = mnHeight - 1;
+ PM_POLYGON* aPolygonAry = new PM_POLYGON[ nPoly ];
for( i = 0; i < nPoly; i++ )
{
@@ -670,7 +670,7 @@ bool Os2SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /
bool Os2SalGraphics::drawPolyLine(
const basegfx::B2DPolygon& /*rPolygon*/,
double /*fTransparency*/,
- const basegfx::B2DVector& /*rLineWidths*/,
+ const basegfx::B2DVector& /*rLineWidths*/,
basegfx::B2DLineJoin /*eLineJoin*/)
{
// TODO: implement
@@ -702,15 +702,15 @@ sal_Bool Os2SalGraphics::drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoint
// =======================================================================
// MAXIMUM BUFSIZE EQ 0xFFFF
-#define POSTSCRIPT_BUFSIZE 0x4000
+#define POSTSCRIPT_BUFSIZE 0x4000
// we only try to get the BoundingBox in the first 4096 bytes
-#define POSTSCRIPT_BOUNDINGSEARCH 0x1000
+#define POSTSCRIPT_BOUNDINGSEARCH 0x1000
static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ ULONG i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -726,7 +726,7 @@ static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSi
static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
{
- BOOL bRetValue = FALSE;
+ BOOL bRetValue = FALSE;
BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nSize, 14 );
if ( pDest )
{
@@ -735,15 +735,15 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
int nSizeLeft = nSize - ( pDest - pSource );
if ( nSizeLeft > 100 )
- nSizeLeft = 100; // only 100 bytes following the bounding box will be checked
+ nSizeLeft = 100; // only 100 bytes following the bounding box will be checked
int i;
for ( i = 0; ( i < 4 ) && nSizeLeft; i++ )
{
- int nDivision = 1;
- BOOL bDivision = FALSE;
- BOOL bNegative = FALSE;
- BOOL bValid = TRUE;
+ int nDivision = 1;
+ BOOL bDivision = FALSE;
+ BOOL bNegative = FALSE;
+ BOOL bValid = TRUE;
while ( ( --nSizeLeft ) && ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) pDest++;
BYTE nByte = *pDest;
@@ -762,7 +762,7 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
break;
default :
if ( ( nByte < '0' ) || ( nByte > '9' ) )
- nSizeLeft = 1; // error parsing the bounding box values
+ nSizeLeft = 1; // error parsing the bounding box values
else if ( bValid )
{
if ( bDivision )
@@ -797,18 +797,18 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
if ( !mbPrinter )
return FALSE;
- BOOL bRet = FALSE;
- LONG nLong = 0;
+ BOOL bRet = FALSE;
+ LONG nLong = 0;
if ( !(DevQueryCaps( mhDC, CAPS_TECHNOLOGY, 1, &nLong ) &&
(CAPS_TECH_POSTSCRIPT == nLong)) )
return FALSE;
- BYTE* pBuf = new BYTE[ POSTSCRIPT_BUFSIZE ];
- double nBoundingBox[4];
+ BYTE* pBuf = new BYTE[ POSTSCRIPT_BUFSIZE ];
+ double nBoundingBox[4];
if ( pBuf && ImplGetBoundingBox( nBoundingBox, (BYTE*)pPtr, nSize ) )
{
- LONG pOS2DXAry[4]; // hack -> print always 2 white space
+ LONG pOS2DXAry[4]; // hack -> print always 2 white space
POINTL aPt;
aPt.x = 0;
aPt.y = 0;
@@ -818,7 +818,7 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
Ft2CharStringPosAt( mhPS, &aPt, NULL, 0, 2, (PCH)pStr,(PLONG)&pOS2DXAry[0] );
OStringBuffer aBuf( POSTSCRIPT_BUFSIZE );
-
+
// reserve place for a USHORT
aBuf.append( "aa" );
@@ -858,7 +858,7 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
//Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 );
DevEscape( mhDC, DEVESC_RAWDATA, aBuf.getLength(),
(PBYTE)aBuf.getStr(), 0, NULL );
-
+
double dM11 = nWidth / ( nBoundingBox[2] - nBoundingBox[0] );
double dM22 = - ( nHeight / (nBoundingBox[1] - nBoundingBox[3] ) );
@@ -899,7 +899,7 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
if ( DevEscape( mhDC, DEVESC_RAWDATA, 9, (PBYTE)pBuf,
0, NULL ) == DEV_OK ) bRet = TRUE;
}
-
+
// #107797# Write out EPS encapsulation footer
// ----------------------------------------------------------------------------------
// reserve a USHORT again
@@ -912,7 +912,7 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
DevEscape( mhDC, DEVESC_RAWDATA, aBuf.getLength(),
(PBYTE)aBuf.getStr(), 0, NULL );
bRet = TRUE;
-
+
}
}
delete [] pBuf;
diff --git a/vcl/os2/source/gdi/salgdi2.cxx b/vcl/os2/source/gdi/salgdi2.cxx
index 2ab59b8a3c46..6dd54a15e384 100644
--- a/vcl/os2/source/gdi/salgdi2.cxx
+++ b/vcl/os2/source/gdi/salgdi2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ BOOL bFastTransparent = FALSE;
// -----------
#define RGBCOLOR( r, g, b ) ((ULONG)(((BYTE)(b)|((USHORT)(g)<<8))|(((ULONG)(BYTE)(r))<<16)))
-#define TY( y ) (mnHeight-(y)-1)
+#define TY( y ) (mnHeight-(y)-1)
// ---------------
// - SalGraphics -
@@ -63,9 +63,9 @@ bool Os2SalGraphics::supportsOperation( OutDevSupportType ) const
void Os2SalGraphics::copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics )
{
- HPS hSrcPS;
- POINTL thePoints[4];
- long nSrcHeight;
+ HPS hSrcPS;
+ POINTL thePoints[4];
+ long nSrcHeight;
if ( pSrcGraphics )
{
@@ -132,39 +132,39 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
if ( (nFlags & SAL_COPYAREA_WINDOWINVALIDATE) && mbWindow )
{
// Overlap-Bereich berechnen und invalidieren
- Point aVCLSrcPos( nSrcX, nSrcY );
- Size aVCLSrcSize( nSrcWidth, nSrcHeight );
- Rectangle aVCLSrcRect( aVCLSrcPos, aVCLSrcSize );
- Rectangle aVCLClipRect;
- SWP aSWP;
+ Point aVCLSrcPos( nSrcX, nSrcY );
+ Size aVCLSrcSize( nSrcWidth, nSrcHeight );
+ Rectangle aVCLSrcRect( aVCLSrcPos, aVCLSrcSize );
+ Rectangle aVCLClipRect;
+ SWP aSWP;
WinQueryWindowPos( mhWnd, &aSWP );
- aVCLClipRect.Right() = aSWP.cx-1;
- aVCLClipRect.Bottom() = aSWP.cy-1;
+ aVCLClipRect.Right() = aSWP.cx-1;
+ aVCLClipRect.Bottom() = aSWP.cy-1;
if ( !aVCLSrcRect.Intersection( aVCLClipRect ).IsEmpty() )
{
- RECTL aSrcRect;
- RECTL aTempRect;
- HRGN hInvalidateRgn;
- HRGN hTempRgn;
- HWND hWnd;
- long nRgnType;
-
- long nVCLScrHeight = aVCLSrcRect.GetHeight();
- aSrcRect.xLeft = aVCLSrcRect.Left();
- aSrcRect.yBottom = TY( aVCLSrcRect.Top()+nVCLScrHeight-1 );
- aSrcRect.xRight = aSrcRect.xLeft+aVCLSrcRect.GetWidth();
- aSrcRect.yTop = aSrcRect.yBottom+nVCLScrHeight;
+ RECTL aSrcRect;
+ RECTL aTempRect;
+ HRGN hInvalidateRgn;
+ HRGN hTempRgn;
+ HWND hWnd;
+ long nRgnType;
+
+ long nVCLScrHeight = aVCLSrcRect.GetHeight();
+ aSrcRect.xLeft = aVCLSrcRect.Left();
+ aSrcRect.yBottom = TY( aVCLSrcRect.Top()+nVCLScrHeight-1 );
+ aSrcRect.xRight = aSrcRect.xLeft+aVCLSrcRect.GetWidth();
+ aSrcRect.yTop = aSrcRect.yBottom+nVCLScrHeight;
// Rechteck in Screen-Koordinaaten umrechnen
- POINTL aPt;
- long nScreenDX = WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN );
- long nScreenDY = WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN );
+ POINTL aPt;
+ long nScreenDX = WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN );
+ long nScreenDY = WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN );
aPt.x = 0;
aPt.y = 0;
WinMapWindowPoints( mhWnd, HWND_DESKTOP, &aPt, 1 );
- aSrcRect.xLeft += aPt.x;
- aSrcRect.yTop += aPt.y;
+ aSrcRect.xLeft += aPt.x;
+ aSrcRect.yTop += aPt.y;
aSrcRect.xRight += aPt.x;
aSrcRect.yBottom += aPt.y;
hInvalidateRgn = 0;
@@ -173,10 +173,10 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
{
if ( !hInvalidateRgn )
hInvalidateRgn = GpiCreateRegion( mhPS, 1, &aSrcRect );
- aTempRect.xLeft = -31999;
- aTempRect.yBottom = 0;
- aTempRect.xRight = 0;
- aTempRect.yTop = 31999;
+ aTempRect.xLeft = -31999;
+ aTempRect.yBottom = 0;
+ aTempRect.xRight = 0;
+ aTempRect.yTop = 31999;
hTempRgn = GpiCreateRegion( mhPS, 1, &aTempRect );
GpiCombineRegion( mhPS, hInvalidateRgn, hInvalidateRgn, hTempRgn, CRGN_DIFF );
GpiDestroyRegion( mhPS, hTempRgn );
@@ -185,10 +185,10 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
{
if ( !hInvalidateRgn )
hInvalidateRgn = GpiCreateRegion( mhPS, 1, &aSrcRect );
- aTempRect.xLeft = 0;
- aTempRect.yBottom = -31999;
- aTempRect.xRight = 31999;
- aTempRect.yTop = 0;
+ aTempRect.xLeft = 0;
+ aTempRect.yBottom = -31999;
+ aTempRect.xRight = 31999;
+ aTempRect.yTop = 0;
hTempRgn = GpiCreateRegion( mhPS, 1, &aTempRect );
GpiCombineRegion( mhPS, hInvalidateRgn, hInvalidateRgn, hTempRgn, CRGN_DIFF );
GpiDestroyRegion( mhPS, hTempRgn );
@@ -197,10 +197,10 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
{
if ( !hInvalidateRgn )
hInvalidateRgn = GpiCreateRegion( mhPS, 1, &aSrcRect );
- aTempRect.xLeft = nScreenDX;
- aTempRect.yBottom = 0;
- aTempRect.xRight = 31999;
- aTempRect.yTop = 31999;
+ aTempRect.xLeft = nScreenDX;
+ aTempRect.yBottom = 0;
+ aTempRect.xRight = 31999;
+ aTempRect.yTop = 31999;
hTempRgn = GpiCreateRegion( mhPS, 1, &aTempRect );
GpiCombineRegion( mhPS, hInvalidateRgn, hInvalidateRgn, hTempRgn, CRGN_DIFF );
GpiDestroyRegion( mhPS, hTempRgn );
@@ -209,10 +209,10 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
{
if ( !hInvalidateRgn )
hInvalidateRgn = GpiCreateRegion( mhPS, 1, &aSrcRect );
- aTempRect.xLeft = 0;
- aTempRect.yBottom = nScreenDY;
- aTempRect.xRight = 31999;
- aTempRect.yTop = 31999;
+ aTempRect.xLeft = 0;
+ aTempRect.yBottom = nScreenDY;
+ aTempRect.xRight = 31999;
+ aTempRect.yTop = 31999;
hTempRgn = GpiCreateRegion( mhPS, 1, &aTempRect );
GpiCombineRegion( mhPS, hInvalidateRgn, hInvalidateRgn, hTempRgn, CRGN_DIFF );
GpiDestroyRegion( mhPS, hTempRgn );
@@ -237,10 +237,10 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
{
if ( !hInvalidateRgn )
hInvalidateRgn = GpiCreateRegion( mhPS, 1, &aSrcRect );
- aTempRect.xLeft = aSWP.x;
- aTempRect.yBottom = aSWP.y;
- aTempRect.xRight = aTempRect.xLeft+aSWP.cx;
- aTempRect.yTop = aTempRect.yBottom+aSWP.cy;
+ aTempRect.xLeft = aSWP.x;
+ aTempRect.yBottom = aSWP.y;
+ aTempRect.xRight = aTempRect.xLeft+aSWP.cx;
+ aTempRect.yTop = aTempRect.yBottom+aSWP.cy;
hTempRgn = GpiCreateRegion( mhPS, 1, &aTempRect );
GpiCombineRegion( mhPS, hInvalidateRgn, hInvalidateRgn, hTempRgn, CRGN_DIFF );
GpiDestroyRegion( mhPS, hTempRgn );
@@ -267,8 +267,8 @@ void Os2SalGraphics::copyArea( long nDestX, long nDestY,
// MainThread ist, damit es beim Bearbeiten der
// Paint-Message keinen Deadlock gibt, da der
// SolarMutex durch diesen Thread schon gelockt ist
- SalData* pSalData = GetSalData();
- ULONG nCurThreadId = GetCurrentThreadId();
+ SalData* pSalData = GetSalData();
+ ULONG nCurThreadId = GetCurrentThreadId();
if ( pSalData->mnAppThreadId == nCurThreadId )
WinUpdateWindow( mhWnd );
}
@@ -290,11 +290,11 @@ void ImplDrawBitmap( HPS hPS, long nScreenHeight,
{
if( hPS )
{
- HANDLE hDrawDIB;
- HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB();
- Os2SalBitmap* pTmpSalBmp = NULL;
- BOOL bPrintDDB = ( bPrinter && hDrawDDB );
- BOOL bDrawDDB1 = ( ( rSalBitmap.GetBitCount() == 1 ) && hDrawDDB );
+ HANDLE hDrawDIB;
+ HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB();
+ Os2SalBitmap* pTmpSalBmp = NULL;
+ BOOL bPrintDDB = ( bPrinter && hDrawDDB );
+ BOOL bDrawDDB1 = ( ( rSalBitmap.GetBitCount() == 1 ) && hDrawDDB );
if( bPrintDDB || bDrawDDB1 )
{
@@ -307,13 +307,13 @@ void ImplDrawBitmap( HPS hPS, long nScreenHeight,
if( hDrawDIB )
{
- HANDLE hSubst = rSalBitmap.ImplGethDIB1Subst();
- POINTL pts[ 4 ];
- BITMAPINFO2* pBI = (BITMAPINFO2*) hDrawDIB;
- BITMAPINFOHEADER2* pBIH = (BITMAPINFOHEADER2*) pBI;
- const long nHeight = pBIH->cy;
- long nInfoSize = *(ULONG*) pBI + rSalBitmap.ImplGetDIBColorCount( hDrawDIB ) * sizeof( RGB2 );
- BYTE* pBits = (BYTE*) pBI + nInfoSize;
+ HANDLE hSubst = rSalBitmap.ImplGethDIB1Subst();
+ POINTL pts[ 4 ];
+ BITMAPINFO2* pBI = (BITMAPINFO2*) hDrawDIB;
+ BITMAPINFOHEADER2* pBIH = (BITMAPINFOHEADER2*) pBI;
+ const long nHeight = pBIH->cy;
+ long nInfoSize = *(ULONG*) pBI + rSalBitmap.ImplGetDIBColorCount( hDrawDIB ) * sizeof( RGB2 );
+ BYTE* pBits = (BYTE*) pBI + nInfoSize;
pts[0].x = pPosAry->mnDestX;
pts[0].y = nScreenHeight - pPosAry->mnDestY - pPosAry->mnDestHeight;
@@ -352,12 +352,12 @@ void ImplDrawBitmap( HPS hPS, long nScreenHeight,
// have problems to print these DIB's (strange)
if( pBIH->cBitCount == 8 && pBIH->ulCompression == BCA_UNCOMP )
{
- const long nWidth = pBIH->cx;
- const long nHeight = pBIH->cy;
- const long nWidthAl8 = AlignedWidth4Bytes( nWidth * 8 );
- const long nWidthAl24 = AlignedWidth4Bytes( nWidth * 24 );
- const long nNewImageSize = nHeight * nWidthAl24;
- BITMAPINFOHEADER2* pNewInfo;
+ const long nWidth = pBIH->cx;
+ const long nHeight = pBIH->cy;
+ const long nWidthAl8 = AlignedWidth4Bytes( nWidth * 8 );
+ const long nWidthAl24 = AlignedWidth4Bytes( nWidth * 24 );
+ const long nNewImageSize = nHeight * nWidthAl24;
+ BITMAPINFOHEADER2* pNewInfo;
pDummy = new BYTE[ sizeof( BITMAPINFO2 ) + nNewImageSize ];
memset( pDummy, 0, sizeof( BITMAPINFO2 ) );
@@ -466,7 +466,7 @@ void Os2SalGraphics::drawBitmap( const SalTwoRect* pPosAry,
const Os2SalBitmap& rSalBitmap = static_cast<const Os2SalBitmap&>(rSSalBitmap);
const Os2SalBitmap& rTransparentBitmap = static_cast<const Os2SalBitmap&>(rSTransparentBitmap);
-
+
if( bFastTransparent )
{
ImplDrawBitmap( mhPS, mnHeight, pPosAry, rTransparentBitmap, FALSE, ROP_SRCAND );
@@ -474,25 +474,25 @@ void Os2SalGraphics::drawBitmap( const SalTwoRect* pPosAry,
}
else
{
- SalTwoRect aPosAry = *pPosAry;
- int nDstX = (int) aPosAry.mnDestX;
- int nDstY = (int) aPosAry.mnDestY;
- int nDstWidth = (int) aPosAry.mnDestWidth;
- int nDstHeight = (int) aPosAry.mnDestHeight;
- HAB hAB = GetSalData()->mhAB;
- HPS hPS = mhPS;
- DEVOPENSTRUC aDevOpenStruc = { NULL, (PSZ)"DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL };
- SIZEL aSizeL = { nDstWidth, nDstHeight };
- POINTL aPtL[ 3 ];
-
- HDC hMemDC = DevOpenDC( hAB, OD_MEMORY, (PSZ)"*", 5L, (PDEVOPENDATA)&aDevOpenStruc, 0 );
- HPS hMemPS = Ft2CreatePS( hAB, hMemDC, &aSizeL, GPIT_MICRO | GPIA_ASSOC | PU_PELS );
- HBITMAP hMemBitmap = ImplCreateVirDevBitmap( hMemDC, hMemPS, nDstWidth, nDstHeight, 0 );
- HBITMAP hMemOld = (HBITMAP) Ft2SetBitmap( hMemPS, hMemBitmap );
- HDC hMaskDC = DevOpenDC( hAB, OD_MEMORY, (PSZ)"*", 5L, (PDEVOPENDATA)&aDevOpenStruc, 0 );
- HPS hMaskPS = Ft2CreatePS( hAB, hMaskDC, &aSizeL, GPIT_MICRO | GPIA_ASSOC | PU_PELS );
- HBITMAP hMaskBitmap = ImplCreateVirDevBitmap( hMaskDC, hMaskPS, nDstWidth, nDstHeight, 0 );
- HBITMAP hMaskOld = (HBITMAP) Ft2SetBitmap( hMaskPS, hMaskBitmap );
+ SalTwoRect aPosAry = *pPosAry;
+ int nDstX = (int) aPosAry.mnDestX;
+ int nDstY = (int) aPosAry.mnDestY;
+ int nDstWidth = (int) aPosAry.mnDestWidth;
+ int nDstHeight = (int) aPosAry.mnDestHeight;
+ HAB hAB = GetSalData()->mhAB;
+ HPS hPS = mhPS;
+ DEVOPENSTRUC aDevOpenStruc = { NULL, (PSZ)"DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+ SIZEL aSizeL = { nDstWidth, nDstHeight };
+ POINTL aPtL[ 3 ];
+
+ HDC hMemDC = DevOpenDC( hAB, OD_MEMORY, (PSZ)"*", 5L, (PDEVOPENDATA)&aDevOpenStruc, 0 );
+ HPS hMemPS = Ft2CreatePS( hAB, hMemDC, &aSizeL, GPIT_MICRO | GPIA_ASSOC | PU_PELS );
+ HBITMAP hMemBitmap = ImplCreateVirDevBitmap( hMemDC, hMemPS, nDstWidth, nDstHeight, 0 );
+ HBITMAP hMemOld = (HBITMAP) Ft2SetBitmap( hMemPS, hMemBitmap );
+ HDC hMaskDC = DevOpenDC( hAB, OD_MEMORY, (PSZ)"*", 5L, (PDEVOPENDATA)&aDevOpenStruc, 0 );
+ HPS hMaskPS = Ft2CreatePS( hAB, hMaskDC, &aSizeL, GPIT_MICRO | GPIA_ASSOC | PU_PELS );
+ HBITMAP hMaskBitmap = ImplCreateVirDevBitmap( hMaskDC, hMaskPS, nDstWidth, nDstHeight, 0 );
+ HBITMAP hMaskOld = (HBITMAP) Ft2SetBitmap( hMaskPS, hMaskBitmap );
/*
HPS hMemPS = ImplGetCachedPS( CACHED_HPS_1, 0 );
HPS hMaskPS = ImplGetCachedPS( CACHED_HPS_2, 0 );
@@ -543,7 +543,7 @@ void Os2SalGraphics::drawBitmap( const SalTwoRect* pPosAry,
// -----------------------------------------------------------------------
bool Os2SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
- const SalBitmap& rSrcBitmap,
+ const SalBitmap& rSrcBitmap,
const SalBitmap& rAlphaBmp )
{
// TODO(P3) implement alpha blending
@@ -552,7 +552,7 @@ bool Os2SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// -----------------------------------------------------------------------
-bool Os2SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
+bool Os2SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
long nHeight, sal_uInt8 nTransparency )
{
// TODO(P3) implement alpha blending
@@ -566,13 +566,13 @@ void Os2SalGraphics::drawMask( const SalTwoRect* pPosAry,
SalColor nMaskColor )
{
DBG_ASSERT( !mbPrinter, "No transparency print possible!" );
-
+
const Os2SalBitmap& rSalBitmap = static_cast<const Os2SalBitmap&>(rSSalBitmap);
- SalTwoRect aPosAry = *pPosAry;
- HPS hPS = mhPS;
+ SalTwoRect aPosAry = *pPosAry;
+ HPS hPS = mhPS;
IMAGEBUNDLE aBundle, aOldBundle;
- AREABUNDLE aAreaBundle, aOldAreaBundle;
+ AREABUNDLE aAreaBundle, aOldAreaBundle;
const ULONG nColor = RGBCOLOR( SALCOLOR_RED( nMaskColor ),
SALCOLOR_GREEN( nMaskColor ),
SALCOLOR_BLUE( nMaskColor ) );
@@ -603,16 +603,16 @@ void Os2SalGraphics::drawMask( const SalTwoRect* pPosAry,
SalBitmap* Os2SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
{
- HAB hAB = GetSalData()->mhAB;
- SIZEL size = { nDX, nDY };
- Os2SalBitmap* pSalBitmap = NULL;
+ HAB hAB = GetSalData()->mhAB;
+ SIZEL size = { nDX, nDY };
+ Os2SalBitmap* pSalBitmap = NULL;
// create device context (at this time allways display compatible)
- DEVOPENSTRUC aDevOpenStruc = { NULL, (PSZ)"DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL };
- HDC hMemDC = DevOpenDC( hAB, OD_MEMORY, (PSZ)"*", 5L, (PDEVOPENDATA)&aDevOpenStruc, 0 );
- HPS hMemPS = Ft2CreatePS( hAB, hMemDC, &size, GPIT_MICRO | GPIA_ASSOC | PU_PELS );
- HBITMAP hMemBmp = ImplCreateVirDevBitmap( hMemDC, hMemPS, nDX, nDY, 0 );
- HBITMAP hMemOld = Ft2SetBitmap( hMemPS, hMemBmp );
+ DEVOPENSTRUC aDevOpenStruc = { NULL, (PSZ)"DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+ HDC hMemDC = DevOpenDC( hAB, OD_MEMORY, (PSZ)"*", 5L, (PDEVOPENDATA)&aDevOpenStruc, 0 );
+ HPS hMemPS = Ft2CreatePS( hAB, hMemDC, &size, GPIT_MICRO | GPIA_ASSOC | PU_PELS );
+ HBITMAP hMemBmp = ImplCreateVirDevBitmap( hMemDC, hMemPS, nDX, nDY, 0 );
+ HBITMAP hMemOld = Ft2SetBitmap( hMemPS, hMemBmp );
// creation successfull?
if( hMemDC && hMemPS && hMemBmp )
@@ -666,8 +666,8 @@ SalBitmap* Os2SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
SalColor Os2SalGraphics::getPixel( long nX, long nY )
{
- POINTL aPt = { nX, TY( nY ) };
- LONG nColor = Ft2QueryPel( mhPS, &aPt );
+ POINTL aPt = { nX, TY( nY ) };
+ LONG nColor = Ft2QueryPel( mhPS, &aPt );
return MAKE_SALCOLOR( (BYTE) ( nColor >> 16 ), (BYTE) ( nColor >> 8 ), (BYTE) nColor );
}
diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx
index b403bf5128da..751abc4eadad 100644
--- a/vcl/os2/source/gdi/salgdi3.cxx
+++ b/vcl/os2/source/gdi/salgdi3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,7 +96,7 @@ inline int IntTimes256FromFixed(W32FIXED f)
// -----------
// this is a special codepage code, used to identify OS/2 symbol font.
-#define SYMBOL_CHARSET 65400
+#define SYMBOL_CHARSET 65400
// =======================================================================
@@ -337,7 +337,7 @@ static ImplDevFontAttributes Os2Font2DevFontAttributes( const PFONTMETRICS pFont
|| aDFA.maName.EqualsAscii( "ZapfChancery" )
|| aDFA.maName.EqualsAscii( "ZapfDingbats" ) )
aDFA.mnQuality += 500;
- }
+ }
aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
aDFA.meAntiAlias = ANTIALIAS_DONTKNOW;
@@ -355,7 +355,7 @@ static ImplDevFontAttributes Os2Font2DevFontAttributes( const PFONTMETRICS pFont
ImplOs2FontData::ImplOs2FontData( PFONTMETRICS _pFontMetric,
int nHeight, BYTE nPitchAndFamily )
-: ImplFontData( Os2Font2DevFontAttributes(_pFontMetric), 0 ),
+: ImplFontData( Os2Font2DevFontAttributes(_pFontMetric), 0 ),
pFontMetric( _pFontMetric ),
meOs2CharSet( _pFontMetric->usCodePage),
mnPitchAndFamily( nPitchAndFamily ),
@@ -401,8 +401,8 @@ void ImplOs2FontData::UpdateFromHPS( HPS hPS ) const
// even if the font works some fonts have problems with the glyph API
// => the heuristic below tries to figure out which fonts have the problem
- DWORD fontType = Ft2QueryFontType( 0, pFontMetric->szFacename);
- if( fontType != FT2_FONTTYPE_TRUETYPE
+ DWORD fontType = Ft2QueryFontType( 0, pFontMetric->szFacename);
+ if( fontType != FT2_FONTTYPE_TRUETYPE
&& (pFontMetric->fsDefn & FM_DEFN_GENERIC) == 0)
mbDisableGlyphApi = true;
}
@@ -592,16 +592,16 @@ USHORT Os2SalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFon
#endif
ImplOs2FontData* pFontData = (ImplOs2FontData*)i_pFont->mpFontData;
- PFONTMETRICS pFontMetric = NULL;
- FATTRS aFAttrs;
- BOOL bOutline = FALSE;
- APIRET rc;
+ PFONTMETRICS pFontMetric = NULL;
+ FATTRS aFAttrs;
+ BOOL bOutline = FALSE;
+ APIRET rc;
memset( &aFAttrs, 0, sizeof( FATTRS ) );
aFAttrs.usRecordLength = sizeof( FATTRS );
aFAttrs.lMaxBaselineExt = i_pFont->mnHeight;
- aFAttrs.lAveCharWidth = i_pFont->mnWidth;
+ aFAttrs.lAveCharWidth = i_pFont->mnWidth;
// do we have a pointer to the FONTMETRICS of the selected font? -> use it!
if ( pFontData )
@@ -611,9 +611,9 @@ USHORT Os2SalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFon
bOutline = (pFontMetric->fsDefn & FM_DEFN_OUTLINE) != 0;
// use match&registry fields to get correct match
- aFAttrs.lMatch = pFontMetric->lMatch;
- aFAttrs.idRegistry = pFontMetric->idRegistry;
- aFAttrs.usCodePage = pFontMetric->usCodePage;
+ aFAttrs.lMatch = pFontMetric->lMatch;
+ aFAttrs.idRegistry = pFontMetric->idRegistry;
+ aFAttrs.usCodePage = pFontMetric->usCodePage;
if ( bOutline )
{
@@ -624,14 +624,14 @@ USHORT Os2SalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFon
else
{
aFAttrs.lMaxBaselineExt = pFontMetric->lMaxBaselineExt;
- aFAttrs.lAveCharWidth = pFontMetric->lAveCharWidth;
+ aFAttrs.lAveCharWidth = pFontMetric->lAveCharWidth;
}
}
// use family name for outline fonts
if ( mbPrinter ) {
- // use font face name for printers because otherwise ft2lib will fail
+ // use font face name for printers because otherwise ft2lib will fail
// to select the correct font for GPI (ticket#117)
strncpy( (char*)(aFAttrs.szFacename), pFontMetric->szFacename, sizeof( aFAttrs.szFacename ) );
} else if ( !pFontMetric) {
@@ -708,7 +708,7 @@ USHORT Os2SalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFon
{
nAttrs |= CBB_ANGLE;
double alpha = (double)(i_pFont->mnOrientation);
- alpha *= 0.0017453292; // *PI / 1800
+ alpha *= 0.0017453292; // *PI / 1800
mnOrientationY = (long) (1000.0 * sin( alpha ));
mnOrientationX = (long) (1000.0 * cos( alpha ));
aBundle.ptlAngle.x = mnOrientationX;
@@ -822,8 +822,8 @@ void Os2SalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
}
#endif
- pMetric->maName = UniString( aOS2Metric.szFamilyname, gsl_getSystemTextEncoding());
- pMetric->maStyleName = ImpStyleNameToSal( aOS2Metric.szFamilyname,
+ pMetric->maName = UniString( aOS2Metric.szFamilyname, gsl_getSystemTextEncoding());
+ pMetric->maStyleName = ImpStyleNameToSal( aOS2Metric.szFamilyname,
aOS2Metric.szFacename,
strlen( aOS2Metric.szFamilyname ) );
@@ -855,17 +855,17 @@ void Os2SalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
// transformation dependend font metrics
if ( aOS2Metric.fsDefn & FM_DEFN_OUTLINE )
{
- pMetric->mnWidth = aOS2Metric.lEmInc;
+ pMetric->mnWidth = aOS2Metric.lEmInc;
}
else
{
- pMetric->mnWidth = aOS2Metric.lAveCharWidth;
+ pMetric->mnWidth = aOS2Metric.lAveCharWidth;
pMetric->mnOrientation = 0;
}
- pMetric->mnIntLeading = aOS2Metric.lInternalLeading;
- pMetric->mnExtLeading = aOS2Metric.lExternalLeading;
- pMetric->mnAscent = aOS2Metric.lMaxAscender;
- pMetric->mnDescent = aOS2Metric.lMaxDescender;
+ pMetric->mnIntLeading = aOS2Metric.lInternalLeading;
+ pMetric->mnExtLeading = aOS2Metric.lExternalLeading;
+ pMetric->mnAscent = aOS2Metric.lMaxAscender;
+ pMetric->mnDescent = aOS2Metric.lMaxDescender;
// #107888# improved metric compatibility for Asian fonts...
// TODO: assess workaround below for CWS >= extleading
@@ -979,9 +979,9 @@ bool Os2SalGraphics::AddTempDevFont( ImplDevFontList* pFontList,
void Os2SalGraphics::GetDevFontList( ImplDevFontList* pList )
{
- PFONTMETRICS pFontMetrics;
- ULONG nFontMetricCount;
- SalData* pSalData;
+ PFONTMETRICS pFontMetrics;
+ ULONG nFontMetricCount;
+ SalData* pSalData;
#if OSL_DEBUG_LEVEL>0
debug_printf("Os2SalGraphics::GetDevFontList\n");
@@ -989,12 +989,12 @@ void Os2SalGraphics::GetDevFontList( ImplDevFontList* pList )
// install OpenSymbol
HMODULE hMod;
- ULONG ObjNum, Offset, rc;
- CHAR Buff[2*_MAX_PATH];
- char drive[_MAX_DRIVE], dir[_MAX_DIR];
- char fname[_MAX_FNAME], ext[_MAX_EXT];
+ ULONG ObjNum, Offset, rc;
+ CHAR Buff[2*_MAX_PATH];
+ char drive[_MAX_DRIVE], dir[_MAX_DIR];
+ char fname[_MAX_FNAME], ext[_MAX_EXT];
// get module handle (and name)
- rc = DosQueryModFromEIP( &hMod, &ObjNum, sizeof( Buff), Buff,
+ rc = DosQueryModFromEIP( &hMod, &ObjNum, sizeof( Buff), Buff,
&Offset, (ULONG)ImplSalGetUniString);
DosQueryModuleName(hMod, sizeof(Buff), Buff);
// replace module path with font path
@@ -1011,20 +1011,20 @@ void Os2SalGraphics::GetDevFontList( ImplDevFontList* pList )
// dies im unabhaengigen Teil auch so gemacht wird und wir
// ansonsten auf geloeschten Systemdaten arbeiten koennten
pSalData = GetSalData();
- nFontMetricCount = pSalData->mnFontMetricCount;
- pFontMetrics = pSalData->mpFontMetrics;
+ nFontMetricCount = pSalData->mnFontMetricCount;
+ pFontMetrics = pSalData->mpFontMetrics;
// Bei Bildschirm-Devices holen wir uns die Fontliste jedesmal neu
if ( pFontMetrics )
{
delete pFontMetrics;
- pFontMetrics = NULL;
- nFontMetricCount = 0;
+ pFontMetrics = NULL;
+ nFontMetricCount = 0;
}
}
else
{
- nFontMetricCount = mnFontMetricCount;
- pFontMetrics = mpFontMetrics;
+ nFontMetricCount = mnFontMetricCount;
+ pFontMetrics = mpFontMetrics;
}
// do we have to create the cached font list first?
@@ -1054,13 +1054,13 @@ void Os2SalGraphics::GetDevFontList( ImplDevFontList* pList )
if ( !mbPrinter )
{
- pSalData->mnFontMetricCount = nFontMetricCount;
- pSalData->mpFontMetrics = pFontMetrics;
+ pSalData->mnFontMetricCount = nFontMetricCount;
+ pSalData->mpFontMetrics = pFontMetrics;
}
else
{
- mnFontMetricCount = nFontMetricCount;
- mpFontMetrics = pFontMetrics;
+ mnFontMetricCount = nFontMetricCount;
+ mpFontMetrics = pFontMetrics;
}
}
@@ -1075,7 +1075,7 @@ void Os2SalGraphics::GetDevFontList( ImplDevFontList* pList )
continue;
// skip bitmap fonts (but keep WarpSans)
- if ( (pFontMetric->fsDefn & FM_DEFN_OUTLINE) == 0
+ if ( (pFontMetric->fsDefn & FM_DEFN_OUTLINE) == 0
&& strncmp( pFontMetric->szFacename, "WarpSans", 8) )
// Font nicht aufnehmen
continue;
@@ -1086,7 +1086,7 @@ void Os2SalGraphics::GetDevFontList( ImplDevFontList* pList )
*dash++ = ' ';
// create new font list element
- ImplOs2FontData* pData = new ImplOs2FontData( pFontMetric, 0, 0 );
+ ImplOs2FontData* pData = new ImplOs2FontData( pFontMetric, 0, 0 );
// add font list element to font list
pList->Add( pData );
@@ -1316,7 +1316,7 @@ BOOL Os2SalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& rB
const double fFactor((1.0/256) * mfFontScale);
rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fFactor, fFactor));
}
-
+
return bRet;
}
@@ -1418,8 +1418,8 @@ BOOL Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// open font file
sal_uInt32 nFaceNum = 0;
- if( !*xRawFontData.get() ) // TTC candidate
- nFaceNum = ~0U; // indicate "TTC font extracts only"
+ if( !*xRawFontData.get() ) // TTC candidate
+ nFaceNum = ~0U; // indicate "TTC font extracts only"
ScopedTrueTypeFont aSftTTF;
int nRC = aSftTTF.open( xRawFontData.get(), nFontSize1, nFaceNum );
@@ -1428,18 +1428,18 @@ BOOL Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
TTGlobalFontInfo aTTInfo;
::GetTTGlobalFontInfo( aSftTTF.get(), &aTTInfo );
- rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TRUETYPE;
- rInfo.m_aPSName = ImplSalGetUniString( aTTInfo.psname );
- rInfo.m_nAscent = +aTTInfo.winAscent;
- rInfo.m_nDescent = -aTTInfo.winDescent;
- rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
+ rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TRUETYPE;
+ rInfo.m_aPSName = ImplSalGetUniString( aTTInfo.psname );
+ rInfo.m_nAscent = +aTTInfo.winAscent;
+ rInfo.m_nDescent = -aTTInfo.winDescent;
+ rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
Point( aTTInfo.xMax, aTTInfo.yMax ) );
- rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
+ rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
// subset glyphs and get their properties
// take care that subset fonts require the NotDef glyph in pos 0
int nOrigCount = nGlyphCount;
- USHORT aShortIDs[ 256 ];
+ USHORT aShortIDs[ 256 ];
sal_uInt8 aTempEncs[ 256 ];
int nNotDef=-1, i;
@@ -1484,9 +1484,9 @@ BOOL Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
::GetTTSimpleGlyphMetrics( aSftTTF.get(), aShortIDs, nGlyphCount, aIFSD.mbVertical );
if( !pMetrics )
return FALSE;
- sal_uInt16 nNotDefAdv = pMetrics[0].adv;
- pMetrics[0].adv = pMetrics[nNotDef].adv;
- pMetrics[nNotDef].adv = nNotDefAdv;
+ sal_uInt16 nNotDefAdv = pMetrics[0].adv;
+ pMetrics[0].adv = pMetrics[nNotDef].adv;
+ pMetrics[nNotDef].adv = nNotDefAdv;
for( i = 0; i < nOrigCount; ++i )
pGlyphWidths[i] = pMetrics[i].adv;
free( pMetrics );
@@ -1525,18 +1525,18 @@ const void* Os2SalGraphics::GetEmbedFontData( const ImplFontData* pFont,
DWORD nFontSize2 = Ft2GetFontData( mhPS, 0, 0, pData, nFontSize1 );
if( nFontSize1 != nFontSize2 )
*pDataLen = 0;
-
+
// get important font properties
FONTMETRICS aOS2Metric;
if (Ft2QueryFontMetrics( mhPS, sizeof( aOS2Metric ), &aOS2Metric ) == GPI_ERROR)
*pDataLen = 0;
- rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TYPE1;
- rInfo.m_aPSName = ImplSalGetUniString( aOS2Metric.szFacename );
- rInfo.m_nAscent = +aOS2Metric.lMaxAscender;
- rInfo.m_nDescent = -aOS2Metric.lMaxDescender;
- rInfo.m_aFontBBox = Rectangle( Point( 0, -aOS2Metric.lMaxDescender ),
+ rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TYPE1;
+ rInfo.m_aPSName = ImplSalGetUniString( aOS2Metric.szFacename );
+ rInfo.m_nAscent = +aOS2Metric.lMaxAscender;
+ rInfo.m_nDescent = -aOS2Metric.lMaxDescender;
+ rInfo.m_aFontBBox = Rectangle( Point( 0, -aOS2Metric.lMaxDescender ),
Point( aOS2Metric.lMaxCharInc, aOS2Metric.lMaxAscender+aOS2Metric.lExternalLeading ) );
- rInfo.m_nCapHeight = aOS2Metric.lMaxAscender; // Well ...
+ rInfo.m_nCapHeight = aOS2Metric.lMaxAscender; // Well ...
// get individual character widths
for( int i = 0; i < 256; ++i )
@@ -1594,10 +1594,10 @@ void Os2SalGraphics::GetGlyphWidths( const ImplFontData* pFont,
// TODO: much better solution: move SetFont and restoration of old font to caller
ScopedFont aOldFont(*this);
-
+
float fScale = 0.0;
ImplDoSetFont( &aIFSD, fScale, 0);
-
+
if( pFont->IsSubsettable() )
{
// get raw font file data
@@ -1613,12 +1613,12 @@ void Os2SalGraphics::GetGlyphWidths( const ImplFontData* pFont,
sal_uInt32 nFaceNum = 0;
if( !*xRawFontData.get() ) // TTC candidate
nFaceNum = ~0U; // indicate "TTC font extracts only"
-
+
ScopedTrueTypeFont aSftTTF;
int nRC = aSftTTF.open( xRawFontData.get(), nFontSize1, nFaceNum );
if( nRC != SF_OK )
return;
-
+
int nGlyphs = GetTTGlyphCount( aSftTTF.get() );
if( nGlyphs > 0 )
{
@@ -1672,7 +1672,7 @@ void Os2SalGraphics::GetGlyphWidths( const ImplFontData* pFont,
rWidths.push_back( nCharWidth );
}
}
- }
+ }
}
//--------------------------------------------------------------------------
@@ -1688,14 +1688,14 @@ SystemFontData Os2SalGraphics::GetSysFontData( int nFallbacklevel ) const
if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
if (nFallbacklevel < 0 ) nFallbacklevel = 0;
-
+
aSysFontData.nSize = sizeof( SystemFontData );
- aSysFontData.hFont = mhFonts[nFallbacklevel];
+ aSysFontData.hFont = mhFonts[nFallbacklevel];
aSysFontData.bFakeBold = false;
aSysFontData.bFakeItalic = false;
aSysFontData.bAntialias = true;
aSysFontData.bVerticalCharacterType = false;
-
+
return aSysFontData;
}
diff --git a/vcl/os2/source/gdi/salprn.cxx b/vcl/os2/source/gdi/salprn.cxx
index 7290cdbcb9fe..62613011c0f5 100644
--- a/vcl/os2/source/gdi/salprn.cxx
+++ b/vcl/os2/source/gdi/salprn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +68,10 @@
struct ImplFormInfo
{
- long mnPaperWidth;
- long mnPaperHeight;
+ long mnPaperWidth;
+ long mnPaperHeight;
#ifndef NO_DJP
- DJPT_PAPERSIZE mnId;
+ DJPT_PAPERSIZE mnId;
#endif
};
@@ -83,12 +83,12 @@ struct ImplFormInfo
struct ImplTrayInfo
{
- CHAR maName[32];
- CHAR maDisplayName[64];
- DJPT_TRAYTYPE mnId;
+ CHAR maName[32];
+ CHAR maDisplayName[64];
+ DJPT_TRAYTYPE mnId;
ImplTrayInfo( const char* pTrayName,
- const char* pTrayDisplayName )
+ const char* pTrayDisplayName )
{
strcpy( maName, pTrayName);
strcpy( maDisplayName, pTrayDisplayName);
@@ -99,12 +99,12 @@ struct ImplTrayInfo
struct ImplQueueSalSysData
{
- ByteString maPrinterName; // pszPrinters
- ByteString maName; // pszName bzw. LogAddress
- ByteString maOrgDriverName; // pszDriverName (maDriverName.maDeviceName)
- ByteString maDriverName; // pszDriverName bis .
- ByteString maDeviceName; // pszDriverName nach .
- PDRIVDATA mpDrivData;
+ ByteString maPrinterName; // pszPrinters
+ ByteString maName; // pszName bzw. LogAddress
+ ByteString maOrgDriverName; // pszDriverName (maDriverName.maDeviceName)
+ ByteString maDriverName; // pszDriverName bis .
+ ByteString maDeviceName; // pszDriverName nach .
+ PDRIVDATA mpDrivData;
ImplQueueSalSysData( const ByteString& rPrinterName,
const ByteString& rName,
@@ -187,11 +187,11 @@ void Os2SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
ByteString aOrgDriverName( pPrqInfo->pszDriverName);
ByteString aName( pPrqInfo->pszName);
- pInfo->maDriver = ::rtl::OStringToOUString (aOrgDriverName, gsl_getSystemTextEncoding());
+ pInfo->maDriver = ::rtl::OStringToOUString (aOrgDriverName, gsl_getSystemTextEncoding());
pInfo->maPrinterName = ::rtl::OStringToOUString (pPrqInfo->pszComment, gsl_getSystemTextEncoding());
- pInfo->maLocation = ::rtl::OStringToOUString (aName, gsl_getSystemTextEncoding());
- pInfo->mnStatus = ImplPMQueueStatusToSal( pPrqInfo->fsStatus );
- pInfo->mnJobs = pPrqInfo->cJobs;
+ pInfo->maLocation = ::rtl::OStringToOUString (aName, gsl_getSystemTextEncoding());
+ pInfo->mnStatus = ImplPMQueueStatusToSal( pPrqInfo->fsStatus );
+ pInfo->mnJobs = pPrqInfo->cJobs;
// pInfo->maComment = !!!
// Feststellen, ob Name doppelt
@@ -214,7 +214,7 @@ void Os2SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
if ( (pDriverName = strchr( pPrqInfo->pszDriverName, '.' )) != 0 )
{
*pDriverName = 0;
- pDeviceName = pDriverName + 1;
+ pDeviceName = pDriverName + 1;
}
else
pDeviceName = NULL;
@@ -280,7 +280,7 @@ void Os2SalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo )
pSysData->maOrgDriverName.Equals( pPrqInfo->pszDriverName ) )
{
pInfo->mnStatus = ImplPMQueueStatusToSal( pPrqInfo->fsStatus );
- pInfo->mnJobs = pPrqInfo->cJobs;
+ pInfo->mnJobs = pPrqInfo->cJobs;
break;
}
@@ -303,12 +303,12 @@ void Os2SalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
XubString Os2SalInstance::GetDefaultPrinter()
{
- APIRET rc;
- ULONG nNeeded;
- ULONG nReturned;
- ULONG nTotal;
- char szQueueName[255];
- XubString aDefaultName;
+ APIRET rc;
+ ULONG nNeeded;
+ ULONG nReturned;
+ ULONG nTotal;
+ char szQueueName[255];
+ XubString aDefaultName;
// query default queue
if ( !PrfQueryProfileString( HINI_PROFILE, SPL_INI_SPOOLER, "QUEUE", 0, szQueueName, sizeof( szQueueName ) ) )
@@ -510,11 +510,11 @@ static void ImplFormatInputList( PDJP_ITEM pDJP, PQUERYTUPLE pTuple )
BOOL fContinue = TRUE;
do
{
- pDJP->cb = sizeof (DJP_ITEM);
- pDJP->ulProperty = pTuple->ulProperty;
- pDJP->lType = pTuple->lType;
+ pDJP->cb = sizeof (DJP_ITEM);
+ pDJP->ulProperty = pTuple->ulProperty;
+ pDJP->lType = pTuple->lType;
pDJP->ulNumReturned = 0;
- pDJP->ulValue = DJP_NONE;
+ pDJP->ulValue = DJP_NONE;
// at EOL?
fContinue = DJP_NONE != pTuple->ulProperty;
@@ -555,19 +555,19 @@ static void ImplGetFormAndTrayList( Os2SalInfoPrinter* pOs2SalInfoPrinter, const
LONG alQuery[] =
{
- 0, 0, // First two members of QUERYSIZE
- DJP_CJ_FORM, DJP_ALL,
- DJP_CJ_TRAYNAME, DJP_ALL,
- DJP_NONE, DJP_NONE // EOL marker
+ 0, 0, // First two members of QUERYSIZE
+ DJP_CJ_FORM, DJP_ALL,
+ DJP_CJ_TRAYNAME, DJP_ALL,
+ DJP_NONE, DJP_NONE // EOL marker
};
- APIRET rc;
- PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
- PBYTE pBuffer = NULL;
- LONG nAlloc = 0;
- PDRIVDATA pCopyDrivData = ImplPrnDrivData( pSetupData );
- LONG nDrivDataSize = pCopyDrivData->cb;
- PBYTE pDrivData = (PBYTE)pCopyDrivData;
+ APIRET rc;
+ PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
+ PBYTE pBuffer = NULL;
+ LONG nAlloc = 0;
+ PDRIVDATA pCopyDrivData = ImplPrnDrivData( pSetupData );
+ LONG nDrivDataSize = pCopyDrivData->cb;
+ PBYTE pDrivData = (PBYTE)pCopyDrivData;
// find out how many bytes to allocate
pQuerySize->cb = sizeof( alQuery );
@@ -616,10 +616,10 @@ static void ImplGetFormAndTrayList( Os2SalInfoPrinter* pOs2SalInfoPrinter, const
pOs2SalInfoPrinter->mpFormArray = new PIMPLFORMINFO[pOs2SalInfoPrinter->mnFormCount];
for( int i = 0; i < pDJP->ulNumReturned; i++, pElm++ )
{
- ImplFormInfo* pInfo = new ImplFormInfo;
- pInfo->mnPaperWidth = pElm->hcInfo.cx;
- pInfo->mnPaperHeight = pElm->hcInfo.cy;
- pInfo->mnId = pElm->djppsFormID;
+ ImplFormInfo* pInfo = new ImplFormInfo;
+ pInfo->mnPaperWidth = pElm->hcInfo.cx;
+ pInfo->mnPaperHeight = pElm->hcInfo.cy;
+ pInfo->mnId = pElm->djppsFormID;
pOs2SalInfoPrinter->mpFormArray[i] = pInfo;
}
}
@@ -634,8 +634,8 @@ static void ImplGetFormAndTrayList( Os2SalInfoPrinter* pOs2SalInfoPrinter, const
pOs2SalInfoPrinter->mpTrayArray = new PIMPLTRAYINFO[pOs2SalInfoPrinter->mnTrayCount];
for( int i = 0; i < pDJP->ulNumReturned; i++, pElm++ )
{
- ImplTrayInfo* pInfo = new ImplTrayInfo( pElm->szTrayname, pElm->szDisplayTrayname );
- pInfo->mnId = pElm->djpttTrayID;
+ ImplTrayInfo* pInfo = new ImplTrayInfo( pElm->szTrayname, pElm->szDisplayTrayname );
+ pInfo->mnId = pElm->djpttTrayID;
pOs2SalInfoPrinter->mpTrayArray[i] = pInfo;
}
}
@@ -659,20 +659,20 @@ static BOOL ImplGetCurrentSettings( Os2SalInfoPrinter* pOs2SalInfoPrinter, ImplJ
LONG alQuery[] =
{
- 0, 0, // First two members of QUERYSIZE
- DJP_SJ_ORIENTATION, DJP_CURRENT,
- DJP_CJ_FORM, DJP_CURRENT,
- DJP_NONE, DJP_NONE // EOL marker
+ 0, 0, // First two members of QUERYSIZE
+ DJP_SJ_ORIENTATION, DJP_CURRENT,
+ DJP_CJ_FORM, DJP_CURRENT,
+ DJP_NONE, DJP_NONE // EOL marker
};
- APIRET rc;
- PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
- PBYTE pBuffer = NULL;
- LONG nAlloc = 0;
- PDRIVDATA pCopyDrivData = ImplPrnDrivData( pSetupData );
- LONG nDrivDataSize = pCopyDrivData->cb;
- PBYTE pDrivData = (PBYTE)pCopyDrivData;
- BOOL bResult;
+ APIRET rc;
+ PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
+ PBYTE pBuffer = NULL;
+ LONG nAlloc = 0;
+ PDRIVDATA pCopyDrivData = ImplPrnDrivData( pSetupData );
+ LONG nDrivDataSize = pCopyDrivData->cb;
+ PBYTE pDrivData = (PBYTE)pCopyDrivData;
+ BOOL bResult;
// find out how many bytes to allocate
pQuerySize->cb = sizeof( alQuery );
@@ -770,8 +770,8 @@ static BOOL ImplGetCurrentSettings( Os2SalInfoPrinter* pOs2SalInfoPrinter, ImplJ
}
// Wir suchen zuerst ueber den Namen/Id und dann ueber die Id
- BOOL bTrayFound = FALSE;
- USHORT j;
+ BOOL bTrayFound = FALSE;
+ USHORT j;
for ( j = 0; j < pOs2SalInfoPrinter->mnTrayCount; j++ )
{
if ( (pOs2SalInfoPrinter->mpTrayArray[j]->mnId == pElm->djpttTrayID) &&
@@ -825,16 +825,16 @@ static BOOL ImplSetOrientation( HDC hPrinterDC, PDRIVDATA pDriverData,
{
LONG alQuery[] =
{
- 0, 0, // First two members of QUERYSIZE
- DJP_SJ_ORIENTATION, DJP_CURRENT,
- DJP_NONE, DJP_NONE // EOL marker
+ 0, 0, // First two members of QUERYSIZE
+ DJP_SJ_ORIENTATION, DJP_CURRENT,
+ DJP_NONE, DJP_NONE // EOL marker
};
- APIRET rc;
- PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
- PBYTE pBuffer = NULL;
- LONG nAlloc = 0;
- LONG nDrivDataSize = pDriverData->cb;
+ APIRET rc;
+ PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
+ PBYTE pBuffer = NULL;
+ LONG nAlloc = 0;
+ LONG nDrivDataSize = pDriverData->cb;
// find out how many bytes to allocate
pQuerySize->cb = sizeof( alQuery );
@@ -855,10 +855,10 @@ static BOOL ImplSetOrientation( HDC hPrinterDC, PDRIVDATA pDriverData,
PDJP_ITEM pDJP = (PDJP_ITEM)pBuffer;
ImplFormatInputList( pDJP, pQuerySize->aTuples );
- pDJP->cb = sizeof( DJP_ITEM );
+ pDJP->cb = sizeof( DJP_ITEM );
pDJP->ulProperty = DJP_SJ_ORIENTATION;
- pDJP->lType = DJP_CURRENT;
- pDJP->ulValue = (eOrientation == ORIENTATION_PORTRAIT)
+ pDJP->lType = DJP_CURRENT;
+ pDJP->ulValue = (eOrientation == ORIENTATION_PORTRAIT)
? DJP_ORI_PORTRAIT
: DJP_ORI_LANDSCAPE;
@@ -882,16 +882,16 @@ static BOOL ImplSetPaperSize( HDC hPrinterDC, PDRIVDATA pDriverData,
{
LONG alQuery[] =
{
- 0, 0, // First two members of QUERYSIZE
- DJP_SJ_PAPERSIZE, DJP_CURRENT,
- DJP_NONE, DJP_NONE // EOL marker
+ 0, 0, // First two members of QUERYSIZE
+ DJP_SJ_PAPERSIZE, DJP_CURRENT,
+ DJP_NONE, DJP_NONE // EOL marker
};
- APIRET rc;
- PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
- PBYTE pBuffer = NULL;
- LONG nAlloc = 0;
- LONG nDrivDataSize = pDriverData->cb;
+ APIRET rc;
+ PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
+ PBYTE pBuffer = NULL;
+ LONG nAlloc = 0;
+ LONG nDrivDataSize = pDriverData->cb;
// find out how many bytes to allocate
pQuerySize->cb = sizeof( alQuery );
@@ -914,10 +914,10 @@ static BOOL ImplSetPaperSize( HDC hPrinterDC, PDRIVDATA pDriverData,
ImplFormatInputList( pDJP, pQuerySize->aTuples );
// Neue Daten zuweisen
- pDJP->cb = sizeof( DJP_ITEM );
+ pDJP->cb = sizeof( DJP_ITEM );
pDJP->ulProperty = DJP_SJ_PAPERSIZE;
- pDJP->lType = DJP_CURRENT;
- pDJP->ulValue = nOS2PaperFormat;
+ pDJP->lType = DJP_CURRENT;
+ pDJP->ulValue = nOS2PaperFormat;
// und setzen
rc = DevEscape( hPrinterDC,
@@ -939,16 +939,16 @@ static BOOL ImplSetPaperBin( HDC hPrinterDC, PDRIVDATA pDriverData,
{
LONG alQuery[] =
{
- 0, 0, // First two members of QUERYSIZE
- DJP_SJ_TRAYTYPE, DJP_CURRENT,
- DJP_NONE, DJP_NONE // EOL marker
+ 0, 0, // First two members of QUERYSIZE
+ DJP_SJ_TRAYTYPE, DJP_CURRENT,
+ DJP_NONE, DJP_NONE // EOL marker
};
- APIRET rc;
- PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
- PBYTE pBuffer = NULL;
- LONG nAlloc = 0;
- LONG nDrivDataSize = pDriverData->cb;
+ APIRET rc;
+ PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
+ PBYTE pBuffer = NULL;
+ LONG nAlloc = 0;
+ LONG nDrivDataSize = pDriverData->cb;
// find out how many bytes to allocate
pQuerySize->cb = sizeof( alQuery );
@@ -970,10 +970,10 @@ static BOOL ImplSetPaperBin( HDC hPrinterDC, PDRIVDATA pDriverData,
ImplFormatInputList( pDJP, pQuerySize->aTuples );
// Neue Daten zuweisen
- pDJP->cb = sizeof( DJP_ITEM );
+ pDJP->cb = sizeof( DJP_ITEM );
pDJP->ulProperty = DJP_SJ_TRAYTYPE;
- pDJP->lType = DJP_CURRENT;
- pDJP->ulValue = pTrayInfo->mnId;
+ pDJP->lType = DJP_CURRENT;
+ pDJP->ulValue = pTrayInfo->mnId;
// und setzen
rc = DevEscape( hPrinterDC,
@@ -998,10 +998,10 @@ static BOOL ImplSalCreateInfoPrn( Os2SalInfoPrinter* pPrinter, PDRIVDATA pDriver
// create info context
DEVOPENSTRUC devOpenStruc;
memset( &devOpenStruc, 0, sizeof( devOpenStruc ) );
- devOpenStruc.pszLogAddress = (char*)pPrinter->maName.GetBuffer();
- devOpenStruc.pszDriverName = (char*)pPrinter->maDriverName.GetBuffer();
- devOpenStruc.pdriv = pDriverData;
- devOpenStruc.pszDataType = "PM_Q_STD";
+ devOpenStruc.pszLogAddress = (char*)pPrinter->maName.GetBuffer();
+ devOpenStruc.pszDriverName = (char*)pPrinter->maDriverName.GetBuffer();
+ devOpenStruc.pdriv = pDriverData;
+ devOpenStruc.pszDataType = "PM_Q_STD";
HDC hDC = DevOpenDC( pSalData->mhAB, OD_INFO, "*",
4, (PDEVOPENDATA)&devOpenStruc, (HDC)NULL);
@@ -1041,15 +1041,15 @@ SalInfoPrinter* Os2SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
{
ImplQueueSalSysData* pSysQueueData = (ImplQueueSalSysData*)(pQueueInfo->mpSysData);
Os2SalInfoPrinter* pPrinter = new Os2SalInfoPrinter;
- pPrinter->maPrinterName = pSysQueueData->maPrinterName;
- pPrinter->maName = pSysQueueData->maName;
- pPrinter->maDriverName = pSysQueueData->maDriverName;
- pPrinter->maDeviceName = pSysQueueData->maDeviceName;
+ pPrinter->maPrinterName = pSysQueueData->maPrinterName;
+ pPrinter->maName = pSysQueueData->maName;
+ pPrinter->maDriverName = pSysQueueData->maDriverName;
+ pPrinter->maDeviceName = pSysQueueData->maDeviceName;
// Nur Setup-Daten uebernehmen, wenn Treiber und Laenge der Treiberdaten
// uebereinstimmt
- PDRIVDATA pDriverData;
- BOOL bUpdateDriverData;
+ PDRIVDATA pDriverData;
+ BOOL bUpdateDriverData;
if ( pSetupData->mpDriverData && pSysQueueData->mpDrivData &&
(pSetupData->mnSystem == JOBSETUP_SYSTEM_OS2) &&
(pSetupData->mnDriverDataLen == pSysQueueData->mpDrivData->cb) &&
@@ -1077,16 +1077,16 @@ SalInfoPrinter* Os2SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
// create graphics object for output
Os2SalGraphics* pGraphics = new Os2SalGraphics;
- pGraphics->mhDC = pPrinter->mhDC;
- pGraphics->mhPS = pPrinter->mhPS;
- pGraphics->mhWnd = 0;
- pGraphics->mbPrinter = TRUE;
- pGraphics->mbVirDev = FALSE;
- pGraphics->mbWindow = FALSE;
- pGraphics->mbScreen = FALSE;
+ pGraphics->mhDC = pPrinter->mhDC;
+ pGraphics->mhPS = pPrinter->mhPS;
+ pGraphics->mhWnd = 0;
+ pGraphics->mbPrinter = TRUE;
+ pGraphics->mbVirDev = FALSE;
+ pGraphics->mbWindow = FALSE;
+ pGraphics->mbScreen = FALSE;
ImplSalInitGraphics( pGraphics );
- pPrinter->mpGraphics = pGraphics;
+ pPrinter->mpGraphics = pGraphics;
// check printer driver for DJP support
pPrinter->mbDJPSupported = ImplIsDriverDJPEnabled( pPrinter->mhDC );
@@ -1119,15 +1119,15 @@ void Os2SalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter )
Os2SalInfoPrinter::Os2SalInfoPrinter()
{
- mhDC = 0;
- mhPS = 0;
- mpGraphics = NULL;
- mbGraphics = FALSE;
- mbDJPSupported = FALSE;
- mnFormCount = 0;
- mpFormArray = NULL;
- mnTrayCount = 0;
- mpTrayArray = NULL;
+ mhDC = 0;
+ mhPS = 0;
+ mpGraphics = NULL;
+ mbGraphics = FALSE;
+ mbDJPSupported = FALSE;
+ mnFormCount = 0;
+ mpFormArray = NULL;
+ mnTrayCount = 0;
+ mpTrayArray = NULL;
}
// -----------------------------------------------------------------------
@@ -1317,8 +1317,8 @@ BOOL Os2SalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData )
{
nOS2PaperFormat = DJP_PSI_NONE;
// OS2 rechnet in Millimetern
- long nPaperWidth = pSetupData->mnPaperWidth / 100;
- long nPaperHeight = pSetupData->mnPaperHeight / 100;
+ long nPaperWidth = pSetupData->mnPaperWidth / 100;
+ long nPaperHeight = pSetupData->mnPaperHeight / 100;
// Ansonsten ueber die Papiergroesse suchen
for( int i = 0; i < mnFormCount; i++ )
{
@@ -1453,7 +1453,7 @@ void Os2SalInfoPrinter::GetPageInfo( const ImplJobSetup*,
HDC hDC = mhDC;
// search current form
- HCINFO aInfo;
+ HCINFO aInfo;
int nForms = DevQueryHardcopyCaps( hDC, 0, 0, &aInfo );
for( int i = 0; i < nForms; i++ )
{
@@ -1466,12 +1466,12 @@ void Os2SalInfoPrinter::GetPageInfo( const ImplJobSetup*,
long nYResolution;
DevQueryCaps( hDC, CAPS_HORIZONTAL_RESOLUTION, 1, &nXResolution );
DevQueryCaps( hDC, CAPS_VERTICAL_RESOLUTION, 1, &nYResolution );
- rPageOffX = aInfo.xLeftClip * nXResolution / 1000;
- rPageOffY = (aInfo.cy-aInfo.yTopClip) * nYResolution / 1000;
- rPageWidth = aInfo.cx * nXResolution / 1000;
+ rPageOffX = aInfo.xLeftClip * nXResolution / 1000;
+ rPageOffY = (aInfo.cy-aInfo.yTopClip) * nYResolution / 1000;
+ rPageWidth = aInfo.cx * nXResolution / 1000;
rPageHeight = aInfo.cy * nYResolution / 1000;
- rOutWidth = aInfo.xPels;
- rOutHeight = aInfo.yPels;
+ rOutWidth = aInfo.xPels;
+ rOutHeight = aInfo.yPels;
return;
}
}
@@ -1482,11 +1482,11 @@ void Os2SalInfoPrinter::GetPageInfo( const ImplJobSetup*,
long lCapsHeight = 0;
DevQueryCaps( hDC, CAPS_WIDTH, 1L, &lCapsWidth );
DevQueryCaps( hDC, CAPS_HEIGHT, 1L, &lCapsHeight );
- rPageOffX = 0;
- rPageOffY = 0;
- rOutWidth = lCapsWidth;
- rOutHeight = lCapsHeight;
- rPageWidth = rOutWidth;
+ rPageOffX = 0;
+ rPageOffY = 0;
+ rOutWidth = lCapsWidth;
+ rOutHeight = lCapsHeight;
+ rPageWidth = rOutWidth;
rPageHeight = rOutHeight;
}
@@ -1539,11 +1539,11 @@ void Os2SalInstance::DestroyPrinter( SalPrinter* pPrinter )
Os2SalPrinter::Os2SalPrinter()
{
- mhDC = 0;
- mhPS = 0;
- mpGraphics = NULL;
- mbAbort = FALSE;
- mbPrintDJPSupported = FALSE;
+ mhDC = 0;
+ mhPS = 0;
+ mpGraphics = NULL;
+ mbAbort = FALSE;
+ mbPrintDJPSupported = FALSE;
}
// -----------------------------------------------------------------------
@@ -1562,9 +1562,9 @@ BOOL Os2SalPrinter::StartJob( const XubString* pFileName,
bool bDirect,
ImplJobSetup* pSetupData )
{
- DEVOPENSTRUC aDevOpenStruc;
- LONG lType;
- APIRET rc;
+ DEVOPENSTRUC aDevOpenStruc;
+ LONG lType;
+ APIRET rc;
// prepare queue information
memset( &aDevOpenStruc, 0, sizeof( aDevOpenStruc ) );
@@ -1601,8 +1601,8 @@ BOOL Os2SalPrinter::StartJob( const XubString* pFileName,
}
// open device context
- SalData* pSalData = GetSalData();
- HAB hAB = pSalData->mhAB;
+ SalData* pSalData = GetSalData();
+ HAB hAB = pSalData->mhAB;
aDevOpenStruc.pdriv = (PDRIVDATA)pSetupData->mpDriverData;
mhDC = DevOpenDC( hAB,
lType,
@@ -1721,20 +1721,20 @@ SalGraphics* Os2SalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobSet
mbFirstPage = FALSE;
else
{
- PBYTE pJobData;
- LONG nJobDataSize;
- LONG nEscape;
+ PBYTE pJobData;
+ LONG nJobDataSize;
+ LONG nEscape;
if ( mbPrintDJPSupported && bNewJobSetup )
{
- nEscape = DEVESC_NEWFRAME_WPROP;
- nJobDataSize = ((PDRIVDATA)(pSetupData->mpDriverData))->cb;
- pJobData = (PBYTE)(pSetupData->mpDriverData);
+ nEscape = DEVESC_NEWFRAME_WPROP;
+ nJobDataSize = ((PDRIVDATA)(pSetupData->mpDriverData))->cb;
+ pJobData = (PBYTE)(pSetupData->mpDriverData);
}
else
{
- nEscape = DEVESC_NEWFRAME;
- nJobDataSize = 0;
- pJobData = NULL;
+ nEscape = DEVESC_NEWFRAME;
+ nJobDataSize = 0;
+ pJobData = NULL;
}
rc = DevEscape( mhDC,
nEscape,
@@ -1754,23 +1754,23 @@ SalGraphics* Os2SalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobSet
// create SalGraphics with copy of hPS
Os2SalGraphics* pGraphics = new Os2SalGraphics;
- pGraphics->mhDC = mhDC;
- pGraphics->mhPS = mhPS;
- pGraphics->mhWnd = 0;
- pGraphics->mbPrinter = TRUE;
- pGraphics->mbVirDev = FALSE;
- pGraphics->mbWindow = FALSE;
- pGraphics->mbScreen = FALSE;
- pGraphics->mnHeight = 0;
+ pGraphics->mhDC = mhDC;
+ pGraphics->mhPS = mhPS;
+ pGraphics->mhWnd = 0;
+ pGraphics->mbPrinter = TRUE;
+ pGraphics->mbVirDev = FALSE;
+ pGraphics->mbWindow = FALSE;
+ pGraphics->mbScreen = FALSE;
+ pGraphics->mnHeight = 0;
// search current form for actual page height
- HCINFO aInfo;
- int nForms = DevQueryHardcopyCaps( mhDC, 0, 0, &aInfo );
+ HCINFO aInfo;
+ int nForms = DevQueryHardcopyCaps( mhDC, 0, 0, &aInfo );
for( int i = 0; i < nForms; i++ )
{
if ( DevQueryHardcopyCaps( mhDC, i, 1, &aInfo ) >= 0 )
{
if ( aInfo.flAttributes & HCAPS_CURRENT )
- pGraphics->mnHeight = aInfo.yPels;
+ pGraphics->mnHeight = aInfo.yPels;
}
}
// use device caps if no form selected/found
diff --git a/vcl/os2/source/gdi/salvd.cxx b/vcl/os2/source/gdi/salvd.cxx
index 5f7ab7bb0cf0..15ad701ea8a9 100644
--- a/vcl/os2/source/gdi/salvd.cxx
+++ b/vcl/os2/source/gdi/salvd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +60,9 @@ HBITMAP ImplCreateVirDevBitmap( HDC hDC, HPS hPS, long nDX, long nDY,
HBITMAP hBitmap;
BITMAPINFOHEADER2 aBitmapInfo;
memset( &aBitmapInfo, 0, sizeof( BITMAPINFOHEADER2 ) );
- aBitmapInfo.cbFix = sizeof( BITMAPINFOHEADER2 );
- aBitmapInfo.cx = nDX;
- aBitmapInfo.cy = nDY;
+ aBitmapInfo.cbFix = sizeof( BITMAPINFOHEADER2 );
+ aBitmapInfo.cx = nDX;
+ aBitmapInfo.cy = nDY;
aBitmapInfo.cPlanes = nPlanes;
aBitmapInfo.cBitCount = (nBitCount < 4) ? 4 : nBitCount;
hBitmap = GpiCreateBitmap( hPS, &aBitmapInfo, 0, NULL, NULL );
@@ -77,8 +77,8 @@ SalVirtualDevice* Os2SalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
const SystemGraphicsData* pData )
{
Os2SalGraphics* pGraphics = static_cast<Os2SalGraphics*>(pSGraphics);
- HAB hAB = GetSalData()->mhAB;
- SIZEL size;
+ HAB hAB = GetSalData()->mhAB;
+ SIZEL size;
// create device context (at this time allways display compatible)
DEVOPENSTRUC aDevOpenStruc = { NULL, "DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL };
@@ -106,26 +106,26 @@ SalVirtualDevice* Os2SalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
}
// init data
- Os2SalVirtualDevice* pVDev = new Os2SalVirtualDevice;
- Os2SalGraphics* pVirGraphics = new Os2SalGraphics;
-
- pVirGraphics->mhDC = hDC;
- pVirGraphics->mhPS = hPS;
- pVirGraphics->mhWnd = 0;
- pVirGraphics->mnHeight = nDY;
- pVirGraphics->mbPrinter = FALSE;
- pVirGraphics->mbVirDev = TRUE;
- pVirGraphics->mbWindow = FALSE;
- pVirGraphics->mbScreen = pGraphics->mbScreen;
+ Os2SalVirtualDevice* pVDev = new Os2SalVirtualDevice;
+ Os2SalGraphics* pVirGraphics = new Os2SalGraphics;
+
+ pVirGraphics->mhDC = hDC;
+ pVirGraphics->mhPS = hPS;
+ pVirGraphics->mhWnd = 0;
+ pVirGraphics->mnHeight = nDY;
+ pVirGraphics->mbPrinter = FALSE;
+ pVirGraphics->mbVirDev = TRUE;
+ pVirGraphics->mbWindow = FALSE;
+ pVirGraphics->mbScreen = pGraphics->mbScreen;
ImplSalInitGraphics( pVirGraphics );
- pVDev->mhDC = hDC;
- pVDev->mhPS = hPS;
- pVDev->mhBmp = hBmp;
- pVDev->mhDefBmp = Ft2SetBitmap( hPS, hBmp );
- pVDev->mpGraphics = pVirGraphics;
- pVDev->mnBitCount = nBitCount;
- pVDev->mbGraphics = FALSE;
+ pVDev->mhDC = hDC;
+ pVDev->mhPS = hPS;
+ pVDev->mhBmp = hBmp;
+ pVDev->mhDefBmp = Ft2SetBitmap( hPS, hBmp );
+ pVDev->mpGraphics = pVirGraphics;
+ pVDev->mnBitCount = nBitCount;
+ pVDev->mbGraphics = FALSE;
return pVDev;
}
diff --git a/vcl/os2/source/window/salframe.cxx b/vcl/os2/source/window/salframe.cxx
index 743bdce64802..dc54c6ba5f56 100644
--- a/vcl/os2/source/window/salframe.cxx
+++ b/vcl/os2/source/window/salframe.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,10 +83,10 @@ ULONG Os2SalFrame::mnInputLang = 0;
// =======================================================================
// define a new flag
-#define SWP_CENTER (SWP_NOAUTOCLOSE<<4)
-#define SWP_SHOWMAXIMIZED (SWP_ACTIVATE | SWP_SHOW | SWP_MAXIMIZE)
-#define SWP_SHOWMINIMIZED (SWP_ACTIVATE | SWP_SHOW | SWP_MINIMIZE)
-#define SWP_SHOWNORMAL (SWP_ACTIVATE | SWP_SHOW | SWP_RESTORE)
+#define SWP_CENTER (SWP_NOAUTOCLOSE<<4)
+#define SWP_SHOWMAXIMIZED (SWP_ACTIVATE | SWP_SHOW | SWP_MAXIMIZE)
+#define SWP_SHOWMINIMIZED (SWP_ACTIVATE | SWP_SHOW | SWP_MINIMIZE)
+#define SWP_SHOWNORMAL (SWP_ACTIVATE | SWP_SHOW | SWP_RESTORE)
static LONG nScreenHeight = WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN);
static LONG nScreenWidth = WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN );
@@ -113,7 +113,7 @@ BOOL APIENTRY _WinQueryWindowPos( Os2SalFrame* pFrame, PSWP pswp)
BOOL rc = WinQueryWindowPos( pFrame->mhWndFrame, pswp);
#if OSL_DEBUG_LEVEL>1
- debug_printf( "> WinQueryWindowPos hwnd %x at %d,%d (%dx%d)\n",
+ debug_printf( "> WinQueryWindowPos hwnd %x at %d,%d (%dx%d)\n",
pFrame->mhWndFrame, pswp->x, pswp->y, pswp->cx, pswp->cy);
#endif
@@ -123,11 +123,11 @@ BOOL APIENTRY _WinQueryWindowPos( Os2SalFrame* pFrame, PSWP pswp)
if ( pParentFrame )
{
POINTL ptlOwner = {0};
-
- // coords are relative to screen, map to parent frame client area
+
+ // coords are relative to screen, map to parent frame client area
ptlOwner.x = pswp->x;
ptlOwner.y = pswp->y;
- WinMapWindowPoints( HWND_DESKTOP, pParentFrame->mhWndClient, &ptlOwner, 1);
+ WinMapWindowPoints( HWND_DESKTOP, pParentFrame->mhWndClient, &ptlOwner, 1);
pswp->x = ptlOwner.x;
pswp->y = ptlOwner.y;
// get parent client area size
@@ -143,7 +143,7 @@ BOOL APIENTRY _WinQueryWindowPos( Os2SalFrame* pFrame, PSWP pswp)
pswp->y = swpOwner.cy - (pswp->y + pswp->cy);
#if OSL_DEBUG_LEVEL>1
- debug_printf( "< WinQueryWindowPos hwnd %x at %d,%d (%dx%d)\n",
+ debug_printf( "< WinQueryWindowPos hwnd %x at %d,%d (%dx%d)\n",
pFrame->mhWndFrame, pswp->x, pswp->y, pswp->cx, pswp->cy);
#endif
return rc;
@@ -152,32 +152,32 @@ BOOL APIENTRY _WinQueryWindowPos( Os2SalFrame* pFrame, PSWP pswp)
BOOL APIENTRY _WinSetWindowPos( Os2SalFrame* pFrame, HWND hwndInsertBehind, LONG x, LONG y,
LONG cx, LONG cy, ULONG fl)
{
- SWP swpOwner = {0};
- POINTL ptlOwner = {0};
- HWND hParent = NULL;
+ SWP swpOwner = {0};
+ POINTL ptlOwner = {0};
+ HWND hParent = NULL;
#if OSL_DEBUG_LEVEL>1
- debug_printf( ">WinSetWindowPos hwnd %x at %d,%d (%dx%d) fl 0x%08x\n",
+ debug_printf( ">WinSetWindowPos hwnd %x at %d,%d (%dx%d) fl 0x%08x\n",
pFrame->mhWndFrame, x, y, cx, cy, fl);
#endif
// first resize window if requested
- if ( (fl & SWP_SIZE) ) {
- ULONG flag = SWP_SIZE;
- LONG nX = 0, nY = 0;
- LONG frameFrameX, frameFrameY, frameCaptionY;
+ if ( (fl & SWP_SIZE) ) {
+ ULONG flag = SWP_SIZE;
+ LONG nX = 0, nY = 0;
+ LONG frameFrameX, frameFrameY, frameCaptionY;
ImplSalCalcFrameSize( pFrame, frameFrameX, frameFrameY, frameCaptionY );
// if we change y size, we need to move the window down
// because os2 window origin is lower left corner
if (pFrame->maGeometry.nHeight != cy) {
- SWP aSWP;
+ SWP aSWP;
WinQueryWindowPos( pFrame->mhWndFrame, &aSWP);
nX = aSWP.x;
nY = aSWP.y - (cy + 2*frameFrameY + frameCaptionY - aSWP.cy);
flag |= SWP_MOVE;
}
- WinSetWindowPos( pFrame->mhWndFrame, NULL, nX, nY,
+ WinSetWindowPos( pFrame->mhWndFrame, NULL, nX, nY,
cx+2*frameFrameX, cy+2*frameFrameY+frameCaptionY, flag);
fl = fl & ~SWP_SIZE;
}
@@ -200,8 +200,8 @@ BOOL APIENTRY _WinSetWindowPos( Os2SalFrame* pFrame, HWND hwndInsertBehind, LONG
WinQueryWindowPos( hParent, &swpOwner);
//YD adjust to owner coordinates only when moving and not centering
- //if (!(fl & SWP_CENTER) && (fl & SWP_MOVE))
- if ((fl & SWP_MOVE))
+ //if (!(fl & SWP_CENTER) && (fl & SWP_MOVE))
+ if ((fl & SWP_MOVE))
{
// if SWP_CENTER is specified, change position to parent center
@@ -212,30 +212,30 @@ BOOL APIENTRY _WinSetWindowPos( Os2SalFrame* pFrame, HWND hwndInsertBehind, LONG
debug_printf( "_WinSetWindowPos SWP_CENTER\n");
#endif
fl = fl & ~SWP_CENTER;
- } else {
- // coords are relative to parent frame client area, map to screen
+ } else {
+ // coords are relative to parent frame client area, map to screen
// map Y to OS/2 system coordinates
ptlOwner.x = x;
ptlOwner.y = swpOwner.cy - (y + cy);
#if OSL_DEBUG_LEVEL>0
- debug_printf( "_WinSetWindowPos owner 0x%x at %d,%d (%dx%d) OS2\n",
+ debug_printf( "_WinSetWindowPos owner 0x%x at %d,%d (%dx%d) OS2\n",
hParent, ptlOwner.x, ptlOwner.y, swpOwner.cx, swpOwner.cy);
#endif
}
// map from client area to screen
- WinMapWindowPoints( hParent, HWND_DESKTOP, &ptlOwner, 1);
+ WinMapWindowPoints( hParent, HWND_DESKTOP, &ptlOwner, 1);
x = ptlOwner.x;
y = ptlOwner.y;
#if OSL_DEBUG_LEVEL>0
- debug_printf( "_WinSetWindowPos owner 0x%x at %d,%d (%dx%d) MAPPED OS2\n",
+ debug_printf( "_WinSetWindowPos owner 0x%x at %d,%d (%dx%d) MAPPED OS2\n",
hParent, ptlOwner.x, ptlOwner.y, swpOwner.cx, swpOwner.cy);
#endif
}
#if OSL_DEBUG_LEVEL>0
- debug_printf( "<WinSetWindowPos hwnd %x at %d,%d (%dx%d) fl=%x\n",
+ debug_printf( "<WinSetWindowPos hwnd %x at %d,%d (%dx%d) fl=%x\n",
pFrame->mhWndFrame, x, y, cx, cy, fl);
#endif
return WinSetWindowPos( pFrame->mhWndFrame, hwndInsertBehind, x, y, 0, 0, fl);
@@ -247,8 +247,8 @@ BOOL APIENTRY _WinSetWindowPos( Os2SalFrame* pFrame, HWND hwndInsertBehind, LONG
static void dumpWindowInfo( char* fnc, HWND hwnd)
{
SWP aSWP;
- HWND hwnd2;
- char szTitle[256];
+ HWND hwnd2;
+ char szTitle[256];
}
#endif
@@ -392,9 +392,9 @@ static void ImplSaveFrameState( Os2SalFrame* pFrame )
if ( bVisible )
pFrame->mnShowState = SWP_SHOWNORMAL;
pFrame->mbRestoreMaximize = FALSE;
- //debug_printf( "ImplSaveFrameState: window %08x at %d,%d (size %dx%d)\n",
- // pFrame->mhWndFrame,
- // pFrame->maState.mnX, pFrame->maState.mnY, pFrame->maState.mnWidth, pFrame->maState.mnHeight);
+ //debug_printf( "ImplSaveFrameState: window %08x at %d,%d (size %dx%d)\n",
+ // pFrame->mhWndFrame,
+ // pFrame->maState.mnX, pFrame->maState.mnY, pFrame->maState.mnWidth, pFrame->maState.mnHeight);
}
}
}
@@ -444,7 +444,7 @@ static void ImplSalCalcFrameSize( const Os2SalFrame* pFrame,
nCaptionY = WinQuerySysValue( HWND_DESKTOP, SV_CYTITLEBAR );
else
nCaptionY = 0;
-
+
#if OSL_DEBUG_LEVEL>0
//if (_bCapture)
debug_printf("ImplSalCalcFrameSize 0x%08x x=%d y=%d t=%d\n", pFrame->mhWndFrame, nFrameX, nFrameY, nCaptionY);
@@ -561,14 +561,14 @@ static USHORT aImplTranslateKeyTab[KEY_TAB_SIZE] =
SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle )
{
- SalData* pSalData = GetSalData();
- Os2SalFrame* pFrame = new Os2SalFrame;
- HWND hWndFrame;
- HWND hWndClient;
- ULONG nFrameFlags = FCF_NOBYTEALIGN | FCF_SCREENALIGN;
- ULONG nFrameStyle = 0;
- ULONG nClientStyle = WS_CLIPSIBLINGS;
- BOOL bSubFrame = FALSE;
+ SalData* pSalData = GetSalData();
+ Os2SalFrame* pFrame = new Os2SalFrame;
+ HWND hWndFrame;
+ HWND hWndClient;
+ ULONG nFrameFlags = FCF_NOBYTEALIGN | FCF_SCREENALIGN;
+ ULONG nFrameStyle = 0;
+ ULONG nClientStyle = WS_CLIPSIBLINGS;
+ BOOL bSubFrame = FALSE;
#if OSL_DEBUG_LEVEL>0
debug_printf(">ImplSalCreateFrame hWndParent 0x%x, nSalFrameStyle 0x%x\n", hWndParent, nSalFrameStyle);
@@ -607,7 +607,7 @@ SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSal
nFrameFlags |= FCF_TASKLIST;
}
}
-
+
if( nSalFrameStyle & SAL_FRAME_STYLE_TOOLWINDOW )
{
pFrame->mbNoIcon = TRUE;
@@ -631,12 +631,12 @@ SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSal
// create frame
//YD FIXME this is a potential bug with multiple threads and cuncurrent
//window creation, because this field is accessed in
- //WM_CREATE to get window data,
+ //WM_CREATE to get window data,
pSalData->mpCreateFrame = pFrame;
//YD FIXME if SAL_FRAME_CHILD is specified, use hWndParent as parent handle...
hWndFrame = WinCreateStdWindow( HWND_DESKTOP, nFrameStyle, &nFrameFlags,
- (PSZ)(bSubFrame ? SAL_SUBFRAME_CLASSNAME : SAL_FRAME_CLASSNAME),
+ (PSZ)(bSubFrame ? SAL_SUBFRAME_CLASSNAME : SAL_FRAME_CLASSNAME),
NULL,
nClientStyle, 0, 0, &hWndClient );
debug_printf("ImplSalCreateFrame hWndParent 0x%x, hWndFrame 0x%x, hWndClient 0x%x\n", hWndParent, hWndFrame, hWndClient);
@@ -647,7 +647,7 @@ SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSal
}
// Parent setzen (Owner)
- if ( hWndParent != 0 && hWndParent != HWND_DESKTOP )
+ if ( hWndParent != 0 && hWndParent != HWND_DESKTOP )
WinSetOwner( hWndFrame, hWndParent );
Os2SalFrame* pParentFrame = GetWindowPtr( hWndParent );
@@ -690,7 +690,7 @@ SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSal
// init OS/2 frame data
pFrame->mhAB = pInst->mhAB;
- // YD 18/08 under OS/2, invisible frames have size 0,0 at 0,0, so
+ // YD 18/08 under OS/2, invisible frames have size 0,0 at 0,0, so
// we need to set an initial size/position manually
SWP aSWP;
memset( &aSWP, 0, sizeof( aSWP ) );
@@ -796,7 +796,7 @@ Os2SalFrame::Os2SalFrame()
mbNoIcon = FALSE;
//mSelectedhMenu = 0;
//mLastActivatedhMenu = 0;
- mpParentFrame = NULL;
+ mpParentFrame = NULL;
memset( &maState, 0, sizeof( SalFrameState ) );
maSysData.nSize = sizeof( SystemEnvData );
@@ -1021,8 +1021,8 @@ void Os2SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
USHORT nFlags )
{
// calculation frame size
- USHORT nEvent = 0;
- ULONG nPosFlags = 0;
+ USHORT nEvent = 0;
+ ULONG nPosFlags = 0;
#if OSL_DEBUG_LEVEL > 0
//dumpWindowInfo( "-Os2SalFrame::SetPosSize", mhWndFrame);
@@ -1061,7 +1061,7 @@ void Os2SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
#endif
nEvent = (nEvent == SALEVENT_MOVE) ? SALEVENT_MOVERESIZE : SALEVENT_RESIZE;
}
-
+
// Default-Position, dann zentrieren, ansonsten Position beibehalten
if ( mbDefPos && !(nPosFlags & SWP_MOVE))
{
@@ -1129,14 +1129,14 @@ void Os2SalFrame::SetParent( SalFrame* pNewParent )
{
APIRET rc;
#if OSL_DEBUG_LEVEL>0
- debug_printf("Os2SalFrame::SetParent mhWndFrame 0x%08x to 0x%08x\n",
+ debug_printf("Os2SalFrame::SetParent mhWndFrame 0x%08x to 0x%08x\n",
static_cast<Os2SalFrame*>(this)->mhWndFrame,
static_cast<Os2SalFrame*>(pNewParent)->mhWndClient);
#endif
Os2SalFrame::mbInReparent = TRUE;
- //rc = WinSetParent(static_cast<Os2SalFrame*>(this)->mhWndFrame,
+ //rc = WinSetParent(static_cast<Os2SalFrame*>(this)->mhWndFrame,
// static_cast<Os2SalFrame*>(pNewParent)->mhWndClient, TRUE);
- rc = WinSetOwner(static_cast<Os2SalFrame*>(this)->mhWndFrame,
+ rc = WinSetOwner(static_cast<Os2SalFrame*>(this)->mhWndFrame,
static_cast<Os2SalFrame*>(pNewParent)->mhWndClient);
mpParentFrame = static_cast<Os2SalFrame*>(pNewParent);
Os2SalFrame::mbInReparent = FALSE;
@@ -1151,7 +1151,7 @@ bool Os2SalFrame::SetPluginParent( SystemParentData* pNewParent )
}
Os2SalFrame::mbInReparent = TRUE;
- rc = WinSetOwner(static_cast<Os2SalFrame*>(this)->mhWndFrame,
+ rc = WinSetOwner(static_cast<Os2SalFrame*>(this)->mhWndFrame,
pNewParent->hWnd);
Os2SalFrame::mbInReparent = FALSE;
return true;
@@ -1191,11 +1191,11 @@ void Os2SalFrame::GetClientSize( long& rWidth, long& rHeight )
void Os2SalFrame::SetWindowState( const SalFrameState* pState )
{
- LONG nX;
- LONG nY;
- LONG nWidth;
- LONG nHeight;
- ULONG nPosSize = 0;
+ LONG nX;
+ LONG nY;
+ LONG nWidth;
+ LONG nHeight;
+ ULONG nPosSize = 0;
#if OSL_DEBUG_LEVEL>0
debug_printf("Os2SalFrame::SetWindowState\n");
@@ -1207,7 +1207,7 @@ void Os2SalFrame::SetWindowState( const SalFrameState* pState )
BOOL bVisible = WinIsWindowVisible( mhWndFrame );
// get screen coordinates
- SWP aSWP;
+ SWP aSWP;
WinQueryWindowPos( mhWndFrame, &aSWP );
LONG nFrameX, nFrameY, nCaptionY;
ImplSalCalcFrameSize( this, nFrameX, nFrameY, nCaptionY );
@@ -1242,7 +1242,7 @@ void Os2SalFrame::SetWindowState( const SalFrameState* pState )
nHeight = (int)pState->mnHeight + nTopDeco + nBottomDeco;
else
nHeight = aSWP.cy;
-
+
#if OSL_DEBUG_LEVEL>0
debug_printf("Os2SalFrame::SetWindowState (%dx%d) at %d,%d\n", nWidth,nHeight,nX,nY);
#endif
@@ -1310,8 +1310,8 @@ void Os2SalFrame::SetWindowState( const SalFrameState* pState )
// Wenn Fenster nicht minimiert/maximiert ist oder nicht optisch
// umgesetzt werden muss, dann SetWindowPos() benutzen, da
// SetWindowPlacement() die TaskBar mit einrechnet
- if ( !(aPlacement.fl & SWP_MINIMIZE)
- && !( aPlacement.fl & SWP_MAXIMIZE )
+ if ( !(aPlacement.fl & SWP_MINIMIZE)
+ && !( aPlacement.fl & SWP_MAXIMIZE )
&& (!bVisible || (aPlacement.fl == SWP_RESTORE)) )
{
if( bUpdateHiddenFramePos )
@@ -1321,7 +1321,7 @@ void Os2SalFrame::SetWindowState( const SalFrameState* pState )
SetMaximizedFrameGeometry( mhWndFrame, this );
}
else
- WinSetWindowPos( mhWndFrame, 0, nX,
+ WinSetWindowPos( mhWndFrame, 0, nX,
nScreenHeight - (nY+nHeight), nWidth, nHeight, nPosSize);
}
else
@@ -1333,7 +1333,7 @@ void Os2SalFrame::SetWindowState( const SalFrameState* pState )
aPlacement.cx = nWidth;
aPlacement.cy = nHeight;
}
- WinSetWindowPos( mhWndFrame, 0, aPlacement.x, aPlacement.y,
+ WinSetWindowPos( mhWndFrame, 0, aPlacement.x, aPlacement.y,
aPlacement.cx, aPlacement.cy, aPlacement.fl );
}
@@ -1443,7 +1443,7 @@ static void ImplSalToTop( HWND hWnd, ULONG nFlags )
if ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
{
- ULONG nStyle;
+ ULONG nStyle;
if ( pFrame->mbRestoreMaximize )
nStyle = SWP_MAXIMIZE;
else
@@ -1458,7 +1458,7 @@ static void ImplSalToTop( HWND hWnd, ULONG nFlags )
void Os2SalFrame::ToTop( USHORT nFlags )
{
- nFlags &= ~SAL_FRAME_TOTOP_GRABFOCUS; // this flag is not needed on win32
+ nFlags &= ~SAL_FRAME_TOTOP_GRABFOCUS; // this flag is not needed on win32
// Post this Message to the window, because this only works
// in the thread of the window, which has create this window.
// We post this message to avoid deadlocks
@@ -1474,7 +1474,7 @@ void Os2SalFrame::SetPointer( PointerStyle ePointerStyle )
{
struct ImplPtrData
{
- HPOINTER mhPointer;
+ HPOINTER mhPointer;
ULONG mnSysId;
ULONG mnOwnId;
};
@@ -1588,7 +1588,7 @@ void Os2SalFrame::SetPointer( PointerStyle ePointerStyle )
#endif
//debug_printf("Os2SalFrame::SetPointer\n");
-
+
// Mousepointer loaded ?
if ( !aImplPtrTab[ePointerStyle].mhPointer )
{
@@ -1820,7 +1820,7 @@ XubString Os2SalFrame::GetKeyName( USHORT nCode )
case KEY_DELETE:
aCode = pLangTab[LSTR_KEY_DELETE];
break;
-
+
case KEY_ADD:
aCode += '+';
break;
@@ -1991,7 +1991,7 @@ static BOOL ImplOS2NameFontToVCLFont( const char* pFontName, Font& rFont )
rFont.SetItalic( ITALIC_NONE );
// search for a style embedded in the name, e.g. 'WarpSans Bold'
// because we need to split the style from the family name
- if (strstr( pFontName, " Bold")
+ if (strstr( pFontName, " Bold")
|| strstr( pFontName, " Italic")
|| strstr( pFontName, "-Normal"))
{
@@ -2014,13 +2014,13 @@ static BOOL ImplOS2NameFontToVCLFont( const char* pFontName, Font& rFont )
// store family name
rFont.SetName( ::rtl::OStringToOUString ( fontName, gsl_getSystemTextEncoding()) );
free( fontName);
- }
+ }
else
{
rFont.SetName( ::rtl::OStringToOUString (pFontName, gsl_getSystemTextEncoding()) );
rFont.SetStyleName( ::rtl::OStringToOUString ("", gsl_getSystemTextEncoding()) );
}
-
+
rFont.SetSize( Size( 0, nFontHeight ) );
return TRUE;
}
@@ -2451,7 +2451,7 @@ static long ImplHandleMouseMsg( HWND hWnd,
// and sent a mouse leave message to the application which killed the help window, ie ourself
if( !WinIsWindow( pFrame->mhAB, hWnd ) )
return 0;
-
+
#if OSL_DEBUG_LEVEL>10
//if (_bCapture)
debug_printf("ImplHandleMouseMsg mouse %d,%d\n",aMouseEvt.mnX,aMouseEvt.mnY);
@@ -2465,7 +2465,7 @@ static long ImplHandleMouseMsg( HWND hWnd,
// --- RTL --- (mirror mouse pos)
//if( Application::GetSettings().GetLayoutRTL() )
// aMouseEvt.mnX = pFrame->maGeometry.nWidth-1-aMouseEvt.mnX;
-
+
nRet = pFrame->CallCallback( nEvent, &aMouseEvt );
if ( nMsg == WM_MOUSEMOVE )
{
@@ -2498,13 +2498,13 @@ static long ImplHandleWheelMsg( HWND hWnd, UINT nMsg, MPARAM nMP1, MPARAM nMP2 )
aPt.y = pFrame->mnHeight - aPt.y - 1;
SalWheelMouseEvent aWheelEvt;
- aWheelEvt.mnTime = WinQueryMsgTime( pFrame->mhAB );
- aWheelEvt.mnX = aPt.x;
- aWheelEvt.mnY = aPt.y;
- aWheelEvt.mnCode = 0;
+ aWheelEvt.mnTime = WinQueryMsgTime( pFrame->mhAB );
+ aWheelEvt.mnX = aPt.x;
+ aWheelEvt.mnY = aPt.y;
+ aWheelEvt.mnCode = 0;
bool bNeg = (SHORT2FROMMP(nMP2) == SB_LINEDOWN || SHORT2FROMMP(nMP2) == SB_PAGEDOWN );
- aWheelEvt.mnDelta = bNeg ? -120 : 120;
- aWheelEvt.mnNotchDelta = bNeg ? -1 : 1;
+ aWheelEvt.mnDelta = bNeg ? -120 : 120;
+ aWheelEvt.mnNotchDelta = bNeg ? -1 : 1;
if (SHORT2FROMMP(nMP2) == SB_PAGEUP || SHORT2FROMMP(nMP2) == SB_PAGEDOWN)
aWheelEvt.mnScrollLines = SAL_WHEELMOUSE_EVENT_PAGESCROLL;
else
@@ -2538,7 +2538,7 @@ static USHORT ImplSalGetKeyCode( Os2SalFrame* pFrame, MPARAM aMP1, MPARAM aMP2 )
UCHAR nCharCode = (UCHAR)SHORT1FROMMP( aMP2 );
USHORT nKeyCode = (UCHAR)SHORT2FROMMP( aMP2 );
UCHAR nScanCode = (UCHAR)CHAR4FROMMP( aMP1 );
- USHORT rSVCode = 0;
+ USHORT rSVCode = 0;
// Ist virtueller KeyCode gesetzt und befindet sich der KeyCode in der
// Tabelle, dann mappen
@@ -2598,7 +2598,7 @@ static USHORT ImplSalGetKeyCode( Os2SalFrame* pFrame, MPARAM aMP1, MPARAM aMP2 )
rSVCode = KEY_COMMA;
if ( nCharCode == '.' )
rSVCode = KEY_POINT;
-
+
return rSVCode;
}
@@ -2606,15 +2606,15 @@ static USHORT ImplSalGetKeyCode( Os2SalFrame* pFrame, MPARAM aMP1, MPARAM aMP2 )
static void ImplUpdateInputLang( Os2SalFrame* pFrame )
{
- BOOL bLanguageChange = FALSE;
- ULONG nLang = 0;
- APIRET rc;
+ BOOL bLanguageChange = FALSE;
+ ULONG nLang = 0;
+ APIRET rc;
UconvObject uconv_object = NULL;
LocaleObject locale_object = NULL;
- UniChar *pinfo_item;
+ UniChar *pinfo_item;
- // we do not support change of input language while working,
- // so exit if already defined (mnInputLang is a static class field)
+ // we do not support change of input language while working,
+ // so exit if already defined (mnInputLang is a static class field)
if (pFrame->mnInputLang)
return;
@@ -2638,14 +2638,14 @@ static void ImplUpdateInputLang( Os2SalFrame* pFrame )
// keep input lang up-to-date
#if OSL_DEBUG_LEVEL>10
- debug_printf("ImplUpdateInputLang pFrame %08x lang changed from %d to %d\n",
+ debug_printf("ImplUpdateInputLang pFrame %08x lang changed from %d to %d\n",
pFrame, pFrame->mnInputLang, nLang);
#endif
pFrame->mnInputLang = nLang;
}
-static sal_Unicode ImplGetCharCode( Os2SalFrame* pFrame, USHORT nKeyFlags,
+static sal_Unicode ImplGetCharCode( Os2SalFrame* pFrame, USHORT nKeyFlags,
sal_Char nCharCode, UCHAR nScanCode )
{
ImplUpdateInputLang( pFrame );
@@ -2684,7 +2684,7 @@ static sal_Unicode ImplConvertKey( Os2SalFrame* pFrame, MPARAM aMP1, MPARAM aMP2
UCHAR nCharCode = (UCHAR)SHORT1FROMMP( aMP2 );
USHORT nKeyCode = (UCHAR)SHORT2FROMMP( aMP2 );
UCHAR nScanCode = (UCHAR)CHAR4FROMMP( aMP1 );
- sal_Unicode rSVCharCode = 0;
+ sal_Unicode rSVCharCode = 0;
// Ist Character-Code gesetzt
// !!! Bei CTRL/ALT ist KC_CHAR nicht gesetzt, jedoch moechten wir
@@ -2709,7 +2709,7 @@ static long ImplHandleKeyMsg( HWND hWnd,
USHORT nModCode = 0;
USHORT nSVCode = 0;
USHORT nOS2KeyCode = (UCHAR)SHORT2FROMMP( nMP2 );
- sal_Unicode nSVCharCode = 0;
+ sal_Unicode nSVCharCode = 0;
long nRet = 0;
Os2SalFrame* pFrame = GetWindowPtr( hWnd );
@@ -2882,17 +2882,17 @@ static void UpdateFrameGeometry( HWND hWnd, Os2SalFrame* pFrame )
if( !pFrame )
return;
- //SalFrame has a
- //maGeometry member that holds absolute screen positions (and needs to be
+ //SalFrame has a
+ //maGeometry member that holds absolute screen positions (and needs to be
//updated if the window is moved by the way).
-
+
// reset data
memset(&pFrame->maGeometry, 0, sizeof(SalFrameGeometry) );
- SWP swp;
+ SWP swp;
LONG nFrameX, nFrameY, nCaptionY;
-
- // get frame size
+
+ // get frame size
WinQueryWindowPos(pFrame->mhWndFrame, &swp);
if (swp.fl & SWP_MINIMIZE)
return;
@@ -2945,16 +2945,16 @@ static void ImplHandleMoveMsg( HWND hWnd)
ImplSalFrameFullScreenPos( pFrame );
pFrame->mbInMoveMsg = FALSE;
}
-
+
// Status merken
ImplSaveFrameState( pFrame );
-
+
// Call Hdl
//#93851 if we call this handler, VCL floating windows are not updated correctly
//ImplCallMoveHdl( hWnd );
}
-
+
ImplSalYieldMutexRelease();
}
else
@@ -3364,10 +3364,10 @@ inline void ImplHandleIMECloseCandidate( Os2SalFrame* pFrame )
MRESULT EXPENTRY SalFrameWndProc( HWND hWnd, ULONG nMsg,
MPARAM nMP1, MPARAM nMP2 )
{
- Os2SalFrame* pFrame = (Os2SalFrame*)GetWindowPtr( hWnd );
- MRESULT nRet = (MRESULT)0;
- BOOL bDef = TRUE;
- bool bCheckTimers= false;
+ Os2SalFrame* pFrame = (Os2SalFrame*)GetWindowPtr( hWnd );
+ MRESULT nRet = (MRESULT)0;
+ BOOL bDef = TRUE;
+ bool bCheckTimers= false;
#if OSL_DEBUG_LEVEL>10
if (nMsg!=WM_TIMER && nMsg!=WM_MOUSEMOVE)
diff --git a/vcl/os2/source/window/salmenu.cxx b/vcl/os2/source/window/salmenu.cxx
index fa8f74202b0a..92834fadfb9d 100644
--- a/vcl/os2/source/window/salmenu.cxx
+++ b/vcl/os2/source/window/salmenu.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +75,7 @@ Os2SalMenu::~Os2SalMenu()
BOOL Os2SalMenu::VisibleMenuBar()
{
- return FALSE;
+ return FALSE;
}
void Os2SalMenu::SetFrame( const SalFrame *pFrame )
diff --git a/vcl/os2/source/window/salobj.cxx b/vcl/os2/source/window/salobj.cxx
index 0827f0de9a14..3b7c9b0b3266 100644
--- a/vcl/os2/source/window/salobj.cxx
+++ b/vcl/os2/source/window/salobj.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +56,8 @@ static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
static Os2SalObject* ImplFindOs2SalObject( HWND hWndChild )
{
- SalData* pSalData = GetSalData();
- Os2SalObject* pObject = pSalData->mpFirstObject;
+ SalData* pSalData = GetSalData();
+ Os2SalObject* pObject = pSalData->mpFirstObject;
while ( pObject )
{
if ( ImplIsSysWindowOrChild( pObject->mhWndChild, hWndChild ) )
@@ -77,8 +77,8 @@ BOOL EXPENTRY SalSysMsgProc( HAB /* hAB */, QMSG* pMsg, ULONG /* fs */ )
(pMsg->msg == WM_BUTTON2DOWN) ||
(pMsg->msg == WM_BUTTON3DOWN) )
{
- SalData* pSalData = GetSalData();
- Os2SalObject* pObject = ImplFindOs2SalObject( pMsg->hwnd );
+ SalData* pSalData = GetSalData();
+ Os2SalObject* pObject = ImplFindOs2SalObject( pMsg->hwnd );
if ( pObject )
WinPostMsg( pObject->mhWnd, SALOBJ_MSG_TOTOP, 0, 0 );
}
@@ -95,9 +95,9 @@ BOOL EXPENTRY SalSysMsgProc( HAB /* hAB */, QMSG* pMsg, ULONG /* fs */ )
MRESULT EXPENTRY SalSysObjWndProc( HWND hWnd, ULONG nMsg,
MPARAM nMP1, MPARAM nMP2 )
{
- Os2SalObject* pSysObj;
- MRESULT nRet = 0;
- int bDef = TRUE;
+ Os2SalObject* pSysObj;
+ MRESULT nRet = 0;
+ int bDef = TRUE;
#if OSL_DEBUG_LEVEL>0
debug_printf( "SalSysObjWndProc hWnd 0x%x nMsg %d\n", hWnd, nMsg);
@@ -111,8 +111,8 @@ MRESULT EXPENTRY SalSysObjWndProc( HWND hWnd, ULONG nMsg,
break;
case WM_PAINT:
{
- HPS hPS;
- RECTL aRect;
+ HPS hPS;
+ RECTL aRect;
hPS = WinBeginPaint( hWnd, NULLHANDLE, &aRect );
WinEndPaint( hPS );
bDef = FALSE;
@@ -194,8 +194,8 @@ MRESULT EXPENTRY SalSysObjWndProc( HWND hWnd, ULONG nMsg,
MRESULT EXPENTRY SalSysObjChildWndProc( HWND hWnd, ULONG nMsg,
MPARAM nMP1, MPARAM nMP2 )
{
- MRESULT nRet = 0;
- int bDef = TRUE;
+ MRESULT nRet = 0;
+ int bDef = TRUE;
debug_printf( "SalSysObjChildWndProc hWnd 0x%x nMsg %d\n", hWnd, nMsg);
@@ -210,8 +210,8 @@ MRESULT EXPENTRY SalSysObjChildWndProc( HWND hWnd, ULONG nMsg,
break;
case WM_PAINT:
{
- HPS hPS;
- RECTL aRect;
+ HPS hPS;
+ RECTL aRect;
hPS = WinBeginPaint( hWnd, NULLHANDLE, &aRect );
WinEndPaint( hPS );
bDef = FALSE;
@@ -229,8 +229,8 @@ MRESULT EXPENTRY SalSysObjChildWndProc( HWND hWnd, ULONG nMsg,
MRESULT EXPENTRY SalSysObjClipWndProc( HWND hWnd, ULONG nMsg,
MPARAM nMP1, MPARAM nMP2 )
{
- MRESULT nRet = 0;
- int bDef = TRUE;
+ MRESULT nRet = 0;
+ int bDef = TRUE;
debug_printf( "SalSysObjClipWndProc hWnd 0x%x nMsg %d\n", hWnd, nMsg);
@@ -283,8 +283,8 @@ MRESULT EXPENTRY SalSysObjClipWndProc( HWND hWnd, ULONG nMsg,
break;
case WM_PAINT:
{
- HPS hPS;
- RECTL aRect;
+ HPS hPS;
+ RECTL aRect;
hPS = WinBeginPaint( hWnd, NULLHANDLE, &aRect );
WinEndPaint( hPS );
bDef = FALSE;
@@ -384,15 +384,15 @@ Os2SalObject::Os2SalObject()
{
SalData* pSalData = GetSalData();
- mhLastClipWnd = HWND_TOP;
+ mhLastClipWnd = HWND_TOP;
- mhWnd = 0;
- mhWndChild = 0;
- mhLastFocusWnd = 0;
- maSysData.nSize = sizeof( SystemEnvData );
- mnHeight = 0;
- mpInst = NULL;
- mpProc = ImplSalObjCallbackDummy;
+ mhWnd = 0;
+ mhWndChild = 0;
+ mhLastFocusWnd = 0;
+ maSysData.nSize = sizeof( SystemEnvData );
+ mnHeight = 0;
+ mpInst = NULL;
+ mpProc = ImplSalObjCallbackDummy;
// Hook installieren, wenn es das erste Os2SalObject ist
if ( !pSalData->mpFirstObject )
diff --git a/vcl/qa/complex/memCheck/CheckMemoryUsage.java b/vcl/qa/complex/memCheck/CheckMemoryUsage.java
index 9f8272240403..0e61cf22c3e7 100644
--- a/vcl/qa/complex/memCheck/CheckMemoryUsage.java
+++ b/vcl/qa/complex/memCheck/CheckMemoryUsage.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +47,12 @@ import util.WriterTools;
import util.utils;
/**
- * Documents are opened and exported with StarOffice. The memory usage of
+ * Documents are opened and exported with StarOffice. The memory usage of
* StarOffice is monitored and if the usage exceeds the allowed kilobytes,
- * the test is failed. Used for monitoring the StarOffice process is the
+ * the test is failed. Used for monitoring the StarOffice process is the
* command line tool 'pmap', available on Solaris or Linux. This test will not
- * run on Windows.<br>Test procedure: every given document type is searched in
- * the source directory
+ * run on Windows.<br>Test procedure: every given document type is searched in
+ * the source directory
* Needed paramters:
* <ul>
* <li>"TestDocumentPath" - the path where test documents are located.</li>
@@ -85,7 +85,7 @@ public class CheckMemoryUsage extends ComplexTestCase {
private String[][] sDocuments;
private int iAllowMemoryIncrease = 10;
private int iExportDocCount = 25;
-
+
/**
* Get all test methods
* @return The test methods.
@@ -93,7 +93,7 @@ public class CheckMemoryUsage extends ComplexTestCase {
public String[] getTestMethodNames() {
return new String[] {"loadAndSaveDocuments"};
}
-
+
/**
* Collect all documnets to load and all filters used for export.
*/
@@ -104,12 +104,12 @@ public class CheckMemoryUsage extends ComplexTestCase {
+ "displays the memory usage of StarOffice.");
failed("Test does not run on Windows, only on Solaris or Linux.");
}
-
+
// how many times is every document exported.
int count = param.getInt("ExportDocCount");
if (count != 0)
iExportDocCount = count;
-
+
// get the temp dir for creating the command scripts.
sTempDir = System.getProperty("java.io.tmpdir");
sProcessIdCommand = sTempDir + "getPS";
@@ -130,7 +130,7 @@ public class CheckMemoryUsage extends ComplexTestCase {
v.add(sCalcDoc);
v.add(sImpressDoc);
}
- // store a file extension
+ // store a file extension
sDocTypeExportFilter = new String[v.size()][2];
for (int i=0; i<v.size(); i++) {
// 2do: error routine for wrong given params
@@ -173,14 +173,14 @@ public class CheckMemoryUsage extends ComplexTestCase {
f = new File(sOfficeMemoryCommand);
f.delete();
}
-
+
/**
* Thet etst function: load documents and save them using the given filters
* for each given document type.
*/
public void loadAndSaveDocuments() {
int storageBefore = getOfficeMemoryUsage();
-
+
XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
// iterate over all document types
@@ -233,14 +233,14 @@ public class CheckMemoryUsage extends ComplexTestCase {
mem = storageAfter;
storageAfter = getOfficeMemoryUsage();
shortWait(1000);
- }
+ }
assure("The Office consumes now " + (storageAfter - storageBefore)
+ "K more memory than at the start of the test; allowed were "
- + iAllowMemoryIncrease * iExportDocCount + "K.",
+ + iAllowMemoryIncrease * iExportDocCount + "K.",
storageAfter - storageBefore < iAllowMemoryIncrease * iExportDocCount);
-
+
}
-
+
/**
* Get the process ID from the Office
* @return the Id as String
@@ -258,7 +258,7 @@ public class CheckMemoryUsage extends ComplexTestCase {
String id = aToken.nextToken();
return id;
}
-
+
/**
* Get the memory usage of the Office in KByte.
* @return The memory used by the Office.
@@ -271,16 +271,16 @@ public class CheckMemoryUsage extends ComplexTestCase {
String text = processID.getOutputText();
if (text == null || text.equals("") || text.indexOf(' ') == -1) {
failed("Could not determine Office memory usage. Check " + sOfficeMemoryCommand);
- }
+ }
StringTokenizer aToken = new StringTokenizer(text);
// this works, because the output of pmap is quite standardized.
aToken.nextToken();
String mem = aToken.nextToken();
- mem = mem.substring(0, mem.indexOf('K'));
+ mem = mem.substring(0, mem.indexOf('K'));
Integer memory = new Integer(mem);
return memory.intValue();
}
-
+
/**
* Write a script file and set its rights to rwxrwxrwx.
* @param fileName The name of the created file
@@ -309,9 +309,9 @@ public class CheckMemoryUsage extends ComplexTestCase {
Thread.sleep(milliSeconds);
}
catch(java.lang.InterruptedException e) { // ignore
- }
+ }
}
-
+
/**
* Own file filter, will just return ok for all files that end with a given
* suffix
diff --git a/vcl/qa/complex/persistent_window_states/DocumentHandle.java b/vcl/qa/complex/persistent_window_states/DocumentHandle.java
index 0b32eaaeff51..c7c3b6a045b0 100644
--- a/vcl/qa/complex/persistent_window_states/DocumentHandle.java
+++ b/vcl/qa/complex/persistent_window_states/DocumentHandle.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/qa/complex/persistent_window_states/PersistentWindowTest.java b/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java
index edceeeafd883..1e5d3a8e7a2c 100644
--- a/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java
+++ b/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index cee78645b9f2..9bfb6d2d5bab 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -626,9 +626,9 @@ BOOL DbgWindow::Close()
// remember window position
ByteString aState( GetWindowState() );
DbgData* pData = DbgGetData();
- strncpy( pData->aDbgWinState,
- aState.GetBuffer(),
- std::min( sizeof( pData->aDbgWinState ),
+ strncpy( pData->aDbgWinState,
+ aState.GetBuffer(),
+ std::min( sizeof( pData->aDbgWinState ),
size_t(aState.Len() + 1U )) );
pData->aDbgWinState[ sizeof( pData->aDbgWinState ) - 1 ] = 0;
// and save for next session
@@ -998,7 +998,7 @@ DbgDialog::DbgDialog() :
maOverwrite.SetPosSizePixel( LogicToPixel( Point( 205, 130 ), aAppMap ),
aButtonSize );
}
-
+
{
maHookOSLBox.Show();
maHookOSLBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Reroute osl debug ~messages" ) ) );
@@ -1526,7 +1526,7 @@ void DbgDialogTest( Window* pWindow )
"%s should have a mnemonic char (~): %s",
pClass,
ByteString( aErrorText, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
-
+
// check text width
int aWidth=0;
switch( pChild->GetType() )
@@ -1575,7 +1575,7 @@ void DbgDialogTest( Window* pWindow )
int aWidth=0;
if( nAccelPos != STRING_NOTFOUND )
{
- aWidth = pChild->GetTextWidth( aText, 0, nAccelPos ) +
+ aWidth = pChild->GetTextWidth( aText, 0, nAccelPos ) +
pChild->GetTextWidth( aText, nAccelPos+1, aText.Len() - nAccelPos - 1);
}
else
@@ -1799,7 +1799,7 @@ class DbgMessageBox : public ErrorBox
SetText( String( RTL_CONSTASCII_USTRINGPARAM("Debug Output") ) );
AddButton( String( RTL_CONSTASCII_USTRINGPARAM( "Copy" ) ), COPY_BUTTON_ID, 0 );
}
-
+
virtual void Click()
{
if( GetCurButtonId() == COPY_BUTTON_ID )
diff --git a/vcl/source/app/dndhelp.cxx b/vcl/source/app/dndhelp.cxx
index ceaa8f904816..46a0eac19d4a 100644
--- a/vcl/source/app/dndhelp.cxx
+++ b/vcl/source/app/dndhelp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,7 @@ vcl::unohelper::DragAndDropWrapper::DragAndDropWrapper( DragAndDropClient* pClie
vcl::unohelper::DragAndDropWrapper::~DragAndDropWrapper()
{
}
-
+
// uno::XInterface
uno::Any vcl::unohelper::DragAndDropWrapper::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
{
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 277154394541..c6fc815854d0 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// =======================================================================
-#define HELPWINSTYLE_QUICK 0
-#define HELPWINSTYLE_BALLOON 1
+#define HELPWINSTYLE_QUICK 0
+#define HELPWINSTYLE_BALLOON 1
-#define HELPTEXTMARGIN_QUICK 3
-#define HELPTEXTMARGIN_BALLOON 6
+#define HELPTEXTMARGIN_QUICK 3
+#define HELPTEXTMARGIN_BALLOON 6
-#define HELPDELAY_NORMAL 1
-#define HELPDELAY_SHORT 2
-#define HELPDELAY_NONE 3
+#define HELPDELAY_NORMAL 1
+#define HELPDELAY_SHORT 2
+#define HELPDELAY_NONE 3
// =======================================================================
@@ -125,8 +125,8 @@ BOOL Help::StartContextHelp()
Window* pWindow = pSVData->maWinData.mpFocusWin;
if ( pWindow )
{
- Point aMousePos = pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() );
- HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
+ Point aMousePos = pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() );
+ HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
pWindow->RequestHelp( aHelpEvent );
return TRUE;
}
@@ -322,7 +322,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT
mnHelpWinStyle = nHelpWinStyle;
mnStyle = nStyle;
// on windows this will raise the application window, because help windows are system windows now
-// EnableAlwaysOnTop();
+// EnableAlwaysOnTop();
EnableSaveBackground();
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -397,9 +397,9 @@ void HelpTextWindow::SetHelpText( const String& rHelpText )
}
else // HELPWINSTYLE_BALLOON
{
- Point aTmpPoint;
- USHORT nCharsInLine = 35 + ((maHelpText.Len()/100)*5);
- XubString aXXX;
+ Point aTmpPoint;
+ USHORT nCharsInLine = 35 + ((maHelpText.Len()/100)*5);
+ XubString aXXX;
aXXX.Fill( nCharsInLine, 'x' ); // Durchschnittliche Breite, damit nicht jedes Fenster anders.
long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
@@ -635,7 +635,7 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
ULONG nCurTime = Time::GetSystemTicks();
if( (nCurTime - pSVData->maHelpData.mnLastHelpHideTime) < pParent->GetSettings().GetHelpSettings().GetTipDelay() )
nDelayMode = HELPDELAY_NONE;
-
+
DBG_ASSERT( !pHelpWin, "Noch ein HelpWin ?!" );
pHelpWin = new HelpTextWindow( pParent, rHelpText, nHelpWinStyle, nStyle );
pSVData->maHelpData.mpHelpWin = pHelpWin;
@@ -643,7 +643,7 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
if ( pHelpArea )
pHelpWin->SetHelpArea( *pHelpArea );
- // positioning
+ // positioning
Size aSz = pHelpWin->CalcOutSize();
pHelpWin->SetOutputSizePixel( aSz );
ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, rScreenPos, pHelpArea );
@@ -681,9 +681,9 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
void ImplSetHelpWindowPos( Window* pHelpWin, USHORT nHelpWinStyle, USHORT nStyle,
const Point& rPos, const Rectangle* pHelpArea )
{
- Point aPos = rPos;
- Size aSz = pHelpWin->GetSizePixel();
- Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel();
+ Point aPos = rPos;
+ Size aSz = pHelpWin->GetSizePixel();
+ Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel();
aPos = pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( aPos );
// get mouse screen coords
Point mPos( pHelpWin->GetParent()->ImplGetFrameWindow()->GetPointerPosPixel() );
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 6841d84b424b..c5cd3e796bb6 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +87,16 @@ LocaleDataWrapper& vcl::I18nHelper::ImplGetLocaleDataWrapper() const
return *mpLocaleDataWrapper;
}
-const ::com::sun::star::lang::Locale& vcl::I18nHelper::getLocale() const
+const ::com::sun::star::lang::Locale& vcl::I18nHelper::getLocale() const
{
- return maLocale;
+ return maLocale;
}
inline bool is_formatting_mark( sal_Unicode c )
{
- if( (c >= 0x200B) && (c <= 0x200F) ) // BiDi and zero-width-markers
+ if( (c >= 0x200B) && (c <= 0x200F) ) // BiDi and zero-width-markers
return true;
- if( (c >= 0x2028) && (c <= 0x202E) ) // BiDi and paragraph-markers
+ if( (c >= 0x2028) && (c <= 0x202E) ) // BiDi and paragraph-markers
return true;
return false;
}
@@ -105,7 +105,7 @@ inline bool is_formatting_mark( sal_Unicode c )
the transliteration. The real solution would have been an additional TransliterationModule
to ignore these marks during transliteration; however changin the code in i18npool that actually
implements this could produce unwanted side effects.
-
+
Of course this copying around is not really good, but looking at i18npool, one more time
will not hurt.
*/
@@ -136,7 +136,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rSt
((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL;
}
-
+
String aStr1( filterFormattingChars(rStr1) );
String aStr2( filterFormattingChars(rStr2) );
return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 );
diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx
index 775c57cc7b99..c90dc4cd297c 100644
--- a/vcl/source/app/idlemgr.cxx
+++ b/vcl/source/app/idlemgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 08f199d5281c..78de44aae9c8 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/app/session.cxx b/vcl/source/app/session.cxx
index 6874eb80285b..c3a36fb1c537 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +53,10 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
{
struct Listener
{
- Reference< XSessionManagerListener > m_xListener;
- bool m_bInteractionRequested;
- bool m_bInteractionDone;
- bool m_bSaveDone;
+ Reference< XSessionManagerListener > m_xListener;
+ bool m_bInteractionRequested;
+ bool m_bInteractionDone;
+ bool m_bSaveDone;
Listener( const Reference< XSessionManagerListener >& xListener )
: m_xListener( xListener ),
@@ -66,13 +66,13 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
{}
};
- std::list< Listener > m_aListeners;
- SalSession* m_pSession;
- osl::Mutex m_aMutex;
- bool m_bInteractionRequested;
- bool m_bInteractionGranted;
- bool m_bInteractionDone;
- bool m_bSaveDone;
+ std::list< Listener > m_aListeners;
+ SalSession* m_pSession;
+ osl::Mutex m_aMutex;
+ bool m_bInteractionRequested;
+ bool m_bInteractionGranted;
+ bool m_bInteractionDone;
+ bool m_bSaveDone;
static void SalSessionEventProc( SalSessionEvent* pEvent );
static VCLSession* pOneInstance;
@@ -84,7 +84,7 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
public:
VCLSession();
virtual ~VCLSession();
-
+
virtual void SAL_CALL addSessionManagerListener( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
virtual void SAL_CALL removeSessionManagerListener( const Reference< XSessionManagerListener>& xListener ) throw( RuntimeException );
virtual void SAL_CALL queryInteraction( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
@@ -136,7 +136,7 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable )
// without session we assume UI is always possible,
// so it was reqeusted and granted
m_bInteractionRequested = m_bInteractionGranted = m_pSession ? false : true;
-
+
// answer the session manager even if no listeners available anymore
DBG_ASSERT( ! aListeners.empty(), "saveRequested but no listeners !" );
if( aListeners.empty() )
@@ -178,7 +178,7 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted )
ULONG nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->approveInteraction( bInteractionGranted );
-
+
Application::AcquireSolarMutex( nAcquireCount );
}
@@ -248,7 +248,7 @@ void VCLSession::SalSessionEventProc( SalSessionEvent* pEvent )
void SAL_CALL VCLSession::addSessionManagerListener( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
-
+
m_aListeners.push_back( Listener( xListener ) );
}
@@ -266,7 +266,7 @@ void SAL_CALL VCLSession::removeSessionManagerListener( const Reference<XSession
}
else
++it;
- }
+ }
}
void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
@@ -290,8 +290,8 @@ void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListe
{
if( it->m_xListener == xListener )
{
- it->m_bInteractionRequested = true;
- it->m_bInteractionDone = false;
+ it->m_bInteractionRequested = true;
+ it->m_bInteractionDone = false;
}
}
}
@@ -365,7 +365,7 @@ Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XM
ImplSVData* pSVData = ImplGetSVData();
if( ! pSVData->xSMClient.is() )
pSVData->xSMClient = new VCLSession();
-
+
return Reference< XInterface >(pSVData->xSMClient, UNO_QUERY );
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 1530a0649689..20adcc878395 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -430,11 +430,11 @@ ImplStyleData::ImplStyleData()
mnSelectionOptions = 0;
mnDisplayOptions = 0;
mnOptions = 0;
- mnAutoMnemonic = 1;
- mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
- mnSymbolsStyle = STYLE_SYMBOLS_AUTO;
- mnUseImagesInMenus = STYLE_MENUIMAGES_AUTO;
- mnPreferredSymbolsStyle = STYLE_SYMBOLS_AUTO;
+ mnAutoMnemonic = 1;
+ mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
+ mnSymbolsStyle = STYLE_SYMBOLS_AUTO;
+ mnUseImagesInMenus = STYLE_MENUIMAGES_AUTO;
+ mnPreferredSymbolsStyle = STYLE_SYMBOLS_AUTO;
mpFontOptions = NULL;
SetStandardStyles();
@@ -532,17 +532,17 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
mnSelectionOptions = rData.mnSelectionOptions;
mnDisplayOptions = rData.mnDisplayOptions;
mnOptions = rData.mnOptions;
- mnHighContrast = rData.mnHighContrast;
- mnUseSystemUIFonts = rData.mnUseSystemUIFonts;
- mnUseFlatBorders = rData.mnUseFlatBorders;
- mnUseFlatMenues = rData.mnUseFlatMenues;
- mnAutoMnemonic = rData.mnAutoMnemonic;
- mnUseImagesInMenus = rData.mnUseImagesInMenus;
- mbPreferredUseImagesInMenus = rData.mbPreferredUseImagesInMenus;
- mnSkipDisabledInMenus = rData.mnSkipDisabledInMenus;
- mnToolbarIconSize = rData.mnToolbarIconSize;
- mnSymbolsStyle = rData.mnSymbolsStyle;
- mnPreferredSymbolsStyle = rData.mnPreferredSymbolsStyle;
+ mnHighContrast = rData.mnHighContrast;
+ mnUseSystemUIFonts = rData.mnUseSystemUIFonts;
+ mnUseFlatBorders = rData.mnUseFlatBorders;
+ mnUseFlatMenues = rData.mnUseFlatMenues;
+ mnAutoMnemonic = rData.mnAutoMnemonic;
+ mnUseImagesInMenus = rData.mnUseImagesInMenus;
+ mbPreferredUseImagesInMenus = rData.mbPreferredUseImagesInMenus;
+ mnSkipDisabledInMenus = rData.mnSkipDisabledInMenus;
+ mnToolbarIconSize = rData.mnToolbarIconSize;
+ mnSymbolsStyle = rData.mnSymbolsStyle;
+ mnPreferredSymbolsStyle = rData.mnPreferredSymbolsStyle;
mpFontOptions = rData.mpFontOptions;
}
@@ -615,7 +615,7 @@ void ImplStyleData::SetStandardStyles()
maLinkColor = Color( COL_BLUE );
maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
maHighlightLinkColor = Color( COL_LIGHTBLUE );
- maFontColor = Color( COL_BLACK );
+ maFontColor = Color( COL_BLACK );
mnRadioButtonStyle &= ~STYLE_RADIOBUTTON_STYLE;
mnCheckBoxStyle &= ~STYLE_CHECKBOX_STYLE;
@@ -628,12 +628,12 @@ void ImplStyleData::SetStandardStyles()
mnFloatTitleHeight = 13;
mnTearOffTitleHeight = 8;
mnMenuBarHeight = 14;
- mnHighContrast = 0;
- mnUseSystemUIFonts = 1;
- mnUseFlatBorders = 0;
- mnUseFlatMenues = 0;
- mbPreferredUseImagesInMenus = TRUE;
- mnSkipDisabledInMenus = (USHORT)FALSE;
+ mnHighContrast = 0;
+ mnUseSystemUIFonts = 1;
+ mnUseFlatBorders = 0;
+ mnUseFlatMenues = 0;
+ mbPreferredUseImagesInMenus = TRUE;
+ mnSkipDisabledInMenus = (USHORT)FALSE;
Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
maWorkspaceGradient = Wallpaper( aGrad );
@@ -1031,7 +1031,7 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
return TRUE;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) &&
- (mpData->mnAutoMnemonic == rSet.mpData->mnAutoMnemonic) &&
+ (mpData->mnAutoMnemonic == rSet.mpData->mnAutoMnemonic) &&
(mpData->mnLogoDisplayTime == rSet.mpData->mnLogoDisplayTime) &&
(mpData->mnDragFullOptions == rSet.mpData->mnDragFullOptions) &&
(mpData->mnAnimationOptions == rSet.mpData->mnAnimationOptions) &&
@@ -1057,10 +1057,10 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->mnCheckBoxStyle == rSet.mpData->mnCheckBoxStyle) &&
(mpData->mnPushButtonStyle == rSet.mpData->mnPushButtonStyle) &&
(mpData->mnTabControlStyle == rSet.mpData->mnTabControlStyle) &&
- (mpData->mnHighContrast == rSet.mpData->mnHighContrast) &&
- (mpData->mnUseSystemUIFonts == rSet.mpData->mnUseSystemUIFonts) &&
- (mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) &&
- (mpData->mnUseFlatMenues == rSet.mpData->mnUseFlatMenues) &&
+ (mpData->mnHighContrast == rSet.mpData->mnHighContrast) &&
+ (mpData->mnUseSystemUIFonts == rSet.mpData->mnUseSystemUIFonts) &&
+ (mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) &&
+ (mpData->mnUseFlatMenues == rSet.mpData->mnUseFlatMenues) &&
(mpData->maFaceColor == rSet.mpData->maFaceColor) &&
(mpData->maCheckedColor == rSet.mpData->maCheckedColor) &&
(mpData->maLightColor == rSet.mpData->maLightColor) &&
@@ -1117,11 +1117,11 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->maRadioCheckFont == rSet.mpData->maRadioCheckFont) &&
(mpData->maPushButtonFont == rSet.mpData->maPushButtonFont) &&
(mpData->maFieldFont == rSet.mpData->maFieldFont) &&
- (mpData->maIconFont == rSet.mpData->maIconFont) &&
- (mpData->mnUseImagesInMenus == rSet.mpData->mnUseImagesInMenus) &&
+ (mpData->maIconFont == rSet.mpData->maIconFont) &&
+ (mpData->mnUseImagesInMenus == rSet.mpData->mnUseImagesInMenus) &&
(mpData->mbPreferredUseImagesInMenus == rSet.mpData->mbPreferredUseImagesInMenus) &&
- (mpData->mnSkipDisabledInMenus == rSet.mpData->mnSkipDisabledInMenus) &&
- (mpData->maFontColor == rSet.mpData->maFontColor ))
+ (mpData->mnSkipDisabledInMenus == rSet.mpData->mnSkipDisabledInMenus) &&
+ (mpData->maFontColor == rSet.mpData->maFontColor ))
return TRUE;
else
return FALSE;
@@ -1132,8 +1132,8 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
ImplMiscData::ImplMiscData()
{
mnRefCount = 1;
- mnEnableATT = sal::static_int_cast<USHORT>(~0U);
- mnDisablePrinting = sal::static_int_cast<USHORT>(~0U);
+ mnEnableATT = sal::static_int_cast<USHORT>(~0U);
+ mnDisablePrinting = sal::static_int_cast<USHORT>(~0U);
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
mbEnableLocalizedDecimalSep = (pEnv != NULL) ? TRUE : FALSE;
}
@@ -1143,8 +1143,8 @@ ImplMiscData::ImplMiscData()
ImplMiscData::ImplMiscData( const ImplMiscData& rData )
{
mnRefCount = 1;
- mnEnableATT = rData.mnEnableATT;
- mnDisablePrinting = rData.mnDisablePrinting;
+ mnEnableATT = rData.mnEnableATT;
+ mnDisablePrinting = rData.mnDisablePrinting;
mbEnableLocalizedDecimalSep = rData.mbEnableLocalizedDecimalSep;
}
@@ -1216,8 +1216,8 @@ BOOL MiscSettings::operator ==( const MiscSettings& rSet ) const
if ( mpData == rSet.mpData )
return TRUE;
- if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) &&
- (mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) &&
+ if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) &&
+ (mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) &&
(mpData->mbEnableLocalizedDecimalSep == rSet.mpData->mbEnableLocalizedDecimalSep ) )
return TRUE;
else
@@ -1338,7 +1338,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
- NULL, &dwType, Data, &cbData) )
+ NULL, &dwType, Data, &cbData) )
{
switch (dwType)
{
@@ -1351,7 +1351,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
case REG_DWORD:
((DWORD *) Data)[0] = bEnable ? 1 : 0;
RegSetValueEx(hkey, "SupportAssistiveTechnology",
- NULL, dwType, Data, sizeof(DWORD));
+ NULL, dwType, Data, sizeof(DWORD));
break;
default:
// Unsupported registry type
@@ -1859,7 +1859,7 @@ BOOL AllSettings::operator ==( const AllSettings& rSet ) const
(mpData->maNotificationSettings == rSet.mpData->maNotificationSettings) &&
(mpData->maHelpSettings == rSet.mpData->maHelpSettings) &&
(mpData->mnSystemUpdate == rSet.mpData->mnSystemUpdate) &&
- (mpData->maLocale == rSet.mpData->maLocale) &&
+ (mpData->maLocale == rSet.mpData->maLocale) &&
(mpData->mnWindowUpdate == rSet.mpData->mnWindowUpdate) )
{
return TRUE;
diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx
index cae4991b3f18..30ecf5c3a3a4 100644
--- a/vcl/source/app/sound.cxx
+++ b/vcl/source/app/sound.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index 22b51d8afef5..ba8d69abbd3e 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f9c21b462ab0..b86477f32fb4 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -183,12 +183,12 @@ struct ImplEventHook
struct ImplPostEventData
{
- ULONG mnEvent;
- const Window* mpWin;
- ULONG mnEventId;
- KeyEvent maKeyEvent;
- MouseEvent maMouseEvent;
-
+ ULONG mnEvent;
+ const Window* mpWin;
+ ULONG mnEventId;
+ KeyEvent maKeyEvent;
+ MouseEvent maMouseEvent;
+
ImplPostEventData( ULONG nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
@@ -457,7 +457,7 @@ void Application::Execute()
inline void ImplYield( bool i_bWait, bool i_bAllEvents )
{
ImplSVData* pSVData = ImplGetSVData();
-
+
// run timers that have timed out
if ( !pSVData->mbNoCallTimer )
while ( pSVData->mbNotAllTimerCalled )
@@ -474,7 +474,7 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
// flush lazy deleted objects
if( pSVData->maAppData.mnDispatchLevel == 0 )
vcl::LazyDelete::flush();
-
+
// the system timer events will not necesseraly come in in non waiting mode
// e.g. on aqua; need to trigger timer checks manually
if( pSVData->maAppData.mbNoYield && !pSVData->mbNoCallTimer )
@@ -707,7 +707,7 @@ void Application::SetSettings( const AllSettings& rSettings )
{
GetSettings();
*pSVData->maAppData.mpSettings = rSettings;
- ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
+ ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
}
else
{
@@ -717,7 +717,7 @@ void Application::SetSettings( const AllSettings& rSettings )
delete pSVData->mpResMgr;
pSVData->mpResMgr = NULL;
}
- ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
+ ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
*pSVData->maAppData.mpSettings = rSettings;
ULONG nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
if ( nChangeFlags )
@@ -919,21 +919,21 @@ BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
{
const SolarMutexGuard aGuard;
- ULONG nEventId = 0;
-
+ ULONG nEventId = 0;
+
if( pWin && pKeyEvent )
{
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, *pKeyEvent );
-
+
PostUserEvent( nEventId,
STATIC_LINK( NULL, Application, PostEventHandler ),
pPostEventData );
-
+
if( nEventId )
{
pPostEventData->mnEventId = nEventId;
aPostedEventList.push_back( ImplPostEventPair( pWin, pPostEventData ) );
- }
+ }
else
delete pPostEventData;
}
@@ -946,29 +946,29 @@ ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent
ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent )
{
const SolarMutexGuard aGuard;
- ULONG nEventId = 0;
-
+ ULONG nEventId = 0;
+
if( pWin && pMouseEvent )
{
Point aTransformedPos( pMouseEvent->GetPosPixel() );
-
+
aTransformedPos.X() += pWin->mnOutOffX;
aTransformedPos.Y() += pWin->mnOutOffY;
-
+
const MouseEvent aTransformedEvent( aTransformedPos, pMouseEvent->GetClicks(), pMouseEvent->GetMode(),
pMouseEvent->GetButtons(), pMouseEvent->GetModifier() );
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, aTransformedEvent );
-
+
PostUserEvent( nEventId,
STATIC_LINK( NULL, Application, PostEventHandler ),
pPostEventData );
-
+
if( nEventId )
{
pPostEventData->mnEventId = nEventId;
aPostedEventList.push_back( ImplPostEventPair( pWin, pPostEventData ) );
- }
+ }
else
delete pPostEventData;
}
@@ -981,35 +981,35 @@ ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMous
IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
{
const SolarMutexGuard aGuard;
- ImplPostEventData* pData = static_cast< ImplPostEventData * >( pCallData );
- const void* pEventData;
+ ImplPostEventData* pData = static_cast< ImplPostEventData * >( pCallData );
+ const void* pEventData;
ULONG nEvent;
- const ULONG nEventId = pData->mnEventId;
-
+ const ULONG nEventId = pData->mnEventId;
+
switch( pData->mnEvent )
{
- case VCLEVENT_WINDOW_MOUSEMOVE:
+ case VCLEVENT_WINDOW_MOUSEMOVE:
nEvent = SALEVENT_EXTERNALMOUSEMOVE;
- pEventData = &pData->maMouseEvent;
+ pEventData = &pData->maMouseEvent;
break;
-
- case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
+
+ case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
nEvent = SALEVENT_EXTERNALMOUSEBUTTONDOWN;
pEventData = &pData->maMouseEvent;
break;
-
- case VCLEVENT_WINDOW_MOUSEBUTTONUP:
- nEvent = SALEVENT_EXTERNALMOUSEBUTTONUP;
+
+ case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+ nEvent = SALEVENT_EXTERNALMOUSEBUTTONUP;
pEventData = &pData->maMouseEvent;
break;
- case VCLEVENT_WINDOW_KEYINPUT:
- nEvent = SALEVENT_EXTERNALKEYINPUT;
+ case VCLEVENT_WINDOW_KEYINPUT:
+ nEvent = SALEVENT_EXTERNALKEYINPUT;
pEventData = &pData->maKeyEvent;
break;
-
- case VCLEVENT_WINDOW_KEYUP:
- nEvent = SALEVENT_EXTERNALKEYUP;
+
+ case VCLEVENT_WINDOW_KEYUP:
+ nEvent = SALEVENT_EXTERNALKEYUP;
pEventData = &pData->maKeyEvent;
break;
@@ -1021,10 +1021,10 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
if( pData->mpWin && pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
ImplWindowFrameProc( pData->mpWin->mpWindowImpl->mpFrameWindow, NULL, (USHORT) nEvent, pEventData );
-
+
// remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
-
+
while( aIter != aPostedEventList.end() )
{
if( nEventId == (*aIter).second->mnEventId )
@@ -1035,7 +1035,7 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
else
++aIter;
}
-
+
return 0;
}
@@ -1047,14 +1047,14 @@ void Application::RemoveMouseAndKeyEvents( Window* pWin )
// remove all events for specific window, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
-
+
while( aIter != aPostedEventList.end() )
{
if( pWin == (*aIter).first )
{
if( (*aIter).second->mnEventId )
RemoveUserEvent( (*aIter).second->mnEventId );
-
+
delete (*aIter).second;
aIter = aPostedEventList.erase( aIter );
}
@@ -1071,12 +1071,12 @@ BOOL Application::IsProcessedMouseOrKeyEvent( ULONG nEventId )
// find event
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
-
+
while( aIter != aPostedEventList.end() )
{
if( (*aIter).second->mnEventId == nEventId )
return FALSE;
-
+
else
++aIter;
}
@@ -1409,8 +1409,8 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
{
if( IsMultiDisplay() )
return GetDefaultDisplayNumber();
-
- const unsigned int nScreens = GetScreenCount();
+
+ const unsigned int nScreens = GetScreenCount();
unsigned int nBestMatchScreen = 0;
unsigned long nOverlap = 0;
for( unsigned int i = 0; i < nScreens; i++ )
@@ -1433,7 +1433,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
}
if( nOverlap > 0 )
return nBestMatchScreen;
-
+
// finally the screen which center is nearest to the rect is the best
const Point aCenter( (i_rRect.Left() + i_rRect.Right())/2,
(i_rRect.Top() + i_rRect.Bottom())/2 );
@@ -1598,12 +1598,12 @@ Window* Application::GetDefDialogParent()
{
DBG_ERROR( "Window hierarchy corrupted!" );
pSVData->maWinData.mpFocusWin = NULL; // avoid further access
- return NULL;
+ return NULL;
}
-
+
// MAV: before the implementation has used only decorated windows,
// but it is not true in case of ActiveX or plugin scenario,
- // so this check is commented out
+ // so this check is commented out
// if( pWin->mpWindowImpl->mpFrameWindow->GetStyle() & (WB_MOVEABLE | WB_SIZEABLE) )
return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
// else
@@ -2041,7 +2041,7 @@ BOOL InitAccessBridge( BOOL bShowCancel, BOOL &rCancelled )
(void) rCancelled; // unused
#else
bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
-
+
if( !bRet && bShowCancel && !rCancelled )
{
// disable accessibility if the user chooses to continue
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index db166af1b295..269ca4700cab 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +75,7 @@ using namespace rtl;
namespace
{
- struct private_aImplSVData :
+ struct private_aImplSVData :
public rtl::Static<ImplSVData, private_aImplSVData> {};
}
@@ -178,7 +178,7 @@ Window* ImplGetDefaultWindow()
// First test if we already have a default window.
// Don't only place a single if..else inside solar mutex lockframe
- // because then we might have to wait for the solar mutex what is not neccessary
+ // because then we might have to wait for the solar mutex what is not neccessary
// if we already have a default window.
if ( !pSVData->mpDefaultWin )
@@ -211,7 +211,7 @@ ResMgr* ImplGetResMgr()
{
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pSVData->mpResMgr = ResMgr::SearchCreateResMgr( VCL_CREATERESMGR_NAME( vcl ), aLocale );
-
+
static bool bMessageOnce = false;
if( !pSVData->mpResMgr && ! bMessageOnce )
{
@@ -232,7 +232,7 @@ ResId VclResId( sal_Int32 nId )
ResMgr* pMgr = ImplGetResMgr();
if( ! pMgr )
throw std::bad_alloc();
-
+
return ResId( nId, *pMgr );
}
@@ -251,7 +251,7 @@ public:
AccessBridgeCurrentContext(
const com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext > &context ) :
m_prevContext( context ) {}
-
+
// XCurrentContext
virtual com::sun::star::uno::Any SAL_CALL getValueByName( const rtl::OUString& Name )
throw (com::sun::star::uno::RuntimeException);
@@ -307,7 +307,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( xFactory.is() )
{
- Reference< XExtendedToolkit > xToolkit =
+ Reference< XExtendedToolkit > xToolkit =
Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
Sequence< Any > arguments(1);
@@ -317,7 +317,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// for a disabled user. Use native message boxes which are accessible without java support.
// No need to do this when activated by Tools-Options dialog ..
if( bAllowCancel )
- {
+ {
// customize the java-not-available-interaction-handler entry within the
// current context when called at startup.
com::sun::star::uno::ContextLayer layer(
@@ -325,22 +325,22 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
pSVData->mxAccessBridge = xFactory->createInstanceWithArguments(
OUString::createFromAscii( "com.sun.star.accessibility.AccessBridge" ),
- arguments
+ arguments
);
}
else
{
pSVData->mxAccessBridge = xFactory->createInstanceWithArguments(
OUString::createFromAscii( "com.sun.star.accessibility.AccessBridge" ),
- arguments
+ arguments
);
}
-
+
if( !pSVData->mxAccessBridge.is() )
bSuccess = false;
}
}
-
+
return bSuccess;
}
@@ -365,7 +365,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -390,7 +390,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -415,7 +415,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -440,7 +440,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -473,8 +473,8 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr));
int ret = ImplGetSalSystem()->ShowNativeMessageBox(
- aTitle,
- ReplaceJavaErrorMessages(aMessage),
+ aTitle,
+ ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
@@ -487,14 +487,14 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// The user tried to activate accessibility support using Tools-Options dialog,
// so we don't offer to terminate here !
ImplGetSalSystem()->ShowNativeMessageBox(
- aTitle,
- ReplaceJavaErrorMessages(aMessage),
+ aTitle,
+ ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK,
SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK);
}
}
}
-
+
return false;
}
diff --git a/vcl/source/app/svmainhook.cxx b/vcl/source/app/svmainhook.cxx
index 7291a141a16f..8b6e5fe61255 100644
--- a/vcl/source/app/svmainhook.cxx
+++ b/vcl/source/app/svmainhook.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +69,7 @@ static void RunSVMain(void *pData)
// running
while (!CFRunLoopIsWaiting(*tcx->pRunLoopRef))
usleep(100);
-
+
*tcx->pRet = ImplSVMain();
// Force exit since some JVMs won't shutdown when only exit() is invoked
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 7749aa8ba0de..80b1f1047e63 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// =======================================================================
-#define MAX_TIMER_PERIOD ((ULONG)0xFFFFFFFF)
+#define MAX_TIMER_PERIOD ((ULONG)0xFFFFFFFF)
// ---------------------
// - TimeManager-Types -
@@ -50,20 +50,20 @@
struct ImplTimerData
{
- ImplTimerData* mpNext; // Pointer to the next Instance
- Timer* mpSVTimer; // Pointer to SV Timer instance
- ULONG mnUpdateTime; // Last Update Time
- ULONG mnTimerUpdate; // TimerCallbackProcs on stack
- BOOL mbDelete; // Wurde Timer waehren Update() geloescht
- BOOL mbInTimeout; // Befinden wir uns im Timeout-Handler
+ ImplTimerData* mpNext; // Pointer to the next Instance
+ Timer* mpSVTimer; // Pointer to SV Timer instance
+ ULONG mnUpdateTime; // Last Update Time
+ ULONG mnTimerUpdate; // TimerCallbackProcs on stack
+ BOOL mbDelete; // Wurde Timer waehren Update() geloescht
+ BOOL mbInTimeout; // Befinden wir uns im Timeout-Handler
};
// =======================================================================
void Timer::ImplDeInitTimer()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplTimerData* pTimerData = pSVData->mpFirstTimerData;
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplTimerData* pTimerData = pSVData->mpFirstTimerData;
if ( pTimerData )
{
@@ -80,8 +80,8 @@ void Timer::ImplDeInitTimer()
}
while ( pTimerData );
- pSVData->mpFirstTimerData = NULL;
- pSVData->mnTimerPeriod = 0;
+ pSVData->mpFirstTimerData = NULL;
+ pSVData->mnTimerPeriod = 0;
delete pSVData->mpSalTimer;
pSVData->mpSalTimer = NULL;
}
@@ -105,12 +105,12 @@ static void ImplStartTimer( ImplSVData* pSVData, ULONG nMS )
void Timer::ImplTimerCallbackProc()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplTimerData* pTimerData;
- ImplTimerData* pPrevTimerData;
- ULONG nMinPeriod = MAX_TIMER_PERIOD;
- ULONG nDeltaTime;
- ULONG nTime = Time::GetSystemTicks();
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplTimerData* pTimerData;
+ ImplTimerData* pPrevTimerData;
+ ULONG nMinPeriod = MAX_TIMER_PERIOD;
+ ULONG nDeltaTime;
+ ULONG nTime = Time::GetSystemTicks();
if ( pSVData->mbNoCallTimer )
return;
@@ -220,21 +220,21 @@ void Timer::ImplTimerCallbackProc()
Timer::Timer()
{
- mpTimerData = NULL;
- mnTimeout = 1;
- mbAuto = FALSE;
- mbActive = FALSE;
+ mpTimerData = NULL;
+ mnTimeout = 1;
+ mbAuto = FALSE;
+ mbActive = FALSE;
}
// -----------------------------------------------------------------------
Timer::Timer( const Timer& rTimer )
{
- mpTimerData = NULL;
- mnTimeout = rTimer.mnTimeout;
- mbAuto = FALSE;
- mbActive = FALSE;
- maTimeoutHdl = rTimer.maTimeoutHdl;
+ mpTimerData = NULL;
+ mnTimeout = rTimer.mnTimeout;
+ mbAuto = FALSE;
+ mbActive = FALSE;
+ maTimeoutHdl = rTimer.maTimeoutHdl;
if ( rTimer.IsActive() )
Start();
@@ -293,12 +293,12 @@ void Timer::Start()
}
// insert timer and start
- mpTimerData = new ImplTimerData;
- mpTimerData->mpSVTimer = this;
- mpTimerData->mnUpdateTime = Time::GetSystemTicks();
- mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
- mpTimerData->mbDelete = FALSE;
- mpTimerData->mbInTimeout = FALSE;
+ mpTimerData = new ImplTimerData;
+ mpTimerData->mpSVTimer = this;
+ mpTimerData->mnUpdateTime = Time::GetSystemTicks();
+ mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
+ mpTimerData->mbDelete = FALSE;
+ mpTimerData->mbInTimeout = FALSE;
// !!!!! Wegen SFX hinten einordnen !!!!!
ImplTimerData* pPrev = NULL;
@@ -323,9 +323,9 @@ void Timer::Start()
}
else
{
- mpTimerData->mnUpdateTime = Time::GetSystemTicks();
- mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
- mpTimerData->mbDelete = FALSE;
+ mpTimerData->mnUpdateTime = Time::GetSystemTicks();
+ mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
+ mpTimerData->mbDelete = FALSE;
}
}
@@ -346,9 +346,9 @@ Timer& Timer::operator=( const Timer& rTimer )
if ( IsActive() )
Stop();
- mbActive = FALSE;
- mnTimeout = rTimer.mnTimeout;
- maTimeoutHdl = rTimer.maTimeoutHdl;
+ mbActive = FALSE;
+ mnTimeout = rTimer.mnTimeout;
+ maTimeoutHdl = rTimer.maTimeoutHdl;
if ( rTimer.IsActive() )
Start();
diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx
index 4cd397151081..d49f5f888acb 100644
--- a/vcl/source/app/unohelp.cxx
+++ b/vcl/source/app/unohelp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
using namespace ::com::sun::star;
using namespace ::rtl;
-#define DOSTRING( x ) #x
-#define STRING( x ) DOSTRING( x )
+#define DOSTRING( x ) #x
+#define STRING( x ) DOSTRING( x )
struct VCLRegServiceInfo
{
- const sal_Char* pLibName;
- sal_Bool bHasSUPD;
+ const sal_Char* pLibName;
+ sal_Bool bHasSUPD;
};
static VCLRegServiceInfo aVCLComponentsArray[] =
@@ -107,7 +107,7 @@ uno::Reference< lang::XMultiServiceFactory > vcl::unohelper::GetMultiServiceFact
pSVData->maAppData.mxMSF = ::cppu::createRegistryServiceFactory( aTempFileName, rtl::OUString(), sal_False );
uno::Reference < registry::XImplementationRegistration > xReg(
pSVData->maAppData.mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" )), uno::UNO_QUERY );
-
+
if( xReg.is() )
{
sal_Int32 nCompCount = 0;
@@ -234,7 +234,7 @@ void vcl::unohelper::NotifyAccessibleStateEventGlobally( const ::com::sun::star:
if ( nType == ::com::sun::star::accessibility::AccessibleStateType::FOCUSED )
xExtToolkit->fireFocusLost( rEventObject.Source );
}
-
+
}
}
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 0640d9cfbc49..15e8aec9063d 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace vcl { namespace unohelper {
TextDataObject::~TextDataObject()
{
}
-
+
void TextDataObject::CopyStringTo( const String& rContent,
const uno::Reference< datatransfer::clipboard::XClipboard >& rxClipboard )
{
@@ -110,6 +110,6 @@ namespace vcl { namespace unohelper {
return ( nT == SOT_FORMAT_STRING );
}
-}} // namespace vcl::unohelper
+}} // namespace vcl::unohelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 02e482711616..65a490b5563b 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ VclEventListeners2::VclEventListeners2()
VclEventListeners2::~VclEventListeners2()
{
}
-
+
void VclEventListeners2::addListener( const Link& i_rLink )
{
// ensure uniqueness
@@ -135,7 +135,7 @@ void VclEventListeners2::removeListener( const Link& i_rLink )
void VclEventListeners2::callListeners( VclSimpleEvent* i_pEvent )
{
vcl::DeletionListener aDel( this );
-
+
m_aIterators.push_back(ListenerIt(m_aListeners.begin()));
size_t nIndex = m_aIterators.size() - 1;
while( ! aDel.isDeleted() && m_aIterators[ nIndex ].m_aIt != m_aListeners.end() )
diff --git a/vcl/source/components/display.cxx b/vcl/source/components/display.cxx
index 39f2613ac6b5..7e150205f71b 100644
--- a/vcl/source/components/display.cxx
+++ b/vcl/source/components/display.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -180,7 +180,7 @@ Sequence< OUString > SAL_CALL DisplayInfo::getSupportedServiceNames( ) throw (R
}
// ====================================================================
-
+
class DisplayAccess : public ::cppu::WeakAggImplHelper4< XPropertySet, XPropertySetInfo, XIndexAccess, XServiceInfo >
{
public:
@@ -284,7 +284,7 @@ Property SAL_CALL DisplayAccess::getPropertyByName( const OUString& aName ) thro
{
if( aName.equalsAscii( pMultiDisplayName ) )
return Property( aName, 0, ::getCppuType( (sal_Bool const *)0 ), PropertyAttribute::READONLY );
-
+
if( aName.equalsAscii( pDefaultDisplayName ) )
return Property( aName, 0, ::getCppuType( (sal_Int32 const *)0 ), PropertyAttribute::READONLY );
throw UnknownPropertyException();
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index b46e33686b9b..1d19dea6952e 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
* XServiceInfo
*/
- virtual rtl::OUString SAL_CALL getImplementationName() throw( RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName() throw( RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( RuntimeException );
virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( RuntimeException );
@@ -103,16 +103,16 @@ public:
* 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
@@ -124,13 +124,13 @@ public:
/*
* 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);
};
GenericClipboard::~GenericClipboard()
@@ -175,9 +175,9 @@ Reference< ::com::sun::star::datatransfer::XTransferable > GenericClipboard::get
{
return m_aContents;
}
-
-void GenericClipboard::setContents(
- const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
+
+void GenericClipboard::setContents(
+ const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw( RuntimeException )
{
@@ -192,7 +192,7 @@ void GenericClipboard::setContents(
aEv.Contents = m_aContents;
aGuard.clear();
-
+
if( xOldOwner.is() && xOldOwner != xClipboardOwner )
xOldOwner->lostOwnership( this, xOldContents );
for( std::list< Reference< datatransfer::clipboard::XClipboardListener > >::iterator it =
@@ -224,7 +224,7 @@ void GenericClipboard::removeClipboardListener( const Reference< datatransfer::c
throw( RuntimeException )
{
osl::ClearableMutexGuard aGuard( m_aMutex );
-
+
m_aListeners.remove( listener );
}
@@ -318,11 +318,11 @@ class GenericDragSource : public cppu::WeakComponentImplHelper2<
public:
GenericDragSource() : cppu::WeakComponentImplHelper2< datatransfer::dnd::XDragSource, XInitialization >( m_aMutex ) {}
virtual ~GenericDragSource();
-
+
// 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 datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
const Reference< datatransfer::XTransferable >& transferable,
@@ -330,15 +330,15 @@ public:
) 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 );
+
static Sequence< OUString > getSupportedServiceNames_static()
{
Sequence< OUString > aRet( 1 );
aRet[0] = OUString::createFromAscii( "com.sun.star.datatransfer.dnd.GenericDragSource" );
return aRet;
}
-
+
static OUString getImplementationName_static()
{
return OUString::createFromAscii( "com.sun.star.datatransfer.dnd.VclGenericDragSource" );
@@ -434,15 +434,15 @@ public:
virtual ~GenericDropTarget();
// XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( Exception );
+ virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( 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();
static Sequence< OUString > getSupportedServiceNames_static()
{
@@ -534,7 +534,7 @@ Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMu
} // namespace vcl
/*
-* SalInstance generic
+* SalInstance generic
*/
Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& )
{
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index 69be4002928f..096b5941ea6d 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ extern "C" {
try
{
Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) );
-
+
OUStringBuffer aImplName(64);
aImplName.appendAscii( "/" );
aImplName.append( vcl_session_getImplementationName() );
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index e411dcf49aba..6559df8a1081 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +71,10 @@ FontIdentificator() {}
virtual OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
virtual ::sal_Bool SAL_CALL supportsService( const OUString& ) throw (RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
-
+
// XInitialization
virtual void SAL_CALL initialize( const Sequence< Any >& ) throw (Exception, RuntimeException);
-
+
// XMaterialHolder
virtual Any SAL_CALL getMaterial() throw(RuntimeException);
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a2bbfb67baf4..7110598386c2 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -401,7 +401,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
-
+
// Drawing text or symbol only is simple, use style and output rectangle
if ( bHasSymbol && !bDrawImage && !bDrawText )
{
@@ -509,7 +509,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
if ( aTSSize.Height() < aTextSize.Height() )
aTSSize.Height() = aTextSize.Height();
-
+
if( bAddImageSep && bDrawImage )
{
long nDiff = (aImageSize.Height() - aTextSize.Height()) / 3;
@@ -1330,11 +1330,11 @@ void PushButton::ImplDrawPushButton( bool bLayout )
ImplControlValue aControlValue;
ControlState nState = 0;
- if ( mbPressed ) nState |= CTRL_STATE_PRESSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( mbPressed ) nState |= CTRL_STATE_PRESSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ) )
nState |= CTRL_STATE_ROLLOVER;
@@ -1352,18 +1352,18 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
{
PushButtonValue aControlValue;
- Rectangle aCtrlRegion( aInRect );
- ControlState nState = 0;
+ Rectangle aCtrlRegion( aInRect );
+ ControlState nState = 0;
if ( mbPressed || IsChecked() ) nState |= CTRL_STATE_PRESSED;
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( bRollOver )
nState |= CTRL_STATE_ROLLOVER;
-
+
if( GetStyle() & WB_BEVELBUTTON )
aControlValue.mbBevelButton = true;
@@ -1378,7 +1378,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
aInRect.Bottom()-=4;
aInRect.Left()+=4;
aInRect.Right()-=4;
-
+
// prepare single line hint (needed on mac to decide between normal push button and
// rectangular bevel button look)
Size aFontSize( Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetSize() );
@@ -1449,8 +1449,8 @@ void PushButton::ImplSetDefButton( BOOL bSet )
Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
// will not work if the theme has dynamic adornment sizes
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( aCtrlRect );
- ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
+ Rectangle aCtrlRegion( aCtrlRect );
+ ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
// get native size of a 'default' button
// and adjust the VCL button if more space for adornment is required
@@ -2034,7 +2034,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
return CalcWindowSize( aSize );
-}
+}
Size PushButton::GetOptimalSize(WindowSizeType eType) const
{
@@ -2344,14 +2344,14 @@ void RadioButton::ImplDrawRadioButtonState()
// no native drawing for image radio buttons
if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
{
- ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
- Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
- ControlState nState = 0;
+ ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
+ Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
+ ControlState nState = 0;
- if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( IsMouseOver() && maMouseRect.IsInside( GetPointerPosPixel() ) )
nState |= CTRL_STATE_ROLLOVER;
@@ -2463,8 +2463,8 @@ void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
Rectangle aRect( rPos, rSize );
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
+ String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
pDev->Push( PUSH_CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -2626,7 +2626,7 @@ void RadioButton::GetRadioButtonGroup( std::vector< RadioButton* >& io_rGroup, b
{
// empty the list
io_rGroup.clear();
-
+
// go back to first in group;
Window* pFirst = const_cast<RadioButton*>(this);
while( ( pFirst->GetStyle() & WB_GROUP ) == 0 )
@@ -3207,8 +3207,8 @@ Size RadioButton::ImplGetRadioImageSize() const
{
ImplControlValue aControlValue;
// #i45896# workaround gcc3.3 temporary problem
- Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
- ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
+ Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
+ ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
Rectangle aBoundingRgn, aContentRgn;
// get native size of a radio button
@@ -3247,7 +3247,7 @@ static void LoadThemedImageList (const StyleSettings &rStyleSettings,
Color aMaskColor(0x00, 0x00, 0xFF );
DBG_ASSERT( sizeof(aColorAry1) == sizeof(aColorAry2), "aColorAry1 must match aColorAry2" );
// FIXME: do we want the mask for the checkbox ?
- pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
+ pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
}
@@ -3333,21 +3333,21 @@ void RadioButton::ImplSetMinimumNWFSize()
Size aCurSize( GetSizePixel() );
Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
Rectangle aBoundingRgn, aContentRgn;
-
+
// get native size of a radiobutton
if( GetNativeControlRegion( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion,
CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
aBoundingRgn, aContentRgn ) )
{
Size aSize = aContentRgn.GetSize();
-
+
if( aSize.Height() > aCurSize.Height() )
{
aCurSize.Height() = aSize.Height();
SetSizePixel( aCurSize );
}
}
-
+
Pop();
}
@@ -3512,7 +3512,7 @@ void CheckBox::ImplInvalidateOrDrawCheckBoxState()
void CheckBox::ImplDrawCheckBoxState()
{
- bool bNativeOK = TRUE;
+ bool bNativeOK = TRUE;
if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == TRUE )
{
@@ -3520,10 +3520,10 @@ void CheckBox::ImplDrawCheckBoxState()
Rectangle aCtrlRegion( maStateRect );
ControlState nState = 0;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
+ if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( meState == STATE_CHECK )
aControlValue.setTristateVal( BUTTONVALUE_ON );
@@ -3563,7 +3563,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
{
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
-
+
pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -3637,12 +3637,12 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
ImplSetFocusRect( rStateRect );
}
-
+
const int nLineSpace = 4;
if( (GetStyle() & WB_CBLINESTYLE) != 0 &&
rMouseRect.Right()-1-nLineSpace < rPos.X()+rSize.Width() )
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
SetLineColor( Color( COL_BLACK ) );
else
@@ -4080,9 +4080,9 @@ long CheckBox::PreNotify( NotifyEvent& rNEvt )
// trigger redraw if mouse over state has changed
if( IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL) )
{
- if( ( maMouseRect.IsInside( GetPointerPosPixel()) &&
+ if( ( maMouseRect.IsInside( GetPointerPosPixel()) &&
!maMouseRect.IsInside( GetLastPointerPosPixel()) ) ||
- ( maMouseRect.IsInside( GetLastPointerPosPixel()) &&
+ ( maMouseRect.IsInside( GetLastPointerPosPixel()) &&
!maMouseRect.IsInside( GetPointerPosPixel()) ) ||
pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() )
{
@@ -4151,10 +4151,10 @@ Size CheckBox::ImplGetCheckImageSize() const
{
ImplControlValue aControlValue;
// #i45896# workaround gcc3.3 temporary problem
- Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
- ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
+ Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
+ ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
Rectangle aBoundingRgn, aContentRgn;
-
+
// get native size of a check box
if( pThis->GetNativeControlRegion( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
nState, aControlValue, rtl::OUString(),
@@ -4164,7 +4164,7 @@ Size CheckBox::ImplGetCheckImageSize() const
bDefaultSize = false;
}
}
- if( bDefaultSize )
+ if( bDefaultSize )
aSize = GetCheckImage( GetSettings(), 0 ).GetSizePixel();
return aSize;
}
@@ -4242,21 +4242,21 @@ void CheckBox::ImplSetMinimumNWFSize()
Size aCurSize( GetSizePixel() );
Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
Rectangle aBoundingRgn, aContentRgn;
-
+
// get native size of a radiobutton
if( GetNativeControlRegion( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
aBoundingRgn, aContentRgn ) )
{
Size aSize = aContentRgn.GetSize();
-
+
if( aSize.Height() > aCurSize.Height() )
{
aCurSize.Height() = aSize.Height();
SetSizePixel( aCurSize );
}
}
-
+
Pop();
}
@@ -4446,16 +4446,16 @@ void DisclosureButton::ImplDrawCheckBoxState()
would have to be overloaded for DisclosureButton; also GetNativeControlRegion
for CTRL_LISTNODE would have to be implemented and taken into account
*/
-
+
Rectangle aStateRect( GetStateRect() );
-
+
ImplControlValue aControlValue( GetState() == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRegion( aStateRect );
ControlState nState = 0;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( IsMouseOver() && GetMouseRect().IsInside( GetPointerPosPixel() ) )
nState |= CTRL_STATE_ROLLOVER;
@@ -4471,21 +4471,21 @@ void DisclosureButton::ImplDrawCheckBoxState()
rCtrlData.mpDisclosureMinus = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS ) ) );
if( ! rCtrlData.mpDisclosureMinusHC )
rCtrlData.mpDisclosureMinusHC = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS_HC ) ) );
-
+
Image* pImg = NULL;
if( GetSettings().GetStyleSettings().GetHighContrastMode() )
pImg = IsChecked() ? rCtrlData.mpDisclosureMinusHC : rCtrlData.mpDisclosurePlusHC;
else
pImg = IsChecked() ? rCtrlData.mpDisclosureMinus : rCtrlData.mpDisclosurePlus;
-
+
DBG_ASSERT( pImg, "no disclosure image" );
if( ! pImg )
return;
-
+
USHORT nStyle = 0;
if( ! IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
-
+
Size aSize( aStateRect.GetSize() );
Size aImgSize( pImg->GetSizePixel() );
Point aOff( (aSize.Width() - aImgSize.Width())/2,
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index e65925db282c..178974de59c7 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -116,16 +116,16 @@ ComboBox::~ComboBox()
void ComboBox::ImplInitComboBoxData()
{
- mpSubEdit = NULL;
- mpBtn = NULL;
- mpImplLB = NULL;
- mpFloatWin = NULL;
+ mpSubEdit = NULL;
+ mpBtn = NULL;
+ mpImplLB = NULL;
+ mpFloatWin = NULL;
- mnDDHeight = 0;
- mbDDAutoSize = TRUE;
- mbSyntheticModify = FALSE;
- mbMatchCase = FALSE;
- mcMultiSep = ';';
+ mnDDHeight = 0;
+ mbDDAutoSize = TRUE;
+ mbSyntheticModify = FALSE;
+ mbMatchCase = FALSE;
+ mcMultiSep = ';';
}
// -----------------------------------------------------------------------
@@ -330,8 +330,8 @@ IMPL_LINK( ComboBox, ImplPopupModeEndHdl, void*, EMPTYARG )
IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
{
- Selection aSel = pEdit->GetSelection();
- AutocompleteAction eAction = pEdit->GetAutocompleteAction();
+ Selection aSel = pEdit->GetSelection();
+ AutocompleteAction eAction = pEdit->GetAutocompleteAction();
/* If there is no current selection do not auto complete on
Tab/Shift-Tab since then we would not cycle to the next field.
@@ -339,9 +339,9 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
if ( aSel.Len() ||
((eAction != AUTOCOMPLETE_TABFORWARD) && (eAction != AUTOCOMPLETE_TABBACKWARD)) )
{
- XubString aFullText = pEdit->GetText();
- XubString aStartText = aFullText.Copy( 0, (xub_StrLen)aSel.Max() );
- USHORT nStart = mpImplLB->GetCurrentPos();
+ XubString aFullText = pEdit->GetText();
+ XubString aStartText = aFullText.Copy( 0, (xub_StrLen)aSel.Max() );
+ USHORT nStart = mpImplLB->GetCurrentPos();
if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0;
@@ -400,11 +400,11 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
xub_StrLen nIndex = 0;
while ( nIndex != STRING_NOTFOUND )
{
- xub_StrLen nPrevIndex = nIndex;
- XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
- xub_StrLen nTokenLen = aToken.Len();
+ xub_StrLen nPrevIndex = nIndex;
+ XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
+ xub_StrLen nTokenLen = aToken.Len();
aToken.EraseLeadingAndTrailingChars( ' ' );
- USHORT nP = mpImplLB->GetEntryList()->FindEntry( aToken );
+ USHORT nP = mpImplLB->GetEntryList()->FindEntry( aToken );
if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) )
{
aText.Erase( nPrevIndex, nTokenLen );
@@ -625,8 +625,8 @@ void ComboBox::Resize()
if( IsDropDownBox() )
{
long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- long nTop = 0;
- long nBottom = aOutSz.Height();
+ long nTop = 0;
+ long nBottom = aOutSz.Height();
Window *pBorder = GetWindow( WINDOW_BORDER );
ImplControlValue aControlValue;
@@ -813,7 +813,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
&& !IsReadOnly() )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
- USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
+ USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
switch( nKeyCode )
{
case KEY_UP:
@@ -927,9 +927,9 @@ void ComboBox::ImplUpdateFloatSelection()
mpImplLB->SetCallSelectionChangedHdl( FALSE );
if ( !IsMultiSelectionEnabled() )
{
- XubString aSearchStr( mpSubEdit->GetText() );
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
- BOOL bSelect = TRUE;
+ XubString aSearchStr( mpSubEdit->GetText() );
+ USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
+ BOOL bSelect = TRUE;
if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND )
{
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index ad45da3b706e..7be3ad1b1a54 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace vcl;
void Control::ImplInitControlData()
{
- mbHasFocus = FALSE;
+ mbHasFocus = FALSE;
mpControlData = new ImplControlData;
}
@@ -215,7 +215,7 @@ long Control::GetLineCount() const
Pair ControlLayoutData::GetLineStartEnd( long nLine ) const
{
Pair aPair( -1, -1 );
-
+
int nDisplayLines = m_aLineIndices.size();
if( nLine >= 0 && nLine < nDisplayLines )
{
@@ -332,11 +332,11 @@ long Control::Notify( NotifyEvent& rNEvt )
void Control::StateChanged( StateChangedType nStateChange )
{
- if( nStateChange == STATE_CHANGE_INITSHOW ||
- nStateChange == STATE_CHANGE_VISIBLE ||
- nStateChange == STATE_CHANGE_FORMAT ||
- nStateChange == STATE_CHANGE_ZOOM ||
- nStateChange == STATE_CHANGE_BORDER ||
+ if( nStateChange == STATE_CHANGE_INITSHOW ||
+ nStateChange == STATE_CHANGE_VISIBLE ||
+ nStateChange == STATE_CHANGE_FORMAT ||
+ nStateChange == STATE_CHANGE_ZOOM ||
+ nStateChange == STATE_CHANGE_BORDER ||
nStateChange == STATE_CHANGE_CONTROLFONT
)
{
@@ -442,7 +442,7 @@ void Control::DataChanged( const DataChangedEvent& rDCEvt)
{
// we don't want to loose some style settings for controls created with the
// toolkit
- if ( IsCreatedWithToolkit() &&
+ if ( IsCreatedWithToolkit() &&
(rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 0ef45ccabd94..cc4e3017a9a8 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,27 +95,27 @@ static FncGetSpecialChars pImplFncGetSpecialChars = NULL;
// =======================================================================
-#define EDIT_ALIGN_LEFT 1
-#define EDIT_ALIGN_CENTER 2
-#define EDIT_ALIGN_RIGHT 3
+#define EDIT_ALIGN_LEFT 1
+#define EDIT_ALIGN_CENTER 2
+#define EDIT_ALIGN_RIGHT 3
-#define EDIT_DEL_LEFT 1
-#define EDIT_DEL_RIGHT 2
+#define EDIT_DEL_LEFT 1
+#define EDIT_DEL_RIGHT 2
-#define EDIT_DELMODE_SIMPLE 11
-#define EDIT_DELMODE_RESTOFWORD 12
-#define EDIT_DELMODE_RESTOFCONTENT 13
+#define EDIT_DELMODE_SIMPLE 11
+#define EDIT_DELMODE_RESTOFWORD 12
+#define EDIT_DELMODE_RESTOFCONTENT 13
// =======================================================================
struct DDInfo
{
- Cursor aCursor;
+ Cursor aCursor;
Selection aDndStartSel;
- xub_StrLen nDropPos;
- BOOL bStarterOfDD;
- BOOL bDroppedInMe;
- BOOL bVisCursor;
+ xub_StrLen nDropPos;
+ BOOL bStarterOfDD;
+ BOOL bDroppedInMe;
+ BOOL bVisCursor;
DDInfo()
{
@@ -132,17 +132,17 @@ struct DDInfo
struct Impl_IMEInfos
{
String aOldTextAfterStartPos;
- USHORT* pAttribs;
- xub_StrLen nPos;
- xub_StrLen nLen;
- BOOL bCursor;
- BOOL bWasCursorOverwrite;
+ USHORT* pAttribs;
+ xub_StrLen nPos;
+ xub_StrLen nLen;
+ BOOL bCursor;
+ BOOL bWasCursorOverwrite;
Impl_IMEInfos( xub_StrLen nPos, const String& rOldTextAfterStartPos );
~Impl_IMEInfos();
- void CopyAttribs( const xub_StrLen* pA, xub_StrLen nL );
- void DestroyAttribs();
+ void CopyAttribs( const xub_StrLen* pA, xub_StrLen nL );
+ void DestroyAttribs();
};
// -----------------------------------------------------------------------
@@ -275,23 +275,23 @@ Edit::~Edit()
void Edit::ImplInitEditData()
{
- mpSubEdit = NULL;
- mpUpdateDataTimer = NULL;
- mnXOffset = 0;
- mnAlign = EDIT_ALIGN_LEFT;
- mnMaxTextLen = EDIT_NOLIMIT;
- meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
- mbModified = FALSE;
- mbInternModified = FALSE;
- mbReadOnly = FALSE;
- mbInsertMode = TRUE;
- mbClickedInSelection = FALSE;
- mbActivePopup = FALSE;
- mbIsSubEdit = FALSE;
- mbInMBDown = FALSE;
- mpDDInfo = NULL;
- mpIMEInfos = NULL;
- mcEchoChar = 0;
+ mpSubEdit = NULL;
+ mpUpdateDataTimer = NULL;
+ mnXOffset = 0;
+ mnAlign = EDIT_ALIGN_LEFT;
+ mnMaxTextLen = EDIT_NOLIMIT;
+ meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
+ mbModified = FALSE;
+ mbInternModified = FALSE;
+ mbReadOnly = FALSE;
+ mbInsertMode = TRUE;
+ mbClickedInSelection = FALSE;
+ mbActivePopup = FALSE;
+ mbIsSubEdit = FALSE;
+ mbInMBDown = FALSE;
+ mpDDInfo = NULL;
+ mpIMEInfos = NULL;
+ mcEchoChar = 0;
// --- RTL --- no default mirroring for Edit controls
// note: controls that use a subedit will revert this (SpinField, ComboBox)
@@ -332,7 +332,7 @@ void Edit::ImplInit( Window* pParent, WinBits nStyle )
// --- RTL --- hack: right align until keyinput and cursor travelling works
if( IsRTLEnabled() )
- mnAlign = EDIT_ALIGN_RIGHT;
+ mnAlign = EDIT_ALIGN_RIGHT;
if ( nStyle & WB_RIGHT )
mnAlign = EDIT_ALIGN_RIGHT;
@@ -453,7 +453,7 @@ XubString Edit::ImplGetText() const
{
if ( mcEchoChar || (GetStyle() & WB_PASSWORD) )
{
- XubString aText;
+ XubString aText;
xub_Unicode cEchoChar;
if ( mcEchoChar )
cEchoChar = mcEchoChar;
@@ -503,9 +503,9 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
nStart = 0;
nEnd = aText.Len();
- sal_Int32 nDXBuffer[256];
- sal_Int32* pDXBuffer = NULL;
- sal_Int32* pDX = nDXBuffer;
+ sal_Int32 nDXBuffer[256];
+ sal_Int32* pDXBuffer = NULL;
+ sal_Int32* pDX = nDXBuffer;
if( aText.Len() )
{
@@ -518,8 +518,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
GetCaretPositions( aText, pDX, nStart, nEnd );
}
- long nTH = GetTextHeight();
- Point aPos( mnXOffset, ImplGetTextYPosition() );
+ long nTH = GetTextHeight();
+ Point aPos( mnXOffset, ImplGetTextYPosition() );
if( bLayout )
{
@@ -888,8 +888,8 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
sal_Bool bCTLSequenceChecking = sal_False;
sal_Bool bCTLSequenceCheckingRestricted = sal_False;
sal_Bool bCTLSequenceCheckingTypeAndReplace = sal_False;
- sal_Bool bCTLFontEnabled = sal_False;
- sal_Bool bIsInputSequenceChecking = sal_False;
+ sal_Bool bCTLFontEnabled = sal_False;
+ sal_Bool bIsInputSequenceChecking = sal_False;
//
// get access to the configuration of this office module
try
@@ -915,7 +915,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
}
catch(...)
{
- bIsInputSequenceChecking = sal_False; // continue with inserting the new text
+ bIsInputSequenceChecking = sal_False; // continue with inserting the new text
}
//
uno::Reference < i18n::XBreakIterator > xBI( ImplGetBreakIterator(), UNO_QUERY );
@@ -961,7 +961,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
if (aChgText.Len())
{
aNewText = aChgText;
- aSelection.Min() = nChgPos; // position for new text to be inserted
+ aSelection.Min() = nChgPos; // position for new text to be inserted
}
else
aNewText = String::EmptyString();
@@ -1162,14 +1162,14 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) )
return;
- Cursor* pCursor = GetCursor();
- XubString aText = ImplGetText();
+ Cursor* pCursor = GetCursor();
+ XubString aText = ImplGetText();
long nTextPos = 0;
- sal_Int32 nDXBuffer[256];
- sal_Int32* pDXBuffer = NULL;
- sal_Int32* pDX = nDXBuffer;
+ sal_Int32 nDXBuffer[256];
+ sal_Int32* pDXBuffer = NULL;
+ sal_Int32* pDX = nDXBuffer;
if( aText.Len() )
{
@@ -1220,7 +1220,7 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
}
nCursorPosX = nTextPos + mnXOffset + ImplGetExtraOffset();
- if ( nCursorPosX == aOutSize.Width() ) // dann nicht sichtbar...
+ if ( nCursorPosX == aOutSize.Width() ) // dann nicht sichtbar...
nCursorPosX--;
if ( mnXOffset != nOldXOffset )
@@ -1272,7 +1272,7 @@ void Edit::ImplAlign()
else if( mnAlign == EDIT_ALIGN_CENTER )
{
// Mit Abfrage schoener, wenn gescrollt, dann aber nicht zentriert im gescrollten Zustand...
-// if ( nTextWidth < nOutWidth )
+// if ( nTextWidth < nOutWidth )
mnXOffset = (nOutWidth - nTextWidth) / 2;
}
}
@@ -1294,9 +1294,9 @@ xub_StrLen Edit::ImplGetCharPos( const Point& rWindowPos ) const
xub_StrLen nIndex = STRING_LEN;
String aText = ImplGetText();
- sal_Int32 nDXBuffer[256];
- sal_Int32* pDXBuffer = NULL;
- sal_Int32* pDX = nDXBuffer;
+ sal_Int32 nDXBuffer[256];
+ sal_Int32* pDXBuffer = NULL;
+ sal_Int32* pDX = nDXBuffer;
if( 2*aText.Len() > xub_StrLen(SAL_N_ELEMENTS(nDXBuffer)) )
{
pDXBuffer = new sal_Int32[2*(aText.Len()+1)];
@@ -1465,7 +1465,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
StartTracking( STARTTRACK_SCROLLREPEAT );
}
- mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren
+ mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren
GrabFocus();
mbInMBDown = FALSE;
}
@@ -1523,8 +1523,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ BOOL bDone = FALSE;
+ USHORT nCode = rKEvt.GetKeyCode().GetCode();
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
mbInternModified = FALSE;
@@ -1590,7 +1590,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( pImplFncGetSpecialChars )
{
- Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
+ Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
XubString aChars = pImplFncGetSpecialChars( this, GetFont() );
SetSelection( aSaveSel );
if ( aChars.Len() )
@@ -1613,7 +1613,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
bDone = TRUE;
}
break;
-
+
case KEY_LEFT:
case KEY_RIGHT:
case KEY_HOME:
@@ -1647,7 +1647,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
bool bGoRight = (nCode == KEY_RIGHT);
bool bGoHome = (nCode == KEY_HOME);
bool bGoEnd = (nCode == KEY_END);
-
+
switch( nCode )
{
case com::sun::star::awt::Key::MOVE_WORD_FORWARD:
@@ -1679,7 +1679,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
default:
break;
};
-
+
// Range wird in ImplSetSelection geprueft...
if ( bGoLeft && aSel.Max() )
{
@@ -1819,7 +1819,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( IsCharInput( rKEvt ) )
{
- bDone = TRUE; // Auch bei ReadOnly die Zeichen schlucken.
+ bDone = TRUE; // Auch bei ReadOnly die Zeichen schlucken.
if ( !mbReadOnly )
{
ImplInsertText( rKEvt.GetCharCode(), 0, sal_True );
@@ -1936,12 +1936,12 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG
}
}
- XubString aText = ImplGetText();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOnePixel = GetDrawPixel( pDev, 1 );
- long nOffX = 3*nOnePixel;
- long nOffY = (aSize.Height() - nTextHeight) / 2;
+ XubString aText = ImplGetText();
+ long nTextHeight = pDev->GetTextHeight();
+ long nTextWidth = pDev->GetTextWidth( aText );
+ long nOnePixel = GetDrawPixel( pDev, 1 );
+ long nOffX = 3*nOnePixel;
+ long nOffY = (aSize.Height() - nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -2075,7 +2075,7 @@ void Edit::LoseFocus()
}
if ( !mbActivePopup && !( GetStyle() & WB_NOHIDESELECTION ) && maSelection.Len() )
- ImplInvalidateOrRepaint(); // Selektion malen
+ ImplInvalidateOrRepaint(); // Selektion malen
}
Control::LoseFocus();
@@ -2138,7 +2138,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
mbActivePopup = TRUE;
- Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
+ Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
Point aPos = rCEvt.GetMousePosPixel();
if ( !rCEvt.IsMouseEvent() )
{
@@ -2216,7 +2216,7 @@ void Edit::Command( const CommandEvent& rCEvt )
break;
case DICTATIONCOMMAND_DEL:
{
- ImplHandleKeyEvent( KeyEvent( 0, KeyCode( KEY_LEFT, KEY_MOD1|KEY_SHIFT ) ) );
+ ImplHandleKeyEvent( KeyEvent( 0, KeyCode( KEY_LEFT, KEY_MOD1|KEY_SHIFT ) ) );
DeleteSelected();
}
break;
@@ -2334,7 +2334,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- mnXOffset = 0; // Falls vorher GrabFocus, als Groesse noch falsch.
+ mnXOffset = 0; // Falls vorher GrabFocus, als Groesse noch falsch.
ImplAlign();
if ( !mpSubEdit )
ImplShowCursor( FALSE );
@@ -2368,7 +2368,7 @@ void Edit::StateChanged( StateChangedType nType )
if( mbIsSubEdit && GetParent()->IsRTLEnabled() )
{
if( GetParent()->GetStyle() & WB_LEFT )
- mnAlign = EDIT_ALIGN_RIGHT;
+ mnAlign = EDIT_ALIGN_RIGHT;
if ( nType == STATE_CHANGE_MIRRORING )
SetLayoutMode( TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT );
}
@@ -2764,10 +2764,10 @@ void Edit::Undo()
void Edit::SetText( const XubString& rStr )
{
if ( mpSubEdit )
- mpSubEdit->SetText( rStr ); // Nicht direkt ImplSetText, falls SetText ueberladen
+ mpSubEdit->SetText( rStr ); // Nicht direkt ImplSetText, falls SetText ueberladen
else
{
- Selection aNewSel( 0, 0 ); // Damit nicht gescrollt wird
+ Selection aNewSel( 0, 0 ); // Damit nicht gescrollt wird
ImplSetText( rStr, &aNewSel );
}
}
@@ -2819,7 +2819,7 @@ void Edit::SetSubEdit( Edit* pEdit )
mpSubEdit = pEdit;
if ( mpSubEdit )
{
- SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM...
+ SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM...
mpSubEdit->mbIsSubEdit = TRUE;
mpSubEdit->SetReadOnly( mbReadOnly );
@@ -2838,7 +2838,7 @@ Size Edit::CalcMinimumSize() const
aSize.Width() = aMinSize.Width();
// add some space between text entry and border
aSize.Height() += 4;
-
+
aSize = CalcWindowSize( aSize );
// ask NWF what if it has an opinion, too
@@ -2960,7 +2960,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
if ( IsTracking() )
- EndTracking(); // Vor D&D Tracking ausschalten
+ EndTracking(); // Vor D&D Tracking ausschalten
::vcl::unohelper::TextDataObject* pDataObj = new ::vcl::unohelper::TextDataObject( GetSelected() );
sal_Int8 nActions = datatransfer::dnd::DNDConstants::ACTION_COPY;
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index a01be7411c18..8833f2b6a92d 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ static USHORT ImplGetNum( const sal_Unicode*& rpBuf, BOOL& rbError )
static void ImplSkipDelimiters( const sal_Unicode*& rpBuf )
{
- while( ( *rpBuf == ',' ) || ( *rpBuf == '.' ) || ( *rpBuf == ';' ) ||
+ while( ( *rpBuf == ',' ) || ( *rpBuf == '.' ) || ( *rpBuf == ';' ) ||
( *rpBuf == ':' ) || ( *rpBuf == '-' ) || ( *rpBuf == '/' ) )
{
rpBuf++;
@@ -836,16 +836,16 @@ void PatternFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( PATTERNFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( PATTERNFORMATTER_EDITMASK & nMask )
aEditMask = ByteString( pMgr->ReadString(), RTL_TEXTENCODING_ASCII_US );
-
+
if ( PATTERNFORMATTER_LITTERALMASK & nMask )
aLiteralMask = pMgr->ReadString();
-
+
if ( (PATTERNFORMATTER_EDITMASK | PATTERNFORMATTER_LITTERALMASK) & nMask )
ImplSetMask( aEditMask, aLiteralMask );
}
@@ -1564,7 +1564,7 @@ void DateField::ImplDateSpinArea( BOOL bUp )
nPos++;
}
}
-
+
switch( eFormat )
{
@@ -1647,7 +1647,7 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( DATEFORMATTER_MIN & nMask )
{
maMin = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
@@ -1660,10 +1660,10 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
}
if ( DATEFORMATTER_LONGFORMAT & nMask )
mbLongFormat = (BOOL)pMgr->ReadShort();
-
+
if ( DATEFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( DATEFORMATTER_VALUE & nMask )
{
maFieldDate = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
@@ -2083,12 +2083,12 @@ DateField::DateField( Window* pParent, const ResId& rResId ) :
void DateField::ImplLoadRes( const ResId& rResId )
{
SpinField::ImplLoadRes( rResId );
-
+
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
DateFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-
+
ULONG nMask = ReadLongRes();
if ( DATEFIELD_FIRST & nMask )
{
@@ -2816,28 +2816,28 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( TIMEFORMATTER_MIN & nMask )
{
SetMin( Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ) );
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) );
}
-
+
if ( TIMEFORMATTER_MAX & nMask )
{
SetMax( Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ) );
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) );
}
-
+
if ( TIMEFORMATTER_TIMEFIELDFORMAT & nMask )
meFormat = (TimeFieldFormat)pMgr->ReadLong();
-
+
if ( TIMEFORMATTER_DURATION & nMask )
mbDuration = (BOOL)pMgr->ReadShort();
-
+
if ( TIMEFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( TIMEFORMATTER_VALUE & nMask )
{
maFieldTime = Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
@@ -2846,7 +2846,7 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
if ( maFieldTime < GetMin() )
maFieldTime = GetMin();
maLastTime = maFieldTime;
-
+
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) );
}
}
@@ -3137,9 +3137,9 @@ void TimeField::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
TimeFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-
+
ULONG nMask = ReadLongRes();
-
+
if ( TIMEFIELD_FIRST & nMask )
{
maFirst = Time( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
@@ -3151,7 +3151,7 @@ void TimeField::ImplLoadRes( const ResId& rResId )
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
}
}
-
+
Reformat();
}
diff --git a/vcl/source/control/fixbrd.cxx b/vcl/source/control/fixbrd.cxx
index 374d15f599f8..664c42394a0d 100644
--- a/vcl/source/control/fixbrd.cxx
+++ b/vcl/source/control/fixbrd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +39,8 @@
void FixedBorder::ImplInit( Window* pParent, WinBits nStyle )
{
- mnType = FIXEDBORDER_TYPE_DOUBLEOUT;
- mbTransparent = TRUE;
+ mnType = FIXEDBORDER_TYPE_DOUBLEOUT;
+ mbTransparent = TRUE;
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
@@ -118,9 +118,9 @@ FixedBorder::~FixedBorder()
void FixedBorder::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize )
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- Rectangle aRect( rPos, rSize );
- USHORT nBorderStyle = mnType;
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ Rectangle aRect( rPos, rSize );
+ USHORT nBorderStyle = mnType;
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
@@ -143,7 +143,7 @@ void FixedBorder::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
else
*/
{
- DecorationView aDecoView( pDev );
+ DecorationView aDecoView( pDev );
aDecoView.DrawFrame( aRect, nBorderStyle );
}
}
@@ -160,8 +160,8 @@ void FixedBorder::Paint( const Rectangle& )
void FixedBorder::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
pDev->Push();
pDev->SetMapMode();
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index fafe06e47c89..c0588e941df1 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,21 +38,21 @@
// =======================================================================
-#define FIXEDLINE_TEXT_BORDER 4
+#define FIXEDLINE_TEXT_BORDER 4
-#define FIXEDTEXT_VIEW_STYLE (WB_3DLOOK | \
- WB_LEFT | WB_CENTER | WB_RIGHT | \
- WB_TOP | WB_VCENTER | WB_BOTTOM | \
- WB_WORDBREAK | WB_NOLABEL | \
+#define FIXEDTEXT_VIEW_STYLE (WB_3DLOOK | \
+ WB_LEFT | WB_CENTER | WB_RIGHT | \
+ WB_TOP | WB_VCENTER | WB_BOTTOM | \
+ WB_WORDBREAK | WB_NOLABEL | \
WB_INFO | WB_PATHELLIPSIS)
-#define FIXEDLINE_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
-#define FIXEDBITMAP_VIEW_STYLE (WB_3DLOOK | \
- WB_LEFT | WB_CENTER | WB_RIGHT | \
- WB_TOP | WB_VCENTER | WB_BOTTOM | \
+#define FIXEDLINE_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
+#define FIXEDBITMAP_VIEW_STYLE (WB_3DLOOK | \
+ WB_LEFT | WB_CENTER | WB_RIGHT | \
+ WB_TOP | WB_VCENTER | WB_BOTTOM | \
WB_SCALE)
-#define FIXEDIMAGE_VIEW_STYLE (WB_3DLOOK | \
- WB_LEFT | WB_CENTER | WB_RIGHT | \
- WB_TOP | WB_VCENTER | WB_BOTTOM | \
+#define FIXEDIMAGE_VIEW_STYLE (WB_3DLOOK | \
+ WB_LEFT | WB_CENTER | WB_RIGHT | \
+ WB_TOP | WB_VCENTER | WB_BOTTOM | \
WB_SCALE)
// =======================================================================
@@ -60,8 +60,8 @@
static Point ImplCalcPos( WinBits nStyle, const Point& rPos,
const Size& rObjSize, const Size& rWinSize )
{
- long nX;
- long nY;
+ long nX;
+ long nY;
if ( nStyle & WB_LEFT )
nX = 0;
@@ -229,10 +229,10 @@ void FixedText::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
bool bFillLayout
) const
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- WinBits nWinStyle = GetStyle();
- XubString aText( GetText() );
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ WinBits nWinStyle = GetStyle();
+ XubString aText( GetText() );
+ USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
Point aPos = rPos;
if ( nWinStyle & WB_EXTRAOFFSET )
@@ -284,9 +284,9 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
ImplInitSettings( TRUE, TRUE, TRUE );
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Font aFont = GetDrawPixelFont( pDev );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Font aFont = GetDrawPixelFont( pDev );
pDev->Push();
pDev->SetMapMode();
@@ -348,7 +348,7 @@ void FixedText::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
+ else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
ImplInitSettings( TRUE, FALSE, FALSE );
@@ -495,11 +495,11 @@ void FixedLine::ImplInitSettings( BOOL bFont,
void FixedLine::ImplDraw( bool bLayout )
{
- Size aOutSize = GetOutputSizePixel();
- String aText = GetText();
- WinBits nWinStyle = GetStyle();
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ Size aOutSize = GetOutputSizePixel();
+ String aText = GetText();
+ WinBits nWinStyle = GetStyle();
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
+ String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
DecorationView aDecoView( this );
if ( !aText.Len() || (nWinStyle & WB_VERT) )
@@ -523,8 +523,8 @@ void FixedLine::ImplDraw( bool bLayout )
}
else
{
- USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
- Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
+ USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
+ Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( !IsEnabled() )
@@ -617,7 +617,7 @@ void FixedLine::StateChanged( StateChangedType nType )
(GetStyle() & FIXEDLINE_VIEW_STYLE) )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
+ else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_STYLE) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
@@ -807,9 +807,9 @@ void FixedBitmap::Paint( const Rectangle& )
void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
@@ -1059,9 +1059,9 @@ void FixedImage::UserDraw( const UserDrawEvent& )
void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 73d303b871ea..9922b458717d 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +38,10 @@
// =======================================================================
-#define GROUP_BORDER 12
-#define GROUP_TEXT_BORDER 2
+#define GROUP_BORDER 12
+#define GROUP_TEXT_BORDER 2
-#define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
+#define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
// =======================================================================
@@ -135,12 +135,12 @@ GroupBox::GroupBox( Window* pParent, const ResId& rResId ) :
void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout )
{
- long nTop;
- long nTextOff;
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- XubString aText( GetText() );
- Rectangle aRect( rPos, rSize );
- USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
+ long nTop;
+ long nTextOff;
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ XubString aText( GetText() );
+ Rectangle aRect( rPos, rSize );
+ USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
if ( GetStyle() & WB_NOLABEL )
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
@@ -185,7 +185,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
pDev->SetLineColor( Color( COL_BLACK ) );
else
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
-
+
if ( !aText.Len() )
pDev->DrawLine( Point( rPos.X(), nTop ), Point( rPos.X()+rSize.Width()-2, nTop ) );
else
@@ -227,7 +227,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
void GroupBox::FillLayoutData() const
{
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
- const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true );
+ const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true );
}
// -----------------------------------------------------------------------
@@ -242,9 +242,9 @@ void GroupBox::Paint( const Rectangle& )
void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Font aFont = GetDrawPixelFont( pDev );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Font aFont = GetDrawPixelFont( pDev );
pDev->Push();
pDev->SetMapMode();
@@ -287,7 +287,7 @@ void GroupBox::StateChanged( StateChangedType nType )
(GetStyle() & GROUP_VIEW_STYLE) )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
+ else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
ImplInitSettings( TRUE, FALSE, FALSE );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 14a2fb947662..5c8f4229fa88 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -278,10 +278,10 @@ USHORT ImplEntryList::FindEntry( const XubString& rString, BOOL bSearchMRUArea )
USHORT ImplEntryList::FindMatchingEntry( const XubString& rStr, USHORT nStart, BOOL bForward, BOOL bLazy ) const
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
- USHORT nEntryCount = GetEntryCount();
+ USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ USHORT nEntryCount = GetEntryCount();
if ( !bForward )
- nStart++; // wird sofort dekrementiert
+ nStart++; // wird sofort dekrementiert
const vcl::I18nHelper& rI18nHelper = mpWindow->GetSettings().GetLocaleI18nHelper();
for ( USHORT n = nStart; bForward ? ( n < nEntryCount ) : n; )
@@ -336,7 +336,7 @@ long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, lo
nStop = nEntryCount-1;
if( nStart > nEntryCount-1 )
nStart = nEntryCount-1;
-
+
USHORT nIndex = nStart;
while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
{
@@ -526,37 +526,37 @@ USHORT ImplEntryList::FindFirstSelectable( USHORT nPos, bool bForward /* = true
ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
Control( pParent, 0 )
{
- mpEntryList = new ImplEntryList( this );
-
- mnTop = 0;
- mnLeft = 0;
- mnBorder = 1;
- mnSelectModifier = 0;
- mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
- mbTrack = FALSE;
- mbImgsDiffSz = FALSE;
- mbTravelSelect = FALSE;
- mbTrackingSelect = FALSE;
- mbSelectionChanged = FALSE;
- mbMouseMoveSelect = FALSE;
- mbMulti = FALSE;
- mbStackMode = FALSE;
- mbGrabFocus = FALSE;
- mbUserDrawEnabled = FALSE;
- mbInUserDraw = FALSE;
- mbReadOnly = FALSE;
+ mpEntryList = new ImplEntryList( this );
+
+ mnTop = 0;
+ mnLeft = 0;
+ mnBorder = 1;
+ mnSelectModifier = 0;
+ mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
+ mbTrack = FALSE;
+ mbImgsDiffSz = FALSE;
+ mbTravelSelect = FALSE;
+ mbTrackingSelect = FALSE;
+ mbSelectionChanged = FALSE;
+ mbMouseMoveSelect = FALSE;
+ mbMulti = FALSE;
+ mbStackMode = FALSE;
+ mbGrabFocus = FALSE;
+ mbUserDrawEnabled = FALSE;
+ mbInUserDraw = FALSE;
+ mbReadOnly = FALSE;
mbHasFocusRect = FALSE;
mbRight = ( nWinStyle & WB_RIGHT ) ? TRUE : FALSE;
mbCenter = ( nWinStyle & WB_CENTER ) ? TRUE : FALSE;
- mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? TRUE : FALSE;
- mbSort = ( nWinStyle & WB_SORT ) ? TRUE : FALSE;
+ mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ mbSort = ( nWinStyle & WB_SORT ) ? TRUE : FALSE;
// pb: #106948# explicit mirroring for calc
- mbMirroring = FALSE;
+ mbMirroring = FALSE;
- mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
+ mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
- mnSeparatorPos = LISTBOX_ENTRY_NOTFOUND;
+ mnSeparatorPos = LISTBOX_ENTRY_NOTFOUND;
meProminentType = PROMINENT_TOP;
SetLineColor();
@@ -589,11 +589,11 @@ void ImplListBoxWindow::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBa
void ImplListBoxWindow::ImplCalcMetrics()
{
- mnMaxWidth = 0;
- mnMaxTxtWidth = 0;
- mnMaxImgWidth = 0;
+ mnMaxWidth = 0;
+ mnMaxTxtWidth = 0;
+ mnMaxImgWidth = 0;
mnMaxImgTxtWidth= 0;
- mnMaxImgHeight = 0;
+ mnMaxImgHeight = 0;
mnTextHeight = (USHORT)GetTextHeight();
mnMaxTxtHeight = mnTextHeight + mnBorder;
@@ -631,15 +631,15 @@ void ImplListBoxWindow::Clear()
{
mpEntryList->Clear();
- mnMaxHeight = mnMaxTxtHeight;
- mnMaxWidth = 0;
- mnMaxTxtWidth = 0;
+ mnMaxHeight = mnMaxTxtHeight;
+ mnMaxWidth = 0;
+ mnMaxTxtWidth = 0;
mnMaxImgTxtWidth= 0;
- mnMaxImgWidth = 0;
- mnMaxImgHeight = 0;
- mnTop = 0;
- mnLeft = 0;
- mbImgsDiffSz = FALSE;
+ mnMaxImgWidth = 0;
+ mnMaxImgHeight = 0;
+ mnTop = 0;
+ mnLeft = 0;
+ mbImgsDiffSz = FALSE;
ImplClearLayoutData();
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -658,13 +658,13 @@ void ImplListBoxWindow::SetUserItemSize( const Size& rSz )
struct ImplEntryMetrics
{
- BOOL bText;
- BOOL bImage;
- long nEntryWidth;
- long nEntryHeight;
- long nTextWidth;
- long nImgWidth;
- long nImgHeight;
+ BOOL bText;
+ BOOL bImage;
+ long nEntryWidth;
+ long nEntryHeight;
+ long nTextWidth;
+ long nImgWidth;
+ long nImgHeight;
};
// -----------------------------------------------------------------------
@@ -710,7 +710,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
if ( aMetrics.bImage )
{
Size aImgSz = rEntry.maImage.GetSizePixel();
- aMetrics.nImgWidth = (USHORT) CalcZoom( aImgSz.Width() );
+ aMetrics.nImgWidth = (USHORT) CalcZoom( aImgSz.Width() );
aMetrics.nImgHeight = (USHORT) CalcZoom( aImgSz.Height() );
if( mnMaxImgWidth && ( aMetrics.nImgWidth != mnMaxImgWidth ) )
@@ -725,7 +725,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
mnMaxImgTxtWidth = Max( mnMaxImgTxtWidth, aMetrics.nTextWidth );
aMetrics.nEntryHeight = Max( aMetrics.nImgHeight, aMetrics.nEntryHeight );
-
+
}
if ( IsUserDrawEnabled() || aMetrics.bImage )
{
@@ -747,7 +747,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
mnMaxWidth = aMetrics.nEntryWidth;
if ( aMetrics.nEntryHeight > mnMaxHeight )
mnMaxHeight = aMetrics.nEntryHeight;
-
+
rEntry.mnHeight = aMetrics.nEntryHeight;
}
@@ -803,7 +803,7 @@ USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
if( (GetStyle() & WB_WORDBREAK) )
pNewEntry->mnFlags |= LISTBOX_ENTRY_FLAG_MULTILINE;
-
+
ImplUpdateEntryMetrics( *pNewEntry );
return nNewPos;
}
@@ -856,7 +856,7 @@ void ImplListBoxWindow::ImplHideFocusRect()
USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
{
long nY = mnBorder;
-
+
USHORT nSelect = mnTop;
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
while( pEntry && rPoint.Y() > pEntry->mnHeight + nY )
@@ -875,7 +875,7 @@ USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
{
BOOL bRet = FALSE;
-
+
if( i_nEntry >= mnTop )
{
if( mpEntryList->GetAddedHeight( i_nEntry, mnTop ) <
@@ -884,7 +884,7 @@ BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
bRet = TRUE;
}
}
-
+
return bRet;
}
@@ -898,13 +898,13 @@ USHORT ImplListBoxWindow::GetLastVisibleEntry() const
long nDiff;
for( nDiff = 0; nDiff < nWindowHeight && nPos < nCount; nDiff = mpEntryList->GetAddedHeight( nPos, mnTop ) )
nPos++;
-
+
if( nDiff > nWindowHeight && nPos > mnTop )
nPos--;
-
+
if( nPos >= nCount )
nPos = nCount-1;
-
+
return nPos;
}
@@ -912,7 +912,7 @@ USHORT ImplListBoxWindow::GetLastVisibleEntry() const
void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbMouseMoveSelect = FALSE; // Nur bis zum ersten MouseButtonDown
+ mbMouseMoveSelect = FALSE; // Nur bis zum ersten MouseButtonDown
maSearchStr.Erase();
if ( !IsReadOnly() )
@@ -986,7 +986,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
nSelect = Min( nSelect, GetLastVisibleEntry() );
nSelect = Min( nSelect, (USHORT) ( mpEntryList->GetEntryCount() - 1 ) );
// Select only visible Entries with MouseMove, otherwise Tracking...
- if ( IsVisible( nSelect ) &&
+ if ( IsVisible( nSelect ) &&
mpEntryList->IsEntrySelectable( nSelect ) &&
( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() || ( nSelect != GetEntryList()->GetSelectEntryPos( 0 ) ) ) )
{
@@ -1298,7 +1298,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
MouseEvent aMEvt = rTEvt.GetMouseEvent();
Point aPt( aMEvt.GetPosPixel() );
BOOL bShift = aMEvt.IsShift();
- BOOL bCtrl = aMEvt.IsMod1();
+ BOOL bCtrl = aMEvt.IsMod1();
USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
if( aPt.Y() < 0 )
@@ -1314,7 +1314,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSelect = Min( (USHORT)(mnCurrentPos+1), (USHORT)(mpEntryList->GetEntryCount()-1) );
+ nSelect = Min( (USHORT)(mnCurrentPos+1), (USHORT)(mpEntryList->GetEntryCount()-1) );
if( nSelect >= GetLastVisibleEntry() )
SetTopEntry( mnTop+1 );
}
@@ -1417,9 +1417,9 @@ void ImplListBoxWindow::KeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
-#define IMPL_SELECT_NODIRECTION 0
-#define IMPL_SELECT_UP 1
-#define IMPL_SELECT_DOWN 2
+#define IMPL_SELECT_NODIRECTION 0
+#define IMPL_SELECT_UP 1
+#define IMPL_SELECT_DOWN 2
BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
@@ -1430,12 +1430,12 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
KeyCode aKeyCode = rKEvt.GetKeyCode();
BOOL bShift = aKeyCode.IsShift();
- BOOL bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
+ BOOL bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
BOOL bMod2 = aKeyCode.IsMod2();
BOOL bDone = FALSE;
switch( aKeyCode.GetCode() )
- {
+ {
case KEY_UP:
{
if ( IsReadOnly() )
@@ -1512,7 +1512,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
USHORT nCurVis = GetLastVisibleEntry() - mnTop +1;
SetTopEntry( ( mnTop > nCurVis ) ? ( mnTop-nCurVis+1 ) : 0 );
}
-
+
// find first selectable starting from mnTop looking foreward
nSelect = mpEntryList->FindFirstSelectable( mnTop, true );
}
@@ -1631,7 +1631,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- bDone = FALSE; // RETURN nicht abfangen.
+ bDone = FALSE; // RETURN nicht abfangen.
}
maSearchStr.Erase();
}
@@ -1660,16 +1660,16 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
BOOL bUpdates = IsUpdateMode();
SetUpdateMode( FALSE );
- USHORT nEntryCount = mpEntryList->GetEntryCount();
+ USHORT nEntryCount = mpEntryList->GetEntryCount();
for( USHORT i = 0; i < nEntryCount; i++ )
SelectEntry( i, TRUE );
-
+
// restore update mode
SetUpdateMode( bUpdates );
Invalidate();
-
+
maSearchStr.Erase();
-
+
bDone = TRUE;
break;
}
@@ -1743,7 +1743,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
+
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos );
if( ! pEntry )
return;
@@ -1796,8 +1796,8 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos );
if( ! pEntry )
- return;
-
+ return;
+
// Bei Aenderungen in dieser Methode ggf. auch ImplWin::DrawEntry() anpassen.
if ( mbInUserDraw )
@@ -1871,7 +1871,7 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
nDrawStyle |= MULTILINE_ENTRY_DRAW_FLAGS;
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_DRAW_DISABLED) )
nDrawStyle |= TEXT_DRAW_DISABLE;
-
+
DrawText( aTextRect, aStr, nDrawStyle, pVector, pDisplayText );
}
}
@@ -1947,7 +1947,7 @@ void ImplListBoxWindow::Paint( const Rectangle& rRect )
USHORT ImplListBoxWindow::GetDisplayLineCount() const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
-
+
USHORT nCount = mpEntryList->GetEntryCount();
long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
USHORT nEntries = static_cast< USHORT >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
@@ -2020,16 +2020,16 @@ void ImplListBoxWindow::SetTopEntry( USHORT nTop )
{
if( mpEntryList->GetEntryCount() == 0 )
return;
-
+
long nWHeight = PixelToLogic( GetSizePixel() ).Height();
-
+
USHORT nLastEntry = mpEntryList->GetEntryCount()-1;
if( nTop > nLastEntry )
nTop = nLastEntry;
const ImplEntryType* pLast = mpEntryList->GetEntryPtr( nLastEntry );
while( nTop > 0 && mpEntryList->GetAddedHeight( nLastEntry, nTop-1 ) + pLast->mnHeight <= nWHeight )
nTop--;
-
+
if ( nTop != mnTop )
{
ImplClearLayoutData();
@@ -2107,10 +2107,10 @@ void ImplListBoxWindow::ScrollHorz( long n )
Size ImplListBoxWindow::CalcSize( USHORT nMaxLines ) const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
-
+
Size aSz;
-// USHORT nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
- aSz.Height() = nMaxLines * mnMaxHeight;
+// USHORT nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
+ aSz.Height() = nMaxLines * mnMaxHeight;
aSz.Width() = mnMaxWidth + 2*mnBorder;
return aSz;
}
@@ -2208,17 +2208,17 @@ ImplListBox::ImplListBox( Window* pParent, WinBits nWinStyle ) :
// for native widget rendering we must be able to detect this window type
SetType( WINDOW_LISTBOXWINDOW );
- mpVScrollBar = new ScrollBar( this, WB_VSCROLL | WB_DRAG );
- mpHScrollBar = new ScrollBar( this, WB_HSCROLL | WB_DRAG );
- mpScrollBarBox = new ScrollBarBox( this );
+ mpVScrollBar = new ScrollBar( this, WB_VSCROLL | WB_DRAG );
+ mpHScrollBar = new ScrollBar( this, WB_HSCROLL | WB_DRAG );
+ mpScrollBarBox = new ScrollBarBox( this );
Link aLink( LINK( this, ImplListBox, ScrollBarHdl ) );
mpVScrollBar->SetScrollHdl( aLink );
mpHScrollBar->SetScrollHdl( aLink );
- mbVScroll = FALSE;
- mbHScroll = FALSE;
- mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? TRUE : FALSE;
+ mbVScroll = FALSE;
+ mbHScroll = FALSE;
+ mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? TRUE : FALSE;
maLBWindow.SetScrollHdl( LINK( this, ImplListBox, LBWindowScrolled ) );
maLBWindow.SetMRUChangedHdl( LINK( this, ImplListBox, MRUChanged ) );
@@ -2390,7 +2390,7 @@ void ImplListBox::ImplCheckScrollBars()
mbVScroll = TRUE;
// Ueberpruefung des rausgescrollten Bereichs
- SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
+ SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
}
else
{
@@ -2414,7 +2414,7 @@ void ImplListBox::ImplCheckScrollBars()
bArrange = TRUE;
mbHScroll = TRUE;
- if ( !mbVScroll ) // ggf. brauchen wir jetzt doch einen
+ if ( !mbVScroll ) // ggf. brauchen wir jetzt doch einen
{
nMaxVisEntries = (USHORT) ( ( aOutSz.Height() - mpHScrollBar->GetSizePixel().Height() ) / GetEntryHeight() );
if( nEntries > nMaxVisEntries )
@@ -2423,7 +2423,7 @@ void ImplListBox::ImplCheckScrollBars()
mbVScroll = TRUE;
// Ueberpruefung des rausgescrollten Bereichs
- SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
+ SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
}
}
@@ -2547,8 +2547,8 @@ void ImplListBox::StateChanged( StateChangedType nType )
{
BOOL bUpdate = IsUpdateMode();
maLBWindow.SetUpdateMode( bUpdate );
-// mpHScrollBar->SetUpdateMode( bUpdate );
-// mpVScrollBar->SetUpdateMode( bUpdate );
+// mpHScrollBar->SetUpdateMode( bUpdate );
+// mpVScrollBar->SetUpdateMode( bUpdate );
if ( bUpdate && IsReallyVisible() )
ImplCheckScrollBars();
}
@@ -2591,13 +2591,13 @@ void ImplListBox::StateChanged( StateChangedType nType )
void ImplListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
-// if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
-// (rDCEvt.GetFlags() & SETTINGS_STYLE) )
-// {
-// maLBWindow.SetSettings( GetSettings() );
-// Resize();
-// }
-// else
+// if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
+// (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+// {
+// maLBWindow.SetSettings( GetSettings() );
+// Resize();
+// }
+// else
Control::DataChanged( rDCEvt );
}
@@ -2746,7 +2746,7 @@ void ImplWin::MouseButtonDown( const MouseEvent& )
{
if( IsEnabled() )
{
-// Control::MouseButtonDown( rMEvt );
+// Control::MouseButtonDown( rMEvt );
MBDown();
}
}
@@ -2807,7 +2807,7 @@ void ImplWin::ImplDraw( bool bLayout )
nState &= ~CTRL_STATE_ENABLED;
if ( pWin->HasFocus() )
nState |= CTRL_STATE_FOCUSED;
-
+
// The listbox is painted over the entire control including the
// border, but ImplWin does not contain the border => correction
// needed.
@@ -2823,10 +2823,10 @@ void ImplWin::ImplDraw( bool bLayout )
while( pChild && (bMouseOver = pChild->IsMouseOver()) == FALSE )
pChild = pChild->GetWindow( WINDOW_NEXT );
}
-
+
if( bMouseOver )
nState |= CTRL_STATE_ROLLOVER;
-
+
// if parent has no border, then nobody has drawn the background
// since no border window exists. so draw it here.
WinBits nParentStyle = pWin->GetStyle();
@@ -2836,7 +2836,7 @@ void ImplWin::ImplDraw( bool bLayout )
pWin->DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aParentRect,
nState, aControlValue, rtl::OUString() );
}
-
+
bNativeOK = DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
aControlValue, rtl::OUString() );
}
@@ -3007,7 +3007,7 @@ void ImplWin::LoseFocus()
ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) :
PushButton( pParent, nWinStyle ),
- mbDown ( FALSE )
+ mbDown ( FALSE )
{
}
@@ -3043,7 +3043,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) :
mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND;
EnableSaveBackground();
-
+
Window * pBorderWindow = ImplGetBorderWindow();
if( pBorderWindow )
{
@@ -3093,7 +3093,7 @@ void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth,
SetPosPixel( ImplCalcPos( this, Rectangle( aPos, GetParent()->GetSizePixel() ), FLOATWIN_POPUPMODE_DOWN, nIndex ) );
}
-// if( !IsReallyVisible() )
+// if( !IsReallyVisible() )
{
// Die ImplListBox erhaelt kein Resize, weil nicht sichtbar.
// Die Fenster muessen aber ein Resize() erhalten, damit die
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index dfb74ecc4880..436ab5e45a16 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -233,7 +233,7 @@ void ImageControl::Paint( const Rectangle& rRect )
if( HasFocus() )
{
Window *pWin = GetWindow( WINDOW_BORDER );
-
+
BOOL bFlat = (GetBorderStyle() == 2);
Rectangle aRect( Point(0,0), pWin->GetOutputSizePixel() );
Color oldLineCol = pWin->GetLineColor();
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index e072b406faae..610dbd92d469 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +48,14 @@
// =======================================================================
-#define FORMAT_LONGCURRENCY 4
+#define FORMAT_LONGCURRENCY 4
// =======================================================================
static BigInt ImplPower10( USHORT n )
{
USHORT i;
- BigInt nValue = 1;
+ BigInt nValue = 1;
for ( i=0; i < n; i++ )
nValue *= 10;
@@ -82,7 +82,7 @@ static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const
if ( !aInteger.IsZero() )
{
aFraction += aTmp;
- aTmp = 1000000000L;
+ aTmp = 1000000000L;
}
if ( rNumber.IsNeg() )
aFraction *= -1;
@@ -122,7 +122,7 @@ static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
else
{
sal_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
@@ -142,12 +142,12 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
BOOL bCurrency = FALSE )
{
- XubString aStr = rStr;
- XubString aStr1;
- XubString aStr2;
- USHORT nDecPos;
- BOOL bNegative = FALSE;
- xub_StrLen i;
+ XubString aStr = rStr;
+ XubString aStr1;
+ XubString aStr2;
+ USHORT nDecPos;
+ BOOL bNegative = FALSE;
+ xub_StrLen i;
// Reaktion auf leeren String
if ( !rStr.Len() )
@@ -314,7 +314,7 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
}
}
- rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
+ rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
return TRUE;
}
}
@@ -324,14 +324,14 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
void LongCurrencyFormatter::ImpInit()
{
- mnFieldValue = 0;
- mnLastValue = 0;
- mnMin = 0;
- mnMax = 0x7FFFFFFF;
- mnMax *= 0x7FFFFFFF;
- mnCorrectedValue = 0;
+ mnFieldValue = 0;
+ mnLastValue = 0;
+ mnMin = 0;
+ mnMax = 0x7FFFFFFF;
+ mnMax *= 0x7FFFFFFF;
+ mnCorrectedValue = 0;
mnDecimalDigits = 0;
- mnType = FORMAT_LONGCURRENCY;
+ mnType = FORMAT_LONGCURRENCY;
mbThousandSep = TRUE;
SetDecimalDigits( 0 );
}
@@ -349,23 +349,23 @@ void LongCurrencyFormatter::ImplLoadRes( const ResId& rResId )
{
ImpInit();
- ResMgr* pMgr = rResId.GetResMgr();
+ ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
-
+ ULONG nMask = pMgr->ReadLong();
+
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_MAX & nMask )
mnMax = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
-
+
if ( NUMERICFORMATTER_VALUE & nMask )
{
mnFieldValue = pMgr->ReadLong();
@@ -515,11 +515,11 @@ void LongCurrencyFormatter::SetUseThousandSep( BOOL b )
void LongCurrencyFormatter::SetDecimalDigits( USHORT nDigits )
{
-// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
+// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
if ( nDigits > 9 )
nDigits = 9;
-
+
mnDecimalDigits = nDigits;
ReformatAll();
}
@@ -600,9 +600,9 @@ LongCurrencyField::LongCurrencyField( Window* pParent, WinBits nWinStyle ) :
SpinField( pParent, nWinStyle )
{
SetField( this );
- mnSpinSize = 1;
- mnFirst = mnMin;
- mnLast = mnMax;
+ mnSpinSize = 1;
+ mnFirst = mnMin;
+ mnLast = mnMax;
Reformat();
}
@@ -617,9 +617,9 @@ LongCurrencyField::LongCurrencyField( Window* pParent, const ResId& rResId ) :
SpinField::ImplInit( pParent, nStyle );
SetField( this );
- mnSpinSize = 1;
- mnFirst = mnMin;
- mnLast = mnMax;
+ mnSpinSize = 1;
+ mnFirst = mnMin;
+ mnLast = mnMax;
Reformat();
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 3ae3c47c0428..2a5158230283 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +100,13 @@ ListBox::~ListBox()
void ListBox::ImplInitListBoxData()
{
- mpFloatWin = NULL;
- mpImplWin = NULL;
- mpBtn = NULL;
+ mpFloatWin = NULL;
+ mpImplWin = NULL;
+ mpBtn = NULL;
- mnDDHeight = 0;
- mbDDAutoSize = TRUE;
- mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
+ mnDDHeight = 0;
+ mbDDAutoSize = TRUE;
+ mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
}
@@ -176,7 +176,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
mpImplLB->SetPosPixel( Point() );
mpImplLB->Show();
-
+
mpImplLB->GetDropTarget()->addDropTargetListener(xDrop);
mpImplLB->SetDropTraget(xDrop);
@@ -217,7 +217,7 @@ void ListBox::ImplLoadRes( const ResId& rResId )
long nId = ReadLongRes();
if( nId )
- SetEntryData( nPos, (void *)nId ); // ID als UserData
+ SetEntryData( nPos, (void *)nId ); // ID als UserData
}
if( nSelPos < nNumber )
@@ -450,11 +450,11 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
if ( IsDropDownBox() )
{
- XubString aText = GetSelectEntry();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOffX = 3*nOnePixel;
- long nOffY = (aSize.Height()-nTextHeight) / 2;
+ XubString aText = GetSelectEntry();
+ long nTextHeight = pDev->GetTextHeight();
+ long nTextWidth = pDev->GetTextWidth( aText );
+ long nOffX = 3*nOnePixel;
+ long nOffY = (aSize.Height()-nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -471,9 +471,9 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
}
else
{
- long nTextHeight = pDev->GetTextHeight();
- USHORT nLines = (USHORT)(aSize.Height() / nTextHeight);
- Rectangle aClip( aPos, aSize );
+ long nTextHeight = pDev->GetTextHeight();
+ USHORT nLines = (USHORT)(aSize.Height() / nTextHeight);
+ Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
@@ -487,7 +487,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
if ( bSelected )
{
pDev->SetFillColor( COL_BLACK );
- pDev->DrawRect( Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ),
+ pDev->DrawRect( Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ),
Point( aPos.X() + aSize.Width(), aPos.Y() + (n+1)*nTextHeight + 2*nOnePixel ) ) );
pDev->SetFillColor();
pDev->SetTextColor( COL_WHITE );
@@ -566,7 +566,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( mpImplWin )
{
- mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt...
+ mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt...
ImplInitFieldSettings( mpImplWin, TRUE, TRUE, TRUE );
mpBtn->SetSettings( GetSettings() );
@@ -655,8 +655,8 @@ void ListBox::Resize()
{
// initialize the dropdown button size with the standard scrollbar width
long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- long nTop = 0;
- long nBottom = aOutSz.Height();
+ long nTop = 0;
+ long nBottom = aOutSz.Height();
// note: in case of no border, pBorder will actually be this
Window *pBorder = GetWindow( WINDOW_BORDER );
@@ -760,7 +760,7 @@ long ListBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
// point must be either in main list window
// or in impl window (dropdown case)
ImplListBoxWindow* pMain = mpImplLB->GetMainWindow();
-
+
// convert coordinates to ImplListBoxWindow pixel coordinate space
Point aConvPoint = LogicToPixel( rPoint );
aConvPoint = OutputToAbsoluteScreenPixel( aConvPoint );
@@ -1350,7 +1350,7 @@ Size ListBox::CalcMinimumSize() const
}
aSz = CalcWindowSize( aSz );
-
+
if ( IsDropDownBox() ) // check minimum height of dropdown box
{
ImplControlValue aControlValue;
@@ -1363,7 +1363,7 @@ Size ListBox::CalcMinimumSize() const
aSz.Height() = aBound.GetHeight();
}
}
-
+
return aSz;
}
@@ -1411,7 +1411,7 @@ Size ListBox::CalcSize( USHORT nColumns, USHORT nLines ) const
{
// ggf. werden ScrollBars eingeblendet
Size aMinSz = CalcMinimumSize();
-// aMinSz = ImplCalcOutSz( aMinSz );
+// aMinSz = ImplCalcOutSz( aMinSz );
Size aSz;
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 74780c805cac..9e0de107161f 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,20 +40,20 @@
// =======================================================================
-#define IMAGEBUTTON_BORDER_OFF1 11
-#define IMAGEBUTTON_BORDER_OFF2 16
+#define IMAGEBUTTON_BORDER_OFF1 11
+#define IMAGEBUTTON_BORDER_OFF2 16
// =======================================================================
void MenuButton::ImplInitMenuButtonData()
{
- mnDDStyle = PUSHBUTTON_DROPDOWN_MENUBUTTON;
+ mnDDStyle = PUSHBUTTON_DROPDOWN_MENUBUTTON;
- mpMenuTimer = NULL;
- mpMenu = NULL;
- mpOwnMenu = NULL;
- mnCurItemId = 0;
- mnMenuMode = 0;
+ mpMenuTimer = NULL;
+ mpMenu = NULL;
+ mpOwnMenu = NULL;
+ mnCurItemId = 0;
+ mnMenuMode = 0;
}
// -----------------------------------------------------------------------
@@ -81,10 +81,10 @@ void MenuButton::ImplExecuteMenu()
if ( !((GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) ||
!(rStyleSettings.GetOptions() & STYLE_OPTION_MACSTYLE)) )
{
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
+ aRect.Left() += 2;
+ aRect.Top() += 2;
+ aRect.Right() -= 2;
+ aRect.Bottom() -= 2;
}
SetPressed( TRUE );
EndSelection();
@@ -180,10 +180,10 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt )
mpMenuTimer = new Timer;
mpMenuTimer->SetTimeoutHdl( LINK( this, MenuButton, ImplMenuTimeoutHdl ) );
}
-
+
mpMenuTimer->SetTimeout( GetSettings().GetMouseSettings().GetActionDelay() );
mpMenuTimer->Start();
-
+
PushButton::MouseButtonDown( rMEvt );
bExecute = false;
}
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index c00ab079d9ca..837118786959 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +50,9 @@ struct ImplMoreButtonData
void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
{
mpMBData = new ImplMoreButtonData;
- mnDelta = 0;
- meUnit = MAP_PIXEL;
- mbState = FALSE;
+ mnDelta = 0;
+ meUnit = MAP_PIXEL;
+ mbState = FALSE;
mpMBData->mpItemList = NULL;
@@ -147,10 +147,10 @@ MoreButton::~MoreButton()
void MoreButton::Click()
{
- Window* pParent = GetParent();
- Size aSize( pParent->GetSizePixel() );
- Window* pWindow = (mpMBData->mpItemList) ? mpMBData->mpItemList->First() : NULL;
- long nDeltaPixel = LogicToPixel( Size( 0, mnDelta ), meUnit ).Height();
+ Window* pParent = GetParent();
+ Size aSize( pParent->GetSizePixel() );
+ Window* pWindow = (mpMBData->mpItemList) ? mpMBData->mpItemList->First() : NULL;
+ long nDeltaPixel = LogicToPixel( Size( 0, mnDelta ), meUnit ).Height();
// Status aendern
mbState = !mbState;
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 966037bca441..eacb6ed57edf 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +50,10 @@ using namespace rtl;
However aqua draws a little outside. The canonical way would be to enhance the
HitTestNativeControl passing a ScrollbarValue additionally so all necessary
information is available in the call.
- .
+ .
However since there is only this one small exception we will deviate a little and
instead pass the respective rect as control region to allow for a small correction.
-
+
So all places using HitTestNativeControl on PART_THUMB_HORZ, PART_THUMB_VERT,
PART_TRACK_HORZ_LEFT, PART_TRACK_HORZ_RIGHT, PART_TRACK_VERT_UPPER, PART_TRACK_VERT_LOWER
do not use the control rectangle as region but the actuall part rectangle, making
@@ -93,9 +93,9 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
struct ImplScrollBarData
{
- AutoTimer maTimer; // Timer
+ AutoTimer maTimer; // Timer
BOOL mbHide;
- Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic
+ Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic
};
// =======================================================================
@@ -376,8 +376,8 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if( mnThumbPixRange > 0 )
{
maPage1Rect.Left() = maTrackRect.Left();
- maPage1Rect.Bottom() =
- maPage2Rect.Bottom() =
+ maPage1Rect.Bottom() =
+ maPage2Rect.Bottom() =
maThumbRect.Bottom() = maTrackRect.Bottom();
}
else
@@ -417,8 +417,8 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if( mnThumbPixRange > 0 )
{
maPage1Rect.Top() = maTrackRect.Top();
- maPage1Rect.Right() =
- maPage2Rect.Right() =
+ maPage1Rect.Right() =
+ maPage2Rect.Right() =
maThumbRect.Right() = maTrackRect.Right();
}
else
@@ -499,7 +499,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetSettings( aSettings );
}
- // for printing:
+ // for printing:
// -calculate the size of the rects
// -because this is zero-based add the correct offset
// -print
@@ -535,7 +535,7 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
// Draw the entire background if the control supports it
if( IsNativeControlSupported(CTRL_SCROLLBAR, bHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT) )
{
- ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
+ ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
scrValue.mnMin = mnMinRange;
scrValue.mnMax = mnMaxRange;
@@ -583,8 +583,8 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
{
if ( (nDrawFlags & SCRBAR_DRAW_PAGE1) || (nDrawFlags & SCRBAR_DRAW_PAGE2) )
{
- sal_uInt32 part1 = bHorz ? PART_TRACK_HORZ_LEFT : PART_TRACK_VERT_UPPER;
- sal_uInt32 part2 = bHorz ? PART_TRACK_HORZ_RIGHT : PART_TRACK_VERT_LOWER;
+ sal_uInt32 part1 = bHorz ? PART_TRACK_HORZ_LEFT : PART_TRACK_VERT_UPPER;
+ sal_uInt32 part2 = bHorz ? PART_TRACK_HORZ_RIGHT : PART_TRACK_VERT_LOWER;
Rectangle aCtrlRegion1( maPage1Rect );
Rectangle aCtrlRegion2( maPage2Rect );
ControlState nState1 = (IsEnabled() ? CTRL_STATE_ENABLED : 0) | (HasFocus() ? CTRL_STATE_FOCUSED : 0);
@@ -606,19 +606,19 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
}
if ( nDrawFlags & SCRBAR_DRAW_PAGE1 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
scrValue, rtl::OUString() );
if ( nDrawFlags & SCRBAR_DRAW_PAGE2 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
scrValue, rtl::OUString() );
}
if ( (nDrawFlags & SCRBAR_DRAW_BTN1) || (nDrawFlags & SCRBAR_DRAW_BTN2) )
{
- sal_uInt32 part1 = bHorz ? PART_BUTTON_LEFT : PART_BUTTON_UP;
- sal_uInt32 part2 = bHorz ? PART_BUTTON_RIGHT : PART_BUTTON_DOWN;
- Rectangle aCtrlRegion1( maBtn1Rect );
- Rectangle aCtrlRegion2( maBtn2Rect );
+ sal_uInt32 part1 = bHorz ? PART_BUTTON_LEFT : PART_BUTTON_UP;
+ sal_uInt32 part2 = bHorz ? PART_BUTTON_RIGHT : PART_BUTTON_DOWN;
+ Rectangle aCtrlRegion1( maBtn1Rect );
+ Rectangle aCtrlRegion2( maBtn2Rect );
ControlState nState1 = HasFocus() ? CTRL_STATE_FOCUSED : 0;
ControlState nState2 = nState1;
@@ -648,17 +648,17 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
}
if ( nDrawFlags & SCRBAR_DRAW_BTN1 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
scrValue, rtl::OUString() );
if ( nDrawFlags & SCRBAR_DRAW_BTN2 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
scrValue, rtl::OUString() );
}
if ( (nDrawFlags & SCRBAR_DRAW_THUMB) && !maThumbRect.IsEmpty() )
{
- ControlState nState = IsEnabled() ? CTRL_STATE_ENABLED : 0;
- Rectangle aCtrlRegion( maThumbRect );
+ ControlState nState = IsEnabled() ? CTRL_STATE_ENABLED : 0;
+ Rectangle aCtrlRegion( maThumbRect );
if ( mnStateFlags & SCRBAR_STATE_THUMB_DOWN )
nState |= CTRL_STATE_PRESSED;
@@ -700,7 +700,7 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
Window *pWin = NULL;
if( pOutDev->GetOutDevType() == OUTDEV_WINDOW )
pWin = (Window*) pOutDev;
-
+
// Draw the entire control if the native theme engine needs it
if ( nDrawFlags && pWin && pWin->IsNativeControlSupported(CTRL_SCROLLBAR, PART_DRAW_BACKGROUND_HORZ) )
{
@@ -1068,13 +1068,13 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
if( HasFocus() )
ImplDraw( SCRBAR_DRAW_THUMB, this ); // paint without focus
}
-
+
if ( mnVisibleSize < mnMaxRange-mnMinRange )
{
nTrackFlags = 0;
meScrollType = SCROLL_DRAG;
mnDragDraw = SCRBAR_DRAW_THUMB;
-
+
// calculate mouse offset
if( rMEvt.IsMiddle() || (ImplGetSVData()->maNWFData.mbScrollbarJumpPage && !bThumbHit) )
{
@@ -1091,7 +1091,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
else
mnMouseOff = rMousePos.Y()-maThumbRect.Top();
}
-
+
mnStateFlags |= SCRBAR_STATE_THUMB_DOWN;
ImplDraw( mnDragDraw, this );
}
@@ -1103,11 +1103,11 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
bIsInside : TRUE )
{
nTrackFlags = STARTTRACK_BUTTONREPEAT;
-
+
// HitTestNativeControl, see remark at top of file
if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_TRACK_HORZ_LEFT : PART_TRACK_VERT_UPPER,
maPage1Rect, rMousePos, bIsInside )?
- bIsInside:
+ bIsInside:
maPage1Rect.IsInside( rMousePos ) )
{
meScrollType = SCROLL_PAGEUP;
@@ -1126,12 +1126,12 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
{
// remember original position in case of abort or EndScroll-Delta
mnStartPos = mnThumbPos;
- // #92906# Call StartTracking() before ImplDoMouseAction(), otherwise
- // MouseButtonUp() / EndTracking() may be called if somebody is spending
+ // #92906# Call StartTracking() before ImplDoMouseAction(), otherwise
+ // MouseButtonUp() / EndTracking() may be called if somebody is spending
// a lot of time in the scroll handler
StartTracking( nTrackFlags );
ImplDoMouseAction( rMousePos );
-
+
if( bDragToMouse )
ImplDragThumb( rMousePos );
}
@@ -1280,7 +1280,7 @@ void ScrollBar::ImplInvert()
aRect.Left() += 2;
aRect.Right() -= 2;
}
- if( aRect.getHeight() > 4 )
+ if( aRect.getHeight() > 4 )
{
aRect.Top() += 2;
aRect.Bottom() -= 2;
@@ -1438,7 +1438,7 @@ long ScrollBar::PreNotify( NotifyEvent& rNEvt )
aClipRegion.Union( *pRect );
if ( pLastRect )
aClipRegion.Union( *pLastRect );
-
+
// Support for 3-button scroll bars
BOOL bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS );
if ( bHas3Buttons && ( pRect == &maBtn1Rect || pLastRect == &maBtn1Rect ) )
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 6d3c813dbe59..ce0ffc4a75b1 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,49 +46,49 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
// =======================================================================
-#define SLIDER_DRAW_THUMB ((USHORT)0x0001)
-#define SLIDER_DRAW_CHANNEL1 ((USHORT)0x0002)
-#define SLIDER_DRAW_CHANNEL2 ((USHORT)0x0004)
-#define SLIDER_DRAW_CHANNEL (SLIDER_DRAW_CHANNEL1 | SLIDER_DRAW_CHANNEL2)
-#define SLIDER_DRAW_ALL (SLIDER_DRAW_THUMB | SLIDER_DRAW_CHANNEL)
+#define SLIDER_DRAW_THUMB ((USHORT)0x0001)
+#define SLIDER_DRAW_CHANNEL1 ((USHORT)0x0002)
+#define SLIDER_DRAW_CHANNEL2 ((USHORT)0x0004)
+#define SLIDER_DRAW_CHANNEL (SLIDER_DRAW_CHANNEL1 | SLIDER_DRAW_CHANNEL2)
+#define SLIDER_DRAW_ALL (SLIDER_DRAW_THUMB | SLIDER_DRAW_CHANNEL)
-#define SLIDER_STATE_CHANNEL1_DOWN ((USHORT)0x0001)
-#define SLIDER_STATE_CHANNEL2_DOWN ((USHORT)0x0002)
-#define SLIDER_STATE_THUMB_DOWN ((USHORT)0x0004)
+#define SLIDER_STATE_CHANNEL1_DOWN ((USHORT)0x0001)
+#define SLIDER_STATE_CHANNEL2_DOWN ((USHORT)0x0002)
+#define SLIDER_STATE_THUMB_DOWN ((USHORT)0x0004)
-#define SLIDER_THUMB_SIZE 9
-#define SLIDER_THUMB_HALFSIZE 4
-#define SLIDER_CHANNEL_OFFSET 0
-#define SLIDER_CHANNEL_SIZE 4
-#define SLIDER_CHANNEL_HALFSIZE 2
+#define SLIDER_THUMB_SIZE 9
+#define SLIDER_THUMB_HALFSIZE 4
+#define SLIDER_CHANNEL_OFFSET 0
+#define SLIDER_CHANNEL_SIZE 4
+#define SLIDER_CHANNEL_HALFSIZE 2
-#define SLIDER_HEIGHT 16
+#define SLIDER_HEIGHT 16
-#define SLIDER_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT)
+#define SLIDER_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT)
// =======================================================================
void Slider::ImplInit( Window* pParent, WinBits nStyle )
{
- mnThumbPixOffset = 0;
- mnThumbPixRange = 0;
- mnThumbPixPos = 0; // between mnThumbPixOffset and mnThumbPixOffset+mnThumbPixRange
- mnChannelPixOffset = 0;
- mnChannelPixRange = 0;
- mnChannelPixTop = 0;
- mnChannelPixBottom = 0;
-
- mnMinRange = 0;
- mnMaxRange = 100;
- mnThumbPos = 0;
- mnLineSize = 1;
- mnPageSize = 1;
- mnDelta = 0;
- mnDragDraw = 0;
- mnStateFlags = 0;
- meScrollType = SCROLL_DONTKNOW;
- mbCalcSize = TRUE;
- mbFullDrag = TRUE;
+ mnThumbPixOffset = 0;
+ mnThumbPixRange = 0;
+ mnThumbPixPos = 0; // between mnThumbPixOffset and mnThumbPixOffset+mnThumbPixRange
+ mnChannelPixOffset = 0;
+ mnChannelPixRange = 0;
+ mnChannelPixTop = 0;
+ mnChannelPixBottom = 0;
+
+ mnMinRange = 0;
+ mnMaxRange = 100;
+ mnThumbPos = 0;
+ mnLineSize = 1;
+ mnPageSize = 1;
+ mnDelta = 0;
+ mnDragDraw = 0;
+ mnStateFlags = 0;
+ meScrollType = SCROLL_DONTKNOW;
+ mbCalcSize = TRUE;
+ mbFullDrag = TRUE;
Control::ImplInit( pParent, nStyle, NULL );
@@ -124,12 +124,12 @@ void Slider::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- INT16 nMin = ReadShortRes();
- INT16 nMax = ReadShortRes();
- INT16 nThumbPos = ReadShortRes();
- INT16 nPage = ReadShortRes();
- INT16 nStep = ReadShortRes();
- /* INT16 nVisibleSize = */ ReadShortRes();
+ INT16 nMin = ReadShortRes();
+ INT16 nMax = ReadShortRes();
+ INT16 nThumbPos = ReadShortRes();
+ INT16 nPage = ReadShortRes();
+ INT16 nStep = ReadShortRes();
+ /* INT16 nVisibleSize = */ ReadShortRes();
SetRange( Range( nMin, nMax ) );
SetLineSize( nStep );
@@ -173,27 +173,27 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
{
if ( GetStyle() & WB_HORZ )
{
- maThumbRect.Left() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
- maThumbRect.Right() = maThumbRect.Left()+SLIDER_THUMB_SIZE-1;
+ maThumbRect.Left() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
+ maThumbRect.Right() = maThumbRect.Left()+SLIDER_THUMB_SIZE-1;
if ( mnChannelPixOffset < maThumbRect.Left() )
{
- maChannel1Rect.Left() = mnChannelPixOffset;
- maChannel1Rect.Right() = maThumbRect.Left()-1;
- maChannel1Rect.Top() = mnChannelPixTop;
+ maChannel1Rect.Left() = mnChannelPixOffset;
+ maChannel1Rect.Right() = maThumbRect.Left()-1;
+ maChannel1Rect.Top() = mnChannelPixTop;
maChannel1Rect.Bottom() = mnChannelPixBottom;
}
else
maChannel1Rect.SetEmpty();
if ( mnChannelPixOffset+mnChannelPixRange-1 > maThumbRect.Right() )
{
- maChannel2Rect.Left() = maThumbRect.Right()+1;
- maChannel2Rect.Right() = mnChannelPixOffset+mnChannelPixRange-1;
- maChannel2Rect.Top() = mnChannelPixTop;
+ maChannel2Rect.Left() = maThumbRect.Right()+1;
+ maChannel2Rect.Right() = mnChannelPixOffset+mnChannelPixRange-1;
+ maChannel2Rect.Top() = mnChannelPixTop;
maChannel2Rect.Bottom() = mnChannelPixBottom;
}
else
maChannel2Rect.SetEmpty();
-
+
const Rectangle aControlRegion( Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
Rectangle aThumbBounds, aThumbContent;
if ( GetNativeControlRegion( CTRL_SLIDER, PART_THUMB_HORZ,
@@ -207,23 +207,23 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
}
else
{
- maThumbRect.Top() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
- maThumbRect.Bottom() = maThumbRect.Top()+SLIDER_THUMB_SIZE-1;
+ maThumbRect.Top() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
+ maThumbRect.Bottom() = maThumbRect.Top()+SLIDER_THUMB_SIZE-1;
if ( mnChannelPixOffset < maThumbRect.Top() )
{
- maChannel1Rect.Top() = mnChannelPixOffset;
+ maChannel1Rect.Top() = mnChannelPixOffset;
maChannel1Rect.Bottom() = maThumbRect.Top()-1;
- maChannel1Rect.Left() = mnChannelPixTop;
- maChannel1Rect.Right() = mnChannelPixBottom;
+ maChannel1Rect.Left() = mnChannelPixTop;
+ maChannel1Rect.Right() = mnChannelPixBottom;
}
else
maChannel1Rect.SetEmpty();
if ( mnChannelPixOffset+mnChannelPixRange-1 > maThumbRect.Bottom() )
{
- maChannel2Rect.Top() = maThumbRect.Bottom()+1;
+ maChannel2Rect.Top() = maThumbRect.Bottom()+1;
maChannel2Rect.Bottom() = mnChannelPixOffset+mnChannelPixRange-1;
- maChannel2Rect.Left() = mnChannelPixTop;
- maChannel2Rect.Right() = mnChannelPixBottom;
+ maChannel2Rect.Left() = mnChannelPixTop;
+ maChannel2Rect.Right() = mnChannelPixBottom;
}
else
maChannel2Rect.SetEmpty();
@@ -257,7 +257,7 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
{
Region aInvalidRegion( aOldThumbRect );
aInvalidRegion.Union( maThumbRect );
-
+
if( !IsBackground() && GetParent() )
{
const Point aPos( GetPosPixel() );
@@ -308,10 +308,10 @@ void Slider::ImplCalc( BOOL bUpdate )
if ( mbCalcSize )
{
- long nOldChannelPixOffset = mnChannelPixOffset;
- long nOldChannelPixRange = mnChannelPixRange;
- long nOldChannelPixTop = mnChannelPixTop;
- long nOldChannelPixBottom = mnChannelPixBottom;
+ long nOldChannelPixOffset = mnChannelPixOffset;
+ long nOldChannelPixRange = mnChannelPixRange;
+ long nOldChannelPixTop = mnChannelPixTop;
+ long nOldChannelPixBottom = mnChannelPixBottom;
long nCalcWidth;
long nCalcHeight;
@@ -322,28 +322,28 @@ void Slider::ImplCalc( BOOL bUpdate )
Size aSize = GetOutputSizePixel();
if ( GetStyle() & WB_HORZ )
{
- nCalcWidth = aSize.Width();
- nCalcHeight = aSize.Height();
- maThumbRect.Top() = 0;
+ nCalcWidth = aSize.Width();
+ nCalcHeight = aSize.Height();
+ maThumbRect.Top() = 0;
maThumbRect.Bottom()= aSize.Height()-1;
}
else
{
- nCalcWidth = aSize.Height();
- nCalcHeight = aSize.Width();
- maThumbRect.Left() = 0;
+ nCalcWidth = aSize.Height();
+ nCalcHeight = aSize.Width();
+ maThumbRect.Left() = 0;
maThumbRect.Right() = aSize.Width()-1;
}
if ( nCalcWidth >= SLIDER_THUMB_SIZE )
{
- mnThumbPixOffset = SLIDER_THUMB_HALFSIZE;
- mnThumbPixRange = nCalcWidth-(SLIDER_THUMB_HALFSIZE*2);
- mnThumbPixPos = 0;
- mnChannelPixOffset = SLIDER_CHANNEL_OFFSET;
- mnChannelPixRange = nCalcWidth-(SLIDER_CHANNEL_OFFSET*2);
- mnChannelPixTop = (nCalcHeight/2)-SLIDER_CHANNEL_HALFSIZE;
- mnChannelPixBottom = mnChannelPixTop+SLIDER_CHANNEL_SIZE-1;
+ mnThumbPixOffset = SLIDER_THUMB_HALFSIZE;
+ mnThumbPixRange = nCalcWidth-(SLIDER_THUMB_HALFSIZE*2);
+ mnThumbPixPos = 0;
+ mnChannelPixOffset = SLIDER_CHANNEL_OFFSET;
+ mnChannelPixRange = nCalcWidth-(SLIDER_CHANNEL_OFFSET*2);
+ mnChannelPixTop = (nCalcHeight/2)-SLIDER_CHANNEL_HALFSIZE;
+ mnChannelPixBottom = mnChannelPixTop+SLIDER_CHANNEL_SIZE-1;
}
else
{
@@ -375,10 +375,10 @@ void Slider::ImplCalc( BOOL bUpdate )
void Slider::ImplDraw( USHORT nDrawFlags )
{
- DecorationView aDecoView( this );
- USHORT nStyle;
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bEnabled = IsEnabled();
+ DecorationView aDecoView( this );
+ USHORT nStyle;
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ BOOL bEnabled = IsEnabled();
// Evt. noch offene Berechnungen nachholen
if ( mbCalcSize )
@@ -387,12 +387,12 @@ void Slider::ImplDraw( USHORT nDrawFlags )
ControlPart nPart = (GetStyle() & WB_HORZ) ? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA;
ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
SliderValue sldValue;
-
+
sldValue.mnMin = mnMinRange;
sldValue.mnMax = mnMaxRange;
sldValue.mnCur = mnThumbPos;
sldValue.maThumbRect = maThumbRect;
-
+
if( IsMouseOver() )
{
if( maThumbRect.IsInside( GetPointerPosPixel() ) )
@@ -407,8 +407,8 @@ void Slider::ImplDraw( USHORT nDrawFlags )
if ( (nDrawFlags & SLIDER_DRAW_CHANNEL1) && !maChannel1Rect.IsEmpty() )
{
- long nRectSize;
- Rectangle aRect = maChannel1Rect;
+ long nRectSize;
+ Rectangle aRect = maChannel1Rect;
SetLineColor( rStyleSettings.GetShadowColor() );
if ( GetStyle() & WB_HORZ )
{
@@ -451,8 +451,8 @@ void Slider::ImplDraw( USHORT nDrawFlags )
if ( (nDrawFlags & SLIDER_DRAW_CHANNEL2) && !maChannel2Rect.IsEmpty() )
{
- long nRectSize;
- Rectangle aRect = maChannel2Rect;
+ long nRectSize;
+ Rectangle aRect = maChannel2Rect;
SetLineColor( rStyleSettings.GetLightColor() );
if ( GetStyle() & WB_HORZ )
{
@@ -519,13 +519,13 @@ BOOL Slider::ImplIsPageUp( const Point& rPos )
Rectangle aRect = maChannel1Rect;
if ( GetStyle() & WB_HORZ )
{
- aRect.Top() = 0;
- aRect.Bottom() = aSize.Height()-1;
+ aRect.Top() = 0;
+ aRect.Bottom() = aSize.Height()-1;
}
else
{
- aRect.Left() = 0;
- aRect.Right() = aSize.Width()-1;
+ aRect.Left() = 0;
+ aRect.Right() = aSize.Width()-1;
}
return aRect.IsInside( rPos );
}
@@ -538,13 +538,13 @@ BOOL Slider::ImplIsPageDown( const Point& rPos )
Rectangle aRect = maChannel2Rect;
if ( GetStyle() & WB_HORZ )
{
- aRect.Top() = 0;
- aRect.Bottom() = aSize.Height()-1;
+ aRect.Top() = 0;
+ aRect.Bottom() = aSize.Height()-1;
}
else
{
- aRect.Left() = 0;
- aRect.Right() = aSize.Width()-1;
+ aRect.Left() = 0;
+ aRect.Right() = aSize.Width()-1;
}
return aRect.IsInside( rPos );
}
@@ -605,15 +605,15 @@ long Slider::ImplDoAction( BOOL bCallEndSlide )
void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
{
- USHORT nOldStateFlags = mnStateFlags;
- BOOL bAction = FALSE;
+ USHORT nOldStateFlags = mnStateFlags;
+ BOOL bAction = FALSE;
switch ( meScrollType )
- {
+ {
case( SCROLL_SET ):
{
const bool bUp = ImplIsPageUp( rMousePos ), bDown = ImplIsPageDown( rMousePos );
-
+
if ( bUp || bDown )
{
bAction = bCallAction;
@@ -623,7 +623,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN );
break;
}
-
+
case SCROLL_PAGEUP:
if ( ImplIsPageUp( rMousePos ) )
{
@@ -697,14 +697,14 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() )
{
- const Point& rMousePos = rMEvt.GetPosPixel();
- USHORT nTrackFlags = 0;
+ const Point& rMousePos = rMEvt.GetPosPixel();
+ USHORT nTrackFlags = 0;
if ( maThumbRect.IsInside( rMousePos ) )
{
- nTrackFlags = 0;
- meScrollType = SCROLL_DRAG;
- mnDragDraw = SLIDER_DRAW_THUMB;
+ nTrackFlags = 0;
+ meScrollType = SCROLL_DRAG;
+ mnDragDraw = SLIDER_DRAW_THUMB;
// Zusaetzliche Daten berechnen
Point aCenterPos = maThumbRect.Center();
@@ -729,7 +729,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
nTrackFlags = STARTTRACK_BUTTONREPEAT;
meScrollType = SCROLL_PAGEUP;
}
-
+
mnDragDraw = SLIDER_DRAW_CHANNEL;
}
else if ( ImplIsPageDown( rMousePos ) )
@@ -741,7 +741,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
nTrackFlags = STARTTRACK_BUTTONREPEAT;
meScrollType = SCROLL_PAGEDOWN;
}
-
+
mnDragDraw = SLIDER_DRAW_CHANNEL;
}
@@ -752,7 +752,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
mnStartPos = mnThumbPos;
ImplDoMouseAction( rMousePos, meScrollType != SCROLL_SET );
Update();
-
+
if( meScrollType != SCROLL_SET )
StartTracking( nTrackFlags );
}
@@ -767,12 +767,12 @@ void Slider::MouseButtonUp( const MouseEvent& )
{
// Button und PageRect-Status wieder herstellen
const USHORT nOldStateFlags = mnStateFlags;
-
+
mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN | SLIDER_STATE_THUMB_DOWN );
-
+
if ( nOldStateFlags != mnStateFlags )
ImplDraw( mnDragDraw );
-
+
mnDragDraw = 0;
ImplDoAction( TRUE );
meScrollType = SCROLL_DONTKNOW;
@@ -1076,13 +1076,13 @@ Size Slider::CalcWindowSizePixel()
Size aSize;
if ( GetStyle() & WB_HORZ )
{
- aSize.Width() = nWidth;
- aSize.Height() = nHeight;
+ aSize.Width() = nWidth;
+ aSize.Height() = nHeight;
}
else
{
- aSize.Height() = nWidth;
- aSize.Width() = nHeight;
+ aSize.Height() = nWidth;
+ aSize.Width() = nHeight;
}
return aSize;
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 353dae629164..703733cdf2c5 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -168,7 +168,7 @@ void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
-
+
pDev->Push();
pDev->SetMapMode();
if ( !(nFlags & WINDOW_DRAW_MONO) )
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 1124819af8ab..628b2e8c2710 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
// there is just no useful native support for spinfields with dropdown
!(pWin->GetStyle() & WB_DROPDOWN) )
{
- if( pWin->IsNativeControlSupported(CTRL_SPINBOX, rSpinbuttonValue.mnUpperPart) &&
+ if( pWin->IsNativeControlSupported(CTRL_SPINBOX, rSpinbuttonValue.mnUpperPart) &&
pWin->IsNativeControlSupported(CTRL_SPINBOX, rSpinbuttonValue.mnLowerPart) )
{
// only paint the embedded spin buttons, all buttons are painted at once
@@ -121,7 +121,7 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
{
aSize = aContent.GetSize();
}
-
+
Rectangle aRgn( aPt, aSize );
bNativeOK = pBorder->DrawNativeControl( CTRL_SPINBOX, PART_ENTIRE_CONTROL, aRgn, CTRL_STATE_ENABLED,
rSpinbuttonValue, rtl::OUString() );
@@ -297,15 +297,15 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
void SpinField::ImplInitSpinFieldData()
{
- mpEdit = NULL;
- mbSpin = FALSE;
- mbRepeat = FALSE;
- mbUpperIn = FALSE;
- mbLowerIn = FALSE;
- mbInitialUp = FALSE;
- mbInitialDown = FALSE;
- mbNoSelect = FALSE;
- mbInDropDown = FALSE;
+ mpEdit = NULL;
+ mbSpin = FALSE;
+ mbRepeat = FALSE;
+ mbUpperIn = FALSE;
+ mbLowerIn = FALSE;
+ mbInitialUp = FALSE;
+ mbInitialDown = FALSE;
+ mbNoSelect = FALSE;
+ mbInDropDown = FALSE;
}
// --------------------------------------------------------------------
@@ -317,11 +317,11 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
if ( nWinStyle & (WB_SPIN|WB_DROPDOWN) )
{
mbSpin = TRUE;
-
+
// Some themes want external spin buttons, therefore the main
// spinfield should not overdraw the border between its encapsulated
// edit field and the spin buttons
- if ( (nWinStyle & WB_SPIN) && ImplUseNativeBorder( nWinStyle ) )
+ if ( (nWinStyle & WB_SPIN) && ImplUseNativeBorder( nWinStyle ) )
{
SetBackground();
mpEdit = new Edit( this, WB_NOBORDER );
@@ -425,13 +425,13 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbUpperIn = TRUE;
+ mbUpperIn = TRUE;
mbInitialUp = TRUE;
Invalidate( maUpperRect );
}
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbLowerIn = TRUE;
+ mbLowerIn = TRUE;
mbInitialDown = TRUE;
Invalidate( maLowerRect );
}
@@ -644,7 +644,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
if ( mbSpin )
{
- BOOL bEnable = IsEnabled();
+ BOOL bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect,
mbUpperIn, mbLowerIn, bEnable, bEnable );
}
@@ -719,12 +719,12 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
// use the full extent of the control
Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
- bNativeRegionOK =
+ bNativeRegionOK =
pWin->GetNativeControlRegion(CTRL_SPINBOX, PART_BUTTON_UP,
aArea, 0, aControlValue, rtl::OUString(), aBound, aContentUp) &&
pWin->GetNativeControlRegion(CTRL_SPINBOX, PART_BUTTON_DOWN,
aArea, 0, aControlValue, rtl::OUString(), aBound, aContentDown);
-
+
if( bNativeRegionOK )
{
// convert back from border space to local coordinates
@@ -771,7 +771,7 @@ void SpinField::Resize()
ImplControlValue aControlValue;
Point aPoint;
Rectangle aContent, aBound;
-
+
// use the full extent of the control
Window *pBorder = GetWindow( WINDOW_BORDER );
Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index e94691f42da7..a8ad1ea3de2e 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,11 +77,11 @@ struct ImplTabItem
struct ImplTabCtrlData
{
- PushButton* mpLeftBtn;
- PushButton* mpRightBtn;
- std::hash_map< int, int > maLayoutPageIdToLine;
- std::hash_map< int, int > maLayoutLineToPageId;
- std::vector< Rectangle > maTabRectangles;
+ PushButton* mpLeftBtn;
+ PushButton* mpRightBtn;
+ std::hash_map< int, int > maLayoutPageIdToLine;
+ std::hash_map< int, int > maLayoutLineToPageId;
+ std::vector< Rectangle > maTabRectangles;
Point maItemsOffset; // offset of the tabitems
std::vector< ImplTabItem > maItemList;
ListBox* mpListBox;
@@ -118,22 +118,22 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
Control::ImplInit( pParent, nStyle, NULL );
- mnLastWidth = 0;
- mnLastHeight = 0;
- mnBtnSize = 0;
- mnMaxPageWidth = 0;
- mnActPageId = 0;
- mnCurPageId = 0;
- mnFirstPagePos = 0;
- mnLastFirstPagePos = 0;
- mbFormat = TRUE;
- mbRestoreHelpId = FALSE;
- mbRestoreUnqId = FALSE;
- mbSingleLine = FALSE;
- mbScroll = FALSE;
+ mnLastWidth = 0;
+ mnLastHeight = 0;
+ mnBtnSize = 0;
+ mnMaxPageWidth = 0;
+ mnActPageId = 0;
+ mnCurPageId = 0;
+ mnFirstPagePos = 0;
+ mnLastFirstPagePos = 0;
+ mbFormat = TRUE;
+ mbRestoreHelpId = FALSE;
+ mbRestoreUnqId = FALSE;
+ mbSingleLine = FALSE;
+ mbScroll = FALSE;
mbRestoreSmartId = FALSE;
- mbSmallInvalidate = FALSE;
- mbExtraSpace = FALSE;
+ mbSmallInvalidate = FALSE;
+ mbExtraSpace = FALSE;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData->mpLeftBtn = NULL;
mpTabCtrlData->mpRightBtn = NULL;
@@ -154,7 +154,7 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) )
EnableChildTransparentMode( TRUE );
-
+
if ( pParent->IsDialog() )
pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
}
@@ -923,7 +923,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == TRUE )
{
Rectangle aCtrlRegion( pItem->maRect );
- ControlState nState = 0;
+ ControlState nState = 0;
if( pItem->mnId == mnCurPageId )
{
@@ -1062,7 +1062,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
long nRet = 0;
-
+
if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKeyEvent.GetKeyCode();
@@ -1087,8 +1087,8 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
}
}
}
- }
-
+ }
+
return nRet;
}
@@ -1296,9 +1296,9 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
{
// Some native toolkits (GTK+) draw tabs right-to-left, with an
// overlap between adjacent tabs
- bool bDrawTabsRTL = IsNativeControlSupported( CTRL_TAB_ITEM, PART_TABS_DRAW_RTL );
- ImplTabItem * pFirstTab = NULL;
- ImplTabItem * pLastTab = NULL;
+ bool bDrawTabsRTL = IsNativeControlSupported( CTRL_TAB_ITEM, PART_TABS_DRAW_RTL );
+ ImplTabItem * pFirstTab = NULL;
+ ImplTabItem * pLastTab = NULL;
size_t idx;
// Event though there is a tab overlap with GTK+, the first tab is not
@@ -1361,7 +1361,7 @@ void TabControl::Resize()
if ( !IsReallyShown() )
return;
-
+
if( mpTabCtrlData->mpListBox )
{
// get the listbox' preferred size
@@ -1802,7 +1802,7 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
mpTabCtrlData->mpListBox->SelectEntryPos( 0 );
mpTabCtrlData->mpListBox->SetDropDownLineCount( mpTabCtrlData->mpListBox->GetEntryCount() );
}
-
+
// set current page id
if ( !mnCurPageId )
mnCurPageId = nPageId;
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index a94e46659a41..854c03a7ce22 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,104 +52,104 @@ typedef std::vector<ValType> ValVector;
// ====================================================================
static const char* pStringIds[] = {
-/*0*/ ".notdef", "space", "exclam", "quotedbl",
- "numbersign", "dollar", "percent", "ampersand",
- "quoteright", "parenleft", "parenright", "asterisk",
- "plus", "comma", "hyphen", "period",
-/*16*/ "slash", "zero", "one", "two",
- "three", "four", "five", "six",
- "seven", "eight", "nine", "colon",
- "semicolon", "less", "equal", "greater",
-/*32*/ "question", "at", "A", "B",
- "C", "D", "E", "F",
- "G", "H", "I", "J",
- "K", "L", "M", "N",
-/*48*/ "O", "P", "Q", "R",
- "S", "T", "U", "V",
- "W", "X", "Y", "Z",
- "bracketleft", "backslash", "bracketright", "asciicircum",
-/*64*/ "underscore", "quoteleft", "a", "b",
- "c", "d", "e", "f",
- "g", "h", "i", "j",
- "k", "l", "m", "n",
-/*80*/ "o", "p", "q", "r",
- "s", "t", "u", "v",
- "w", "x", "y", "z",
- "braceleft", "bar", "braceright", "asciitilde",
-/*96*/ "exclamdown", "cent", "sterlin", "fraction",
- "yen", "florin", "section", "currency",
- "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft",
- "guilsinglright", "fi", "fl", "endash",
-/*112*/ "dagger", "daggerdbl", "periodcentered", "paragraph",
- "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
- "guillemotright", "ellipsis", "perthousand", "questiondown",
- "grave", "acute", "circumflex", "tilde",
-/*128*/ "macron", "breve", "dotaccent", "dieresis",
- "ring", "cedilla", "hungarumlaut", "ogonek",
- "caron", "endash", "AE", "ordfeminine",
- "Lslash", "Oslash", "OE", "ordmasculine",
-/*144*/ "ae", "dotlessi", "lslash", "oslash",
- "oe", "germandbls", "onesuperior", "logicalnot",
- "mu", "trademark", "Eth", "onehalf",
- "plusminus", "Thorn", "onequarter", "divide",
-/*160*/ "brokenbar", "degree", "thorn", "threequarters",
- "twosuperior", "registered", "minus", "eth",
- "multiply", "threesuperior", "copyright", "Aacute",
- "Acircumflex", "Adieresis", "Agrave", "Aring",
-/*176*/ "Atilde", "Ccedilla", "Eacute", "Ecircumflex",
- "Edieresis", "Egrave", "Iacute", "Icircumflex",
- "Idieresis", "Igrave", "Ntilde", "Oacute",
- "Ocircumflex", "Odieresis", "Ograve", "Otilde",
-/*192*/ "Scaron", "Uacute", "Ucircumflex", "Udieresis",
- "Ugrave", "Yacute", "Ydieresis", "Zcaron",
- "aacute", "acircumflex", "adieresis", "agrave",
- "aring", "atilde", "ccedilla", "eacute",
-/*208*/ "ecircumflex", "edieresis", "egrave", "iacute",
- "icircumflex", "idieresis", "igrave", "ntilde",
- "oacute", "ocircumflex", "odieresis", "ograve",
- "otilde", "scaron", "uacute", "ucircumflex",
-/*224*/ "udieresis", "ugrave", "yacute", "ydieresis",
- "zcaron", "exclamsmall", "Hungarumlautsmall","dollaroldstyle",
- "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior",
- "parenrightsuperior","twodotenleader", "onedotenleader", "zerooldstyle",
-/*240*/ "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle",
- "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle",
- "nineoldstile", "commasuperior", "threequartersemdash","periodsuperior",
- "questionsmall", "asuperior", "bsuperior", "centsuperior",
-/*256*/ "dsuperior", "esuperior", "isuperior", "lsuperior",
- "msuperior", "nsuperior", "osuperior", "rsuperior",
- "ssuperior", "tsuperior", "ff", "ffi",
- "ffl", "parenleftinferior","parenrightinferior","Circumflexsmall",
-/*272*/ "hyphensuperior","Gravesmall", "Asmall", "Bsmall",
- "Csmall", "Dsmall", "Esmall", "Fsmall",
- "Gsmall", "Hsmall", "Ismall", "Jsmall",
- "Ksmall", "Lsmall", "Msmall", "Nsmall",
-/*288*/ "Osmall", "Psmall", "Qsmall", "Rsmall",
- "Ssmall", "Tsmall", "Usmall", "Vsmall",
- "Wsmall", "Xsmall", "Ysmall", "Zsmall",
- "colonmonetary", "onefitted", "rupia", "Tildesmall",
-/*304*/ "exclamdownsmall","centoldstyle", "Lslashsmall", "Scaronsmall",
- "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall",
- "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior",
- "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall",
-/*320*/ "oneeight", "threeeights", "fiveeights", "seveneights",
- "onethird", "twothirds", "zerosuperior", "foursuperior",
- "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior",
- "ninesuperior", "zeroinferior", "oneinferior", "twoinferior",
-/*336*/ "threeinferior","fourinferior", "fiveinferior", "sixinferior",
- "seveninferior", "eightinferior", "nineinferior", "centinferior",
- "dollarinferior", "periodinferior", "commainferior", "Agravesmall",
- "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall",
-/*352*/ "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall",
- "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall",
- "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall",
- "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall",
-/*368*/ "Otildesmall", "Odieressissmall", "OEsmall", "Oslashsmall",
- "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall",
- "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000",
- "001.001", "001.002", "001.003", "Black",
-/*384*/ "Bold", "Book", "Light", "Medium",
- "Regular", "Roman", "Semibold"
+/*0*/ ".notdef", "space", "exclam", "quotedbl",
+ "numbersign", "dollar", "percent", "ampersand",
+ "quoteright", "parenleft", "parenright", "asterisk",
+ "plus", "comma", "hyphen", "period",
+/*16*/ "slash", "zero", "one", "two",
+ "three", "four", "five", "six",
+ "seven", "eight", "nine", "colon",
+ "semicolon", "less", "equal", "greater",
+/*32*/ "question", "at", "A", "B",
+ "C", "D", "E", "F",
+ "G", "H", "I", "J",
+ "K", "L", "M", "N",
+/*48*/ "O", "P", "Q", "R",
+ "S", "T", "U", "V",
+ "W", "X", "Y", "Z",
+ "bracketleft", "backslash", "bracketright", "asciicircum",
+/*64*/ "underscore", "quoteleft", "a", "b",
+ "c", "d", "e", "f",
+ "g", "h", "i", "j",
+ "k", "l", "m", "n",
+/*80*/ "o", "p", "q", "r",
+ "s", "t", "u", "v",
+ "w", "x", "y", "z",
+ "braceleft", "bar", "braceright", "asciitilde",
+/*96*/ "exclamdown", "cent", "sterlin", "fraction",
+ "yen", "florin", "section", "currency",
+ "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft",
+ "guilsinglright", "fi", "fl", "endash",
+/*112*/ "dagger", "daggerdbl", "periodcentered", "paragraph",
+ "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
+ "guillemotright", "ellipsis", "perthousand", "questiondown",
+ "grave", "acute", "circumflex", "tilde",
+/*128*/ "macron", "breve", "dotaccent", "dieresis",
+ "ring", "cedilla", "hungarumlaut", "ogonek",
+ "caron", "endash", "AE", "ordfeminine",
+ "Lslash", "Oslash", "OE", "ordmasculine",
+/*144*/ "ae", "dotlessi", "lslash", "oslash",
+ "oe", "germandbls", "onesuperior", "logicalnot",
+ "mu", "trademark", "Eth", "onehalf",
+ "plusminus", "Thorn", "onequarter", "divide",
+/*160*/ "brokenbar", "degree", "thorn", "threequarters",
+ "twosuperior", "registered", "minus", "eth",
+ "multiply", "threesuperior", "copyright", "Aacute",
+ "Acircumflex", "Adieresis", "Agrave", "Aring",
+/*176*/ "Atilde", "Ccedilla", "Eacute", "Ecircumflex",
+ "Edieresis", "Egrave", "Iacute", "Icircumflex",
+ "Idieresis", "Igrave", "Ntilde", "Oacute",
+ "Ocircumflex", "Odieresis", "Ograve", "Otilde",
+/*192*/ "Scaron", "Uacute", "Ucircumflex", "Udieresis",
+ "Ugrave", "Yacute", "Ydieresis", "Zcaron",
+ "aacute", "acircumflex", "adieresis", "agrave",
+ "aring", "atilde", "ccedilla", "eacute",
+/*208*/ "ecircumflex", "edieresis", "egrave", "iacute",
+ "icircumflex", "idieresis", "igrave", "ntilde",
+ "oacute", "ocircumflex", "odieresis", "ograve",
+ "otilde", "scaron", "uacute", "ucircumflex",
+/*224*/ "udieresis", "ugrave", "yacute", "ydieresis",
+ "zcaron", "exclamsmall", "Hungarumlautsmall","dollaroldstyle",
+ "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior",
+ "parenrightsuperior","twodotenleader", "onedotenleader", "zerooldstyle",
+/*240*/ "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle",
+ "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle",
+ "nineoldstile", "commasuperior", "threequartersemdash","periodsuperior",
+ "questionsmall", "asuperior", "bsuperior", "centsuperior",
+/*256*/ "dsuperior", "esuperior", "isuperior", "lsuperior",
+ "msuperior", "nsuperior", "osuperior", "rsuperior",
+ "ssuperior", "tsuperior", "ff", "ffi",
+ "ffl", "parenleftinferior","parenrightinferior","Circumflexsmall",
+/*272*/ "hyphensuperior","Gravesmall", "Asmall", "Bsmall",
+ "Csmall", "Dsmall", "Esmall", "Fsmall",
+ "Gsmall", "Hsmall", "Ismall", "Jsmall",
+ "Ksmall", "Lsmall", "Msmall", "Nsmall",
+/*288*/ "Osmall", "Psmall", "Qsmall", "Rsmall",
+ "Ssmall", "Tsmall", "Usmall", "Vsmall",
+ "Wsmall", "Xsmall", "Ysmall", "Zsmall",
+ "colonmonetary", "onefitted", "rupia", "Tildesmall",
+/*304*/ "exclamdownsmall","centoldstyle", "Lslashsmall", "Scaronsmall",
+ "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall",
+ "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior",
+ "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall",
+/*320*/ "oneeight", "threeeights", "fiveeights", "seveneights",
+ "onethird", "twothirds", "zerosuperior", "foursuperior",
+ "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior",
+ "ninesuperior", "zeroinferior", "oneinferior", "twoinferior",
+/*336*/ "threeinferior","fourinferior", "fiveinferior", "sixinferior",
+ "seveninferior", "eightinferior", "nineinferior", "centinferior",
+ "dollarinferior", "periodinferior", "commainferior", "Agravesmall",
+ "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall",
+/*352*/ "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall",
+ "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall",
+ "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall",
+ "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall",
+/*368*/ "Otildesmall", "Odieressissmall", "OEsmall", "Oslashsmall",
+ "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall",
+ "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000",
+ "001.001", "001.002", "001.003", "Black",
+/*384*/ "Bold", "Book", "Light", "Medium",
+ "Regular", "Roman", "Semibold"
};
// --------------------------------------------------------------------
@@ -158,57 +158,57 @@ static const char* pStringIds[] = {
// TOP DICT keywords (also covers PRIV DICT keywords)
static const char* pDictOps[] = {
- "sVersion", "sNotice", "sFullName", "sFamilyName",
- "sWeight", "aFontBBox", "dBlueValues", "dOtherBlues",
- "dFamilyBlues", "dFamilyOtherBlues", "nStdHW", "nStdVW",
- "xESC", "nUniqueID", "aXUID", "nCharset",
- "nEncoding", "nCharStrings", "PPrivate", "nSubrs",
- "nDefaultWidthX", "nNominalWidthX", NULL, NULL,
- NULL, NULL, NULL, NULL,
- "shortint", "longint", "BCD", NULL
+ "sVersion", "sNotice", "sFullName", "sFamilyName",
+ "sWeight", "aFontBBox", "dBlueValues", "dOtherBlues",
+ "dFamilyBlues", "dFamilyOtherBlues", "nStdHW", "nStdVW",
+ "xESC", "nUniqueID", "aXUID", "nCharset",
+ "nEncoding", "nCharStrings", "PPrivate", "nSubrs",
+ "nDefaultWidthX", "nNominalWidthX", NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ "shortint", "longint", "BCD", NULL
};
// --------------------------------------------------------------------
// TOP DICT escapes (also covers PRIV DICT escapes)
static const char* pDictEscs[] = {
- "sCopyright", "bIsFixedPitch", "nItalicAngle", "nUnderlinePosition",
- "nUnderlineThickness", "nPaintType", "tCharstringType", "aFontMatrix",
- "nStrokeWidth", "nBlueScale", "nBlueShift", "nBlueFuzz",
- "dStemSnapH", "dStemSnapV", "bForceBold", NULL,
- NULL, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
- "nSyntheticBase", "sPostScript", "sBaseFontName", "dBaseFontBlend",
- NULL, NULL, NULL, NULL,
- NULL, NULL, "rROS", "nCIDFontVersion",
- "nCIDFontRevision", "nCIDFontType", "nCIDCount", "nUIDBase",
- "nFDArray", "nFDSelect", "sFontName"
+ "sCopyright", "bIsFixedPitch", "nItalicAngle", "nUnderlinePosition",
+ "nUnderlineThickness", "nPaintType", "tCharstringType", "aFontMatrix",
+ "nStrokeWidth", "nBlueScale", "nBlueShift", "nBlueFuzz",
+ "dStemSnapH", "dStemSnapV", "bForceBold", NULL,
+ NULL, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
+ "nSyntheticBase", "sPostScript", "sBaseFontName", "dBaseFontBlend",
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, "rROS", "nCIDFontVersion",
+ "nCIDFontRevision", "nCIDFontType", "nCIDCount", "nUIDBase",
+ "nFDArray", "nFDSelect", "sFontName"
};
// --------------------------------------------------------------------
static const char* pType1Ops[] = {
- NULL, "2hstem", NULL, "2vstem",
- "1vmoveto", "Arlineto", "1hlineto", "1vlineto",
- "Crrcurveto", "0closepath", "Lcallsubr", "0return",
- "xT1ESC", "2hsbw", "0endchar", NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2rmoveto", "1hmoveto", NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, "4vhcurveto", "4hvcurveto"
+ NULL, "2hstem", NULL, "2vstem",
+ "1vmoveto", "Arlineto", "1hlineto", "1vlineto",
+ "Crrcurveto", "0closepath", "Lcallsubr", "0return",
+ "xT1ESC", "2hsbw", "0endchar", NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, "2rmoveto", "1hmoveto", NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, "4vhcurveto", "4hvcurveto"
};
// --------------------------------------------------------------------
static const char* pT1EscOps[] = {
- "0dotsection", "6vstem3", "6hstem3", NULL,
- NULL, NULL, "5seac", "4sbw",
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, NULL, NULL,
- "Gcallothersubr", "1pop", NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2setcurrentpoint"
+ "0dotsection", "6vstem3", "6hstem3", NULL,
+ NULL, NULL, "5seac", "4sbw",
+ NULL, "1abs", "2add", "2sub",
+ "2div", NULL, NULL, NULL,
+ "Gcallothersubr", "1pop", NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, "2setcurrentpoint"
};
// --------------------------------------------------------------------
@@ -217,47 +217,47 @@ struct TYPE1OP
{
enum OPS
{
- HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
- HLINETO=6, VLINETO=7, RCURVETO=8, CLOSEPATH=9,
- CALLSUBR=10, RETURN=11, T1ESC=12, HSBW=13,
- ENDCHAR=14, RMOVETO=21, HMOVETO=22, VHCURVETO=30,
+ HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
+ HLINETO=6, VLINETO=7, RCURVETO=8, CLOSEPATH=9,
+ CALLSUBR=10, RETURN=11, T1ESC=12, HSBW=13,
+ ENDCHAR=14, RMOVETO=21, HMOVETO=22, VHCURVETO=30,
HVCURVETO=31
};
enum ESCS
{
- DOTSECTION=0, VSTEM3=1, HSTEM3=2, SEAC=6,
- SBW=7, ABS=9, ADD=10, SUB=11,
- DIV=12, CALLOTHERSUBR=16, POP=17, SETCURRENTPOINT=33
+ DOTSECTION=0, VSTEM3=1, HSTEM3=2, SEAC=6,
+ SBW=7, ABS=9, ADD=10, SUB=11,
+ DIV=12, CALLOTHERSUBR=16, POP=17, SETCURRENTPOINT=33
};
};
// --------------------------------------------------------------------
static const char* pType2Ops[] = {
- NULL, "hhstem", NULL, "vvstem",
- "mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
- "Crrcurveto", NULL, "Lcallsubr", "Xreturn",
- "xT2ESC", NULL, "eendchar", NULL,
- NULL, NULL, "Hhstemhm", "Khintmask",
- "Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
- ".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
- ".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
+ NULL, "hhstem", NULL, "vvstem",
+ "mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
+ "Crrcurveto", NULL, "Lcallsubr", "Xreturn",
+ "xT2ESC", NULL, "eendchar", NULL,
+ NULL, NULL, "Hhstemhm", "Khintmask",
+ "Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
+ ".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
+ ".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
};
// --------------------------------------------------------------------
static const char* pT2EscOps[] = {
- NULL, NULL, NULL, "2and",
- "2or", "1not", NULL, NULL,
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, "1neg", "2eq",
- NULL, NULL, "1drop", NULL,
- "1put", "1get", "4ifelse", "0random",
- "2mul", NULL, "1sqrt", "1dup",
- "2exch", "Iindex", "Rroll", NULL,
- NULL, NULL, "7hflex", "Fflex",
- "9hflex1", "fflex1"
+ NULL, NULL, NULL, "2and",
+ "2or", "1not", NULL, NULL,
+ NULL, "1abs", "2add", "2sub",
+ "2div", NULL, "1neg", "2eq",
+ NULL, NULL, "1drop", NULL,
+ "1put", "1get", "4ifelse", "0random",
+ "2mul", NULL, "1sqrt", "1dup",
+ "2exch", "Iindex", "Rroll", NULL,
+ NULL, NULL, "7hflex", "Fflex",
+ "9hflex1", "fflex1"
};
// --------------------------------------------------------------------
@@ -266,23 +266,23 @@ struct TYPE2OP
{
enum OPS
{
- HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
- HLINETO=6, VLINETO=7, RCURVETO=8, CALLSUBR=10,
- RETURN=11, T2ESC=12, ENDCHAR=14, HSTEMHM=18,
- HINTMASK=19, CNTRMASK=20, RMOVETO=21, HMOVETO=22,
- VSTEMHM=23, RCURVELINE=24, RLINECURVE=25, VVCURVETO=26,
- HHCURVETO=27, SHORTINT=28, CALLGSUBR=29, VHCURVETO=30,
+ HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
+ HLINETO=6, VLINETO=7, RCURVETO=8, CALLSUBR=10,
+ RETURN=11, T2ESC=12, ENDCHAR=14, HSTEMHM=18,
+ HINTMASK=19, CNTRMASK=20, RMOVETO=21, HMOVETO=22,
+ VSTEMHM=23, RCURVELINE=24, RLINECURVE=25, VVCURVETO=26,
+ HHCURVETO=27, SHORTINT=28, CALLGSUBR=29, VHCURVETO=30,
HVCURVETO=31
};
enum ESCS
{
- AND=3, OR=4, NOT=5, ABS=9,
- ADD=10, SUB=11, DIV=12, NEG=14,
- EQ=15, DROP=18, PUT=20, GET=21,
- IFELSE=22, RANDOM=23, MUL=24, SQRT=26,
- DUP=27, EXCH=28, INDEX=29, ROLL=30,
- HFLEX=34, FLEX=35, HFLEX1=36, FLEX1=37
+ AND=3, OR=4, NOT=5, ABS=9,
+ ADD=10, SUB=11, DIV=12, NEG=14,
+ EQ=15, DROP=18, PUT=20, GET=21,
+ IFELSE=22, RANDOM=23, MUL=24, SQRT=26,
+ DUP=27, EXCH=28, INDEX=29, ROLL=30,
+ HFLEX=34, FLEX=35, HFLEX1=36, FLEX1=37
};
};
@@ -292,28 +292,28 @@ struct CffGlobal
{
explicit CffGlobal();
- int mnNameIdxBase;
- int mnNameIdxCount;
- int mnStringIdxBase;
- int mnStringIdxCount;
- bool mbCIDFont;
- int mnCharStrBase;
- int mnCharStrCount;
- int mnEncodingBase;
- int mnCharsetBase;
- int mnGlobalSubrBase;
- int mnGlobalSubrCount;
- int mnGlobalSubrBias;
- int mnFDSelectBase;
- int mnFontDictBase;
- int mnFDAryCount;
-
- ValVector maFontBBox;
- ValVector maFontMatrix;
-
- int mnFontNameSID;
- int mnFullNameSID;
- int mnFamilyNameSID;
+ int mnNameIdxBase;
+ int mnNameIdxCount;
+ int mnStringIdxBase;
+ int mnStringIdxCount;
+ bool mbCIDFont;
+ int mnCharStrBase;
+ int mnCharStrCount;
+ int mnEncodingBase;
+ int mnCharsetBase;
+ int mnGlobalSubrBase;
+ int mnGlobalSubrCount;
+ int mnGlobalSubrBias;
+ int mnFDSelectBase;
+ int mnFontDictBase;
+ int mnFDAryCount;
+
+ ValVector maFontBBox;
+ ValVector maFontMatrix;
+
+ int mnFontNameSID;
+ int mnFullNameSID;
+ int mnFamilyNameSID;
};
// ====================================================================
@@ -322,31 +322,31 @@ struct CffLocal
{
explicit CffLocal();
- int mnPrivDictBase;
- int mnPrivDictSize;
- int mnLocalSubrOffs;
- int mnLocalSubrBase;
- int mnLocalSubrCount;
- int mnLocalSubrBias;
+ int mnPrivDictBase;
+ int mnPrivDictSize;
+ int mnLocalSubrOffs;
+ int mnLocalSubrBase;
+ int mnLocalSubrCount;
+ int mnLocalSubrBias;
- ValType maNominalWidth;
+ ValType maNominalWidth;
ValType maDefaultWidth;
// ATM hinting related values
- ValType maStemStdHW;
- ValType maStemStdVW;
- ValVector maStemSnapH;
- ValVector maStemSnapV;
- ValVector maBlueValues;
- ValVector maOtherBlues;
- ValVector maFamilyBlues;
- ValVector maFamilyOtherBlues;
- RealType mfBlueScale;
- RealType mfBlueShift;
- RealType mfBlueFuzz;
- RealType mfExpFactor;
- int mnLangGroup;
- bool mbForceBold;
+ ValType maStemStdHW;
+ ValType maStemStdVW;
+ ValVector maStemSnapH;
+ ValVector maStemSnapV;
+ ValVector maBlueValues;
+ ValVector maOtherBlues;
+ ValVector maFamilyBlues;
+ ValVector maFamilyOtherBlues;
+ RealType mfBlueScale;
+ RealType mfBlueShift;
+ RealType mfBlueFuzz;
+ RealType mfExpFactor;
+ int mnLangGroup;
+ bool mbForceBold;
};
// ====================================================================
@@ -368,32 +368,32 @@ SubsetterContext::~SubsetterContext( void)
// ====================================================================
class CffSubsetterContext
-: public SubsetterContext
-, private CffGlobal
+: public SubsetterContext
+, private CffGlobal
{
public:
- static const int NMAXSTACK = 48; // see CFF.appendixB
- static const int NMAXHINTS = 2*96; // see CFF.appendixB
- static const int NMAXTRANS = 32; // see CFF.appendixB
+ static const int NMAXSTACK = 48; // see CFF.appendixB
+ static const int NMAXHINTS = 2*96; // see CFF.appendixB
+ static const int NMAXTRANS = 32; // see CFF.appendixB
public:
explicit CffSubsetterContext( const U8* pBasePtr, int nBaseLen);
- virtual ~CffSubsetterContext( void);
+ virtual ~CffSubsetterContext( void);
- void initialCffRead( void);
- bool emitAsType1( class Type1Emitter&,
+ void initialCffRead( void);
+ bool emitAsType1( class Type1Emitter&,
const long* pGlyphIDs, const U8* pEncoding,
GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& );
// used by charstring converter
- void setCharStringType( int);
- void fakeLocalSubrCount( int nLocalSubrs ) { maCffLocal[0].mnLocalSubrCount=nLocalSubrs;}
+ void setCharStringType( int);
+ void fakeLocalSubrCount( int nLocalSubrs ) { maCffLocal[0].mnLocalSubrCount=nLocalSubrs;}
protected:
- int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops);
+ int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops);
private:
- void convertOneTypeOp( void);
- void convertOneTypeEsc( void);
- void callType2Subr( bool bGlobal, int nSubrNumber);
- long getReadOfs( void) const { return (long)(mpReadPtr - mpBasePtr);}
+ void convertOneTypeOp( void);
+ void convertOneTypeEsc( void);
+ void callType2Subr( bool bGlobal, int nSubrNumber);
+ long getReadOfs( void) const { return (long)(mpReadPtr - mpBasePtr);}
const U8* mpBasePtr;
const U8* mpBaseEnd;
@@ -401,90 +401,90 @@ private:
const U8* mpReadPtr;
const U8* mpReadEnd;
- U8* mpWritePtr;
- bool mbSawError;
- bool mbNeedClose;
- bool mbIgnoreHints;
- long mnCntrMask;
+ U8* mpWritePtr;
+ bool mbSawError;
+ bool mbNeedClose;
+ bool mbIgnoreHints;
+ long mnCntrMask;
private:
- int seekIndexData( int nIndexBase, int nDataIndex);
- void seekIndexEnd( int nIndexBase);
+ int seekIndexData( int nIndexBase, int nDataIndex);
+ void seekIndexEnd( int nIndexBase);
private:
- const char** mpCharStringOps;
- const char** mpCharStringEscs;
+ const char** mpCharStringOps;
+ const char** mpCharStringEscs;
- CffLocal maCffLocal[16];
- CffLocal* mpCffLocal;
+ CffLocal maCffLocal[16];
+ CffLocal* mpCffLocal;
- void readDictOp( void);
- RealType readRealVal( void);
- const char* getString( int nStringID);
- int getFDSelect( int nGlyphIndex) const;
- int getGlyphSID( int nGlyphIndex) const;
+ void readDictOp( void);
+ RealType readRealVal( void);
+ const char* getString( int nStringID);
+ int getFDSelect( int nGlyphIndex) const;
+ int getGlyphSID( int nGlyphIndex) const;
const char* getGlyphName( int nGlyphIndex);
- void read2push( void);
- void pop2write( void);
- void writeType1Val( ValType);
- void writeTypeOp( int nTypeOp);
- void writeTypeEsc( int nTypeOp);
- void writeCurveTo( int nStackPos, int nIX1, int nIY1, int nIX2, int nIY2, int nIX3, int nIY3);
- void pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTypeXor=0);
- void popAll2Write( int nTypeOp);
+ void read2push( void);
+ void pop2write( void);
+ void writeType1Val( ValType);
+ void writeTypeOp( int nTypeOp);
+ void writeTypeEsc( int nTypeOp);
+ void writeCurveTo( int nStackPos, int nIX1, int nIY1, int nIX2, int nIY2, int nIX3, int nIY3);
+ void pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTypeXor=0);
+ void popAll2Write( int nTypeOp);
public: // TODO: is public really needed?
// accessing the value stack
// TODO: add more checks
- void push( ValType nVal) { mnValStack[ mnStackIdx++] = nVal;}
- ValType popVal( void) { return ((mnStackIdx>0) ? mnValStack[ --mnStackIdx] : 0);}
+ void push( ValType nVal) { mnValStack[ mnStackIdx++] = nVal;}
+ ValType popVal( void) { return ((mnStackIdx>0) ? mnValStack[ --mnStackIdx] : 0);}
ValType peekVal( void) const { return ((mnStackIdx>0) ? mnValStack[ mnStackIdx-1] : 0);}
ValType getVal( int nIndex) const { return mnValStack[ nIndex];}
- int popInt( void);
- int peekInt( void) const;
- int getInt( int nIndex) const;
- int size( void) const { return mnStackIdx;}
- bool empty( void) const { return !mnStackIdx;}
- void clear( void) { mnStackIdx = 0;}
+ int popInt( void);
+ int peekInt( void) const;
+ int getInt( int nIndex) const;
+ int size( void) const { return mnStackIdx;}
+ bool empty( void) const { return !mnStackIdx;}
+ void clear( void) { mnStackIdx = 0;}
// accessing the charstring hints
- void addHints( bool bVerticalHints);
- int getHorzHintCount( void) const { return (mnHorzHintSize/2);}
- int getVertHintCount( void) const { return (mnHintSize-mnHorzHintSize)/2;}
- void getHintPair( int nIndex, ValType* nMin, ValType* nEnd) const;
+ void addHints( bool bVerticalHints);
+ int getHorzHintCount( void) const { return (mnHorzHintSize/2);}
+ int getVertHintCount( void) const { return (mnHintSize-mnHorzHintSize)/2;}
+ void getHintPair( int nIndex, ValType* nMin, ValType* nEnd) const;
// accessing other charstring specifics
- bool hasCharWidth( void) const { return (maCharWidth > 0);}
- ValType getCharWidth( void) const { return maCharWidth;}
- void setNominalWidth( ValType aWidth) { mpCffLocal->maNominalWidth = aWidth;}
- void setDefaultWidth( ValType aWidth) { mpCffLocal->maDefaultWidth = aWidth;}
- void updateWidth( bool bUseFirstVal);
+ bool hasCharWidth( void) const { return (maCharWidth > 0);}
+ ValType getCharWidth( void) const { return maCharWidth;}
+ void setNominalWidth( ValType aWidth) { mpCffLocal->maNominalWidth = aWidth;}
+ void setDefaultWidth( ValType aWidth) { mpCffLocal->maDefaultWidth = aWidth;}
+ void updateWidth( bool bUseFirstVal);
private:
// typeop exceution context
- int mnStackIdx;
- ValType mnValStack[ NMAXSTACK+4];
- ValType mnTransVals[ NMAXTRANS];
+ int mnStackIdx;
+ ValType mnValStack[ NMAXSTACK+4];
+ ValType mnTransVals[ NMAXTRANS];
- int mnHintSize;
- int mnHorzHintSize;
- ValType mnHintStack[ NMAXHINTS];
+ int mnHintSize;
+ int mnHorzHintSize;
+ ValType mnHintStack[ NMAXHINTS];
- ValType maCharWidth;
+ ValType maCharWidth;
};
// --------------------------------------------------------------------
CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
-: mpBasePtr( pBasePtr)
-, mpBaseEnd( pBasePtr+nBaseLen)
-, mnStackIdx(0)
-, mnHintSize(0)
-, mnHorzHintSize(0)
-, maCharWidth(-1)
+: mpBasePtr( pBasePtr)
+, mpBaseEnd( pBasePtr+nBaseLen)
+, mnStackIdx(0)
+, mnHintSize(0)
+, mnHorzHintSize(0)
+, maCharWidth(-1)
{
-// setCharStringType( 1);
+// setCharStringType( 1);
// TODO: new CffLocal[ mnFDAryCount];
mpCffLocal = &maCffLocal[0];
}
@@ -627,36 +627,36 @@ void CffSubsetterContext::readDictOp( void)
//TODO: if( nStackIdx > 0)
switch( *pCmdName) {
default: fprintf( stderr, "unsupported DictOp.type=\'%c\'\n", *pCmdName); break;
- case 'b': // bool
+ case 'b': // bool
nInt = popInt();
switch( nOpId) {
case 915: mpCffLocal->mbForceBold = nInt; break; // "ForceBold"
default: break; // TODO: handle more boolean dictops?
}
break;
- case 'n': // dict-op number
+ case 'n': // dict-op number
nVal = popVal();
nInt = static_cast<int>(nVal);
switch( nOpId) {
- case 10: mpCffLocal->maStemStdHW = nVal; break; // "StdHW"
- case 11: mpCffLocal->maStemStdVW = nVal; break; // "StdVW"
- case 15: mnCharsetBase = nInt; break; // "charset"
- case 16: mnEncodingBase = nInt; break; // "nEncoding"
- case 17: mnCharStrBase = nInt; break; // "nCharStrings"
+ case 10: mpCffLocal->maStemStdHW = nVal; break; // "StdHW"
+ case 11: mpCffLocal->maStemStdVW = nVal; break; // "StdVW"
+ case 15: mnCharsetBase = nInt; break; // "charset"
+ case 16: mnEncodingBase = nInt; break; // "nEncoding"
+ case 17: mnCharStrBase = nInt; break; // "nCharStrings"
case 19: mpCffLocal->mnLocalSubrOffs = nInt; break;// "nSubrs"
- case 20: setDefaultWidth( nVal ); break; // "defaultWidthX"
- case 21: setNominalWidth( nVal ); break; // "nominalWidthX"
- case 909: mpCffLocal->mfBlueScale = nVal; break; // "BlueScale"
- case 910: mpCffLocal->mfBlueShift = nVal; break; // "BlueShift"
- case 911: mpCffLocal->mfBlueFuzz = nVal; break; // "BlueFuzz"
- case 912: mpCffLocal->mfExpFactor = nVal; break; // "ExpansionFactor"
- case 917: mpCffLocal->mnLangGroup = nInt; break; // "LanguageGroup"
- case 936: mnFontDictBase = nInt; break; // "nFDArray"
- case 937: mnFDSelectBase = nInt; break; // "nFDSelect"
+ case 20: setDefaultWidth( nVal ); break; // "defaultWidthX"
+ case 21: setNominalWidth( nVal ); break; // "nominalWidthX"
+ case 909: mpCffLocal->mfBlueScale = nVal; break; // "BlueScale"
+ case 910: mpCffLocal->mfBlueShift = nVal; break; // "BlueShift"
+ case 911: mpCffLocal->mfBlueFuzz = nVal; break; // "BlueFuzz"
+ case 912: mpCffLocal->mfExpFactor = nVal; break; // "ExpansionFactor"
+ case 917: mpCffLocal->mnLangGroup = nInt; break; // "LanguageGroup"
+ case 936: mnFontDictBase = nInt; break; // "nFDArray"
+ case 937: mnFDSelectBase = nInt; break; // "nFDSelect"
default: break; // TODO: handle more numeric dictops?
}
break;
- case 'a': { // array
+ case 'a': { // array
switch( nOpId) {
case 5: maFontBBox.clear(); break; // "FontBBox"
case 907: maFontMatrix.clear(); break; // "FontMatrix"
@@ -672,36 +672,36 @@ void CffSubsetterContext::readDictOp( void)
}
clear();
} break;
- case 'd': { // delta array
+ case 'd': { // delta array
nVal = 0;
for( int i = 0; i < size(); ++i ) {
nVal += getVal(i);
switch( nOpId) {
- case 6: mpCffLocal->maBlueValues.push_back( nVal); break; // "BlueValues"
- case 7: mpCffLocal->maOtherBlues.push_back( nVal); break; // "OtherBlues"
- case 8: mpCffLocal->maFamilyBlues.push_back( nVal); break; // "FamilyBlues"
+ case 6: mpCffLocal->maBlueValues.push_back( nVal); break; // "BlueValues"
+ case 7: mpCffLocal->maOtherBlues.push_back( nVal); break; // "OtherBlues"
+ case 8: mpCffLocal->maFamilyBlues.push_back( nVal); break; // "FamilyBlues"
case 9: mpCffLocal->maFamilyOtherBlues.push_back( nVal); break;// "FamilyOtherBlues"
- case 912: mpCffLocal->maStemSnapH.push_back( nVal); break; // "StemSnapH"
- case 913: mpCffLocal->maStemSnapV.push_back( nVal); break; // "StemSnapV"
+ case 912: mpCffLocal->maStemSnapH.push_back( nVal); break; // "StemSnapH"
+ case 913: mpCffLocal->maStemSnapV.push_back( nVal); break; // "StemSnapV"
default: break; // TODO: handle more delta-array dictops?
}
}
clear();
} break;
- case 's': // stringid (SID)
+ case 's': // stringid (SID)
nInt = popInt();
switch( nOpId ) {
- case 2: mnFullNameSID = nInt; break; // "FullName"
- case 3: mnFamilyNameSID = nInt; break; // "FamilyName"
- case 938: mnFontNameSID = nInt; break; // "FontName"
+ case 2: mnFullNameSID = nInt; break; // "FullName"
+ case 3: mnFamilyNameSID = nInt; break; // "FamilyName"
+ case 938: mnFontNameSID = nInt; break; // "FontName"
default: break; // TODO: handle more string dictops?
}
break;
- case 'P': // private dict
+ case 'P': // private dict
mpCffLocal->mnPrivDictBase = popInt();
mpCffLocal->mnPrivDictSize = popInt();
break;
- case 'r': { // ROS operands
+ case 'r': { // ROS operands
int nSid1 = popInt();
int nSid2 = popInt();
(void)nSid1; // TODO: use
@@ -709,30 +709,30 @@ void CffSubsetterContext::readDictOp( void)
nVal = popVal();
mbCIDFont = true;
} break;
- case 't': // CharstringType
+ case 't': // CharstringType
nInt = popInt();
setCharStringType( nInt );
break;
}
- return;
+ return;
}
if( (c >= 32) || (c == 28) ) {
-// --mpReadPtr;
+// --mpReadPtr;
read2push();
- } else if( c == 29 ) { // longint
- ++mpReadPtr; // skip 29
+ } else if( c == 29 ) { // longint
+ ++mpReadPtr; // skip 29
int nS32 = mpReadPtr[0] << 24;
nS32 += mpReadPtr[1] << 16;
nS32 += mpReadPtr[2] << 8;
nS32 += mpReadPtr[3] << 0;
if( (sizeof(nS32) != 4) && (nS32 & (1<<31)))
- nS32 |= (~0U) << 31; // assuming 2s complement
+ nS32 |= (~0U) << 31; // assuming 2s complement
mpReadPtr += 4;
nVal = static_cast<ValType>(nS32);
push( nVal );
- } else if( c == 30) { // real number
+ } else if( c == 30) { // real number
++mpReadPtr; // skip 30
const RealType fReal = readRealVal();
// push value onto stack
@@ -752,22 +752,22 @@ void CffSubsetterContext::read2push()
if( c == 28 ) {
short nS16 = (p[1] << 8) + p[2];
if( (sizeof(nS16) != 2) && (nS16 & (1<<15)))
- nS16 |= (~0U) << 15; // assuming 2s complement
+ nS16 |= (~0U) << 15; // assuming 2s complement
aVal = nS16;
p += 3;
- } else if( c <= 246 ) { // -107..+107
+ } else if( c <= 246 ) { // -107..+107
aVal = static_cast<ValType>(p[0] - 139);
p += 1;
- } else if( c <= 250 ) { // +108..+1131
+ } else if( c <= 250 ) { // +108..+1131
aVal = static_cast<ValType>(((p[0] << 8) + p[1]) - 63124);
p += 2;
- } else if( c <= 254 ) { // -108..-1131
+ } else if( c <= 254 ) { // -108..-1131
aVal = static_cast<ValType>(64148 - ((p[0] << 8) + p[1]));
p += 2;
- } else /*if( c == 255)*/ { // Fixed16.16
+ } else /*if( c == 255)*/ { // Fixed16.16
int nS32 = (p[1] << 24) + (p[2] << 16) + (p[3] << 8) + p[4];
if( (sizeof(nS32) != 2) && (nS32 & (1<<31)))
- nS32 |= (~0U) << 31; // assuming 2s complement
+ nS32 |= (~0U) << 31; // assuming 2s complement
aVal = static_cast<ValType>(nS32 * (1.0 / 0x10000));
p += 5;
}
@@ -785,19 +785,19 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
static const int nOutCharstrType = 1;
if( (nInt != aVal) && (nOutCharstrType == 2)) {
// numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
- *(pOut++) = 255; // Fixed 16.16
+ *(pOut++) = 255; // Fixed 16.16
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
nInt = static_cast<int>(aVal * 0x10000) & 0xFFFF;
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
} else if( (nInt >= -107) && (nInt <= +107)) {
- *(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
+ *(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
} else if( (nInt >= -1131) && (nInt <= +1131)) {
if( nInt >= 0)
- nInt += 63124; // +108..+1131
+ nInt += 63124; // +108..+1131
else
- nInt = 64148 - nInt; // -108..-1131
+ nInt = 64148 - nInt; // -108..-1131
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
} else if( nOutCharstrType == 1) {
@@ -846,7 +846,7 @@ void CffSubsetterContext::pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTy
}
i += nArgsPerTypo;
writeTypeOp( nTypeOp);
- nTypeOp ^= nTypeXor; // for toggling vlineto/hlineto
+ nTypeOp ^= nTypeXor; // for toggling vlineto/hlineto
}
clear();
}
@@ -1332,7 +1332,7 @@ int CffSubsetterContext::convert2Type1Ops( CffLocal* pCffLocal, const U8* const
// prepare the charstring conversion
mpWritePtr = pT1Ops;
-#if 1 // TODO: update caller
+#if 1 // TODO: update caller
U8 aType1Ops[ MAX_T1OPS_SIZE];
if( !pT1Ops)
mpWritePtr = aType1Ops;
@@ -1362,10 +1362,10 @@ mnHintSize=mnHorzHintSize=mnStackIdx=0; maCharWidth=-1;//#######
mnCntrMask = 0;
while( mpReadPtr < mpReadEnd)
convertOneTypeOp();
-// if( bActivePath)
-// writeTypeOp( TYPE1OP::CLOSEPATH);
-// if( bSubRoutine)
-// writeTypeOp( TYPE1OP::RETURN);
+// if( bActivePath)
+// writeTypeOp( TYPE1OP::CLOSEPATH);
+// if( bSubRoutine)
+// writeTypeOp( TYPE1OP::RETURN);
if( mbSawError) {
mpWritePtr = pT1Ops+4;
// create an "idiotproof" charstring
@@ -1392,7 +1392,7 @@ if( mbSawError) {
// encrypt the Type1 charstring
int nRDCryptR = 4330; // TODO: mnRDCryptSeed;
for( U8* p = pT1Ops; p < mpWritePtr; ++p) {
- *p ^= (nRDCryptR >> 8);
+ *p ^= (nRDCryptR >> 8);
nRDCryptR = (*(U8*)p + nRDCryptR) * 52845 + 22719;
}
@@ -1416,44 +1416,44 @@ RealType CffSubsetterContext::readRealVal()
if( nH <= 9) {
nNumber = nNumber * 10 + nH;
--nExpVal;
- } else if( nH == 10) { // comma
+ } else if( nH == 10) { // comma
nExpVal = 0;
bComma = true;
- } else if( nH == 11) { // +exp
+ } else if( nH == 11) { // +exp
fReal *= nNumber;
nExpSign = +1;
nNumber = 0;
- } else if( nH == 12) { // -exp
+ } else if( nH == 12) { // -exp
fReal *= nNumber;
nExpSign = -1;
nNumber = 0;
- } else if( nH == 13) { // reserved
+ } else if( nH == 13) { // reserved
// TODO: ignore or error?
- } else if( nH == 14) // minus
+ } else if( nH == 14) // minus
fReal = -fReal;
- else if( nH == 15) // end
+ else if( nH == 15) // end
break;
// parse low nibble
const U8 nL = c & 0x0F;
if( nL <= 9) {
nNumber = nNumber * 10 + nL;
--nExpVal;
- } else if( nL == 10) { // comma
+ } else if( nL == 10) { // comma
nExpVal = 0;
bComma = true;
- } else if( nL == 11) { // +exp
+ } else if( nL == 11) { // +exp
fReal *= nNumber;
nNumber = 0;
nExpSign = +1;
- } else if( nL == 12) { // -exp
+ } else if( nL == 12) { // -exp
fReal *= nNumber;
nNumber = 0;
nExpSign = -1;
- } else if( nL == 13) { // reserved
+ } else if( nL == 13) { // reserved
// TODO: ignore or error?
- } else if( nL == 14) // minus
+ } else if( nL == 14) // minus
fReal = -fReal;
- else if( nL == 15) // end
+ else if( nL == 15) // end
break;
}
@@ -1488,19 +1488,19 @@ int CffSubsetterContext::seekIndexData( int nIndexBase, int nDataIndex)
int nOfs1 = 0;
switch( nDataOfsSz) {
default: fprintf( stderr, "\tINVALID nDataOfsSz=%d\n\n", nDataOfsSz); return -1;
- case 1: nOfs1 = mpReadPtr[0]; break;
- case 2: nOfs1 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
- case 3: nOfs1 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
- case 4: nOfs1 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
+ case 1: nOfs1 = mpReadPtr[0]; break;
+ case 2: nOfs1 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
+ case 3: nOfs1 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
+ case 4: nOfs1 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
}
mpReadPtr += nDataOfsSz;
int nOfs2 = 0;
switch( nDataOfsSz) {
- case 1: nOfs2 = mpReadPtr[0]; break;
- case 2: nOfs2 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
- case 3: nOfs2 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
- case 4: nOfs2 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
+ case 1: nOfs2 = mpReadPtr[0]; break;
+ case 2: nOfs2 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
+ case 3: nOfs2 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
+ case 4: nOfs2 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
}
mpReadPtr = mpBasePtr + (nIndexBase + 2) + nDataOfsSz * (nDataCount + 1) + nOfs1;
@@ -1526,10 +1526,10 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase)
int nEndOfs = 0;
switch( nDataOfsSz) {
default: fprintf( stderr, "\tINVALID nDataOfsSz=%d\n\n", nDataOfsSz); return;
- case 1: nEndOfs = mpReadPtr[0]; break;
- case 2: nEndOfs = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
- case 3: nEndOfs = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2];break;
- case 4: nEndOfs = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
+ case 1: nEndOfs = mpReadPtr[0]; break;
+ case 2: nEndOfs = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
+ case 3: nEndOfs = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2];break;
+ case 4: nEndOfs = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
}
mpReadPtr += nDataOfsSz;
mpReadPtr += nEndOfs - 1;
@@ -1542,22 +1542,22 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase)
// initialize FONTDICT specific values
CffLocal::CffLocal( void)
-: mnPrivDictBase( 0)
-, mnPrivDictSize( 0)
-, mnLocalSubrOffs( 0)
-, mnLocalSubrBase( 0)
-, mnLocalSubrCount( 0)
-, mnLocalSubrBias( 0)
-, maNominalWidth( 0)
-, maDefaultWidth( 0)
-, maStemStdHW( 0)
-, maStemStdVW( 0)
-, mfBlueScale( 0.0)
-, mfBlueShift( 0.0)
-, mfBlueFuzz( 0.0)
-, mfExpFactor( 0.0)
-, mnLangGroup( 0)
-, mbForceBold( false)
+: mnPrivDictBase( 0)
+, mnPrivDictSize( 0)
+, mnLocalSubrOffs( 0)
+, mnLocalSubrBase( 0)
+, mnLocalSubrCount( 0)
+, mnLocalSubrBias( 0)
+, maNominalWidth( 0)
+, maDefaultWidth( 0)
+, maStemStdHW( 0)
+, maStemStdVW( 0)
+, mfBlueScale( 0.0)
+, mfBlueShift( 0.0)
+, mfBlueFuzz( 0.0)
+, mfExpFactor( 0.0)
+, mnLangGroup( 0)
+, mbForceBold( false)
{
maStemSnapH.clear();
maStemSnapV.clear();
@@ -1570,24 +1570,24 @@ CffLocal::CffLocal( void)
// --------------------------------------------------------------------
CffGlobal::CffGlobal( void)
-: mnNameIdxBase( 0)
-, mnNameIdxCount( 0)
-, mnStringIdxBase( 0)
-, mnStringIdxCount( 0)
-, mbCIDFont( false)
-, mnCharStrBase( 0)
-, mnCharStrCount( 0)
-, mnEncodingBase( 0)
-, mnCharsetBase( 0)
-, mnGlobalSubrBase( 0)
-, mnGlobalSubrCount( 0)
-, mnGlobalSubrBias( 0)
-, mnFDSelectBase( 0)
-, mnFontDictBase( 0)
-, mnFDAryCount( 1)
-, mnFontNameSID( 0)
-, mnFullNameSID( 0)
-, mnFamilyNameSID( 0)
+: mnNameIdxBase( 0)
+, mnNameIdxCount( 0)
+, mnStringIdxBase( 0)
+, mnStringIdxCount( 0)
+, mbCIDFont( false)
+, mnCharStrBase( 0)
+, mnCharStrCount( 0)
+, mnEncodingBase( 0)
+, mnCharsetBase( 0)
+, mnGlobalSubrBase( 0)
+, mnGlobalSubrCount( 0)
+, mnGlobalSubrBias( 0)
+, mnFDSelectBase( 0)
+, mnFontDictBase( 0)
+, mnFDAryCount( 1)
+, mnFontNameSID( 0)
+, mnFullNameSID( 0)
+, mnFamilyNameSID( 0)
{
maFontBBox.clear();
// TODO; maFontMatrix.clear();
@@ -1635,22 +1635,22 @@ void CffSubsetterContext::initialCffRead( void)
mnGlobalSubrCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
mnGlobalSubrBias = (mnGlobalSubrCount<1240)?107:(mnGlobalSubrCount<33900)?1131:32768;
// skip past the last GlobalSubr entry
-// seekIndexEnd( mnGlobalSubrBase);
+// seekIndexEnd( mnGlobalSubrBase);
// get/skip the Encodings (we got mnEncodingBase from TOPDICT)
-// seekEncodingsEnd( mnEncodingBase);
+// seekEncodingsEnd( mnEncodingBase);
// get/skip the Charsets (we got mnCharsetBase from TOPDICT)
-// seekCharsetsEnd( mnCharStrBase);
+// seekCharsetsEnd( mnCharStrBase);
// get/skip FDSelect (CID only) data
// prepare access to the CharStrings index (we got the base from TOPDICT)
mpReadPtr = mpBasePtr + mnCharStrBase;
mnCharStrCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
-// seekIndexEnd( mnCharStrBase);
+// seekIndexEnd( mnCharStrBase);
// read the FDArray index (CID only)
if( mbCIDFont) {
-// assert( mnFontDictBase == tellRel());
+// assert( mnFontDictBase == tellRel());
mpReadPtr = mpBasePtr + mnFontDictBase;
mnFDAryCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
assert( mnFDAryCount < (int)(sizeof(maCffLocal)/sizeof(*maCffLocal)));
@@ -1689,7 +1689,7 @@ void CffSubsetterContext::initialCffRead( void)
const int nSubrCount = (mpReadPtr[0] << 8) + mpReadPtr[1];
mpCffLocal->mnLocalSubrCount = nSubrCount;
mpCffLocal->mnLocalSubrBias = (nSubrCount<1240)?107:(nSubrCount<33900)?1131:32768;
-// seekIndexEnd( mpCffLocal->mnLocalSubrBase);
+// seekIndexEnd( mpCffLocal->mnLocalSubrBase);
}
}
@@ -1766,7 +1766,7 @@ int CffSubsetterContext::getFDSelect( int nGlyphIndex) const
nPrev = nNext;
}
} break;
- default: // invalid FDselect format
+ default: // invalid FDselect format
fprintf( stderr, "invalid CFF.FdselType=%d\n", nFDSelFormat);
break;
}
@@ -1867,40 +1867,40 @@ const char* CffSubsetterContext::getGlyphName( int nGlyphIndex)
class Type1Emitter
{
public:
- explicit Type1Emitter( const char* pOutFileName, bool bPfbSubset = true);
- explicit Type1Emitter( FILE* pOutFile, bool bPfbSubset = true);
- /*virtual*/ ~Type1Emitter( void);
- void setSubsetName( const char* );
-
- void emitRawData( const char* pData, int nLength) const;
- void emitAllRaw( void);
- void emitAllHex( void);
- void emitAllCrypted( void);
- int tellPos( void) const;
- void updateLen( int nTellPos, int nLength);
- void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&);
+ explicit Type1Emitter( const char* pOutFileName, bool bPfbSubset = true);
+ explicit Type1Emitter( FILE* pOutFile, bool bPfbSubset = true);
+ /*virtual*/ ~Type1Emitter( void);
+ void setSubsetName( const char* );
+
+ void emitRawData( const char* pData, int nLength) const;
+ void emitAllRaw( void);
+ void emitAllHex( void);
+ void emitAllCrypted( void);
+ int tellPos( void) const;
+ void updateLen( int nTellPos, int nLength);
+ void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&);
private:
- FILE* mpFileOut;
- bool mbCloseOutfile;
- char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation
- int mnEECryptR;
+ FILE* mpFileOut;
+ bool mbCloseOutfile;
+ char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation
+ int mnEECryptR;
public:
- char* mpPtr;
+ char* mpPtr;
- char maSubsetName[256];
- bool mbPfbSubset;
- int mnHexLineCol;
+ char maSubsetName[256];
+ bool mbPfbSubset;
+ int mnHexLineCol;
};
// --------------------------------------------------------------------
Type1Emitter::Type1Emitter( const char* pPfbFileName, bool bPfbSubset)
-: mpFileOut( NULL)
-, mbCloseOutfile( true)
-, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
-, mpPtr( maBuffer)
-, mbPfbSubset( bPfbSubset)
-, mnHexLineCol( 0)
+: mpFileOut( NULL)
+, mbCloseOutfile( true)
+, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
+, mpPtr( maBuffer)
+, mbPfbSubset( bPfbSubset)
+, mnHexLineCol( 0)
{
mpFileOut = fopen( pPfbFileName, "wb");
maSubsetName[0] = '\0';
@@ -1909,12 +1909,12 @@ Type1Emitter::Type1Emitter( const char* pPfbFileName, bool bPfbSubset)
// --------------------------------------------------------------------
Type1Emitter::Type1Emitter( FILE* pOutFile, bool bPfbSubset)
-: mpFileOut( pOutFile)
-, mbCloseOutfile( false)
-, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
-, mpPtr( maBuffer)
-, mbPfbSubset( bPfbSubset)
-, mnHexLineCol( 0)
+: mpFileOut( pOutFile)
+, mbCloseOutfile( false)
+, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
+, mpPtr( maBuffer)
+, mbPfbSubset( bPfbSubset)
+, mnHexLineCol( 0)
{
maSubsetName[0] = '\0';
}
@@ -2112,7 +2112,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += sprintf( pOut, "%%!FontType1-1.0: %s 001.003\n", rEmitter.maSubsetName);
// emit TOPDICT
pOut += sprintf( pOut,
- "11 dict begin\n" // TODO: dynamic entry count for TOPDICT
+ "11 dict begin\n" // TODO: dynamic entry count for TOPDICT
"/FontType 1 def\n"
"/PaintType 0 def\n");
pOut += sprintf( pOut, "/FontName /%s def\n", rEmitter.maSubsetName);
@@ -2129,7 +2129,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += sprintf( pOut, "/FontBBox {0 0 999 999}readonly def\n");
// emit FONTINFO into TOPDICT
pOut += sprintf( pOut,
- "/FontInfo 2 dict dup begin\n" // TODO: check fontinfo entry count
+ "/FontInfo 2 dict dup begin\n" // TODO: check fontinfo entry count
" /FullName (%s) readonly def\n"
" /FamilyName (%s) readonly def\n"
"end readonly def\n",
@@ -2154,9 +2154,9 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
// update PFB header segment
const int nPfbHeaderLen = rEmitter.tellPos() - 6;
rEmitter.updateLen( 2, nPfbHeaderLen);
-
+
// prepare start of eexec segment
- rEmitter.emitRawData( "\x80\x02\x00\x00\x00\x00", 6); // segment start
+ rEmitter.emitRawData( "\x80\x02\x00\x00\x00\x00", 6); // segment start
}
const int nEExecSegTell = rEmitter.tellPos();
@@ -2190,11 +2190,11 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
"/ND{noaccess def}executeonly def\n"
"/NP{noaccess put}executeonly def\n"
"/MinFeature{16 16}ND\n"
- "/password 5839 def\n", // TODO: mnRDCryptSeed?
+ "/password 5839 def\n", // TODO: mnRDCryptSeed?
nPrivEntryCount);
#if defined(IGNORE_HINTS)
- pOut += sprintf( pOut, "/BlueValues []ND\n"); // BlueValues are mandatory
+ pOut += sprintf( pOut, "/BlueValues []ND\n"); // BlueValues are mandatory
#else
// emit blue hint related privdict entries
if( !mpCffLocal->maBlueValues.empty())
@@ -2210,12 +2210,12 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += dbl2str( pOut, mpCffLocal->mfBlueScale, 6);
pOut += sprintf( pOut, " def\n");
}
- if( mpCffLocal->mfBlueShift) { // default BlueShift==7
+ if( mpCffLocal->mfBlueShift) { // default BlueShift==7
pOut += sprintf( pOut, "/BlueShift ");
pOut += dbl2str( pOut, mpCffLocal->mfBlueShift);
pOut += sprintf( pOut, " def\n");
}
- if( mpCffLocal->mfBlueFuzz) { // default BlueFuzz==1
+ if( mpCffLocal->mfBlueFuzz) { // default BlueFuzz==1
pOut += sprintf( pOut, "/BlueFuzz ");
pOut += dbl2str( pOut, mpCffLocal->mfBlueFuzz);
pOut += sprintf( pOut, " def\n");
@@ -2325,7 +2325,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
const int nEExecLen = rEmitter.tellPos() - nEExecSegTell;
rEmitter.updateLen( nEExecSegTell-4, nEExecLen);
}
-
+
// create PFB footer
static const char aPfxFooter[] = "\x80\x01\x14\x02\x00\x00\n" // TODO: check segment len
"0000000000000000000000000000000000000000000000000000000000000000\n"
@@ -2358,12 +2358,12 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
static_cast<long>(maFontBBox[3] * fYFactor) ) );
// PDF-Spec says the values below mean the ink bounds!
// TODO: use better approximations for these ink bounds
- rFSInfo.m_nAscent = +rFSInfo.m_aFontBBox.Bottom(); // for capital letters
- rFSInfo.m_nDescent = -rFSInfo.m_aFontBBox.Top(); // for all letters
- rFSInfo.m_nCapHeight = rFSInfo.m_nAscent; // for top-flat capital letters
+ rFSInfo.m_nAscent = +rFSInfo.m_aFontBBox.Bottom(); // for capital letters
+ rFSInfo.m_nDescent = -rFSInfo.m_aFontBBox.Top(); // for all letters
+ rFSInfo.m_nCapHeight = rFSInfo.m_nAscent; // for top-flat capital letters
rFSInfo.m_nFontType = rEmitter.mbPfbSubset ? FontSubsetInfo::TYPE1_PFB : FontSubsetInfo::TYPE1_PFA;
- rFSInfo.m_aPSName = String( rEmitter.maSubsetName, RTL_TEXTENCODING_UTF8 );
+ rFSInfo.m_aPSName = String( rEmitter.maSubsetName, RTL_TEXTENCODING_UTF8 );
return true;
}
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index b492033d078e..cbcf30612cb5 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +36,14 @@
// ====================================================================
FontSubsetInfo::FontSubsetInfo()
-: m_nAscent( 0)
-, m_nDescent( 0)
-, m_nCapHeight( 0)
-, m_nFontType( FontSubsetInfo::NO_FONT)
-, mpInFontBytes( NULL)
-, mnInByteLength( 0)
-, meInFontType( FontSubsetInfo::NO_FONT)
-, mpSftTTFont( NULL)
+: m_nAscent( 0)
+, m_nDescent( 0)
+, m_nCapHeight( 0)
+, m_nFontType( FontSubsetInfo::NO_FONT)
+, mpInFontBytes( NULL)
+, mnInByteLength( 0)
+, meInFontType( FontSubsetInfo::NO_FONT)
+, mpSftTTFont( NULL)
{}
// --------------------------------------------------------------------
@@ -86,15 +86,15 @@ bool FontSubsetInfo::CreateFontSubset(
{
// prepare request details needed by all underlying subsetters
mnReqFontTypeMask = nReqFontTypeMask;
- mpOutFile = pOutFile;
- mpReqFontName = pReqFontName;
- mpReqGlyphIds = pReqGlyphIds;
- mpReqEncodedIds = pReqEncodedIds;
- mnReqGlyphCount = nReqGlyphCount;
+ mpOutFile = pOutFile;
+ mpReqFontName = pReqFontName;
+ mpReqGlyphIds = pReqGlyphIds;
+ mpReqEncodedIds = pReqEncodedIds;
+ mnReqGlyphCount = nReqGlyphCount;
// TODO: move the glyphid/encid/notdef reshuffling from the callers to here
- // dispatch to underlying subsetters
+ // dispatch to underlying subsetters
bool bOK = false;
// TODO: better match available input-type to possible subset-types
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 9fc03ca81185..450a70b6e544 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +186,10 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
if( aFeatureIndexList[0] != nFeatureIndex ) // do not ignore the required feature
{
const int nRequested = std::count( aFeatureIndexList.begin(), aFeatureIndexList.end(), nFeatureIndex);
- if( !nRequested ) // ignore features that are not requested
+ if( !nRequested ) // ignore features that are not requested
continue;
const int nAvailable = std::count( aReqFeatureTagList.begin(), aReqFeatureTagList.end(), nTag);
- if( !nAvailable ) // some fonts don't provide features they request!
+ if( !nAvailable ) // some fonts don't provide features they request!
continue;
}
diff --git a/vcl/source/fontsubset/gsub.h b/vcl/source/fontsubset/gsub.h
index bb4543f372da..e8cce6981d17 100644
--- a/vcl/source/fontsubset/gsub.h
+++ b/vcl/source/fontsubset/gsub.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
namespace vcl
{
-
+
int HasVerticalGSUB( struct vcl::_TrueTypeFont* pTTFile );
int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, int wmode );
diff --git a/vcl/source/fontsubset/list.c b/vcl/source/fontsubset/list.c
index c58e4497d2cf..001b15cdd6ac 100644
--- a/vcl/source/fontsubset/list.c
+++ b/vcl/source/fontsubset/list.c
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 3555b701ef8a..aa6fd99301f6 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +94,7 @@ struct PSPathElement
int x1, y1;
int x2, y2;
int x3, y3;
-
+
PSPathElement( PathSegmentType i_eType ) : type( i_eType ),
x1( 0 ), y1( 0 ),
x2( 0 ), y2( 0 ),
@@ -542,11 +542,11 @@ static int GetSimpleTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoin
/* printf("GetSimpleTTOutline(%d)\n", glyphID); */
- if( glyphID >= ttf->nglyphs ) /*- glyph is not present in the font */
+ if( glyphID >= ttf->nglyphs ) /*- glyph is not present in the font */
return 0;
const sal_uInt8* ptr = table + ttf->goffsets[glyphID];
const sal_Int16 numberOfContours = GetInt16(ptr, 0, 1);
- if( numberOfContours <= 0 ) /*- glyph is not simple */
+ if( numberOfContours <= 0 ) /*- glyph is not simple */
return 0;
if (metrics) { /*- GetCompoundTTOutline() calls this function with NULL metrics -*/
@@ -810,7 +810,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
pa = (ControlPoint*)calloc(np, sizeof(ControlPoint));
assert(pa != 0);
-
+
memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
*pointArray = pa;
@@ -1178,7 +1178,7 @@ static void GetNames(TrueTypeFont *t)
{
t->subfamily = strdup("");
}
-
+
/* #i60349# sanity check psname
* psname parctically has to be 7bit ascii and should not contains spaces
* there is a class of broken fonts which do not fullfill that at all, so let's try
@@ -1410,7 +1410,7 @@ static void FindCmap(TrueTypeFont *ttf)
for (i = 0; i < ncmaps; i++) {
sal_uInt32 offset;
sal_uInt16 pID, eID;
-
+
/* sanity check, cmap entry must lie within table */
if( i*8+4 > table_size )
break;
@@ -1418,14 +1418,14 @@ static void FindCmap(TrueTypeFont *ttf)
pID = GetUInt16(table, 4 + i * 8, 1);
eID = GetUInt16(table, 6 + i * 8, 1);
offset = GetUInt32(table, 8 + i * 8, 1);
-
+
/* sanity check, cmap must lie within file */
if( (table - ttf->ptr) + offset > (sal_uInt32)ttf->fsize )
continue;
/* Unicode tables in Apple fonts */
if (pID == 0) {
- AppleUni = offset;
+ AppleUni = offset;
}
if (pID == 3) {
@@ -1554,10 +1554,10 @@ static void KernGlyphsPrim1(TrueTypeFont *ttf, sal_uInt16 *glyphs, int nglyphs,
{
(void)ttf; /* avoid warning */
(void)glyphs; /* avoid warning */
- (void)nglyphs; /* avoid warning */
- (void)wmode; /* avoid warning */
- (void)nglyphs; /* avoid warning */
- (void)kern; /* avoid warning */
+ (void)nglyphs; /* avoid warning */
+ (void)wmode; /* avoid warning */
+ (void)nglyphs; /* avoid warning */
+ (void)kern; /* avoid warning */
fprintf(stderr, "MacOS kerning tables have not been implemented yet!\n");
}
@@ -1660,7 +1660,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
struct stat st;
if (!fname || !*fname) return SF_BADFILE;
-
+
allocTrueTypeFont( ttf );
if( ! *ttf )
return SF_MEMORY;
@@ -1700,7 +1700,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
goto cleanup;
}
close(fd);
-
+
return doOpenTTFont( facenum, *ttf );
cleanup:
@@ -1718,12 +1718,12 @@ int OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTyp
allocTrueTypeFont( ttf );
if( *ttf == NULL )
return SF_MEMORY;
-
+
(*ttf)->fname = NULL;
(*ttf)->fsize = nLen;
(*ttf)->ptr = (sal_uInt8*)pBuffer;
-
- return doOpenTTFont( facenum, *ttf );
+
+ return doOpenTTFont( facenum, *ttf );
}
static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
@@ -1812,8 +1812,8 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
if( !pHead )
return SF_TTFORMAT;
/* limit Head candidate to TTC extract's limits */
- if( pHead > t->ptr + (t->fsize - 54) )
- pHead = t->ptr + (t->fsize - 54);
+ if( pHead > t->ptr + (t->fsize - 54) )
+ pHead = t->ptr + (t->fsize - 54);
/* TODO: find better method than searching head table's magic */
sal_uInt8* p = NULL;
for( p = pHead + 12; p > t->ptr; --p ) {
@@ -1837,7 +1837,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
* tables, but this would be quite time intensive.
* Try to fix tables, so we can cope with minor problems.
*/
-
+
if( (sal_uInt8*)t->tables[i] < t->ptr )
{
#if OSL_DEBUG_LEVEL > 1
@@ -1894,7 +1894,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
for( i = 0; i <= (int)t->nglyphs; ++i )
t->goffsets[i] = indexfmt ? GetUInt32(table, i << 2, 1) : (sal_uInt32)GetUInt16(table, i << 1, 1) << 1;
- } else if( getTable(t, O_CFF) ) { /* PS-OpenType */
+ } else if( getTable(t, O_CFF) ) { /* PS-OpenType */
t->goffsets = (sal_uInt32 *) calloc(1+t->nglyphs, sizeof(sal_uInt32));
/* TODO: implement to get subsetting */
assert(t->goffsets != 0);
@@ -2234,7 +2234,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
for (i = 0; i < nGlyphs; i++) {
gID[i] = glyfAdd(glyf, GetTTRawGlyphData(ttf, glyphArray[i]), ttf);
}
-
+
/** cmap **/
cmap = TrueTypeTableNew_cmap();
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 7a785b9bf99f..8235c3a27e82 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +57,7 @@ namespace vcl
sal_uInt32 tag; /**< TrueType file tag */
list tables; /**< List of table tags and pointers */
};
-
+
/* These must be #defined so that they can be used in initializers */
#define T_maxp 0x6D617870
#define T_glyf 0x676C7966
@@ -168,7 +168,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bige
ptr[offset] = (sal_uInt8)(val & 0xFF);
}
}
-
+
_inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
assert(ptr != 0);
@@ -240,7 +240,7 @@ static int NameRecordCompareF(const void *l, const void *r)
}
return 0;
}
-
+
static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
{
@@ -293,7 +293,7 @@ int AddTable(TrueTypeCreator *_this, TrueTypeTable *table)
void RemoveTable(TrueTypeCreator *_this, sal_uInt32 tag)
{
int done = 0;
-
+
if (listCount(_this->tables)) {
listToFirst(_this->tables);
do {
@@ -317,16 +317,16 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
sal_uInt32 *p;
int i=0, n;
sal_uInt8 *head = NULL; /* saved pointer to the head table data for checkSumAdjustment calculation */
-
+
if ((n = listCount(_this->tables)) == 0) return SF_TTFORMAT;
ProcessTables(_this);
/* ProcessTables() adds 'loca' and 'hmtx' */
-
+
n = listCount(_this->tables);
numTables = (sal_uInt16) n;
-
+
TableEntry* te = (TableEntry*)scalloc(n, sizeof(TableEntry));
@@ -337,7 +337,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
}
qsort(te, n, sizeof(TableEntry), TableEntryCompareF);
-
+
do {
searchRange *= 2;
entrySelector++;
@@ -387,7 +387,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
*ptr = ttf;
*length = s;
-
+
return SF_OK;
}
@@ -477,12 +477,12 @@ typedef struct {
sal_uInt32 isFixedPitch;
void *ptr; /* format-specific pointer */
} tdata_post;
-
+
/* allocate memory for a TT table */
static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
{
- sal_uInt32 n;
+ sal_uInt32 n;
n = (nbytes + 3) & (sal_uInt32) ~3;
sal_uInt8* res = (sal_uInt8*)malloc(n);
@@ -491,7 +491,7 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
return res;
}
-
+
static void FreeGlyphData(void *ptr)
{
GlyphData *p = (GlyphData *) ptr;
@@ -560,7 +560,7 @@ static void TrueTypeTableDispose_cmap(TrueTypeTable *_this)
table_cmap *t;
CmapSubTable *s;
sal_uInt32 i;
-
+
if (_this) {
t = (table_cmap *) _this->data;
if (t) {
@@ -618,7 +618,7 @@ static struct {
{T_cmap, TrueTypeTableDispose_cmap},
{T_name, TrueTypeTableDispose_name},
{T_post, TrueTypeTableDispose_post}
-
+
};
static int GetRawData_generic(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
@@ -639,7 +639,7 @@ static int GetRawData_head(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
*len = TABLESIZE_head;
*ptr = (sal_uInt8 *) _this->data;
*tag = T_head;
-
+
return TTCR_OK;
}
@@ -648,7 +648,7 @@ static int GetRawData_hhea(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
*len = TABLESIZE_hhea;
*ptr = (sal_uInt8 *) _this->data;
*tag = T_hhea;
-
+
return TTCR_OK;
}
@@ -674,7 +674,7 @@ static int GetRawData_maxp(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
*len = TABLESIZE_maxp;
*ptr = (sal_uInt8 *) _this->data;
*tag = T_maxp;
-
+
return TTCR_OK;
}
@@ -766,7 +766,7 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
return ptr;
}
-
+
/* XXX it only handles Format 0 encoding tables */
static sal_uInt8 *PackCmap(CmapSubTable *s, sal_uInt32 *length)
@@ -863,7 +863,7 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
qsort(nr, n, sizeof(NameRecord), NameRecordCompareF);
int nameLen = stringLen + 12 * n + 6;
- sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen);
+ sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen);
PutUInt16(0, name, 0, 1);
PutUInt16(n, name, 2, 1);
@@ -927,9 +927,9 @@ static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
return ret;
}
+
-
-
+
static struct {
sal_uInt32 tag;
@@ -945,10 +945,10 @@ static struct {
{T_cmap, GetRawData_cmap},
{T_name, GetRawData_name},
{T_post, GetRawData_post}
-
-
+
+
};
-
+
/*
* TrueTypeTable public methods
*/
@@ -969,11 +969,11 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
const sal_uInt8* ptr)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
- tdata_generic* pdata = (tdata_generic*)smalloc(sizeof(tdata_generic));
+ tdata_generic* pdata = (tdata_generic*)smalloc(sizeof(tdata_generic));
pdata->nbytes = nbytes;
pdata->tag = tag;
if (nbytes) {
- pdata->ptr = ttmalloc(nbytes);
+ pdata->ptr = ttmalloc(nbytes);
memcpy(pdata->ptr, ptr, nbytes);
} else {
pdata->ptr = 0;
@@ -985,7 +985,7 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
return table;
}
-
+
TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
sal_uInt16 flags,
sal_uInt16 unitsPerEm,
@@ -996,7 +996,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
{
assert(created != 0);
- TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
+ TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
sal_uInt8* ptr = (sal_uInt8*)ttmalloc(TABLESIZE_head);
@@ -1040,7 +1040,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
PutUInt16(0, ptr, 28, 1); /* reserved 4 */
PutUInt16(0, ptr, 30, 1); /* reserved 5 */
PutUInt16(0, ptr, 32, 1); /* metricDataFormat */
-
+
table->data = (void *) ptr;
table->tag = T_hhea;
table->rawdata = 0;
@@ -1070,7 +1070,7 @@ TrueTypeTable *TrueTypeTableNew_maxp( const sal_uInt8* maxp, int size)
if (maxp && size == TABLESIZE_maxp) {
memcpy(table->data, maxp, TABLESIZE_maxp);
}
-
+
table->tag = T_maxp;
table->rawdata = 0;
@@ -1081,7 +1081,7 @@ TrueTypeTable *TrueTypeTableNew_glyf(void)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
list l = listNewEmpty();
-
+
assert(l != 0);
listSetElementDtor(l, (list_destructor)FreeGlyphData);
@@ -1097,12 +1097,12 @@ TrueTypeTable *TrueTypeTableNew_cmap(void)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
table_cmap* cmap = (table_cmap*)smalloc(sizeof(table_cmap));
-
+
cmap->n = 0;
cmap->m = CMAP_SUBTABLE_INIT;
cmap->s = (CmapSubTable *) scalloc(CMAP_SUBTABLE_INIT, sizeof(CmapSubTable));
memset(cmap->s, 0, sizeof(CmapSubTable) * CMAP_SUBTABLE_INIT);
-
+
table->data = (table_cmap *) cmap;
table->rawdata = 0;
@@ -1138,7 +1138,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
list l = listNewEmpty();
-
+
assert(l != 0);
listSetElementDtor(l, (list_destructor)DisposeNameRecord);
@@ -1207,7 +1207,7 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt3
assert(!"Unknwon TrueType table.\n");
return TTCR_UNKNOWN;
}
-
+
void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
{
sal_uInt32 i, found;
@@ -1230,7 +1230,7 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
if (!found) {
if (t->n == t->m) {
- CmapSubTable* tmp = (CmapSubTable*)scalloc(t->m + CMAP_SUBTABLE_INCR, sizeof(CmapSubTable));
+ CmapSubTable* tmp = (CmapSubTable*)scalloc(t->m + CMAP_SUBTABLE_INCR, sizeof(CmapSubTable));
memset(tmp, 0, t->m + CMAP_SUBTABLE_INCR * sizeof(CmapSubTable));
memcpy(tmp, s, sizeof(CmapSubTable) * t->m);
t->m += CMAP_SUBTABLE_INCR;
@@ -1336,7 +1336,7 @@ sal_uInt32 glyfCount(const TrueTypeTable *table)
assert(table->tag == T_glyf);
return listCount((list) table->data);
}
-
+
void nameAdd(TrueTypeTable *table, NameRecord *nr)
{
@@ -1426,10 +1426,10 @@ static void ProcessTables(TrueTypeCreator *tt)
z = GetInt16(gd->ptr, 4, 1);
if (z < yMin) yMin = z;
-
+
z = GetInt16(gd->ptr, 6, 1);
if (z > xMax) xMax = z;
-
+
z = GetInt16(gd->ptr, 8, 1);
if (z > yMax) yMax = z;
}
@@ -1441,14 +1441,14 @@ static void ProcessTables(TrueTypeCreator *tt)
if (gd->npoints > maxCompositePoints) maxCompositePoints = gd->npoints;
if (gd->ncontours > maxCompositeContours) maxCompositeContours = gd->ncontours;
}
-
+
} while (listNext(glyphlist));
indexToLocFormat = (glyfLen / 2 > 0xFFFF) ? 1 : 0;
locaLen = indexToLocFormat ? (nGlyphs + 1) << 2 : (nGlyphs + 1) << 1;
sal_uInt8* glyfPtr = ttmalloc(glyfLen);
- sal_uInt8* locaPtr = ttmalloc(locaLen);
+ sal_uInt8* locaPtr = ttmalloc(locaLen);
TTSimpleGlyphMetrics* met = (TTSimpleGlyphMetrics*)scalloc(nGlyphs, sizeof(TTSimpleGlyphMetrics));
i = 0;
@@ -1457,7 +1457,7 @@ static void ProcessTables(TrueTypeCreator *tt)
p2 = locaPtr;
do {
GlyphData *gd = (GlyphData *) listCurrent(glyphlist);
-
+
if (gd->compflag) { /* re-number all components */
sal_uInt16 flags, index;
sal_uInt8 *ptr = gd->ptr + 10;
@@ -1526,7 +1526,7 @@ static void ProcessTables(TrueTypeCreator *tt)
((tdata_loca *) loca->data)->nbytes = locaLen;
AddTable(tt, loca);
-
+
head = FindTable(tt, T_head);
sal_uInt8* const pHeadData = (sal_uInt8*)head->data;
PutInt16(xMin, pHeadData, 36, 1);
@@ -1577,7 +1577,7 @@ static void ProcessTables(TrueTypeCreator *tt)
}
} // namespace vcl
-
+
extern "C"
{
/**
@@ -1597,11 +1597,11 @@ extern "C"
{
/* XXX do a binary search */
unsigned int i;
-
+
assert(_this != 0);
-
+
if (_this->rawdata) free(_this->rawdata);
-
+
for(i=0; i < sizeof(vcl::vtable1)/sizeof(*vcl::vtable1); i++) {
if (_this->tag == vcl::vtable1[i].tag) {
vcl::vtable1[i].f(_this);
@@ -1611,7 +1611,7 @@ extern "C"
assert(!"Unknown TrueType table.\n");
}
}
-
+
#ifdef TEST_TTCR
int main(void)
diff --git a/vcl/source/fontsubset/ttcr.hxx b/vcl/source/fontsubset/ttcr.hxx
index b2beb0549174..41ab42fa74b9 100644
--- a/vcl/source/fontsubset/ttcr.hxx
+++ b/vcl/source/fontsubset/ttcr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace vcl
};
/** Error codes for most functions */
- enum TTCRErrCodes {
+ enum TTCRErrCodes {
TTCR_OK = 0, /**< no error */
TTCR_ZEROGLYPHS = 1, /**< At least one glyph should be defined */
TTCR_UNKNOWN = 2, /**< Unknown TrueType table */
@@ -213,7 +213,7 @@ namespace vcl
* Table manipulation functions
*
*------------------------------------------------------------------------------*/
-
+
/**
* Add a character/glyph pair to a cmap table
@@ -243,7 +243,7 @@ namespace vcl
*/
void nameAdd(TrueTypeTable *, NameRecord *nr);
-} // namespace
+} // namespace
extern "C"
diff --git a/vcl/source/fontsubset/xlat.cxx b/vcl/source/fontsubset/xlat.cxx
index 1df7a5a2fdde..9c442d5b0748 100644
--- a/vcl/source/fontsubset/xlat.cxx
+++ b/vcl/source/fontsubset/xlat.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +38,12 @@ namespace { // anonymous namespace
class ConverterCache
{
public:
- explicit ConverterCache( void );
+ explicit ConverterCache( void );
~ConverterCache( void );
- sal_uInt16 convertOne( int nSelect, sal_Unicode );
- void convertStr( int nSelect, const sal_Unicode* pSrc, sal_uInt16* pDst, int nCount );
+ sal_uInt16 convertOne( int nSelect, sal_Unicode );
+ void convertStr( int nSelect, const sal_Unicode* pSrc, sal_uInt16* pDst, int nCount );
protected:
- void ensureConverter( int nSelect );
+ void ensureConverter( int nSelect );
private:
rtl_UnicodeToTextConverter maConverterCache[ MAX_CVT_SELECT+1 ];
rtl_UnicodeToTextContext maContexts[ MAX_CVT_SELECT+1 ];
@@ -192,22 +192,22 @@ sal_uInt16 TranslateChar16(sal_uInt16 src)
{
return aCC.convertOne( 6, src);
}
-
+
void TranslateString12(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 2, src, dst, n);
}
-
+
void TranslateString13(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 3, src, dst, n);
}
-
+
void TranslateString14(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 4, src, dst, n);
}
-
+
void TranslateString15(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 5, src, dst, n);
@@ -217,7 +217,7 @@ void TranslateString16(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 6, src, dst, n);
}
-
+
} // namespace vcl
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/fontsubset/xlat.hxx b/vcl/source/fontsubset/xlat.hxx
index 3d8622bf9ae7..700c15ff0efd 100644
--- a/vcl/source/fontsubset/xlat.hxx
+++ b/vcl/source/fontsubset/xlat.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index d144fe550882..27a4862acd61 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -127,15 +127,15 @@ BOOL AlphaMask::Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const AlphaMask* pAlphaSrc )
{
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
// this optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor)
- const Size aSizePix( GetSizePixel() );
- Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ Rectangle aRectDst( rRectDst );
+ BOOL bRet = FALSE;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -143,9 +143,9 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
{
if( pAlphaSrc && ( *pAlphaSrc != *this ) )
{
- Bitmap* pSrc = (Bitmap*) pAlphaSrc;
- const Size aCopySizePix( pSrc->GetSizePixel() );
- Rectangle aRectSrc( rRectSrc );
+ Bitmap* pSrc = (Bitmap*) pAlphaSrc;
+ const Size aCopySizePix( pSrc->GetSizePixel() );
+ Rectangle aRectSrc( rRectSrc );
aRectSrc.Intersection( Rectangle( Point(), aCopySizePix ) );
@@ -159,11 +159,11 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcEndX = aRectSrc.Left() + nWidth;
- const long nSrcEndY = aRectSrc.Top() + nHeight;
- long nDstY = aRectDst.Top();
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcEndX = aRectSrc.Left() + nWidth;
+ const long nSrcEndY = aRectSrc.Top() + nHeight;
+ long nDstY = aRectDst.Top();
for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
@@ -185,20 +185,20 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcX = aRectSrc.Left();
- const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1L;
- const long nSrcEndY1 = nSrcY + nHeight - 1L;
- const long nDstX = aRectDst.Left();
- const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1L;
- const long nDstEndY1 = nDstY + nHeight - 1L;
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcX = aRectSrc.Left();
+ const long nSrcY = aRectSrc.Top();
+ const long nSrcEndX1 = nSrcX + nWidth - 1L;
+ const long nSrcEndY1 = nSrcY + nHeight - 1L;
+ const long nDstX = aRectDst.Left();
+ const long nDstY = aRectDst.Top();
+ const long nDstEndX1 = nDstX + nWidth - 1L;
+ const long nDstEndY1 = nDstY + nHeight - 1L;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
@@ -247,14 +247,14 @@ BOOL AlphaMask::Erase( BYTE cTransparency )
BOOL AlphaMask::Invert()
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc && pAcc->GetBitCount() == 8 )
{
- BitmapColor aCol( 0 );
- const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
- BYTE* pMap = new BYTE[ 256 ];
+ BitmapColor aCol( 0 );
+ const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
+ BYTE* pMap = new BYTE[ 256 ];
for( long i = 0; i < 256; i++ )
pMap[ i ] = ~(BYTE) i;
@@ -320,16 +320,16 @@ BOOL AlphaMask::Rotate( long nAngle10, BYTE cFillTransparency )
BOOL AlphaMask::Replace( const Bitmap& rMask, BYTE cReplaceTransparency )
{
- BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pMaskAcc && pAcc )
{
- const BitmapColor aReplace( cReplaceTransparency );
- const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
- const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aReplace( cReplaceTransparency );
+ const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
+ const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
@@ -351,8 +351,8 @@ nTol
#endif
)
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" );
@@ -375,7 +375,7 @@ nTol
}
else
{
- BitmapColor aReplace( cReplaceTransparency );
+ BitmapColor aReplace( cReplaceTransparency );
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -401,9 +401,9 @@ nTol
BOOL AlphaMask::Replace( BYTE* pSearchTransparencies, BYTE* pReplaceTransparencies,
ULONG nColorCount, ULONG* pTols )
{
- Color* pSearchColors = new Color[ nColorCount ];
- Color* pReplaceColors = new Color[ nColorCount ];
- BOOL bRet;
+ Color* pSearchColors = new Color[ nColorCount ];
+ Color* pReplaceColors = new Color[ nColorCount ];
+ BOOL bRet;
for( ULONG i = 0; i < nColorCount; i++ )
{
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 0da492c1fecb..7bd825fe04c2 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ ULONG Animation::mnAnimCount = 0UL;
ULONG AnimationBitmap::GetChecksum() const
{
- sal_uInt32 nCrc = aBmpEx.GetChecksum();
- SVBT32 aBT32;
+ sal_uInt32 nCrc = aBmpEx.GetChecksum();
+ SVBT32 aBT32;
UInt32ToSVBT32( aPosPix.X(), aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
@@ -90,13 +90,13 @@ ULONG AnimationBitmap::GetChecksum() const
// -------------
Animation::Animation() :
- mnLoopCount ( 0 ),
- mnLoops ( 0 ),
- mnPos ( 0 ),
- meCycleMode ( CYCLE_NORMAL ),
- mbIsInAnimation ( FALSE ),
- mbLoopTerminated ( FALSE ),
- mbIsWaiting ( FALSE )
+ mnLoopCount ( 0 ),
+ mnLoops ( 0 ),
+ mnPos ( 0 ),
+ meCycleMode ( CYCLE_NORMAL ),
+ mbIsInAnimation ( FALSE ),
+ mbLoopTerminated ( FALSE ),
+ mbIsWaiting ( FALSE )
{
DBG_CTOR( Animation, NULL );
maTimer.SetTimeoutHdl( LINK( this, Animation, ImplTimeoutHdl ) );
@@ -106,14 +106,14 @@ Animation::Animation() :
// -----------------------------------------------------------------------
Animation::Animation( const Animation& rAnimation ) :
- maBitmapEx ( rAnimation.maBitmapEx ),
- maGlobalSize ( rAnimation.maGlobalSize ),
- mnLoopCount ( rAnimation.mnLoopCount ),
- mnPos ( rAnimation.mnPos ),
- meCycleMode ( rAnimation.meCycleMode ),
- mbIsInAnimation ( FALSE ),
- mbLoopTerminated ( rAnimation.mbLoopTerminated ),
- mbIsWaiting ( rAnimation.mbIsWaiting )
+ maBitmapEx ( rAnimation.maBitmapEx ),
+ maGlobalSize ( rAnimation.maGlobalSize ),
+ mnLoopCount ( rAnimation.mnLoopCount ),
+ mnPos ( rAnimation.mnPos ),
+ meCycleMode ( rAnimation.meCycleMode ),
+ mbIsInAnimation ( FALSE ),
+ mbLoopTerminated ( rAnimation.mbLoopTerminated ),
+ mbIsWaiting ( rAnimation.mbIsWaiting )
{
DBG_CTOR( Animation, NULL );
@@ -169,7 +169,7 @@ Animation& Animation::operator=( const Animation& rAnimation )
BOOL Animation::operator==( const Animation& rAnimation ) const
{
const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx == maBitmapEx &&
@@ -197,7 +197,7 @@ BOOL Animation::operator==( const Animation& rAnimation ) const
BOOL Animation::IsEqual( const Animation& rAnimation ) const
{
const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx.IsEqual( maBitmapEx ) &&
@@ -248,9 +248,9 @@ void Animation::Clear()
BOOL Animation::IsTransparent() const
{
- Point aPoint;
- Rectangle aRect( aPoint, maGlobalSize );
- BOOL bRet = FALSE;
+ Point aPoint;
+ Rectangle aRect( aPoint, maGlobalSize );
+ BOOL bRet = FALSE;
// Falls irgendein 'kleines' Bildchen durch den Hintergrund
// ersetzt werden soll, muessen wir 'transparent' sein, um
@@ -292,8 +292,8 @@ ULONG Animation::GetSizeBytes() const
ULONG Animation::GetChecksum() const
{
- SVBT32 aBT32;
- sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
+ SVBT32 aBT32;
+ sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
UInt32ToSVBT32( maList.Count(), aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
@@ -336,8 +336,8 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
if( ( pOut->GetOutDevType() == OUTDEV_WINDOW ) && !mbLoopTerminated &&
( ANIMATION_TIMEOUT_ON_CLICK != ( (AnimationBitmap*) maList.GetObject( mnPos ) )->nWait ) )
{
- ImplAnimView* pView;
- ImplAnimView* pMatch = NULL;
+ ImplAnimView* pView;
+ ImplAnimView* pMatch = NULL;
for( pView = (ImplAnimView*) mpViewList->First(); pView; pView = (ImplAnimView*) mpViewList->Next() )
{
@@ -455,8 +455,8 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
if( nAnimCount )
{
- ImplAnimView* pView;
- BOOL bGlobalPause = TRUE;
+ ImplAnimView* pView;
+ BOOL bGlobalPause = TRUE;
if( maNotifyLink.IsSet() )
{
@@ -510,7 +510,7 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
}
}
else
- bGlobalPause = FALSE;
+ bGlobalPause = FALSE;
if( !mpViewList->Count() )
Stop();
@@ -579,8 +579,8 @@ BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
if( !IsInAnimation() )
{
- Point aPoint;
- Rectangle aGlobalRect( aPoint, maGlobalSize );
+ Point aPoint;
+ Rectangle aGlobalRect( aPoint, maGlobalSize );
maGlobalSize = aGlobalRect.Union( Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize();
maList.Insert( new AnimationBitmap( rStepBmp ), LIST_APPEND );
@@ -713,7 +713,7 @@ BOOL Animation::Mirror( ULONG nMirrorFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ BOOL bRet;
if( !IsInAnimation() && maList.Count() )
{
@@ -829,8 +829,8 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
if( nCount )
{
- const ByteString aDummyStr;
- const UINT32 nDummy32 = 0UL;
+ const ByteString aDummyStr;
+ const UINT32 nDummy32 = 0UL;
// Falls keine BitmapEx gesetzt wurde, schreiben wir
// einfach die erste Bitmap der Animation
@@ -844,8 +844,8 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
for( USHORT i = 0; i < nCount; i++ )
{
- const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
- const UINT16 nRest = nCount - i - 1;
+ const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
+ const UINT16 nRest = nCount - i - 1;
// AnimationBitmap schreiben
rOStm << rAnimBmp.aBmpEx;
@@ -856,11 +856,11 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
rOStm << (UINT16) rAnimBmp.eDisposal;
rOStm << (BYTE) rAnimBmp.bUserInput;
rOStm << (UINT32) rAnimation.mnLoopCount;
- rOStm << nDummy32; // unbenutzt
- rOStm << nDummy32; // unbenutzt
- rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // unbenutzt
rOStm << aDummyStr; // unbenutzt
- rOStm << nRest; // Anzahl der Strukturen, die noch _folgen_
+ rOStm << nRest; // Anzahl der Strukturen, die noch _folgen_
}
}
@@ -871,11 +871,11 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
{
- Bitmap aBmp;
- ULONG nStmPos = rIStm.Tell();
- UINT32 nAnimMagic1, nAnimMagic2;
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bReadAnimations = FALSE;
+ Bitmap aBmp;
+ ULONG nStmPos = rIStm.Tell();
+ UINT32 nAnimMagic1, nAnimMagic2;
+ USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ BOOL bReadAnimations = FALSE;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
nStmPos = rIStm.Tell();
@@ -905,11 +905,11 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
if( bReadAnimations )
{
AnimationBitmap aAnimBmp;
- BitmapEx aBmpEx;
- ByteString aDummyStr;
- UINT32 nTmp32;
- UINT16 nTmp16;
- BYTE cTmp;
+ BitmapEx aBmpEx;
+ ByteString aDummyStr;
+ UINT32 nTmp32;
+ UINT16 nTmp16;
+ BYTE cTmp;
do
{
@@ -921,11 +921,11 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> nTmp16; aAnimBmp.eDisposal = ( Disposal) nTmp16;
rIStm >> cTmp; aAnimBmp.bUserInput = (BOOL) cTmp;
rIStm >> nTmp32; rAnimation.mnLoopCount = (USHORT) nTmp32;
- rIStm >> nTmp32; // unbenutzt
- rIStm >> nTmp32; // unbenutzt
- rIStm >> nTmp32; // unbenutzt
+ rIStm >> nTmp32; // unbenutzt
+ rIStm >> nTmp32; // unbenutzt
+ rIStm >> nTmp32; // unbenutzt
rIStm >> aDummyStr; // unbenutzt
- rIStm >> nTmp16; // Rest zu lesen
+ rIStm >> nTmp16; // Rest zu lesen
rAnimation.Insert( aAnimBmp );
}
diff --git a/vcl/source/gdi/base14.cxx b/vcl/source/gdi/base14.cxx
index 02524920a2bb..da30404052d6 100644
--- a/vcl/source/gdi/base14.cxx
+++ b/vcl/source/gdi/base14.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ OString PDFWriterImpl::BuiltinFont::getNameObject() const
OStringBuffer aBuf( 16 );
aBuf.append( '/' );
const char* pRun = m_pPSName;
-
+
unsigned int nCopied = 0;
while( *pRun )
{
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 335533f429b1..8fa4ab638e85 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ Bitmap::Bitmap( const ResId& rResId ) :
mpImpBmp( NULL )
{
const BitmapEx aBmpEx( rResId );
-
+
if( !aBmpEx.IsEmpty() )
- *this = aBmpEx.GetBitmap();
+ *this = aBmpEx.GetBitmap();
}
// ------------------------------------------------------------------
Bitmap::Bitmap( const Bitmap& rBitmap ) :
- maPrefMapMode ( rBitmap.maPrefMapMode ),
- maPrefSize ( rBitmap.maPrefSize )
+ maPrefMapMode ( rBitmap.maPrefMapMode ),
+ maPrefSize ( rBitmap.maPrefSize )
{
mpImpBmp = rBitmap.mpImpBmp;
@@ -90,8 +90,8 @@ Bitmap::Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* p
{
if( rSizePixel.Width() && rSizePixel.Height() )
{
- BitmapPalette aPal;
- BitmapPalette* pRealPal = NULL;
+ BitmapPalette aPal;
+ BitmapPalette* pRealPal = NULL;
if( nBitCount <= 8 )
{
@@ -318,8 +318,8 @@ USHORT Bitmap::GetBitCount() const
BOOL Bitmap::HasGreyPalette() const
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const USHORT nBitCount = GetBitCount();
+ BOOL bRet = FALSE;
if( 1 == nBitCount )
{
@@ -347,7 +347,7 @@ BOOL Bitmap::HasGreyPalette() const
{
if( pRAcc->HasPalette() && ( (BitmapPalette&) pRAcc->GetPalette() == GetGreyPalette( 1 << nBitCount ) ) )
bRet = TRUE;
-
+
( (Bitmap*) this )->ReleaseAccess( pRAcc );
}
}
@@ -371,8 +371,8 @@ ULONG Bitmap::GetChecksum() const
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
- sal_uInt32 nCrc = 0;
- SVBT32 aBT32;
+ sal_uInt32 nCrc = 0;
+ SVBT32 aBT32;
pRAcc->ImplZeroInitUnusedBits();
@@ -393,7 +393,7 @@ ULONG Bitmap::GetChecksum() const
UInt32ToSVBT32( pRAcc->GetColorMask().GetBlueMask(), aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
-
+
if( pRAcc->HasPalette() )
{
nCrc = rtl_crc32( nCrc, pRAcc->GetPalette().ImplGetColorBuffer(),
@@ -401,7 +401,7 @@ ULONG Bitmap::GetChecksum() const
}
nCrc = rtl_crc32( nCrc, pRAcc->GetBuffer(), pRAcc->GetScanlineSize() * pRAcc->Height() );
-
+
mpImpBmp->ImplSetChecksum( nRet = nCrc );
}
@@ -447,10 +447,10 @@ void Bitmap::ImplMakeUnique()
void Bitmap::ImplAssignWithSize( const Bitmap& rBitmap )
{
- const Size aOldSizePix( GetSizePixel() );
- const Size aNewSizePix( rBitmap.GetSizePixel() );
- const MapMode aOldMapMode( maPrefMapMode );
- Size aNewPrefSize;
+ const Size aOldSizePix( GetSizePixel() );
+ const Size aNewSizePix( rBitmap.GetSizePixel() );
+ const MapMode aOldMapMode( maPrefMapMode );
+ Size aNewPrefSize;
if( ( aOldSizePix != aNewSizePix ) && aOldSizePix.Width() && aOldSizePix.Height() )
{
@@ -527,15 +527,15 @@ BOOL Bitmap::Erase( const Color& rFillColor )
{
if( !(*this) )
return TRUE;
-
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pWriteAcc )
{
const ULONG nFormat = pWriteAcc->GetScanlineFormat();
- BYTE cIndex = 0;
- BOOL bFast = FALSE;
+ BYTE cIndex = 0;
+ BOOL bFast = FALSE;
switch( nFormat )
{
@@ -607,15 +607,15 @@ BOOL Bitmap::Erase( const Color& rFillColor )
BOOL Bitmap::Invert()
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc )
{
if( pAcc->HasPalette() )
{
- BitmapPalette aBmpPal( pAcc->GetPalette() );
- const USHORT nCount = aBmpPal.GetEntryCount();
+ BitmapPalette aBmpPal( pAcc->GetPalette() );
+ const USHORT nCount = aBmpPal.GetEntryCount();
for( USHORT i = 0; i < nCount; i++ )
aBmpPal[ i ].Invert();
@@ -624,8 +624,8 @@ BOOL Bitmap::Invert()
}
else
{
- const long nWidth = pAcc->Width();
- const long nHeight = pAcc->Height();
+ const long nWidth = pAcc->Width();
+ const long nHeight = pAcc->Height();
for( long nX = 0L; nX < nWidth; nX++ )
for( long nY = 0L; nY < nHeight; nY++ )
@@ -649,14 +649,14 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
if( bHorz && !bVert )
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
if( pAcc )
{
- const long nWidth = pAcc->Width();
- const long nHeight = pAcc->Height();
- const long nWidth1 = nWidth - 1L;
- const long nWidth_2 = nWidth >> 1L;
+ const long nWidth = pAcc->Width();
+ const long nHeight = pAcc->Height();
+ const long nWidth1 = nWidth - 1L;
+ const long nWidth_2 = nWidth >> 1L;
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -675,15 +675,15 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
else if( bVert && !bHorz )
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
if( pAcc )
{
- const long nScanSize = pAcc->GetScanlineSize();
- BYTE* pBuffer = new BYTE[ nScanSize ];
- const long nHeight = pAcc->Height();
- const long nHeight1 = nHeight - 1L;
- const long nHeight_2 = nHeight >> 1L;
+ const long nScanSize = pAcc->GetScanlineSize();
+ BYTE* pBuffer = new BYTE[ nScanSize ];
+ const long nHeight = pAcc->Height();
+ const long nHeight1 = nHeight - 1L;
+ const long nHeight_2 = nHeight >> 1L;
for( long nY = 0L, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- )
{
@@ -699,14 +699,14 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
else if( bHorz && bVert )
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
if( pAcc )
{
- const long nWidth = pAcc->Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = pAcc->Height();
- long nHeight_2 = nHeight >> 1;
+ const long nWidth = pAcc->Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = pAcc->Height();
+ long nHeight_2 = nHeight >> 1;
for( long nY = 0L, nOtherY = nHeight - 1L; nY < nHeight_2; nY++, nOtherY-- )
{
@@ -749,33 +749,33 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
nAngle10 %= 3600L;
nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10;
- if( !nAngle10 )
+ if( !nAngle10 )
bRet = TRUE;
else if( 1800L == nAngle10 )
bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT );
else
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aRotatedBmp;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aRotatedBmp;
if( pReadAcc )
{
- const Size aSizePix( GetSizePixel() );
+ const Size aSizePix( GetSizePixel() );
if( ( 900L == nAngle10 ) || ( 2700L == nAngle10 ) )
{
- const Size aNewSizePix( aSizePix.Height(), aSizePix.Width() );
- Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ const Size aNewSizePix( aSizePix.Height(), aSizePix.Width() );
+ Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = aSizePix.Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = aSizePix.Height();
- const long nHeight1 = nHeight - 1L;
- const long nNewWidth = aNewSizePix.Width();
- const long nNewHeight = aNewSizePix.Height();
+ const long nWidth = aSizePix.Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = aSizePix.Height();
+ const long nHeight1 = nHeight - 1L;
+ const long nNewWidth = aNewSizePix.Width();
+ const long nNewHeight = aNewSizePix.Height();
if( 900L == nAngle10 )
{
@@ -797,37 +797,37 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
}
else
{
- Point aTmpPoint;
- Rectangle aTmpRectangle( aTmpPoint, aSizePix );
- Polygon aPoly( aTmpRectangle );
+ Point aTmpPoint;
+ Rectangle aTmpRectangle( aTmpPoint, aSizePix );
+ Polygon aPoly( aTmpRectangle );
aPoly.Rotate( aTmpPoint, (USHORT) nAngle10 );
- Rectangle aNewBound( aPoly.GetBoundRect() );
- const Size aNewSizePix( aNewBound.GetSize() );
- Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Rectangle aNewBound( aPoly.GetBoundRect() );
+ const Size aNewSizePix( aNewBound.GetSize() );
+ Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const BitmapColor aFillColor( pWriteAcc->GetBestMatchingColor( rFillColor ) );
- const double fCosAngle = cos( nAngle10 * F_PI1800 );
- const double fSinAngle = sin( nAngle10 * F_PI1800 );
- const double fXMin = aNewBound.Left();
- const double fYMin = aNewBound.Top();
- const long nWidth = aSizePix.Width();
- const long nHeight = aSizePix.Height();
- const long nNewWidth = aNewSizePix.Width();
- const long nNewHeight = aNewSizePix.Height();
- long nX;
- long nY;
- long nRotX;
- long nRotY;
- long nSinY;
- long nCosY;
- long* pCosX = new long[ nNewWidth ];
- long* pSinX = new long[ nNewWidth ];
- long* pCosY = new long[ nNewHeight ];
- long* pSinY = new long[ nNewHeight ];
+ const BitmapColor aFillColor( pWriteAcc->GetBestMatchingColor( rFillColor ) );
+ const double fCosAngle = cos( nAngle10 * F_PI1800 );
+ const double fSinAngle = sin( nAngle10 * F_PI1800 );
+ const double fXMin = aNewBound.Left();
+ const double fYMin = aNewBound.Top();
+ const long nWidth = aSizePix.Width();
+ const long nHeight = aSizePix.Height();
+ const long nNewWidth = aNewSizePix.Width();
+ const long nNewHeight = aNewSizePix.Height();
+ long nX;
+ long nY;
+ long nRotX;
+ long nRotY;
+ long nSinY;
+ long nCosY;
+ long* pCosX = new long[ nNewWidth ];
+ long* pSinX = new long[ nNewWidth ];
+ long* pCosY = new long[ nNewHeight ];
+ long* pSinY = new long[ nNewHeight ];
for ( nX = 0; nX < nNewWidth; nX++ )
{
@@ -887,9 +887,9 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
BOOL Bitmap::Crop( const Rectangle& rRectPixel )
{
- const Size aSizePix( GetSizePixel() );
- Rectangle aRect( rRectPixel );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ Rectangle aRect( rRectPixel );
+ BOOL bRet = FALSE;
aRect.Intersection( Rectangle( Point(), aSizePix ) );
@@ -899,10 +899,10 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
if( pReadAcc )
{
- Point aTmpPoint;
- const Rectangle aNewRect( aTmpPoint, aRect.GetSize() );
- Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Point aTmpPoint;
+ const Rectangle aNewRect( aTmpPoint, aRect.GetSize() );
+ Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
@@ -934,9 +934,9 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc, const Bitmap* pBmpSrc )
{
- const Size aSizePix( GetSizePixel() );
- Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ Rectangle aRectDst( rRectDst );
+ BOOL bRet = FALSE;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -944,11 +944,11 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
{
if( pBmpSrc && ( *pBmpSrc != *this ) )
{
- Bitmap* pSrc = (Bitmap*) pBmpSrc;
- const Size aCopySizePix( pSrc->GetSizePixel() );
- Rectangle aRectSrc( rRectSrc );
- const USHORT nSrcBitCount = pBmpSrc->GetBitCount();
- const USHORT nDstBitCount = GetBitCount();
+ Bitmap* pSrc = (Bitmap*) pBmpSrc;
+ const Size aCopySizePix( pSrc->GetSizePixel() );
+ Rectangle aRectSrc( rRectSrc );
+ const USHORT nSrcBitCount = pBmpSrc->GetBitCount();
+ const USHORT nDstBitCount = GetBitCount();
if( nSrcBitCount > nDstBitCount )
{
@@ -969,14 +969,14 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( nNextIndex )
{
- BitmapReadAccess* pSrcAcc = pSrc->AcquireReadAccess();
- BitmapWriteAccess* pDstAcc = AcquireWriteAccess();
+ BitmapReadAccess* pSrcAcc = pSrc->AcquireReadAccess();
+ BitmapWriteAccess* pDstAcc = AcquireWriteAccess();
if( pSrcAcc && pDstAcc )
{
- const long nSrcCount = pDstAcc->GetPaletteEntryCount();
- const long nDstCount = 1 << nDstBitCount;
- BOOL bFound;
+ const long nSrcCount = pDstAcc->GetPaletteEntryCount();
+ const long nDstCount = 1 << nDstBitCount;
+ BOOL bFound;
for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ )
{
@@ -1018,16 +1018,16 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcEndX = aRectSrc.Left() + nWidth;
- const long nSrcEndY = aRectSrc.Top() + nHeight;
- long nDstY = aRectDst.Top();
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcEndX = aRectSrc.Left() + nWidth;
+ const long nSrcEndY = aRectSrc.Top() + nHeight;
+ long nDstY = aRectDst.Top();
if( pReadAcc->HasPalette() && pWriteAcc->HasPalette() )
{
- const USHORT nCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pMap = new BYTE[ nCount ];
+ const USHORT nCount = pReadAcc->GetPaletteEntryCount();
+ BYTE* pMap = new BYTE[ nCount ];
// Index-Map fuer Farbtabelle
// aufbauen, da das Bild ja (relativ) farbgenau
@@ -1068,20 +1068,20 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcX = aRectSrc.Left();
- const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1L;
- const long nSrcEndY1 = nSrcY + nHeight - 1L;
- const long nDstX = aRectDst.Left();
- const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1L;
- const long nDstEndY1 = nDstY + nHeight - 1L;
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcX = aRectSrc.Left();
+ const long nSrcY = aRectSrc.Top();
+ const long nSrcEndX1 = nSrcX + nWidth - 1L;
+ const long nSrcEndY1 = nSrcY + nHeight - 1L;
+ const long nDstX = aRectDst.Left();
+ const long nDstY = aRectDst.Top();
+ const long nDstEndX1 = nDstX + nWidth - 1L;
+ const long nDstEndY1 = nDstY + nHeight - 1L;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
@@ -1126,27 +1126,27 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
if( nDX || nDY )
{
- const Size aSizePixel( GetSizePixel() );
- const long nWidth = aSizePixel.Width();
- const long nHeight = aSizePixel.Height();
- const Size aNewSize( nWidth + nDX, nHeight + nDY );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ const Size aSizePixel( GetSizePixel() );
+ const long nWidth = aSizePixel.Width();
+ const long nHeight = aSizePixel.Height();
+ const Size aNewSize( nWidth + nDX, nHeight + nDY );
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
if( pReadAcc )
{
- BitmapPalette aBmpPal( pReadAcc->GetPalette() );
- Bitmap aNewBmp( aNewSize, GetBitCount(), &aBmpPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapPalette aBmpPal( pReadAcc->GetPalette() );
+ Bitmap aNewBmp( aNewSize, GetBitCount(), &aBmpPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
BitmapColor aColor;
- const long nNewX = nWidth;
- const long nNewY = nHeight;
- const long nNewWidth = pWriteAcc->Width();
- const long nNewHeight = pWriteAcc->Height();
- long nX;
- long nY;
+ const long nNewX = nWidth;
+ const long nNewY = nHeight;
+ const long nNewWidth = pWriteAcc->Width();
+ const long nNewHeight = pWriteAcc->Height();
+ long nX;
+ long nY;
if( pInitColor )
aColor = pWriteAcc->GetBestMatchingColor( *pInitColor );
@@ -1183,9 +1183,9 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
{
- Bitmap aNewBmp( GetSizePixel(), 1 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ Bitmap aNewBmp( GetSizePixel(), 1 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pWriteAcc )
{
@@ -1193,15 +1193,15 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
if( pReadAcc )
{
- const long nWidth = pReadAcc->Width();
- const long nHeight = pReadAcc->Height();
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const long nWidth = pReadAcc->Width();
+ const long nHeight = pReadAcc->Height();
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
if( !nTol )
{
- const BitmapColor aTest( pReadAcc->GetBestMatchingColor( rTransColor ) );
- long nX, nY, nShift;
+ const BitmapColor aTest( pReadAcc->GetBestMatchingColor( rTransColor ) );
+ long nX, nY, nShift;
if( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL ||
pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_LSN_PAL )
@@ -1210,7 +1210,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
const BYTE cTest = aTest.GetIndex();
const long nShiftInit = ( ( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL ) ? 4 : 0 );
- if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
+ if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
aWhite.GetIndex() == 1 )
{
// optimized for 1Bit-MSB destination palette
@@ -1247,7 +1247,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
// optimized for 8Bit source palette
const BYTE cTest = aTest.GetIndex();
- if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
+ if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
aWhite.GetIndex() == 1 )
{
// optimized for 1Bit-MSB destination palette
@@ -1297,13 +1297,13 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
else
{
BitmapColor aCol;
- long nR, nG, nB;
- const long nMinR = MinMax( (long) rTransColor.GetRed() - nTol, 0, 255 );
- const long nMaxR = MinMax( (long) rTransColor.GetRed() + nTol, 0, 255 );
- const long nMinG = MinMax( (long) rTransColor.GetGreen() - nTol, 0, 255 );
- const long nMaxG = MinMax( (long) rTransColor.GetGreen() + nTol, 0, 255 );
- const long nMinB = MinMax( (long) rTransColor.GetBlue() - nTol, 0, 255 );
- const long nMaxB = MinMax( (long) rTransColor.GetBlue() + nTol, 0, 255 );
+ long nR, nG, nB;
+ const long nMinR = MinMax( (long) rTransColor.GetRed() - nTol, 0, 255 );
+ const long nMaxR = MinMax( (long) rTransColor.GetRed() + nTol, 0, 255 );
+ const long nMinG = MinMax( (long) rTransColor.GetGreen() - nTol, 0, 255 );
+ const long nMaxG = MinMax( (long) rTransColor.GetGreen() + nTol, 0, 255 );
+ const long nMinB = MinMax( (long) rTransColor.GetBlue() - nTol, 0, 255 );
+ const long nMaxB = MinMax( (long) rTransColor.GetBlue() + nTol, 0, 255 );
if( pReadAcc->HasPalette() )
{
@@ -1373,21 +1373,21 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
{
- Region aRegion;
- Rectangle aRect( rRect );
- BitmapReadAccess* pReadAcc = ( (Bitmap*) this )->AcquireReadAccess();
+ Region aRegion;
+ Rectangle aRect( rRect );
+ BitmapReadAccess* pReadAcc = ( (Bitmap*) this )->AcquireReadAccess();
aRect.Intersection( Rectangle( Point(), GetSizePixel() ) );
aRect.Justify();
if( pReadAcc )
{
- Rectangle aSubRect;
- const long nLeft = aRect.Left();
- const long nTop = aRect.Top();
- const long nRight = aRect.Right();
- const long nBottom = aRect.Bottom();
- const BitmapColor aMatch( pReadAcc->GetBestMatchingColor( rColor ) );
+ Rectangle aSubRect;
+ const long nLeft = aRect.Left();
+ const long nTop = aRect.Top();
+ const long nRight = aRect.Right();
+ const long nBottom = aRect.Bottom();
+ const BitmapColor aMatch( pReadAcc->GetBestMatchingColor( rColor ) );
aRegion.ImplBeginAddRect();
@@ -1426,16 +1426,16 @@ Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
- BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pMaskAcc && pAcc )
{
- const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
- const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- BitmapColor aReplace;
+ const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
+ const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ BitmapColor aReplace;
if( pAcc->HasPalette() )
{
@@ -1504,17 +1504,17 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
{
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapReadAccess* pAcc = AcquireReadAccess();
- BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
- BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapReadAccess* pAcc = AcquireReadAccess();
+ BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
+ BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc && pAlphaAcc && pNewAcc )
{
- BitmapColor aCol;
- const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
+ BitmapColor aCol;
+ const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -1534,8 +1534,8 @@ BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -1555,17 +1555,17 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
if( 1 == GetBitCount() )
Convert( BMP_CONVERSION_4BIT_COLORS );
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc )
{
- const long nMinR = MinMax( (long) rSearchColor.GetRed() - nTol, 0, 255 );
- const long nMaxR = MinMax( (long) rSearchColor.GetRed() + nTol, 0, 255 );
- const long nMinG = MinMax( (long) rSearchColor.GetGreen() - nTol, 0, 255 );
- const long nMaxG = MinMax( (long) rSearchColor.GetGreen() + nTol, 0, 255 );
- const long nMinB = MinMax( (long) rSearchColor.GetBlue() - nTol, 0, 255 );
- const long nMaxB = MinMax( (long) rSearchColor.GetBlue() + nTol, 0, 255 );
+ const long nMinR = MinMax( (long) rSearchColor.GetRed() - nTol, 0, 255 );
+ const long nMaxR = MinMax( (long) rSearchColor.GetRed() + nTol, 0, 255 );
+ const long nMinG = MinMax( (long) rSearchColor.GetGreen() - nTol, 0, 255 );
+ const long nMaxG = MinMax( (long) rSearchColor.GetGreen() + nTol, 0, 255 );
+ const long nMinB = MinMax( (long) rSearchColor.GetBlue() - nTol, 0, 255 );
+ const long nMaxB = MinMax( (long) rSearchColor.GetBlue() + nTol, 0, 255 );
if( pAcc->HasPalette() )
{
@@ -1583,8 +1583,8 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
}
else
{
- BitmapColor aCol;
- const BitmapColor aReplace( pAcc->GetBestMatchingColor( rReplaceColor ) );
+ BitmapColor aCol;
+ const BitmapColor aReplace( pAcc->GetBestMatchingColor( rReplaceColor ) );
for( long nY = 0L, nHeight = pAcc->Height(); nY < nHeight; nY++ )
{
@@ -1619,19 +1619,19 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
if( 1 == GetBitCount() )
Convert( BMP_CONVERSION_4BIT_COLORS );
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc )
{
- long* pMinR = new long[ nColorCount ];
- long* pMaxR = new long[ nColorCount ];
- long* pMinG = new long[ nColorCount ];
- long* pMaxG = new long[ nColorCount ];
- long* pMinB = new long[ nColorCount ];
- long* pMaxB = new long[ nColorCount ];
- long* pTols;
- ULONG i;
+ long* pMinR = new long[ nColorCount ];
+ long* pMaxR = new long[ nColorCount ];
+ long* pMinG = new long[ nColorCount ];
+ long* pMaxG = new long[ nColorCount ];
+ long* pMinB = new long[ nColorCount ];
+ long* pMaxB = new long[ nColorCount ];
+ long* pTols;
+ ULONG i;
if( !_pTols )
{
@@ -1643,8 +1643,8 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
for( i = 0UL; i < nColorCount; i++ )
{
- const Color& rCol = pSearchColors[ i ];
- const long nTol = pTols[ i ];
+ const Color& rCol = pSearchColors[ i ];
+ const long nTol = pTols[ i ];
pMinR[ i ] = MinMax( (long) rCol.GetRed() - nTol, 0, 255 );
pMaxR[ i ] = MinMax( (long) rCol.GetRed() + nTol, 0, 255 );
@@ -1674,8 +1674,8 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
}
else
{
- BitmapColor aCol;
- BitmapColor* pReplaces = new BitmapColor[ nColorCount ];
+ BitmapColor aCol;
+ BitmapColor* pReplaces = new BitmapColor[ nColorCount ];
for( i = 0UL; i < nColorCount; i++ )
pReplaces[ i ] = pAcc->GetBestMatchingColor( pReplaceColors[ i ] );
@@ -1742,19 +1742,19 @@ Bitmap Bitmap::CreateDisplayBitmap( OutputDevice* pDisplay )
Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
{
Bitmap aRet;
-
+
if( BMP_COLOR_HIGHCONTRAST == eColorMode )
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
ULONG nColorCount = 0;
-
+
aRet = *this;
Image::GetColorTransformArrays( (ImageColorTransform) eColorMode, pSrcColors, pDstColors, nColorCount );
if( nColorCount && pSrcColors && pDstColors )
- aRet.Replace( pSrcColors, pDstColors, nColorCount );
+ aRet.Replace( pSrcColors, pDstColors, nColorCount );
delete[] pSrcColors;
delete[] pDstColors;
@@ -1765,7 +1765,7 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
aRet = *this;
aRet.MakeMono( BMP_COLOR_MONOCHROME_THRESHOLD );
}
-
+
return aRet;
}
@@ -1773,20 +1773,20 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
{
- BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pMaskAcc && pAcc )
{
- const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
- const Color aColBlack( COL_BLACK );
- BitmapColor aPixel;
- BitmapColor aMaskPixel;
- const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const BitmapColor aBlack( pAcc->GetBestMatchingColor( aColBlack ) );
- const BitmapColor aMaskBlack( pMaskAcc->GetBestMatchingColor( aColBlack ) );
+ const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
+ const Color aColBlack( COL_BLACK );
+ BitmapColor aPixel;
+ BitmapColor aMaskPixel;
+ const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aBlack( pAcc->GetBestMatchingColor( aColBlack ) );
+ const BitmapColor aMaskBlack( pMaskAcc->GetBestMatchingColor( aColBlack ) );
switch( eCombine )
{
@@ -1920,19 +1920,19 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
if( GetBitCount() <= 8 )
Convert( BMP_CONVERSION_24BIT );
- BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAlphaAcc && pAcc )
{
- const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
+ const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
for( long nY = 0L; nY < nHeight; ++nY )
for( long nX = 0L; nX < nWidth; ++nX )
- pAcc->SetPixel( nY, nX,
- pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
+ pAcc->SetPixel( nY, nX,
+ pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
255 - pAlphaAcc->GetPixel( nY, nX ) ) );
bRet = TRUE;
@@ -1962,7 +1962,7 @@ bool Bitmap::GetSystemData( BitmapSystemData& rData ) const
if( pSalBitmap )
bRet = pSalBitmap->GetSystemData( rData );
}
-
+
return bRet;
}
diff --git a/vcl/source/gdi/bitmap2.cxx b/vcl/source/gdi/bitmap2.cxx
index e11671e0f2c6..3fc6f86ea7f4 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +43,8 @@
// - Defines -
// -----------
-#define DIBCOREHEADERSIZE ( 12UL )
-#define DIBINFOHEADERSIZE ( sizeof( DIBInfoHeader ) )
+#define DIBCOREHEADERSIZE ( 12UL )
+#define DIBINFOHEADERSIZE ( sizeof( DIBInfoHeader ) )
#define BITMAPINFOHEADER 0x28
#define SETPIXEL4( pBuf, nX, cChar )( (pBuf)[ (nX) >> 1 ] |= ( (nX) & 1 ) ? ( cChar ): (cChar) << 4 );
@@ -53,12 +53,12 @@
// - Compression defines
// ----------------------
-#define COMPRESS_OWN ('S'|('D'<<8UL))
-#define COMPRESS_NONE ( 0UL )
-#define RLE_8 ( 1UL )
-#define RLE_4 ( 2UL )
-#define BITFIELDS ( 3UL )
-#define ZCOMPRESS ( COMPRESS_OWN | 0x01000000UL ) /* == 'SD01' (binary) */
+#define COMPRESS_OWN ('S'|('D'<<8UL))
+#define COMPRESS_NONE ( 0UL )
+#define RLE_8 ( 1UL )
+#define RLE_4 ( 2UL )
+#define BITFIELDS ( 3UL )
+#define ZCOMPRESS ( COMPRESS_OWN | 0x01000000UL ) /* == 'SD01' (binary) */
// -----------------
// - DIBInfoHeader -
@@ -66,17 +66,17 @@
struct DIBInfoHeader
{
- sal_uInt32 nSize;
- sal_Int32 nWidth;
- sal_Int32 nHeight;
- sal_uInt16 nPlanes;
- sal_uInt16 nBitCount;
- sal_uInt32 nCompression;
- sal_uInt32 nSizeImage;
- sal_Int32 nXPelsPerMeter;
- sal_Int32 nYPelsPerMeter;
- sal_uInt32 nColsUsed;
- sal_uInt32 nColsImportant;
+ sal_uInt32 nSize;
+ sal_Int32 nWidth;
+ sal_Int32 nHeight;
+ sal_uInt16 nPlanes;
+ sal_uInt16 nBitCount;
+ sal_uInt32 nCompression;
+ sal_uInt32 nSizeImage;
+ sal_Int32 nXPelsPerMeter;
+ sal_Int32 nYPelsPerMeter;
+ sal_uInt32 nColsUsed;
+ sal_uInt32 nColsImportant;
DIBInfoHeader() :
nSize( 0UL ),
@@ -132,10 +132,10 @@ SvStream& operator<<( SvStream& rOStm, const Bitmap& rBitmap )
BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader, BOOL bIsMSOFormat )
{
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- const ULONG nOldPos = rIStm.Tell();
- ULONG nOffset = 0UL;
- BOOL bRet = FALSE;
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const ULONG nOldPos = rIStm.Tell();
+ ULONG nOffset = 0UL;
+ BOOL bRet = FALSE;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -164,26 +164,26 @@ BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader, BOOL bIsMSOFormat )
BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset, BOOL bIsMSOFormat )
{
- DIBInfoHeader aHeader;
- const ULONG nStmPos = rIStm.Tell();
- BOOL bRet = FALSE;
- sal_Bool bTopDown = sal_False;
+ DIBInfoHeader aHeader;
+ const ULONG nStmPos = rIStm.Tell();
+ BOOL bRet = FALSE;
+ sal_Bool bTopDown = sal_False;
if( ImplReadDIBInfoHeader( rIStm, aHeader, bTopDown, bIsMSOFormat ) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount )
{
const USHORT nBitCount( discretizeBitcount(aHeader.nBitCount) );
- const Size aSizePixel( aHeader.nWidth, abs(aHeader.nHeight) );
- BitmapPalette aDummyPal;
- Bitmap aNewBmp( aSizePixel, nBitCount, &aDummyPal );
- BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
+ const Size aSizePixel( aHeader.nWidth, abs(aHeader.nHeight) );
+ BitmapPalette aDummyPal;
+ Bitmap aNewBmp( aSizePixel, nBitCount, &aDummyPal );
+ BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
if( pAcc )
{
- USHORT nColors;
- SvStream* pIStm;
- SvMemoryStream* pMemStm = NULL;
- BYTE* pData = NULL;
+ USHORT nColors;
+ SvStream* pIStm;
+ SvMemoryStream* pMemStm = NULL;
+ BYTE* pData = NULL;
if( nBitCount <= 8 )
{
@@ -197,24 +197,24 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset, BOOL bIs
if( ZCOMPRESS == aHeader.nCompression )
{
- ZCodec aCodec;
+ ZCodec aCodec;
sal_uInt32 nCodedSize, nUncodedSize;
- ULONG nCodedPos;
+ ULONG nCodedPos;
// read coding information
rIStm >> nCodedSize >> nUncodedSize >> aHeader.nCompression;
pData = (BYTE*) rtl_allocateMemory( nUncodedSize );
-
+
// decode buffer
nCodedPos = rIStm.Tell();
aCodec.BeginCompression();
aCodec.Read( rIStm, pData, nUncodedSize );
aCodec.EndCompression();
-
+
// skip unread bytes from coded buffer
rIStm.SeekRel( nCodedSize - ( rIStm.Tell() - nCodedPos ) );
-
- // set decoded bytes to memory stream,
+
+ // set decoded bytes to memory stream,
// from which we will read the bitmap data
pIStm = pMemStm = new SvMemoryStream;
pMemStm->SetBuffer( (char*) pData, nUncodedSize, FALSE, nUncodedSize );
@@ -251,7 +251,7 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset, BOOL bIs
if( pData )
rtl_freeMemory( pData );
-
+
delete pMemStm;
aNewBmp.ReleaseAccess( pAcc );
@@ -267,9 +267,9 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset, BOOL bIs
BOOL Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset )
{
- UINT32 nTmp32;
- UINT16 nTmp16 = 0;
- BOOL bRet = FALSE;
+ UINT32 nTmp32;
+ UINT16 nTmp16 = 0;
+ BOOL bRet = FALSE;
rIStm >> nTmp16;
@@ -407,7 +407,7 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
if ( rHeader.nWidth < 0 )
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
-
+
// #144105# protect a little against damaged files
if( rHeader.nSizeImage > ( 16 * static_cast< sal_uInt32 >( rHeader.nWidth * rHeader.nHeight ) ) )
rHeader.nSizeImage = 0;
@@ -419,9 +419,9 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL bQuad )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * ( bQuad ? 4UL : 3UL );
- BitmapColor aPalColor;
+ const USHORT nColors = rAcc.GetPaletteEntryCount();
+ const ULONG nPalSize = nColors * ( bQuad ? 4UL : 3UL );
+ BitmapColor aPalColor;
BYTE* pEntries = new BYTE[ nPalSize ];
rIStm.Read( pEntries, nPalSize );
@@ -449,12 +449,12 @@ BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL
BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown )
{
const ULONG nAlignedWidth = AlignedWidth4Bytes( rHeader.nWidth * rHeader.nBitCount );
- UINT32 nRMask = 0;
- UINT32 nGMask = 0;
- UINT32 nBMask = 0;
- BOOL bNative;
- BOOL bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
- BOOL bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
+ UINT32 nRMask = 0;
+ UINT32 nGMask = 0;
+ UINT32 nBMask = 0;
+ BOOL bNative;
+ BOOL bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
+ BOOL bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
( RLE_4 == rHeader.nCompression && rHeader.nBitCount == 4 );
// Is native format?
@@ -526,9 +526,9 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
}
else
{
- const long nWidth = rHeader.nWidth;
- const long nHeight = abs(rHeader.nHeight);
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
+ const long nWidth = rHeader.nWidth;
+ const long nHeight = abs(rHeader.nHeight);
+ BYTE* pBuf = new BYTE[ nAlignedWidth ];
// true color DIB's can have a (optimization) palette
if( rHeader.nColsUsed && rHeader.nBitCount > 8 )
@@ -537,13 +537,13 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
const long nI = bTopDown ? 1 : -1;
long nY = bTopDown ? 0 : nHeight - 1;
long nCount = nHeight;
-
+
switch( rHeader.nBitCount )
{
case( 1 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ BYTE* pTmp;
+ BYTE cTmp;
for( ; nCount--; nY += nI )
{
@@ -566,8 +566,8 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 4 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ BYTE* pTmp;
+ BYTE cTmp;
for( ; nCount--; nY += nI )
{
@@ -590,7 +590,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 8 ):
{
- BYTE* pTmp;
+ BYTE* pTmp;
for( ; nCount--; nY += nI )
{
@@ -604,9 +604,9 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 16 ):
{
- ColorMask aMask( nRMask, nGMask, nBMask );
+ ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT16* pTmp16;
+ UINT16* pTmp16;
for( ; nCount--; nY += nI )
{
@@ -624,7 +624,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 24 ):
{
BitmapColor aPixelColor;
- BYTE* pTmp;
+ BYTE* pTmp;
for( ; nCount--; nY += nI )
{
@@ -643,9 +643,9 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 32 ):
{
- ColorMask aMask( nRMask, nGMask, nBMask );
+ ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT32* pTmp32;
+ UINT32* pTmp32;
for( ; nCount--; nY += nI )
{
@@ -673,14 +673,14 @@ BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
{
DBG_ASSERT( mpImpBmp, "Empty Bitmaps can't be saved" );
- const Size aSizePix( GetSizePixel() );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ BOOL bRet = FALSE;
if( mpImpBmp && aSizePix.Width() && aSizePix.Height() )
{
- BitmapReadAccess* pAcc = ( (Bitmap*) this)->AcquireReadAccess();
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- const ULONG nOldPos = rOStm.Tell();
+ BitmapReadAccess* pAcc = ( (Bitmap*) this)->AcquireReadAccess();
+ const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const ULONG nOldPos = rOStm.Tell();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -713,12 +713,12 @@ BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompressed ) const
{
- const MapMode aMapPixel( MAP_PIXEL );
- DIBInfoHeader aHeader;
- ULONG nImageSizePos;
- ULONG nEndPos;
- sal_uInt32 nCompression = 0;
- BOOL bRet = FALSE;
+ const MapMode aMapPixel( MAP_PIXEL );
+ DIBInfoHeader aHeader;
+ ULONG nImageSizePos;
+ ULONG nEndPos;
+ sal_uInt32 nCompression = 0;
+ BOOL bRet = FALSE;
aHeader.nSize = DIBINFOHEADERSIZE;
aHeader.nWidth = rAcc.Width();
@@ -729,7 +729,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
{
aHeader.nBitCount = ( rAcc.GetScanlineFormat() == BMP_FORMAT_16BIT_TC_LSB_MASK ) ? 16 : 32;
aHeader.nSizeImage = rAcc.Height() * rAcc.GetScanlineSize();
-
+
nCompression = BITFIELDS;
}
else
@@ -746,7 +746,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
const UINT16 nBitCount( sal::static_int_cast<UINT16>(rAcc.GetBitCount()) );
aHeader.nBitCount = discretizeBitcount( nBitCount );
- aHeader.nSizeImage = rAcc.Height() *
+ aHeader.nSizeImage = rAcc.Height() *
AlignedWidth4Bytes( rAcc.Width()*aHeader.nBitCount );
if( bCompressed )
@@ -760,7 +760,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
nCompression = COMPRESS_NONE;
}
- if( ( rOStm.GetCompressMode() & COMPRESSMODE_ZBITMAP ) &&
+ if( ( rOStm.GetCompressMode() & COMPRESSMODE_ZBITMAP ) &&
( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_40 ) )
{
aHeader.nCompression = ZCOMPRESS;
@@ -776,10 +776,10 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// MapMode is integer-based, and suffers from roundoffs,
// especially if maPrefSize is small. Trying to circumvent
// that by performing part of the math in floating point.
- const Size aScale100000(
+ const Size aScale100000(
OutputDevice::LogicToLogic( Size(100000L,
- 100000L),
- MAP_100TH_MM,
+ 100000L),
+ MAP_100TH_MM,
maPrefMapMode ) );
const double fBmpWidthM((double)maPrefSize.Width() / aScale100000.Width() );
const double fBmpHeightM((double)maPrefSize.Height() / aScale100000.Height() );
@@ -811,15 +811,15 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
if( aHeader.nCompression == ZCOMPRESS )
{
- ZCodec aCodec;
- SvMemoryStream aMemStm( aHeader.nSizeImage + 4096, 65535 );
- ULONG nCodedPos = rOStm.Tell(), nLastPos;
- sal_uInt32 nCodedSize, nUncodedSize;
+ ZCodec aCodec;
+ SvMemoryStream aMemStm( aHeader.nSizeImage + 4096, 65535 );
+ ULONG nCodedPos = rOStm.Tell(), nLastPos;
+ sal_uInt32 nCodedSize, nUncodedSize;
// write uncoded data palette
if( aHeader.nColsUsed )
ImplWriteDIBPalette( aMemStm, rAcc );
-
+
// write uncoded bits
bRet = ImplWriteDIBBits( aMemStm, rAcc, nCompression, aHeader.nSizeImage );
@@ -828,12 +828,12 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// seek over compress info
rOStm.SeekRel( 12 );
-
+
// write compressed data
aCodec.BeginCompression( 3 );
aCodec.Write( rOStm, (BYTE*) aMemStm.GetData(), nUncodedSize );
aCodec.EndCompression();
-
+
// update compress info ( coded size, uncoded size, uncoded compression )
nCodedSize = ( nLastPos = rOStm.Tell() ) - nCodedPos - 12;
rOStm.Seek( nCodedPos );
@@ -863,9 +863,9 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- UINT32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
+ UINT32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
isBitfieldCompression( rAcc.GetScanlineFormat() ) ? 3UL : 0UL );
- UINT32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
+ UINT32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
rOStm << (UINT16) 0x4D42;
rOStm << (UINT32) ( nOffset + ( rAcc.Height() * rAcc.GetScanlineSize() ) );
@@ -880,11 +880,11 @@ BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
BOOL Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * 4UL;
- BYTE* pEntries = new BYTE[ nPalSize ];
- BYTE* pTmpEntry = pEntries;
- BitmapColor aPalColor;
+ const USHORT nColors = rAcc.GetPaletteEntryCount();
+ const ULONG nPalSize = nColors * 4UL;
+ BYTE* pEntries = new BYTE[ nPalSize ];
+ BYTE* pTmpEntry = pEntries;
+ BitmapColor aPalColor;
for( USHORT i = 0; i < nColors; i++ )
{
@@ -909,8 +909,8 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
{
if( BITFIELDS == nCompression )
{
- const ColorMask& rMask = rAcc.GetColorMask();
- SVBT32 aVal32;
+ const ColorMask& rMask = rAcc.GetColorMask();
+ SVBT32 aVal32;
UInt32ToSVBT32( rMask.GetRedMask(), aVal32 );
rOStm.Write( (BYTE*) aVal32, 4UL );
@@ -947,9 +947,9 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
// #i59239# discretize bitcount for aligned width to 1,4,8,24
// (other cases are not written below)
const USHORT nBitCount( sal::static_int_cast<USHORT>(rAcc.GetBitCount()) );
- const ULONG nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
+ const ULONG nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
discretizeBitcount(nBitCount));
- BOOL bNative = FALSE;
+ BOOL bNative = FALSE;
switch( rAcc.GetScanlineFormat() )
{
@@ -973,11 +973,11 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
rOStm.Write( rAcc.GetBuffer(), nAlignedWidth * rAcc.Height() );
else
{
- const long nWidth = rAcc.Width();
- const long nHeight = rAcc.Height();
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
- BYTE* pTmp;
- BYTE cTmp;
+ const long nWidth = rAcc.Width();
+ const long nHeight = rAcc.Height();
+ BYTE* pBuf = new BYTE[ nAlignedWidth ];
+ BYTE* pTmp;
+ BYTE cTmp;
switch( nBitCount )
{
@@ -1083,14 +1083,14 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
BitmapWriteAccess& rAcc, BOOL bRLE4 )
{
- Scanline pRLE = pBuffer;
- long nY = abs(rHeader.nHeight) - 1L;
- const ULONG nWidth = rAcc.Width();
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0UL;
- BYTE cTmp;
- BOOL bEndDecoding = FALSE;
+ Scanline pRLE = pBuffer;
+ long nY = abs(rHeader.nHeight) - 1L;
+ const ULONG nWidth = rAcc.Width();
+ ULONG nCountByte;
+ ULONG nRunByte;
+ ULONG nX = 0UL;
+ BYTE cTmp;
+ BOOL bEndDecoding = FALSE;
do
{
@@ -1107,7 +1107,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
for( ULONG i = 0UL; i < nCountByte; i++ )
{
cTmp = *pRLE++;
-
+
if( nX < nWidth )
rAcc.SetPixel( nY, nX++, cTmp >> 4 );
@@ -1189,15 +1189,15 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
{
const ULONG nWidth = rAcc.Width();
const ULONG nHeight = rAcc.Height();
- ULONG nX;
- ULONG nSaveIndex;
- ULONG nCount;
- ULONG nBufCount;
- BYTE* pBuf = new BYTE[ ( nWidth << 1 ) + 2 ];
- BYTE* pTmp;
- BYTE cPix;
- BYTE cLast;
- BOOL bFound;
+ ULONG nX;
+ ULONG nSaveIndex;
+ ULONG nCount;
+ ULONG nBufCount;
+ BYTE* pBuf = new BYTE[ ( nWidth << 1 ) + 2 ];
+ BYTE* pTmp;
+ BYTE cPix;
+ BYTE cLast;
+ BOOL bFound;
for ( long nY = nHeight - 1L; nY >= 0L; nY-- )
{
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 112ef297dc92..fcd60f2dcda5 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,36 +41,36 @@
// - Defines -
// -----------
-#define RGB15( _def_cR, _def_cG, _def_cB ) (((ULONG)(_def_cR)<<10UL)|((ULONG)(_def_cG)<<5UL)|(ULONG)(_def_cB))
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
-
-#define CALC_ERRORS \
- nTemp = p1T[nX++] >> 12; \
- nBErr = MinMax( nTemp, 0, 255 ); \
- nBErr = nBErr - FloydIndexMap[ nBC = FloydMap[nBErr] ]; \
- nTemp = p1T[nX++] >> 12; \
- nGErr = MinMax( nTemp, 0, 255 ); \
- nGErr = nGErr - FloydIndexMap[ nGC = FloydMap[nGErr] ]; \
- nTemp = p1T[nX] >> 12; \
- nRErr = MinMax( nTemp, 0, 255 ); \
+#define RGB15( _def_cR, _def_cG, _def_cB ) (((ULONG)(_def_cR)<<10UL)|((ULONG)(_def_cG)<<5UL)|(ULONG)(_def_cB))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+
+#define CALC_ERRORS \
+ nTemp = p1T[nX++] >> 12; \
+ nBErr = MinMax( nTemp, 0, 255 ); \
+ nBErr = nBErr - FloydIndexMap[ nBC = FloydMap[nBErr] ]; \
+ nTemp = p1T[nX++] >> 12; \
+ nGErr = MinMax( nTemp, 0, 255 ); \
+ nGErr = nGErr - FloydIndexMap[ nGC = FloydMap[nGErr] ]; \
+ nTemp = p1T[nX] >> 12; \
+ nRErr = MinMax( nTemp, 0, 255 ); \
nRErr = nRErr - FloydIndexMap[ nRC = FloydMap[nRErr] ];
-#define CALC_TABLES3 \
- p2T[nX++] += FloydError3[nBErr]; \
- p2T[nX++] += FloydError3[nGErr]; \
+#define CALC_TABLES3 \
+ p2T[nX++] += FloydError3[nBErr]; \
+ p2T[nX++] += FloydError3[nGErr]; \
p2T[nX++] += FloydError3[nRErr];
-#define CALC_TABLES5 \
- p2T[nX++] += FloydError5[nBErr]; \
- p2T[nX++] += FloydError5[nGErr]; \
+#define CALC_TABLES5 \
+ p2T[nX++] += FloydError5[nBErr]; \
+ p2T[nX++] += FloydError5[nGErr]; \
p2T[nX++] += FloydError5[nRErr];
-#define CALC_TABLES7 \
- p1T[++nX] += FloydError7[nBErr]; \
- p2T[nX++] += FloydError1[nBErr]; \
- p1T[nX] += FloydError7[nGErr]; \
- p2T[nX++] += FloydError1[nGErr]; \
- p1T[nX] += FloydError7[nRErr]; \
+#define CALC_TABLES7 \
+ p1T[++nX] += FloydError7[nBErr]; \
+ p2T[nX++] += FloydError1[nBErr]; \
+ p1T[nX] += FloydError7[nGErr]; \
+ p2T[nX++] += FloydError1[nGErr]; \
+ p1T[nX] += FloydError7[nRErr]; \
p2T[nX] += FloydError1[nRErr];
// -----------
@@ -245,12 +245,12 @@ long FloydIndexMap[6] =
void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
{
- double fVal = 3.125;
- const double fVal16 = fVal / 16.;
- long i, j, k, l;
- USHORT pMtx[ 16 ][ 16 ];
- USHORT nMax = 0;
- static BYTE pMagic[4][4] = { { 0, 14, 3, 13, },
+ double fVal = 3.125;
+ const double fVal16 = fVal / 16.;
+ long i, j, k, l;
+ USHORT pMtx[ 16 ][ 16 ];
+ USHORT nMax = 0;
+ static BYTE pMagic[4][4] = { { 0, 14, 3, 13, },
{11, 5, 8, 6, },
{12, 2, 15, 1, },
{7, 9, 4, 10 } };
@@ -275,8 +275,8 @@ void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
BOOL Bitmap::Convert( BmpConversion eConversion )
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const USHORT nBitCount = GetBitCount();
+ BOOL bRet = FALSE;
switch( eConversion )
{
@@ -365,20 +365,20 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 1 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 1 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
@@ -421,8 +421,8 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -438,21 +438,21 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
BOOL Bitmap::ImplMakeMonoDither()
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 1 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 1 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- BYTE pDitherMatrix[ 16 ][ 16 ];
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ BYTE pDitherMatrix[ 16 ][ 16 ];
ImplCreateDitherMatrix( &pDitherMatrix );
@@ -497,8 +497,8 @@ BOOL Bitmap::ImplMakeMonoDither()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -516,27 +516,27 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
{
DBG_ASSERT( nGreys == 16 || nGreys == 256, "Only 16 or 256 greyscales are supported!" );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- const BitmapPalette& rPal = GetGreyPalette( nGreys );
- ULONG nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
- BOOL bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
+ const BitmapPalette& rPal = GetGreyPalette( nGreys );
+ ULONG nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
+ BOOL bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
if( !bPalDiffers )
bPalDiffers = ( (BitmapPalette&) rPal != pReadAcc->GetPalette() );
if( bPalDiffers )
{
- Bitmap aNewBmp( GetSizePixel(), ( nGreys == 16 ) ? 4 : 8, &rPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), ( nGreys == 16 ) ? 4 : 8, &rPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
@@ -565,7 +565,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
const ULONG nB = *pReadScan++;
const ULONG nG = *pReadScan++;
const ULONG nR = *pReadScan++;
-
+
*pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
@@ -585,7 +585,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
const ULONG nR = *pReadScan++;
const ULONG nG = *pReadScan++;
const ULONG nB = *pReadScan++;
-
+
*pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
@@ -605,8 +605,8 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -630,24 +630,24 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount > GetBitCount(), "New BitCount must be greater!" );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- BitmapPalette aPal;
- Bitmap aNewBmp( GetSizePixel(), nBitCount, pReadAcc->HasPalette() ? &pReadAcc->GetPalette() : &aPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapPalette aPal;
+ Bitmap aNewBmp( GetSizePixel(), nBitCount, pReadAcc->HasPalette() ? &pReadAcc->GetPalette() : &aPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pWriteAcc->HasPalette() )
{
- const USHORT nOldCount = 1 << GetBitCount();
- const BitmapPalette& rOldPal = pReadAcc->GetPalette();
+ const USHORT nOldCount = 1 << GetBitCount();
+ const BitmapPalette& rOldPal = pReadAcc->GetPalette();
aPal.SetEntryCount( 1 << nBitCount );
@@ -687,8 +687,8 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -706,33 +706,33 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount <= GetBitCount(), "New BitCount must be lower ( or equal when pExtColor is set )!" );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- BitmapPalette aPal;
- Bitmap aNewBmp( GetSizePixel(), nBitCount, &aPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapPalette aPal;
+ Bitmap aNewBmp( GetSizePixel(), nBitCount, &aPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const USHORT nCount = 1 << nBitCount;
- const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = pWriteAcc->Height();
- Octree aOctree( *pReadAcc, pExtColor ? ( nCount - 1 ) : nCount );
+ const USHORT nCount = 1 << nBitCount;
+ const long nWidth = pWriteAcc->Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = pWriteAcc->Height();
+ Octree aOctree( *pReadAcc, pExtColor ? ( nCount - 1 ) : nCount );
InverseColorMap aColorMap( aPal = aOctree.GetPalette() );
- BitmapColor aColor;
- ImpErrorQuad aErrQuad;
- ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pQLine1 = pErrQuad1;
- ImpErrorQuad* pQLine2 = 0;
- long nX, nY;
- long nYTmp = 0L;
- BYTE cIndex;
- BOOL bQ1 = TRUE;
+ BitmapColor aColor;
+ ImpErrorQuad aErrQuad;
+ ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pQLine1 = pErrQuad1;
+ ImpErrorQuad* pQLine2 = 0;
+ long nX, nY;
+ long nYTmp = 0L;
+ BYTE cIndex;
+ BOOL bQ1 = TRUE;
if( pExtColor )
{
@@ -813,8 +813,8 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -830,9 +830,9 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
BOOL Bitmap::ImplConvertGhosted()
{
- Bitmap aNewBmp;
- BitmapReadAccess* pR = AcquireReadAccess();
- BOOL bRet = FALSE;
+ Bitmap aNewBmp;
+ BitmapReadAccess* pR = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pR )
{
@@ -873,7 +873,7 @@ BOOL Bitmap::ImplConvertGhosted()
for( long nX = 0; nX < nWidth; nX++ )
{
const BitmapColor aOld( pR->GetPixel( nY, nX ) );
- pW->SetPixel( nY, nX, BitmapColor( ( aOld.GetRed() >> 1 ) | 0x80,
+ pW->SetPixel( nY, nX, BitmapColor( ( aOld.GetRed() >> 1 ) | 0x80,
( aOld.GetGreen() >> 1 ) | 0x80,
( aOld.GetBlue() >> 1 ) | 0x80 ) );
@@ -890,8 +890,8 @@ BOOL Bitmap::ImplConvertGhosted()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -927,8 +927,8 @@ BOOL Bitmap::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFl
BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
{
- const Size aSize( GetSizePixel() );
- BOOL bRet;
+ const Size aSize( GetSizePixel() );
+ BOOL bRet;
if( aSize.Width() && aSize.Height() )
{
@@ -946,27 +946,27 @@ BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
{
- const Size aSizePix( GetSizePixel() );
- const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
- const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
+ const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
+ BOOL bRet = FALSE;
if( nNewWidth && nNewHeight )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( Size( nNewWidth, nNewHeight ), GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( Size( nNewWidth, nNewHeight ), GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pReadAcc && pWriteAcc )
{
- const long nScanlineSize = pWriteAcc->GetScanlineSize();
- const long nNewWidth1 = nNewWidth - 1L;
- const long nNewHeight1 = nNewHeight - 1L;
- const long nWidth1 = pReadAcc->Width() - 1L;
- const long nHeight1 = pReadAcc->Height() - 1L;
- long* pLutX = new long[ nNewWidth ];
- long* pLutY = new long[ nNewHeight ];
- long nX, nY, nMapY, nActY = 0L;
+ const long nScanlineSize = pWriteAcc->GetScanlineSize();
+ const long nNewWidth1 = nNewWidth - 1L;
+ const long nNewHeight1 = nNewHeight - 1L;
+ const long nWidth1 = pReadAcc->Width() - 1L;
+ const long nHeight1 = pReadAcc->Height() - 1L;
+ long* pLutX = new long[ nNewWidth ];
+ long* pLutY = new long[ nNewHeight ];
+ long nX, nY, nMapY, nActY = 0L;
if( nNewWidth1 && nNewHeight1 )
{
@@ -1014,32 +1014,32 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY )
{
- const Size aSizePix( GetSizePixel() );
- const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
- const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
+ const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
+ BOOL bRet = FALSE;
if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) )
{
- BitmapColor aCol0;
- BitmapColor aCol1;
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- long nWidth = pReadAcc->Width();
- long nHeight = pReadAcc->Height();
- Bitmap aNewBmp( Size( nNewWidth, nHeight ), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- long* pLutInt;
- long* pLutFrac;
- long nX, nY;
- long lXB0, lXB1, lXG0, lXG1, lXR0, lXR1;
- double fTemp;
- long nTemp;
+ BitmapColor aCol0;
+ BitmapColor aCol1;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ long nWidth = pReadAcc->Width();
+ long nHeight = pReadAcc->Height();
+ Bitmap aNewBmp( Size( nNewWidth, nHeight ), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ long* pLutInt;
+ long* pLutFrac;
+ long nX, nY;
+ long lXB0, lXB1, lXG0, lXG1, lXR0, lXR1;
+ double fTemp;
+ long nTemp;
if( pReadAcc && pWriteAcc )
{
- const long nNewWidth1 = nNewWidth - 1L;
- const long nWidth1 = pReadAcc->Width() - 1L;
- const double fRevScaleX = (double) nWidth1 / nNewWidth1;
+ const long nNewWidth1 = nNewWidth - 1L;
+ const long nWidth1 = pReadAcc->Width() - 1L;
+ const double fRevScaleX = (double) nWidth1 / nNewWidth1;
pLutInt = new long[ nNewWidth ];
pLutFrac = new long[ nNewWidth ];
@@ -1141,9 +1141,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
if( pReadAcc && pWriteAcc )
{
- const long nNewHeight1 = nNewHeight - 1L;
- const long nHeight1 = pReadAcc->Height() - 1L;
- const double fRevScaleY = (double) nHeight1 / nNewHeight1;
+ const long nNewHeight1 = nNewHeight - 1L;
+ const long nHeight1 = pReadAcc->Height() - 1L;
+ const double fRevScaleY = (double) nHeight1 / nNewHeight1;
pLutInt = new long[ nNewHeight ];
pLutFrac = new long[ nNewHeight ];
@@ -1270,16 +1270,16 @@ BOOL Bitmap::Dither( ULONG nDitherFlags )
BOOL Bitmap::ImplDitherMatrix()
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( GetSizePixel(), 8 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pReadAcc && pWriteAcc )
{
- const ULONG nWidth = pReadAcc->Width();
- const ULONG nHeight = pReadAcc->Height();
- BitmapColor aIndex( (BYTE) 0 );
+ const ULONG nWidth = pReadAcc->Width();
+ const ULONG nHeight = pReadAcc->Height();
+ BitmapColor aIndex( (BYTE) 0 );
if( pReadAcc->HasPalette() )
{
@@ -1287,11 +1287,11 @@ BOOL Bitmap::ImplDitherMatrix()
{
for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
- const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nY, nX ) ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nY, nX ) ) );
+ const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
@@ -1304,11 +1304,11 @@ BOOL Bitmap::ImplDitherMatrix()
{
for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
- const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
+ const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
@@ -1324,8 +1324,8 @@ BOOL Bitmap::ImplDitherMatrix()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -1340,34 +1340,34 @@ BOOL Bitmap::ImplDitherMatrix()
BOOL Bitmap::ImplDitherFloyd()
{
- const Size aSize( GetSizePixel() );
- BOOL bRet = FALSE;
+ const Size aSize( GetSizePixel() );
+ BOOL bRet = FALSE;
if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( GetSizePixel(), 8 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pReadAcc && pWriteAcc )
{
- BitmapColor aColor;
- long nWidth = pReadAcc->Width();
- long nWidth1 = nWidth - 1L;
- long nHeight = pReadAcc->Height();
- long nX;
- long nW = nWidth * 3L;
- long nW2 = nW - 3L;
- long nRErr, nGErr, nBErr;
- long nRC, nGC, nBC;
- long nTemp;
- long nZ;
- long* p1 = new long[ nW ];
- long* p2 = new long[ nW ];
- long* p1T = p1;
- long* p2T = p2;
- long* pTmp;
- BOOL bPal = pReadAcc->HasPalette();
+ BitmapColor aColor;
+ long nWidth = pReadAcc->Width();
+ long nWidth1 = nWidth - 1L;
+ long nHeight = pReadAcc->Height();
+ long nX;
+ long nW = nWidth * 3L;
+ long nW2 = nW - 3L;
+ long nRErr, nGErr, nBErr;
+ long nRC, nGC, nBC;
+ long nTemp;
+ long nZ;
+ long* p1 = new long[ nW ];
+ long* p2 = new long[ nW ];
+ long* p1T = p1;
+ long* p2T = p2;
+ long* pTmp;
+ BOOL bPal = pReadAcc->HasPalette();
pTmp = p2T;
@@ -1464,8 +1464,8 @@ BOOL Bitmap::ImplDitherFloyd()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aPrefSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aPrefSize( maPrefSize );
*this = aNewBmp;
@@ -1481,26 +1481,26 @@ BOOL Bitmap::ImplDitherFloyd()
BOOL Bitmap::ImplDitherFloyd16()
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pReadAcc && pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = pWriteAcc->Height();
- BitmapColor aColor;
- BitmapColor aBestCol;
- ImpErrorQuad aErrQuad;
- ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pQLine1 = pErrQuad1;
- ImpErrorQuad* pQLine2 = 0;
- long nX, nY;
- long nYTmp = 0L;
- BOOL bQ1 = TRUE;
+ const long nWidth = pWriteAcc->Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = pWriteAcc->Height();
+ BitmapColor aColor;
+ BitmapColor aBestCol;
+ ImpErrorQuad aErrQuad;
+ ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pQLine1 = pErrQuad1;
+ ImpErrorQuad* pQLine2 = 0;
+ long nX, nY;
+ long nYTmp = 0L;
+ BOOL bQ1 = TRUE;
for( nY = 0L; nY < Min( nHeight, 2L ); nY++, nYTmp++ )
for( nX = 0L, pQLine2 = !nY ? pErrQuad1 : pErrQuad2; nX < nWidth; nX++ )
@@ -1556,8 +1556,8 @@ BOOL Bitmap::ImplDitherFloyd16()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -1595,11 +1595,11 @@ BOOL Bitmap::ReduceColors( USHORT nColorCount, BmpReduce eReduce )
BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
{
- Bitmap aNewBmp;
- BitmapReadAccess* pRAcc = AcquireReadAccess();
- const USHORT nColCount = Min( nColorCount, (USHORT) 256 );
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ Bitmap aNewBmp;
+ BitmapReadAccess* pRAcc = AcquireReadAccess();
+ const USHORT nColCount = Min( nColorCount, (USHORT) 256 );
+ USHORT nBitCount;
+ BOOL bRet = FALSE;
if( nColCount <= 2 )
nBitCount = 1;
@@ -1610,9 +1610,9 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
if( pRAcc )
{
- Octree aOct( *pRAcc, nColCount );
- const BitmapPalette& rPal = aOct.GetPalette();
- BitmapWriteAccess* pWAcc;
+ Octree aOct( *pRAcc, nColCount );
+ const BitmapPalette& rPal = aOct.GetPalette();
+ BitmapWriteAccess* pWAcc;
aNewBmp = Bitmap( GetSizePixel(), nBitCount, &rPal );
pWAcc = aNewBmp.AcquireWriteAccess();
@@ -1644,8 +1644,8 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
maPrefMapMode = aMap;
@@ -1659,8 +1659,8 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
struct PopularColorCount
{
- sal_uInt32 mnIndex;
- sal_uInt32 mnCount;
+ sal_uInt32 mnIndex;
+ sal_uInt32 mnCount;
};
// ------------------------------------------------------------------------
@@ -1671,11 +1671,11 @@ extern "C" int __LOADONCALLAPI ImplPopularCmpFnc( const void* p1, const void* p2
if( ( (PopularColorCount*) p1 )->mnCount < ( (PopularColorCount*) p2 )->mnCount )
nRet = 1;
- else if( ( (PopularColorCount*) p1 )->mnCount == ( (PopularColorCount*) p2 )->mnCount )
+ else if( ( (PopularColorCount*) p1 )->mnCount == ( (PopularColorCount*) p2 )->mnCount )
nRet = 0;
else
nRet = -1;
-
+
return nRet;
}
@@ -1683,9 +1683,9 @@ extern "C" int __LOADONCALLAPI ImplPopularCmpFnc( const void* p1, const void* p2
BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
- BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ BitmapReadAccess* pRAcc = AcquireReadAccess();
+ USHORT nBitCount;
+ BOOL bRet = FALSE;
if( nColCount > 256 )
nColCount = 256;
@@ -1697,17 +1697,17 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
if( pRAcc )
{
- const sal_uInt32 nValidBits = 4;
- const sal_uInt32 nRightShiftBits = 8 - nValidBits;
- const sal_uInt32 nLeftShiftBits1 = nValidBits;
- const sal_uInt32 nLeftShiftBits2 = nValidBits << 1;
- const sal_uInt32 nColorsPerComponent = 1 << nValidBits;
- const sal_uInt32 nColorOffset = 256 / nColorsPerComponent;
- const sal_uInt32 nTotalColors = nColorsPerComponent * nColorsPerComponent * nColorsPerComponent;
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
- PopularColorCount* pCountTable = new PopularColorCount[ nTotalColors ];
- long nX, nY, nR, nG, nB, nIndex;
+ const sal_uInt32 nValidBits = 4;
+ const sal_uInt32 nRightShiftBits = 8 - nValidBits;
+ const sal_uInt32 nLeftShiftBits1 = nValidBits;
+ const sal_uInt32 nLeftShiftBits2 = nValidBits << 1;
+ const sal_uInt32 nColorsPerComponent = 1 << nValidBits;
+ const sal_uInt32 nColorOffset = 256 / nColorsPerComponent;
+ const sal_uInt32 nTotalColors = nColorsPerComponent * nColorsPerComponent * nColorsPerComponent;
+ const long nWidth = pRAcc->Width();
+ const long nHeight = pRAcc->Height();
+ PopularColorCount* pCountTable = new PopularColorCount[ nTotalColors ];
+ long nX, nY, nR, nG, nB, nIndex;
rtl_zeroMemory( pCountTable, nTotalColors * sizeof( PopularColorCount ) );
@@ -1731,7 +1731,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) );
pCountTable[ ( ( ( (sal_uInt32) rCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
( ( (sal_uInt32) rCol.GetBlue() ) >> nRightShiftBits ) ].mnCount++;
}
}
@@ -1744,8 +1744,8 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
pCountTable[ ( ( ( (sal_uInt32) aCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
- ( ( (sal_uInt32) aCol.GetBlue() ) >> nRightShiftBits ) ].mnCount++;
+ ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( (sal_uInt32) aCol.GetBlue() ) >> nRightShiftBits ) ].mnCount++;
}
}
}
@@ -1753,22 +1753,22 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
BitmapPalette aNewPal( nColCount );
qsort( pCountTable, nTotalColors, sizeof( PopularColorCount ), ImplPopularCmpFnc );
-
+
for( USHORT n = 0; n < nColCount; n++ )
{
const PopularColorCount& rPop = pCountTable[ n ];
- aNewPal[ n ] = BitmapColor( (BYTE) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
+ aNewPal[ n ] = BitmapColor( (BYTE) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
(BYTE) ( ( ( rPop.mnIndex >> nLeftShiftBits1 ) & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ),
(BYTE) ( ( rPop.mnIndex & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ) );
}
- Bitmap aNewBmp( GetSizePixel(), nBitCount, &aNewPal );
- BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), nBitCount, &aNewPal );
+ BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
if( pWAcc )
{
- BitmapColor aDstCol( (BYTE) 0 );
- BYTE* pIndexMap = new BYTE[ nTotalColors ];
+ BitmapColor aDstCol( (BYTE) 0 );
+ BYTE* pIndexMap = new BYTE[ nTotalColors ];
for( nR = 0, nIndex = 0; nR < 256; nR += nColorOffset )
for( nG = 0; nG < 256; nG += nColorOffset )
@@ -1783,7 +1783,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) );
aDstCol.SetIndex( pIndexMap[ ( ( ( (sal_uInt32) rCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
( ( (sal_uInt32) rCol.GetBlue() ) >> nRightShiftBits ) ] );
pWAcc->SetPixel( nY, nX, aDstCol );
}
@@ -1797,7 +1797,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
aDstCol.SetIndex( pIndexMap[ ( ( ( (sal_uInt32) aCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
( ( (sal_uInt32) aCol.GetBlue() ) >> nRightShiftBits ) ] );
pWAcc->SetPixel( nY, nX, aDstCol );
}
@@ -1814,8 +1814,8 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
maPrefMapMode = aMap;
@@ -1830,9 +1830,9 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
{
- BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ BitmapReadAccess* pRAcc = AcquireReadAccess();
+ USHORT nBitCount;
+ BOOL bRet = FALSE;
if( nColCount < 17 )
nBitCount = 4;
@@ -1847,16 +1847,16 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
if( pRAcc )
{
- Bitmap aNewBmp( GetSizePixel(), nBitCount );
- BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), nBitCount );
+ BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
if( pWAcc )
{
- const ULONG nSize = 32768UL * sizeof( ULONG );
- ULONG* pColBuf = (ULONG*) rtl_allocateMemory( nSize );
- const long nWidth = pWAcc->Width();
- const long nHeight = pWAcc->Height();
- long nIndex = 0L;
+ const ULONG nSize = 32768UL * sizeof( ULONG );
+ ULONG* pColBuf = (ULONG*) rtl_allocateMemory( nSize );
+ const long nWidth = pWAcc->Width();
+ const long nHeight = pWAcc->Height();
+ long nIndex = 0L;
memset( (HPBYTE) pColBuf, 0, nSize );
@@ -1886,7 +1886,7 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
// create palette via median cut
BitmapPalette aPal( pWAcc->GetPaletteEntryCount() );
- ImplMedianCut( pColBuf, aPal, 0, 31, 0, 31, 0, 31,
+ ImplMedianCut( pColBuf, aPal, 0, 31, 0, 31, 0, 31,
nColCount, nWidth * nHeight, nIndex );
// do mapping of colors to palette
@@ -1905,8 +1905,8 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
maPrefMapMode = aMap;
@@ -1919,19 +1919,19 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
// ------------------------------------------------------------------------
-void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
+void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
long nColors, long nPixels, long& rIndex )
{
if( !nPixels )
return;
- BitmapColor aCol;
- const long nRLen = nR2 - nR1;
- const long nGLen = nG2 - nG1;
- const long nBLen = nB2 - nB1;
- long nR, nG, nB;
- ULONG* pBuf = pColBuf;
+ BitmapColor aCol;
+ const long nRLen = nR2 - nR1;
+ const long nGLen = nG2 - nG1;
+ const long nBLen = nB2 - nB1;
+ long nR, nG, nB;
+ ULONG* pBuf = pColBuf;
if( !nRLen && !nGLen && !nBLen )
{
@@ -1974,9 +1974,9 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
}
else
{
- const long nTest = ( nPixels >> 1 );
- long nPixOld = 0;
- long nPixNew = 0;
+ const long nTest = ( nPixels >> 1 );
+ long nPixOld = 0;
+ long nPixNew = 0;
if( nBLen > nGLen && nBLen > nRLen )
{
@@ -2074,7 +2074,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
BOOL bRet = FALSE;
// nothing to do => return quickly
- if( !nLuminancePercent && !nContrastPercent &&
+ if( !nLuminancePercent && !nContrastPercent &&
!nChannelRPercent && !nChannelGPercent && !nChannelBPercent &&
( fGamma == 1.0 ) && !bInvert )
{
@@ -2086,15 +2086,15 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
if( pAcc )
{
- BitmapColor aCol;
- const long nW = pAcc->Width();
- const long nH = pAcc->Height();
- BYTE* cMapR = new BYTE[ 256 ];
- BYTE* cMapG = new BYTE[ 256 ];
- BYTE* cMapB = new BYTE[ 256 ];
- long nX, nY;
- double fM, fROff, fGOff, fBOff, fOff;
-
+ BitmapColor aCol;
+ const long nW = pAcc->Width();
+ const long nH = pAcc->Height();
+ BYTE* cMapR = new BYTE[ 256 ];
+ BYTE* cMapG = new BYTE[ 256 ];
+ BYTE* cMapB = new BYTE[ 256 ];
+ long nX, nY;
+ double fM, fROff, fGOff, fBOff, fOff;
+
// calculate slope
if( nContrastPercent >= 0 )
fM = 128.0 / ( 128.0 - 1.27 * MinMax( nContrastPercent, 0L, 100L ) );
@@ -2142,7 +2142,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
for( USHORT i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
{
- const BitmapColor& rCol = pAcc->GetPaletteColor( i );
+ const BitmapColor& rCol = pAcc->GetPaletteColor( i );
aNewCol.SetRed( cMapR[ rCol.GetRed() ] );
aNewCol.SetGreen( cMapG[ rCol.GetGreen() ] );
aNewCol.SetBlue( cMapB[ rCol.GetBlue() ] );
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index 1f18b9375ea9..ab8bf914bf46 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +37,13 @@
// - Defines -
// -----------
-#define S2(a,b) { register long t; if( ( t = b - a ) < 0 ) { a += t; b -= t; } }
-#define MN3(a,b,c) S2(a,b); S2(a,c);
-#define MX3(a,b,c) S2(b,c); S2(a,c);
-#define MNMX3(a,b,c) MX3(a,b,c); S2(a,b);
-#define MNMX4(a,b,c,d) S2(a,b); S2(c,d); S2(a,c); S2(b,d);
-#define MNMX5(a,b,c,d,e) S2(a,b); S2(c,d); MN3(a,c,e); MX3(b,d,e);
-#define MNMX6(a,b,c,d,e,f) S2(a,d); S2(b,e); S2(c,f); MN3(a,b,c); MX3(d,e,f);
+#define S2(a,b) { register long t; if( ( t = b - a ) < 0 ) { a += t; b -= t; } }
+#define MN3(a,b,c) S2(a,b); S2(a,c);
+#define MX3(a,b,c) S2(b,c); S2(a,c);
+#define MNMX3(a,b,c) MX3(a,b,c); S2(a,b);
+#define MNMX4(a,b,c,d) S2(a,b); S2(c,d); S2(a,c); S2(b,d);
+#define MNMX5(a,b,c,d,e) S2(a,b); S2(c,d); MN3(a,c,e); MX3(b,d,e);
+#define MNMX6(a,b,c,d,e,f) S2(a,d); S2(b,e); S2(c,f); MN3(a,b,c); MX3(d,e,f);
// ----------
// - Bitmap -
@@ -110,30 +110,30 @@ BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, cons
BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
- const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
- long* pColm = new long[ nWidth2 ];
- long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pRowTmp1 = pColRow1;
- BitmapColor* pRowTmp2 = pColRow2;
- BitmapColor* pRowTmp3 = pColRow3;
- BitmapColor* pColor;
- long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
- long (*pKoeff)[ 256 ] = new long[ 9 ][ 256 ];
- long* pTmp;
+ const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
+ const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
+ long* pColm = new long[ nWidth2 ];
+ long* pRows = new long[ nHeight2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pRowTmp1 = pColRow1;
+ BitmapColor* pRowTmp2 = pColRow2;
+ BitmapColor* pRowTmp3 = pColRow3;
+ BitmapColor* pColor;
+ long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
+ long (*pKoeff)[ 256 ] = new long[ 9 ][ 256 ];
+ long* pTmp;
// create LUT of products of matrix value and possible color component values
for( nY = 0; nY < 9; nY++ )
@@ -143,13 +143,13 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
// create column LUT
for( i = 0; i < nWidth2; i++ )
pColm[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pColm[ nWidth + 1 ] = pColm[ nWidth ];
// create row LUT
for( i = 0; i < nHeight2; i++ )
pRows[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pRows[ nHeight + 1 ] = pRows[ nHeight ];
// read first three rows of bitmap color
@@ -240,8 +240,8 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -257,42 +257,42 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
- const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
- long* pColm = new long[ nWidth2 ];
- long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pRowTmp1 = pColRow1;
- BitmapColor* pRowTmp2 = pColRow2;
- BitmapColor* pRowTmp3 = pColRow3;
- BitmapColor* pColor;
- long nY, nX, i;
- long nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
- long nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
- long nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
+ const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
+ const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
+ long* pColm = new long[ nWidth2 ];
+ long* pRows = new long[ nHeight2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pRowTmp1 = pColRow1;
+ BitmapColor* pRowTmp2 = pColRow2;
+ BitmapColor* pRowTmp3 = pColRow3;
+ BitmapColor* pColor;
+ long nY, nX, i;
+ long nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
+ long nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
+ long nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
// create column LUT
for( i = 0; i < nWidth2; i++ )
pColm[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pColm[ nWidth + 1 ] = pColm[ nWidth ];
// create row LUT
for( i = 0; i < nHeight2; i++ )
pRows[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pRows[ nHeight + 1 ] = pRows[ nHeight ];
// read first three rows of bitmap color
@@ -314,7 +314,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
nR1 = ( pColor = pRowTmp1 + nX )->GetRed(), nG1 = pColor->GetGreen(), nB1 = pColor->GetBlue();
nR2 = ( ++pColor )->GetRed(), nG2 = pColor->GetGreen(), nB2 = pColor->GetBlue();
nR3 = ( ++pColor )->GetRed(), nG3 = pColor->GetGreen(), nB3 = pColor->GetBlue();
-
+
nR4 = ( pColor = pRowTmp2 + nX )->GetRed(), nG4 = pColor->GetGreen(), nB4 = pColor->GetBlue();
nR5 = ( ++pColor )->GetRed(), nG5 = pColor->GetGreen(), nB5 = pColor->GetBlue();
nR6 = ( ++pColor )->GetRed(), nG6 = pColor->GetGreen(), nB6 = pColor->GetBlue();
@@ -322,7 +322,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
nR7 = ( pColor = pRowTmp3 + nX )->GetRed(), nG7 = pColor->GetGreen(), nB7 = pColor->GetBlue();
nR8 = ( ++pColor )->GetRed(), nG8 = pColor->GetGreen(), nB8 = pColor->GetBlue();
nR9 = ( ++pColor )->GetRed(), nG9 = pColor->GetGreen(), nB9 = pColor->GetBlue();
-
+
MNMX6( nR1, nR2, nR3, nR4, nR5, nR6 );
MNMX5( nR7, nR2, nR3, nR4, nR5 );
MNMX4( nR8, nR2, nR3, nR4 );
@@ -337,7 +337,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
MNMX5( nB7, nB2, nB3, nB4, nB5 );
MNMX4( nB8, nB2, nB3, nB4 );
MNMX3( nB9, nB2, nB3 );
-
+
// set destination color
pWriteAcc->SetPixel( nY, nX, BitmapColor( (BYTE) nR2, (BYTE) nG2, (BYTE) nB2 ) );
}
@@ -371,8 +371,8 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -395,29 +395,29 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
bRet = FALSE;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
-
+
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
- const long nMask211 = -2, nMask221 = 0, nMask231 = 2;
- const long nMask311 = -1, nMask321 = 0, nMask331 = 1;
- const long nMask112 = 1, nMask122 = 2, nMask132 = 1;
- const long nMask212 = 0, nMask222 = 0, nMask232 = 0;
- const long nMask312 = -1, nMask322 = -2, nMask332 = -1;
- long nGrey11, nGrey12, nGrey13;
- long nGrey21, nGrey22, nGrey23;
- long nGrey31, nGrey32, nGrey33;
- long* pHMap = new long[ nWidth + 2 ];
- long* pVMap = new long[ nHeight + 2 ];
- long nX, nY, nSum1, nSum2;
+ BitmapColor aGrey( (BYTE) 0 );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
+ const long nMask211 = -2, nMask221 = 0, nMask231 = 2;
+ const long nMask311 = -1, nMask321 = 0, nMask331 = 1;
+ const long nMask112 = 1, nMask122 = 2, nMask132 = 1;
+ const long nMask212 = 0, nMask222 = 0, nMask232 = 0;
+ const long nMask312 = -1, nMask322 = -2, nMask332 = -1;
+ long nGrey11, nGrey12, nGrey13;
+ long nGrey21, nGrey22, nGrey23;
+ long nGrey31, nGrey32, nGrey33;
+ long* pHMap = new long[ nWidth + 2 ];
+ long* pVMap = new long[ nHeight + 2 ];
+ long nX, nY, nSum1, nSum2;
// fill mapping tables
pHMap[ 0 ] = 0;
@@ -498,8 +498,8 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -523,33 +523,33 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
bRet = FALSE;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
-
+
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- long nGrey11, nGrey12, nGrey13;
- long nGrey21, nGrey22, nGrey23;
- long nGrey31, nGrey32, nGrey33;
- double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ BitmapColor aGrey( (BYTE) 0 );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ long nGrey11, nGrey12, nGrey13;
+ long nGrey21, nGrey22, nGrey23;
+ long nGrey31, nGrey32, nGrey33;
+ double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
( pFilterParam->maEmbossAngles.mnAzimuthAngle100 * 0.01 ) : 0.0 ) * F_PI180;
- double fElev = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ double fElev = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
( pFilterParam->maEmbossAngles.mnElevationAngle100 * 0.01 ) : 90.0 ) * F_PI180;
- long* pHMap = new long[ nWidth + 2 ];
- long* pVMap = new long[ nHeight + 2 ];
- long nX, nY, nNx, nNy, nDotL;
- const long nLx = FRound( cos( fAzim ) * cos( fElev ) * 255.0 );
- const long nLy = FRound( sin( fAzim ) * cos( fElev ) * 255.0 );
- const long nLz = FRound( sin( fElev ) * 255.0 );
- const long nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
- const long nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
- const BYTE cLz = (BYTE) SAL_BOUND( nLz, 0, 255 );
+ long* pHMap = new long[ nWidth + 2 ];
+ long* pVMap = new long[ nHeight + 2 ];
+ long nX, nY, nNx, nNy, nDotL;
+ const long nLx = FRound( cos( fAzim ) * cos( fElev ) * 255.0 );
+ const long nLy = FRound( sin( fAzim ) * cos( fElev ) * 255.0 );
+ const long nLz = FRound( sin( fElev ) * 255.0 );
+ const long nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
+ const long nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
+ const BYTE cLz = (BYTE) SAL_BOUND( nLz, 0, 255 );
// fill mapping tables
pHMap[ 0 ] = 0;
@@ -588,7 +588,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
const double fGrey = nDotL / sqrt( (double)(nNx * nNx + nNy * nNy + nZ2) );
aGrey.SetIndex( (BYTE) SAL_BOUND( fGrey, 0, 255 ) );
}
-
+
pWriteAcc->SetPixel( nY, nX, aGrey );
if( nX < ( nWidth - 1 ) )
@@ -612,8 +612,8 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -630,12 +630,12 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BOOL bRet = FALSE;
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
-
+ BOOL bRet = FALSE;
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+
if( pWriteAcc )
{
- const BYTE cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
+ const BYTE cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
pFilterParam->mcSolarGreyThreshold : 128;
if( pWriteAcc->HasPalette() )
@@ -653,16 +653,16 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
}
else
{
- BitmapColor aCol;
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ BitmapColor aCol;
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
for( long nY = 0; nY < nHeight ; nY++ )
{
for( long nX = 0; nX < nWidth; nX++ )
{
aCol = pWriteAcc->GetPixel( nY, nX );
-
+
if( aCol.GetLuminance() >= cThreshold )
pWriteAcc->SetPixel( nY, nX, aCol.Invert() );
}
@@ -680,43 +680,43 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
-
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
+
if( pReadAcc )
{
- long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SEPIA ) ?
+ long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SEPIA ) ?
pFilterParam->mcSolarGreyThreshold : 10;
- const long nSepia = 10000 - 100 * SAL_BOUND( nSepiaPercent, 0, 100 );
- BitmapPalette aSepiaPal( 256 );
+ const long nSepia = 10000 - 100 * SAL_BOUND( nSepiaPercent, 0, 100 );
+ BitmapPalette aSepiaPal( 256 );
DBG_ASSERT( nSepiaPercent <= 100, "Bitmap::ImplSepia(): sepia value out of range; defaulting to 100%" );
for( USHORT i = 0; i < 256; i++ )
{
- BitmapColor& rCol = aSepiaPal[ i ];
- const BYTE cSepiaValue = (BYTE) ( ( nSepia * i ) / 10000 );
+ BitmapColor& rCol = aSepiaPal[ i ];
+ const BYTE cSepiaValue = (BYTE) ( ( nSepia * i ) / 10000 );
rCol.SetRed( (BYTE) i );
rCol.SetGreen( cSepiaValue );
rCol.SetBlue( cSepiaValue );
}
- Bitmap aNewBmp( GetSizePixel(), 8, &aSepiaPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8, &aSepiaPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- BitmapColor aCol( (BYTE) 0 );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ BitmapColor aCol( (BYTE) 0 );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
for( long nY = 0; nY < nHeight ; nY++ )
{
- const USHORT nPalCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pIndexMap = new BYTE[ nPalCount ];
+ const USHORT nPalCount = pReadAcc->GetPaletteEntryCount();
+ BYTE* pIndexMap = new BYTE[ nPalCount ];
for( USHORT i = 0; i < nPalCount; i++ )
pIndexMap[ i ] = pReadAcc->GetPaletteColor( i ).GetLuminance();
@@ -750,8 +750,8 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -767,11 +767,11 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- ULONG nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ ULONG nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileHeight : 4;
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( !nTileWidth )
nTileWidth = 1;
@@ -781,9 +781,9 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( nTileWidth > 1 || nTileHeight > 1 )
{
- Bitmap* pNewBmp;
- BitmapReadAccess* pReadAcc;
- BitmapWriteAccess* pWriteAcc;
+ Bitmap* pNewBmp;
+ BitmapReadAccess* pReadAcc;
+ BitmapWriteAccess* pWriteAcc;
if( GetBitCount() > 8 )
{
@@ -796,14 +796,14 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
pReadAcc = AcquireReadAccess();
pWriteAcc = pNewBmp->AcquireWriteAccess();
}
-
+
if( pReadAcc && pWriteAcc )
{
- BitmapColor aCol;
- long nWidth = pReadAcc->Width();
- long nHeight = pReadAcc->Height();
- long nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
- double fArea_1;
+ BitmapColor aCol;
+ long nWidth = pReadAcc->Width();
+ long nHeight = pReadAcc->Height();
+ long nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
+ double fArea_1;
nY1 = 0; nY2 = nTileHeight - 1;
@@ -816,7 +816,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( nX2 >= nWidth )
nX2 = nWidth - 1;
-
+
fArea_1 = 1.0 / ( ( nX2 - nX1 + 1 ) * ( nY2 - nY1 + 1 ) );
if( !pNewBmp )
@@ -904,8 +904,8 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = *pNewBmp;
@@ -918,7 +918,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
else
bRet = TRUE;
-
+
return bRet;
}
@@ -926,8 +926,8 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
struct PopArtEntry
{
- sal_uInt32 mnIndex;
- sal_uInt32 mnCount;
+ sal_uInt32 mnIndex;
+ sal_uInt32 mnCount;
};
// ------------------------------------------------------------------------
@@ -938,11 +938,11 @@ extern "C" int __LOADONCALLAPI ImplPopArtCmpFnc( const void* p1, const void* p2
if( ( (PopArtEntry*) p1 )->mnCount < ( (PopArtEntry*) p2 )->mnCount )
nRet = 1;
- else if( ( (PopArtEntry*) p1 )->mnCount == ( (PopArtEntry*) p2 )->mnCount )
+ else if( ( (PopArtEntry*) p1 )->mnCount == ( (PopArtEntry*) p2 )->mnCount )
nRet = 0;
else
nRet = -1;
-
+
return nRet;
}
@@ -960,11 +960,11 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- const ULONG nEntryCount = 1 << pWriteAcc->GetBitCount();
- ULONG n;
- PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ const ULONG nEntryCount = 1 << pWriteAcc->GetBitCount();
+ ULONG n;
+ PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
for( n = 0; n < nEntryCount; n++ )
{
@@ -980,7 +980,7 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
// sort table
qsort( pPopArtTable, nEntryCount, sizeof( PopArtEntry ), ImplPopArtCmpFnc );
-
+
// get last used entry
ULONG nFirstEntry;
ULONG nLastEntry = 0;
@@ -993,7 +993,7 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
const BitmapColor aFirstCol( pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ 0 ].mnIndex) ) );
for( nFirstEntry = 0; nFirstEntry < nLastEntry; nFirstEntry++ )
{
- pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry ].mnIndex),
+ pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry ].mnIndex),
pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry + 1 ].mnIndex) ) );
}
pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nLastEntry ].mnIndex), aFirstCol );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 12cb2958b43c..43589e3813f7 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,25 +50,25 @@
BitmapEx::BitmapEx() :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
}
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) :
- aBitmap ( rBitmapEx.aBitmap ),
- aMask ( rBitmapEx.aMask ),
- aBitmapSize ( rBitmapEx.aBitmapSize ),
- aTransparentColor ( rBitmapEx.aTransparentColor ),
- eTransparent ( rBitmapEx.eTransparent ),
- bAlpha ( rBitmapEx.bAlpha )
+ aBitmap ( rBitmapEx.aBitmap ),
+ aMask ( rBitmapEx.aMask ),
+ aBitmapSize ( rBitmapEx.aBitmapSize ),
+ aTransparentColor ( rBitmapEx.aTransparentColor ),
+ eTransparent ( rBitmapEx.eTransparent ),
+ bAlpha ( rBitmapEx.bAlpha )
{
}
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
if( rBitmapEx.IsEmpty() )
return;
@@ -82,7 +82,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
}
else if( rBitmapEx.IsTransparent() )
aMask = Bitmap( aSize, rBitmapEx.aMask.GetBitCount() );
-
+
Rectangle aDestRect( Point( 0, 0 ), aSize );
Rectangle aSrcRect( aSrc, aSize );
CopyPixel( aDestRect, aSrcRect, &rBitmapEx );
@@ -92,21 +92,21 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
BitmapEx::BitmapEx( const ResId& rResId ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
- static ImplImageTreeSingletonRef aImageTree;
- ResMgr* pResMgr = NULL;
+ static ImplImageTreeSingletonRef aImageTree;
+ ResMgr* pResMgr = NULL;
ResMgr::GetResourceSkipHeader( rResId.SetRT( RSC_BITMAP ), &pResMgr );
pResMgr->ReadLong();
pResMgr->ReadLong();
-
+
const String aFileName( pResMgr->ReadString() );
::rtl::OUString aCurrentSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyleName();
-
+
if( !aImageTree->loadImage( aFileName, aCurrentSymbolsStyle, *this ) )
{
-#ifdef DBG_UTIL
+#ifdef DBG_UTIL
ByteString aErrorStr( "BitmapEx::BitmapEx( const ResId& rResId ): could not load image <" );
DBG_ERROR( ( ( aErrorStr += ByteString( aFileName, RTL_TEXTENCODING_ASCII_US ) ) += '>' ).GetBuffer() );
#endif
@@ -116,21 +116,21 @@ BitmapEx::BitmapEx( const ResId& rResId ) :
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp ) :
- aBitmap ( rBmp ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
+ aBitmap ( rBmp ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
}
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
- aBitmap ( rBmp ),
- aMask ( rMask ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
- eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ aBitmap ( rBmp ),
+ aMask ( rMask ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
+ eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
+ bAlpha ( FALSE )
{
DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
@@ -146,18 +146,18 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
- aBitmap ( rBmp ),
- aMask ( rAlphaMask.ImplGetBitmap() ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
- eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( !rAlphaMask ? FALSE : TRUE )
+ aBitmap ( rBmp ),
+ aMask ( rAlphaMask.ImplGetBitmap() ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
+ eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
+ bAlpha ( !rAlphaMask ? FALSE : TRUE )
{
DBG_ASSERT( !rAlphaMask || rBmp.GetSizePixel() == rAlphaMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
// #i75531# the workaround below can go when
// X11SalGraphics::drawAlphaBitmap()'s render acceleration
- // can handle the bitmap depth mismatch directly
+ // can handle the bitmap depth mismatch directly
if( aBitmap.GetBitCount() < aMask.GetBitCount() )
aBitmap.Convert( BMP_CONVERSION_24BIT );
}
@@ -165,11 +165,11 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) :
- aBitmap ( rBmp ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
- aTransparentColor ( rTransparentColor ),
- eTransparent ( TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ aBitmap ( rBmp ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
+ aTransparentColor ( rTransparentColor ),
+ eTransparent ( TRANSPARENT_BITMAP ),
+ bAlpha ( FALSE )
{
aMask = aBitmap.CreateMask( aTransparentColor );
@@ -301,7 +301,7 @@ Bitmap BitmapEx::GetBitmap( const Color* pTransReplaceColor ) const
BitmapEx BitmapEx::GetColorTransformedBitmapEx( BmpColorMode eColorMode ) const
{
BitmapEx aRet;
-
+
if( BMP_COLOR_HIGHCONTRAST == eColorMode )
{
aRet = *this;
@@ -312,7 +312,7 @@ BitmapEx BitmapEx::GetColorTransformedBitmapEx( BmpColorMode eColorMode ) const
{
aRet = *this;
aRet.aBitmap = aRet.aBitmap.GetColorTransformedBitmap( eColorMode );
-
+
if( !aRet.aMask.IsEmpty() )
{
aRet.aMask.CombineSimple( aRet.aBitmap, BMP_COMBINE_OR );
@@ -368,8 +368,8 @@ ULONG BitmapEx::GetSizeBytes() const
ULONG BitmapEx::GetChecksum() const
{
- sal_uInt32 nCrc = aBitmap.GetChecksum();
- SVBT32 aBT32;
+ sal_uInt32 nCrc = aBitmap.GetChecksum();
+ SVBT32 aBT32;
UInt32ToSVBT32( (long) eTransparent, aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
@@ -615,8 +615,8 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
}
else
{
- sal_uInt8 cBlack = 0;
- AlphaMask* pAlpha = new AlphaMask( GetSizePixel(), &cBlack );
+ sal_uInt8 cBlack = 0;
+ AlphaMask* pAlpha = new AlphaMask( GetSizePixel(), &cBlack );
aMask = pAlpha->ImplGetBitmap();
delete pAlpha;
@@ -644,7 +644,7 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
}
else if( IsAlpha() )
{
- sal_uInt8 cBlack = 0;
+ sal_uInt8 cBlack = 0;
const AlphaMask aAlphaSrc( pBmpExSrc->GetSizePixel(), &cBlack );
aMask.CopyPixel( rRectDst, rRectSrc, &aAlphaSrc.ImplGetBitmap() );
@@ -911,8 +911,8 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
if( !rIStm.GetError() )
{
const ULONG nStmPos = rIStm.Tell();
- UINT32 nMagic1 = 0;
- UINT32 nMagic2 = 0;
+ UINT32 nMagic1 = 0;
+ UINT32 nMagic2 = 0;
rIStm >> nMagic1 >> nMagic2;
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 51b27501ddc6..1d742672853f 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// --------------------
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ) :
- mpBuffer ( NULL ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL ),
- mbModify ( bModify )
+ mpBuffer ( NULL ),
+ mpScanBuf ( NULL ),
+ mFncGetPixel ( NULL ),
+ mFncSetPixel ( NULL ),
+ mbModify ( bModify )
{
ImplCreate( rBitmap );
}
@@ -51,11 +51,11 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ) :
// ------------------------------------------------------------------
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
- mpBuffer ( NULL ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL ),
- mbModify ( FALSE )
+ mpBuffer ( NULL ),
+ mpScanBuf ( NULL ),
+ mFncGetPixel ( NULL ),
+ mFncSetPixel ( NULL ),
+ mbModify ( FALSE )
{
ImplCreate( rBitmap );
}
@@ -106,8 +106,8 @@ void BitmapReadAccess::ImplCreate( Bitmap& rBitmap )
if( mpBuffer )
{
- const long nHeight = mpBuffer->mnHeight;
- Scanline pTmpLine = mpBuffer->mpBits;
+ const long nHeight = mpBuffer->mnHeight;
+ Scanline pTmpLine = mpBuffer->mpBits;
mpScanBuf = new Scanline[ nHeight ];
maColorMask = mpBuffer->maColorMask;
@@ -266,13 +266,13 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
if( nLeftOverBits != 0 ) // else there is really nothing to do
{
const sal_uInt32 nBytes = (nLeftOverBits + 7U) >> 3U;
- sal_uInt8 nMask;
-
+ sal_uInt8 nMask;
+
if( bMsb )
nMask = static_cast<sal_uInt8>(0xffU << (nLeftOverBits & 3UL));
else
nMask = static_cast<sal_uInt8>(0xffU >> (nLeftOverBits & 3UL));
-
+
BYTE* pLastBytes = (BYTE*)GetBuffer() + ( nScanSize - nBytes );
for( sal_uInt32 i = 0; i < nHeight; i++, pLastBytes += nScanSize )
{
@@ -284,8 +284,8 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
}
else if( nBits & 0x1f )
{
- sal_uInt32 nMask = 0xffffffff << ( ( nScanSize << 3 ) - nBits );
- BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 );
+ sal_uInt32 nMask = 0xffffffff << ( ( nScanSize << 3 ) - nBits );
+ BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 );
#ifdef OSL_LITENDIAN
nMask = SWAPLONG( nMask );
@@ -394,22 +394,22 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
switch( nFormat )
{
- case( BMP_FORMAT_1BIT_MSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_MSB_PAL; break;
- case( BMP_FORMAT_1BIT_LSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_LSB_PAL; break;
- case( BMP_FORMAT_4BIT_MSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_MSN_PAL; break;
- case( BMP_FORMAT_4BIT_LSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_LSN_PAL; break;
- case( BMP_FORMAT_8BIT_PAL ): pFncGetPixel = GetPixelFor_8BIT_PAL; break;
- case( BMP_FORMAT_8BIT_TC_MASK ): pFncGetPixel = GetPixelFor_8BIT_TC_MASK; break;
- case( BMP_FORMAT_16BIT_TC_MSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_MSB_MASK; break;
- case( BMP_FORMAT_16BIT_TC_LSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_LSB_MASK; break;
- case( BMP_FORMAT_24BIT_TC_BGR ): pFncGetPixel = GetPixelFor_24BIT_TC_BGR; break;
- case( BMP_FORMAT_24BIT_TC_RGB ): pFncGetPixel = GetPixelFor_24BIT_TC_RGB; break;
- case( BMP_FORMAT_24BIT_TC_MASK ): pFncGetPixel = GetPixelFor_24BIT_TC_MASK; break;
- case( BMP_FORMAT_32BIT_TC_ABGR ): pFncGetPixel = GetPixelFor_32BIT_TC_ABGR; break;
- case( BMP_FORMAT_32BIT_TC_ARGB ): pFncGetPixel = GetPixelFor_32BIT_TC_ARGB; break;
- case( BMP_FORMAT_32BIT_TC_BGRA ): pFncGetPixel = GetPixelFor_32BIT_TC_BGRA; break;
- case( BMP_FORMAT_32BIT_TC_RGBA ): pFncGetPixel = GetPixelFor_32BIT_TC_RGBA; break;
- case( BMP_FORMAT_32BIT_TC_MASK ): pFncGetPixel = GetPixelFor_32BIT_TC_MASK; break;
+ case( BMP_FORMAT_1BIT_MSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_MSB_PAL; break;
+ case( BMP_FORMAT_1BIT_LSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_LSB_PAL; break;
+ case( BMP_FORMAT_4BIT_MSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_MSN_PAL; break;
+ case( BMP_FORMAT_4BIT_LSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_LSN_PAL; break;
+ case( BMP_FORMAT_8BIT_PAL ): pFncGetPixel = GetPixelFor_8BIT_PAL; break;
+ case( BMP_FORMAT_8BIT_TC_MASK ): pFncGetPixel = GetPixelFor_8BIT_TC_MASK; break;
+ case( BMP_FORMAT_16BIT_TC_MSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_MSB_MASK; break;
+ case( BMP_FORMAT_16BIT_TC_LSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_LSB_MASK; break;
+ case( BMP_FORMAT_24BIT_TC_BGR ): pFncGetPixel = GetPixelFor_24BIT_TC_BGR; break;
+ case( BMP_FORMAT_24BIT_TC_RGB ): pFncGetPixel = GetPixelFor_24BIT_TC_RGB; break;
+ case( BMP_FORMAT_24BIT_TC_MASK ): pFncGetPixel = GetPixelFor_24BIT_TC_MASK; break;
+ case( BMP_FORMAT_32BIT_TC_ABGR ): pFncGetPixel = GetPixelFor_32BIT_TC_ABGR; break;
+ case( BMP_FORMAT_32BIT_TC_ARGB ): pFncGetPixel = GetPixelFor_32BIT_TC_ARGB; break;
+ case( BMP_FORMAT_32BIT_TC_BGRA ): pFncGetPixel = GetPixelFor_32BIT_TC_BGRA; break;
+ case( BMP_FORMAT_32BIT_TC_RGBA ): pFncGetPixel = GetPixelFor_32BIT_TC_RGBA; break;
+ case( BMP_FORMAT_32BIT_TC_MASK ): pFncGetPixel = GetPixelFor_32BIT_TC_MASK; break;
default:
pFncGetPixel = NULL;
@@ -437,7 +437,7 @@ void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
if( ( GetScanlineFormat() == rReadAcc.GetScanlineFormat() ) &&
( GetScanlineSize() == rReadAcc.GetScanlineSize() ) )
{
- const long nHeight = Min( mpBuffer->mnHeight, rReadAcc.Height() );
+ const long nHeight = Min( mpBuffer->mnHeight, rReadAcc.Height() );
const ULONG nCount = nHeight * mpBuffer->mnScanlineSize;
memcpy( mpBuffer->mpBits, rReadAcc.GetBuffer(), nCount );
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 6cff281556ab..34f56c34e6f5 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,7 +80,7 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_MSN_PAL )
{
BYTE& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
+ ( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
}
@@ -97,7 +97,7 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_LSN_PAL )
{
BYTE& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
+ ( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
}
@@ -111,7 +111,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _8BIT_PAL )
// ------------------------------------------------------------------
IMPL_FORMAT_SETPIXEL_NOMASK( _8BIT_PAL )
-{
+{
pScanline[ nX ] = rBitmapColor.GetIndex();
}
@@ -285,7 +285,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_BGRA )
// ------------------------------------------------------------------
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_BGRA )
-{
+{
*( pScanline = pScanline + ( nX << 2 ) )++ = rBitmapColor.GetBlue();
*pScanline++ = rBitmapColor.GetGreen();
*pScanline++ = rBitmapColor.GetRed();
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 55f4a8b412a6..50fdcfac9ece 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ void BitmapWriteAccess::SetLineColor()
void BitmapWriteAccess::SetLineColor( const Color& rColor )
{
delete mpLineColor;
-
+
if( rColor.GetTransparency() == 255 )
mpLineColor = NULL;
else
@@ -62,12 +62,12 @@ void BitmapWriteAccess::SetLineColor( const Color& rColor )
Color BitmapWriteAccess::GetLineColor() const
{
Color aRet;
-
+
if( mpLineColor )
aRet = (const Color&) *mpLineColor;
else
aRet.SetTransparency( 255 );
-
+
return aRet;
}
@@ -84,7 +84,7 @@ void BitmapWriteAccess::SetFillColor()
void BitmapWriteAccess::SetFillColor( const Color& rColor )
{
delete mpFillColor;
-
+
if( rColor.GetTransparency() == 255 )
mpFillColor = NULL;
else
@@ -96,7 +96,7 @@ void BitmapWriteAccess::SetFillColor( const Color& rColor )
Color BitmapWriteAccess::GetFillColor() const
{
Color aRet;
-
+
if( mpFillColor )
aRet = (const Color&) *mpFillColor;
else
@@ -119,9 +119,9 @@ void BitmapWriteAccess::Erase( const Color& rColor )
return;
// use the canonical method to clear the bitmap
- BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor( *mpFillColor ) : NULL;
- const Point aPoint;
- const Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
+ BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor( *mpFillColor ) : NULL;
+ const Point aPoint;
+ const Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
SetFillColor( rColor );
FillRect( aRect );
@@ -135,17 +135,17 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
{
if( mpLineColor )
{
- const BitmapColor& rLineColor = *mpLineColor;
- long nX, nY;
-
+ const BitmapColor& rLineColor = *mpLineColor;
+ long nX, nY;
+
if ( rStart.X() == rEnd.X() )
{
// vertikale Line
const long nEndY = rEnd.Y();
-
+
nX = rStart.X();
nY = rStart.Y();
-
+
if ( nEndY > nY )
{
for (; nY <= nEndY; nY++ )
@@ -161,10 +161,10 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
{
// horizontale Line
const long nEndX = rEnd.X();
-
+
nX = rStart.X();
nY = rStart.Y();
-
+
if ( nEndX > nX )
{
for (; nX <= nEndX; nX++ )
@@ -178,13 +178,13 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
else
{
- const long nDX = labs( rEnd.X() - rStart.X() );
- const long nDY = labs( rEnd.Y() - rStart.Y() );
- long nX1;
- long nY1;
- long nX2;
- long nY2;
-
+ const long nDX = labs( rEnd.X() - rStart.X() );
+ const long nDY = labs( rEnd.Y() - rStart.Y() );
+ long nX1;
+ long nY1;
+ long nX2;
+ long nY2;
+
if ( nDX >= nDY )
{
if ( rStart.X() < rEnd.X() )
@@ -201,22 +201,22 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nX2 = rStart.X();
nY2 = rStart.Y();
}
-
- const long nDYX = ( nDY - nDX ) << 1;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
- BOOL bPos = nY1 < nY2;
-
+
+ const long nDYX = ( nDY - nDX ) << 1;
+ const long nDY2 = nDY << 1;
+ long nD = nDY2 - nDX;
+ BOOL bPos = nY1 < nY2;
+
for ( nX = nX1, nY = nY1; nX <= nX2; nX++ )
{
SetPixel( nY, nX, rLineColor );
-
+
if ( nD < 0 )
nD += nDY2;
else
{
nD += nDYX;
-
+
if ( bPos )
nY++;
else
@@ -240,22 +240,22 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nX2 = rStart.X();
nY2 = rStart.Y();
}
-
- const long nDYX = ( nDX - nDY ) << 1;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
- BOOL bPos = nX1 < nX2;
-
+
+ const long nDYX = ( nDX - nDY ) << 1;
+ const long nDY2 = nDX << 1;
+ long nD = nDY2 - nDY;
+ BOOL bPos = nX1 < nX2;
+
for ( nX = nX1, nY = nY1; nY <= nY2; nY++ )
{
SetPixel( nY, nX, rLineColor );
-
+
if ( nD < 0 )
nD += nDY2;
else
{
nD += nDYX;
-
+
if ( bPos )
nX++;
else
@@ -273,19 +273,19 @@ void BitmapWriteAccess::FillRect( const Rectangle& rRect )
{
if( mpFillColor )
{
- const BitmapColor& rFillColor = *mpFillColor;
- Point aPoint;
- Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
+ const BitmapColor& rFillColor = *mpFillColor;
+ Point aPoint;
+ Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
aRect.Intersection( rRect );
if( !aRect.IsEmpty() )
{
- const long nStartX = rRect.Left();
- const long nStartY = rRect.Top();
- const long nEndX = rRect.Right();
- const long nEndY = rRect.Bottom();
-
+ const long nStartX = rRect.Left();
+ const long nStartY = rRect.Top();
+ const long nEndX = rRect.Right();
+ const long nEndY = rRect.Bottom();
+
for( long nY = nStartY; nY <= nEndY; nY++ )
for( long nX = nStartX; nX <= nEndX; nX++ )
SetPixel( nY, nX, rFillColor );
@@ -299,7 +299,7 @@ void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
{
if( mpFillColor )
FillRect( rRect );
-
+
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
DrawLine( rRect.TopLeft(), rRect.TopRight() );
@@ -317,9 +317,9 @@ void BitmapWriteAccess::FillPolygon( const Polygon& rPoly )
if( nSize && mpFillColor )
{
- const BitmapColor& rFillColor = *mpFillColor;
- Region aRegion( rPoly );
- Rectangle aRect;
+ const BitmapColor& rFillColor = *mpFillColor;
+ Region aRegion( rPoly );
+ Rectangle aRect;
aRegion.Intersect( Rectangle( Point(), Size( Width(), Height() ) ) );
@@ -364,16 +364,16 @@ void BitmapWriteAccess::FillPolyPolygon( const PolyPolygon& rPolyPoly )
if( nCount && mpFillColor )
{
- const BitmapColor& rFillColor = *mpFillColor;
- Region aRegion( rPolyPoly );
- Rectangle aRect;
+ const BitmapColor& rFillColor = *mpFillColor;
+ Region aRegion( rPolyPoly );
+ Rectangle aRect;
aRegion.Intersect( Rectangle( Point(), Size( Width(), Height() ) ) );
if( !aRegion.IsEmpty() )
{
RegionHandle aRegHandle( aRegion.BeginEnumRects() );
-
+
while( aRegion.GetNextEnumRect( aRegHandle, aRect ) )
for( long nY = aRect.Top(), nEndY = aRect.Bottom(); nY <= nEndY; nY++ )
for( long nX = aRect.Left(), nEndX = aRect.Right(); nX <= nEndX; nX++ )
@@ -390,13 +390,13 @@ void BitmapWriteAccess::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
{
if( mpFillColor )
FillPolyPolygon( rPolyPoly );
-
+
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
for( USHORT n = 0, nCount = rPolyPoly.Count(); n < nCount; )
{
- const Polygon& rPoly = rPolyPoly[ n++ ];
- const USHORT nSize = rPoly.GetSize();
+ const Polygon& rPoly = rPolyPoly[ n++ ];
+ const USHORT nSize = rPoly.GetSize();
if( nSize )
{
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index c47b3ca4908d..94c913c68a90 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +51,12 @@ namespace vcl {
class BmpTransporter :
public cppu::WeakImplHelper1< com::sun::star::awt::XBitmap >
{
- Sequence<sal_Int8> m_aBM;
- com::sun::star::awt::Size m_aSize;
+ Sequence<sal_Int8> m_aBM;
+ com::sun::star::awt::Size m_aSize;
public:
BmpTransporter( const Bitmap& rBM );
virtual ~BmpTransporter();
-
+
virtual com::sun::star::awt::Size SAL_CALL getSize() throw();
virtual Sequence< sal_Int8 > SAL_CALL getDIB() throw();
virtual Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw();
@@ -68,7 +68,7 @@ class BmpConverter :
public:
BmpConverter();
virtual ~BmpConverter();
-
+
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() throw();
virtual void SAL_CALL setValue( const OUString& rProperty, const Any& rValue )
throw( UnknownPropertyException );
@@ -76,7 +76,7 @@ public:
throw( UnknownPropertyException );
virtual sal_Bool SAL_CALL hasMethod( const OUString& rName ) throw();
virtual sal_Bool SAL_CALL hasProperty( const OUString& rProp ) throw();
-
+
virtual Any SAL_CALL invoke( const OUString& rFunction,
const Sequence< Any >& rParams,
Sequence< sal_Int16 >& rOutParamIndex,
@@ -169,10 +169,10 @@ Any SAL_CALL BmpConverter::invoke(
{
switch( nTargetDepth )
{
- case 1: aBM.Convert( BMP_CONVERSION_1BIT_THRESHOLD );break;
- case 4: aBM.ReduceColors( BMP_CONVERSION_4BIT_COLORS );break;
- case 8: aBM.ReduceColors( BMP_CONVERSION_8BIT_COLORS );break;
- case 24: aBM.Convert( BMP_CONVERSION_24BIT );break;
+ case 1: aBM.Convert( BMP_CONVERSION_1BIT_THRESHOLD );break;
+ case 4: aBM.ReduceColors( BMP_CONVERSION_4BIT_COLORS );break;
+ case 8: aBM.ReduceColors( BMP_CONVERSION_8BIT_COLORS );break;
+ case 24: aBM.Convert( BMP_CONVERSION_24BIT );break;
}
}
xBM = new BmpTransporter( aBM );
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 4c9ab03ea9c1..afccabc3309f 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -482,7 +482,7 @@ inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc
case BMP_FORMAT_32BIT_TC_RGBA:
return ImplConvertToBitmap<BMP_FORMAT_32BIT_TC_RGBA>( aSrcType, rDst, rSrc );
}
-
+
#ifdef DEBUG
static int nNotAccelerated = 0;
if( rSrc.mnWidth * rSrc.mnHeight >= 4000 )
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index c8be4e9145d3..004dc4db1f6b 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace com::sun::star::container;
#define SETTINGS_CONFIGNODE "VCL/Settings"
/*
- * SettingsConfigItem::get
+ * SettingsConfigItem::get
*/
SettingsConfigItem* SettingsConfigItem::get()
@@ -104,10 +104,10 @@ void SettingsConfigItem::Commit()
String aName( aKeyName );
aName.Append( '/' );
aName.Append( String( it->first ) );
- pValues[nIndex].Name = aName;
- pValues[nIndex].Handle = 0;
+ pValues[nIndex].Name = aName;
+ pValues[nIndex].Handle = 0;
pValues[nIndex].Value <<= it->second;
- pValues[nIndex].State = PropertyState_DIRECT_VALUE;
+ pValues[nIndex].State = PropertyState_DIRECT_VALUE;
nIndex++;
}
ReplaceSetProperties( aKeyName, aValues );
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 4b2522601c7b..ae033d497778 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
#include <vcl/cvtgrf.hxx>
// --------------
-// - Callback -
+// - Callback -
// --------------
// --------------------
@@ -65,8 +65,8 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
if( ( nInFormat == CVT_SVM ) || ( nInFormat == CVT_BMP ) )
{
- SvMemoryStream aIStm;
- Graphic aGraphic;
+ SvMemoryStream aIStm;
+ Graphic aGraphic;
aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
aIStm >> aGraphic;
@@ -76,7 +76,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
SvMemoryStream aOStm( 64535, 64535 );
mpConvertData = new ConvertData( aGraphic, aOStm, nOutFormat );
-
+
if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
{
nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
@@ -90,15 +90,15 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
}
else if( ( nOutFormat == CVT_SVM ) || ( nOutFormat == CVT_BMP ) )
{
- SvMemoryStream aIStm;
+ SvMemoryStream aIStm;
aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
mpConvertData = new ConvertData( Graphic(), aIStm, nInFormat );
-
+
if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
{
- SvMemoryStream aOStm( 645535, 64535 );
- Graphic& rGraphic = mpConvertData->maGraphic;
+ SvMemoryStream aOStm( 645535, 64535 );
+ Graphic& rGraphic = mpConvertData->maGraphic;
if( ( rGraphic.GetType() == GRAPHIC_BITMAP ) && ( CVT_SVM == nOutFormat ) )
{
@@ -134,13 +134,13 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat )
{
- GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
+ ULONG nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
- ConvertData aData( rGraphic, rIStm, nFormat );
-
+ ConvertData aData( rGraphic, rIStm, nFormat );
+
if( pCvt->GetFilterHdl().Call( &aData ) )
{
rGraphic = aData.maGraphic;
@@ -149,7 +149,7 @@ ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nForma
else if( rIStm.GetError() )
nRet = rIStm.GetError();
}
-
+
return nRet;
}
@@ -157,19 +157,19 @@ ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nForma
ULONG GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat )
{
- GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
+ ULONG nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
- ConvertData aData( rGraphic, rOStm, nFormat );
-
+ ConvertData aData( rGraphic, rOStm, nFormat );
+
if( pCvt->GetFilterHdl().Call( &aData ) )
nRet = ERRCODE_NONE;
else if( rOStm.GetError() )
nRet = rOStm.GetError();
}
-
+
return nRet;
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index b32f4933ace7..a2bbd6ee0e6e 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +75,7 @@ void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
- INT32 nSize;
+ INT32 nSize;
rIStm >> nSize;
rPoly = Polygon( (USHORT) nSize );
@@ -89,7 +89,7 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
{
Polygon aPoly;
- INT32 nPolyCount;
+ INT32 nPolyCount;
rIStm >> nPolyCount;
@@ -104,9 +104,9 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
{
- const USHORT nPoly = rPolyPoly.Count();
- USHORT nPoints = 0;
- USHORT n;
+ const USHORT nPoly = rPolyPoly.Count();
+ USHORT nPoints = 0;
+ USHORT n;
for( n = 0; n < nPoly; n++ )
nPoints = sal::static_int_cast<USHORT>(nPoints + rPolyPoly[ n ].GetSize());
@@ -162,12 +162,12 @@ void ImplWriteColor( SvStream& rOStm, const Color& rColor )
void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
{
- Point aOrg;
- INT32 nXNum;
- INT32 nXDenom;
- INT32 nYNum;
- INT32 nYDenom;
- INT16 nUnit;
+ Point aOrg;
+ INT32 nXNum;
+ INT32 nXDenom;
+ INT32 nYNum;
+ INT32 nYDenom;
+ INT16 nUnit;
rIStm >> nUnit >> aOrg >> nXNum >> nXDenom >> nYNum >> nYDenom;
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
@@ -245,8 +245,8 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, INT16 nStyle )
void ImplWriteFont( SvStream& rOStm, const Font& rFont,
rtl_TextEncoding& rActualCharSet )
{
- char aName[32];
- short nWeight;
+ char aName[32];
+ short nWeight;
ByteString aByteName( rFont.GetName(), rOStm.GetStreamCharSet() );
strncpy( aName, aByteName.GetBuffer(), 32 );
@@ -314,8 +314,8 @@ sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const String& rString )
xub_StrLen i, nStringLen = rString.Len();
if ( nStringLen )
{
- sal_uInt32 nSize = ( nStringLen << 1 ) + 4;
- sal_uInt16 nType = GDI_UNICODE_COMMENT;
+ sal_uInt32 nSize = ( nStringLen << 1 ) + 4;
+ sal_uInt16 nType = GDI_UNICODE_COMMENT;
rOStm << nType << nSize;
for ( i = 0; i < nStringLen; i++ )
@@ -334,12 +334,12 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rStri
sal_uInt32 nOld = rIStm.Tell();
if ( nStrmPos )
{
- sal_uInt16 nType;
- sal_uInt32 nActionSize;
+ sal_uInt16 nType;
+ sal_uInt32 nActionSize;
xub_StrLen nStringLen;
-
+
rIStm.Seek( nStrmPos );
- rIStm >> nType
+ rIStm >> nType
>> nActionSize;
nStringLen = sal::static_int_cast<xub_StrLen>(( nActionSize - 4 ) >> 1);
@@ -401,14 +401,14 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount))
{
rOStm << (INT16) GDI_EXTENDEDPOLYGON_ACTION;
-
+
const sal_Int32 nActionSize(
- 4 + // Action size
- 2 + // PolygonCount
- (nAllPolygonCount * 2) + // Points per polygon
- (nAllPointCount << 3) + // Points themselves
- nAllPolygonCount + // Bool if (when poly has points) it has flags, too
- nAllFlagCount); // Flags themselves
+ 4 + // Action size
+ 2 + // PolygonCount
+ (nAllPolygonCount * 2) + // Points per polygon
+ (nAllPointCount << 3) + // Points themselves
+ nAllPolygonCount + // Bool if (when poly has points) it has flags, too
+ nAllFlagCount); // Flags themselves
rOStm << nActionSize;
rOStm << (sal_uInt16)nAllPolygonCount;
@@ -509,26 +509,26 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, ULONG nConvertMod
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
- const ULONG nPos = rIStm.Tell();
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const ULONG nPos = rIStm.Tell();
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- char aCode[ 5 ];
- Size aPrefSz;
- INT16 nSize;
- INT16 nVersion;
+ char aCode[ 5 ];
+ Size aPrefSz;
+ INT16 nSize;
+ INT16 nVersion;
// read header
- rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
- rIStm >> nSize; // Size
- rIStm >> nVersion; // Version
- rIStm >> aPrefSz.Width(); // PrefSize.Width()
- rIStm >> aPrefSz.Height(); // PrefSize.Height()
+ rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
+ rIStm >> nSize; // Size
+ rIStm >> nVersion; // Version
+ rIStm >> aPrefSz.Width(); // PrefSize.Width()
+ rIStm >> aPrefSz.Height(); // PrefSize.Height()
// check header-magic and version
if( rIStm.GetError()
- || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
+ || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
|| ( nVersion != 200 ) )
{
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -537,28 +537,28 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
return;
}
- LineInfo aLineInfo( LINE_NONE, 0 );
- Stack aLIStack;
- VirtualDevice aFontVDev;
- rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
- BOOL bFatLine = FALSE;
+ LineInfo aLineInfo( LINE_NONE, 0 );
+ Stack aLIStack;
+ VirtualDevice aFontVDev;
+ rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
+ BOOL bFatLine = FALSE;
// TODO: fix reindentation below if you can accept being blamed by the SCM
MapMode aMapMode;
- Polygon aActionPoly;
- Rectangle aRect;
- Point aPt, aPt1;
- Size aSz;
- Color aActionColor;
- INT32 nTmp, nTmp1, nActionSize;
- INT32 nActions;
- INT16 nType;
+ Polygon aActionPoly;
+ Rectangle aRect;
+ Point aPt, aPt1;
+ Size aSz;
+ Color aActionColor;
+ INT32 nTmp, nTmp1, nActionSize;
+ INT32 nActions;
+ INT16 nType;
- sal_uInt32 nUnicodeCommentStreamPos = 0;
- INT32 nUnicodeCommentActionNumber = 0;
+ sal_uInt32 nUnicodeCommentStreamPos = 0;
+ INT32 nUnicodeCommentActionNumber = 0;
- ImplReadMapMode( rIStm, aMapMode ); // MapMode
- rIStm >> nActions; // Action count
+ ImplReadMapMode( rIStm, aMapMode ); // MapMode
+ rIStm >> nActions; // Action count
rMtf.SetPrefSize( aPrefSz );
rMtf.SetPrefMapMode( aMapMode );
@@ -567,7 +567,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
for( INT32 i = 0L; i < nActions; i++ )
{
rIStm >> nType;
- sal_Int32 nActBegin = rIStm.Tell();
+ sal_Int32 nActBegin = rIStm.Tell();
rIStm >> nActionSize;
DBG_ASSERT( ( nType <= 33 ) || ( nType >= 1024 ), "Unknown GDIMetaAction while converting!" );
@@ -644,7 +644,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
rMtf.ReplaceAction(
new MetaPolyLineAction(
- aInputPolyPolygon.GetObject(0),
+ aInputPolyPolygon.GetObject(0),
pPolyLineAction->GetLineInfo()),
nLastPolygonAction);
pPolyLineAction->Delete();
@@ -834,12 +834,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_FONT_ACTION ):
{
- Font aFont;
- char aName[ 32 ];
- INT32 nWidth, nHeight;
- INT16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
- INT16 nCharOrient, nLineOrient;
- BOOL bItalic, bOutline, bShadow, bTransparent;
+ Font aFont;
+ char aName[ 32 ];
+ INT32 nWidth, nHeight;
+ INT16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
+ INT16 nCharOrient, nLineOrient;
+ BOOL bItalic, bOutline, bShadow, bTransparent;
ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor );
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
@@ -868,7 +868,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
eActualCharSet = aFont.GetCharSet();
if ( eActualCharSet == RTL_TEXTENCODING_DONTKNOW )
eActualCharSet = gsl_getSystemTextEncoding();
-
+
rMtf.AddAction( new MetaFontAction( aFont ) );
rMtf.AddAction( new MetaTextAlignAction( aFont.GetAlign() ) );
rMtf.AddAction( new MetaTextColorAction( aFont.GetColor() ) );
@@ -881,9 +881,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXT_ACTION ):
{
- ByteString aByteStr;
- INT32 nIndex, nLen;
-
+ ByteString aByteStr;
+ INT32 nIndex, nLen;
+
rIStm >> aPt >> nIndex >> nLen >> nTmp;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
@@ -899,9 +899,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTARRAY_ACTION ):
{
- ByteString aByteStr;
- sal_Int32* pDXAry = NULL;
- INT32 nIndex, nLen, nAryLen;
+ ByteString aByteStr;
+ sal_Int32* pDXAry = NULL;
+ INT32 nIndex, nLen, nAryLen;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nAryLen;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
@@ -926,7 +926,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32* pTmpAry = new sal_Int32[nStrLen];
aFontVDev.GetTextArray( aStr, pTmpAry, (USHORT) nIndex, (USHORT) nLen );
-
+
// now, the difference between the
// last and the second last DX array
// is the advancement for the last
@@ -960,8 +960,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_STRETCHTEXT_ACTION ):
{
- ByteString aByteStr;
- INT32 nIndex, nLen, nWidth;
+ ByteString aByteStr;
+ INT32 nIndex, nLen, nWidth;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nWidth;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_INT16 - 1 ) ) )
@@ -996,8 +996,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_BITMAPSCALEPART_ACTION ):
{
- Bitmap aBmp;
- Size aSz2;
+ Bitmap aBmp;
+ Size aSz2;
rIStm >> aPt >> aSz >> aPt1 >> aSz2 >> aBmp;
rMtf.AddAction( new MetaBmpScalePartAction( aPt, aSz, aPt1, aSz2, aBmp ) );
@@ -1044,10 +1044,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_CLIPREGION_ACTION ):
{
- Region aRegion;
- INT16 nRegType;
- INT16 bIntersect;
- BOOL bClip = FALSE;
+ Region aRegion;
+ INT16 nRegType;
+ INT16 bIntersect;
+ BOOL bClip = FALSE;
rIStm >> nRegType >> bIntersect;
ImplReadRect( rIStm, aRect );
@@ -1078,7 +1078,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( 3 ):
{
PolyPolygon aPolyPoly;
- INT32 nPolyCount;
+ INT32 nPolyCount;
rIStm >> nPolyCount;
@@ -1117,8 +1117,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_RASTEROP_ACTION ):
{
- RasterOp eRasterOp;
- INT16 nRasterOp;
+ RasterOp eRasterOp;
+ INT16 nRasterOp;
rIStm >> nRasterOp;
@@ -1174,15 +1174,15 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_GRADIENT_ACTION ):
{
- Color aStartCol;
- Color aEndCol;
- INT16 nStyle;
- INT16 nAngle;
- INT16 nBorder;
- INT16 nOfsX;
- INT16 nOfsY;
- INT16 nIntensityStart;
- INT16 nIntensityEnd;
+ Color aStartCol;
+ Color aEndCol;
+ INT16 nStyle;
+ INT16 nAngle;
+ INT16 nBorder;
+ INT16 nOfsX;
+ INT16 nOfsY;
+ INT16 nIntensityStart;
+ INT16 nIntensityEnd;
ImplReadRect( rIStm, aRect );
rIStm >> nStyle;
@@ -1205,8 +1205,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TRANSPARENT_COMMENT ):
{
PolyPolygon aPolyPoly;
- INT32 nFollowingActionCount;
- INT16 nTrans;
+ INT32 nFollowingActionCount;
+ INT16 nTrans;
rIStm >> aPolyPoly >> nTrans >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1221,10 +1221,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_FLOATTRANSPARENT_COMMENT ):
{
GDIMetaFile aMtf;
- Point aPos;
- Size aSize;
- Gradient aGradient;
- INT32 nFollowingActionCount;
+ Point aPos;
+ Size aSize;
+ Gradient aGradient;
+ INT32 nFollowingActionCount;
rIStm >> aMtf >> aPos >> aSize >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1239,8 +1239,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_HATCH_COMMENT ):
{
PolyPolygon aPolyPoly;
- Hatch aHatch;
- INT32 nFollowingActionCount;
+ Hatch aHatch;
+ INT32 nFollowingActionCount;
rIStm >> aPolyPoly >> aHatch >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1254,9 +1254,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_REFPOINT_COMMENT ):
{
- Point aRefPoint;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ Point aRefPoint;
+ BOOL bSet;
+ INT32 nFollowingActionCount;
rIStm >> aRefPoint >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1276,9 +1276,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTLINECOLOR_COMMENT ):
{
- Color aColor;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ Color aColor;
+ BOOL bSet;
+ INT32 nFollowingActionCount;
rIStm >> aColor >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1292,11 +1292,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTLINE_COMMENT ):
{
- Point aStartPt;
- long nWidth;
+ Point aStartPt;
+ long nWidth;
sal_uInt32 nStrikeout;
sal_uInt32 nUnderline;
- INT32 nFollowingActionCount;
+ INT32 nFollowingActionCount;
rIStm >> aStartPt >> nWidth >> nStrikeout >> nUnderline >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1314,8 +1314,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_GRADIENTEX_COMMENT ):
{
PolyPolygon aPolyPoly;
- Gradient aGradient;
- INT32 nFollowingActionCount;
+ Gradient aGradient;
+ INT32 nFollowingActionCount;
rIStm >> aPolyPoly >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1329,11 +1329,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_COMMENT_COMMENT ):
{
- ByteString aComment;
- sal_Int32 nValue;
- sal_uInt32 nDataSize;
- BYTE* pData;
- INT32 nFollowingActionCount;
+ ByteString aComment;
+ sal_Int32 nValue;
+ sal_uInt32 nDataSize;
+ BYTE* pData;
+ INT32 nFollowingActionCount;
rIStm >> aComment >> nValue >> nDataSize;
@@ -1380,24 +1380,24 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
- ULONG nPos;
- ULONG nCountPos;
- Font aSaveFont;
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
- const Size aPrefSize( rMtf.GetPrefSize() );
- BOOL bRop_0_1 = FALSE;
- VirtualDevice aSaveVDev;
- Color aLineCol( COL_BLACK );
- Stack aLineColStack;
+ ULONG nPos;
+ ULONG nCountPos;
+ Font aSaveFont;
+ const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
+ const Size aPrefSize( rMtf.GetPrefSize() );
+ BOOL bRop_0_1 = FALSE;
+ VirtualDevice aSaveVDev;
+ Color aLineCol( COL_BLACK );
+ Stack aLineColStack;
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
//MagicCode schreiben
rOStm << "SVGDI"; // Kennung
nPos = rOStm.Tell();
- rOStm << (INT16) 42; // HeaderSize
- rOStm << (INT16) 200; // VERSION
+ rOStm << (INT16) 42; // HeaderSize
+ rOStm << (INT16) 200; // VERSION
rOStm << (INT32) aPrefSize.Width();
rOStm << (INT32) aPrefSize.Height();
ImplWriteMapMode( rOStm, rMtf.GetPrefMapMode() );
@@ -1498,12 +1498,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
ImplWritePopAction( rOStm );
nCount += 3;
-
+
if(bLineJoin)
{
nCount += 1;
}
-
+
if(bLineDashDot)
{
nCount += 1;
@@ -1577,10 +1577,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_CHORD_ACTION ):
{
- MetaChordAction* pAct = (MetaChordAction*) pAction;
- Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
+ MetaChordAction* pAct = (MetaChordAction*) pAction;
+ Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
pAct->GetEndPoint(), POLY_CHORD );
- const USHORT nPoints = aChordPoly.GetSize();
+ const USHORT nPoints = aChordPoly.GetSize();
rOStm << (INT16) GDI_POLYGON_ACTION;
rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
@@ -1652,13 +1652,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
ImplWritePopAction( rOStm );
nCount += 3;
-
+
if(bLineJoin)
{
nCount += 1;
}
}
-
+
if(bLineDashDot)
{
nCount += 1;
@@ -1684,7 +1684,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm << aSimplePoly[ n ];
nCount++;
-
+
const PolyPolygon aPolyPolygon(pAct->GetPolygon());
if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true))
{
@@ -1698,7 +1698,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
ImplWritePolyPolyAction( rOStm, pAct->GetPolyPolygon() );
nCount++;
-
+
if(ImplWriteExtendedPolyPolygonAction(rOStm, pAct->GetPolyPolygon(), true))
{
nCount++;
@@ -1709,9 +1709,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXT_ACTION ):
{
MetaTextAction* pAct = (MetaTextAction*) pAction;
- String aUniText( pAct->GetText() );
- ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ String aUniText( pAct->GetText() );
+ ByteString aText( aUniText, rActualCharSet );
+ const ULONG nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
@@ -1729,13 +1729,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTARRAY_ACTION ):
{
- MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
- ByteString aText( pAct->GetText(), rActualCharSet );
- String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
- ULONG nAryLen;
- ULONG nLen = pAct->GetLen();
- const ULONG nTextLen = aText.Len();
- sal_Int32* pDXArray = pAct->GetDXArray();
+ MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
+ ByteString aText( pAct->GetText(), rActualCharSet );
+ String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
+ ULONG nAryLen;
+ ULONG nLen = pAct->GetLen();
+ const ULONG nTextLen = aText.Len();
+ sal_Int32* pDXArray = pAct->GetDXArray();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
@@ -1751,7 +1751,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if( !pDXArray || !nLen )
nAryLen = 0;
else
- nAryLen = nLen; // #105987# Write out all of DX array
+ nAryLen = nLen; // #105987# Write out all of DX array
rOStm << (INT16) GDI_TEXTARRAY_ACTION;
rOStm << (INT32) ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) );
@@ -1771,10 +1771,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_STRETCHTEXT_ACTION ):
{
- MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
- String aUniText( pAct->GetText() );
- ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
+ String aUniText( pAct->GetText() );
+ ByteString aText( aUniText, rActualCharSet );
+ const ULONG nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
@@ -1833,8 +1833,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_BMPEX_ACTION ):
{
- MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
- const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+ MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
+ const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
rOStm << (INT16) GDI_BITMAP_ACTION;
rOStm << (INT32) 12;
@@ -1846,8 +1846,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_BMPEXSCALE_ACTION ):
{
- MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
- const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+ MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
+ const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
rOStm << (INT16) GDI_BITMAPSCALE_ACTION;
rOStm << (INT32) 20;
@@ -1861,7 +1861,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_BMPEXSCALEPART_ACTION ):
{
MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
- const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+ const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
rOStm << (INT16) GDI_BITMAPSCALEPART_ACTION;
rOStm << (INT32) 36;
@@ -1877,7 +1877,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_GRADIENT_ACTION ):
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- const Gradient& rGrad = pAct->GetGradient();
+ const Gradient& rGrad = pAct->GetGradient();
rOStm << (INT16) GDI_GRADIENT_ACTION;
rOStm << (INT32) 46;
@@ -1898,7 +1898,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_GRADIENTEX_ACTION ):
{
const MetaGradientExAction* pA = (MetaGradientExAction*) pAction;
- ULONG nOldPos, nNewPos;
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_GRADIENTEX_COMMENT;
@@ -1923,8 +1923,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_WALLPAPER_ACTION ):
{
- MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
- const Color& rColor = pAct->GetWallpaper().GetColor();
+ MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
+ const Color& rColor = pAct->GetWallpaper().GetColor();
ImplWritePushAction( rOStm );
ImplWriteLineColor( rOStm, rColor, 1 );
@@ -1943,9 +1943,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_CLIPREGION_ACTION ):
{
- MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
- const Region& rRegion = pAct->GetRegion();
- Rectangle aClipRect;
+ MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
+ const Region& rRegion = pAct->GetRegion();
+ Rectangle aClipRect;
rOStm << (INT16) GDI_CLIPREGION_ACTION;
rOStm << (INT32) 24;
@@ -2028,8 +2028,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTFILLCOLOR_ACTION ):
{
- MetaTextFillColorAction* pAct = (MetaTextFillColorAction*) pAction;
- Font aSaveFont( rSaveVDev.GetFont() );
+ MetaTextFillColorAction* pAct = (MetaTextFillColorAction*) pAction;
+ Font aSaveFont( rSaveVDev.GetFont() );
if( pAct->IsSetting() )
aSaveFont.SetFillColor( pAct->GetColor() );
@@ -2110,9 +2110,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
switch( pAct->GetRasterOp() )
{
case( ROP_OVERPAINT ) : nRasterOp = 0; break;
- case( ROP_XOR ) : nRasterOp = 4; break;
- case( ROP_INVERT ): nRasterOp = 1; break;
- default: nRasterOp = 0; break;
+ case( ROP_XOR ) : nRasterOp = 4; break;
+ case( ROP_INVERT ): nRasterOp = 1; break;
+ default: nRasterOp = 0; break;
}
ImplWriteRasterOpAction( rOStm, nRasterOp );
@@ -2143,10 +2143,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TRANSPARENT_ACTION ):
{
- const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
- const INT16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
- const INT16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
- ULONG nOldPos, nNewPos;
+ const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
+ const INT16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
+ const INT16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
+ ULONG nOldPos, nNewPos;
// write transparence comment
rOStm << (INT16) GDI_TRANSPARENT_COMMENT;
@@ -2204,12 +2204,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_FLOATTRANSPARENT_ACTION ):
{
- const MetaFloatTransparentAction* pA = (MetaFloatTransparentAction*) pAction;
- const GDIMetaFile& rTransMtf = pA->GetGDIMetaFile();
- const Point& rPos = pA->GetPoint();
- const Size& rSize = pA->GetSize();
- const Gradient& rGradient = pA->GetGradient();
- ULONG nOldPos, nNewPos;
+ const MetaFloatTransparentAction* pA = (MetaFloatTransparentAction*) pAction;
+ const GDIMetaFile& rTransMtf = pA->GetGDIMetaFile();
+ const Point& rPos = pA->GetPoint();
+ const Size& rSize = pA->GetSize();
+ const Gradient& rGradient = pA->GetGradient();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_FLOATTRANSPARENT_COMMENT;
@@ -2229,13 +2229,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
// write actions for float transparence
- ULONG nAddCount;
- GDIMetaFile aMtf( rTransMtf );
- const Size aSrcSize( rTransMtf.GetPrefSize() );
- Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
- const double fScaleX = aSrcSize.Width() ? (double) rSize.Width() / aSrcSize.Width() : 1.0;
- const double fScaleY = aSrcSize.Height() ? (double) rSize.Height() / aSrcSize.Height() : 1.0;
- long nMoveX, nMoveY;
+ ULONG nAddCount;
+ GDIMetaFile aMtf( rTransMtf );
+ const Size aSrcSize( rTransMtf.GetPrefSize() );
+ Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
+ const double fScaleX = aSrcSize.Width() ? (double) rSize.Width() / aSrcSize.Width() : 1.0;
+ const double fScaleY = aSrcSize.Height() ? (double) rSize.Height() / aSrcSize.Height() : 1.0;
+ long nMoveX, nMoveY;
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
@@ -2265,10 +2265,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_HATCH_ACTION ):
{
- const MetaHatchAction* pA = (MetaHatchAction*) pAction;
- const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
- const Hatch& rHatch = pA->GetHatch();
- ULONG nOldPos, nNewPos, nAddCount;
+ const MetaHatchAction* pA = (MetaHatchAction*) pAction;
+ const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
+ const Hatch& rHatch = pA->GetHatch();
+ ULONG nOldPos, nNewPos, nAddCount;
// write hatch comment
rOStm << (INT16) GDI_HATCH_COMMENT;
@@ -2289,8 +2289,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
// write actions for hatch
- VirtualDevice aVDev;
- GDIMetaFile aTmpMtf;
+ VirtualDevice aVDev;
+ GDIMetaFile aTmpMtf;
aVDev.AddHatchActions( rPolyPoly, rHatch, aTmpMtf );
nAddCount = ImplWriteActions( rOStm, aTmpMtf, rSaveVDev, rRop_0_1, rLineCol, rLineColStack, rActualCharSet );
@@ -2310,10 +2310,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_REFPOINT_ACTION ):
{
- const MetaRefPointAction* pA = (MetaRefPointAction*) pAction;
- const Point& rRefPoint = pA->GetRefPoint();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const MetaRefPointAction* pA = (MetaRefPointAction*) pAction;
+ const Point& rRefPoint = pA->GetRefPoint();
+ const BOOL bSet = pA->IsSetting();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_REFPOINT_COMMENT;
@@ -2338,10 +2338,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTLINECOLOR_ACTION ):
{
- const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
- const Color& rColor = pA->GetColor();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
+ const Color& rColor = pA->GetColor();
+ const BOOL bSet = pA->IsSetting();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_TEXTLINECOLOR_COMMENT;
@@ -2366,12 +2366,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTLINE_ACTION ):
{
- const MetaTextLineAction* pA = (MetaTextLineAction*) pAction;
- const Point& rStartPt = pA->GetStartPoint();
- const long nWidth = pA->GetWidth();
- const FontStrikeout eStrikeout = pA->GetStrikeout();
- const FontUnderline eUnderline = pA->GetUnderline();
- ULONG nOldPos, nNewPos;
+ const MetaTextLineAction* pA = (MetaTextLineAction*) pAction;
+ const Point& rStartPt = pA->GetStartPoint();
+ const long nWidth = pA->GetWidth();
+ const FontStrikeout eStrikeout = pA->GetStrikeout();
+ const FontUnderline eUnderline = pA->GetUnderline();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_TEXTLINE_COMMENT;
@@ -2381,8 +2381,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm.SeekRel( 4 );
// write data
- rOStm << rStartPt << nWidth <<
- static_cast<sal_uInt32>(eStrikeout) <<
+ rOStm << rStartPt << nWidth <<
+ static_cast<sal_uInt32>(eStrikeout) <<
static_cast<sal_uInt32>(eUnderline);
rOStm << (INT32) 0; // number of actions that follow this comment
@@ -2401,9 +2401,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_COMMENT_ACTION ):
{
- const MetaCommentAction* pA = (MetaCommentAction*) pAction;
- const sal_uInt32 nDataSize = pA->GetDataSize();
- ULONG nOldPos, nNewPos;
+ const MetaCommentAction* pA = (MetaCommentAction*) pAction;
+ const sal_uInt32 nDataSize = pA->GetDataSize();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_COMMENT_COMMENT;
diff --git a/vcl/source/gdi/extoutdevdata.cxx b/vcl/source/gdi/extoutdevdata.cxx
index 2b8ad0fb9ae6..20e057ba1442 100644
--- a/vcl/source/gdi/extoutdevdata.cxx
+++ b/vcl/source/gdi/extoutdevdata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 61db9f110a9e..6e89a36376e7 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,29 +54,29 @@ Impl_Font::Impl_Font() :
maColor( COL_TRANSPARENT ),
maFillColor( COL_TRANSPARENT )
{
- mnRefCount = 1;
- meCharSet = RTL_TEXTENCODING_DONTKNOW;
- meLanguage = LANGUAGE_DONTKNOW;
- meCJKLanguage = LANGUAGE_DONTKNOW;
- meFamily = FAMILY_DONTKNOW;
- mePitch = PITCH_DONTKNOW;
- meAlign = ALIGN_TOP;
- meWeight = WEIGHT_DONTKNOW;
- meWidthType = WIDTH_DONTKNOW;
- meItalic = ITALIC_NONE;
- meUnderline = UNDERLINE_NONE;
- meOverline = UNDERLINE_NONE;
- meStrikeout = STRIKEOUT_NONE;
- meRelief = RELIEF_NONE;
- meEmphasisMark = EMPHASISMARK_NONE;
- mnOrientation = 0;
- mnKerning = 0;
- mbWordLine = false;
- mbOutline = false;
- mbShadow = false;
- mbVertical = false;
- mbTransparent = true;
- mbConfigLookup = false;
+ mnRefCount = 1;
+ meCharSet = RTL_TEXTENCODING_DONTKNOW;
+ meLanguage = LANGUAGE_DONTKNOW;
+ meCJKLanguage = LANGUAGE_DONTKNOW;
+ meFamily = FAMILY_DONTKNOW;
+ mePitch = PITCH_DONTKNOW;
+ meAlign = ALIGN_TOP;
+ meWeight = WEIGHT_DONTKNOW;
+ meWidthType = WIDTH_DONTKNOW;
+ meItalic = ITALIC_NONE;
+ meUnderline = UNDERLINE_NONE;
+ meOverline = UNDERLINE_NONE;
+ meStrikeout = STRIKEOUT_NONE;
+ meRelief = RELIEF_NONE;
+ meEmphasisMark = EMPHASISMARK_NONE;
+ mnOrientation = 0;
+ mnKerning = 0;
+ mbWordLine = false;
+ mbOutline = false;
+ mbShadow = false;
+ mbVertical = false;
+ mbTransparent = true;
+ mbConfigLookup = false;
}
// -----------------------------------------------------------------------
@@ -88,29 +88,29 @@ Impl_Font::Impl_Font( const Impl_Font& rImplFont )
maColor( rImplFont.maColor ),
maFillColor( rImplFont.maFillColor )
{
- mnRefCount = 1;
- meCharSet = rImplFont.meCharSet;
- meLanguage = rImplFont.meLanguage;
- meCJKLanguage = rImplFont.meCJKLanguage;
- meFamily = rImplFont.meFamily;
- mePitch = rImplFont.mePitch;
- meAlign = rImplFont.meAlign;
- meWeight = rImplFont.meWeight;
- meWidthType = rImplFont.meWidthType;
- meItalic = rImplFont.meItalic;
- meUnderline = rImplFont.meUnderline;
- meOverline = rImplFont.meOverline;
- meStrikeout = rImplFont.meStrikeout;
- meRelief = rImplFont.meRelief;
- meEmphasisMark = rImplFont.meEmphasisMark;
- mnOrientation = rImplFont.mnOrientation;
- mnKerning = rImplFont.mnKerning;
- mbWordLine = rImplFont.mbWordLine;
- mbOutline = rImplFont.mbOutline;
- mbShadow = rImplFont.mbShadow;
- mbVertical = rImplFont.mbVertical;
- mbTransparent = rImplFont.mbTransparent;
- mbConfigLookup = rImplFont.mbConfigLookup;
+ mnRefCount = 1;
+ meCharSet = rImplFont.meCharSet;
+ meLanguage = rImplFont.meLanguage;
+ meCJKLanguage = rImplFont.meCJKLanguage;
+ meFamily = rImplFont.meFamily;
+ mePitch = rImplFont.mePitch;
+ meAlign = rImplFont.meAlign;
+ meWeight = rImplFont.meWeight;
+ meWidthType = rImplFont.meWidthType;
+ meItalic = rImplFont.meItalic;
+ meUnderline = rImplFont.meUnderline;
+ meOverline = rImplFont.meOverline;
+ meStrikeout = rImplFont.meStrikeout;
+ meRelief = rImplFont.meRelief;
+ meEmphasisMark = rImplFont.meEmphasisMark;
+ mnOrientation = rImplFont.mnOrientation;
+ mnKerning = rImplFont.mnKerning;
+ mbWordLine = rImplFont.mbWordLine;
+ mbOutline = rImplFont.mbOutline;
+ mbShadow = rImplFont.mbShadow;
+ mbVertical = rImplFont.mbVertical;
+ mbTransparent = rImplFont.mbTransparent;
+ mbConfigLookup = rImplFont.mbConfigLookup;
}
// -----------------------------------------------------------------------
@@ -277,9 +277,9 @@ Font::Font( const String& rFamilyName, const Size& rSize )
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
+ mpImplFont = new Impl_Font;
mpImplFont->maFamilyName= rFamilyName;
- mpImplFont->maSize = rSize;
+ mpImplFont->maSize = rSize;
}
// -----------------------------------------------------------------------
@@ -288,10 +288,10 @@ Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSi
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
+ mpImplFont = new Impl_Font;
mpImplFont->maFamilyName= rFamilyName;
mpImplFont->maStyleName = rStyleName;
- mpImplFont->maSize = rSize;
+ mpImplFont->maSize = rSize;
}
// -----------------------------------------------------------------------
@@ -300,9 +300,9 @@ Font::Font( FontFamily eFamily, const Size& rSize )
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
- mpImplFont->meFamily = eFamily;
- mpImplFont->maSize = rSize;
+ mpImplFont = new Impl_Font;
+ mpImplFont->meFamily = eFamily;
+ mpImplFont->maSize = rSize;
}
// -----------------------------------------------------------------------
@@ -758,7 +758,7 @@ void Font::Merge( const Font& rFont )
void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
{
- // #i56788# Use members directly, don't risc config access.
+ // #i56788# Use members directly, don't risc config access.
rAttrs.maName = mpImplFont->maFamilyName;
rAttrs.maStyleName = mpImplFont->maStyleName;
rAttrs.meFamily = mpImplFont->meFamily;
@@ -774,10 +774,10 @@ void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
- BOOL bTmp;
- BYTE nTmp8;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
+ BOOL bTmp;
+ BYTE nTmp8;
rIStm.ReadByteString( rImpl_Font.maFamilyName, rIStm.GetStreamCharSet() );
rIStm.ReadByteString( rImpl_Font.maStyleName, rIStm.GetStreamCharSet() );
@@ -802,10 +802,10 @@ SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
if( aCompat.GetVersion() >= 2 )
{
- rIStm >> nTmp8; rImpl_Font.meRelief = (FontRelief)nTmp8;
- rIStm >> nTmp16; rImpl_Font.meCJKLanguage = (LanguageType)nTmp16;
- rIStm >> bTmp; rImpl_Font.mbVertical = bTmp;
- rIStm >> nTmp16; rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16;
+ rIStm >> nTmp8; rImpl_Font.meRelief = (FontRelief)nTmp8;
+ rIStm >> nTmp16; rImpl_Font.meCJKLanguage = (LanguageType)nTmp16;
+ rIStm >> bTmp; rImpl_Font.mbVertical = bTmp;
+ rIStm >> nTmp16; rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16;
}
if( aCompat.GetVersion() >= 3 )
{
@@ -844,10 +844,10 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
rOStm << (BYTE) rImpl_Font.mnKerning;
// new in version 2
- rOStm << (BYTE) rImpl_Font.meRelief;
- rOStm << (UINT16) rImpl_Font.meCJKLanguage;
- rOStm << (BOOL) rImpl_Font.mbVertical;
- rOStm << (UINT16) rImpl_Font.meEmphasisMark;
+ rOStm << (BYTE) rImpl_Font.meRelief;
+ rOStm << (UINT16) rImpl_Font.meCJKLanguage;
+ rOStm << (BOOL) rImpl_Font.mbVertical;
+ rOStm << (UINT16) rImpl_Font.meEmphasisMark;
// new in version 3
rOStm << (UINT16) rImpl_Font.meOverline;
@@ -937,16 +937,16 @@ namespace
}
// set italic
o_rResult.SetItalic( (aInfo.italicAngle != 0) ? ITALIC_NORMAL : ITALIC_NONE );
-
+
// set pitch
o_rResult.SetPitch( (aInfo.pitch == 0) ? PITCH_VARIABLE : PITCH_FIXED );
-
+
// set style name
if( aInfo.usubfamily )
o_rResult.SetStyleName( rtl::OUString( aInfo.usubfamily ) );
else if( aInfo.subfamily )
o_rResult.SetStyleName( rtl::OUString::createFromAscii( aInfo.subfamily ) );
-
+
// cleanup
CloseTTFont( pTTF );
// success
@@ -955,13 +955,13 @@ namespace
#endif
return bResult;
}
-
+
struct WeightSearchEntry
{
const char* string;
int string_len;
FontWeight weight;
-
+
bool operator<( const WeightSearchEntry& rRight ) const
{
return rtl_str_compareIgnoreAsciiCase_WithLength( string, string_len, rRight.string, rRight.string_len ) < 0;
@@ -980,7 +980,7 @@ namespace
{ "super", 5, WEIGHT_ULTRABOLD },
{ "thin", 4, WEIGHT_THIN }
};
-
+
bool identifyType1Font( const char* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
{
bool bResult = false;
@@ -1007,7 +1007,7 @@ namespace
o_rResult.SetName( rtl::OStringToOUString( rtl::OString( pOpen+1, pClose-pOpen-1 ), RTL_TEXTENCODING_ASCII_US ) );
}
}
-
+
// parse /ItalicAngle
static const char* pItalic = "/ItalicAngle";
const char* pItalicPos = std::search( pStream, pExecPos, pItalic, pItalic+12 );
@@ -1016,7 +1016,7 @@ namespace
sal_Int32 nItalic = rtl_str_toInt32( pItalicPos+12, 10 );
o_rResult.SetItalic( (nItalic != 0) ? ITALIC_NORMAL : ITALIC_NONE );
}
-
+
// parse /Weight
static const char* pWeight = "/Weight";
const char* pWeightPos = std::search( pStream, pExecPos, pWeight, pWeight+7 );
@@ -1079,7 +1079,7 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize )
identifyType1Font( pStream, i_nSize, aResult );
}
}
-
+
return aResult;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index fdb6ab0e6b4a..dabeeafb944f 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace com::sun::star;
// - Defines -
// -----------
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
// --------------------------
// - Color exchange structs -
@@ -70,32 +70,32 @@ using namespace com::sun::star;
struct ImplColAdjustParam
{
- BYTE* pMapR;
- BYTE* pMapG;
- BYTE* pMapB;
+ BYTE* pMapR;
+ BYTE* pMapG;
+ BYTE* pMapB;
};
struct ImplBmpAdjustParam
{
- short nLuminancePercent;
- short nContrastPercent;
- short nChannelRPercent;
- short nChannelGPercent;
- short nChannelBPercent;
- double fGamma;
- BOOL bInvert;
+ short nLuminancePercent;
+ short nContrastPercent;
+ short nChannelRPercent;
+ short nChannelGPercent;
+ short nChannelBPercent;
+ double fGamma;
+ BOOL bInvert;
};
// -----------------------------------------------------------------------------
struct ImplColConvertParam
{
- MtfConversion eConversion;
+ MtfConversion eConversion;
};
struct ImplBmpConvertParam
{
- BmpConversion eConversion;
+ BmpConversion eConversion;
};
// -----------------------------------------------------------------------------
@@ -114,22 +114,22 @@ struct ImplBmpMonoParam
struct ImplColReplaceParam
{
- ULONG* pMinR;
- ULONG* pMaxR;
- ULONG* pMinG;
- ULONG* pMaxG;
- ULONG* pMinB;
- ULONG* pMaxB;
- const Color* pDstCols;
- ULONG nCount;
+ ULONG* pMinR;
+ ULONG* pMaxR;
+ ULONG* pMinG;
+ ULONG* pMaxG;
+ ULONG* pMinB;
+ ULONG* pMaxB;
+ const Color* pDstCols;
+ ULONG nCount;
};
struct ImplBmpReplaceParam
{
- const Color* pSrcCols;
- const Color* pDstCols;
- ULONG nCount;
- const ULONG* pTols;
+ const Color* pSrcCols;
+ const Color* pDstCols;
+ ULONG nCount;
+ const ULONG* pTols;
};
@@ -139,8 +139,8 @@ struct ImplBmpReplaceParam
struct ImpLabel
{
- String aLabelName;
- ULONG nActionPos;
+ String aLabelName;
+ ULONG nActionPos;
ImpLabel( const String& rLabelName, ULONG _nActionPos ) :
aLabelName( rLabelName ),
@@ -159,14 +159,14 @@ public:
ImpLabelList( const ImpLabelList& rList );
~ImpLabelList();
- void ImplInsert( ImpLabel* p ) { Insert( p, LIST_APPEND ); }
- ImpLabel* ImplRemove( ULONG nPos ) { return (ImpLabel*) Remove( nPos ); }
- void ImplReplace( ImpLabel* p ) { Replace( (void*)p ); }
- ImpLabel* ImplFirst() { return (ImpLabel*) First(); }
- ImpLabel* ImplNext() { return (ImpLabel*) Next(); }
- ImpLabel* ImplGetLabel( ULONG nPos ) const { return (ImpLabel*) GetObject( nPos ); }
- ULONG ImplGetLabelPos( const String& rLabelName );
- ULONG ImplCount() const { return Count(); }
+ void ImplInsert( ImpLabel* p ) { Insert( p, LIST_APPEND ); }
+ ImpLabel* ImplRemove( ULONG nPos ) { return (ImpLabel*) Remove( nPos ); }
+ void ImplReplace( ImpLabel* p ) { Replace( (void*)p ); }
+ ImpLabel* ImplFirst() { return (ImpLabel*) First(); }
+ ImpLabel* ImplNext() { return (ImpLabel*) Next(); }
+ ImpLabel* ImplGetLabel( ULONG nPos ) const { return (ImpLabel*) GetObject( nPos ); }
+ ULONG ImplGetLabelPos( const String& rLabelName );
+ ULONG ImplCount() const { return Count(); }
};
// ------------------------------------------------------------------------
@@ -209,14 +209,14 @@ ULONG ImpLabelList::ImplGetLabelPos( const String& rLabelName )
// ---------------
GDIMetaFile::GDIMetaFile() :
- List ( 0x3EFF, 64, 64 ),
- aPrefSize ( 1, 1 ),
- pPrev ( NULL ),
- pNext ( NULL ),
- pOutDev ( NULL ),
- pLabelList ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE ),
+ List ( 0x3EFF, 64, 64 ),
+ aPrefSize ( 1, 1 ),
+ pPrev ( NULL ),
+ pNext ( NULL ),
+ pOutDev ( NULL ),
+ pLabelList ( NULL ),
+ bPause ( FALSE ),
+ bRecord ( FALSE ),
bUseCanvas ( FALSE )
{
}
@@ -224,16 +224,16 @@ GDIMetaFile::GDIMetaFile() :
// ------------------------------------------------------------------------
GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
- List ( rMtf ),
- aPrefMapMode ( rMtf.aPrefMapMode ),
- aPrefSize ( rMtf.aPrefSize ),
- aHookHdlLink ( rMtf.aHookHdlLink ),
- pPrev ( rMtf.pPrev ),
- pNext ( rMtf.pNext ),
- pOutDev ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE ),
- bUseCanvas ( rMtf.bUseCanvas )
+ List ( rMtf ),
+ aPrefMapMode ( rMtf.aPrefMapMode ),
+ aPrefSize ( rMtf.aPrefSize ),
+ aHookHdlLink ( rMtf.aHookHdlLink ),
+ pPrev ( rMtf.pPrev ),
+ pNext ( rMtf.pNext ),
+ pOutDev ( NULL ),
+ bPause ( FALSE ),
+ bRecord ( FALSE ),
+ bUseCanvas ( rMtf.bUseCanvas )
{
// RefCount der MetaActions erhoehen
for( void* pAct = First(); pAct; pAct = Next() )
@@ -306,7 +306,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
{
const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( this == &rMtf )
bRet = TRUE;
@@ -334,7 +334,7 @@ BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
sal_Bool GDIMetaFile::IsEqual( const GDIMetaFile& rMtf ) const
{
const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( this == &rMtf )
bRet = TRUE;
@@ -461,7 +461,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
{
MetaAction* pAction = GetCurAction();
const ULONG nObjCount = Count();
- ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
+ ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
if( nPos > nObjCount )
nPos = nObjCount;
@@ -647,13 +647,13 @@ void GDIMetaFile::ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct,
void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
const Size& rSize, ULONG nPos )
{
- Region aDrawClipRegion;
+ Region aDrawClipRegion;
MapMode aDrawMap( GetPrefMapMode() );
- Size aDestSize( pOut->LogicToPixel( rSize ) );
+ Size aDestSize( pOut->LogicToPixel( rSize ) );
if( aDestSize.Width() && aDestSize.Height() )
{
- GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
+ GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
if( bUseCanvas && !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
return;
@@ -671,7 +671,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
aScaleX *= aDrawMap.GetScaleX(); aDrawMap.SetScaleX( aScaleX );
aScaleY *= aDrawMap.GetScaleY(); aDrawMap.SetScaleY( aScaleY );
-
+
// #i47260# Convert logical output position to offset within
// the metafile's mapmode. Therefore, disable pixel offset on
// outdev, it's inverse mnOutOffLogicX/Y is calculated for a
@@ -950,9 +950,9 @@ BOOL GDIMetaFile::SaveStatus()
BOOL GDIMetaFile::Mirror( ULONG nMirrorFlags )
{
- const Size aOldPrefSize( GetPrefSize() );
- long nMoveX, nMoveY;
- double fScaleX, fScaleY;
+ const Size aOldPrefSize( GetPrefSize() );
+ long nMoveX, nMoveY;
+ double fScaleX, fScaleY;
BOOL bRet;
if( nMirrorFlags & MTF_MIRROR_HORZ )
@@ -988,7 +988,7 @@ void GDIMetaFile::Move( long nX, long nY )
aMapVDev.EnableOutput( FALSE );
aMapVDev.SetMapMode( GetPrefMapMode() );
-
+
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
{
const long nType = pAct->GetType();
@@ -1002,7 +1002,7 @@ void GDIMetaFile::Move( long nX, long nY )
else
pModAct = pAct;
- if( ( META_MAPMODE_ACTION == nType ) ||
+ if( ( META_MAPMODE_ACTION == nType ) ||
( META_PUSH_ACTION == nType ) ||
( META_POP_ACTION == nType ) )
{
@@ -1023,7 +1023,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
aMapVDev.EnableOutput( FALSE );
aMapVDev.SetReferenceDevice( nDPIX, nDPIY );
aMapVDev.SetMapMode( GetPrefMapMode() );
-
+
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
{
const long nType = pAct->GetType();
@@ -1037,7 +1037,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
else
pModAct = pAct;
- if( ( META_MAPMODE_ACTION == nType ) ||
+ if( ( META_MAPMODE_ACTION == nType ) ||
( META_PUSH_ACTION == nType ) ||
( META_POP_ACTION == nType ) )
{
@@ -1101,7 +1101,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
{
const long nType = pAct->GetType();
- if( ( META_MAPMODE_ACTION == nType ) ||
+ if( ( META_MAPMODE_ACTION == nType ) ||
( META_PUSH_ACTION == nType ) ||
( META_POP_ACTION == nType ) )
{
@@ -1135,7 +1135,7 @@ Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt
// ------------------------------------------------------------------------
-Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
+Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos )
{
Polygon aRet( rPoly );
@@ -1148,7 +1148,7 @@ Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& r
// ------------------------------------------------------------------------
-PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt,
+PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos )
{
PolyPolygon aRet( rPolyPoly );
@@ -1161,16 +1161,16 @@ PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly
// ------------------------------------------------------------------------
-void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
+void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
const OutputDevice& rMapDev,
const PolyPolygon& rPolyPoly,
- const Gradient& rGrad )
+ const Gradient& rGrad )
{
// #105055# Generate comment, GradientEx and Gradient actions
// (within DrawGradient)
VirtualDevice aVDev( rMapDev, 0 );
aVDev.EnableOutput( FALSE );
- GDIMetaFile aGradMtf;
+ GDIMetaFile aGradMtf;
aGradMtf.Record( &aVDev );
aVDev.DrawGradient( rPolyPoly, rGrad );
@@ -1199,7 +1199,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
const double fAngle = F_PI1800 * nAngle10;
const double fSin = sin( fAngle );
const double fCos = cos( fAngle );
- Rectangle aRect=Rectangle( Point(), GetPrefSize() );
+ Rectangle aRect=Rectangle( Point(), GetPrefSize() );
Polygon aPoly( aRect );
aPoly.Rotate( Point(), fSin, fCos );
@@ -1208,10 +1208,10 @@ void GDIMetaFile::Rotate( long nAngle10 )
aMapVDev.SetMapMode( GetPrefMapMode() );
const Rectangle aNewBound( aPoly.GetBoundRect() );
-
+
const Point aOrigin( GetPrefMapMode().GetOrigin().X(), GetPrefMapMode().GetOrigin().Y() );
const Size aOffset( -aNewBound.Left(), -aNewBound.Top() );
-
+
Point aRotAnchor( aOrigin );
Size aRotOffset( aOffset );
@@ -1224,8 +1224,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_PIXEL_ACTION ):
{
MetaPixelAction* pAct = (MetaPixelAction*) pAction;
- aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
- pAct->GetColor() ) );
+ aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
+ pAct->GetColor() ) );
}
break;
@@ -1239,60 +1239,60 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_LINE_ACTION ):
{
MetaLineAction* pAct = (MetaLineAction*) pAction;
- aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
+ aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
ImplGetRotatedPoint( pAct->GetEndPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetLineInfo() ) );
}
break;
-
+
case( META_RECT_ACTION ):
{
MetaRectAction* pAct = (MetaRectAction*) pAction;
- aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
+ aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_ROUNDRECT_ACTION ):
{
MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
const Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
-
- aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
+
+ aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_ELLIPSE_ACTION ):
{
MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
const Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
-
- aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
+
+ aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_ARC_ACTION ):
{
MetaArcAction* pAct = (MetaArcAction*) pAction;
const Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
-
+
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aArcPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_PIE_ACTION ):
{
MetaPieAction* pAct = (MetaPieAction*) pAction;
const Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
-
+
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aPiePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
- case( META_CHORD_ACTION ):
+
+ case( META_CHORD_ACTION ):
{
MetaChordAction* pAct = (MetaChordAction*) pAction;
const Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
-
+
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aChordPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
@@ -1326,14 +1326,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_TEXTARRAY_ACTION ):
+ case( META_TEXTARRAY_ACTION ):
{
MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction;
aMtf.AddAction( new MetaTextArrayAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetText(), pAct->GetDXArray(), pAct->GetIndex(), pAct->GetLen() ) );
}
break;
-
+
case( META_STRETCHTEXT_ACTION ):
{
MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
@@ -1341,7 +1341,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
pAct->GetWidth(), pAct->GetText(), pAct->GetIndex(), pAct->GetLen() ) );
}
break;
-
+
case( META_TEXTLINE_ACTION ):
{
MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
@@ -1357,8 +1357,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
- aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(),
+ aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+ aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(),
aBmpEx ) );
}
break;
@@ -1372,7 +1372,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-
+
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
break;
@@ -1384,8 +1384,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-
+ aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
break;
@@ -1399,7 +1399,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-
+
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
break;
@@ -1408,7 +1408,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- ImplAddGradientEx( aMtf, aMapVDev,
+ ImplAddGradientEx( aMtf, aMapVDev,
ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetGradient() );
}
@@ -1430,17 +1430,17 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
int nBeginComments( 1 );
pAction = (MetaAction*) Next();
-
+
// skip everything, except gradientex action
while( pAction )
{
const USHORT nType = pAction->GetType();
-
+
if( META_GRADIENTEX_ACTION == nType )
{
// Add rotated gradientex
MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
- ImplAddGradientEx( aMtf, aMapVDev,
+ ImplAddGradientEx( aMtf, aMapVDev,
ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetGradient() );
}
@@ -1513,11 +1513,11 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_HATCH_ACTION ):
{
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
- Hatch aHatch( pAct->GetHatch() );
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ Hatch aHatch( pAct->GetHatch() );
aHatch.SetAngle( aHatch.GetAngle() + (USHORT) nAngle10 );
- aMtf.AddAction( new MetaHatchAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
+ aMtf.AddAction( new MetaHatchAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
aHatch ) );
}
break;
@@ -1533,20 +1533,20 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aMtfRect( aMtfPoly.GetBoundRect() );
aTransMtf.Rotate( nAngle10 );
- aMtf.AddAction( new MetaFloatTransparentAction( aTransMtf, aMtfRect.TopLeft(), aMtfRect.GetSize(),
+ aMtf.AddAction( new MetaFloatTransparentAction( aTransMtf, aMtfRect.TopLeft(), aMtfRect.GetSize(),
pAct->GetGradient() ) );
}
break;
case( META_EPS_ACTION ):
{
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
- GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aEPSRect( aEPSPoly.GetBoundRect() );
@@ -1572,12 +1572,12 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_ISECTRECTCLIPREGION_ACTION ):
{
- MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
- aMtf.AddAction( new MetaISectRegionClipRegionAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
+ MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
+ aMtf.AddAction( new MetaISectRegionClipRegionAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+ case( META_ISECTREGIONCLIPREGION_ACTION ):
{
MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
const Region& rRegion = pAct->GetRegion();
@@ -1602,7 +1602,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_FONT_ACTION ):
{
MetaFontAction* pAct = (MetaFontAction*) pAction;
- Font aFont( pAct->GetFont() );
+ Font aFont( pAct->GetFont() );
aFont.SetOrientation( aFont.GetOrientation() + (USHORT) nAngle10 );
aMtf.AddAction( new MetaFontAction( aFont ) );
@@ -1629,7 +1629,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aMtf.AddAction( pAction );
// update rotation point and offset, if necessary
- if( ( META_MAPMODE_ACTION == nActionType ) ||
+ if( ( META_MAPMODE_ACTION == nActionType ) ||
( META_PUSH_ACTION == nActionType ) ||
( META_POP_ACTION == nActionType ) )
{
@@ -1670,19 +1670,19 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
{
GDIMetaFile aMtf;
VirtualDevice aMapVDev( i_rReference );
-
+
aMapVDev.EnableOutput( FALSE );
aMapVDev.SetMapMode( GetPrefMapMode() );
-
+
std::vector<Rectangle> aClipStack( 1, Rectangle() );
std::vector<USHORT> aPushFlagStack;
-
+
Rectangle aBound;
-
+
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
const USHORT nActionType = pAction->GetType();
-
+
switch( nActionType )
{
case( META_PIXEL_ACTION ):
@@ -1694,7 +1694,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack );
}
break;
-
+
case( META_POINT_ACTION ):
{
MetaPointAction* pAct = (MetaPointAction*) pAction;
@@ -1704,7 +1704,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack );
}
break;
-
+
case( META_LINE_ACTION ):
{
MetaLineAction* pAct = (MetaLineAction*) pAction;
@@ -1714,28 +1714,28 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_RECT_ACTION ):
{
MetaRectAction* pAct = (MetaRectAction*) pAction;
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_ROUNDRECT_ACTION ):
{
MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_ELLIPSE_ACTION ):
{
MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_ARC_ACTION ):
{
MetaArcAction* pAct = (MetaArcAction*) pAction;
@@ -1744,7 +1744,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_PIE_ACTION ):
{
MetaPieAction* pAct = (MetaPieAction*) pAction;
@@ -1753,8 +1753,8 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
- case( META_CHORD_ACTION ):
+
+ case( META_CHORD_ACTION ):
{
MetaChordAction* pAct = (MetaChordAction*) pAction;
// FIXME: this is imprecise
@@ -1762,7 +1762,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_POLYLINE_ACTION ):
{
MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction;
@@ -1770,7 +1770,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_POLYGON_ACTION ):
{
MetaPolygonAction* pAct = (MetaPolygonAction*) pAction;
@@ -1778,7 +1778,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_POLYPOLYGON_ACTION ):
{
MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
@@ -1786,7 +1786,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TEXT_ACTION ):
{
MetaTextAction* pAct = (MetaTextAction*) pAction;
@@ -1798,8 +1798,8 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
- case( META_TEXTARRAY_ACTION ):
+
+ case( META_TEXTARRAY_ACTION ):
{
MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction;
Rectangle aRect;
@@ -1811,10 +1811,10 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_STRETCHTEXT_ACTION ):
{
- MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
+ MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
Rectangle aRect;
// hdu said base = index
aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
@@ -1824,14 +1824,14 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TEXTLINE_ACTION ):
{
MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
// measure a test string to get ascend and descent right
static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
String aStr( pStr );
-
+
Rectangle aRect;
aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL );
Point aPt( pAct->GetStartPoint() );
@@ -1840,7 +1840,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPSCALE_ACTION ):
{
MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
@@ -1848,7 +1848,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPSCALEPART_ACTION ):
{
MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
@@ -1856,7 +1856,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPEXSCALE_ACTION ):
{
MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
@@ -1864,7 +1864,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPEXSCALEPART_ACTION ):
{
MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
@@ -1872,7 +1872,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_GRADIENT_ACTION ):
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
@@ -1880,7 +1880,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_GRADIENTEX_ACTION ):
{
MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
@@ -1888,21 +1888,21 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_COMMENT_ACTION ):
{
// nothing to do
};
break;
-
+
case( META_HATCH_ACTION ):
{
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TRANSPARENT_ACTION ):
{
MetaTransparentAction* pAct = (MetaTransparentAction*) pAction;
@@ -1910,11 +1910,11 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
// get the bound rect of the contained metafile
Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) );
// scale the rect now on the assumption that the correct top left of the metafile
@@ -1928,22 +1928,22 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aRect.Right() = long(double(aRect.Right())*fX);
aRect.Top() = long(double(aRect.Top())*fY);
aRect.Bottom() = long(double(aRect.Bottom())*fY);
-
+
// transform the rect to current VDev state
aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
-
+
ImplActionBounds( aBound, aRect, aClipStack );
}
break;
-
+
case( META_EPS_ACTION ):
{
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_CLIPREGION_ACTION ):
{
MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
@@ -1953,7 +1953,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack.back() = Rectangle();
}
break;
-
+
case( META_ISECTRECTCLIPREGION_ACTION ):
{
MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
@@ -1964,8 +1964,8 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack.back().Intersection( aRect );
}
break;
-
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+
+ case( META_ISECTREGIONCLIPREGION_ACTION ):
{
MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) );
@@ -1975,7 +1975,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack.back().Intersection( aRect );
}
break;
-
+
case( META_BMP_ACTION ):
{
MetaBmpAction* pAct = (MetaBmpAction*) pAction;
@@ -1983,7 +1983,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPEX_ACTION ):
{
MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
@@ -1991,7 +1991,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MASK_ACTION ):
{
MetaMaskAction* pAct = (MetaMaskAction*) pAction;
@@ -1999,7 +1999,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MASKSCALE_ACTION ):
{
MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
@@ -2007,7 +2007,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MASKSCALEPART_ACTION ):
{
MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
@@ -2015,7 +2015,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_WALLPAPER_ACTION ):
{
MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
@@ -2023,7 +2023,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TEXTRECT_ACTION ):
{
MetaTextRectAction* pAct = (MetaTextRectAction*) pAction;
@@ -2031,7 +2031,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MOVECLIPREGION_ACTION ):
{
MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction;
@@ -2043,11 +2043,11 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
}
}
break;
-
+
default:
{
pAction->Execute( &aMapVDev );
-
+
if( nActionType == META_PUSH_ACTION )
{
MetaPushAction* pAct = (MetaPushAction*) pAction;
@@ -2082,9 +2082,9 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
Color GDIMetaFile::ImplColAdjustFnc( const Color& rColor, const void* pColParam )
{
- return Color( rColor.GetTransparency(),
- ( (const ImplColAdjustParam*) pColParam )->pMapR[ rColor.GetRed() ],
- ( (const ImplColAdjustParam*) pColParam )->pMapG[ rColor.GetGreen() ],
+ return Color( rColor.GetTransparency(),
+ ( (const ImplColAdjustParam*) pColParam )->pMapR[ rColor.GetRed() ],
+ ( (const ImplColAdjustParam*) pColParam )->pMapG[ rColor.GetGreen() ],
( (const ImplColAdjustParam*) pColParam )->pMapB[ rColor.GetBlue() ] );
}
@@ -2093,11 +2093,11 @@ Color GDIMetaFile::ImplColAdjustFnc( const Color& rColor, const void* pColParam
BitmapEx GDIMetaFile::ImplBmpAdjustFnc( const BitmapEx& rBmpEx, const void* pBmpParam )
{
- const ImplBmpAdjustParam* p = (const ImplBmpAdjustParam*) pBmpParam;
- BitmapEx aRet( rBmpEx );
+ const ImplBmpAdjustParam* p = (const ImplBmpAdjustParam*) pBmpParam;
+ BitmapEx aRet( rBmpEx );
aRet.Adjust( p->nLuminancePercent, p->nContrastPercent,
- p->nChannelRPercent, p->nChannelGPercent, p->nChannelBPercent,
+ p->nChannelRPercent, p->nChannelGPercent, p->nChannelBPercent,
p->fGamma, p->bInvert );
return aRet;
@@ -2161,17 +2161,17 @@ Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam
const ULONG nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
for( ULONG i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
- {
- if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
+ {
+ if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxR[ i ] >= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMinG[ i ] <= nG ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxG[ i ] >= nG ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMinB[ i ] <= nB ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxB[ i ] >= nB ) )
- {
+ {
return( ( (const ImplColReplaceParam*) pColParam )->pDstCols[ i ] );
- }
- }
+ }
+ }
return rColor;
}
@@ -2180,8 +2180,8 @@ Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam
BitmapEx GDIMetaFile::ImplBmpReplaceFnc( const BitmapEx& rBmpEx, const void* pBmpParam )
{
- const ImplBmpReplaceParam* p = (const ImplBmpReplaceParam*) pBmpParam;
- BitmapEx aRet( rBmpEx );
+ const ImplBmpReplaceParam* p = (const ImplBmpReplaceParam*) pBmpParam;
+ BitmapEx aRet( rBmpEx );
aRet.Replace( p->pSrcCols, p->pDstCols, p->nCount, p->pTols );
@@ -2190,7 +2190,7 @@ BitmapEx GDIMetaFile::ImplBmpReplaceFnc( const BitmapEx& rBmpEx, const void* pBm
// ------------------------------------------------------------------------
-void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pColParam,
+void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pColParam,
BmpExchangeFnc pFncBmp, const void* pBmpParam )
{
GDIMetaFile aMtf;
@@ -2286,7 +2286,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_FONT_ACTION ):
{
MetaFontAction* pAct = (MetaFontAction*) pAction;
- Font aFont( pAct->GetFont() );
+ Font aFont( pAct->GetFont() );
aFont.SetColor( pFncCol( aFont.GetColor(), pColParam ) );
aFont.SetFillColor( pFncCol( aFont.GetFillColor(), pColParam ) );
@@ -2296,9 +2296,9 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_WALLPAPER_ACTION ):
{
- MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
- Wallpaper aWall( pAct->GetWallpaper() );
- const Rectangle& rRect = pAct->GetRect();
+ MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
+ Wallpaper aWall( pAct->GetWallpaper() );
+ const Rectangle& rRect = pAct->GetRect();
aWall.SetColor( pFncCol( aWall.GetColor(), pColParam ) );
@@ -2329,8 +2329,8 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_BMPSCALE_ACTION ):
{
MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
- aMtf.Insert( new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(),
- pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
+ aMtf.Insert( new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(),
+ pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
LIST_APPEND );
}
break;
@@ -2340,7 +2340,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
aMtf.Insert( new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
pAct->GetSrcPoint(), pAct->GetSrcSize(),
- pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
+ pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
LIST_APPEND );
}
break;
@@ -2348,7 +2348,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_BMPEXSCALE_ACTION ):
{
MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
- aMtf.Insert( new MetaBmpExScaleAction( pAct->GetPoint(), pAct->GetSize(),
+ aMtf.Insert( new MetaBmpExScaleAction( pAct->GetPoint(), pAct->GetSize(),
pFncBmp( pAct->GetBitmapEx(), pBmpParam ) ),
LIST_APPEND );
}
@@ -2388,7 +2388,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_GRADIENT_ACTION ):
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- Gradient aGradient( pAct->GetGradient() );
+ Gradient aGradient( pAct->GetGradient() );
aGradient.SetStartColor( pFncCol( aGradient.GetStartColor(), pColParam ) );
aGradient.SetEndColor( pFncCol( aGradient.GetEndColor(), pColParam ) );
@@ -2399,7 +2399,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_GRADIENTEX_ACTION ):
{
MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
- Gradient aGradient( pAct->GetGradient() );
+ Gradient aGradient( pAct->GetGradient() );
aGradient.SetStartColor( pFncCol( aGradient.GetStartColor(), pColParam ) );
aGradient.SetEndColor( pFncCol( aGradient.GetEndColor(), pColParam ) );
@@ -2409,8 +2409,8 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_HATCH_ACTION ):
{
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
- Hatch aHatch( pAct->GetHatch() );
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ Hatch aHatch( pAct->GetHatch() );
aHatch.SetColor( pFncCol( aHatch.GetColor(), pColParam ) );
aMtf.Insert( new MetaHatchAction( pAct->GetPolyPolygon(), aHatch ), LIST_APPEND );
@@ -2420,24 +2420,24 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
aTransMtf.ImplExchangeColors( pFncCol, pColParam, pFncBmp, pBmpParam );
- aMtf.Insert( new MetaFloatTransparentAction( aTransMtf,
+ aMtf.Insert( new MetaFloatTransparentAction( aTransMtf,
pAct->GetPoint(), pAct->GetSize(),
- pAct->GetGradient() ),
+ pAct->GetGradient() ),
LIST_APPEND );
}
break;
case( META_EPS_ACTION ):
{
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
- GDIMetaFile aSubst( pAct->GetSubstitute() );
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ GDIMetaFile aSubst( pAct->GetSubstitute() );
aSubst.ImplExchangeColors( pFncCol, pColParam, pFncBmp, pBmpParam );
- aMtf.Insert( new MetaEPSAction( pAct->GetPoint(), pAct->GetSize(),
- pAct->GetLink(), aSubst ),
+ aMtf.Insert( new MetaEPSAction( pAct->GetPoint(), pAct->GetSize(),
+ pAct->GetLink(), aSubst ),
LIST_APPEND );
}
break;
@@ -2465,9 +2465,9 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
nChannelRPercent || nChannelGPercent || nChannelBPercent ||
( fGamma != 1.0 ) || bInvert )
{
- double fM, fROff, fGOff, fBOff, fOff;
- ImplColAdjustParam aColParam;
- ImplBmpAdjustParam aBmpParam;
+ double fM, fROff, fGOff, fBOff, fOff;
+ ImplColAdjustParam aColParam;
+ ImplBmpAdjustParam aBmpParam;
aColParam.pMapR = new BYTE[ 256 ];
aColParam.pMapG = new BYTE[ 256 ];
@@ -2482,7 +2482,7 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
// total offset = luminance offset + contrast offset
fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
- // channel offset = channel offset + total offset
+ // channel offset = channel offset + total offset
fROff = nChannelRPercent * 2.55 + fOff;
fGOff = nChannelGPercent * 2.55 + fOff;
fBOff = nChannelBPercent * 2.55 + fOff;
@@ -2537,8 +2537,8 @@ void GDIMetaFile::Convert( MtfConversion eConversion )
// nothing to do? => return quickly
if( eConversion != MTF_CONVERSION_NONE )
{
- ImplColConvertParam aColParam;
- ImplBmpConvertParam aBmpParam;
+ ImplColConvertParam aColParam;
+ ImplBmpConvertParam aBmpParam;
aColParam.eConversion = eConversion;
aBmpParam.eConversion = ( MTF_CONVERSION_1BIT_THRESHOLD == eConversion ) ? BMP_CONVERSION_1BIT_THRESHOLD : BMP_CONVERSION_8BIT_GREYS;
@@ -2570,8 +2570,8 @@ void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pRepla
for( ULONG i = 0; i < nColorCount; i++ )
{
- const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
- long nVal;
+ const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
+ long nVal;
nVal = pSearchColors[ i ].GetRed();
aColParam.pMinR[ i ] = (ULONG) Max( nVal - nTol, 0L );
@@ -2610,8 +2610,8 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
{
GDIMetaFile aRet( *this );
- ImplColMonoParam aColParam;
- ImplBmpMonoParam aBmpParam;
+ ImplColMonoParam aColParam;
+ ImplBmpMonoParam aBmpParam;
aColParam.aColor = rColor;
aBmpParam.aColor = rColor;
@@ -2625,12 +2625,12 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
ULONG GDIMetaFile::GetChecksum() const
{
- GDIMetaFile aMtf;
- SvMemoryStream aMemStm( 65535, 65535 );
- ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
- SVBT16 aBT16;
- SVBT32 aBT32;
- ULONG nCrc = 0;
+ GDIMetaFile aMtf;
+ SvMemoryStream aMemStm( 65535, 65535 );
+ ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
+ SVBT16 aBT16;
+ SVBT32 aBT32;
+ ULONG nCrc = 0;
for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
{
@@ -2814,7 +2814,7 @@ ULONG GDIMetaFile::GetChecksum() const
nCrc = rtl_crc32( nCrc, aBT32, 4 );
}
break;
-
+
case( META_MASKSCALE_ACTION ):
{
MetaMaskScaleAction* pAct = (MetaMaskScaleAction*) pAction;
@@ -2920,21 +2920,21 @@ ULONG GDIMetaFile::GetSizeBytes() const
case( META_BMP_ACTION ): nSizeBytes += ( (MetaBmpAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_BMPSCALE_ACTION ): nSizeBytes += ( (MetaBmpScaleAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_BMPSCALEPART_ACTION ): nSizeBytes += ( (MetaBmpScalePartAction*) pAction )->GetBitmap().GetSizeBytes(); break;
-
+
case( META_BMPEX_ACTION ): nSizeBytes += ( (MetaBmpExAction*) pAction )->GetBitmapEx().GetSizeBytes(); break;
case( META_BMPEXSCALE_ACTION ): nSizeBytes += ( (MetaBmpExScaleAction*) pAction )->GetBitmapEx().GetSizeBytes(); break;
case( META_BMPEXSCALEPART_ACTION ): nSizeBytes += ( (MetaBmpExScalePartAction*) pAction )->GetBitmapEx().GetSizeBytes(); break;
-
+
case( META_MASK_ACTION ): nSizeBytes += ( (MetaMaskAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_MASKSCALE_ACTION ): nSizeBytes += ( (MetaMaskScaleAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_MASKSCALEPART_ACTION ): nSizeBytes += ( (MetaMaskScalePartAction*) pAction )->GetBitmap().GetSizeBytes(); break;
-
+
case( META_POLYLINE_ACTION ): nSizeBytes += ( ( (MetaPolyLineAction*) pAction )->GetPolygon().GetSize() * sizeof( Point ) ); break;
case( META_POLYGON_ACTION ): nSizeBytes += ( ( (MetaPolygonAction*) pAction )->GetPolygon().GetSize() * sizeof( Point ) ); break;
case( META_POLYPOLYGON_ACTION ):
{
const PolyPolygon& rPolyPoly = ( (MetaPolyPolygonAction*) pAction )->GetPolyPolygon();
-
+
for( USHORT n = 0; n < rPolyPoly.Count(); ++n )
nSizeBytes += ( rPolyPoly[ n ].GetSize() * sizeof( Point ) );
}
@@ -2943,22 +2943,22 @@ ULONG GDIMetaFile::GetSizeBytes() const
case( META_TEXT_ACTION ): nSizeBytes += ( ( (MetaTextAction*) pAction )->GetText().Len() * sizeof( sal_Unicode ) ); break;
case( META_STRETCHTEXT_ACTION ): nSizeBytes += ( ( (MetaStretchTextAction*) pAction )->GetText().Len() * sizeof( sal_Unicode ) ); break;
case( META_TEXTRECT_ACTION ): nSizeBytes += ( ( (MetaTextRectAction*) pAction )->GetText().Len() * sizeof( sal_Unicode ) ); break;
- case( META_TEXTARRAY_ACTION ):
+ case( META_TEXTARRAY_ACTION ):
{
MetaTextArrayAction* pTextArrayAction = (MetaTextArrayAction*) pAction;
-
+
nSizeBytes += ( pTextArrayAction->GetText().Len() * sizeof( sal_Unicode ) );
-
+
if( pTextArrayAction->GetDXArray() )
nSizeBytes += ( pTextArrayAction->GetLen() << 2 );
}
break;
-
+
default:
break;
}
}
-
+
return( nSizeBytes );
}
@@ -2968,9 +2968,9 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
{
if( !rIStm.GetError() )
{
- char aId[ 7 ];
- ULONG nStmPos = rIStm.Tell();
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ char aId[ 7 ];
+ ULONG nStmPos = rIStm.Tell();
+ USHORT nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -2981,10 +2981,10 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if ( !strcmp( aId, "VCLMTF" ) )
{
// new format
- VersionCompat* pCompat;
- MetaAction* pAction;
- UINT32 nStmCompressMode = 0;
- UINT32 nCount = 0;
+ VersionCompat* pCompat;
+ MetaAction* pAction;
+ UINT32 nStmCompressMode = 0;
+ UINT32 nCount = 0;
pCompat = new VersionCompat( rIStm, STREAM_READ );
@@ -3055,9 +3055,9 @@ SvStream& GDIMetaFile::Read( SvStream& rIStm )
SvStream& GDIMetaFile::Write( SvStream& rOStm )
{
- VersionCompat* pCompat;
- const UINT32 nStmCompressMode = rOStm.GetCompressMode();
- USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ VersionCompat* pCompat;
+ const UINT32 nStmCompressMode = rOStm.GetCompressMode();
+ USHORT nOldFormat = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rOStm.Write( "VCLMTF", 6 );
@@ -3089,21 +3089,21 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
// ------------------------------------------------------------------------
BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
- BitmapEx& rBmpEx,
+ BitmapEx& rBmpEx,
const BitmapEx* pOverlay,
const Rectangle* pOverlayRect ) const
{
// the implementation is provided by KA
// initialization seems to be complicated but is used to avoid rounding errors
- VirtualDevice aVDev;
+ VirtualDevice aVDev;
const Point aNullPt;
const Point aTLPix( aVDev.LogicToPixel( aNullPt, GetPrefMapMode() ) );
const Point aBRPix( aVDev.LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) );
Size aDrawSize( aVDev.LogicToPixel( GetPrefSize(), GetPrefMapMode() ) );
- Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
- Point aPosPix;
-
+ Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
+ Point aPosPix;
+
if ( !rBmpEx.IsEmpty() )
rBmpEx.SetEmpty();
@@ -3128,23 +3128,23 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
aSizePix.Width() = nMaximumExtent;
aSizePix.Height() = FRound( nMaximumExtent / fWH );
}
-
+
aDrawSize.Width() = FRound( ( static_cast< double >( aDrawSize.Width() ) * aSizePix.Width() ) / aOldSizePix.Width() );
aDrawSize.Height() = FRound( ( static_cast< double >( aDrawSize.Height() ) * aSizePix.Height() ) / aOldSizePix.Height() );
}
-
- Size aFullSize;
- Point aBackPosPix;
- Rectangle aOverlayRect;
+
+ Size aFullSize;
+ Point aBackPosPix;
+ Rectangle aOverlayRect;
// calculate addigtional positions and sizes if an overlay image is used
if ( pOverlay )
{
aFullSize = Size( nMaximumExtent, nMaximumExtent );
aOverlayRect = Rectangle( aNullPt, aFullSize );
-
+
aOverlayRect.Intersection( pOverlayRect ? *pOverlayRect : Rectangle( aNullPt, pOverlay->GetSizePixel() ) );
-
+
if ( !aOverlayRect.IsEmpty() )
aBackPosPix = Point( ( nMaximumExtent - aSizePix.Width() ) >> 1, ( nMaximumExtent - aSizePix.Height() ) >> 1 );
else
@@ -3155,36 +3155,36 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
aFullSize = aSizePix;
pOverlay = NULL;
}
-
+
// draw image(s) into VDev and get resulting image
if ( aVDev.SetOutputSizePixel( aFullSize ) )
{
// draw metafile into VDev
const_cast<GDIMetaFile *>(this)->WindStart();
const_cast<GDIMetaFile *>(this)->Play( &aVDev, aBackPosPix, aDrawSize );
-
+
// draw overlay if neccessary
if ( pOverlay )
aVDev.DrawBitmapEx( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), *pOverlay );
-
+
// get paint bitmap
Bitmap aBmp( aVDev.GetBitmap( aNullPt, aVDev.GetOutputSizePixel() ) );
-
+
// assure that we have a true color image
if ( aBmp.GetBitCount() != 24 )
aBmp.Convert( BMP_CONVERSION_24BIT );
-
+
// create resulting mask bitmap with metafile output set to black
GDIMetaFile aMonchromeMtf( GetMonochromeMtf( COL_BLACK ) );
aVDev.DrawWallpaper( Rectangle( aNullPt, aSizePix ), Wallpaper( Color( COL_WHITE ) ) );
aMonchromeMtf.WindStart();
aMonchromeMtf.Play( &aVDev, aBackPosPix, aDrawSize );
-
+
// watch for overlay mask
if ( pOverlay )
{
Bitmap aOverlayMergeBmp( aVDev.GetBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize() ) );
-
+
// create ANDed resulting mask at overlay area
if ( pOverlay->IsTransparent() )
aVDev.DrawBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), pOverlay->GetMask() );
@@ -3193,15 +3193,15 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
aVDev.SetLineColor( COL_BLACK );
aVDev.SetFillColor( COL_BLACK );
aVDev.DrawRect( aOverlayRect);
- }
-
+ }
+
aOverlayMergeBmp.CombineSimple( aVDev.GetBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize() ), BMP_COMBINE_AND );
aVDev.DrawBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), aOverlayMergeBmp );
}
-
+
rBmpEx = BitmapEx( aBmp, aVDev.GetBitmap( aNullPt, aVDev.GetOutputSizePixel() ) );
}
-
+
return !rBmpEx.IsEmpty();
}
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 3a5b48ad2a0d..8f9dd042e605 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +46,11 @@
// -----------
GfxLink::GfxLink() :
- meType ( GFX_LINK_TYPE_NONE ),
- mpBuf ( NULL ),
- mpSwap ( NULL ),
- mnBufSize ( 0 ),
- mnUserId ( 0UL ),
+ meType ( GFX_LINK_TYPE_NONE ),
+ mpBuf ( NULL ),
+ mpSwap ( NULL ),
+ mnBufSize ( 0 ),
+ mnUserId ( 0UL ),
mpImpData ( new ImpGfxLink )
{
}
@@ -83,7 +83,7 @@ GfxLink::GfxLink( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns )
mpBuf = new ImpBuffer( nSize );
memcpy( mpBuf->mpBuffer, pBuf, nSize );
}
- else
+ else
mpBuf = NULL;
}
@@ -132,7 +132,7 @@ sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const
sal_uInt32 nDestSize = rGfxLink.GetDataSize();
if ( pSource && pDest && ( nSourceSize == nDestSize ) )
{
- bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0;
+ bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0;
}
else if ( ( pSource == 0 ) && ( pDest == 0 ) )
bIsEqual = sal_True;
@@ -191,7 +191,7 @@ const BYTE* GfxLink::GetData() const
// ------------------------------------------------------------------------
-const Size& GfxLink::GetPrefSize() const
+const Size& GfxLink::GetPrefSize() const
{
return mpImpData->maPrefSize;
}
@@ -245,8 +245,8 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
if( pData )
{
- SvMemoryStream aMemStm;
- ULONG nCvtType;
+ SvMemoryStream aMemStm;
+ ULONG nCvtType;
aMemStm.SetBuffer( (char*) pData, mnBufSize, FALSE, mnBufSize );
@@ -259,7 +259,7 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
case( GFX_LINK_TYPE_NATIVE_WMF ): nCvtType = CVT_WMF; break;
case( GFX_LINK_TYPE_NATIVE_MET ): nCvtType = CVT_MET; break;
case( GFX_LINK_TYPE_NATIVE_PCT ): nCvtType = CVT_PCT; break;
-
+
default: nCvtType = CVT_UNKNOWN; break;
}
@@ -301,7 +301,7 @@ void GfxLink::SwapIn()
if( IsSwappedOut() )
{
mpBuf = new ImpBuffer( mpSwap->GetData() );
-
+
if( !( --mpSwap->mnRefCount ) )
delete mpSwap;
@@ -329,15 +329,15 @@ BOOL GfxLink::ExportNative( SvStream& rOStream ) const
SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink )
{
VersionCompat* pCompat = new VersionCompat( rOStream, STREAM_WRITE, 2 );
-
+
// Version 1
rOStream << (UINT16) rGfxLink.GetType() << rGfxLink.GetDataSize() << rGfxLink.GetUserId();
-
+
// Version 2
- rOStream << rGfxLink.GetPrefSize() << rGfxLink.GetPrefMapMode();
-
+ rOStream << rGfxLink.GetPrefSize() << rGfxLink.GetPrefMapMode();
+
delete pCompat;
-
+
if( rGfxLink.GetDataSize() )
{
if( rGfxLink.IsSwappedOut() )
@@ -355,12 +355,12 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
{
Size aSize;
MapMode aMapMode;
- sal_uInt32 nSize;
- sal_uInt32 nUserId;
- UINT16 nType;
- BYTE* pBuf;
- bool bMapAndSizeValid( false );
- VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
+ sal_uInt32 nSize;
+ sal_uInt32 nUserId;
+ UINT16 nType;
+ BYTE* pBuf;
+ bool bMapAndSizeValid( false );
+ VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
// Version 1
rIStream >> nType >> nSize >> nUserId;
@@ -370,12 +370,12 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
rIStream >> aSize >> aMapMode;
bMapAndSizeValid = true;
}
-
+
delete pCompat;
pBuf = new BYTE[ nSize ];
rIStream.Read( pBuf, nSize );
-
+
rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, TRUE );
rGfxLink.SetUserId( nUserId );
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 80572a1b9457..d11d62ed6233 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -291,8 +291,8 @@ BOOL Gradient::operator==( const Gradient& rGradient ) const
SvStream& operator>>( SvStream& rIStm, Impl_Gradient& rImpl_Gradient )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImpl_Gradient.meStyle = (GradientStyle) nTmp16;
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index e6bb0b1e3e8a..5f4d3148584b 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -261,9 +261,9 @@ Graphic::Graphic( const GDIMetaFile& rMtf )
Graphic::Graphic( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic )
{
- uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY );
- uno::Reference< lang::XTypeProvider > xProv( rxGraphic, uno::UNO_QUERY );
- const ::Graphic* pGraphic = ( ( xTunnel.is() && xProv.is() ) ?
+ uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY );
+ uno::Reference< lang::XTypeProvider > xProv( rxGraphic, uno::UNO_QUERY );
+ const ::Graphic* pGraphic = ( ( xTunnel.is() && xProv.is() ) ?
reinterpret_cast< ::Graphic* >( xTunnel->getSomething( xProv->getImplementationId() ) ) :
NULL );
@@ -472,8 +472,8 @@ uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const
if( xProv.is() )
{
- uno::Sequence< beans::PropertyValue > aLoadProps( 1 );
- ::rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "private:memorygraphic/" ) );
+ uno::Sequence< beans::PropertyValue > aLoadProps( 1 );
+ ::rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "private:memorygraphic/" ) );
aLoadProps[ 0 ].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
aLoadProps[ 0 ].Value <<= ( aURL += ::rtl::OUString::valueOf( reinterpret_cast< sal_Int64 >( this ) ) );
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 3edf63925c9e..49236ae44e7f 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ static ::rtl::OString polyToString( const Polygon& rPoly )
aStr += ",";
aStr += ::rtl::OString::valueOf( static_cast< double >( rPoly[nVertex].getY() ) );
aStr += ") ";
- }
+ }
return aStr;
}
@@ -119,7 +119,7 @@ SvtGraphicFill::Transform::Transform()
{
matrix[0] = 1.0; matrix[1] = 0.0; matrix[2] = 0.0;
matrix[3] = 0.0; matrix[4] = 1.0; matrix[5] = 0.0;
-}
+}
////////////////////////////////////////////////////////////////////////////
@@ -133,18 +133,18 @@ SvtGraphicStroke::SvtGraphicStroke() :
maJoinType(),
mfMiterLimit( 3.0 ),
maDashArray()
-{
-}
-
-SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
- const PolyPolygon& rStartArrow,
- const PolyPolygon& rEndArrow,
- double fTransparency,
- double fStrokeWidth,
- CapType aCap,
- JoinType aJoin,
- double fMiterLimit,
- const DashArray& rDashArray ) :
+{
+}
+
+SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
+ const PolyPolygon& rStartArrow,
+ const PolyPolygon& rEndArrow,
+ double fTransparency,
+ double fStrokeWidth,
+ CapType aCap,
+ JoinType aJoin,
+ double fMiterLimit,
+ const DashArray& rDashArray ) :
maPath( rPath ),
maStartArrow( rStartArrow ),
maEndArrow( rEndArrow ),
@@ -208,7 +208,7 @@ void SvtGraphicStroke::getDashArray( DashArray& rDashArray ) const
aStr += polyToString( maPath );
aStr += "trans: ";
- aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
+ aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
aStr += " width: ";
aStr += ::rtl::OString::valueOf( static_cast< double >(getStrokeWidth()) );
aStr += " cap: ";
@@ -322,7 +322,7 @@ void SvtGraphicStroke::setDashArray( const DashArray& rDashArray )
SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
-
+
rClass.maPath.Write( rOStm );
rClass.maStartArrow.Write( rOStm );
rClass.maEndArrow.Write( rOStm );
@@ -345,7 +345,7 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass )
SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
{
VersionCompat aCompat( rIStm, STREAM_READ );
-
+
rClass.maPath.Read( rIStm );
rClass.maStartArrow.Read( rIStm );
rClass.maEndArrow.Read( rIStm );
@@ -364,7 +364,7 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
size_t i;
for(i=0; i<rClass.maDashArray.size(); ++i)
rIStm >> rClass.maDashArray[i];
-
+
return rIStm;
}
@@ -388,20 +388,20 @@ SvtGraphicFill::SvtGraphicFill() :
{
}
-SvtGraphicFill::SvtGraphicFill( const PolyPolygon& rPath,
- Color aFillColor,
- double fTransparency,
- FillRule aFillRule,
- FillType aFillType,
- const Transform& aFillTransform,
- bool bTiling,
- HatchType aHatchType,
- Color aHatchColor,
- GradientType aGradientType,
- Color aGradient1stColor,
- Color aGradient2ndColor,
- int aGradientStepCount,
- const Graphic& aFillGraphic ) :
+SvtGraphicFill::SvtGraphicFill( const PolyPolygon& rPath,
+ Color aFillColor,
+ double fTransparency,
+ FillRule aFillRule,
+ FillType aFillType,
+ const Transform& aFillTransform,
+ bool bTiling,
+ HatchType aHatchType,
+ Color aHatchColor,
+ GradientType aGradientType,
+ Color aGradient1stColor,
+ Color aGradient2ndColor,
+ int aGradientStepCount,
+ const Graphic& aFillGraphic ) :
maPath( rPath ),
maFillColor( aFillColor ),
mfTransparency( fTransparency ),
@@ -502,7 +502,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
aStr += "fill";
aStr += colorToString( getFillColor() );
aStr += " trans: ";
- aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
+ aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
aStr += " rule: ";
switch( getFillRule() )
{
@@ -545,7 +545,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
aStr += " transform: [ ";
int i;
for(i=0; i<Transform::MatrixSize; ++i)
- aStr += ::rtl::OString::valueOf( maFillTransform.matrix[i] );
+ aStr += ::rtl::OString::valueOf( maFillTransform.matrix[i] );
aStr += " ] ";
aStr += " hatch: ";
@@ -606,15 +606,15 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
switch( maFillGraphic.GetType() )
{
case GRAPHIC_BITMAP:
- aStr += "bitmap";
+ aStr += "bitmap";
break;
case GRAPHIC_GDIMETAFILE:
- aStr += "metafile";
+ aStr += "metafile";
break;
case GRAPHIC_DEFAULT:
- aStr += "default";
+ aStr += "default";
break;
default:
@@ -623,7 +623,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
}
aStr += " of ";
- aStr += ::rtl::OString::valueOf( static_cast< sal_Int32 >(maFillGraphic.GetSizeBytes()) );
+ aStr += ::rtl::OString::valueOf( static_cast< sal_Int32 >(maFillGraphic.GetSizeBytes()) );
aStr += " bytes";
}
@@ -703,7 +703,7 @@ void SvtGraphicFill::setGraphic( const Graphic& rGraphic )
SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
-
+
rClass.maPath.Write( rOStm );
rOStm << rClass.maFillColor;
rOStm << rClass.mfTransparency;
@@ -732,7 +732,7 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass )
SvStream& operator>>( SvStream& rIStm, SvtGraphicFill& rClass )
{
VersionCompat aCompat( rIStm, STREAM_READ );
-
+
rClass.maPath.Read( rIStm );
rIStm >> rClass.maFillColor;
rIStm >> rClass.mfTransparency;
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index 00b3d13991fd..b8a2a55d4c4d 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +40,22 @@ DBG_NAME( Hatch )
// --------------
ImplHatch::ImplHatch() :
- mnRefCount ( 1 ),
- maColor ( COL_BLACK ),
- meStyle ( HATCH_SINGLE ),
- mnDistance ( 1 ),
- mnAngle ( 0 )
+ mnRefCount ( 1 ),
+ maColor ( COL_BLACK ),
+ meStyle ( HATCH_SINGLE ),
+ mnDistance ( 1 ),
+ mnAngle ( 0 )
{
}
// -----------------------------------------------------------------------
ImplHatch::ImplHatch( const ImplHatch& rImplHatch ) :
- mnRefCount ( 1 ),
- maColor ( rImplHatch.maColor ),
- meStyle ( rImplHatch.meStyle ),
- mnDistance ( rImplHatch.mnDistance ),
- mnAngle ( rImplHatch.mnAngle )
+ mnRefCount ( 1 ),
+ maColor ( rImplHatch.maColor ),
+ meStyle ( rImplHatch.meStyle ),
+ mnDistance ( rImplHatch.mnDistance ),
+ mnAngle ( rImplHatch.mnAngle )
{
}
@@ -112,7 +112,7 @@ Hatch& Hatch::operator=( const Hatch& rHatch )
if( !( --mpImplHatch->mnRefCount ) )
delete mpImplHatch;
-
+
mpImplHatch = rHatch.mpImplHatch;
return *this;
}
@@ -184,8 +184,8 @@ void Hatch::SetAngle( USHORT nAngle10 )
SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImplHatch.meStyle = (HatchStyle) nTmp16;
rIStm >> rImplHatch.maColor >> rImplHatch.mnDistance >> rImplHatch.mnAngle;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index e74d41967a7d..47c77da623a4 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <boost/scoped_ptr.hpp>
-#include <boost/scoped_array.hpp>
-
+#include <boost/scoped_ptr.hpp>
+#include <boost/scoped_array.hpp>
+
#include <rtl/logfile.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
@@ -80,8 +80,8 @@ Image::Image( const ResId& rResId ) :
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- BitmapEx aBmpEx;
- ULONG nObjMask = pResMgr->ReadLong();
+ BitmapEx aBmpEx;
+ ULONG nObjMask = pResMgr->ReadLong();
if( nObjMask & RSC_IMAGE_IMAGEBITMAP )
{
@@ -154,7 +154,7 @@ Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
DBG_CTOR( Image, NULL );
const BitmapEx aBmpEx( rBitmap, rMaskBitmap );
-
+
ImplInit( aBmpEx );
}
@@ -166,7 +166,7 @@ Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
DBG_CTOR( Image, NULL );
const BitmapEx aBmpEx( rBitmap, rColor );
-
+
ImplInit( aBmpEx );
}
@@ -176,7 +176,7 @@ Image::Image( const uno::Reference< graphic::XGraphic >& rxGraphic ) :
mpImplData( NULL )
{
DBG_CTOR( Image, NULL );
-
+
const Graphic aGraphic( rxGraphic );
ImplInit( aGraphic.GetBitmapEx() );
}
@@ -218,7 +218,7 @@ void Image::ImplInit( const BitmapEx& rBmpEx )
Size Image::GetSizePixel() const
{
DBG_CHKTHIS( Image, NULL );
-
+
Size aRet;
if( mpImplData )
@@ -243,7 +243,7 @@ Size Image::GetSizePixel() const
BitmapEx Image::GetBitmapEx() const
{
DBG_CHKTHIS( Image, NULL );
-
+
BitmapEx aRet;
if( mpImplData )
@@ -268,7 +268,7 @@ BitmapEx Image::GetBitmapEx() const
uno::Reference< graphic::XGraphic > Image::GetXGraphic() const
{
const Graphic aGraphic( GetBitmapEx() );
-
+
return aGraphic.GetXGraphic();
}
@@ -294,7 +294,7 @@ Image Image::GetColorTransformedImage( ImageColorTransform eColorTransform ) con
if( nColorCount && pSrcColors && pDstColors )
{
- aBmpEx.Replace( pSrcColors, pDstColors, nColorCount );
+ aBmpEx.Replace( pSrcColors, pDstColors, nColorCount );
aRet = Image( aBmpEx );
}
@@ -368,7 +368,7 @@ Image& Image::operator=( const Image& rImage )
if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
delete mpImplData;
-
+
mpImplData = rImage.mpImplData;
return *this;
@@ -380,7 +380,7 @@ BOOL Image::operator==( const Image& rImage ) const
{
DBG_CHKTHIS( Image, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
-
+
bool bRet = false;
if( rImage.mpImplData == mpImplData )
@@ -400,7 +400,7 @@ BOOL Image::operator==( const Image& rImage ) const
case IMAGETYPE_IMAGE:
bRet = static_cast< ImplImageData* >( rImage.mpImplData->mpData )->IsEqual( *static_cast< ImplImageData* >( mpImplData->mpData ) );
break;
-
+
default:
bRet = false;
break;
@@ -432,30 +432,30 @@ ImageList::ImageList( const ResId& rResId ) :
RTL_LOGFILE_CONTEXT( aLog, "vcl: ImageList::ImageList( const ResId& rResId )" );
DBG_CTOR( ImageList, NULL );
-
+
rResId.SetRT( RSC_IMAGELIST );
-
+
ResMgr* pResMgr = rResId.GetResMgr();
if( pResMgr && pResMgr->GetResource( rResId ) )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nObjMask = pResMgr->ReadLong();
- const String aPrefix( pResMgr->ReadString() );
+ ULONG nObjMask = pResMgr->ReadLong();
+ const String aPrefix( pResMgr->ReadString() );
::boost::scoped_ptr< Color > spMaskColor;
if( nObjMask & RSC_IMAGE_MASKCOLOR )
spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) );
-
+
pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
-
+
if( nObjMask & RSC_IMAGELIST_IDLIST )
{
for( sal_Int32 i = 0, nCount = pResMgr->ReadLong(); i < nCount; ++i )
pResMgr->ReadLong();
}
-
+
sal_Int32 nCount = pResMgr->ReadLong();
ImplInit( static_cast< USHORT >( nCount ), Size() );
@@ -474,8 +474,8 @@ ImageList::ImageList( const ResId& rResId ) :
// -----------------------------------------------------------------------
-ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
- const ::rtl::OUString& rPrefix,
+ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
+ const ::rtl::OUString& rPrefix,
const Color* ) :
mpImplData( NULL ),
mnInitSize( 1 ),
@@ -490,8 +490,8 @@ ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
mpImplData->maPrefix = rPrefix;
for( sal_uInt32 i = 0; i < rNameVector.size(); ++i )
{
-// fprintf (stderr, "List %p [%d]: '%s'\n",
-// this, i, rtl::OUStringToOString( rNameVector[i], RTL_TEXTENCODING_UTF8 ).getStr() );
+// fprintf (stderr, "List %p [%d]: '%s'\n",
+// this, i, rtl::OUStringToOString( rNameVector[i], RTL_TEXTENCODING_UTF8 ).getStr() );
mpImplData->AddImage( rNameVector[ i ], static_cast< USHORT >( i ) + 1, BitmapEx() );
}
}
@@ -537,8 +537,8 @@ void ImageAryData::Load(const rtl::OUString &rPrefix)
BitmapEx aBmpEx;
-// fprintf (stderr, "Attempt load of '%s'\n",
-// rtl::OUStringToOString( maName, RTL_TEXTENCODING_UTF8 ).getStr() );
+// fprintf (stderr, "Attempt load of '%s'\n",
+// rtl::OUStringToOString( maName, RTL_TEXTENCODING_UTF8 ).getStr() );
rtl::OUString aFileName = rPrefix;
aFileName += maName;
@@ -616,7 +616,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
{
USHORT nItems = sal::static_int_cast< USHORT >( rNameVector.size() );
-// fprintf (stderr, "InsertFromHorizontalStrip (1) [%d items]\n", nItems);
+// fprintf (stderr, "InsertFromHorizontalStrip (1) [%d items]\n", nItems);
if (!nItems)
return;
@@ -639,7 +639,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
USHORT nCount,
const Color *pMaskColor,
- const Color *pSearchColors,
+ const Color *pSearchColors,
const Color *pReplaceColors,
ULONG nColorCount)
{
@@ -653,7 +653,7 @@ void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
}
if ( nColorCount && pSearchColors && pReplaceColors )
aBmpEx.Replace( pSearchColors, pReplaceColors, nColorCount );
-
+
std::vector< rtl::OUString > aNames( nCount );
InsertFromHorizontalStrip( aBmpEx, aNames );
}
@@ -722,7 +722,7 @@ void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const Image& rI
if( nId )
{
RemoveImage( nId );
-
+
if( !mpImplData )
ImplInit( 0, rImage.GetSizePixel() );
mpImplData->AddImage( rImageName, nId, rImage.GetBitmapEx());
@@ -789,7 +789,7 @@ Image ImageList::GetImage( USHORT nId ) const
{
DBG_CHKTHIS( ImageList, NULL );
-// fprintf (stderr, "GetImage %d\n", nId);
+// fprintf (stderr, "GetImage %d\n", nId);
Image aRet;
@@ -816,13 +816,13 @@ Image ImageList::GetImage( USHORT nId ) const
Image ImageList::GetImage( const ::rtl::OUString& rImageName ) const
{
-// fprintf (stderr, "GetImage '%s'\n",
-// rtl::OUStringToOString( rImageName, RTL_TEXTENCODING_UTF8 ).getStr() );
+// fprintf (stderr, "GetImage '%s'\n",
+// rtl::OUStringToOString( rImageName, RTL_TEXTENCODING_UTF8 ).getStr() );
if( mpImplData )
{
ImageAryData *pImg = mpImplData->maNameHash[ rImageName ];
-
+
if( pImg )
{
if( pImg->IsLoadable() )
@@ -830,7 +830,7 @@ Image ImageList::GetImage( const ::rtl::OUString& rImageName ) const
return Image( pImg->maBitmapEx );
}
}
-// fprintf (stderr, "no such image\n");
+// fprintf (stderr, "no such image\n");
return Image();
}
@@ -852,7 +852,7 @@ void ImageList::Clear()
USHORT ImageList::GetImageCount() const
{
DBG_CHKTHIS( ImageList, NULL );
-
+
return mpImplData ? static_cast< USHORT >( mpImplData->maImages.size() ) : 0;
}
@@ -918,7 +918,7 @@ void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
DBG_CHKTHIS( ImageList, NULL );
rIds = ::std::vector< USHORT >();
-
+
if( mpImplData )
{
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ )
@@ -928,7 +928,7 @@ void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
// -----------------------------------------------------------------------
-::rtl::OUString ImageList::GetImageName( USHORT nPos ) const
+::rtl::OUString ImageList::GetImageName( USHORT nPos ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -947,7 +947,7 @@ void ImageList::GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const
DBG_CHKTHIS( ImageList, NULL );
rNames = ::std::vector< ::rtl::OUString >();
-
+
if( mpImplData )
{
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ )
@@ -964,7 +964,7 @@ void ImageList::GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const
Size ImageList::GetImageSize() const
{
DBG_CHKTHIS( ImageList, NULL );
-
+
Size aRet;
if( mpImplData )
@@ -979,8 +979,8 @@ Size ImageList::GetImageSize() const
aRet = mpImplData->maImageSize = aTmp.GetSizePixel();
}
}
-// fprintf (stderr, "GetImageSize returns %d, %d\n",
-// aRet.Width(), aRet.Height());
+// fprintf (stderr, "GetImageSize returns %d, %d\n",
+// aRet.Width(), aRet.Height());
return aRet;
}
@@ -1009,7 +1009,7 @@ BOOL ImageList::operator==( const ImageList& rImageList ) const
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImageList, ImageList, NULL );
-
+
bool bRet = false;
if( rImageList.mpImplData == mpImplData )
diff --git a/vcl/source/gdi/imagerepository.cxx b/vcl/source/gdi/imagerepository.cxx
index e9765d46b07a..fa358c9d77db 100644
--- a/vcl/source/gdi/imagerepository.cxx
+++ b/vcl/source/gdi/imagerepository.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index bafb5ea8c490..d568d9a9d473 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,20 +42,20 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz,
ULONG nExtraData,
OutputDevice* pFirstFrameOutDev ) :
- mpParent ( pParent ),
- mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ),
- mnExtraData ( nExtraData ),
- maPt ( rPt ),
- maSz ( rSz ),
- maSzPix ( mpOut->LogicToPixel( maSz ) ),
- maClip ( mpOut->GetClipRegion() ),
- mpBackground ( new VirtualDevice ),
- mpRestore ( new VirtualDevice ),
- meLastDisposal ( DISPOSE_BACK ),
- mbPause ( FALSE ),
- mbMarked ( FALSE ),
- mbHMirr ( maSz.Width() < 0L ),
- mbVMirr ( maSz.Height() < 0L )
+ mpParent ( pParent ),
+ mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ),
+ mnExtraData ( nExtraData ),
+ maPt ( rPt ),
+ maSz ( rSz ),
+ maSzPix ( mpOut->LogicToPixel( maSz ) ),
+ maClip ( mpOut->GetClipRegion() ),
+ mpBackground ( new VirtualDevice ),
+ mpRestore ( new VirtualDevice ),
+ meLastDisposal ( DISPOSE_BACK ),
+ mbPause ( FALSE ),
+ mbMarked ( FALSE ),
+ mbHMirr ( maSz.Width() < 0L ),
+ mbVMirr ( maSz.Height() < 0L )
{
mpParent->ImplIncAnimCount();
@@ -98,7 +98,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
}
else
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
-
+
// initial drawing to actual position
ImplDrawToPos( mpParent->ImplGetCurPos() );
@@ -122,7 +122,7 @@ ImplAnimView::~ImplAnimView()
BOOL ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
{
BOOL bRet = FALSE;
-
+
if( nExtraData )
{
if( ( mnExtraData == nExtraData ) && ( !pOut || ( pOut == mpOut ) ) )
@@ -139,9 +139,9 @@ BOOL ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix )
{
const Size& rAnmSize = mpParent->GetDisplaySizePixel();
- Point aPt2( rAnm.aPosPix.X() + rAnm.aSizePix.Width() - 1L,
+ Point aPt2( rAnm.aPosPix.X() + rAnm.aSizePix.Width() - 1L,
rAnm.aPosPix.Y() + rAnm.aSizePix.Height() - 1L );
- double fFactX, fFactY;
+ double fFactX, fFactY;
// calculate x scaling
if( rAnmSize.Width() > 1L )
@@ -177,8 +177,8 @@ void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix,
void ImplAnimView::ImplDrawToPos( ULONG nPos )
{
- VirtualDevice aVDev;
- Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL;
+ VirtualDevice aVDev;
+ Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL;
aVDev.SetOutputSizePixel( maSzPix, FALSE );
nPos = Min( nPos, (ULONG) mpParent->Count() - 1UL );
@@ -202,7 +202,7 @@ void ImplAnimView::ImplDrawToPos( ULONG nPos )
void ImplAnimView::ImplDraw( ULONG nPos )
{
- ImplDraw( nPos, NULL );
+ ImplDraw( nPos, NULL );
}
// ------------------------------------------------------------------------
@@ -216,13 +216,13 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
ImplSetMarked( TRUE );
else if( !mbPause )
{
- VirtualDevice* pDev;
- Point aPosPix;
- Point aBmpPosPix;
- Size aSizePix;
- Size aBmpSizePix;
- const ULONG nLastPos = mpParent->Count() - 1;
- const AnimationBitmap& rAnm = mpParent->Get( (USHORT) ( mnActPos = Min( nPos, nLastPos ) ) );
+ VirtualDevice* pDev;
+ Point aPosPix;
+ Point aBmpPosPix;
+ Size aSizePix;
+ Size aBmpSizePix;
+ const ULONG nLastPos = mpParent->Count() - 1;
+ const AnimationBitmap& rAnm = mpParent->Get( (USHORT) ( mnActPos = Min( nPos, nLastPos ) ) );
ImplGetPosSize( rAnm, aPosPix, aSizePix );
@@ -308,7 +308,7 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
mpOut->SetClipRegion( *pOldClip );
delete pOldClip;
}
-
+
delete pDev;
if( mpOut->GetOutDevType() == OUTDEV_WINDOW )
@@ -335,7 +335,7 @@ void ImplAnimView::ImplRepaint()
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
mbPause = FALSE;
- ImplDrawToPos( mnActPos );
+ ImplDrawToPos( mnActPos );
mbPause = bOldPause;
}
diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx
index 84e3273fc8c5..bdd46dd76460 100644
--- a/vcl/source/gdi/impanmvw.hxx
+++ b/vcl/source/gdi/impanmvw.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,30 +44,30 @@ class ImplAnimView
{
private:
- Animation* mpParent;
- OutputDevice* mpOut;
- long mnExtraData;
- Point maPt;
- Point maDispPt;
- Point maRestPt;
- Size maSz;
- Size maSzPix;
- Size maDispSz;
- Size maRestSz;
- MapMode maMap;
- Region maClip;
- VirtualDevice* mpBackground;
- VirtualDevice* mpRestore;
- ULONG mnActPos;
- Disposal meLastDisposal;
- BOOL mbPause;
- BOOL mbFirst;
- BOOL mbMarked;
- BOOL mbHMirr;
- BOOL mbVMirr;
-
- void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
- void ImplDraw( ULONG nPos, VirtualDevice* pVDev );
+ Animation* mpParent;
+ OutputDevice* mpOut;
+ long mnExtraData;
+ Point maPt;
+ Point maDispPt;
+ Point maRestPt;
+ Size maSz;
+ Size maSzPix;
+ Size maDispSz;
+ Size maRestSz;
+ MapMode maMap;
+ Region maClip;
+ VirtualDevice* mpBackground;
+ VirtualDevice* mpRestore;
+ ULONG mnActPos;
+ Disposal meLastDisposal;
+ BOOL mbPause;
+ BOOL mbFirst;
+ BOOL mbMarked;
+ BOOL mbHMirr;
+ BOOL mbVMirr;
+
+ void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
+ void ImplDraw( ULONG nPos, VirtualDevice* pVDev );
public:
@@ -76,22 +76,22 @@ public:
OutputDevice* pFirstFrameOutDev = NULL );
~ImplAnimView();
- BOOL ImplMatches( OutputDevice* pOut, long nExtraData ) const;
- void ImplDrawToPos( ULONG nPos );
- void ImplDraw( ULONG nPos );
- void ImplRepaint();
- AInfo* ImplCreateAInfo() const;
+ BOOL ImplMatches( OutputDevice* pOut, long nExtraData ) const;
+ void ImplDrawToPos( ULONG nPos );
+ void ImplDraw( ULONG nPos );
+ void ImplRepaint();
+ AInfo* ImplCreateAInfo() const;
- const Point& ImplGetOutPos() const { return maPt; }
+ const Point& ImplGetOutPos() const { return maPt; }
- const Size& ImplGetOutSize() const { return maSz; }
- const Size& ImplGetOutSizePix() const { return maSzPix; }
+ const Size& ImplGetOutSize() const { return maSz; }
+ const Size& ImplGetOutSizePix() const { return maSzPix; }
- void ImplPause( BOOL bPause ) { mbPause = bPause; }
- BOOL ImplIsPause() const { return mbPause; }
+ void ImplPause( BOOL bPause ) { mbPause = bPause; }
+ BOOL ImplIsPause() const { return mbPause; }
- void ImplSetMarked( BOOL bMarked ) { mbMarked = bMarked; }
- BOOL ImplIsMarked() const { return mbMarked; }
+ void ImplSetMarked( BOOL bMarked ) { mbMarked = bMarked; }
+ BOOL ImplIsMarked() const { return mbMarked; }
};
#endif
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 4b4b1f4289b6..25c57c446abc 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +38,12 @@
#include <vcl/salinst.hxx>
// --------------
-// - ImpBitmap -
+// - ImpBitmap -
// --------------
ImpBitmap::ImpBitmap() :
- mnRefCount ( 1UL ),
- mnChecksum ( 0UL ),
+ mnRefCount ( 1UL ),
+ mnChecksum ( 0UL ),
mpSalBitmap ( ImplGetSVData()->mpDefInst->CreateSalBitmap() ),
maSourceSize( 0, 0 )
{
@@ -63,7 +63,7 @@ void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap )
}
// -----------------------------------------------------------------------
-
+
BOOL ImpBitmap::ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
{
maSourceSize = rSize;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 63b30b483fcb..a353e034ed33 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// - Defines -
// -----------
-#define GRAPHIC_MAXPARTLEN 256000L
-#define GRAPHIC_MTFTOBMP_MAXEXT 2048
-#define GRAPHIC_STREAMBUFSIZE 8192UL
-
-#define SYS_WINMETAFILE 0x00000003L
-#define SYS_WNTMETAFILE 0x00000004L
-#define SYS_OS2METAFILE 0x00000005L
-#define SYS_MACMETAFILE 0x00000006L
+#define GRAPHIC_MAXPARTLEN 256000L
+#define GRAPHIC_MTFTOBMP_MAXEXT 2048
+#define GRAPHIC_STREAMBUFSIZE 8192UL
-#define GRAPHIC_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'G', 'R', 'F', '5' ))
-#define NATIVE_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'N', 'A', 'T', '5' ))
+#define SYS_WINMETAFILE 0x00000003L
+#define SYS_WNTMETAFILE 0x00000004L
+#define SYS_OS2METAFILE 0x00000005L
+#define SYS_MACMETAFILE 0x00000006L
+
+#define GRAPHIC_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'G', 'R', 'F', '5' ))
+#define NATIVE_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'N', 'A', 'T', '5' ))
// ---------------
// - ImpSwapFile -
@@ -68,8 +68,8 @@
struct ImpSwapFile
{
- INetURLObject aSwapURL;
- ULONG nRefCount;
+ INetURLObject aSwapURL;
+ ULONG nRefCount;
};
// -----------------
@@ -132,33 +132,33 @@ Size GraphicReader::GetPreviewSize() const
// --------------
ImpGraphic::ImpGraphic() :
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( GRAPHIC_NONE ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( GRAPHIC_NONE ),
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
- maMetaFile ( rImpGraphic.maMetaFile ),
- maEx ( rImpGraphic.maEx ),
- mpContext ( NULL ),
- mpSwapFile ( rImpGraphic.mpSwapFile ),
- meType ( rImpGraphic.meType ),
- maDocFileURLStr ( rImpGraphic.maDocFileURLStr ),
- mnDocFilePos ( rImpGraphic.mnDocFilePos ),
+ maMetaFile ( rImpGraphic.maMetaFile ),
+ maEx ( rImpGraphic.maEx ),
+ mpContext ( NULL ),
+ mpSwapFile ( rImpGraphic.mpSwapFile ),
+ meType ( rImpGraphic.meType ),
+ maDocFileURLStr ( rImpGraphic.maDocFileURLStr ),
+ mnDocFilePos ( rImpGraphic.mnDocFilePos ),
mnSizeBytes ( rImpGraphic.mnSizeBytes ),
- mnRefCount ( 1UL ),
- mbSwapOut ( rImpGraphic.mbSwapOut ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( rImpGraphic.mbSwapOut ),
+ mbSwapUnderway ( FALSE )
{
if( mpSwapFile )
mpSwapFile->nRefCount++;
@@ -180,68 +180,68 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
- maEx ( rBitmap ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( !rBitmap ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
- mnDocFilePos ( 0UL ),
+ maEx ( rBitmap ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( !rBitmap ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
- maEx ( rBitmapEx ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( !rBitmapEx ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
- mnDocFilePos ( 0UL ),
+ maEx ( rBitmapEx ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( !rBitmapEx ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
- maEx ( rAnimation.GetBitmapEx() ),
- mpAnimation ( new Animation( rAnimation ) ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( GRAPHIC_BITMAP ),
- mnDocFilePos ( 0UL ),
+ maEx ( rAnimation.GetBitmapEx() ),
+ mpAnimation ( new Animation( rAnimation ) ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( GRAPHIC_BITMAP ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
- maMetaFile ( rMtf ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( GRAPHIC_GDIMETAFILE ),
- mnDocFilePos ( 0UL ),
+ maMetaFile ( rMtf ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( GRAPHIC_GDIMETAFILE ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
@@ -486,7 +486,7 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
if( meType == GRAPHIC_BITMAP )
{
const BitmapEx& rRetBmpEx = ( mpAnimation ? mpAnimation->GetBitmapEx() : maEx );
- const Color aReplaceColor( COL_WHITE );
+ const Color aReplaceColor( COL_WHITE );
aRetBmp = rRetBmpEx.GetBitmap( &aReplaceColor );
@@ -495,26 +495,26 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
}
else if( ( meType != GRAPHIC_DEFAULT ) && ImplIsSupportedGraphic() )
{
- // use corner points of graphic to determine the pixel
+ // use corner points of graphic to determine the pixel
// extent of the graphic (rounding errors are possible else)
- VirtualDevice aVDev;
+ VirtualDevice aVDev;
const Point aNullPt;
const Point aTLPix( aVDev.LogicToPixel( aNullPt, maMetaFile.GetPrefMapMode() ) );
const Point aBRPix( aVDev.LogicToPixel( Point( maMetaFile.GetPrefSize().Width() - 1, maMetaFile.GetPrefSize().Height() - 1 ), maMetaFile.GetPrefMapMode() ) );
Size aDrawSize( aVDev.LogicToPixel( maMetaFile.GetPrefSize(), maMetaFile.GetPrefMapMode() ) );
- Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
+ Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
if(rParameters.getSizePixel().Width() && rParameters.getSizePixel().Height())
{
- aDrawSize.Width() = FRound((double)rParameters.getSizePixel().Width() *
+ aDrawSize.Width() = FRound((double)rParameters.getSizePixel().Width() *
(double)aDrawSize.Width() / (double)aSizePix.Width());
- aDrawSize.Height() = FRound((double)rParameters.getSizePixel().Height() *
+ aDrawSize.Height() = FRound((double)rParameters.getSizePixel().Height() *
(double)aDrawSize.Height() / (double)aSizePix.Height());
aSizePix = rParameters.getSizePixel();
}
- if( aSizePix.Width() && aSizePix.Height() && !rParameters.getUnlimitedSize()
+ if( aSizePix.Width() && aSizePix.Height() && !rParameters.getUnlimitedSize()
&& (aSizePix.Width() > GRAPHIC_MTFTOBMP_MAXEXT || aSizePix.Height() > GRAPHIC_MTFTOBMP_MAXEXT))
{
const Size aOldSizePix( aSizePix );
@@ -535,7 +535,7 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
{
aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW);
}
-
+
if(rParameters.getSnapHorVerLines())
{
aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_PIXELSNAPHAIRLINE);
@@ -735,7 +735,7 @@ ULONG ImpGraphic::ImplGetSizeBytes() const
if( meType == GRAPHIC_BITMAP )
{
mnSizeBytes = mpAnimation ? mpAnimation->GetSizeBytes() : maEx.GetSizeBytes();
- }
+ }
else if( meType == GRAPHIC_GDIMETAFILE )
{
mnSizeBytes = maMetaFile.GetSizeBytes();
@@ -919,20 +919,20 @@ ULONG ImpGraphic::ImplGetDocFilePos() const
BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
{
- MapMode aMapMode;
- Size aSize;
- const ULONG nStartPos = rIStm.Tell();
- sal_uInt32 nId;
- ULONG nHeaderLen;
- long nType;
- long nLen;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bRet = FALSE;
+ MapMode aMapMode;
+ Size aSize;
+ const ULONG nStartPos = rIStm.Tell();
+ sal_uInt32 nId;
+ ULONG nHeaderLen;
+ long nType;
+ long nLen;
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ BOOL bRet = FALSE;
if( !mbSwapUnderway )
{
- const String aTempURLStr( maDocFileURLStr );
- const ULONG nTempPos = mnDocFilePos;
+ const String aTempURLStr( maDocFileURLStr );
+ const ULONG nTempPos = mnDocFilePos;
ImplClear();
@@ -1021,8 +1021,8 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
}
else
{
- ::utl::TempFile aTempFile;
- const INetURLObject aTmpURL( aTempFile.GetURL() );
+ ::utl::TempFile aTempFile;
+ const INetURLObject aTmpURL( aTempFile.GetURL() );
if( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() )
{
@@ -1030,9 +1030,9 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
if( pOStm )
{
- ULONG nFullLen = nHeaderLen + nLen;
- ULONG nPartLen = Min( nFullLen, (ULONG) GRAPHIC_MAXPARTLEN );
- BYTE* pBuffer = (BYTE*) rtl_allocateMemory( nPartLen );
+ ULONG nFullLen = nHeaderLen + nLen;
+ ULONG nPartLen = Min( nFullLen, (ULONG) GRAPHIC_MAXPARTLEN );
+ BYTE* pBuffer = (BYTE*) rtl_allocateMemory( nPartLen );
pOStm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1100,7 +1100,7 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
else if( meType >= SYS_WINMETAFILE && meType <= SYS_MACMETAFILE )
{
Graphic aSysGraphic;
- ULONG nCvtType;
+ ULONG nCvtType;
switch( sal::static_int_cast<ULONG>(meType) )
{
@@ -1145,10 +1145,10 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
if( ( meType != GRAPHIC_NONE ) && ( meType != GRAPHIC_DEFAULT ) && !ImplIsSwapOut() )
{
- const MapMode aMapMode( ImplGetPrefMapMode() );
- const Size aSize( ImplGetPrefSize() );
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- ULONG nDataFieldPos;
+ const MapMode aMapMode( ImplGetPrefMapMode() );
+ const Size aSize( ImplGetPrefSize() );
+ const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ ULONG nDataFieldPos;
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1226,8 +1226,8 @@ BOOL ImpGraphic::ImplSwapOut()
{
if( !maDocFileURLStr.Len() )
{
- ::utl::TempFile aTempFile;
- const INetURLObject aTmpURL( aTempFile.GetURL() );
+ ::utl::TempFile aTempFile;
+ const INetURLObject aTmpURL( aTempFile.GetURL() );
if( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() )
{
@@ -1418,7 +1418,7 @@ BOOL ImpGraphic::ImplIsSwapOut() const
// ------------------------------------------------------------------------
-void ImpGraphic::ImplSetLink( const GfxLink& rGfxLink )
+void ImpGraphic::ImplSetLink( const GfxLink& rGfxLink )
{
delete mpGfxLink;
mpGfxLink = new GfxLink( rGfxLink );
@@ -1503,7 +1503,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
{
if( !rIStm.GetError() )
{
- const ULONG nStmPos1 = rIStm.Tell();
+ const ULONG nStmPos1 = rIStm.Tell();
sal_uInt32 nTmp;
if ( !rImpGraphic.mbSwapUnderway )
@@ -1513,16 +1513,16 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
rIStm >> nTmp;
// if there is no more data, avoid further expensive
- // reading which will create VDevs and other stuff, just to
+ // reading which will create VDevs and other stuff, just to
// read nothing. CAUTION: Eof is only true AFTER reading another
// byte, a speciality of SvMemoryStream (!)
if(!rIStm.GetError() && !rIStm.IsEof())
{
if( NATIVE_FORMAT_50 == nTmp )
{
- Graphic aGraphic;
- GfxLink aLink;
- VersionCompat* pCompat;
+ Graphic aGraphic;
+ GfxLink aLink;
+ VersionCompat* pCompat;
// read compat info
pCompat = new VersionCompat( rIStm, STREAM_READ );
@@ -1559,8 +1559,8 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
}
else
{
- BitmapEx aBmpEx;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ BitmapEx aBmpEx;
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SeekRel( -4 );
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1568,8 +1568,8 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() )
{
- UINT32 nMagic1(0), nMagic2(0);
- ULONG nActPos = rIStm.Tell();
+ UINT32 nMagic1(0), nMagic2(0);
+ ULONG nActPos = rIStm.Tell();
rIStm >> nMagic1 >> nMagic2;
rIStm.Seek( nActPos );
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 120445f53aec..ad91356e801f 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +41,9 @@
// - Defines -
// -----------
-#define IMPSYSIMAGEITEM_MASK ( 0x01 )
-#define IMPSYSIMAGEITEM_ALPHA ( 0x02 )
-#define DISA_ALL ( 0xffff )
+#define IMPSYSIMAGEITEM_MASK ( 0x01 )
+#define IMPSYSIMAGEITEM_ALPHA ( 0x02 )
+#define DISA_ALL ( 0xffff )
// ----------------
// - ImageAryData -
@@ -254,9 +254,9 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
void ImplImageBmp::Expand( USHORT nGrowSize )
{
- const ULONG nDX = nGrowSize * maSize.Width();
- const USHORT nOldSize = mnSize;
- BYTE* pNewAry = new BYTE[ mnSize = sal::static_int_cast<USHORT>(mnSize+nGrowSize) ];
+ const ULONG nDX = nGrowSize * maSize.Width();
+ const USHORT nOldSize = mnSize;
+ BYTE* pNewAry = new BYTE[ mnSize = sal::static_int_cast<USHORT>(mnSize+nGrowSize) ];
maBmpEx.Expand( nDX, 0UL );
@@ -358,8 +358,8 @@ void ImplImageBmp::ColorTransform( BmpColorMode eColorMode )
BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
{
- const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
- BitmapEx aRet;
+ const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
+ BitmapEx aRet;
if( maBmpEx.IsAlpha() )
{
// initialize target bitmap with an empty alpha mask
@@ -374,7 +374,7 @@ BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
for( USHORT i = 0; i < nPosCount; i++ )
{
const Point aSrcPos( pPosAry[ i ] * maSize.Width(), 0L );
- const Point aPos( i * maSize.Width(), 0L );
+ const Point aPos( i * maSize.Width(), 0L );
const Rectangle aSrcRect( aSrcPos, maSize );
const Rectangle aDstRect( aPos, maSize );
@@ -393,7 +393,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
if( pOutDev->IsDeviceOutputNecessary() )
{
const Point aSrcPos( nPos * maSize.Width(), 0 );
- Size aOutSize;
+ Size aOutSize;
aOutSize = ( pSize ? *pSize : pOutDev->PixelToLogic( maSize ) );
@@ -434,15 +434,15 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
if( pAcc )
{
- const StyleSettings& rSettings = pOutDev->GetSettings().GetStyleSettings();
- Color aColor;
- BitmapColor aCol;
- const long nW = pAcc->Width();
- const long nH = pAcc->Height();
- BYTE* pMapR = new BYTE[ 256 ];
- BYTE* pMapG = new BYTE[ 256 ];
- BYTE* pMapB = new BYTE[ 256 ];
- long nX, nY;
+ const StyleSettings& rSettings = pOutDev->GetSettings().GetStyleSettings();
+ Color aColor;
+ BitmapColor aCol;
+ const long nW = pAcc->Width();
+ const long nH = pAcc->Height();
+ BYTE* pMapR = new BYTE[ 256 ];
+ BYTE* pMapG = new BYTE[ 256 ];
+ BYTE* pMapB = new BYTE[ 256 ];
+ long nX, nY;
if( nStyle & IMAGE_DRAW_HIGHLIGHT )
aColor = rSettings.GetHighlightColor();
@@ -605,7 +605,7 @@ void ImplImageBmp::ImplUpdateDisabledBmpEx( int nPos )
if( pBmp && pBmpAlphaMask && pGrey && pGreyAlphaMask )
{
- BitmapColor aGreyVal( 0 );
+ BitmapColor aGreyVal( 0 );
BitmapColor aGreyAlphaMaskVal( 0 );
const Point aPos( ( nPos < 0 ) ? 0 : ( nPos * maSize.Width() ), 0 );
const int nLeft = aPos.X(), nRight = nLeft + ( ( nPos < 0 ) ? aTotalSize.Width() : maSize.Width() );
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 54fa97e5f46f..51435965c040 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index dba961c5556f..5cd2c4c51c98 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// -----------------------------------------------------------------------------
-#define VECT_POLY_INLINE_INNER 1UL
-#define VECT_POLY_INLINE_OUTER 2UL
-#define VECT_POLY_OUTLINE_INNER 4UL
-#define VECT_POLY_OUTLINE_OUTER 8UL
+#define VECT_POLY_INLINE_INNER 1UL
+#define VECT_POLY_INLINE_OUTER 2UL
+#define VECT_POLY_OUTLINE_INNER 4UL
+#define VECT_POLY_OUTLINE_OUTER 8UL
// -----------------------------------------------------------------------------
-#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L;
-#define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1)
-#define VECT_PROGRESS( _def_pProgress, _def_nVal ) if(_def_pProgress&&_def_pProgress->IsSet())(_def_pProgress->Call((void*)_def_nVal));
+#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L;
+#define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1)
+#define VECT_PROGRESS( _def_pProgress, _def_nVal ) if(_def_pProgress&&_def_pProgress->IsSet())(_def_pProgress->Call((void*)_def_nVal));
// -----------
// - statics -
@@ -70,7 +70,7 @@
struct ChainMove { long nDX; long nDY; };
-static ChainMove aImplMove[ 8 ] = {
+static ChainMove aImplMove[ 8 ] = {
{ 1L, 0L },
{ 0L, -1L },
{ -1L, 0L },
@@ -81,7 +81,7 @@ static ChainMove aImplMove[ 8 ] = {
{ 1L, 1L }
};
-static ChainMove aImplMoveInner[ 8 ] = {
+static ChainMove aImplMoveInner[ 8 ] = {
{ 0L, 1L },
{ 1L, 0L },
{ 0L, -1L },
@@ -92,7 +92,7 @@ static ChainMove aImplMoveInner[ 8 ] = {
{ -1L, 0L }
};
-static ChainMove aImplMoveOuter[ 8 ] = {
+static ChainMove aImplMoveOuter[ 8 ] = {
{ 0L, -1L },
{ -1L, 0L },
{ 0L, 1L },
@@ -110,11 +110,11 @@ static ChainMove aImplMoveOuter[ 8 ] = {
struct ImplColorSet
{
BitmapColor maColor;
- USHORT mnIndex;
- BOOL mbSet;
+ USHORT mnIndex;
+ BOOL mbSet;
- BOOL operator<( const ImplColorSet& rSet ) const;
- BOOL operator>( const ImplColorSet& rSet ) const;
+ BOOL operator<( const ImplColorSet& rSet ) const;
+ BOOL operator>( const ImplColorSet& rSet ) const;
};
// ----------------------------------------------------------------------------
@@ -135,9 +135,9 @@ inline BOOL ImplColorSet::operator>( const ImplColorSet& rSet ) const
extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p2 )
{
- ImplColorSet* pSet1 = (ImplColorSet*) p1;
- ImplColorSet* pSet2 = (ImplColorSet*) p2;
- int nRet;
+ ImplColorSet* pSet1 = (ImplColorSet*) p1;
+ ImplColorSet* pSet2 = (ImplColorSet*) p2;
+ int nRet;
if( pSet1->mbSet && pSet2->mbSet )
{
@@ -161,32 +161,32 @@ extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p
class ImplPointArray
{
- Point* mpArray;
- ULONG mnSize;
- ULONG mnRealSize;
+ Point* mpArray;
+ ULONG mnSize;
+ ULONG mnRealSize;
public:
ImplPointArray();
~ImplPointArray();
- void ImplSetSize( ULONG nSize );
+ void ImplSetSize( ULONG nSize );
- ULONG ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
+ ULONG ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
- inline Point& operator[]( ULONG nPos );
- inline const Point& operator[]( ULONG nPos ) const;
+ inline Point& operator[]( ULONG nPos );
+ inline const Point& operator[]( ULONG nPos ) const;
- void ImplCreatePoly( Polygon& rPoly ) const;
+ void ImplCreatePoly( Polygon& rPoly ) const;
};
// -----------------------------------------------------------------------------
ImplPointArray::ImplPointArray() :
- mpArray ( NULL ),
- mnSize ( 0UL ),
- mnRealSize ( 0UL )
+ mpArray ( NULL ),
+ mnSize ( 0UL ),
+ mnRealSize ( 0UL )
{
}
@@ -246,10 +246,10 @@ class ImplVectMap
{
private:
- Scanline mpBuf;
- Scanline* mpScan;
- long mnWidth;
- long mnHeight;
+ Scanline mpBuf;
+ Scanline* mpScan;
+ long mnWidth;
+ long mnHeight;
ImplVectMap() {};
@@ -258,27 +258,27 @@ public:
ImplVectMap( long nWidth, long nHeight );
~ImplVectMap();
- inline long Width() const { return mnWidth; }
- inline long Height() const { return mnHeight; }
+ inline long Width() const { return mnWidth; }
+ inline long Height() const { return mnHeight; }
- inline void Set( long nY, long nX, BYTE cVal );
- inline BYTE Get( long nY, long nX ) const;
+ inline void Set( long nY, long nX, BYTE cVal );
+ inline BYTE Get( long nY, long nX ) const;
- inline BOOL IsFree( long nY, long nX ) const;
- inline BOOL IsCont( long nY, long nX ) const;
- inline BOOL IsDone( long nY, long nX ) const;
+ inline BOOL IsFree( long nY, long nX ) const;
+ inline BOOL IsCont( long nY, long nX ) const;
+ inline BOOL IsDone( long nY, long nX ) const;
};
// -----------------------------------------------------------------------------
ImplVectMap::ImplVectMap( long nWidth, long nHeight ) :
- mnWidth ( nWidth ),
+ mnWidth ( nWidth ),
mnHeight( nHeight )
{
- const long nWidthAl = ( nWidth >> 2L ) + 1L;
- const long nSize = nWidthAl * nHeight;
- Scanline pTmp = mpBuf = (Scanline) rtl_allocateMemory( nSize );
+ const long nWidthAl = ( nWidth >> 2L ) + 1L;
+ const long nSize = nWidthAl * nHeight;
+ Scanline pTmp = mpBuf = (Scanline) rtl_allocateMemory( nSize );
memset( mpBuf, 0, nSize );
mpScan = (Scanline*) rtl_allocateMemory( nHeight * sizeof( Scanline ) );
@@ -298,7 +298,7 @@ ImplVectMap::~ImplVectMap()
// -----------------------------------------------------------------------------
-inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
+inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
{
const BYTE cShift = sal::static_int_cast<BYTE>(6 - ( ( nX & 3 ) << 1 ));
( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift );
@@ -306,7 +306,7 @@ inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
// -----------------------------------------------------------------------------
-inline BYTE ImplVectMap::Get( long nY, long nX ) const
+inline BYTE ImplVectMap::Get( long nY, long nX ) const
{
return sal::static_int_cast<BYTE>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
}
@@ -340,38 +340,38 @@ class ImplChain
{
private:
- Polygon maPoly;
- Point maStartPt;
- ULONG mnArraySize;
- ULONG mnCount;
- long mnResize;
- BYTE* mpCodes;
+ Polygon maPoly;
+ Point maStartPt;
+ ULONG mnArraySize;
+ ULONG mnCount;
+ long mnResize;
+ BYTE* mpCodes;
- void ImplGetSpace();
+ void ImplGetSpace();
- void ImplCreate();
- void ImplCreateInner();
- void ImplCreateOuter();
- void ImplPostProcess( const ImplPointArray& rArr );
+ void ImplCreate();
+ void ImplCreateInner();
+ void ImplCreateOuter();
+ void ImplPostProcess( const ImplPointArray& rArr );
public:
ImplChain( ULONG nInitCount = 1024UL, long nResize = -1L );
~ImplChain();
- void ImplBeginAdd( const Point& rStartPt );
- inline void ImplAdd( BYTE nCode );
- void ImplEndAdd( ULONG nTypeFlag );
+ void ImplBeginAdd( const Point& rStartPt );
+ inline void ImplAdd( BYTE nCode );
+ void ImplEndAdd( ULONG nTypeFlag );
- const Polygon& ImplGetPoly() { return maPoly; }
+ const Polygon& ImplGetPoly() { return maPoly; }
};
// -----------------------------------------------------------------------------
ImplChain::ImplChain( ULONG nInitCount, long nResize ) :
- mnArraySize ( nInitCount ),
- mnCount ( 0UL ),
- mnResize ( nResize )
+ mnArraySize ( nInitCount ),
+ mnCount ( 0UL ),
+ mnResize ( nResize )
{
DBG_ASSERT( nInitCount && nResize, "ImplChain::ImplChain(): invalid parameters!" );
mpCodes = new BYTE[ mnArraySize ];
@@ -389,7 +389,7 @@ ImplChain::~ImplChain()
void ImplChain::ImplGetSpace()
{
const ULONG nOldArraySize = mnArraySize;
- BYTE* pNewCodes;
+ BYTE* pNewCodes;
mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (ULONG) mnResize );
pNewCodes = new BYTE[ mnArraySize ];
@@ -409,7 +409,7 @@ void ImplChain::ImplBeginAdd( const Point& rStartPt )
// -----------------------------------------------------------------------------
-inline void ImplChain::ImplAdd( BYTE nCode )
+inline void ImplChain::ImplAdd( BYTE nCode )
{
if( mnCount == mnArraySize )
ImplGetSpace();
@@ -437,12 +437,12 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
USHORT i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
- const ChainMove& rMove = aImplMove[ cMove ];
- const ChainMove& rMoveInner = aImplMoveInner[ cMove ];
-// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ const BYTE cMove = mpCodes[ i ];
+ const BYTE cNextMove = mpCodes[ i + 1 ];
+ const ChainMove& rMove = aImplMove[ cMove ];
+ const ChainMove& rMoveInner = aImplMoveInner[ cMove ];
+// Point& rPt = aArr[ nPolyPos ];
+ BOOL bDone = TRUE;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -544,12 +544,12 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
USHORT i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
- const ChainMove& rMove = aImplMove[ cMove ];
- const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ];
-// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ const BYTE cMove = mpCodes[ i ];
+ const BYTE cNextMove = mpCodes[ i + 1 ];
+ const ChainMove& rMove = aImplMove[ cMove ];
+ const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ];
+// Point& rPt = aArr[ nPolyPos ];
+ BOOL bDone = TRUE;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -665,13 +665,13 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
{
- ImplPointArray aNewArr1;
- ImplPointArray aNewArr2;
- Point* pLast;
- Point* pLeast;
- ULONG nNewPos;
- ULONG nCount = rArr.ImplGetRealSize();
- ULONG n;
+ ImplPointArray aNewArr1;
+ ImplPointArray aNewArr2;
+ Point* pLast;
+ Point* pLeast;
+ ULONG nNewPos;
+ ULONG nCount = rArr.ImplGetRealSize();
+ ULONG n;
// pass 1
aNewArr1.ImplSetSize( nCount );
@@ -682,8 +682,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
for( n = nNewPos = 1; n < nCount; )
{
const Point& rPt = rArr[ n++ ];
- const long nX = BACK_MAP( rPt.X() );
- const long nY = BACK_MAP( rPt.Y() );
+ const long nX = BACK_MAP( rPt.X() );
+ const long nY = BACK_MAP( rPt.Y() );
if( nX != pLast->X() || nY != pLast->Y() )
{
@@ -745,19 +745,19 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, 0 );
- Bitmap* pBmp = new Bitmap( rColorBmp );
- BitmapReadAccess* pRAcc = pBmp->AcquireReadAccess();
+ Bitmap* pBmp = new Bitmap( rColorBmp );
+ BitmapReadAccess* pRAcc = pBmp->AcquireReadAccess();
if( pRAcc )
{
- PolyPolygon aPolyPoly;
- double fPercent = 0.0;
- double fPercentStep_2 = 0.0;
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
- const USHORT nColorCount = pRAcc->GetPaletteEntryCount();
- USHORT n;
- ImplColorSet* pColorSet = (ImplColorSet*) new BYTE[ 256 * sizeof( ImplColorSet ) ];
+ PolyPolygon aPolyPoly;
+ double fPercent = 0.0;
+ double fPercentStep_2 = 0.0;
+ const long nWidth = pRAcc->Width();
+ const long nHeight = pRAcc->Height();
+ const USHORT nColorCount = pRAcc->GetPaletteEntryCount();
+ USHORT n;
+ ImplColorSet* pColorSet = (ImplColorSet*) new BYTE[ 256 * sizeof( ImplColorSet ) ];
memset( pColorSet, 0, 256 * sizeof( ImplColorSet ) );
rMtf.Clear();
@@ -786,10 +786,10 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
for( USHORT i = 0; i < n; i++ )
{
- const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
- const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
-// const BYTE cLum = aFindColor.GetLuminance();
- ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor );
+ const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
+ const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
+// const BYTE cLum = aFindColor.GetLuminance();
+ ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor );
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
@@ -822,9 +822,9 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( rMtf.GetActionCount() )
{
- MapMode aMap( MAP_100TH_MM );
- VirtualDevice aVDev;
- const Size aLogSize1( aVDev.PixelToLogic( Size( 1, 1 ), aMap ) );
+ MapMode aMap( MAP_100TH_MM );
+ VirtualDevice aVDev;
+ const Size aLogSize1( aVDev.PixelToLogic( Size( 1, 1 ), aMap ) );
rMtf.SetPrefMapMode( aMap );
rMtf.SetPrefSize( Size( nWidth + 2, nHeight + 2 ) );
@@ -847,10 +847,10 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
PolyPolygon& rPolyPoly,
ULONG nFlags, const Link* pProgress )
{
- Bitmap* pBmp = new Bitmap( rMonoBmp );
- BitmapReadAccess* pRAcc;
- ImplVectMap* pMap;
- BOOL bRet = FALSE;
+ Bitmap* pBmp = new Bitmap( rMonoBmp );
+ BitmapReadAccess* pRAcc;
+ ImplVectMap* pMap;
+ BOOL bRet = FALSE;
VECT_PROGRESS( pProgress, 10 );
@@ -886,10 +886,10 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
for( ; nCurPoly < nCount; ++nCurPoly )
{
- const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
+ const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
const sal_uInt16 nSize( rPoly.GetSize() );
- sal_uInt16 nDepth( 0 ), i( 0 );
- const bool bRight( rPoly.IsRightOrientated() );
+ sal_uInt16 nDepth( 0 ), i( 0 );
+ const bool bRight( rPoly.IsRightOrientated() );
for( ; i < nCount; ++i )
if( ( i != nCurPoly ) && rPolyPoly.GetObject( i ).IsInside( rPoly[ 0 ] ) )
@@ -899,7 +899,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
if( nSize && ( ( !bRight && !bHole ) || ( bRight && bHole ) ) )
{
- Polygon aNewPoly( nSize );
+ Polygon aNewPoly( nSize );
sal_uInt16 nPrim( 0 ), nSec( nSize - 1 );
if( rPoly.HasFlags() )
@@ -929,7 +929,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
rPolyPoly.Remove( static_cast< USHORT >( nFirstPoly ) );
rPolyPoly.Insert( aFirst, 0 );
}
-
+
bRet = TRUE;
}
@@ -945,8 +945,8 @@ void ImplVectorizer::ImplLimitPolyPoly( PolyPolygon& rPolyPoly )
if( rPolyPoly.Count() > VECT_POLY_MAX )
{
PolyPolygon aNewPolyPoly;
- long nReduce = 0;
- USHORT nNewCount;
+ long nReduce = 0;
+ USHORT nNewCount;
do
{
@@ -980,14 +980,14 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
- const long nOldWidth = pRAcc->Width();
- const long nOldHeight = pRAcc->Height();
- const long nNewWidth = ( nOldWidth << 2L ) + 4L;
- const long nNewHeight = ( nOldHeight << 2L ) + 4L;
- const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
- long* pMapIn = new long[ Max( nOldWidth, nOldHeight ) ];
- long* pMapOut = new long[ Max( nOldWidth, nOldHeight ) ];
- long nX, nY, nTmpX, nTmpY;
+ const long nOldWidth = pRAcc->Width();
+ const long nOldHeight = pRAcc->Height();
+ const long nNewWidth = ( nOldWidth << 2L ) + 4L;
+ const long nNewHeight = ( nOldHeight << 2L ) + 4L;
+ const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
+ long* pMapIn = new long[ Max( nOldWidth, nOldHeight ) ];
+ long* pMapOut = new long[ Max( nOldWidth, nOldHeight ) ];
+ long nX, nY, nTmpX, nTmpY;
pMap = new ImplVectMap( nNewWidth, nNewHeight );
@@ -1073,8 +1073,8 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
for( long nY = 0L; nY < nHeight; nY++ )
{
- long nX = 0L;
- BOOL bInner = TRUE;
+ long nX = 0L;
+ BOOL bInner = TRUE;
while( nX < nWidth )
{
@@ -1088,8 +1088,8 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
if( pMap->IsCont( nY, nX ) )
{
// new contour
- ImplChain aChain;
- const Point aStartPt( nX++, nY );
+ ImplChain aChain;
+ const Point aStartPt( nX++, nY );
// get chain code
aChain.ImplBeginAdd( aStartPt );
@@ -1106,7 +1106,7 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
{
if( cReduce )
{
- const Rectangle aBound( rPoly.GetBoundRect() );
+ const Rectangle aBound( rPoly.GetBoundRect() );
if( aBound.GetWidth() > cReduce && aBound.GetHeight() > cReduce )
rPolyPoly.Insert( rPoly );
@@ -1136,15 +1136,15 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
+BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
{
- long nActX = rStartPt.X();
- long nActY = rStartPt.Y();
- long nTryX;
- long nTryY;
- ULONG nFound;
- ULONG nLastDir = 0UL;
- ULONG nDir;
+ long nActX = rStartPt.X();
+ long nActY = rStartPt.Y();
+ long nTryX;
+ long nTryY;
+ ULONG nFound;
+ ULONG nLastDir = 0UL;
+ ULONG nDir;
do
{
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index cf81e1799494..db1213e14e9b 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class ImplVectMap;
class ImplVectorizer
{
private:
-
- ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags );
- BOOL ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- BOOL ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
- void ImplLimitPolyPoly( PolyPolygon& rPolyPoly );
-
-public:
+
+ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
+ void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags );
+ BOOL ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
+ BOOL ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
+ void ImplLimitPolyPoly( PolyPolygon& rPolyPoly );
+
+public:
ImplVectorizer();
~ImplVectorizer();
-
- BOOL ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+
+ BOOL ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
BYTE cReduce, ULONG nFlags, const Link* pProgress );
- BOOL ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
+ BOOL ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
ULONG nFlags, const Link* pProgress );
};
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 416b9db18725..5174caaffc96 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
DBG_NAME( JobSetup )
-#define JOBSET_FILEFORMAT2 3780
-#define JOBSET_FILE364_SYSTEM ((USHORT)0xFFFF)
-#define JOBSET_FILE605_SYSTEM ((USHORT)0xFFFE)
+#define JOBSET_FILEFORMAT2 3780
+#define JOBSET_FILE364_SYSTEM ((USHORT)0xFFFF)
+#define JOBSET_FILE605_SYSTEM ((USHORT)0xFFFE)
struct ImplOldJobSetupData
{
- char cPrinterName[64];
- char cDeviceName[32];
- char cPortName[32];
- char cDriverName[32];
+ char cPrinterName[64];
+ char cDeviceName[32];
+ char cPortName[32];
+ char cDriverName[32];
};
struct Impl364JobSetupData
{
- SVBT16 nSize;
- SVBT16 nSystem;
- SVBT32 nDriverDataLen;
- SVBT16 nOrientation;
- SVBT16 nPaperBin;
- SVBT16 nPaperFormat;
- SVBT32 nPaperWidth;
- SVBT32 nPaperHeight;
+ SVBT16 nSize;
+ SVBT16 nSystem;
+ SVBT32 nDriverDataLen;
+ SVBT16 nOrientation;
+ SVBT16 nPaperBin;
+ SVBT16 nPaperFormat;
+ SVBT32 nPaperWidth;
+ SVBT32 nPaperHeight;
};
// =======================================================================
ImplJobSetup::ImplJobSetup()
{
- mnRefCount = 1;
- mnSystem = 0;
- meOrientation = ORIENTATION_PORTRAIT;
+ mnRefCount = 1;
+ mnSystem = 0;
+ meOrientation = ORIENTATION_PORTRAIT;
meDuplexMode = DUPLEX_UNKNOWN;
- mnPaperBin = 0;
- mePaperFormat = PAPER_USER;
- mnPaperWidth = 0;
- mnPaperHeight = 0;
- mnDriverDataLen = 0;
- mpDriverData = NULL;
+ mnPaperBin = 0;
+ mePaperFormat = PAPER_USER;
+ mnPaperWidth = 0;
+ mnPaperHeight = 0;
+ mnDriverDataLen = 0;
+ mpDriverData = NULL;
}
// -----------------------------------------------------------------------
@@ -84,15 +84,15 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
maPrinterName( rJobSetup.maPrinterName ),
maDriver( rJobSetup.maDriver )
{
- mnRefCount = 1;
- mnSystem = rJobSetup.mnSystem;
- meOrientation = rJobSetup.meOrientation;
+ mnRefCount = 1;
+ mnSystem = rJobSetup.mnSystem;
+ meOrientation = rJobSetup.meOrientation;
meDuplexMode = rJobSetup.meDuplexMode;
- mnPaperBin = rJobSetup.mnPaperBin;
- mePaperFormat = rJobSetup.mePaperFormat;
- mnPaperWidth = rJobSetup.mnPaperWidth;
- mnPaperHeight = rJobSetup.mnPaperHeight;
- mnDriverDataLen = rJobSetup.mnDriverDataLen;
+ mnPaperBin = rJobSetup.mnPaperBin;
+ mePaperFormat = rJobSetup.mePaperFormat;
+ mnPaperWidth = rJobSetup.mnPaperWidth;
+ mnPaperHeight = rJobSetup.mnPaperHeight;
+ mnDriverDataLen = rJobSetup.mnDriverDataLen;
if ( rJobSetup.mpDriverData )
{
mpDriverData = (BYTE*)rtl_allocateMemory( mnDriverDataLen );
@@ -100,7 +100,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
}
else
mpDriverData = NULL;
- maValueMap = rJobSetup.maValueMap;
+ maValueMap = rJobSetup.maValueMap;
}
// -----------------------------------------------------------------------
@@ -271,18 +271,18 @@ BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
ImplJobSetup* pData1 = mpData;
ImplJobSetup* pData2 = rJobSetup.mpData;
- if ( (pData1->mnSystem == pData2->mnSystem) &&
- (pData1->maPrinterName == pData2->maPrinterName) &&
- (pData1->maDriver == pData2->maDriver) &&
- (pData1->meOrientation == pData2->meOrientation) &&
- (pData1->meDuplexMode == pData2->meDuplexMode) &&
- (pData1->mnPaperBin == pData2->mnPaperBin) &&
- (pData1->mePaperFormat == pData2->mePaperFormat) &&
- (pData1->mnPaperWidth == pData2->mnPaperWidth) &&
- (pData1->mnPaperHeight == pData2->mnPaperHeight) &&
- (pData1->mnDriverDataLen == pData2->mnDriverDataLen) &&
- (memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) &&
- (pData1->maValueMap == pData2->maValueMap)
+ if ( (pData1->mnSystem == pData2->mnSystem) &&
+ (pData1->maPrinterName == pData2->maPrinterName) &&
+ (pData1->maDriver == pData2->maDriver) &&
+ (pData1->meOrientation == pData2->meOrientation) &&
+ (pData1->meDuplexMode == pData2->meDuplexMode) &&
+ (pData1->mnPaperBin == pData2->mnPaperBin) &&
+ (pData1->mePaperFormat == pData2->mePaperFormat) &&
+ (pData1->mnPaperWidth == pData2->mnPaperWidth) &&
+ (pData1->mnPaperHeight == pData2->mnPaperHeight) &&
+ (pData1->mnDriverDataLen == pData2->mnDriverDataLen) &&
+ (memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) &&
+ (pData1->maValueMap == pData2->maValueMap)
)
return TRUE;
@@ -296,7 +296,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
DBG_ASSERTWARNING( rIStream.GetVersion(), "JobSetup::>> - Solar-Version not set on rOStream" );
// Zur Zeit haben wir noch kein neues FileFormat
-// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
+// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
USHORT nLen;
USHORT nSystem;
@@ -317,30 +317,30 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
else
rJobSetup.mpData->mnRefCount--;
}
-
+
rtl_TextEncoding aStreamEncoding = RTL_TEXTENCODING_UTF8;
if( nSystem == JOBSET_FILE364_SYSTEM )
aStreamEncoding = rIStream.GetStreamCharSet();
-
+
rJobSetup.mpData = new ImplJobSetup;
ImplJobSetup* pJobData = rJobSetup.mpData;
pJobData->maPrinterName = UniString( pData->cPrinterName, aStreamEncoding );
- pJobData->maDriver = UniString( pData->cDriverName, aStreamEncoding );
+ pJobData->maDriver = UniString( pData->cDriverName, aStreamEncoding );
// Sind es unsere neuen JobSetup-Daten?
if ( nSystem == JOBSET_FILE364_SYSTEM ||
nSystem == JOBSET_FILE605_SYSTEM )
{
- Impl364JobSetupData* pOldJobData = (Impl364JobSetupData*)(pTempBuf + sizeof( ImplOldJobSetupData ));
- USHORT nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
- pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
- pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
- pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
+ Impl364JobSetupData* pOldJobData = (Impl364JobSetupData*)(pTempBuf + sizeof( ImplOldJobSetupData ));
+ USHORT nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
+ pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
+ pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
+ pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
pJobData->meDuplexMode = DUPLEX_UNKNOWN;
- pJobData->mnPaperBin = SVBT16ToShort( pOldJobData->nPaperBin );
- pJobData->mePaperFormat = (Paper)SVBT16ToShort( pOldJobData->nPaperFormat );
- pJobData->mnPaperWidth = (long)SVBT32ToUInt32( pOldJobData->nPaperWidth );
- pJobData->mnPaperHeight = (long)SVBT32ToUInt32( pOldJobData->nPaperHeight );
+ pJobData->mnPaperBin = SVBT16ToShort( pOldJobData->nPaperBin );
+ pJobData->mePaperFormat = (Paper)SVBT16ToShort( pOldJobData->nPaperFormat );
+ pJobData->mnPaperWidth = (long)SVBT32ToUInt32( pOldJobData->nPaperWidth );
+ pJobData->mnPaperHeight = (long)SVBT32ToUInt32( pOldJobData->nPaperHeight );
if ( pJobData->mnDriverDataLen )
{
BYTE* pDriverData = ((BYTE*)pOldJobData) + nOldJobDataSize;
@@ -393,7 +393,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
DBG_ASSERTWARNING( rOStream.GetVersion(), "JobSetup::<< - Solar-Version not set on rOStream" );
// Zur Zeit haben wir noch kein neues FileFormat
-// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
+// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
USHORT nLen = 0;
if ( !rJobSetup.mpData )
@@ -404,7 +404,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
const ImplJobSetup* pJobData = rJobSetup.ImplGetConstData();
Impl364JobSetupData aOldJobData;
- USHORT nOldJobDataSize = sizeof( aOldJobData );
+ USHORT nOldJobDataSize = sizeof( aOldJobData );
ShortToSVBT16( nOldJobDataSize, aOldJobData.nSize );
ShortToSVBT16( pJobData->mnSystem, aOldJobData.nSystem );
UInt32ToSVBT32( pJobData->mnDriverDataLen, aOldJobData.nDriverDataLen );
@@ -420,7 +420,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
strncpy( aOldData.cPrinterName, aPrnByteName.GetBuffer(), 63 );
ByteString aDriverByteName( rJobSetup.GetDriverName(), RTL_TEXTENCODING_UTF8 );
strncpy( aOldData.cDriverName, aDriverByteName.GetBuffer(), 31 );
-// nLen = sizeof( aOldData ) + 4 + nOldJobDataSize + pJobData->mnDriverDataLen;
+// nLen = sizeof( aOldData ) + 4 + nOldJobDataSize + pJobData->mnDriverDataLen;
int nPos = rOStream.Tell();
rOStream << nLen;
rOStream << nSystem;
@@ -436,10 +436,10 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
rOStream.WriteByteString( "COMPAT_DUPLEX_MODE" ) ;
switch( pJobData->meDuplexMode )
{
- case DUPLEX_UNKNOWN: rOStream.WriteByteString( "DUPLEX_UNKNOWN" );break;
- case DUPLEX_OFF: rOStream.WriteByteString( "DUPLEX_OFF" );break;
- case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
- case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
+ case DUPLEX_UNKNOWN: rOStream.WriteByteString( "DUPLEX_UNKNOWN" );break;
+ case DUPLEX_OFF: rOStream.WriteByteString( "DUPLEX_OFF" );break;
+ case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
+ case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
}
nLen = sal::static_int_cast<USHORT>(rOStream.Tell() - nPos);
rOStream.Seek( nPos );
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index 8b97c2ecdbff..b2357d82619b 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ DBG_NAME( LineInfo )
// ----------------
ImplLineInfo::ImplLineInfo() :
- mnRefCount ( 1 ),
- meStyle ( LINE_SOLID ),
- mnWidth ( 0 ),
- mnDashCount ( 0 ),
- mnDashLen ( 0 ),
- mnDotCount ( 0 ),
- mnDotLen ( 0 ),
- mnDistance ( 0 ),
+ mnRefCount ( 1 ),
+ meStyle ( LINE_SOLID ),
+ mnWidth ( 0 ),
+ mnDashCount ( 0 ),
+ mnDashLen ( 0 ),
+ mnDotCount ( 0 ),
+ mnDotLen ( 0 ),
+ mnDistance ( 0 ),
meLineJoin ( basegfx::B2DLINEJOIN_ROUND )
{
}
@@ -59,14 +59,14 @@ ImplLineInfo::ImplLineInfo() :
// -----------------------------------------------------------------------
ImplLineInfo::ImplLineInfo( const ImplLineInfo& rImplLineInfo ) :
- mnRefCount ( 1 ),
- meStyle ( rImplLineInfo.meStyle ),
- mnWidth ( rImplLineInfo.mnWidth ),
- mnDashCount ( rImplLineInfo.mnDashCount ),
- mnDashLen ( rImplLineInfo.mnDashLen ),
- mnDotCount ( rImplLineInfo.mnDotCount ),
- mnDotLen ( rImplLineInfo.mnDotLen ),
- mnDistance ( rImplLineInfo.mnDistance ),
+ mnRefCount ( 1 ),
+ meStyle ( rImplLineInfo.meStyle ),
+ mnWidth ( rImplLineInfo.mnWidth ),
+ mnDashCount ( rImplLineInfo.mnDashCount ),
+ mnDashLen ( rImplLineInfo.mnDashLen ),
+ mnDotCount ( rImplLineInfo.mnDotCount ),
+ mnDotLen ( rImplLineInfo.mnDotLen ),
+ mnDistance ( rImplLineInfo.mnDistance ),
meLineJoin ( rImplLineInfo.meLineJoin )
{
}
@@ -113,7 +113,7 @@ LineInfo& LineInfo::operator=( const LineInfo& rLineInfo )
if( !( --mpImplLineInfo->mnRefCount ) )
delete mpImplLineInfo;
-
+
mpImplLineInfo = rLineInfo.mpImplLineInfo;
return *this;
}
@@ -228,8 +228,8 @@ void LineInfo::SetLineJoin(basegfx::B2DLineJoin eLineJoin)
SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImplLineInfo.meStyle = (LineStyle) nTmp16;
rIStm >> rImplLineInfo.mnWidth;
@@ -345,15 +345,15 @@ void LineInfo::applyToB2DPolyPolygon(
if(GetWidth() > 1 && io_rLinePolyPolygon.count())
{
const double fHalfLineWidth((GetWidth() * 0.5) + 0.5);
-
+
for(sal_uInt32 a(0); a < io_rLinePolyPolygon.count(); a++)
{
o_rFillPolyPolygon.append(basegfx::tools::createAreaGeometry(
- io_rLinePolyPolygon.getB2DPolygon(a),
- fHalfLineWidth,
+ io_rLinePolyPolygon.getB2DPolygon(a),
+ fHalfLineWidth,
GetLineJoin()));
}
-
+
io_rLinePolyPolygon.clear();
}
}
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 31486c1aad05..596734ca7891 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +65,8 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
SvStream& operator>>( SvStream& rIStm, ImplMapMode& rImplMapMode )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImplMapMode.meUnit = (MapUnit) nTmp16;
rIStm >> rImplMapMode.maOrigin >> rImplMapMode.maScaleX >>
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 6f9d1a85e510..a56756c293c0 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +89,8 @@ inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScal
#define COMPAT( _def_rIStm ) VersionCompat aCompat( ( _def_rIStm ), STREAM_READ );
#define COMPAT_VERSION() aCompat.GetVersion()
-#define WRITE_BASE_COMPAT( _def_rOStm, _def_nVer, _pWriteData ) \
- MetaAction::Write( ( _def_rOStm ), _pWriteData ); \
+#define WRITE_BASE_COMPAT( _def_rOStm, _def_nVer, _pWriteData ) \
+ MetaAction::Write( ( _def_rOStm ), _pWriteData ); \
VersionCompat aCompat( ( _def_rOStm ), STREAM_WRITE, ( _def_nVer ) );
// ========================================================================
@@ -155,7 +155,7 @@ sal_Bool MetaAction::IsEqual( const MetaAction& rMetaAction ) const
return sal_False;
else
return Compare( rMetaAction );
-}
+}
// ------------------------------------------------------------------------
@@ -176,7 +176,7 @@ void MetaAction::Read( SvStream& rIStm, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
MetaAction* pAction = NULL;
- UINT16 nType;
+ UINT16 nType;
rIStm >> nType;
@@ -259,9 +259,9 @@ IMPL_META_ACTION( Pixel, META_PIXEL_ACTION )
// ------------------------------------------------------------------------
MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
- MetaAction ( META_PIXEL_ACTION ),
- maPt ( rPt ),
- maColor ( rColor )
+ MetaAction ( META_PIXEL_ACTION ),
+ maPt ( rPt ),
+ maColor ( rColor )
{
}
@@ -328,8 +328,8 @@ IMPL_META_ACTION( Point, META_POINT_ACTION )
// ------------------------------------------------------------------------
MetaPointAction::MetaPointAction( const Point& rPt ) :
- MetaAction ( META_POINT_ACTION ),
- maPt ( rPt )
+ MetaAction ( META_POINT_ACTION ),
+ maPt ( rPt )
{
}
@@ -393,9 +393,9 @@ IMPL_META_ACTION( Line, META_LINE_ACTION )
// ------------------------------------------------------------------------
MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_LINE_ACTION ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_LINE_ACTION ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -403,10 +403,10 @@ MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
const LineInfo& rLineInfo ) :
- MetaAction ( META_LINE_ACTION ),
- maLineInfo ( rLineInfo ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_LINE_ACTION ),
+ maLineInfo ( rLineInfo ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -461,8 +461,8 @@ void MetaLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maStartPt << maEndPt; // Version 1
- rOStm << maLineInfo; // Version 2
+ rOStm << maStartPt << maEndPt; // Version 1
+ rOStm << maLineInfo; // Version 2
}
// ------------------------------------------------------------------------
@@ -488,8 +488,8 @@ IMPL_META_ACTION( Rect, META_RECT_ACTION )
// ------------------------------------------------------------------------
MetaRectAction::MetaRectAction( const Rectangle& rRect ) :
- MetaAction ( META_RECT_ACTION ),
- maRect ( rRect )
+ MetaAction ( META_RECT_ACTION ),
+ maRect ( rRect )
{
}
@@ -554,8 +554,8 @@ IMPL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION )
MetaRoundRectAction::MetaRoundRectAction( const Rectangle& rRect,
sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
- MetaAction ( META_ROUNDRECT_ACTION ),
- maRect ( rRect ),
+ MetaAction ( META_ROUNDRECT_ACTION ),
+ maRect ( rRect ),
mnHorzRound ( nHorzRound ),
mnVertRound ( nVertRound )
{
@@ -625,8 +625,8 @@ IMPL_META_ACTION( Ellipse, META_ELLIPSE_ACTION )
// ------------------------------------------------------------------------
MetaEllipseAction::MetaEllipseAction( const Rectangle& rRect ) :
- MetaAction ( META_ELLIPSE_ACTION ),
- maRect ( rRect )
+ MetaAction ( META_ELLIPSE_ACTION ),
+ maRect ( rRect )
{
}
@@ -691,10 +691,10 @@ IMPL_META_ACTION( Arc, META_ARC_ACTION )
MetaArcAction::MetaArcAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_ARC_ACTION ),
- maRect ( rRect ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_ARC_ACTION ),
+ maRect ( rRect ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -765,10 +765,10 @@ IMPL_META_ACTION( Pie, META_PIE_ACTION )
MetaPieAction::MetaPieAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_PIE_ACTION ),
- maRect ( rRect ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_PIE_ACTION ),
+ maRect ( rRect ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -839,10 +839,10 @@ IMPL_META_ACTION( Chord, META_CHORD_ACTION )
MetaChordAction::MetaChordAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_CHORD_ACTION ),
- maRect ( rRect ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_CHORD_ACTION ),
+ maRect ( rRect ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -912,17 +912,17 @@ IMPL_META_ACTION( PolyLine, META_POLYLINE_ACTION )
// ------------------------------------------------------------------------
MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly ) :
- MetaAction ( META_POLYLINE_ACTION ),
- maPoly ( rPoly )
+ MetaAction ( META_POLYLINE_ACTION ),
+ maPoly ( rPoly )
{
}
// ------------------------------------------------------------------------
MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ) :
- MetaAction ( META_POLYLINE_ACTION ),
- maLineInfo ( rLineInfo ),
- maPoly ( rPoly )
+ MetaAction ( META_POLYLINE_ACTION ),
+ maLineInfo ( rLineInfo ),
+ maPoly ( rPoly )
{
}
@@ -977,16 +977,16 @@ sal_Bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const
void MetaPolyLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
- WRITE_BASE_COMPAT( rOStm, 3, pData );
+ WRITE_BASE_COMPAT( rOStm, 3, pData );
Polygon aSimplePoly;
maPoly.AdaptiveSubdivide( aSimplePoly );
- rOStm << aSimplePoly; // Version 1
- rOStm << maLineInfo; // Version 2
+ rOStm << aSimplePoly; // Version 1
+ rOStm << maLineInfo; // Version 2
- sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 3
- rOStm << bHasPolyFlags;
+ sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 3
+ rOStm << bHasPolyFlags;
if ( bHasPolyFlags )
maPoly.Write( rOStm );
}
@@ -1019,8 +1019,8 @@ IMPL_META_ACTION( Polygon, META_POLYGON_ACTION )
// ------------------------------------------------------------------------
MetaPolygonAction::MetaPolygonAction( const Polygon& rPoly ) :
- MetaAction ( META_POLYGON_ACTION ),
- maPoly ( rPoly )
+ MetaAction ( META_POLYGON_ACTION ),
+ maPoly ( rPoly )
{
}
@@ -1067,11 +1067,11 @@ void MetaPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- Polygon aSimplePoly; // Version 1
+ Polygon aSimplePoly; // Version 1
maPoly.AdaptiveSubdivide( aSimplePoly );
- rOStm << aSimplePoly;
+ rOStm << aSimplePoly;
- sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 2
+ sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 2
rOStm << bHasPolyFlags;
if ( bHasPolyFlags )
maPoly.Write( rOStm );
@@ -1083,9 +1083,9 @@ void MetaPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> maPoly; // Version 1
+ rIStm >> maPoly; // Version 1
- if( aCompat.GetVersion() >= 2 ) // Version 2
+ if( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt8 bHasPolyFlags;
rIStm >> bHasPolyFlags;
@@ -1101,8 +1101,8 @@ IMPL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION )
// ------------------------------------------------------------------------
MetaPolyPolygonAction::MetaPolyPolygonAction( const PolyPolygon& rPolyPoly ) :
- MetaAction ( META_POLYPOLYGON_ACTION ),
- maPolyPoly ( rPolyPoly )
+ MetaAction ( META_POLYPOLYGON_ACTION ),
+ maPolyPoly ( rPolyPoly )
{
}
@@ -1153,7 +1153,7 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
sal_uInt16 nNumberOfComplexPolygons = 0;
sal_uInt16 i, nPolyCount = maPolyPoly.Count();
- Polygon aSimplePoly; // Version 1
+ Polygon aSimplePoly; // Version 1
rOStm << nPolyCount;
for ( i = 0; i < nPolyCount; i++ )
{
@@ -1164,7 +1164,7 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm << aSimplePoly;
}
- rOStm << nNumberOfComplexPolygons; // Version 2
+ rOStm << nNumberOfComplexPolygons; // Version 2
for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
{
const Polygon& rPoly = maPolyPoly.GetObject( i );
@@ -1183,9 +1183,9 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> maPolyPoly; // Version 1
-
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ rIStm >> maPolyPoly; // Version 1
+
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 i, nIndex, nNumberOfComplexPolygons;
rIStm >> nNumberOfComplexPolygons;
@@ -1207,11 +1207,11 @@ IMPL_META_ACTION( Text, META_TEXT_ACTION )
MetaTextAction::MetaTextAction( const Point& rPt, const XubString& rStr,
USHORT nIndex, USHORT nLen ) :
- MetaAction ( META_TEXT_ACTION ),
- maPt ( rPt ),
- maStr ( rStr ),
- mnIndex ( nIndex ),
- mnLen ( nLen )
+ MetaAction ( META_TEXT_ACTION ),
+ maPt ( rPt ),
+ maStr ( rStr ),
+ mnIndex ( nIndex ),
+ mnLen ( nLen )
{
}
@@ -1260,12 +1260,12 @@ sal_Bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maPt;
+ rOStm << maPt;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnIndex;
- rOStm << mnLen;
+ rOStm << mnIndex;
+ rOStm << mnLen;
- sal_uInt16 i, nLen = maStr.Len(); // version 2
+ sal_uInt16 i, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( i = 0; i < nLen; i++ )
{
@@ -1279,12 +1279,12 @@ void MetaTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
COMPAT( rIStm );
- rIStm >> maPt;
+ rIStm >> maPt;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnIndex;
- rIStm >> mnLen;
+ rIStm >> mnIndex;
+ rIStm >> mnLen;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1297,21 +1297,21 @@ void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
// ========================================================================
MetaTextArrayAction::MetaTextArrayAction() :
- MetaAction ( META_TEXTARRAY_ACTION ),
- mpDXAry ( NULL ),
- mnIndex ( 0 ),
- mnLen ( 0 )
+ MetaAction ( META_TEXTARRAY_ACTION ),
+ mpDXAry ( NULL ),
+ mnIndex ( 0 ),
+ mnLen ( 0 )
{
}
// ------------------------------------------------------------------------
MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
- MetaAction ( META_TEXTARRAY_ACTION ),
- maStartPt ( rAction.maStartPt ),
- maStr ( rAction.maStr ),
- mnIndex ( rAction.mnIndex ),
- mnLen ( rAction.mnLen )
+ MetaAction ( META_TEXTARRAY_ACTION ),
+ maStartPt ( rAction.maStartPt ),
+ maStr ( rAction.maStr ),
+ mnIndex ( rAction.mnIndex ),
+ mnLen ( rAction.mnLen )
{
if( rAction.mpDXAry )
{
@@ -1331,11 +1331,11 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const sal_Int32* pDXAry,
USHORT nIndex,
USHORT nLen ) :
- MetaAction ( META_TEXTARRAY_ACTION ),
- maStartPt ( rStartPt ),
- maStr ( rStr ),
- mnIndex ( nIndex ),
- mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
+ MetaAction ( META_TEXTARRAY_ACTION ),
+ maStartPt ( rStartPt ),
+ maStr ( rStr ),
+ mnIndex ( nIndex ),
+ mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
{
const ULONG nAryLen = pDXAry ? mnLen : 0;
@@ -1409,16 +1409,16 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
const sal_uInt32 nAryLen = mpDXAry ? mnLen : 0;
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maStartPt;
+ rOStm << maStartPt;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnIndex;
- rOStm << mnLen;
- rOStm << nAryLen;
+ rOStm << mnIndex;
+ rOStm << mnLen;
+ rOStm << nAryLen;
for( ULONG i = 0UL; i < nAryLen; i++ )
rOStm << mpDXAry[ i ];
- sal_uInt16 j, nLen = maStr.Len(); // version 2
+ sal_uInt16 j, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( j = 0; j < nLen; j++ )
{
@@ -1436,11 +1436,11 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
delete[] mpDXAry;
COMPAT( rIStm );
- rIStm >> maStartPt;
+ rIStm >> maStartPt;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnIndex;
- rIStm >> mnLen;
- rIStm >> nAryLen;
+ rIStm >> mnIndex;
+ rIStm >> mnLen;
+ rIStm >> nAryLen;
if ( mnIndex + mnLen > maStr.Len() )
{
@@ -1475,7 +1475,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
else
mpDXAry = NULL;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1500,12 +1500,12 @@ IMPL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
const XubString& rStr,
USHORT nIndex, USHORT nLen ) :
- MetaAction ( META_STRETCHTEXT_ACTION ),
- maPt ( rPt ),
- maStr ( rStr ),
- mnWidth ( nWidth ),
- mnIndex ( nIndex ),
- mnLen ( nLen )
+ MetaAction ( META_STRETCHTEXT_ACTION ),
+ maPt ( rPt ),
+ maStr ( rStr ),
+ mnWidth ( nWidth ),
+ mnIndex ( nIndex ),
+ mnLen ( nLen )
{
}
@@ -1556,13 +1556,13 @@ sal_Bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const
void MetaStretchTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maPt;
+ rOStm << maPt;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnWidth;
- rOStm << mnIndex;
- rOStm << mnLen;
+ rOStm << mnWidth;
+ rOStm << mnIndex;
+ rOStm << mnLen;
- sal_uInt16 i, nLen = maStr.Len(); // version 2
+ sal_uInt16 i, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( i = 0; i < nLen; i++ )
{
@@ -1576,13 +1576,13 @@ void MetaStretchTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaStretchTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
COMPAT( rIStm );
- rIStm >> maPt;
+ rIStm >> maPt;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnWidth;
- rIStm >> mnIndex;
- rIStm >> mnLen;
+ rIStm >> mnWidth;
+ rIStm >> mnIndex;
+ rIStm >> mnLen;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1600,10 +1600,10 @@ IMPL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
const XubString& rStr, USHORT nStyle ) :
- MetaAction ( META_TEXTRECT_ACTION ),
- maRect ( rRect ),
- maStr ( rStr ),
- mnStyle ( nStyle )
+ MetaAction ( META_TEXTRECT_ACTION ),
+ maRect ( rRect ),
+ maStr ( rStr ),
+ mnStyle ( nStyle )
{
}
@@ -1651,11 +1651,11 @@ sal_Bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maRect;
+ rOStm << maRect;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnStyle;
+ rOStm << mnStyle;
- sal_uInt16 i, nLen = maStr.Len(); // version 2
+ sal_uInt16 i, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( i = 0; i < nLen; i++ )
{
@@ -1669,11 +1669,11 @@ void MetaTextRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextRectAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
COMPAT( rIStm );
- rIStm >> maRect;
+ rIStm >> maRect;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnStyle;
+ rIStm >> mnStyle;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1693,9 +1693,9 @@ MetaTextLineAction::MetaTextLineAction( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline ) :
- MetaAction ( META_TEXTLINE_ACTION ),
- maPos ( rPos ),
- mnWidth ( nWidth ),
+ MetaAction ( META_TEXTLINE_ACTION ),
+ maPos ( rPos ),
+ mnWidth ( nWidth ),
meStrikeout ( eStrikeout ),
meUnderline ( eUnderline ),
meOverline ( eOverline )
@@ -1784,9 +1784,9 @@ IMPL_META_ACTION( Bmp, META_BMP_ACTION )
// ------------------------------------------------------------------------
MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
- MetaAction ( META_BMP_ACTION ),
- maBmp ( rBmp ),
- maPt ( rPt )
+ MetaAction ( META_BMP_ACTION ),
+ maBmp ( rBmp ),
+ maPt ( rPt )
{
}
@@ -1855,10 +1855,10 @@ IMPL_META_ACTION( BmpScale, META_BMPSCALE_ACTION )
MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp ) :
- MetaAction ( META_BMPSCALE_ACTION ),
- maBmp ( rBmp ),
- maPt ( rPt ),
- maSz ( rSz )
+ MetaAction ( META_BMPSCALE_ACTION ),
+ maBmp ( rBmp ),
+ maPt ( rPt ),
+ maSz ( rSz )
{
}
@@ -1932,12 +1932,12 @@ IMPL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION )
MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp ) :
- MetaAction ( META_BMPSCALEPART_ACTION ),
- maBmp ( rBmp ),
- maDstPt ( rDstPt ),
- maDstSz ( rDstSz ),
- maSrcPt ( rSrcPt ),
- maSrcSz ( rSrcSz )
+ MetaAction ( META_BMPSCALEPART_ACTION ),
+ maBmp ( rBmp ),
+ maDstPt ( rDstPt ),
+ maDstSz ( rDstSz ),
+ maSrcPt ( rSrcPt ),
+ maSrcSz ( rSrcSz )
{
}
@@ -2011,9 +2011,9 @@ IMPL_META_ACTION( BmpEx, META_BMPEX_ACTION )
// ------------------------------------------------------------------------
MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEX_ACTION ),
- maBmpEx ( rBmpEx ),
- maPt ( rPt )
+ MetaAction ( META_BMPEX_ACTION ),
+ maBmpEx ( rBmpEx ),
+ maPt ( rPt )
{
}
@@ -2082,10 +2082,10 @@ IMPL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION )
MetaBmpExScaleAction::MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEXSCALE_ACTION ),
- maBmpEx ( rBmpEx ),
- maPt ( rPt ),
- maSz ( rSz )
+ MetaAction ( META_BMPEXSCALE_ACTION ),
+ maBmpEx ( rBmpEx ),
+ maPt ( rPt ),
+ maSz ( rSz )
{
}
@@ -2159,12 +2159,12 @@ IMPL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION )
MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEXSCALEPART_ACTION ),
- maBmpEx ( rBmpEx ),
- maDstPt ( rDstPt ),
- maDstSz ( rDstSz ),
- maSrcPt ( rSrcPt ),
- maSrcSz ( rSrcSz )
+ MetaAction ( META_BMPEXSCALEPART_ACTION ),
+ maBmpEx ( rBmpEx ),
+ maDstPt ( rDstPt ),
+ maDstSz ( rDstSz ),
+ maSrcPt ( rSrcPt ),
+ maSrcSz ( rSrcSz )
{
}
@@ -2240,10 +2240,10 @@ IMPL_META_ACTION( Mask, META_MASK_ACTION )
MetaMaskAction::MetaMaskAction( const Point& rPt,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASK_ACTION ),
- maBmp ( rBmp ),
- maColor ( rColor ),
- maPt ( rPt )
+ MetaAction ( META_MASK_ACTION ),
+ maBmp ( rBmp ),
+ maColor ( rColor ),
+ maPt ( rPt )
{
}
@@ -2314,11 +2314,11 @@ IMPL_META_ACTION( MaskScale, META_MASKSCALE_ACTION )
MetaMaskScaleAction::MetaMaskScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASKSCALE_ACTION ),
- maBmp ( rBmp ),
- maColor ( rColor ),
- maPt ( rPt ),
- maSz ( rSz )
+ MetaAction ( META_MASKSCALE_ACTION ),
+ maBmp ( rBmp ),
+ maColor ( rColor ),
+ maPt ( rPt ),
+ maSz ( rSz )
{
}
@@ -2394,13 +2394,13 @@ MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Siz
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASKSCALEPART_ACTION ),
- maBmp ( rBmp ),
- maColor ( rColor ),
- maDstPt ( rDstPt ),
- maDstSz ( rDstSz ),
- maSrcPt ( rSrcPt ),
- maSrcSz ( rSrcSz )
+ MetaAction ( META_MASKSCALEPART_ACTION ),
+ maBmp ( rBmp ),
+ maColor ( rColor ),
+ maDstPt ( rDstPt ),
+ maDstSz ( rDstSz ),
+ maSrcPt ( rSrcPt ),
+ maSrcSz ( rSrcSz )
{
}
@@ -2479,9 +2479,9 @@ IMPL_META_ACTION( Gradient, META_GRADIENT_ACTION )
// ------------------------------------------------------------------------
MetaGradientAction::MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ) :
- MetaAction ( META_GRADIENT_ACTION ),
- maRect ( rRect ),
- maGradient ( rGradient )
+ MetaAction ( META_GRADIENT_ACTION ),
+ maRect ( rRect ),
+ maGradient ( rGradient )
{
}
@@ -2542,16 +2542,16 @@ void MetaGradientAction::Read( SvStream& rIStm, ImplMetaReadData* )
// ========================================================================
MetaGradientExAction::MetaGradientExAction() :
- MetaAction ( META_GRADIENTEX_ACTION )
+ MetaAction ( META_GRADIENTEX_ACTION )
{
}
// ------------------------------------------------------------------------
MetaGradientExAction::MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) :
- MetaAction ( META_GRADIENTEX_ACTION ),
- maPolyPoly ( rPolyPoly ),
- maGradient ( rGradient )
+ MetaAction ( META_GRADIENTEX_ACTION ),
+ maPolyPoly ( rPolyPoly ),
+ maGradient ( rGradient )
{
}
@@ -2630,9 +2630,9 @@ IMPL_META_ACTION( Hatch, META_HATCH_ACTION )
// ------------------------------------------------------------------------
MetaHatchAction::MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
- MetaAction ( META_HATCH_ACTION ),
- maPolyPoly ( rPolyPoly ),
- maHatch ( rHatch )
+ MetaAction ( META_HATCH_ACTION ),
+ maPolyPoly ( rPolyPoly ),
+ maHatch ( rHatch )
{
}
@@ -2705,8 +2705,8 @@ IMPL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION )
MetaWallpaperAction::MetaWallpaperAction( const Rectangle& rRect,
const Wallpaper& rPaper ) :
- MetaAction ( META_WALLPAPER_ACTION ),
- maRect ( rRect ),
+ MetaAction ( META_WALLPAPER_ACTION ),
+ maRect ( rRect ),
maWallpaper ( rPaper )
{
}
@@ -2772,9 +2772,9 @@ IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, BOOL bClip ) :
- MetaAction ( META_CLIPREGION_ACTION ),
- maRegion ( rRegion ),
- mbClip ( bClip )
+ MetaAction ( META_CLIPREGION_ACTION ),
+ maRegion ( rRegion ),
+ mbClip ( bClip )
{
}
@@ -2842,8 +2842,8 @@ IMPL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const Rectangle& rRect ) :
- MetaAction ( META_ISECTRECTCLIPREGION_ACTION ),
- maRect ( rRect )
+ MetaAction ( META_ISECTRECTCLIPREGION_ACTION ),
+ maRect ( rRect )
{
}
@@ -2907,8 +2907,8 @@ IMPL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const Region& rRegion ) :
- MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ),
- maRegion ( rRegion )
+ MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ),
+ maRegion ( rRegion )
{
}
@@ -2972,9 +2972,9 @@ IMPL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaMoveClipRegionAction::MetaMoveClipRegionAction( long nHorzMove, long nVertMove ) :
- MetaAction ( META_MOVECLIPREGION_ACTION ),
- mnHorzMove ( nHorzMove ),
- mnVertMove ( nVertMove )
+ MetaAction ( META_MOVECLIPREGION_ACTION ),
+ mnHorzMove ( nHorzMove ),
+ mnVertMove ( nVertMove )
{
}
@@ -3033,9 +3033,9 @@ IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
// ------------------------------------------------------------------------
MetaLineColorAction::MetaLineColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_LINECOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_LINECOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3091,9 +3091,9 @@ IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
// ------------------------------------------------------------------------
MetaFillColorAction::MetaFillColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_FILLCOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_FILLCOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3149,8 +3149,8 @@ IMPL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION )
// ------------------------------------------------------------------------
MetaTextColorAction::MetaTextColorAction( const Color& rColor ) :
- MetaAction ( META_TEXTCOLOR_ACTION ),
- maColor ( rColor )
+ MetaAction ( META_TEXTCOLOR_ACTION ),
+ maColor ( rColor )
{
}
@@ -3200,9 +3200,9 @@ IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
// ------------------------------------------------------------------------
MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_TEXTFILLCOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_TEXTFILLCOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3258,9 +3258,9 @@ IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
// ------------------------------------------------------------------------
MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_TEXTLINECOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_TEXTLINECOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3316,9 +3316,9 @@ IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
// ------------------------------------------------------------------------
MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_OVERLINECOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_OVERLINECOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3374,8 +3374,8 @@ IMPL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION )
// ------------------------------------------------------------------------
MetaTextAlignAction::MetaTextAlignAction( TextAlign aAlign ) :
- MetaAction ( META_TEXTALIGN_ACTION ),
- maAlign ( aAlign )
+ MetaAction ( META_TEXTALIGN_ACTION ),
+ maAlign ( aAlign )
{
}
@@ -3427,8 +3427,8 @@ IMPL_META_ACTION( MapMode, META_MAPMODE_ACTION )
// ------------------------------------------------------------------------
MetaMapModeAction::MetaMapModeAction( const MapMode& rMapMode ) :
- MetaAction ( META_MAPMODE_ACTION ),
- maMapMode ( rMapMode )
+ MetaAction ( META_MAPMODE_ACTION ),
+ maMapMode ( rMapMode )
{
}
@@ -3488,15 +3488,15 @@ IMPL_META_ACTION( Font, META_FONT_ACTION )
// ------------------------------------------------------------------------
MetaFontAction::MetaFontAction( const Font& rFont ) :
- MetaAction ( META_FONT_ACTION ),
- maFont ( rFont )
+ MetaAction ( META_FONT_ACTION ),
+ maFont ( rFont )
{
// #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
// we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
- // to be the right way; changing the textencoding at other sources
+ // to be the right way; changing the textencoding at other sources
// is too dangerous at the moment
if( ( ( maFont.GetName().SearchAscii( "StarSymbol" ) != STRING_NOTFOUND )
- || ( maFont.GetName().SearchAscii( "OpenSymbol" ) != STRING_NOTFOUND ) )
+ || ( maFont.GetName().SearchAscii( "OpenSymbol" ) != STRING_NOTFOUND ) )
&& ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
{
maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
@@ -3565,8 +3565,8 @@ IMPL_META_ACTION( Push, META_PUSH_ACTION )
// ------------------------------------------------------------------------
MetaPushAction::MetaPushAction( USHORT nFlags ) :
- MetaAction ( META_PUSH_ACTION ),
- mnFlags ( nFlags )
+ MetaAction ( META_PUSH_ACTION ),
+ mnFlags ( nFlags )
{
}
@@ -3650,8 +3650,8 @@ IMPL_META_ACTION( RasterOp, META_RASTEROP_ACTION )
// ------------------------------------------------------------------------
MetaRasterOpAction::MetaRasterOpAction( RasterOp eRasterOp ) :
- MetaAction ( META_RASTEROP_ACTION ),
- meRasterOp ( eRasterOp )
+ MetaAction ( META_RASTEROP_ACTION ),
+ meRasterOp ( eRasterOp )
{
}
@@ -3703,9 +3703,9 @@ IMPL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
// ------------------------------------------------------------------------
MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, USHORT nTransPercent ) :
- MetaAction ( META_TRANSPARENT_ACTION ),
- maPolyPoly ( rPolyPoly ),
- mnTransPercent ( nTransPercent )
+ MetaAction ( META_TRANSPARENT_ACTION ),
+ maPolyPoly ( rPolyPoly ),
+ mnTransPercent ( nTransPercent )
{
}
@@ -3787,11 +3787,11 @@ IMPL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION )
MetaFloatTransparentAction::MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
const Size& rSize, const Gradient& rGradient ) :
- MetaAction ( META_FLOATTRANSPARENT_ACTION ),
- maMtf ( rMtf ),
- maPoint ( rPos ),
- maSize ( rSize ),
- maGradient ( rGradient )
+ MetaAction ( META_FLOATTRANSPARENT_ACTION ),
+ maMtf ( rMtf ),
+ maPoint ( rPos ),
+ maSize ( rSize ),
+ maGradient ( rGradient )
{
}
@@ -3843,7 +3843,7 @@ sal_Bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) co
void MetaFloatTransparentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
-
+
maMtf.Write( rOStm );
rOStm << maPoint << maSize << maGradient;
}
@@ -3864,11 +3864,11 @@ IMPL_META_ACTION( EPS, META_EPS_ACTION )
MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
- MetaAction ( META_EPS_ACTION ),
- maGfxLink ( rGfxLink ),
- maSubst ( rSubst ),
- maPoint ( rPoint ),
- maSize ( rSize )
+ MetaAction ( META_EPS_ACTION ),
+ maGfxLink ( rGfxLink ),
+ maSubst ( rSubst ),
+ maPoint ( rPoint ),
+ maSize ( rSize )
{
}
@@ -3944,9 +3944,9 @@ IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
// ------------------------------------------------------------------------
MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, BOOL bSet ) :
- MetaAction ( META_REFPOINT_ACTION ),
- maRefPoint ( rRefPoint ),
- mbSet ( bSet )
+ MetaAction ( META_REFPOINT_ACTION ),
+ maRefPoint ( rRefPoint ),
+ mbSet ( bSet )
{
}
@@ -3996,8 +3996,8 @@ void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
// ========================================================================
MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
- MetaAction ( META_COMMENT_ACTION ),
- mnValue ( nValue )
+ MetaAction ( META_COMMENT_ACTION ),
+ mnValue ( nValue )
{
ImplInitDynamicData( NULL, 0UL );
}
@@ -4005,9 +4005,9 @@ MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
// ------------------------------------------------------------------------
MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
- MetaAction ( META_COMMENT_ACTION ),
- maComment ( rAct.maComment ),
- mnValue ( rAct.mnValue )
+ MetaAction ( META_COMMENT_ACTION ),
+ maComment ( rAct.maComment ),
+ mnValue ( rAct.mnValue )
{
ImplInitDynamicData( rAct.mpData, rAct.mnDataSize );
}
@@ -4015,9 +4015,9 @@ MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
// ------------------------------------------------------------------------
MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const BYTE* pData, sal_uInt32 nDataSize ) :
- MetaAction ( META_COMMENT_ACTION ),
- maComment ( rComment ),
- mnValue ( nValue )
+ MetaAction ( META_COMMENT_ACTION ),
+ maComment ( rComment ),
+ mnValue ( nValue )
{
ImplInitDynamicData( pData, nDataSize );
}
@@ -4025,8 +4025,8 @@ MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nVal
// ------------------------------------------------------------------------
MetaCommentAction::MetaCommentAction( const BYTE* pData, sal_uInt32 nDataSize ) :
- MetaAction ( META_COMMENT_ACTION ),
- mnValue ( 0L )
+ MetaAction ( META_COMMENT_ACTION ),
+ mnValue ( 0L )
{
ImplInitDynamicData( pData, nDataSize );
}
@@ -4081,8 +4081,8 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
sal_Bool bPathStroke = maComment.Equals( "XPATHSTROKE_SEQ_BEGIN" );
if ( bPathStroke || maComment.Equals( "XPATHFILL_SEQ_BEGIN" ) )
{
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
- SvMemoryStream aDest;
+ SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
+ SvMemoryStream aDest;
if ( bPathStroke )
{
SvtGraphicStroke aStroke;
@@ -4124,8 +4124,8 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
sal_Bool bPathStroke = maComment.Equals( "XPATHSTROKE_SEQ_BEGIN" );
if ( bPathStroke || maComment.Equals( "XPATHFILL_SEQ_BEGIN" ) )
{
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
- SvMemoryStream aDest;
+ SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
+ SvMemoryStream aDest;
if ( bPathStroke )
{
SvtGraphicStroke aStroke;
@@ -4149,8 +4149,8 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
delete[] mpData;
ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
} else if( maComment.Equals( "EMF_PLUS_HEADER_INFO" ) ) {
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
- SvMemoryStream aDest;
+ SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
+ SvMemoryStream aDest;
sal_Int32 nLeft, nRight, nTop, nBottom;
sal_Int32 nPixX, nPixY, nMillX, nMillY;
@@ -4226,7 +4226,7 @@ IMPL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION )
// ------------------------------------------------------------------------
MetaLayoutModeAction::MetaLayoutModeAction( sal_uInt32 nLayoutMode ) :
- MetaAction ( META_LAYOUTMODE_ACTION ),
+ MetaAction ( META_LAYOUTMODE_ACTION ),
mnLayoutMode( nLayoutMode )
{
}
@@ -4277,7 +4277,7 @@ IMPL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION )
// ------------------------------------------------------------------------
MetaTextLanguageAction::MetaTextLanguageAction( LanguageType eTextLanguage ) :
- MetaAction ( META_TEXTLANGUAGE_ACTION ),
+ MetaAction ( META_TEXTLANGUAGE_ACTION ),
meTextLanguage( eTextLanguage )
{
}
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 5a65b04391f0..64386cf33059 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -237,12 +237,12 @@ BOOL FontMetric::operator==( const FontMetric& rMetric ) const
CmapResult::CmapResult( bool bSymbolic,
const sal_uInt32* pRangeCodes, int nRangeCount,
const int* pStartGlyphs, const USHORT* pExtraGlyphIds )
-: mpRangeCodes( pRangeCodes)
-, mpStartGlyphs( pStartGlyphs)
-, mpGlyphIds( pExtraGlyphIds)
-, mnRangeCount( nRangeCount)
-, mbSymbolic( bSymbolic)
-, mbRecoded( false)
+: mpRangeCodes( pRangeCodes)
+, mpStartGlyphs( pStartGlyphs)
+, mpGlyphIds( pExtraGlyphIds)
+, mnRangeCount( nRangeCount)
+, mbSymbolic( bSymbolic)
+, mbRecoded( false)
{}
// =======================================================================
@@ -299,8 +299,8 @@ ImplFontCharMap* ImplFontCharMap::GetDefaultMap( bool bSymbols)
int nCodesCount = sizeof(aDefaultUnicodeRanges) / sizeof(*pRangeCodes);
if( bSymbols )
{
- pRangeCodes = aDefaultSymbolRanges;
- nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes);
+ pRangeCodes = aDefaultSymbolRanges;
+ nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes);
}
CmapResult aDefaultCR( bSymbols, pRangeCodes, nCodesCount/2 );
@@ -378,7 +378,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
// return -1 if the object doesn't know the glyph ids
if( !mpStartGlyphs )
return -1;
-
+
// return 0 if the unicode doesn't have a matching glyph
int nRange = ImplFindRangeIndex( cChar );
// check that we are inside any range
@@ -394,7 +394,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
// check that we are inside a range
if( (nRange & 1) != 0 )
return 0;
-
+
// get glyph index directly or indirectly
int nGlyphIndex = cChar - mpRangeCodes[ nRange ];
const int nStartIndex = mpStartGlyphs[ nRange/2 ];
@@ -534,7 +534,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
{
rResult.mpRangeCodes = NULL;
rResult.mpStartGlyphs= NULL;
- rResult.mpGlyphIds = NULL;
+ rResult.mpGlyphIds = NULL;
rResult.mnRangeCount = 0;
rResult.mbRecoded = false;
rResult.mbSymbolic = false;
@@ -797,7 +797,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
*(pOut++) = *(it++);
}
- // update the result struct
+ // update the result struct
rResult.mpRangeCodes = pCodePairs;
rResult.mpStartGlyphs = pStartGlyphs;
rResult.mnRangeCount = nRangeCount;
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 4e5f50124277..65c201d03053 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -298,7 +298,7 @@ void Octree::GetPalIndex( PNODE pNode )
InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
nBits( 8 - OCTREE_BITS )
{
- ULONG* cdp;
+ ULONG* cdp;
BYTE* crgbp;
const ULONG nColorMax = 1 << OCTREE_BITS;
const ULONG xsqr = 1 << ( nBits << 1 );
@@ -316,9 +316,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
for( ULONG nIndex = 0; nIndex < nColors; nIndex++ )
{
const BitmapColor& rColor = rPal[ (USHORT) nIndex ];
- const BYTE cRed = rColor.GetRed();
- const BYTE cGreen = rColor.GetGreen();
- const BYTE cBlue = rColor.GetBlue();
+ const BYTE cRed = rColor.GetRed();
+ const BYTE cGreen = rColor.GetGreen();
+ const BYTE cBlue = rColor.GetBlue();
rdist = cRed - x2;
gdist = cGreen - x2;
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index 4d87c06471ee..2846d8d53b6f 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +72,7 @@ void OldStylePrintAdaptor::StartPage()
mpData->maPages.back().maPageSize.Width = aPaperSize.getWidth();
mpData->maPages.back().maPageSize.Height = aPaperSize.getHeight();
getPrinter()->SetConnectMetaFile( &mpData->maPages.back().maPage );
-
+
// copy state into metafile
boost::shared_ptr<Printer> pPrinter( getPrinter() );
pPrinter->SetMapMode( pPrinter->GetMapMode() );
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 08c27603e193..5fe5755f2765 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ const char* ImplDbgCheckOutputDevice( const void* pObj )
// =======================================================================
-#define OUTDEV_POLYPOLY_STACKBUF 32
+#define OUTDEV_POLYPOLY_STACKBUF 32
// =======================================================================
@@ -221,14 +221,14 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
return true;
}
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ULONG nRectCount;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
- BOOL bClipRegion = TRUE;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ULONG nRectCount;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
+ BOOL bClipRegion = TRUE;
const BOOL bClipDeviceBounds( !pOutDev->GetPDFWriter()
&& pOutDev->GetOutDevType() != OUTDEV_PRINTER );
@@ -333,36 +333,36 @@ void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPo
if(!nPoly)
return;
- sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
- PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
- BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
- sal_uInt32* pPointAry;
- PCONSTSALPOINT* pPointAryAry;
- const BYTE** pFlagAryAry;
- USHORT i = 0, j = 0, last = 0;
- BOOL bHaveBezier = sal_False;
+ sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
+ PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
+ BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
+ sal_uInt32* pPointAry;
+ PCONSTSALPOINT* pPointAryAry;
+ const BYTE** pFlagAryAry;
+ USHORT i = 0, j = 0, last = 0;
+ BOOL bHaveBezier = sal_False;
if ( nPoly > OUTDEV_POLYPOLY_STACKBUF )
{
- pPointAry = new sal_uInt32[nPoly];
- pPointAryAry = new PCONSTSALPOINT[nPoly];
- pFlagAryAry = new const BYTE*[nPoly];
+ pPointAry = new sal_uInt32[nPoly];
+ pPointAryAry = new PCONSTSALPOINT[nPoly];
+ pFlagAryAry = new const BYTE*[nPoly];
}
else
{
- pPointAry = aStackAry1;
- pPointAryAry = aStackAry2;
- pFlagAryAry = (const BYTE**)aStackAry3;
+ pPointAry = aStackAry1;
+ pPointAryAry = aStackAry2;
+ pFlagAryAry = (const BYTE**)aStackAry3;
}
do
{
- const Polygon& rPoly = rPolyPoly.GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ const Polygon& rPoly = rPolyPoly.GetObject( i );
+ USHORT nSize = rPoly.GetSize();
if ( nSize )
{
- pPointAry[j] = nSize;
+ pPointAry[j] = nSize;
pPointAryAry[j] = (PCONSTSALPOINT)rPoly.GetConstPointAry();
pFlagAryAry[j] = rPoly.GetConstFlagAry();
- last = i;
+ last = i;
if( pFlagAryAry[j] )
bHaveBezier = sal_True;
@@ -425,81 +425,81 @@ OutputDevice::OutputDevice() :
{
DBG_CTOR( OutputDevice, ImplDbgCheckOutputDevice );
- mpGraphics = NULL;
- mpUnoGraphicsList = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
- mpMetaFile = NULL;
- mpFontEntry = NULL;
- mpFontCache = NULL;
- mpFontList = NULL;
- mpGetDevFontList = NULL;
- mpGetDevSizeList = NULL;
- mpObjStack = NULL;
- mpOutDevData = NULL;
- mpPDFWriter = NULL;
- mpAlphaVDev = NULL;
- mpExtOutDevData = NULL;
- mnOutOffX = 0;
- mnOutOffY = 0;
- mnOutWidth = 0;
- mnOutHeight = 0;
- mnDPIX = 0;
- mnDPIY = 0;
- mnTextOffX = 0;
- mnTextOffY = 0;
- mnOutOffOrigX = 0;
- mnOutOffLogicX = 0;
- mnOutOffOrigY = 0;
- mnOutOffLogicY = 0;
- mnEmphasisAscent = 0;
- mnEmphasisDescent = 0;
- mnDrawMode = 0;
+ mpGraphics = NULL;
+ mpUnoGraphicsList = NULL;
+ mpPrevGraphics = NULL;
+ mpNextGraphics = NULL;
+ mpMetaFile = NULL;
+ mpFontEntry = NULL;
+ mpFontCache = NULL;
+ mpFontList = NULL;
+ mpGetDevFontList = NULL;
+ mpGetDevSizeList = NULL;
+ mpObjStack = NULL;
+ mpOutDevData = NULL;
+ mpPDFWriter = NULL;
+ mpAlphaVDev = NULL;
+ mpExtOutDevData = NULL;
+ mnOutOffX = 0;
+ mnOutOffY = 0;
+ mnOutWidth = 0;
+ mnOutHeight = 0;
+ mnDPIX = 0;
+ mnDPIY = 0;
+ mnTextOffX = 0;
+ mnTextOffY = 0;
+ mnOutOffOrigX = 0;
+ mnOutOffLogicX = 0;
+ mnOutOffOrigY = 0;
+ mnOutOffLogicY = 0;
+ mnEmphasisAscent = 0;
+ mnEmphasisDescent = 0;
+ mnDrawMode = 0;
mnTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if( Application::GetSettings().GetLayoutRTL() ) //#i84553# tip BiDi preference to RTL
mnTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
- meOutDevType = OUTDEV_DONTKNOW;
+ meOutDevType = OUTDEV_DONTKNOW;
meOutDevViewType = OUTDEV_VIEWTYPE_DONTKNOW;
- mbMap = FALSE;
- mbMapIsDefault = TRUE;
- mbClipRegion = FALSE;
- mbBackground = FALSE;
- mbOutput = TRUE;
- mbDevOutput = FALSE;
- mbOutputClipped = FALSE;
- maTextColor = Color( COL_BLACK );
- maOverlineColor = Color( COL_TRANSPARENT );
- meTextAlign = maFont.GetAlign();
- meRasterOp = ROP_OVERPAINT;
- mnAntialiasing = 0;
+ mbMap = FALSE;
+ mbMapIsDefault = TRUE;
+ mbClipRegion = FALSE;
+ mbBackground = FALSE;
+ mbOutput = TRUE;
+ mbDevOutput = FALSE;
+ mbOutputClipped = FALSE;
+ maTextColor = Color( COL_BLACK );
+ maOverlineColor = Color( COL_TRANSPARENT );
+ meTextAlign = maFont.GetAlign();
+ meRasterOp = ROP_OVERPAINT;
+ mnAntialiasing = 0;
meTextLanguage = 0; // TODO: get default from configuration?
- mbLineColor = TRUE;
- mbFillColor = TRUE;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
- mbClipRegionSet = FALSE;
- mbKerning = FALSE;
- mbNewFont = TRUE;
- mbTextLines = FALSE;
- mbTextSpecial = FALSE;
- mbRefPoint = FALSE;
+ mbLineColor = TRUE;
+ mbFillColor = TRUE;
+ mbInitLineColor = TRUE;
+ mbInitFillColor = TRUE;
+ mbInitFont = TRUE;
+ mbInitTextColor = TRUE;
+ mbInitClipRegion = TRUE;
+ mbClipRegionSet = FALSE;
+ mbKerning = FALSE;
+ mbNewFont = TRUE;
+ mbTextLines = FALSE;
+ mbTextSpecial = FALSE;
+ mbRefPoint = FALSE;
mbEnableRTL = FALSE; // mirroring must be explicitly allowed (typically for windows only)
// struct ImplMapRes
- maMapRes.mnMapOfsX = 0;
- maMapRes.mnMapOfsY = 0;
- maMapRes.mnMapScNumX = 1;
- maMapRes.mnMapScNumY = 1;
- maMapRes.mnMapScDenomX = 1;
- maMapRes.mnMapScDenomY = 1;
+ maMapRes.mnMapOfsX = 0;
+ maMapRes.mnMapOfsY = 0;
+ maMapRes.mnMapScNumX = 1;
+ maMapRes.mnMapScNumY = 1;
+ maMapRes.mnMapScDenomX = 1;
+ maMapRes.mnMapScDenomY = 1;
// struct ImplThresholdRes
- maThresRes.mnThresLogToPixX = 0;
- maThresRes.mnThresLogToPixY = 0;
- maThresRes.mnThresPixToLogX = 0;
- maThresRes.mnThresPixToLogY = 0;
+ maThresRes.mnThresLogToPixX = 0;
+ maThresRes.mnThresLogToPixY = 0;
+ maThresRes.mnThresPixToLogX = 0;
+ maThresRes.mnThresPixToLogY = 0;
}
// -----------------------------------------------------------------------
@@ -597,7 +597,7 @@ void OutputDevice::EnableRTL( BOOL bEnable )
Window* pWin = dynamic_cast<Window*>(this);
if( pWin )
pWin->StateChanged( STATE_CHANGE_MIRRORING );
-
+
if( mpAlphaVDev )
mpAlphaVDev->EnableRTL( bEnable );
}
@@ -630,12 +630,12 @@ void OutputDevice::ImplReMirror( Rectangle &rRect ) const
}
void OutputDevice::ImplReMirror( Region &rRegion ) const
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
Region aMirroredRegion;
bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -659,11 +659,11 @@ int OutputDevice::ImplGetGraphics() const
if ( mpGraphics )
return TRUE;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
+ mbInitLineColor = TRUE;
+ mbInitFillColor = TRUE;
+ mbInitFont = TRUE;
+ mbInitTextColor = TRUE;
+ mbInitClipRegion = TRUE;
ImplSVData* pSVData = ImplGetSVData();
if ( meOutDevType == OUTDEV_WINDOW )
@@ -917,9 +917,9 @@ void OutputDevice::ImplReleaseGraphics( BOOL bRelease )
}
}
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = NULL;
+ mpPrevGraphics = NULL;
+ mpNextGraphics = NULL;
}
// -----------------------------------------------------------------------
@@ -1037,7 +1037,7 @@ void OutputDevice::ImplInitClipRegion()
if ( GetOutDevType() == OUTDEV_WINDOW )
{
Window* pWindow = (Window*)this;
- Region aRegion;
+ Region aRegion;
// Hintergrund-Sicherung zuruecksetzen
if ( pWindow->mpWindowImpl->mpFrameData->mpFirstBackWin )
@@ -1104,16 +1104,16 @@ void OutputDevice::ImplSetClipRegion( const Region* pRegion )
{
if ( mbClipRegion )
{
- maRegion = Region( REGION_NULL );
- mbClipRegion = FALSE;
- mbInitClipRegion = TRUE;
+ maRegion = Region( REGION_NULL );
+ mbClipRegion = FALSE;
+ mbInitClipRegion = TRUE;
}
}
else
{
- maRegion = *pRegion;
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ maRegion = *pRegion;
+ mbClipRegion = TRUE;
+ mbInitClipRegion = TRUE;
}
}
@@ -1142,8 +1142,8 @@ namespace
return 0x80000000;
if(a >= 0)
return a / b;
- int q = -(-a / b); // quotient
- int r = -a % b; // remainder
+ int q = -(-a / b); // quotient
+ int r = -a % b; // remainder
if(r)
q--;
return q;
@@ -1155,7 +1155,7 @@ namespace
return 0x80000000;
if(a >= 0)
return a % b;
- int r = -a % b; // remainder
+ int r = -a % b; // remainder
if(r)
r = b - r;
return r;
@@ -1168,8 +1168,8 @@ namespace
a += - 1 + b;
if(a >= 0)
return a / b;
- int q = -(-a / b); // quotient
- int r = -a % b; // remainder
+ int q = -(-a / b); // quotient
+ int r = -a % b; // remainder
if(r)
q--;
return q;
@@ -1940,8 +1940,8 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
Rectangle aRect = LogicToPixel( rRect );
maRegion.Intersect( aRect );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = TRUE;
+ mbInitClipRegion = TRUE;
if( mpAlphaVDev )
mpAlphaVDev->IntersectClipRegion( rRect );
@@ -1964,8 +1964,8 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
Region aRegion = LogicToPixel( rRegion );
maRegion.Intersect( aRegion );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = TRUE;
+ mbInitClipRegion = TRUE;
}
if( mpAlphaVDev )
@@ -2284,7 +2284,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
ImplInitLineColor();
// #i101598# support AA and snap for lines, too
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor())
@@ -2325,7 +2325,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
const LineInfo& rInfo,
basegfx::B2DPolyPolygon aLinePolyPolygon)
{
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
@@ -2381,19 +2381,19 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
// #i110768# When area geometry has to be created, do not
// use the fallback bezier decomposition inside createAreaGeometry,
// but one that is at least as good as ImplSubdivideBezier was.
- // There, Polygon::AdaptiveSubdivide was used with default parameter
+ // There, Polygon::AdaptiveSubdivide was used with default parameter
// 1.0 as quality index.
aLinePolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0);
}
-
+
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
aFillPolyPolygon.append(basegfx::tools::createAreaGeometry(
- aLinePolyPolygon.getB2DPolygon(a),
- fHalfLineWidth,
+ aLinePolyPolygon.getB2DPolygon(a),
+ fHalfLineWidth,
rInfo.GetLineJoin()));
}
-
+
aLinePolyPolygon.clear();
}
@@ -2422,8 +2422,8 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
if(aFillPolyPolygon.count())
{
- const Color aOldLineColor( maLineColor );
- const Color aOldFillColor( maFillColor );
+ const Color aOldLineColor( maLineColor );
+ const Color aOldFillColor( maFillColor );
SetLineColor();
ImplInitLineColor();
@@ -2431,7 +2431,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
ImplInitFillColor();
bool bDone(false);
-
+
if(bTryAA)
{
bDone = mpGraphics->DrawPolyPolygon(aFillPolyPolygon, 0.0, this);
@@ -2445,7 +2445,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
mpGraphics->DrawPolygon(aPolygon.GetSize(), (const SalPoint*)aPolygon.GetConstPointAry(), this);
}
}
-
+
SetFillColor( aOldFillColor );
SetLineColor( aOldLineColor );
}
@@ -2578,7 +2578,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
if ( mbInitLineColor )
ImplInitLineColor();
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
@@ -2643,7 +2643,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo
// #i101491#
// Try direct Fallback to B2D-Version of DrawPolyLine
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& LINE_SOLID == rLineInfo.GetStyle())
{
DrawPolyLine( rPoly.getB2DPolygon(), (double)rLineInfo.GetWidth(), rLineInfo.GetLineJoin());
@@ -2666,7 +2666,7 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI
Polygon aPoly = ImplLogicToDevicePixel( rPoly );
// #100127# LineInfo is not curve-safe, subdivide always
- //
+ //
// What shall this mean? It's wrong to subdivide here when the
// polygon is a fat line. In that case, the painted geometry
// WILL be much different.
@@ -2711,7 +2711,7 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI
aPoly = ImplSubdivideBezier( aPoly );
nPoints = aPoly.GetSize();
}
-
+
mpGraphics->DrawPolyLine(nPoints, (const SalPoint*)aPoly.GetConstPointAry(), this);
}
@@ -2751,7 +2751,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
ImplInitFillColor();
// use b2dpolygon drawing if possible
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& (IsLineColor() || IsFillColor()))
@@ -2841,7 +2841,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
ImplInitFillColor();
// use b2dpolygon drawing if possible
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& (IsLineColor() || IsFillColor()))
@@ -2956,7 +2956,7 @@ void OutputDevice::ImpDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPo
if( mbInitFillColor )
ImplInitFillColor();
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& (IsLineColor() || IsFillColor()))
@@ -3010,7 +3010,7 @@ bool OutputDevice::ImpTryDrawPolyLineDirect(
{
const basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
basegfx::B2DVector aB2DLineWidth(1.0, 1.0);
-
+
// transform the line width if used
if( fLineWidth != 0.0 )
{
@@ -3020,8 +3020,8 @@ bool OutputDevice::ImpTryDrawPolyLineDirect(
// transform the polygon
basegfx::B2DPolygon aB2DPolygon(rB2DPolygon);
aB2DPolygon.transform(aTransform);
-
- if((mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE)
+
+ if((mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE)
&& aB2DPolygon.count() < 1000)
{
// #i98289#, #i101491#
@@ -3071,7 +3071,7 @@ void OutputDevice::DrawPolyLine(
if( mbInitLineColor )
ImplInitLineColor();
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
@@ -3086,7 +3086,7 @@ void OutputDevice::DrawPolyLine(
// no output yet; fallback to geometry decomposition and use filled polygon paint
// when line is fat and not too complex. ImpDrawPolyPolygonWithB2DPolyPolygon
// will do internal needed AA checks etc.
- if(fLineWidth >= 2.5
+ if(fLineWidth >= 2.5
&& rB2DPolygon.count()
&& rB2DPolygon.count() <= 1000)
{
@@ -3234,8 +3234,8 @@ void OutputDevice::Pop()
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPopAction() );
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- ImplObjStack* pData = mpObjStack;
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ ImplObjStack* pData = mpObjStack;
mpMetaFile = NULL;
if ( !pData )
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index 4cae28705edf..271bebb92051 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +64,23 @@ DBG_NAMEEX( OutputDevice )
// - Defines -
// -----------
-#define OUTDEV_INIT() \
-{ \
- if ( !IsDeviceOutputNecessary() ) \
- return; \
+#define OUTDEV_INIT() \
+{ \
+ if ( !IsDeviceOutputNecessary() ) \
+ return; \
\
- if ( !mpGraphics ) \
- if ( !ImplGetGraphics() ) \
- return; \
+ if ( !mpGraphics ) \
+ if ( !ImplGetGraphics() ) \
+ return; \
\
- if ( mbInitClipRegion ) \
- ImplInitClipRegion(); \
+ if ( mbInitClipRegion ) \
+ ImplInitClipRegion(); \
\
- if ( mbOutputClipped ) \
- return; \
+ if ( mbOutputClipped ) \
+ return; \
}
-#define TwoRect SalTwoRect
+#define TwoRect SalTwoRect
// -------------
// - externals -
@@ -115,13 +115,13 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
}
if( ( rTwoRect.mnSrcX < 0 ) || ( rTwoRect.mnSrcX >= rSizePix.Width() ) ||
- ( rTwoRect.mnSrcY < 0 ) || ( rTwoRect.mnSrcY >= rSizePix.Height() ) ||
+ ( rTwoRect.mnSrcY < 0 ) || ( rTwoRect.mnSrcY >= rSizePix.Height() ) ||
( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rSizePix.Width() ) ||
( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rSizePix.Height() ) )
{
- const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
+ const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) );
- Rectangle aCropRect( aSourceRect );
+ Rectangle aCropRect( aSourceRect );
aCropRect.Intersection( Rectangle( Point(), rSizePix ) );
@@ -129,8 +129,8 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
rTwoRect.mnSrcWidth = rTwoRect.mnSrcHeight = rTwoRect.mnDestWidth = rTwoRect.mnDestHeight = 0;
else
{
- const double fFactorX = ( rTwoRect.mnSrcWidth > 1 ) ? (double) ( rTwoRect.mnDestWidth - 1 ) / ( rTwoRect.mnSrcWidth - 1 ) : 0.0;
- const double fFactorY = ( rTwoRect.mnSrcHeight > 1 ) ? (double) ( rTwoRect.mnDestHeight - 1 ) / ( rTwoRect.mnSrcHeight - 1 ) : 0.0;
+ const double fFactorX = ( rTwoRect.mnSrcWidth > 1 ) ? (double) ( rTwoRect.mnDestWidth - 1 ) / ( rTwoRect.mnSrcWidth - 1 ) : 0.0;
+ const double fFactorY = ( rTwoRect.mnSrcHeight > 1 ) ? (double) ( rTwoRect.mnDestHeight - 1 ) / ( rTwoRect.mnSrcHeight - 1 ) : 0.0;
const long nDstX1 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Left() - rTwoRect.mnSrcX ) );
const long nDstY1 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Top() - rTwoRect.mnSrcY ) );
@@ -155,8 +155,8 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoidPosAry )
{
- TwoRect* pPosAry = (TwoRect*)pVoidPosAry;
- SalGraphics* pGraphics2;
+ TwoRect* pPosAry = (TwoRect*)pVoidPosAry;
+ SalGraphics* pGraphics2;
if ( pPosAry->mnSrcWidth && pPosAry->mnSrcHeight && pPosAry->mnDestWidth && pPosAry->mnDestHeight )
{
@@ -199,12 +199,12 @@ void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoi
}
// #102532# Offset only has to be pseudo window offset
- Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ),
+ Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ),
Size( pSrcDev->mnOutWidth, pSrcDev->mnOutHeight ) );
- Rectangle aSrcRect( Point( pPosAry->mnSrcX, pPosAry->mnSrcY ),
+ Rectangle aSrcRect( Point( pPosAry->mnSrcX, pPosAry->mnSrcY ),
Size( pPosAry->mnSrcWidth, pPosAry->mnSrcHeight ) );
- const long nOldRight = aSrcRect.Right();
- const long nOldBottom = aSrcRect.Bottom();
+ const long nOldRight = aSrcRect.Right();
+ const long nOldBottom = aSrcRect.Bottom();
if ( !aSrcRect.Intersection( aSrcOutRect ).IsEmpty() )
{
@@ -229,7 +229,7 @@ void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoi
if( (GetOutDevType() != OUTDEV_WINDOW) && pGraphics2 && (pGraphics2->GetLayout() & SAL_LAYOUT_BIDI_RTL) )
{
SalTwoRect pPosAry2 = *pPosAry;
- pGraphics2->mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcDev );
+ pGraphics2->mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcDev );
mpGraphics->CopyBits( &pPosAry2, pGraphics2, this, pSrcDev );
}
else
@@ -268,24 +268,24 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
OUTDEV_INIT();
TwoRect aPosAry;
- aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
aPosAry.mnSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
- aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
- aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
- aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
+ aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
+ aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
- Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
+ Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
- Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
+ Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
Size( aPosAry.mnSrcWidth, aPosAry.mnSrcHeight ) );
- long nOldRight = aSrcRect.Right();
- long nOldBottom = aSrcRect.Bottom();
+ long nOldRight = aSrcRect.Right();
+ long nOldBottom = aSrcRect.Bottom();
if ( !aSrcRect.Intersection( aSrcOutRect ).IsEmpty() )
{
@@ -341,12 +341,12 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
OUTDEV_INIT();
TwoRect aPosAry;
- aPosAry.mnSrcX = rOutDev.ImplLogicXToDevicePixel( rSrcPt.X() );
- aPosAry.mnSrcY = rOutDev.ImplLogicYToDevicePixel( rSrcPt.Y() );
- aPosAry.mnSrcWidth = rOutDev.ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ aPosAry.mnSrcX = rOutDev.ImplLogicXToDevicePixel( rSrcPt.X() );
+ aPosAry.mnSrcY = rOutDev.ImplLogicYToDevicePixel( rSrcPt.Y() );
+ aPosAry.mnSrcWidth = rOutDev.ImplLogicWidthToDevicePixel( rSrcSize.Width() );
aPosAry.mnSrcHeight = rOutDev.ImplLogicHeightToDevicePixel( rSrcSize.Height() );
- aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
- aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
+ aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
+ aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
@@ -403,22 +403,22 @@ void OutputDevice::CopyArea( const Point& rDestPt,
OUTDEV_INIT();
TwoRect aPosAry;
- aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
aPosAry.mnSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight )
{
- aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
- aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
- aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
+ aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
+ aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
- Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
+ Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
- Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
+ Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
Size( aPosAry.mnSrcWidth, aPosAry.mnSrcHeight ) );
- long nOldRight = aSrcRect.Right();
- long nOldBottom = aSrcRect.Bottom();
+ long nOldRight = aSrcRect.Right();
+ long nOldBottom = aSrcRect.Bottom();
if ( !aSrcRect.Intersection( aSrcOutRect ).IsEmpty() )
{
@@ -462,9 +462,9 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
- RasterOp eOldROP = GetRasterOp();
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ BOOL bOldMap = mbMap;
+ RasterOp eOldROP = GetRasterOp();
mpMetaFile = NULL;
mbMap = FALSE;
SetRasterOp( ROP_OVERPAINT );
@@ -485,12 +485,12 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
ImplSelectClipRegion( rRegion );
TwoRect aPosAry;
- aPosAry.mnSrcX = rDevPt.X();
- aPosAry.mnSrcY = rDevPt.Y();
- aPosAry.mnSrcWidth = rDevSize.Width();
+ aPosAry.mnSrcX = rDevPt.X();
+ aPosAry.mnSrcY = rDevPt.Y();
+ aPosAry.mnSrcWidth = rDevSize.Width();
aPosAry.mnSrcHeight = rDevSize.Height();
- aPosAry.mnDestX = rPt.X();
- aPosAry.mnDestY = rPt.Y();
+ aPosAry.mnDestX = rPt.X();
+ aPosAry.mnDestY = rPt.Y();
aPosAry.mnDestWidth = rDevSize.Width();
aPosAry.mnDestHeight = rDevSize.Height();
ImplDrawOutDevDirect( &rOutDev, &aPosAry );
@@ -590,7 +590,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
}
- else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
+ else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP ) )
{
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
@@ -660,7 +660,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
{
if ( nMirrFlags )
aBmp.Mirror( nMirrFlags );
-
+
/* #i75264# (corrected with #i81576#)
* sometimes a bitmap is scaled to a ridiculous size and drawn
* to a quite normal VDev, so only a very small part of
@@ -690,7 +690,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
if( aPosAry.mnDestWidth > 3*mnOutWidth && aPosAry.mnSrcWidth )
{
const double nScaleX = aPosAry.mnDestWidth/double(aPosAry.mnSrcWidth);
-
+
if( aPosAry.mnDestX + aPosAry.mnDestWidth > mnOutWidth )
{
aPosAry.mnDestWidth = Max(long(0),mnOutWidth-aPosAry.mnDestX);
@@ -701,14 +701,14 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnSrcX -= sal::static_int_cast<long>(aPosAry.mnDestX / nScaleX);
aPosAry.mnDestX = 0;
}
-
+
aPosAry.mnSrcWidth = sal::static_int_cast<long>(aPosAry.mnDestWidth / nScaleX);
}
-
+
if( aPosAry.mnDestHeight > 3*mnOutHeight && aPosAry.mnSrcHeight != 0 )
{
const double nScaleY = aPosAry.mnDestHeight/double(aPosAry.mnSrcHeight);
-
+
if( aPosAry.mnDestY + aPosAry.mnDestHeight > mnOutHeight )
{
aPosAry.mnDestHeight = Max(long(0),mnOutHeight-aPosAry.mnDestY);
@@ -719,7 +719,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnSrcY -= sal::static_int_cast<long>(aPosAry.mnDestY / nScaleY);
aPosAry.mnDestY = 0;
}
-
+
aPosAry.mnSrcHeight = sal::static_int_cast<long>(aPosAry.mnDestHeight / nScaleY);
}
}
@@ -801,13 +801,13 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
}
- else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
+ else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP ) )
{
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
{
- Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
- BYTE cCmpVal;
+ Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
+ BYTE cCmpVal;
if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
@@ -947,7 +947,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
aPosAry.mnDestHeight == aPosAry.mnSrcHeight )
{
// now intersect dest rect with clip region
- aClipRegionBounds.Intersection( Rectangle( aPosAry.mnDestX,
+ aClipRegionBounds.Intersection( Rectangle( aPosAry.mnDestX,
aPosAry.mnDestY,
aPosAry.mnDestX + aPosAry.mnDestWidth - 1,
aPosAry.mnDestY + aPosAry.mnDestHeight - 1 ) );
@@ -962,7 +962,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
aPosAry.mnSrcY += aClipRegionBounds.Top() - aPosAry.mnDestY;
aPosAry.mnSrcWidth = aClipRegionBounds.GetWidth();
aPosAry.mnSrcHeight = aClipRegionBounds.GetHeight();
-
+
aPosAry.mnDestX = aClipRegionBounds.Left();
aPosAry.mnDestY = aClipRegionBounds.Top();
aPosAry.mnDestWidth = aClipRegionBounds.GetWidth();
@@ -970,13 +970,13 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
}
}
- mpGraphics->DrawBitmap( &aPosAry, *pImpBmp->ImplGetSalBitmap(),
- *pMaskBmp->ImplGetSalBitmap(),
+ mpGraphics->DrawBitmap( &aPosAry, *pImpBmp->ImplGetSalBitmap(),
+ *pMaskBmp->ImplGetSalBitmap(),
this );
// #110958# Paint mask to alpha channel. Luckily, the
// black and white representation of the mask maps to
- // the alpha channel
+ // the alpha channel
// #i25167# Restrict mask painting to _opaque_ areas
// of the mask, otherwise we spoil areas where no
@@ -984,8 +984,8 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
if( mpAlphaVDev )
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- rDestSize,
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ rDestSize,
BitmapEx( aBmpEx.GetMask(),
aBmpEx.GetMask() ) );
}
@@ -1025,8 +1025,8 @@ void OutputDevice::DrawMask( const Point& rDestPt,
// bitmap content was ever visible. Interestingly
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- PixelToLogic( aSizePix ),
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ PixelToLogic( aSizePix ),
BitmapEx( rMask, rMask ) );
}
}
@@ -1053,8 +1053,8 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
// bitmap content was ever visible. Interestingly
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- rDestSize,
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ rDestSize,
BitmapEx( rMask, rMask ) );
}
}
@@ -1082,9 +1082,9 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
// bitmap content was ever visible. Interestingly
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- rDestSize,
- rSrcPtPixel,
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ rDestSize,
+ rSrcPtPixel,
rSrcSizePixel,
BitmapEx( rMask, rMask ) );
}
@@ -1175,10 +1175,10 @@ void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nStyle )
{
DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );
-
+
if( !rImage.mpImplData || ImplIsRecordLayout() )
return;
-
+
switch( rImage.mpImplData->meType )
{
case IMAGETYPE_BITMAP:
@@ -1192,7 +1192,7 @@ void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nSt
if( !pData->mpImageBitmap )
{
const Size aSize( pData->maBmpEx.GetSizePixel() );
-
+
pData->mpImageBitmap = new ImplImageBmp;
pData->mpImageBitmap->Create( pData->maBmpEx, aSize.Width(), aSize.Height(), 1 );
}
@@ -1220,23 +1220,23 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
case IMAGETYPE_BITMAP:
DrawBitmap( rPos, rSize, *static_cast< Bitmap* >( rImage.mpImplData->mpData ) );
break;
-
+
case IMAGETYPE_IMAGE:
{
ImplImageData* pData = static_cast< ImplImageData* >( rImage.mpImplData->mpData );
-
+
if ( !pData->mpImageBitmap )
{
const Size aSize( pData->maBmpEx.GetSizePixel() );
-
+
pData->mpImageBitmap = new ImplImageBmp;
pData->mpImageBitmap->Create( pData->maBmpEx, aSize.Width(), aSize.Height(), 1 );
}
-
+
pData->mpImageBitmap->Draw( 0, this, rPos, nStyle, &rSize );
}
break;
-
+
default:
break;
}
@@ -1249,18 +1249,18 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- Bitmap aBmp;
- long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
- long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() );
- long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() );
+ Bitmap aBmp;
+ long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() );
+ long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() );
if ( mpGraphics || ( (OutputDevice*) this )->ImplGetGraphics() )
{
if ( nWidth && nHeight )
{
- Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- BOOL bClipped = FALSE;
+ Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
+ BOOL bClipped = FALSE;
// X-Koordinate ausserhalb des Bereichs?
if ( nX < mnOutOffX )
@@ -1281,7 +1281,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
// Breite ausserhalb des Bereichs?
if ( (nWidth + nX) > (mnOutWidth + mnOutOffX) )
{
- nWidth = mnOutOffX + mnOutWidth - nX;
+ nWidth = mnOutOffX + mnOutWidth - nX;
bClipped = TRUE;
}
@@ -1393,9 +1393,9 @@ Color OutputDevice::GetPixel( const Point& rPt ) const
if ( !mbOutputClipped )
{
- const long nX = ImplLogicXToDevicePixel( rPt.X() );
- const long nY = ImplLogicYToDevicePixel( rPt.Y() );
- const SalColor aSalCol = mpGraphics->GetPixel( nX, nY, this );
+ const long nX = ImplLogicXToDevicePixel( rPt.X() );
+ const long nY = ImplLogicYToDevicePixel( rPt.Y() );
+ const SalColor aSalCol = mpGraphics->GetPixel( nX, nY, this );
aColor.SetRed( SALCOLOR_RED( aSalCol ) );
aColor.SetGreen( SALCOLOR_GREEN( aSalCol ) );
aColor.SetBlue( SALCOLOR_BLUE( aSalCol ) );
@@ -1410,8 +1410,8 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- Color* pColors = NULL;
- const USHORT nSize = rPts.GetSize();
+ Color* pColors = NULL;
+ const USHORT nSize = rPts.GetSize();
if( nSize )
{
@@ -1426,9 +1426,9 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
for( USHORT i = 0; i < nSize; i++ )
{
- Color& rCol = pColors[ i ];
- const Point& rPt = rPts[ i ];
- const SalColor aSalCol( mpGraphics->GetPixel( ImplLogicXToDevicePixel( rPt.X() ),
+ Color& rCol = pColors[ i ];
+ const Point& rPt = rPts[ i ];
+ const SalColor aSalCol( mpGraphics->GetPixel( ImplLogicXToDevicePixel( rPt.X() ),
ImplLogicYToDevicePixel( rPt.Y() ) , this) );
rCol.SetRed( SALCOLOR_RED( aSalCol ) );
@@ -1487,7 +1487,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
Color aColor( rColor );
- if( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
+ if( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
DRAWMODE_SETTINGSLINE ) )
{
@@ -1597,8 +1597,8 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
{
if( rColor != COL_TRANSPARENT && ! ImplIsRecordLayout() )
{
- const USHORT nSize = rPts.GetSize();
- Color* pColArray = new Color[ nSize ];
+ const USHORT nSize = rPts.GetSize();
+ Color* pColArray = new Color[ nSize ];
for( USHORT i = 0; i < nSize; i++ )
pColArray[ i ] = rColor;
@@ -1626,12 +1626,12 @@ namespace
// ------------------------------------------------------------------------
Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
- BitmapReadAccess* pP,
- BitmapReadAccess* pA,
+ BitmapReadAccess* pP,
+ BitmapReadAccess* pA,
const Rectangle& aDstRect,
- const sal_Int32 nOffY,
- const sal_Int32 nDstHeight,
- const sal_Int32 nOffX,
+ const sal_Int32 nOffY,
+ const sal_Int32 nDstHeight,
+ const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
const long* pMapX,
const long* pMapY )
@@ -1647,14 +1647,14 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
mpAlphaVDev->EnableMapMode(FALSE);
Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
- BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess();
+ BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess();
if( GetBitCount() <= 8 )
{
- Bitmap aDither( aBmp.GetSizePixel(), 8 );
- BitmapColor aIndex( 0 );
- BitmapReadAccess* pB = aBmp.AcquireReadAccess();
- BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
+ Bitmap aDither( aBmp.GetSizePixel(), 8 );
+ BitmapColor aIndex( 0 );
+ BitmapReadAccess* pB = aBmp.AcquireReadAccess();
+ BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
if( pB && pP && pA && pW && pAlphaW )
{
@@ -1665,7 +1665,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
- const long nMapX = pMapX[ nX ];
+ const long nMapX = pMapX[ nX ];
const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aSrcCol = pP->GetColor( nMapY, nMapX );
@@ -1702,12 +1702,12 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
}
else
{
- BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
+ BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
if( pP && pA && pB )
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
+ const long nMapY = pMapY[ nY ];
for( nX = 0; nX < nDstWidth; nX++ )
{
@@ -1749,13 +1749,13 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// ------------------------------------------------------------------------
Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
- BitmapReadAccess* pP,
- BitmapReadAccess* pA,
- const sal_Int32 nOffY,
- const sal_Int32 nDstHeight,
- const sal_Int32 nOffX,
+ BitmapReadAccess* pP,
+ BitmapReadAccess* pA,
+ const sal_Int32 nOffY,
+ const sal_Int32 nDstHeight,
+ const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
- const Rectangle& aBmpRect,
+ const Rectangle& aBmpRect,
const Size& aOutSz,
const bool bHMirr,
const bool bVMirr,
@@ -1768,10 +1768,10 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
if( GetBitCount() <= 8 )
{
- Bitmap aDither( aBmp.GetSizePixel(), 8 );
- BitmapColor aIndex( 0 );
- BitmapReadAccess* pB = aBmp.AcquireReadAccess();
- BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
+ Bitmap aDither( aBmp.GetSizePixel(), 8 );
+ BitmapColor aIndex( 0 );
+ BitmapReadAccess* pB = aBmp.AcquireReadAccess();
+ BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
if( pB && pP && pA && pW )
{
@@ -1782,7 +1782,7 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
- const long nMapX = pMapX[ nX ];
+ const long nMapX = pMapX[ nX ];
const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aDstCol = pB->GetColor( nY, nX );
@@ -1801,7 +1801,7 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
}
else
{
- BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
+ BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
bool bFastBlend = false;
if( pP && pA && pB )
@@ -1828,9 +1828,9 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pPScan = pP->GetScanline( nMapY );
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pPScan = pP->GetScanline( nMapY );
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
@@ -1847,14 +1847,14 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pPScan = pP->GetScanline( nMapY );
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pPScan = pP->GetScanline( nMapY );
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
- const long nMapX = pMapX[ nX ];
- Scanline pTmp = pPScan + nMapX * 3;
+ const long nMapX = pMapX[ nX ];
+ Scanline pTmp = pPScan + nMapX * 3;
aDstCol = pB->GetPixel( nY, nX );
pB->SetPixel( nY, nX, aDstCol.Merge( pTmp[ 2 ], pTmp[ 1 ], pTmp[ 0 ],
@@ -1868,13 +1868,13 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pPScan = pP->GetScanline( nMapY );
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pPScan = pP->GetScanline( nMapY );
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
- const long nMapX = pMapX[ nX ];
+ const long nMapX = pMapX[ nX ];
Scanline pTmp = pPScan + nMapX * 3;
aDstCol = pB->GetPixel( nY, nX );
@@ -1889,8 +1889,8 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
@@ -1919,10 +1919,10 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
const Point aNullPt;
- Point aOutPt( LogicToPixel( rDestPt ) );
+ Point aOutPt( LogicToPixel( rDestPt ) );
Size aOutSz( LogicToPixel( rDestSize ) );
- Rectangle aDstRect( aNullPt, GetOutputSizePixel() );
- const BOOL bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
+ Rectangle aDstRect( aNullPt, GetOutputSizePixel() );
+ const BOOL bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
if( OUTDEV_WINDOW == meOutDevType )
{
@@ -1950,7 +1950,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA");
// #i83087# Naturally, system alpha blending cannot work with
// separate alpha VDev
- if( !mpAlphaVDev && !pDisableNative && !bHMirr && !bVMirr )
+ if( !mpAlphaVDev && !pDisableNative && !bHMirr && !bVMirr )
{
Point aRelPt = aOutPt + Point( mnOutOffX, mnOutOffY );
SalTwoRect aTR = {
@@ -1968,11 +1968,11 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
Rectangle aBmpRect( aNullPt, rBmp.GetSizePixel() );
if( !bNativeAlpha
- && !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() )
+ && !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() )
{
- GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL;
- const BOOL bOldMap = mbMap; mbMap = FALSE;
- Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
+ GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL;
+ const BOOL bOldMap = mbMap; mbMap = FALSE;
+ Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
// #109044# The generated bitmap need not necessarily be
// of aDstRect dimensions, it's internally clipped to
@@ -1983,24 +1983,24 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
if( aBmp.ImplGetImpBitmap() )
aDstRect.SetSize( aBmp.GetSizePixel() );
- BitmapColor aDstCol;
- const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight();
- const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight();
- const long nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height();
+ BitmapColor aDstCol;
+ const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight();
+ const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight();
+ const long nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height();
// calculate offset in original bitmap
// in RTL case this is a little more complicated since the contents of the
// bitmap is not mirrored (it never is), however the paint region and bmp region
// are in mirrored coordinates, so the intersection of (aOutPt,aOutSz) with these
// is content wise somewhere else and needs to take mirroring into account
- const long nOffX = IsRTLEnabled()
+ const long nOffX = IsRTLEnabled()
? aOutSz.Width() - aDstRect.GetWidth() - (aDstRect.Left() - aOutPt.X())
: aDstRect.Left() - aOutPt.X(),
nOffY = aDstRect.Top() - aOutPt.Y();
- long nX, nOutX, nY, nOutY;
- long nMirrOffX = 0;
- long nMirrOffY = 0;
- long* pMapX = new long[ nDstWidth ];
- long* pMapY = new long[ nDstHeight ];
+ long nX, nOutX, nY, nOutY;
+ long nMirrOffX = 0;
+ long nMirrOffY = 0;
+ long* pMapX = new long[ nDstWidth ];
+ long* pMapY = new long[ nDstHeight ];
// create horizontal mapping table
if( bHMirr )
@@ -2012,7 +2012,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
if( bHMirr )
pMapX[ nX ] = nMirrOffX - pMapX[ nX ];
}
-
+
// create vertical mapping table
if( bVMirr )
nMirrOffY = ( aBmpRect.Top() << 1 ) + nSrcHeight - 1;
@@ -2025,11 +2025,11 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
pMapY[ nY ] = nMirrOffY - pMapY[ nY ];
}
- BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess();
- BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
+ BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess();
+ BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
DBG_ASSERT( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL ||
- pA->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
+ pA->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
"OutputDevice::ImplDrawAlpha(): non-8bit alpha no longer supported!" );
// #i38887# reading from screen may sometimes fail
@@ -2062,13 +2062,13 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
if( mpAlphaVDev )
mpAlphaVDev = NULL;
- DrawBitmap( aDstRect.TopLeft(),
+ DrawBitmap( aDstRect.TopLeft(),
aTmp );
// #110958# Enable alpha VDev again
mpAlphaVDev = pOldVDev;
}
-
+
( (Bitmap&) rBmp ).ReleaseAccess( pP );
( (AlphaMask&) rAlpha ).ReleaseAccess( pA );
@@ -2086,17 +2086,17 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
- Point aPt;
- Point aDestPt( LogicToPixel( rDestPt ) );
- Size aDestSz( LogicToPixel( rDestSize ) );
- Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
+ Point aPt;
+ Point aDestPt( LogicToPixel( rDestPt ) );
+ Size aDestSz( LogicToPixel( rDestSize ) );
+ Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
aSrcRect.Justify();
if( !rBmp.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
- Bitmap aPaint( rBmp ), aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ Bitmap aPaint( rBmp ), aMask( rMask );
+ ULONG nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2139,11 +2139,11 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
}
// do painting
- const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
- long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
- long* pMapX = new long[ nSrcWidth + 1 ];
- long* pMapY = new long[ nSrcHeight + 1 ];
- const BOOL bOldMap = mbMap;
+ const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
+ long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
+ long* pMapX = new long[ nSrcWidth + 1 ];
+ long* pMapY = new long[ nSrcHeight + 1 ];
+ const BOOL bOldMap = mbMap;
mbMap = FALSE;
@@ -2153,10 +2153,10 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
for( nY = 0L; nY <= nSrcHeight; nY++ )
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
-
+
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
- ImplRegionInfo aInfo;
+ ImplRegionInfo aInfo;
BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
@@ -2165,7 +2165,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
const Rectangle aBandRect( Point( nWorkX, nWorkY ), Size( nWorkWidth, nWorkHeight ) );
const Point aMapPt( pMapX[ nWorkX ], pMapY[ nWorkY ] );
const Size aMapSz( pMapX[ nWorkX + nWorkWidth ] - aMapPt.X(), pMapY[ nWorkY + nWorkHeight ] - aMapPt.Y() );
-
+
aBandBmp.Crop( aBandRect );
ImplDrawBitmap( aMapPt, aMapSz, Point(), aBandBmp.GetSizePixel(), aBandBmp, META_BMPSCALEPART_ACTION );
bRgnRect = aWorkRgn.ImplGetNextRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
@@ -2184,17 +2184,17 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
- Point aPt;
- Point aDestPt( LogicToPixel( rDestPt ) );
- Size aDestSz( LogicToPixel( rDestSize ) );
- Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
+ Point aPt;
+ Point aDestPt( LogicToPixel( rDestPt ) );
+ Size aDestSz( LogicToPixel( rDestSize ) );
+ Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
aSrcRect.Justify();
if( !rMask.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
- Bitmap aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ Bitmap aMask( rMask );
+ ULONG nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2224,12 +2224,12 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
aMask.Mirror( nMirrFlags );
// do painting
- const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
- long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
- long* pMapX = new long[ nSrcWidth + 1 ];
- long* pMapY = new long[ nSrcHeight + 1 ];
+ const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
+ long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
+ long* pMapX = new long[ nSrcWidth + 1 ];
+ long* pMapY = new long[ nSrcHeight + 1 ];
GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
+ const BOOL bOldMap = mbMap;
mpMetaFile = NULL;
mbMap = FALSE;
@@ -2245,10 +2245,10 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
for( nY = 0L; nY <= nSrcHeight; nY++ )
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
-
+
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
- ImplRegionInfo aInfo;
+ ImplRegionInfo aInfo;
BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 21ce054e7df5..96bfab559360 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -430,7 +430,7 @@ bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
String& rFontName, String& rSubstFontName, USHORT& rFlags ) const
{
FontSubstList::const_iterator it = maFontSubstList.begin();
- for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
+ for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
if( it == maFontSubstList.end() )
return false;
@@ -558,7 +558,7 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
case DEFAULTFONT_CJK_SPREADSHEET:
case DEFAULTFONT_CJK_HEADING:
case DEFAULTFONT_CJK_DISPLAY:
- aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
+ aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
break;
case DEFAULTFONT_CTL_TEXT:
@@ -566,7 +566,7 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
case DEFAULTFONT_CTL_SPREADSHEET:
case DEFAULTFONT_CTL_HEADING:
case DEFAULTFONT_CTL_DISPLAY:
- aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
+ aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
break;
}
@@ -654,35 +654,35 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
const char* s = "DEFAULTFONT_SANS_UNKNOWN";
switch ( nType )
{
- case DEFAULTFONT_SANS_UNICODE: s = "DEFAULTFONT_SANS_UNICODE"; break;
- case DEFAULTFONT_UI_SANS: s = "DEFAULTFONT_UI_SANS"; break;
+ case DEFAULTFONT_SANS_UNICODE: s = "DEFAULTFONT_SANS_UNICODE"; break;
+ case DEFAULTFONT_UI_SANS: s = "DEFAULTFONT_UI_SANS"; break;
- case DEFAULTFONT_SANS: s = "DEFAULTFONT_SANS"; break;
- case DEFAULTFONT_LATIN_HEADING: s = "DEFAULTFONT_LATIN_HEADING"; break;
- case DEFAULTFONT_LATIN_SPREADSHEET: s = "DEFAULTFONT_LATIN_SPREADSHEET"; break;
- case DEFAULTFONT_LATIN_DISPLAY: s = "DEFAULTFONT_LATIN_DISPLAY"; break;
+ case DEFAULTFONT_SANS: s = "DEFAULTFONT_SANS"; break;
+ case DEFAULTFONT_LATIN_HEADING: s = "DEFAULTFONT_LATIN_HEADING"; break;
+ case DEFAULTFONT_LATIN_SPREADSHEET: s = "DEFAULTFONT_LATIN_SPREADSHEET"; break;
+ case DEFAULTFONT_LATIN_DISPLAY: s = "DEFAULTFONT_LATIN_DISPLAY"; break;
- case DEFAULTFONT_SERIF: s = "DEFAULTFONT_SERIF"; break;
- case DEFAULTFONT_LATIN_TEXT: s = "DEFAULTFONT_LATIN_TEXT"; break;
- case DEFAULTFONT_LATIN_PRESENTATION: s = "DEFAULTFONT_LATIN_PRESENTATION"; break;
+ case DEFAULTFONT_SERIF: s = "DEFAULTFONT_SERIF"; break;
+ case DEFAULTFONT_LATIN_TEXT: s = "DEFAULTFONT_LATIN_TEXT"; break;
+ case DEFAULTFONT_LATIN_PRESENTATION: s = "DEFAULTFONT_LATIN_PRESENTATION"; break;
- case DEFAULTFONT_FIXED: s = "DEFAULTFONT_FIXED"; break;
- case DEFAULTFONT_LATIN_FIXED: s = "DEFAULTFONT_LATIN_FIXED"; break;
- case DEFAULTFONT_UI_FIXED: s = "DEFAULTFONT_UI_FIXED"; break;
+ case DEFAULTFONT_FIXED: s = "DEFAULTFONT_FIXED"; break;
+ case DEFAULTFONT_LATIN_FIXED: s = "DEFAULTFONT_LATIN_FIXED"; break;
+ case DEFAULTFONT_UI_FIXED: s = "DEFAULTFONT_UI_FIXED"; break;
- case DEFAULTFONT_SYMBOL: s = "DEFAULTFONT_SYMBOL"; break;
+ case DEFAULTFONT_SYMBOL: s = "DEFAULTFONT_SYMBOL"; break;
- case DEFAULTFONT_CJK_TEXT: s = "DEFAULTFONT_CJK_TEXT"; break;
- case DEFAULTFONT_CJK_PRESENTATION: s = "DEFAULTFONT_CJK_PRESENTATION"; break;
- case DEFAULTFONT_CJK_SPREADSHEET: s = "DEFAULTFONT_CJK_SPREADSHEET"; break;
- case DEFAULTFONT_CJK_HEADING: s = "DEFAULTFONT_CJK_HEADING"; break;
- case DEFAULTFONT_CJK_DISPLAY: s = "DEFAULTFONT_CJK_DISPLAY"; break;
+ case DEFAULTFONT_CJK_TEXT: s = "DEFAULTFONT_CJK_TEXT"; break;
+ case DEFAULTFONT_CJK_PRESENTATION: s = "DEFAULTFONT_CJK_PRESENTATION"; break;
+ case DEFAULTFONT_CJK_SPREADSHEET: s = "DEFAULTFONT_CJK_SPREADSHEET"; break;
+ case DEFAULTFONT_CJK_HEADING: s = "DEFAULTFONT_CJK_HEADING"; break;
+ case DEFAULTFONT_CJK_DISPLAY: s = "DEFAULTFONT_CJK_DISPLAY"; break;
- case DEFAULTFONT_CTL_TEXT: s = "DEFAULTFONT_CTL_TEXT"; break;
- case DEFAULTFONT_CTL_PRESENTATION: s = "DEFAULTFONT_CTL_PRESENTATION"; break;
- case DEFAULTFONT_CTL_SPREADSHEET: s = "DEFAULTFONT_CTL_SPREADSHEET"; break;
- case DEFAULTFONT_CTL_HEADING: s = "DEFAULTFONT_CTL_HEADING"; break;
- case DEFAULTFONT_CTL_DISPLAY: s = "DEFAULTFONT_CTL_DISPLAY"; break;
+ case DEFAULTFONT_CTL_TEXT: s = "DEFAULTFONT_CTL_TEXT"; break;
+ case DEFAULTFONT_CTL_PRESENTATION: s = "DEFAULTFONT_CTL_PRESENTATION"; break;
+ case DEFAULTFONT_CTL_SPREADSHEET: s = "DEFAULTFONT_CTL_SPREADSHEET"; break;
+ case DEFAULTFONT_CTL_HEADING: s = "DEFAULTFONT_CTL_HEADING"; break;
+ case DEFAULTFONT_CTL_DISPLAY: s = "DEFAULTFONT_CTL_DISPLAY"; break;
}
fprintf( stderr, " OutputDevice::GetDefaultFont() Type=\"%s\" lang=%d flags=%ld FontName=\"%s\"\n",
s, eLang, nFlags,
@@ -3266,7 +3266,7 @@ ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData )
mnWidth = rFontSelData.mnWidth;
mnOrientation = sal::static_int_cast<short>(rFontSelData.mnOrientation);
- // intialize the used font name
+ // intialize the used font name
if( rFontSelData.mpFontData )
{
maName = rFontSelData.mpFontData->maName;
@@ -3283,7 +3283,7 @@ ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData )
mbKernableFont = false;
}
- // reset metrics that are usually measured for the font instance
+ // reset metrics that are usually measured for the font instance
mnAscent = 0;
mnDescent = 0;
mnIntLeading = 0;
@@ -3989,7 +3989,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
SalLayout* pLayout = ImplLayout( aStrikeoutTest, 0, nTestStrLen );
if( pLayout )
{
- nStrikeoutWidth = (pLayout->GetTextWidth() +nTestStrLen/2) / (nTestStrLen * pLayout->GetUnitsPerPixel());
+ nStrikeoutWidth = (pLayout->GetTextWidth() +nTestStrLen/2) / (nTestStrLen * pLayout->GetUnitsPerPixel());
pLayout->Release();
}
if( nStrikeoutWidth <= 0 ) // sanity check
@@ -4743,7 +4743,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
uno::Reference < i18n::XBreakIterator > xBI;
// get service provider
uno::Reference< lang::XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() );
-
+
uno::Reference< linguistic2::XHyphenator > xHyph;
if( xSMgr.is() )
{
@@ -4753,7 +4753,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
xHyph = xLinguMgr->getHyphenator();
}
}
-
+
i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, uno::Sequence <beans::PropertyValue>(), 1 );
i18n::LineBreakUserOptions aUserOptions;
@@ -4795,8 +4795,8 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
sal_Unicode cAlternateReplChar = 0;
sal_Unicode cAlternateExtraChar = 0;
i18n::Boundary aBoundary = xBI->getWordBoundary( aText, nBreakPos, rDefLocale, ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
- // sal_uInt16 nWordStart = nBreakPos;
- // sal_uInt16 nBreakPos_OLD = nBreakPos;
+ // sal_uInt16 nWordStart = nBreakPos;
+ // sal_uInt16 nBreakPos_OLD = nBreakPos;
sal_uInt16 nWordStart = nPos;
sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos;
DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
@@ -4807,7 +4807,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
// DBG_ASSERT( nWordEnd >= nMaxBreakPos, "Hyph: Break?" );
String aWord( aText, nWordStart, nWordLen );
- sal_uInt16 nMinTrail = static_cast<sal_uInt16>(nWordEnd-nSoftBreak+1); //+1: Vor dem angeknacksten Buchstaben
+ sal_uInt16 nMinTrail = static_cast<sal_uInt16>(nWordEnd-nSoftBreak+1); //+1: Vor dem angeknacksten Buchstaben
uno::Reference< linguistic2::XHyphenatedWord > xHyphWord;
if (xHyph.is())
xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.Len() - nMinTrail, uno::Sequence< beans::PropertyValue >() );
@@ -4896,7 +4896,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
nW = _rLayout.GetTextWidth( rStr, nPos, nSpacePos-nPos );
}
} while( nW > nWidth );
-
+
if( nSpacePos != STRING_NOTFOUND )
{
nBreakPos = nSpacePos;
@@ -6069,7 +6069,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
for( int nFallbackLevel = 1; nFallbackLevel < MAX_FALLBACK; ++nFallbackLevel )
{
// find a font family suited for glyph fallback
-#ifndef FONTFALLBACK_HOOKS_DISABLED
+#ifndef FONTFALLBACK_HOOKS_DISABLED
// GetGlyphFallbackFont() needs a valid aFontSelData.mpFontEntry
// if the system-specific glyph fallback is active
aFontSelData.mpFontEntry = mpFontEntry; // reset the fontentry to base-level
@@ -6291,11 +6291,11 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
// but it may be totally wrong. the background color
// was typically already reset
aCol = rStyleSettings.GetFaceColor();
-
+
bHighContrastBlack = aCol.IsDark();
bHighContrastWhite = aCol.IsBright();
}
-
+
aOldTextColor = rTargetDevice.GetTextColor();
if ( rTargetDevice.IsTextFillColor() )
{
@@ -6977,7 +6977,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
bHighContrastWhite = aCol.IsBright();
}
}
-
+
aOldTextColor = GetTextColor();
if ( IsTextFillColor() )
{
@@ -7292,7 +7292,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
if (!mpGraphics) ImplGetGraphics();
if (mpGraphics) aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel);
-
+
return aSysFontData;
}
@@ -7309,7 +7309,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
*
* Export finalized glyph layout data as platform independent SystemTextLayoutData
* (see vcl/inc/vcl/sysdata.hxx)
- *
+ *
* Only parameters rStartPt and rStr are mandatory, the rest is optional
* (default values will be used)
*
@@ -7324,18 +7324,18 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
SystemTextLayoutData aSysLayoutData;
aSysLayoutData.nSize = sizeof(aSysLayoutData);
aSysLayoutData.rGlyphData.reserve( 256 );
-
+
if ( mpMetaFile ) {
if (pDXAry)
mpMetaFile->AddAction( new MetaTextArrayAction( rStartPt, rStr, pDXAry, nIndex, nLen ) );
else
mpMetaFile->AddAction( new MetaTextAction( rStartPt, rStr, nIndex, nLen ) );
}
-
+
if ( !IsDeviceOutputNecessary() ) return aSysLayoutData;
-
+
SalLayout* rLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true );
-
+
// setup glyphs
Point aPos;
sal_GlyphId aGlyphId;
@@ -7343,7 +7343,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
{
// NOTE: Windows backend is producing unicode chars (ucs4), so on windows,
// ETO_GLYPH_INDEX is unusable, unless extra glyph conversion is made.
-
+
SystemGlyphData aGlyph;
aGlyph.index = static_cast<unsigned long> (aGlyphId & GF_IDXMASK);
aGlyph.x = aPos.X();
@@ -7355,7 +7355,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
// Get font data
aSysLayoutData.orientation = rLayout->GetOrientation();
-
+
rLayout->Release();
return aSysLayoutData;
@@ -7388,9 +7388,9 @@ long OutputDevice::GetMinKashida( const Font& rFont ) const
}
// -----------------------------------------------------------------------
-xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
+xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
xub_StrLen nIdx, xub_StrLen nLen,
- xub_StrLen nKashCount,
+ xub_StrLen nKashCount,
const xub_StrLen* pKashidaPos,
xub_StrLen* pKashidaPosDropped ) const
{
@@ -7874,7 +7874,7 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// ignore "empty" glyphs:
if( aPolyPoly.Count() > 0 )
{
- // convert to B2DPolyPolygon
+ // convert to B2DPolyPolygon
// TODO: get rid of intermediate tool's PolyPolygon
::basegfx::B2DPolyPolygon aB2DPolyPoly = aPolyPoly.getB2DPolyPolygon();
::basegfx::B2DHomMatrix aMatrix;
@@ -7971,7 +7971,7 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
for( i = nUsedItems; --i >= 0; )
if( pFontData == aCache[i].mpFontData )
break;
- if( i >= 0 ) // found in cache
+ if( i >= 0 ) // found in cache
{
rFontCharMap.Reset( aCache[i].maCharMap.mpImpl );
}
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 3a1644ebf7aa..e550225223d4 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +57,8 @@
// - Defines -
// -----------
-#define HATCH_MAXPOINTS 1024
-#define GRADIENT_DEFAULT_STEPCOUNT 0
+#define HATCH_MAXPOINTS 1024
+#define GRADIENT_DEFAULT_STEPCOUNT 0
// ----------------
// - Cmp-Function -
@@ -113,9 +113,9 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
if( pPolyPoly->Count() == 1 )
{
- const Polygon rPoly = pPolyPoly->GetObject( 0 );
- USHORT nSize = rPoly.GetSize();
-
+ const Polygon rPoly = pPolyPoly->GetObject( 0 );
+ USHORT nSize = rPoly.GetSize();
+
if( nSize >= 2 )
{
const SalPoint* pPtAry = (const SalPoint*)rPoly.GetConstPointAry();
@@ -124,17 +124,17 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
}
else if( pPolyPoly->Count() )
{
- USHORT nCount = pPolyPoly->Count();
- sal_uInt32* pPointAry = new sal_uInt32[nCount];
- PCONSTSALPOINT* pPointAryAry = new PCONSTSALPOINT[nCount];
- USHORT i = 0;
+ USHORT nCount = pPolyPoly->Count();
+ sal_uInt32* pPointAry = new sal_uInt32[nCount];
+ PCONSTSALPOINT* pPointAryAry = new PCONSTSALPOINT[nCount];
+ USHORT i = 0;
do
{
- const Polygon& rPoly = pPolyPoly->GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ const Polygon& rPoly = pPolyPoly->GetObject( i );
+ USHORT nSize = rPoly.GetSize();
if ( nSize )
{
- pPointAry[i] = nSize;
+ pPointAry[i] = nSize;
pPointAryAry[i] = (PCONSTSALPOINT)rPoly.GetConstPointAry();
i++;
}
@@ -147,7 +147,7 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
mpGraphics->DrawPolygon( *pPointAry, *pPointAryAry, this );
else
mpGraphics->DrawPolyPolygon( nCount, pPointAry, pPointAryAry, this );
-
+
delete[] pPointAry;
delete[] pPointAryAry;
}
@@ -180,26 +180,26 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
aRect.Top()--;
aRect.Right()++;
aRect.Bottom()++;
- USHORT nAngle = rGradient.GetAngle() % 3600;
- double fAngle = nAngle * F_PI1800;
- double fWidth = aRect.GetWidth();
- double fHeight = aRect.GetHeight();
- double fDX = fWidth * fabs( cos( fAngle ) ) +
+ USHORT nAngle = rGradient.GetAngle() % 3600;
+ double fAngle = nAngle * F_PI1800;
+ double fWidth = aRect.GetWidth();
+ double fHeight = aRect.GetHeight();
+ double fDX = fWidth * fabs( cos( fAngle ) ) +
fHeight * fabs( sin( fAngle ) );
- double fDY = fHeight * fabs( cos( fAngle ) ) +
+ double fDY = fHeight * fabs( cos( fAngle ) ) +
fWidth * fabs( sin( fAngle ) );
- fDX = (fDX - fWidth) * 0.5 + 0.5;
- fDY = (fDY - fHeight) * 0.5 + 0.5;
+ fDX = (fDX - fWidth) * 0.5 + 0.5;
+ fDY = (fDY - fHeight) * 0.5 + 0.5;
aRect.Left() -= (long)fDX;
aRect.Right() += (long)fDX;
aRect.Top() -= (long)fDY;
aRect.Bottom() += (long)fDY;
// Rand berechnen und Rechteck neu setzen
- Point aCenter = rRect.Center();
- Rectangle aFullRect = aRect;
- long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
- BOOL bLinear;
+ Point aCenter = rRect.Center();
+ Rectangle aFullRect = aRect;
+ long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
+ BOOL bLinear;
// Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf
if ( rGradient.GetStyle() == GRADIENT_LINEAR )
@@ -224,35 +224,35 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// Intensitaeten von Start- und Endfarbe ggf. aendern und
// Farbschrittweiten berechnen
- long nFactor;
- Color aStartCol = rGradient.GetStartColor();
- Color aEndCol = rGradient.GetEndColor();
- long nStartRed = aStartCol.GetRed();
- long nStartGreen = aStartCol.GetGreen();
- long nStartBlue = aStartCol.GetBlue();
- long nEndRed = aEndCol.GetRed();
- long nEndGreen = aEndCol.GetGreen();
- long nEndBlue = aEndCol.GetBlue();
- nFactor = rGradient.GetStartIntensity();
- nStartRed = (nStartRed * nFactor) / 100;
+ long nFactor;
+ Color aStartCol = rGradient.GetStartColor();
+ Color aEndCol = rGradient.GetEndColor();
+ long nStartRed = aStartCol.GetRed();
+ long nStartGreen = aStartCol.GetGreen();
+ long nStartBlue = aStartCol.GetBlue();
+ long nEndRed = aEndCol.GetRed();
+ long nEndGreen = aEndCol.GetGreen();
+ long nEndBlue = aEndCol.GetBlue();
+ nFactor = rGradient.GetStartIntensity();
+ nStartRed = (nStartRed * nFactor) / 100;
nStartGreen = (nStartGreen * nFactor) / 100;
- nStartBlue = (nStartBlue * nFactor) / 100;
- nFactor = rGradient.GetEndIntensity();
- nEndRed = (nEndRed * nFactor) / 100;
- nEndGreen = (nEndGreen * nFactor) / 100;
- nEndBlue = (nEndBlue * nFactor) / 100;
- long nRedSteps = nEndRed - nStartRed;
- long nGreenSteps = nEndGreen - nStartGreen;
- long nBlueSteps = nEndBlue - nStartBlue;
+ nStartBlue = (nStartBlue * nFactor) / 100;
+ nFactor = rGradient.GetEndIntensity();
+ nEndRed = (nEndRed * nFactor) / 100;
+ nEndGreen = (nEndGreen * nFactor) / 100;
+ nEndBlue = (nEndBlue * nFactor) / 100;
+ long nRedSteps = nEndRed - nStartRed;
+ long nGreenSteps = nEndGreen - nStartGreen;
+ long nBlueSteps = nEndBlue - nStartBlue;
long nStepCount = rGradient.GetSteps();
// Bei nicht linearen Farbverlaeufen haben wir nur die halben Steps
// pro Farbe
if ( !bLinear )
{
- nRedSteps <<= 1;
+ nRedSteps <<= 1;
nGreenSteps <<= 1;
- nBlueSteps <<= 1;
+ nBlueSteps <<= 1;
}
// Anzahl der Schritte berechnen, falls nichts uebergeben wurde
@@ -298,29 +298,29 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
double fScanInc = (double)aRect.GetHeight() / (double)nSteps;
// Startfarbe berechnen und setzen
- UINT8 nRed;
- UINT8 nGreen;
- UINT8 nBlue;
- long nSteps2;
- long nStepsHalf = 0;
+ UINT8 nRed;
+ UINT8 nGreen;
+ UINT8 nBlue;
+ long nSteps2;
+ long nStepsHalf = 0;
if ( bLinear )
{
// Um 1 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
- nSteps2 = nSteps + 1;
- nRed = (UINT8)nStartRed;
- nGreen = (UINT8)nStartGreen;
- nBlue = (UINT8)nStartBlue;
+ nSteps2 = nSteps + 1;
+ nRed = (UINT8)nStartRed;
+ nGreen = (UINT8)nStartGreen;
+ nBlue = (UINT8)nStartBlue;
}
else
{
// Um 2 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
- nSteps2 = nSteps + 2;
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
- nStepsHalf = nSteps >> 1;
+ nSteps2 = nSteps + 2;
+ nRed = (UINT8)nEndRed;
+ nGreen = (UINT8)nEndGreen;
+ nBlue = (UINT8)nEndBlue;
+ nStepsHalf = nSteps >> 1;
}
if ( bMtf )
@@ -329,8 +329,8 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
// Startpolygon erzeugen (== Borderpolygon)
- Polygon aPoly( 4 );
- Polygon aTempPoly( 2 );
+ Polygon aPoly( 4 );
+ Polygon aTempPoly( 2 );
aPoly[0] = aFullRect.TopLeft();
aPoly[1] = aFullRect.TopRight();
aPoly[2] = aRect.TopRight();
@@ -371,9 +371,9 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// fuer lineare FV
if ( bLinear )
{
- nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i)/nSteps2) );
- nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i)/nSteps2) );
- nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i)/nSteps2) );
+ nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i)/nSteps2) );
+ nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i)/nSteps2) );
+ nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i)/nSteps2) );
}
// fuer radiale FV
else
@@ -385,25 +385,25 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// on.
if ( i >= nSteps )
{
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
+ nRed = (UINT8)nEndRed;
+ nGreen = (UINT8)nEndGreen;
+ nBlue = (UINT8)nEndBlue;
}
else
{
if ( i <= nStepsHalf )
{
- nRed = ImplGetGradientColorValue( nEndRed-((nRedSteps*i)/nSteps2) );
- nGreen = ImplGetGradientColorValue( nEndGreen-((nGreenSteps*i)/nSteps2) );
- nBlue = ImplGetGradientColorValue( nEndBlue-((nBlueSteps*i)/nSteps2) );
+ nRed = ImplGetGradientColorValue( nEndRed-((nRedSteps*i)/nSteps2) );
+ nGreen = ImplGetGradientColorValue( nEndGreen-((nGreenSteps*i)/nSteps2) );
+ nBlue = ImplGetGradientColorValue( nEndBlue-((nBlueSteps*i)/nSteps2) );
}
// genau die Mitte und hoeher
else
{
long i2 = i - nStepsHalf;
- nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i2)/nSteps2) );
- nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i2)/nSteps2) );
- nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i2)/nSteps2) );
+ nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i2)/nSteps2) );
+ nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i2)/nSteps2) );
+ nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i2)/nSteps2) );
}
}
}
@@ -430,21 +430,21 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
// Virtuelle Device werden auch ausgeklammert, da einige Treiber
// ansonsten zu langsam sind
PolyPolygon* pPolyPoly;
- Rectangle aRect( rRect );
- Color aStartCol( rGradient.GetStartColor() );
- Color aEndCol( rGradient.GetEndColor() );
- long nStartRed = ( (long) aStartCol.GetRed() * rGradient.GetStartIntensity() ) / 100;
- long nStartGreen = ( (long) aStartCol.GetGreen() * rGradient.GetStartIntensity() ) / 100;
- long nStartBlue = ( (long) aStartCol.GetBlue() * rGradient.GetStartIntensity() ) / 100;
- long nEndRed = ( (long) aEndCol.GetRed() * rGradient.GetEndIntensity() ) / 100;
- long nEndGreen = ( (long) aEndCol.GetGreen() * rGradient.GetEndIntensity() ) / 100;
- long nEndBlue = ( (long) aEndCol.GetBlue() * rGradient.GetEndIntensity() ) / 100;
- long nRedSteps = nEndRed - nStartRed;
- long nGreenSteps = nEndGreen - nStartGreen;
- long nBlueSteps = nEndBlue - nStartBlue;
+ Rectangle aRect( rRect );
+ Color aStartCol( rGradient.GetStartColor() );
+ Color aEndCol( rGradient.GetEndColor() );
+ long nStartRed = ( (long) aStartCol.GetRed() * rGradient.GetStartIntensity() ) / 100;
+ long nStartGreen = ( (long) aStartCol.GetGreen() * rGradient.GetStartIntensity() ) / 100;
+ long nStartBlue = ( (long) aStartCol.GetBlue() * rGradient.GetStartIntensity() ) / 100;
+ long nEndRed = ( (long) aEndCol.GetRed() * rGradient.GetEndIntensity() ) / 100;
+ long nEndGreen = ( (long) aEndCol.GetGreen() * rGradient.GetEndIntensity() ) / 100;
+ long nEndBlue = ( (long) aEndCol.GetBlue() * rGradient.GetEndIntensity() ) / 100;
+ long nRedSteps = nEndRed - nStartRed;
+ long nGreenSteps = nEndGreen - nStartGreen;
+ long nBlueSteps = nEndBlue - nStartBlue;
long nStepCount = rGradient.GetSteps();
- USHORT nAngle = rGradient.GetAngle() % 3600;
-
+ USHORT nAngle = rGradient.GetAngle() % 3600;
+
if( (meRasterOp != ROP_OVERPAINT) || (meOutDevType != OUTDEV_WINDOW) || bMtf )
pPolyPoly = new PolyPolygon( 2 );
else
@@ -452,23 +452,23 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( rGradient.GetStyle() == GRADIENT_SQUARE || rGradient.GetStyle() == GRADIENT_RECT )
{
- const double fAngle = nAngle * F_PI1800;
- const double fWidth = aRect.GetWidth();
+ const double fAngle = nAngle * F_PI1800;
+ const double fWidth = aRect.GetWidth();
const double fHeight = aRect.GetHeight();
- double fDX = fWidth * fabs( cos( fAngle ) ) + fHeight * fabs( sin( fAngle ) );
- double fDY = fHeight * fabs( cos( fAngle ) ) + fWidth * fabs( sin( fAngle ) );
+ double fDX = fWidth * fabs( cos( fAngle ) ) + fHeight * fabs( sin( fAngle ) );
+ double fDY = fHeight * fabs( cos( fAngle ) ) + fWidth * fabs( sin( fAngle ) );
fDX = ( fDX - fWidth ) * 0.5 + 0.5;
fDY = ( fDY - fHeight ) * 0.5 + 0.5;
-
+
aRect.Left() -= (long) fDX;
aRect.Right() += (long) fDX;
aRect.Top() -= (long) fDY;
aRect.Bottom() += (long) fDY;
}
-
+
Size aSize( aRect.GetSize() );
-
+
if( rGradient.GetStyle() == GRADIENT_RADIAL )
{
// Radien-Berechnung fuer Kreis
@@ -490,11 +490,11 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
}
// neue Mittelpunkte berechnen
- long nZWidth = aRect.GetWidth() * (long) rGradient.GetOfsX() / 100;
- long nZHeight = aRect.GetHeight() * (long) rGradient.GetOfsY() / 100;
- long nBorderX = (long) rGradient.GetBorder() * aSize.Width() / 100;
- long nBorderY = (long) rGradient.GetBorder() * aSize.Height() / 100;
- Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight );
+ long nZWidth = aRect.GetWidth() * (long) rGradient.GetOfsX() / 100;
+ long nZHeight = aRect.GetHeight() * (long) rGradient.GetOfsY() / 100;
+ long nBorderX = (long) rGradient.GetBorder() * aSize.Width() / 100;
+ long nBorderY = (long) rGradient.GetBorder() * aSize.Height() / 100;
+ Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight );
// Rand beruecksichtigen
aSize.Width() -= nBorderX;
@@ -503,7 +503,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
// Ausgaberechteck neu setzen
aRect.Left() = aCenter.X() - ( aSize.Width() >> 1 );
aRect.Top() = aCenter.Y() - ( aSize.Height() >> 1 );
-
+
aRect.SetSize( aSize );
long nMinRect = Min( aRect.GetWidth(), aRect.GetHeight() );
@@ -527,7 +527,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
nStepCount = nMinRect / nInc;
}
-
+
// minimal drei Schritte und maximal die Anzahl der Farbunterschiede
long nSteps = Max( nStepCount, 2L );
long nCalcSteps = Abs( nRedSteps );
@@ -550,7 +550,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
double fScanBottom = aRect.Bottom();
double fScanInc = (double) nMinRect / (double) nSteps * 0.5;
UINT8 nRed = (UINT8) nStartRed, nGreen = (UINT8) nStartGreen, nBlue = (UINT8) nStartBlue;
- bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
+ bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
if( bMtf )
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
@@ -558,7 +558,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
if( pPolyPoly )
- {
+ {
pPolyPoly->Insert( aPoly = rRect );
pPolyPoly->Insert( aPoly );
}
@@ -641,7 +641,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( pPolyPoly )
{
const Polygon& rPoly = pPolyPoly->GetObject( 1 );
-
+
if( !rPoly.GetBoundRect().IsEmpty() )
{
// #107349# Paint last polygon with end color only if loop
@@ -694,7 +694,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
( aColor.GetBlue() >> 1 ) | 0x80 );
}
@@ -720,14 +720,14 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
-
+
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
+ aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
( aStartCol.GetGreen() >> 1 ) | 0x80,
( aStartCol.GetBlue() >> 1 ) | 0x80 );
- aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
+ aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
( aEndCol.GetGreen() >> 1 ) | 0x80,
( aEndCol.GetBlue() >> 1 ) | 0x80 );
}
@@ -741,7 +741,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
-
+
// Rechteck in Pixel umrechnen
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
aRect.Justify();
@@ -769,7 +769,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mbInitClipRegion )
ImplInitClipRegion();
-
+
if ( !mbOutputClipped )
{
// Gradienten werden ohne Umrandung gezeichnet
@@ -778,7 +778,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
mpGraphics->SetLineColor();
mbInitLineColor = TRUE;
}
-
+
mbInitFillColor = TRUE;
// calculate step count if neccessary
@@ -812,7 +812,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mbInitClipRegion )
ImplInitClipRegion();
-
+
if( mbOutputClipped )
return;
@@ -835,7 +835,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
( aColor.GetBlue() >> 1 ) | 0x80 );
}
@@ -850,7 +850,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mpMetaFile )
{
- const Rectangle aRect( rPolyPoly.GetBoundRect() );
+ const Rectangle aRect( rPolyPoly.GetBoundRect() );
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
@@ -864,7 +864,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
}
else
{
- const BOOL bOldOutput = IsOutputEnabled();
+ const BOOL bOldOutput = IsOutputEnabled();
EnableOutput( FALSE );
Push( PUSH_RASTEROP );
@@ -898,14 +898,14 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
-
+
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
+ aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
( aStartCol.GetGreen() >> 1 ) | 0x80,
( aStartCol.GetBlue() >> 1 ) | 0x80 );
- aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
+ aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
( aEndCol.GetGreen() >> 1 ) | 0x80,
( aEndCol.GetBlue() >> 1 ) | 0x80 );
}
@@ -916,7 +916,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( OUTDEV_PRINTER == meOutDevType || ImplGetSVData()->maGDIData.mbNoXORClipping )
{
- const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() )
{
@@ -932,7 +932,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mbInitClipRegion )
ImplInitClipRegion();
-
+
if( !mbOutputClipped )
{
PolyPolygon aClipPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) );
@@ -943,7 +943,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
mpGraphics->SetLineColor();
mbInitLineColor = TRUE;
}
-
+
mbInitFillColor = TRUE;
// calculate step count if neccessary
@@ -960,29 +960,29 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
}
else
{
- const PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- const Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
+ const PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
+ const Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ Rectangle aDstRect( aPoint, GetOutputSizePixel() );
aDstRect.Intersection( aBoundRect );
if( OUTDEV_WINDOW == meOutDevType )
{
const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() );
-
+
if( !aPaintRgn.IsNull() )
aDstRect.Intersection( LogicToPixel( aPaintRgn ).GetBoundRect() );
}
if( !aDstRect.IsEmpty() )
{
- VirtualDevice* pVDev;
- const Size aDstSize( aDstRect.GetSize() );
+ VirtualDevice* pVDev;
+ const Size aDstSize( aDstRect.GetSize() );
if( HasAlpha() )
{
- // #110958# Pay attention to alpha VDevs here, otherwise,
+ // #110958# Pay attention to alpha VDevs here, otherwise,
// background will be wrong: Temp VDev has to have alpha, too.
pVDev = new VirtualDevice( *this, 0, GetAlphaBitCount() > 1 ? 0 : 1 );
}
@@ -994,8 +994,8 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( pVDev->SetOutputSizePixel( aDstSize) )
{
- MapMode aVDevMap;
- const BOOL bOldMap = mbMap;
+ MapMode aVDevMap;
+ const BOOL bOldMap = mbMap;
EnableMapMode( FALSE );
@@ -1040,8 +1040,8 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
// Wenn Rechteck leer ist, brauchen wir nichts machen
if ( !aRect.IsEmpty() )
{
- Gradient aGradient( rGradient );
- GDIMetaFile* pOldMtf = mpMetaFile;
+ Gradient aGradient( rGradient );
+ GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
@@ -1078,7 +1078,7 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
Hatch aHatch( rHatch );
- if ( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
+ if ( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
DRAWMODE_SETTINGSLINE ) )
{
@@ -1100,8 +1100,8 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
if ( mnDrawMode & DRAWMODE_GHOSTEDLINE )
{
- aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
- ( aColor.GetGreen() >> 1 ) | 0x80,
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ ( aColor.GetGreen() >> 1 ) | 0x80,
( aColor.GetBlue() >> 1 ) | 0x80);
}
@@ -1124,10 +1124,10 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
return;
if( rPolyPoly.Count() )
- {
- PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
+ {
+ PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ BOOL bOldMap = mbMap;
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) );
@@ -1154,11 +1154,11 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- PolyPolygon aPolyPoly( rPolyPoly );
+ PolyPolygon aPolyPoly( rPolyPoly );
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME | POLY_OPTIMIZE_CLOSE );
if( aPolyPoly.Count() )
- {
+ {
GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
@@ -1174,12 +1174,12 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf )
{
- Rectangle aRect( rPolyPoly.GetBoundRect() );
- const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
- const long nWidth = ImplDevicePixelToLogicWidth( Max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
- Point* pPtBuffer = new Point[ HATCH_MAXPOINTS ];
- Point aPt1, aPt2, aEndPt1;
- Size aInc;
+ Rectangle aRect( rPolyPoly.GetBoundRect() );
+ const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
+ const long nWidth = ImplDevicePixelToLogicWidth( Max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
+ Point* pPtBuffer = new Point[ HATCH_MAXPOINTS ];
+ Point aPt1, aPt2, aEndPt1;
+ Size aInc;
// Single hatch
aRect.Left() -= nLogPixelWidth; aRect.Top() -= nLogPixelWidth; aRect.Right() += nLogPixelWidth; aRect.Bottom() += nLogPixelWidth;
@@ -1226,9 +1226,9 @@ void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHa
void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10,
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
- Point aRef;
- long nAngle = nAngle10 % 1800;
- long nOffset = 0;
+ Point aRef;
+ long nAngle = nAngle10 % 1800;
+ long nOffset = 0;
if( nAngle > 900 )
nAngle -= 1800;
@@ -1267,10 +1267,10 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
}
else if( nAngle >= -450 && nAngle <= 450 )
{
- const double fAngle = F_PI1800 * labs( nAngle );
- const double fTan = tan( fAngle );
- const long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
- long nPY;
+ const double fAngle = F_PI1800 * labs( nAngle );
+ const double fTan = tan( fAngle );
+ const long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
+ long nPY;
rInc = Size( 0, nDist = FRound( nDist / cos( fAngle ) ) );
@@ -1301,8 +1301,8 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
{
const double fAngle = F_PI1800 * labs( nAngle );
const double fTan = tan( fAngle );
- const long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
- long nPX;
+ const long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
+ long nPX;
rInc = Size( nDist = FRound( nDist / sin( fAngle ) ), 0 );
@@ -1336,8 +1336,8 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly,
Point* pPtBuffer, BOOL bMtf )
{
- double fX, fY;
- long nAdd, nPCounter = 0;
+ double fX, fY;
+ long nAdd, nPCounter = 0;
for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
@@ -1345,7 +1345,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
if( rPoly.GetSize() > 1 )
{
- Line aCurSegment( rPoly[ 0 ], Point() );
+ Line aCurSegment( rPoly[ 0 ], Point() );
for( long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ )
{
@@ -1354,25 +1354,25 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
if( rLine.Intersection( aCurSegment, fX, fY ) )
{
- if( ( fabs( fX - aCurSegment.GetStart().X() ) <= 0.0000001 ) &&
+ if( ( fabs( fX - aCurSegment.GetStart().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetStart().Y() ) <= 0.0000001 ) )
{
- const Line aPrevSegment( rPoly[ (USHORT)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
- const double fPrevDistance = rLine.GetDistance( aPrevSegment.GetStart() );
- const double fCurDistance = rLine.GetDistance( aCurSegment.GetEnd() );
+ const Line aPrevSegment( rPoly[ (USHORT)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
+ const double fPrevDistance = rLine.GetDistance( aPrevSegment.GetStart() );
+ const double fCurDistance = rLine.GetDistance( aCurSegment.GetEnd() );
- if( ( fPrevDistance <= 0.0 && fCurDistance > 0.0 ) ||
+ if( ( fPrevDistance <= 0.0 && fCurDistance > 0.0 ) ||
( fPrevDistance > 0.0 && fCurDistance < 0.0 ) )
{
nAdd = 1;
}
}
- else if( ( fabs( fX - aCurSegment.GetEnd().X() ) <= 0.0000001 ) &&
+ else if( ( fabs( fX - aCurSegment.GetEnd().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetEnd().Y() ) <= 0.0000001 ) )
{
const Line aNextSegment( aCurSegment.GetEnd(), rPoly[ (USHORT)( ( i + 1 ) % nCount ) ] );
- if( ( fabs( rLine.GetDistance( aNextSegment.GetEnd() ) ) <= 0.0000001 ) &&
+ if( ( fabs( rLine.GetDistance( aNextSegment.GetEnd() ) ) <= 0.0000001 ) &&
( rLine.GetDistance( aCurSegment.GetStart() ) > 0.0 ) )
{
nAdd = 1;
diff --git a/vcl/source/gdi/outdev5.cxx b/vcl/source/gdi/outdev5.cxx
index 108945bf9160..deae3b9de4f3 100644
--- a/vcl/source/gdi/outdev5.cxx
+++ b/vcl/source/gdi/outdev5.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +94,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
if ( aRoundRectPoly.GetSize() >= 2 )
{
const SalPoint* pPtAry = (const SalPoint*) aRoundRectPoly.GetConstPointAry();
-
+
if ( !mbFillColor )
mpGraphics->DrawPolyLine( aRoundRectPoly.GetSize(), pPtAry, this );
else
@@ -116,7 +116,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaEllipseAction( rRect ) );
- if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
+ if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
@@ -189,9 +189,9 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
if ( mbInitLineColor )
ImplInitLineColor();
- const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
- const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
+ const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
+ const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
+ Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
if ( aArcPoly.GetSize() >= 2 )
{
@@ -236,9 +236,9 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
if ( mbInitLineColor )
ImplInitLineColor();
- const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
- const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
+ const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
+ const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
+ Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
if ( aPiePoly.GetSize() >= 2 )
{
@@ -290,9 +290,9 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
if ( mbInitLineColor )
ImplInitLineColor();
- const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
- const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
+ const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
+ const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
+ Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
if ( aChordPoly.GetSize() >= 2 )
{
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 63f2b7f1f27c..bf26e1711b10 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,18 +78,18 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nF
if( mbOutputClipped )
return;
- const long nDistX = Max( rDist.Width(), 1L );
- const long nDistY = Max( rDist.Height(), 1L );
- long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
- long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
- const long nRight = aDstRect.Right();
- const long nBottom = aDstRect.Bottom();
- const long nStartX = ImplLogicXToDevicePixel( nX );
- const long nEndX = ImplLogicXToDevicePixel( nRight );
- const long nStartY = ImplLogicYToDevicePixel( nY );
- const long nEndY = ImplLogicYToDevicePixel( nBottom );
- long nHorzCount = 0L;
- long nVertCount = 0L;
+ const long nDistX = Max( rDist.Width(), 1L );
+ const long nDistY = Max( rDist.Height(), 1L );
+ long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
+ long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
+ const long nRight = aDstRect.Right();
+ const long nBottom = aDstRect.Bottom();
+ const long nStartX = ImplLogicXToDevicePixel( nX );
+ const long nEndX = ImplLogicXToDevicePixel( nRight );
+ const long nStartY = ImplLogicYToDevicePixel( nY );
+ const long nEndY = ImplLogicYToDevicePixel( nBottom );
+ long nHorzCount = 0L;
+ long nVertCount = 0L;
::com::sun::star::uno::Sequence< sal_Int32 > aVertBuf;
::com::sun::star::uno::Sequence< sal_Int32 > aHorzBuf;
@@ -181,7 +181,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
if( mbInitFillColor )
ImplInitFillColor();
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp() )
{
@@ -192,7 +192,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
// transform the polygon into device space and ensure it is closed
aB2DPolyPolygon.transform( aTransform );
aB2DPolyPolygon.setClosed( true );
-
+
bool bDrawnOk = true;
if( IsFillColor() )
bDrawnOk = mpGraphics->DrawPolyPolygon( aB2DPolyPolygon, fTransparency, this );
@@ -268,7 +268,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
// try hard to draw it directly, because the emulation layers are slower
if( !pDisableNative
- && mpGraphics->supportsOperation( OutDevSupport_B2DDraw )
+ && mpGraphics->supportsOperation( OutDevSupport_B2DDraw )
#if defined UNX && ! defined QUARTZ
&& GetBitCount() > 8
#endif
@@ -341,11 +341,11 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
return;
}
- Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
- const Size aDPISize( LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
- const long nBaseExtent = Max( FRound( aDPISize.Width() / 300. ), 1L );
- long nMove;
- const USHORT nTrans = ( nTransparencePercent < 13 ) ? 0 :
+ Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
+ const Size aDPISize( LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
+ const long nBaseExtent = Max( FRound( aDPISize.Width() / 300. ), 1L );
+ long nMove;
+ const USHORT nTrans = ( nTransparencePercent < 13 ) ? 0 :
( nTransparencePercent < 38 ) ? 25 :
( nTransparencePercent < 63 ) ? 50 :
( nTransparencePercent < 88 ) ? 75 : 100;
@@ -396,10 +396,10 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
}
else
{
- PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
- Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
+ Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
+ Point aPoint;
+ Rectangle aDstRect( aPoint, GetOutputSizePixel() );
aDstRect.Intersection( aPolyRect );
@@ -424,25 +424,25 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( 1 )
{
if ( mbInitClipRegion )
- ImplInitClipRegion();
+ ImplInitClipRegion();
if ( mbInitLineColor )
ImplInitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
-
+
Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() );
Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) );
if( !mbOutputClipped )
{
- bDrawn = mpGraphics->DrawAlphaRect(
- aPixelRect.Left(), aPixelRect.Top(),
+ bDrawn = mpGraphics->DrawAlphaRect(
+ aPixelRect.Left(), aPixelRect.Top(),
// #i98405# use methods with small g, else one pixel too much will be painted.
// This is because the source is a polygon which when painted would not paint
- // the rightmost and lowest pixel line(s), so use one pixel less for the
+ // the rightmost and lowest pixel line(s), so use one pixel less for the
// rectangle, too.
aPixelRect.getWidth(), aPixelRect.getHeight(),
- sal::static_int_cast<sal_uInt8>(nTransparencePercent),
+ sal::static_int_cast<sal_uInt8>(nTransparencePercent),
this );
}
else
@@ -452,9 +452,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( !bDrawn )
{
- VirtualDevice aVDev( *this, 1 );
- const Size aDstSz( aDstRect.GetSize() );
- const BYTE cTrans = (BYTE) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
+ VirtualDevice aVDev( *this, 1 );
+ const Size aDstSz( aDstRect.GetSize() );
+ const BYTE cTrans = (BYTE) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
if( aDstRect.Left() || aDstRect.Top() )
aPolyPoly.Move( -aDstRect.Left(), -aDstRect.Top() );
@@ -469,30 +469,30 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
aVDev.SetFillColor( COL_BLACK );
aVDev.DrawPolyPolygon( aPolyPoly );
- Bitmap aPaint( GetBitmap( aDstRect.TopLeft(), aDstSz ) );
- Bitmap aPolyMask( aVDev.GetBitmap( Point(), aDstSz ) );
+ Bitmap aPaint( GetBitmap( aDstRect.TopLeft(), aDstSz ) );
+ Bitmap aPolyMask( aVDev.GetBitmap( Point(), aDstSz ) );
// #107766# check for non-empty bitmaps before accessing them
if( !!aPaint && !!aPolyMask )
{
- BitmapWriteAccess* pW = aPaint.AcquireWriteAccess();
- BitmapReadAccess* pR = aPolyMask.AcquireReadAccess();
+ BitmapWriteAccess* pW = aPaint.AcquireWriteAccess();
+ BitmapReadAccess* pR = aPolyMask.AcquireReadAccess();
if( pW && pR )
{
- BitmapColor aPixCol;
- const BitmapColor aFillCol( GetFillColor() );
- const BitmapColor aWhite( pR->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const BitmapColor aBlack( pR->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const long nWidth = pW->Width(), nHeight = pW->Height();
- const long nR = aFillCol.GetRed(), nG = aFillCol.GetGreen(), nB = aFillCol.GetBlue();
- long nX, nY;
+ BitmapColor aPixCol;
+ const BitmapColor aFillCol( GetFillColor() );
+ const BitmapColor aWhite( pR->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aBlack( pR->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const long nWidth = pW->Width(), nHeight = pW->Height();
+ const long nR = aFillCol.GetRed(), nG = aFillCol.GetGreen(), nB = aFillCol.GetBlue();
+ long nX, nY;
if( aPaint.GetBitCount() <= 8 )
{
- const BitmapPalette& rPal = pW->GetPalette();
- const USHORT nCount = rPal.GetEntryCount();
- BitmapColor* pMap = (BitmapColor*) new BYTE[ nCount * sizeof( BitmapColor ) ];
+ const BitmapPalette& rPal = pW->GetPalette();
+ const USHORT nCount = rPal.GetEntryCount();
+ BitmapColor* pMap = (BitmapColor*) new BYTE[ nCount * sizeof( BitmapColor ) ];
for( USHORT i = 0; i < nCount; i++ )
{
@@ -507,9 +507,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
for( nY = 0; nY < nHeight; nY++ )
{
- Scanline pWScan = pW->GetScanline( nY );
- Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ Scanline pWScan = pW->GetScanline( nY );
+ Scanline pRScan = pR->GetScanline( nY );
+ BYTE cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan++ )
{
@@ -540,9 +540,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
for( nY = 0; nY < nHeight; nY++ )
{
- Scanline pWScan = pW->GetScanline( nY );
- Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ Scanline pWScan = pW->GetScanline( nY );
+ Scanline pRScan = pR->GetScanline( nY );
+ BYTE cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan += 3 )
{
@@ -639,10 +639,10 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
}
else
{
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) );
- Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) );
+ Point aPoint;
+ Rectangle aDstRect( aPoint, GetOutputSizePixel() );
mpMetaFile = NULL;
aDstRect.Intersection( aOutRect );
@@ -686,7 +686,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// copy MapMode state and disable for buffer
const bool bBufferMapModeEnabled(pVDev->IsMapModeEnabled());
pVDev->EnableMapMode(false);
-
+
// copy content from original to buffer
pVDev->DrawOutDev(
aPoint, pVDev->GetOutputSizePixel(), // dest
@@ -717,15 +717,15 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
}
else
{
- Bitmap aPaint, aMask;
- AlphaMask aAlpha;
- MapMode aMap( GetMapMode() );
- Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) );
- const BOOL bOldMap = mbMap;
+ Bitmap aPaint, aMask;
+ AlphaMask aAlpha;
+ MapMode aMap( GetMapMode() );
+ Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) );
+ const BOOL bOldMap = mbMap;
aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) );
pVDev->SetMapMode( aMap );
- const BOOL bVDevOldMap = pVDev->IsMapModeEnabled();
+ const BOOL bVDevOldMap = pVDev->IsMapModeEnabled();
// create paint bitmap
( (GDIMetaFile&) rMtf ).WindStart();
@@ -797,16 +797,16 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- BitmapEx aBmpEx;
- const BitmapEx* pCached = rWallpaper.ImplGetImpWallpaper()->ImplGetCachedBitmap();
- Point aPos;
- Size aSize;
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- const WallpaperStyle eStyle = rWallpaper.GetStyle();
- const BOOL bOldMap = mbMap;
- BOOL bDrawn = FALSE;
- BOOL bDrawGradientBackground = FALSE;
- BOOL bDrawColorBackground = FALSE;
+ BitmapEx aBmpEx;
+ const BitmapEx* pCached = rWallpaper.ImplGetImpWallpaper()->ImplGetCachedBitmap();
+ Point aPos;
+ Size aSize;
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ const WallpaperStyle eStyle = rWallpaper.GetStyle();
+ const BOOL bOldMap = mbMap;
+ BOOL bDrawn = FALSE;
+ BOOL bDrawGradientBackground = FALSE;
+ BOOL bDrawColorBackground = FALSE;
if( pCached )
aBmpEx = *pCached;
@@ -936,10 +936,10 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
default:
{
- const long nRight = nX + nWidth - 1L;
- const long nBottom = nY + nHeight - 1L;
- long nFirstX;
- long nFirstY;
+ const long nRight = nX + nWidth - 1L;
+ const long nBottom = nY + nHeight - 1L;
+ long nFirstX;
+ long nFirstY;
if( eStyle == WALLPAPER_TILE )
{
@@ -952,10 +952,10 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
nFirstY = aPos.Y() + ( ( aSize.Height() - nBmpHeight ) >> 1 );
}
- const long nOffX = ( nFirstX - nX ) % nBmpWidth;
- const long nOffY = ( nFirstY - nY ) % nBmpHeight;
- long nStartX = nX + nOffX;
- long nStartY = nY + nOffY;
+ const long nOffX = ( nFirstX - nX ) % nBmpWidth;
+ const long nOffY = ( nFirstY - nY ) % nBmpHeight;
+ long nStartX = nX + nOffX;
+ long nStartY = nY + nOffY;
if( nOffX > 0L )
nStartX -= nBmpWidth;
@@ -977,11 +977,11 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
// optimized for non-transparent bitmaps
if( bDrawColorBackground )
{
- const Size aBmpSize( aBmpEx.GetSizePixel() );
- const Point aTmpPoint;
+ const Size aBmpSize( aBmpEx.GetSizePixel() );
+ const Point aTmpPoint;
const Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() );
const Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- Rectangle aWorkRect;
+ Rectangle aWorkRect;
aWorkRect = Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L );
aWorkRect.Justify();
@@ -1040,9 +1040,9 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- Rectangle aBound;
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
+ Rectangle aBound;
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ const BOOL bOldMap = mbMap;
BOOL bNeedGradient = TRUE;
/*
@@ -1120,7 +1120,7 @@ void OutputDevice::DrawWallpaper( const Rectangle& rRect,
rWallpaper );
}
}
-
+
if( mpAlphaVDev )
mpAlphaVDev->DrawWallpaper( rRect, rWallpaper );
}
@@ -1131,20 +1131,20 @@ void OutputDevice::Erase()
{
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
-
- BOOL bNativeOK = FALSE;
+
+ BOOL bNativeOK = FALSE;
if( meOutDevType == OUTDEV_WINDOW )
{
Window* pWindow = static_cast<Window*>(this);
- ControlPart aCtrlPart = pWindow->ImplGetWindowImpl()->mnNativeBackground;
+ ControlPart aCtrlPart = pWindow->ImplGetWindowImpl()->mnNativeBackground;
if( aCtrlPart != 0 && ! pWindow->IsControlBackground() )
{
ImplControlValue aControlValue;
Point aGcc3WorkaroundTemporary;
Rectangle aCtrlRegion( aGcc3WorkaroundTemporary, GetOutputSizePixel() );
ControlState nState = 0;
-
- if( pWindow->IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+
+ if( pWindow->IsEnabled() ) nState |= CTRL_STATE_ENABLED;
bNativeOK = pWindow->DrawNativeControl( CTRL_WINDOW_BACKGROUND, aCtrlPart, aCtrlRegion,
nState, aControlValue, rtl::OUString() );
}
@@ -1201,7 +1201,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
if( mbOutputClipped )
return bDrawn;
- Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
+ Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
if( !aRect.IsEmpty() )
{
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 32abe784073d..746e642edb7c 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -256,7 +256,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
aTestRegion.Intersect( rControlRegion );
if( aTestRegion == rControlRegion )
nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
-
+
BOOL bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
return bRet;
@@ -296,7 +296,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
-
+
return bRet;
}
@@ -329,7 +329,7 @@ BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
rNativeContentRegion, this );
if( bRet )
{
- // transform back native regions
+ // transform back native regions
rNativeBoundingRegion = ImplDevicePixelToLogic( rNativeBoundingRegion );
rNativeContentRegion = ImplDevicePixelToLogic( rNativeContentRegion );
}
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index a4d4e2b9b909..41ce5e10bcc0 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +64,7 @@ DBG_NAMEEX( Region )
// =======================================================================
static long aImplNumeratorAry[MAP_PIXEL+1] =
- { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1 };
+ { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1 };
static long aImplDenominatorAry[MAP_PIXEL+1] =
{ 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1 };
@@ -115,10 +115,10 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
// -----------------------------------------------------------------------
// Fraction.GetNumerator()
-// Fraction.GetDenominator() > 0
-// rOutRes.nPixPerInch? > 0
+// Fraction.GetDenominator() > 0
+// rOutRes.nPixPerInch? > 0
// rMapRes.nMapScNum?
-// rMapRes.nMapScDenom? > 0
+// rMapRes.nMapScDenom? > 0
static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
const ImplMapRes& rMapRes,
@@ -132,9 +132,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
else
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
- long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
- ULONG nDenomX = rMapRes.mnMapScDenomX;
- long nProductX = nDPIX * rMapRes.mnMapScNumX;
+ long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
+ ULONG nDenomX = rMapRes.mnMapScDenomX;
+ long nProductX = nDPIX * rMapRes.mnMapScNumX;
if ( !nProductX )
rThresRes.mnThresLogToPixX = LONG_MAX;
@@ -157,9 +157,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
else
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
- long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
- ULONG nDenomY = rMapRes.mnMapScDenomY;
- long nProductY = nDPIY * rMapRes.mnMapScNumY;
+ long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
+ ULONG nDenomY = rMapRes.mnMapScDenomY;
+ long nProductY = nDPIY * rMapRes.mnMapScNumY;
if ( !nProductY )
rThresRes.mnThresLogToPixY = LONG_MAX;
@@ -204,16 +204,16 @@ static void ImplCalcMapResolution( const MapMode& rMapMode,
rMapRes.mnMapScDenomY = 254;
break;
case MAP_MM:
- rMapRes.mnMapScNumX = 5; // 10
- rMapRes.mnMapScDenomX = 127; // 254
- rMapRes.mnMapScNumY = 5; // 10
- rMapRes.mnMapScDenomY = 127; // 254
+ rMapRes.mnMapScNumX = 5; // 10
+ rMapRes.mnMapScDenomX = 127; // 254
+ rMapRes.mnMapScNumY = 5; // 10
+ rMapRes.mnMapScDenomY = 127; // 254
break;
case MAP_CM:
- rMapRes.mnMapScNumX = 50; // 100
- rMapRes.mnMapScDenomX = 127; // 254
- rMapRes.mnMapScNumY = 50; // 100
- rMapRes.mnMapScDenomY = 127; // 254
+ rMapRes.mnMapScNumX = 50; // 100
+ rMapRes.mnMapScDenomX = 127; // 254
+ rMapRes.mnMapScNumY = 50; // 100
+ rMapRes.mnMapScDenomY = 127; // 254
break;
case MAP_1000TH_INCH:
rMapRes.mnMapScNumX = 1;
@@ -687,8 +687,8 @@ Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const
if ( !mbMap && !mnOutOffX && !mnOutOffY )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -731,7 +731,7 @@ PolyPolygon OutputDevice::ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyP
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -812,12 +812,12 @@ Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const
// -----------------------------------------------------------------------
-void OutputDevice::EnableMapMode( BOOL bEnable )
-{
- mbMap = (bEnable != 0);
+void OutputDevice::EnableMapMode( BOOL bEnable )
+{
+ mbMap = (bEnable != 0);
if( mpAlphaVDev )
- mpAlphaVDev->EnableMapMode( bEnable );
+ mpAlphaVDev->EnableMapMode( bEnable );
}
// -----------------------------------------------------------------------
@@ -831,12 +831,12 @@ void OutputDevice::SetMapMode()
if ( mbMap || !maMapMode.IsDefault() )
{
- mbMap = FALSE;
- maMapMode = MapMode();
+ mbMap = FALSE;
+ maMapMode = MapMode();
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = TRUE;
+ mbInitFont = TRUE;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -852,7 +852,7 @@ void OutputDevice::SetMapMode()
}
if( mpAlphaVDev )
- mpAlphaVDev->SetMapMode();
+ mpAlphaVDev->SetMapMode();
}
// -----------------------------------------------------------------------
@@ -888,14 +888,14 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
if ( (rNewMapMode.GetMapUnit() == maMapMode.GetMapUnit()) &&
(rNewMapMode.GetScaleX() == maMapMode.GetScaleX()) &&
(rNewMapMode.GetScaleY() == maMapMode.GetScaleY()) &&
- (bOldMap == mbMap) )
+ (bOldMap == mbMap) )
{
// Offset setzen
Point aOrigin = rNewMapMode.GetOrigin();
maMapRes.mnMapOfsX = aOrigin.X();
maMapRes.mnMapOfsY = aOrigin.Y();
maMapMode = rNewMapMode;
-
+
// #i75163#
ImplInvalidateViewTransform();
@@ -903,12 +903,12 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
}
if ( !bOldMap && bRelMap )
{
- maMapRes.mnMapScNumX = 1;
- maMapRes.mnMapScNumY = 1;
- maMapRes.mnMapScDenomX = mnDPIX;
- maMapRes.mnMapScDenomY = mnDPIY;
- maMapRes.mnMapOfsX = 0;
- maMapRes.mnMapOfsY = 0;
+ maMapRes.mnMapScNumX = 1;
+ maMapRes.mnMapScNumY = 1;
+ maMapRes.mnMapScDenomX = mnDPIX;
+ maMapRes.mnMapScDenomY = mnDPIY;
+ maMapRes.mnMapOfsX = 0;
+ maMapRes.mnMapOfsY = 0;
}
// Neue MapMode-Aufloesung berechnen
@@ -936,8 +936,8 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
maMapMode = rNewMapMode;
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = TRUE;
+ mbInitFont = TRUE;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -1101,22 +1101,22 @@ basegfx::B2DHomMatrix OutputDevice::GetInverseViewTransformation() const
basegfx::B2DHomMatrix OutputDevice::GetViewTransformation( const MapMode& rMapMode ) const
{
// #i82615#
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
-
+
basegfx::B2DHomMatrix aTransform;
const double fScaleFactorX((double)mnDPIX * (double)aMapRes.mnMapScNumX / (double)aMapRes.mnMapScDenomX);
const double fScaleFactorY((double)mnDPIY * (double)aMapRes.mnMapScNumY / (double)aMapRes.mnMapScDenomY);
const double fZeroPointX(((double)aMapRes.mnMapOfsX * fScaleFactorX) + (double)mnOutOffOrigX);
const double fZeroPointY(((double)aMapRes.mnMapOfsY * fScaleFactorY) + (double)mnOutOffOrigY);
-
+
aTransform.set(0, 0, fScaleFactorX);
aTransform.set(1, 1, fScaleFactorY);
aTransform.set(0, 2, fZeroPointX);
aTransform.set(1, 2, fZeroPointY);
-
+
return aTransform;
}
@@ -1208,8 +1208,8 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
if ( !mbMap )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1242,7 +1242,7 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly ) cons
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1283,7 +1283,7 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
if ( !mbMap || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rLogicRegion;
- Region aRegion;
+ Region aRegion;
const ImplRegion& rImplRegion = *rLogicRegion.ImplGetImplRegion();
const PolyPolygon* pPolyPoly = rImplRegion.mpPolyPoly;
const basegfx::B2DPolyPolygon* pB2DPolyPoly = rImplRegion.mpB2DPolyPoly;
@@ -1299,12 +1299,12 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
}
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1331,8 +1331,8 @@ Point OutputDevice::LogicToPixel( const Point& rLogicPt,
return rLogicPt;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Point( ImplLogicToPixel( rLogicPt.X() + aMapRes.mnMapOfsX, mnDPIX,
@@ -1354,8 +1354,8 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize,
return rLogicSize;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Size( ImplLogicToPixel( rLogicSize.Width(), mnDPIX,
@@ -1377,8 +1377,8 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect,
return rLogicRect;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX,
@@ -1407,12 +1407,12 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
return rLogicPoly;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1430,7 +1430,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
aThresRes.mnThresLogToPixY )+mnOutOffOrigY;
aPoly[i] = aPt;
}
-
+
return aPoly;
}
@@ -1446,7 +1446,7 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly,
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1490,19 +1490,19 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion,
if ( rMapMode.IsDefault() || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rLogicRegion;
- Region aRegion;
- PolyPolygon* pPolyPoly = rLogicRegion.ImplGetImplRegion()->mpPolyPoly;
+ Region aRegion;
+ PolyPolygon* pPolyPoly = rLogicRegion.ImplGetImplRegion()->mpPolyPoly;
if( pPolyPoly )
aRegion = Region( LogicToPixel( *pPolyPoly, rMapMode ) );
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1585,8 +1585,8 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
if ( !mbMap )
return rDevicePoly;
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1619,7 +1619,7 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly ) con
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1660,19 +1660,19 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const
if ( !mbMap || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rDeviceRegion;
- Region aRegion;
- PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+ Region aRegion;
+ PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
if ( pPolyPoly )
aRegion = Region( PixelToLogic( *pPolyPoly ) );
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1700,8 +1700,8 @@ Point OutputDevice::PixelToLogic( const Point& rDevicePt,
return rDevicePt;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Point( ImplPixelToLogic( rDevicePt.X(), mnDPIX,
@@ -1724,8 +1724,8 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize,
return rDeviceSize;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Size( ImplPixelToLogic( rDeviceSize.Width(), mnDPIX,
@@ -1748,8 +1748,8 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect,
return rDeviceRect;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX,
@@ -1779,12 +1779,12 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
return rDevicePoly;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1818,7 +1818,7 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly,
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1862,19 +1862,19 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
if ( rMapMode.IsDefault() || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rDeviceRegion;
- Region aRegion;
- PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+ Region aRegion;
+ PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
if ( pPolyPoly )
aRegion = Region( PixelToLogic( *pPolyPoly, rMapMode ) );
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1892,83 +1892,83 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
// -----------------------------------------------------------------------
-#define ENTER0( rSource, pMapModeSource, pMapModeDest ) \
- if ( !pMapModeSource ) \
- pMapModeSource = &maMapMode; \
- if ( !pMapModeDest ) \
- pMapModeDest = &maMapMode; \
- if ( *pMapModeSource == *pMapModeDest ) \
+#define ENTER0( rSource, pMapModeSource, pMapModeDest ) \
+ if ( !pMapModeSource ) \
+ pMapModeSource = &maMapMode; \
+ if ( !pMapModeDest ) \
+ pMapModeDest = &maMapMode; \
+ if ( *pMapModeSource == *pMapModeDest ) \
return rSource
// -----------------------------------------------------------------------
-#define ENTER1( rSource, pMapModeSource, pMapModeDest ) \
- ENTER0( rSource, pMapModeSource, pMapModeDest ); \
+#define ENTER1( rSource, pMapModeSource, pMapModeDest ) \
+ ENTER0( rSource, pMapModeSource, pMapModeDest ); \
\
- ImplMapRes aMapResSource; \
- ImplMapRes aMapResDest; \
+ ImplMapRes aMapResSource; \
+ ImplMapRes aMapResDest; \
\
- if ( !mbMap || pMapModeSource != &maMapMode ) \
- { \
- if ( pMapModeSource->GetMapUnit() == MAP_RELATIVE ) \
- aMapResSource = maMapRes; \
- ImplCalcMapResolution( *pMapModeSource, \
- mnDPIX, mnDPIY, aMapResSource ); \
- } \
- else \
- aMapResSource = maMapRes; \
- if ( !mbMap || pMapModeDest != &maMapMode ) \
- { \
- if ( pMapModeDest->GetMapUnit() == MAP_RELATIVE ) \
- aMapResDest = maMapRes; \
- ImplCalcMapResolution( *pMapModeDest, \
- mnDPIX, mnDPIY, aMapResDest ); \
- } \
- else \
+ if ( !mbMap || pMapModeSource != &maMapMode ) \
+ { \
+ if ( pMapModeSource->GetMapUnit() == MAP_RELATIVE ) \
+ aMapResSource = maMapRes; \
+ ImplCalcMapResolution( *pMapModeSource, \
+ mnDPIX, mnDPIY, aMapResSource ); \
+ } \
+ else \
+ aMapResSource = maMapRes; \
+ if ( !mbMap || pMapModeDest != &maMapMode ) \
+ { \
+ if ( pMapModeDest->GetMapUnit() == MAP_RELATIVE ) \
+ aMapResDest = maMapRes; \
+ ImplCalcMapResolution( *pMapModeDest, \
+ mnDPIX, mnDPIY, aMapResDest ); \
+ } \
+ else \
aMapResDest = maMapRes
// -----------------------------------------------------------------------
-#define ENTER2( eUnitSource, eUnitDest ) \
- DBG_ASSERT( eUnitSource != MAP_SYSFONT \
- && eUnitSource != MAP_APPFONT \
- && eUnitSource != MAP_RELATIVE, \
+#define ENTER2( eUnitSource, eUnitDest ) \
+ DBG_ASSERT( eUnitSource != MAP_SYSFONT \
+ && eUnitSource != MAP_APPFONT \
+ && eUnitSource != MAP_RELATIVE, \
"Source MapUnit nicht erlaubt" ); \
- DBG_ASSERT( eUnitDest != MAP_SYSFONT \
- && eUnitDest != MAP_APPFONT \
- && eUnitDest != MAP_RELATIVE, \
+ DBG_ASSERT( eUnitDest != MAP_SYSFONT \
+ && eUnitDest != MAP_APPFONT \
+ && eUnitDest != MAP_RELATIVE, \
"Destination MapUnit nicht erlaubt" ); \
- DBG_ASSERTWARNING( eUnitSource != MAP_PIXEL, \
+ DBG_ASSERTWARNING( eUnitSource != MAP_PIXEL, \
"MAP_PIXEL mit 72dpi angenaehert" ); \
- DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, \
+ DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, \
"MAP_PIXEL mit 72dpi angenaehert" )
// -----------------------------------------------------------------------
-#define ENTER3( eUnitSource, eUnitDest ) \
- long nNumerator = 1; \
- long nDenominator = 1; \
- DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \
- DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \
- if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \
- { \
- nNumerator = aImplNumeratorAry[eUnitSource] * \
- aImplDenominatorAry[eUnitDest]; \
- nDenominator = aImplNumeratorAry[eUnitDest] * \
- aImplDenominatorAry[eUnitSource]; \
+#define ENTER3( eUnitSource, eUnitDest ) \
+ long nNumerator = 1; \
+ long nDenominator = 1; \
+ DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \
+ DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \
+ if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \
+ { \
+ nNumerator = aImplNumeratorAry[eUnitSource] * \
+ aImplDenominatorAry[eUnitDest]; \
+ nDenominator = aImplNumeratorAry[eUnitDest] * \
+ aImplDenominatorAry[eUnitSource]; \
} \
- if ( eUnitSource == MAP_PIXEL ) \
- nDenominator *= 72; \
- else if( eUnitDest == MAP_PIXEL ) \
+ if ( eUnitSource == MAP_PIXEL ) \
+ nDenominator *= 72; \
+ else if( eUnitDest == MAP_PIXEL ) \
nNumerator *= 72
// -----------------------------------------------------------------------
-#define ENTER4( rMapModeSource, rMapModeDest ) \
- ImplMapRes aMapResSource; \
- ImplMapRes aMapResDest; \
+#define ENTER4( rMapModeSource, rMapModeDest ) \
+ ImplMapRes aMapResSource; \
+ ImplMapRes aMapResDest; \
\
- ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
+ ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
ImplCalcMapResolution( rMapModeDest, 72, 72, aMapResDest )
// -----------------------------------------------------------------------
@@ -2113,8 +2113,8 @@ static long fn3( const long n1, const long n2, const long n3 )
} // of if
else
{
- long n4 = n1 * n2;
- const long n3_2 = n3 / 2;
+ long n4 = n1 * n2;
+ const long n3_2 = n3 / 2;
if( n4 < 0 )
{
@@ -2216,7 +2216,7 @@ Point OutputDevice::LogicToLogic( const Point& rPtSource,
return rPtSource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
if ( rMapModeSource.mpImplMapMode->mbSimple &&
@@ -2252,7 +2252,7 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource,
return rSzSource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
if ( rMapModeSource.mpImplMapMode->mbSimple &&
@@ -2286,7 +2286,7 @@ basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPoly
return rPolySource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
basegfx::B2DHomMatrix aTransform;
@@ -2331,7 +2331,7 @@ basegfx::B2DPolyPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolyPolygo
return rPolySource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
basegfx::B2DHomMatrix aTransform;
@@ -2376,7 +2376,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
return rRectSource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
if ( rMapModeSource.mpImplMapMode->mbSimple &&
@@ -2469,7 +2469,7 @@ long Window::ImplLogicUnitToPixelX( long nX, MapUnit eUnit )
// Es wird kein BigInt gebraucht, da diese Funktion nur zur Umrechnung
// von Fensterposition benutzt wird
- nX = nX * mnDPIX * pFrameData->maMapUnitRes.mnMapScNumX;
+ nX = nX * mnDPIX * pFrameData->maMapUnitRes.mnMapScNumX;
nX += nX >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomX/2) :
-((pFrameData->maMapUnitRes.mnMapScDenomX-1)/2);
nX /= pFrameData->maMapUnitRes.mnMapScDenomX;
@@ -2496,7 +2496,7 @@ long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit )
// Es wird kein BigInt gebraucht, da diese Funktion nur zur Umrechnung
// von Fensterposition benutzt wird
- nY = nY * mnDPIY * pFrameData->maMapUnitRes.mnMapScNumY;
+ nY = nY * mnDPIY * pFrameData->maMapUnitRes.mnMapScNumY;
nY += nY >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomY/2) :
-((pFrameData->maMapUnitRes.mnMapScDenomY-1)/2);
nY /= pFrameData->maMapUnitRes.mnMapScDenomY;
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 32a6cd6afb90..c54a1a13f5ae 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,31 +70,31 @@ struct PDFExtOutDevDataSync
EndGroupGfxLink
};
- sal_uInt32 nIdx;
- Action eAct;
+ sal_uInt32 nIdx;
+ Action eAct;
};
struct GlobalSyncData
{
- std::deque< PDFExtOutDevDataSync::Action > mActions;
- std::deque< MapMode > mParaMapModes;
- std::deque< Rectangle > mParaRects;
- std::deque< sal_Int32 > mParaInts;
- std::deque< sal_uInt32 > mParauInts;
- std::deque< rtl::OUString > mParaOUStrings;
- std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
- std::deque< PDFNote > mParaPDFNotes;
- std::deque< PDFWriter::PageTransition > mParaPageTransitions;
+ std::deque< PDFExtOutDevDataSync::Action > mActions;
+ std::deque< MapMode > mParaMapModes;
+ std::deque< Rectangle > mParaRects;
+ std::deque< sal_Int32 > mParaInts;
+ std::deque< sal_uInt32 > mParauInts;
+ std::deque< rtl::OUString > mParaOUStrings;
+ std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
+ std::deque< PDFNote > mParaPDFNotes;
+ std::deque< PDFWriter::PageTransition > mParaPageTransitions;
sal_Int32 GetMappedId();
sal_Int32 GetMappedStructId( sal_Int32 );
- sal_Int32 mCurId;
- std::vector< sal_Int32 > mParaIds;
- std::vector< sal_Int32 > mStructIdMap;
+ sal_Int32 mCurId;
+ std::vector< sal_Int32 > mParaIds;
+ std::vector< sal_Int32 > mStructIdMap;
- sal_Int32 mCurrentStructElement;
- std::vector< sal_Int32 > mStructParents;
+ sal_Int32 mCurrentStructElement;
+ std::vector< sal_Int32 > mStructParents;
GlobalSyncData() :
mCurId ( 0 ),
mCurrentStructElement( 0 )
@@ -119,7 +119,7 @@ sal_Int32 GlobalSyncData::GetMappedId()
nLinkId = mParaIds[ nLinkId ];
else
nLinkId = -1;
-
+
DBG_ASSERT( nLinkId >= 0, "unmapped id in GlobalSyncData" );
}
@@ -273,19 +273,19 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
struct PageSyncData
{
- std::deque< PDFExtOutDevDataSync > mActions;
- std::deque< Rectangle > mParaRects;
- std::deque< sal_Int32 > mParaInts;
- std::deque< rtl::OUString > mParaOUStrings;
- std::deque< PDFWriter::StructElement > mParaStructElements;
- std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
- std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
- std::deque< Graphic > mGraphics;
+ std::deque< PDFExtOutDevDataSync > mActions;
+ std::deque< Rectangle > mParaRects;
+ std::deque< sal_Int32 > mParaInts;
+ std::deque< rtl::OUString > mParaOUStrings;
+ std::deque< PDFWriter::StructElement > mParaStructElements;
+ std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
+ std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
+ std::deque< Graphic > mGraphics;
std::deque< ::boost::shared_ptr< PDFWriter::AnyWidget > >
mControls;
- GlobalSyncData* mpGlobalData;
+ GlobalSyncData* mpGlobalData;
- sal_Bool mbGroupIgnoreGDIMtfActions;
+ sal_Bool mbGroupIgnoreGDIMtfActions;
PageSyncData( GlobalSyncData* pGlobal ) : mbGroupIgnoreGDIMtfActions ( sal_False ) { mpGlobalData = pGlobal; }
@@ -302,7 +302,7 @@ void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDa
if ( pMtf )
aSync.nIdx = pMtf->GetActionCount();
else
- aSync.nIdx = 0x7fffffff; // sync not possible
+ aSync.nIdx = 0x7fffffff; // sync not possible
mActions.push_back( aSync );
}
sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData )
@@ -377,7 +377,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
break;
case PDFExtOutDevDataSync::BeginGroup :
{
- /* first determining if this BeginGroup is starting a GfxLink,
+ /* first determining if this BeginGroup is starting a GfxLink,
by searching for a EndGroup or a EndGroupGfxLink */
mbGroupIgnoreGDIMtfActions = sal_False;
std::deque< PDFExtOutDevDataSync >::iterator aBeg = mActions.begin();
@@ -427,7 +427,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
{
sal_Bool bClippingNeeded = ( aOutputRect != aVisibleOutputRect ) && !aVisibleOutputRect.IsEmpty();
- GfxLink aGfxLink( aGraphic.GetLink() );
+ GfxLink aGfxLink( aGraphic.GetLink() );
if ( aGfxLink.GetType() == GFX_LINK_TYPE_NATIVE_JPG )
{
if ( bClippingNeeded )
@@ -480,17 +480,17 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
TYPEINIT1(PDFExtOutDevData,ExtOutDevData);
PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) :
- mrOutDev ( rOutDev ),
- mbTaggedPDF ( sal_False ),
- mbExportNotes ( sal_True ),
- mbTransitionEffects ( sal_True ),
+ mrOutDev ( rOutDev ),
+ mbTaggedPDF ( sal_False ),
+ mbExportNotes ( sal_True ),
+ mbTransitionEffects ( sal_True ),
mbUseLosslessCompression( sal_True ),
- mbReduceImageResolution ( sal_False ),
+ mbReduceImageResolution ( sal_False ),
mbExportNDests ( sal_False ),
- mnFormsFormat ( 0 ),
- mnPage ( -1 ),
- mpPageSyncData ( NULL ),
- mpGlobalSyncData ( new GlobalSyncData() )
+ mnFormsFormat ( 0 ),
+ mnPage ( -1 ),
+ mpPageSyncData ( NULL ),
+ mpGlobalSyncData ( new GlobalSyncData() )
{
mpPageSyncData = new PageSyncData( mpGlobalSyncData );
}
@@ -612,7 +612,7 @@ void PDFExtOutDevData::PlayGlobalActions( PDFWriter& rWriter )
//--->i56629
sal_Int32 PDFExtOutDevData::CreateNamedDest(const String& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
- mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
+ mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
mpGlobalSyncData->mParaOUStrings.push_back( sDestName );
mpGlobalSyncData->mParaRects.push_back( rRect );
mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
@@ -784,10 +784,10 @@ void PDFExtOutDevData::EndGroup()
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroup );
}
-void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
- BYTE nTransparency,
- const Rectangle& rOutputRect,
- const Rectangle& rVisibleOutputRect )
+void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
+ BYTE nTransparency,
+ const Rectangle& rOutputRect,
+ const Rectangle& rVisibleOutputRect )
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroupGfxLink );
mpPageSyncData->mGraphics.push_back( rGraphic );
diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx
index 2b5944377eac..30d6786baf5a 100644
--- a/vcl/source/gdi/pdffontcache.cxx
+++ b/vcl/source/gdi/pdffontcache.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/pdffontcache.hxx b/vcl/source/gdi/pdffontcache.hxx
index 30d075d23e42..791ebe0d2e01 100644
--- a/vcl/source/gdi/pdffontcache.hxx
+++ b/vcl/source/gdi/pdffontcache.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +43,10 @@ namespace vcl
sal_IntPtr m_nFontId;
int m_nMagic;
bool m_bVertical;
-
+
FontIdentifier( const ImplFontData*, bool bVertical );
FontIdentifier() : m_nFontId(0), m_nMagic(0), m_bVertical( false ) {}
-
+
bool operator==( const FontIdentifier& rRight ) const
{
return m_nFontId == rRight.m_nFontId &&
@@ -66,15 +66,15 @@ namespace vcl
Ucs2UIntMap m_aGlyphIdToIndex;
};
typedef std::map< FontIdentifier, sal_uInt32 > FontToIndexMap;
-
+
std::vector< FontData > m_aFonts;
FontToIndexMap m_aFontToIndex;
-
+
FontData& getFont( const ImplFontData*, bool bVertical );
public:
PDFFontCache() {}
~PDFFontCache() {}
-
+
sal_Int32 getGlyphWidth( const ImplFontData*, sal_GlyphId, bool bVertical, SalGraphics* );
};
}
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index fd527fb94e55..632190d3e7a3 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 8cade3431ee1..2285fed41bdf 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -107,11 +107,11 @@ void doTestCode()
rtl::OUString aTestFile( RTL_CONSTASCII_USTRINGPARAM( "file://" ) );
aTestFile += rtl::OUString( pHome, strlen( pHome ), RTL_TEXTENCODING_MS_1252 );
aTestFile += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/pdf_export_test.pdf" ) );
-
+
PDFWriter::PDFWriterContext aContext;
- aContext.URL = aTestFile;
- aContext.Version = PDFWriter::PDF_1_4;
- aContext.Tagged = true;
+ aContext.URL = aTestFile;
+ aContext.Version = PDFWriter::PDF_1_4;
+ aContext.Tagged = true;
aContext.InitialPage = 2;
PDFWriter aWriter( aContext );
@@ -212,7 +212,7 @@ void doTestCode()
aWriter.BeginStructureElement( PDFWriter::Caption );
aWriter.DrawText( Point( 4500, 9000 ), String( RTL_CONSTASCII_USTRINGPARAM( "Some drawing stuff inside the structure" ) ) );
aWriter.EndStructureElement();
-
+
// test clipping
basegfx::B2DPolyPolygon aClip;
basegfx::B2DPolygon aClipPoly;
@@ -223,7 +223,7 @@ void doTestCode()
aClipPoly.setClosed( true );
//aClipPoly.flip();
aClip.append( aClipPoly );
-
+
aWriter.Push( PUSH_CLIPREGION | PUSH_FILLCOLOR );
aWriter.SetClipRegion( aClip );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
@@ -680,7 +680,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
appendHex( (sal_Int8)pStr[i], aBuffer );
}
}
-
+
OString aFullName( aBuffer.makeStringAndClear() );
/* #i82785# create hierarchical fields down to the for each dot in i_rName */
@@ -753,7 +753,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
}
}
} while( nTokenIndex != -1 );
-
+
// insert widget into its hierarchy field
if( aDomain.getLength() )
{
@@ -769,7 +769,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
}
}
}
-
+
if( aPartialName.getLength() == 0 )
{
// how funny, an empty field name
@@ -785,7 +785,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
if( ! m_aContext.AllowDuplicateFieldNames )
{
std::hash_map<OString, sal_Int32, OStringHash>::iterator it = m_aFieldNameMap.find( aFullName );
-
+
if( it != m_aFieldNameMap.end() ) // not unique
{
std::hash_map< OString, sal_Int32, OStringHash >::const_iterator check_it;
@@ -823,11 +823,11 @@ static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer, sal_Int32
while( nDiv-- )
nFactor *= 10;
- sal_Int32 nInt = nValue / nFactor;
+ sal_Int32 nInt = nValue / nFactor;
rBuffer.append( nInt );
if( nFactor > 1 )
{
- sal_Int32 nDecimal = nValue % nFactor;
+ sal_Int32 nDecimal = nValue % nFactor;
if( nDecimal )
{
rBuffer.append( '.' );
@@ -918,7 +918,7 @@ static void appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer
// TODO: use basegfx matrix class instead or derive from it
namespace vcl // TODO: use anonymous namespace to keep this class local
{
-/* for sparse matrices of the form (2D linear transformations)
+/* for sparse matrices of the form (2D linear transformations)
* f[0] f[1] 0
* f[2] f[3] 0
* f[4] f[5] 1
@@ -1374,7 +1374,7 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
m_pWriter->getReferenceDevice(),
rPoint ) );
- sal_Int32 nValue = aPoint.X();
+ sal_Int32 nValue = aPoint.X();
if( bNeg )
nValue = -nValue;
@@ -1382,7 +1382,7 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
rBuffer.append( ' ' );
- nValue = pointToPixel(getHeight()) - aPoint.Y();
+ nValue = pointToPixel(getHeight()) - aPoint.Y();
if( bNeg )
nValue = -nValue;
@@ -1391,13 +1391,13 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const
{
- double fValue = pixelToPoint(rPoint.getX());
+ double fValue = pixelToPoint(rPoint.getX());
appendDouble( fValue, rBuffer, nLog10Divisor );
rBuffer.append( ' ' );
- fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
+ fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
appendDouble( fValue, rBuffer, nLog10Divisor );
}
@@ -1423,10 +1423,10 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
m_pWriter->m_aMapMode,
m_pWriter->getReferenceDevice(),
rRect.GetSize() );
- rRect.Left() = aLL.X();
- rRect.Right() = aLL.X() + aSize.Width();
- rRect.Top() = pointToPixel(getHeight()) - aLL.Y();
- rRect.Bottom() = rRect.Top() + aSize.Height();
+ rRect.Left() = aLL.X();
+ rRect.Right() = aLL.X() + aSize.Width();
+ rRect.Top() = pointToPixel(getHeight()) - aLL.Y();
+ rRect.Bottom() = rRect.Top() + aSize.Height();
}
void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
@@ -1505,7 +1505,7 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS
if( i != nPoints || aPoly.isClosed() )
{
sal_uInt32 nCurPoint = i % nPoints;
- sal_uInt32 nLastPoint = i-1;
+ sal_uInt32 nLastPoint = i-1;
basegfx::B2DPoint aPoint( aPoly.getB2DPoint( nCurPoint ) );
if( aPoly.isNextControlPointUsed( nLastPoint ) &&
aPoly.isPrevControlPointUsed( nCurPoint ) )
@@ -1588,7 +1588,7 @@ void PDFWriterImpl::PDFPage::appendMappedLength( double fLength, OStringBuffer&
Size aSize( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode,
m_pWriter->m_aMapMode,
m_pWriter->getReferenceDevice(),
- Size( 1000, 1000 ) ) );
+ Size( 1000, 1000 ) ) );
if( pOutLength )
*pOutLength = (sal_Int32)(fLength*(double)(bVertical ? aSize.Height() : aSize.Width())/1000.0);
fLength *= pixelToPoint((double)(bVertical ? aSize.Height() : aSize.Width()) / 1000.0);
@@ -1726,16 +1726,16 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext )
#endif
m_aContext = rContext;
m_aStructure.push_back( PDFStructureElement() );
- m_aStructure[0].m_nOwnElement = 0;
- m_aStructure[0].m_nParentElement = 0;
+ m_aStructure[0].m_nOwnElement = 0;
+ m_aStructure[0].m_nParentElement = 0;
Font aFont;
aFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Times" ) ) );
aFont.SetSize( Size( 0, 12 ) );
GraphicsState aState;
- aState.m_aMapMode = m_aMapMode;
- aState.m_aFont = aFont;
+ aState.m_aMapMode = m_aMapMode;
+ aState.m_aFont = aFont;
m_aGraphicsStack.push_front( aState );
oslFileError aError = osl_openFile( m_aContext.URL.pData, &m_aFile, osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
@@ -1808,12 +1808,12 @@ PDFWriterImpl::~PDFWriterImpl()
void PDFWriterImpl::setDocInfo( const PDFDocInfo& rInfo )
{
- m_aDocInfo.Title = rInfo.Title;
- m_aDocInfo.Author = rInfo.Author;
- m_aDocInfo.Subject = rInfo.Subject;
- m_aDocInfo.Keywords = rInfo.Keywords;
- m_aDocInfo.Creator = rInfo.Creator;
- m_aDocInfo.Producer = rInfo.Producer;
+ m_aDocInfo.Title = rInfo.Title;
+ m_aDocInfo.Author = rInfo.Author;
+ m_aDocInfo.Subject = rInfo.Subject;
+ m_aDocInfo.Keywords = rInfo.Keywords;
+ m_aDocInfo.Creator = rInfo.Creator;
+ m_aDocInfo.Producer = rInfo.Producer;
//build the document id
rtl::OString aInfoValuesOut;
@@ -2226,20 +2226,20 @@ void PDFWriterImpl::getFontMetric( ImplFontSelectData* pSelect, ImplFontMetricDa
return;
const BuiltinFont* pBuiltinFont = pFD->GetBuiltinFont();
- pMetric->mnOrientation = sal::static_int_cast<short>(pSelect->mnOrientation);
- pMetric->meFamily = pBuiltinFont->m_eFamily;
- pMetric->mePitch = pBuiltinFont->m_ePitch;
- pMetric->meWeight = pBuiltinFont->m_eWeight;
- pMetric->meItalic = pBuiltinFont->m_eItalic;
- pMetric->mbSymbolFlag = pFD->IsSymbolFont();
- pMetric->mnWidth = pSelect->mnHeight;
- pMetric->mnAscent = ( pSelect->mnHeight * +pBuiltinFont->m_nAscent + 500 ) / 1000;
- pMetric->mnDescent = ( pSelect->mnHeight * -pBuiltinFont->m_nDescent + 500 ) / 1000;
- pMetric->mnIntLeading = 0;
- pMetric->mnExtLeading = 0;
- pMetric->mnSlant = 0;
- pMetric->mbScalableFont = true;
- pMetric->mbDevice = true;
+ pMetric->mnOrientation = sal::static_int_cast<short>(pSelect->mnOrientation);
+ pMetric->meFamily = pBuiltinFont->m_eFamily;
+ pMetric->mePitch = pBuiltinFont->m_ePitch;
+ pMetric->meWeight = pBuiltinFont->m_eWeight;
+ pMetric->meItalic = pBuiltinFont->m_eItalic;
+ pMetric->mbSymbolFlag = pFD->IsSymbolFont();
+ pMetric->mnWidth = pSelect->mnHeight;
+ pMetric->mnAscent = ( pSelect->mnHeight * +pBuiltinFont->m_nAscent + 500 ) / 1000;
+ pMetric->mnDescent = ( pSelect->mnHeight * -pBuiltinFont->m_nDescent + 500 ) / 1000;
+ pMetric->mnIntLeading = 0;
+ pMetric->mnExtLeading = 0;
+ pMetric->mnSlant = 0;
+ pMetric->mbScalableFont = true;
+ pMetric->mbDevice = true;
}
// -----------------------------------------------------------------------
@@ -2512,24 +2512,24 @@ const sal_Char* PDFWriterImpl::getAttributeTag( PDFWriter::StructAttribute eAttr
// fill maps once
if( aAttributeStrings.empty() )
{
- aAttributeStrings[ PDFWriter::Placement ] = "Placement";
- aAttributeStrings[ PDFWriter::WritingMode ] = "WritingMode";
- aAttributeStrings[ PDFWriter::SpaceBefore ] = "SpaceBefore";
- aAttributeStrings[ PDFWriter::SpaceAfter ] = "SpaceAfter";
- aAttributeStrings[ PDFWriter::StartIndent ] = "StartIndent";
- aAttributeStrings[ PDFWriter::EndIndent ] = "EndIndent";
- aAttributeStrings[ PDFWriter::TextIndent ] = "TextIndent";
- aAttributeStrings[ PDFWriter::TextAlign ] = "TextAlign";
- aAttributeStrings[ PDFWriter::Width ] = "Width";
- aAttributeStrings[ PDFWriter::Height ] = "Height";
- aAttributeStrings[ PDFWriter::BlockAlign ] = "BlockAlign";
- aAttributeStrings[ PDFWriter::InlineAlign ] = "InlineAlign";
- aAttributeStrings[ PDFWriter::LineHeight ] = "LineHeight";
- aAttributeStrings[ PDFWriter::BaselineShift ] = "BaselineShift";
- aAttributeStrings[ PDFWriter::TextDecorationType ] = "TextDecorationType";
- aAttributeStrings[ PDFWriter::ListNumbering ] = "ListNumbering";
- aAttributeStrings[ PDFWriter::RowSpan ] = "RowSpan";
- aAttributeStrings[ PDFWriter::ColSpan ] = "ColSpan";
+ aAttributeStrings[ PDFWriter::Placement ] = "Placement";
+ aAttributeStrings[ PDFWriter::WritingMode ] = "WritingMode";
+ aAttributeStrings[ PDFWriter::SpaceBefore ] = "SpaceBefore";
+ aAttributeStrings[ PDFWriter::SpaceAfter ] = "SpaceAfter";
+ aAttributeStrings[ PDFWriter::StartIndent ] = "StartIndent";
+ aAttributeStrings[ PDFWriter::EndIndent ] = "EndIndent";
+ aAttributeStrings[ PDFWriter::TextIndent ] = "TextIndent";
+ aAttributeStrings[ PDFWriter::TextAlign ] = "TextAlign";
+ aAttributeStrings[ PDFWriter::Width ] = "Width";
+ aAttributeStrings[ PDFWriter::Height ] = "Height";
+ aAttributeStrings[ PDFWriter::BlockAlign ] = "BlockAlign";
+ aAttributeStrings[ PDFWriter::InlineAlign ] = "InlineAlign";
+ aAttributeStrings[ PDFWriter::LineHeight ] = "LineHeight";
+ aAttributeStrings[ PDFWriter::BaselineShift ] = "BaselineShift";
+ aAttributeStrings[ PDFWriter::TextDecorationType ] = "TextDecorationType";
+ aAttributeStrings[ PDFWriter::ListNumbering ] = "ListNumbering";
+ aAttributeStrings[ PDFWriter::RowSpan ] = "RowSpan";
+ aAttributeStrings[ PDFWriter::ColSpan ] = "ColSpan";
aAttributeStrings[ PDFWriter::LinkAnnotation ] = "LinkAnnotation";
}
@@ -2550,32 +2550,32 @@ const sal_Char* PDFWriterImpl::getAttributeValueTag( PDFWriter::StructAttributeV
if( aValueStrings.empty() )
{
- aValueStrings[ PDFWriter::NONE ] = "None";
- aValueStrings[ PDFWriter::Block ] = "Block";
- aValueStrings[ PDFWriter::Inline ] = "Inline";
- aValueStrings[ PDFWriter::Before ] = "Before";
- aValueStrings[ PDFWriter::After ] = "After";
- aValueStrings[ PDFWriter::Start ] = "Start";
- aValueStrings[ PDFWriter::End ] = "End";
- aValueStrings[ PDFWriter::LrTb ] = "LrTb";
- aValueStrings[ PDFWriter::RlTb ] = "RlTb";
- aValueStrings[ PDFWriter::TbRl ] = "TbRl";
- aValueStrings[ PDFWriter::Center ] = "Center";
- aValueStrings[ PDFWriter::Justify ] = "Justify";
- aValueStrings[ PDFWriter::Auto ] = "Auto";
- aValueStrings[ PDFWriter::Middle ] = "Middle";
- aValueStrings[ PDFWriter::Normal ] = "Normal";
- aValueStrings[ PDFWriter::Underline ] = "Underline";
- aValueStrings[ PDFWriter::Overline ] = "Overline";
- aValueStrings[ PDFWriter::LineThrough ] = "LineThrough";
- aValueStrings[ PDFWriter::Disc ] = "Disc";
- aValueStrings[ PDFWriter::Circle ] = "Circle";
- aValueStrings[ PDFWriter::Square ] = "Square";
- aValueStrings[ PDFWriter::Decimal ] = "Decimal";
- aValueStrings[ PDFWriter::UpperRoman ] = "UpperRoman";
- aValueStrings[ PDFWriter::LowerRoman ] = "LowerRoman";
- aValueStrings[ PDFWriter::UpperAlpha ] = "UpperAlpha";
- aValueStrings[ PDFWriter::LowerAlpha ] = "LowerAlpha";
+ aValueStrings[ PDFWriter::NONE ] = "None";
+ aValueStrings[ PDFWriter::Block ] = "Block";
+ aValueStrings[ PDFWriter::Inline ] = "Inline";
+ aValueStrings[ PDFWriter::Before ] = "Before";
+ aValueStrings[ PDFWriter::After ] = "After";
+ aValueStrings[ PDFWriter::Start ] = "Start";
+ aValueStrings[ PDFWriter::End ] = "End";
+ aValueStrings[ PDFWriter::LrTb ] = "LrTb";
+ aValueStrings[ PDFWriter::RlTb ] = "RlTb";
+ aValueStrings[ PDFWriter::TbRl ] = "TbRl";
+ aValueStrings[ PDFWriter::Center ] = "Center";
+ aValueStrings[ PDFWriter::Justify ] = "Justify";
+ aValueStrings[ PDFWriter::Auto ] = "Auto";
+ aValueStrings[ PDFWriter::Middle ] = "Middle";
+ aValueStrings[ PDFWriter::Normal ] = "Normal";
+ aValueStrings[ PDFWriter::Underline ] = "Underline";
+ aValueStrings[ PDFWriter::Overline ] = "Overline";
+ aValueStrings[ PDFWriter::LineThrough ] = "LineThrough";
+ aValueStrings[ PDFWriter::Disc ] = "Disc";
+ aValueStrings[ PDFWriter::Circle ] = "Circle";
+ aValueStrings[ PDFWriter::Square ] = "Square";
+ aValueStrings[ PDFWriter::Decimal ] = "Decimal";
+ aValueStrings[ PDFWriter::UpperRoman ] = "UpperRoman";
+ aValueStrings[ PDFWriter::LowerRoman ] = "LowerRoman";
+ aValueStrings[ PDFWriter::UpperAlpha ] = "UpperAlpha";
+ aValueStrings[ PDFWriter::LowerAlpha ] = "LowerAlpha";
}
std::map< PDFWriter::StructAttributeValue, const char* >::const_iterator it =
@@ -3071,19 +3071,19 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
Int32Vector aGlyphWidths;
Ucs2UIntMap aUnicodeMap;
m_pReferenceDevice->mpGraphics->GetGlyphWidths( pFont, false, aGlyphWidths, aUnicodeMap );
-
+
OUString aTmpName;
osl_createTempFile( NULL, NULL, &aTmpName.pData );
sal_Int32 pGlyphIDs[ 256 ];
sal_uInt8 pEncoding[ 256 ];
sal_Ucs pUnicodes[ 256 ];
sal_Int32 pDuWidths[ 256 ];
-
+
memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) );
memset( pEncoding, 0, sizeof( pEncoding ) );
memset( pUnicodes, 0, sizeof( pUnicodes ) );
memset( pDuWidths, 0, sizeof( pDuWidths ) );
-
+
for( sal_Ucs c = 32; c < 256; c++ )
{
pUnicodes[c] = c;
@@ -3092,7 +3092,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
if( aUnicodeMap.find( c ) != aUnicodeMap.end() )
pWidths[ c ] = aGlyphWidths[ aUnicodeMap[ c ] ];
}
-
+
m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, pFont, pGlyphIDs, pEncoding, pDuWidths, 256, aInfo );
osl_removeFile( aTmpName.pData );
}
@@ -3132,12 +3132,12 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
aLine.append( " 0 R>>\n"
"endobj\n\n" );
writeBuffer( aLine.getStr(), aLine.getLength() );
-
- nFontObject = nObject;
+
+ nFontObject = nObject;
aRet[ rEmbed.m_nNormalFontID ] = nObject;
}
}
-
+
return aRet;
}
@@ -3218,7 +3218,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
}
}
-
+
FontSubsetInfo aInfo;
sal_Int32 pWidths[256];
const unsigned char* pFontData = NULL;
@@ -3241,13 +3241,13 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
if( pFontData[nIndex+1] == 0x03 )
break;
sal_Int32 nBytes =
- ((sal_Int32)pFontData[nIndex+2]) |
- ((sal_Int32)pFontData[nIndex+3]) << 8 |
- ((sal_Int32)pFontData[nIndex+4]) << 16 |
+ ((sal_Int32)pFontData[nIndex+2]) |
+ ((sal_Int32)pFontData[nIndex+3]) << 8 |
+ ((sal_Int32)pFontData[nIndex+4]) << 16 |
((sal_Int32)pFontData[nIndex+5]) << 24;
nIndex += nBytes+6;
}
-
+
// search for eexec
// TODO: use getPfbSegmentLengths() if possible to skip the search thingies below
nIndex = 0;
@@ -3257,7 +3257,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
do
{
while( nIndex < nFontLen-4 &&
- ( pFontData[nIndex] != 'e' ||
+ ( pFontData[nIndex] != 'e' ||
pFontData[nIndex+1] != 'e' ||
pFontData[nIndex+2] != 'x' ||
pFontData[nIndex+3] != 'e' ||
@@ -3272,7 +3272,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
// this should end the ascii part
if( nIndex > nFontLen-5 )
throw FontException();
-
+
nEndAsciiIndex = nIndex+4;
// now count backwards until we can account for 512 '0'
// which is the endmarker of the (hopefully) binary data
@@ -3290,19 +3290,19 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
// if all fonts complied
if( pFontData[nIndex] == '0' )
nFound++;
- else if( nFound > 0 &&
- pFontData[nIndex] != '\r' &&
- pFontData[nIndex] != '\t' &&
- pFontData[nIndex] != '\n' &&
+ else if( nFound > 0 &&
+ pFontData[nIndex] != '\r' &&
+ pFontData[nIndex] != '\t' &&
+ pFontData[nIndex] != '\n' &&
pFontData[nIndex] != ' ' )
break;
}
nIndex--;
}
-
+
if( nIndex < 1 || nIndex <= nEndAsciiIndex )
throw FontException();
-
+
// nLength3 is the rest of the file - excluding any section headers
// nIndex now points to the first of the 512 '0' characters marking the
// fixed content portion
@@ -3323,7 +3323,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
}
}
-
+
// there may be whitespace to ignore before the 512 '0'
while( pFontData[nIndex] == '\r' || pFontData[nIndex] == '\n' )
{
@@ -3337,7 +3337,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
}
nEndBinaryIndex = nIndex;
-
+
// search for beginning of binary section
nBeginBinaryIndex = nEndAsciiIndex;
do
@@ -3346,10 +3346,10 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
for( it = aSections.begin(); it != aSections.end() && (nBeginBinaryIndex < *it || nBeginBinaryIndex > ((*it) + 5) ); ++it )
;
} while( nBeginBinaryIndex < nEndBinaryIndex &&
- ( pFontData[nBeginBinaryIndex] == '\r' ||
- pFontData[nBeginBinaryIndex] == '\n' ||
+ ( pFontData[nBeginBinaryIndex] == '\r' ||
+ pFontData[nBeginBinaryIndex] == '\n' ||
it != aSections.end() ) );
-
+
// it seems to be vital to copy the exact whitespace between binary data
// and eexec, else a invalid font results. so make nEndAsciiIndex
// always immediate in front of nBeginBinaryIndex
@@ -3358,11 +3358,11 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
;
if( it != aSections.end() )
nEndAsciiIndex = (*it)-1;
-
+
nLength1 = nEndAsciiIndex+1; // including the last character
for( it = aSections.begin(); it != aSections.end() && *it < nEndAsciiIndex; ++it )
nLength1 -= 6; // decrease by pfb section size
-
+
// if the first four bytes are all ascii hex characters, then binary data
// has to be converted to real binary data
for( nIndex = 0; nIndex < 4 &&
@@ -3405,7 +3405,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
DBG_ASSERT( !(nLength2 & 1), "uneven number of hex chars in binary pfa section" );
nLength2 /= 2;
}
-
+
// now we can actually write the font stream !
#if OSL_DEBUG_LEVEL > 1
{
@@ -3436,13 +3436,13 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
"stream\n" );
if( !writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
sal_uInt64 nBeginStreamPos = 0;
osl_getFilePos( m_aFile, &nBeginStreamPos );
-
+
beginCompression();
checkAndEnableStreamEncryption( nStreamObject );
-
+
// write ascii section
if( aSections.begin() == aSections.end() )
{
@@ -3466,7 +3466,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
if( ! writeBuffer( pFontData+nIndex, nEndAsciiIndex-nIndex+1 ) )
throw FontException();
}
-
+
// write binary section
if( ! bConvertHexData )
{
@@ -3501,7 +3501,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
boost::shared_array<unsigned char> pWriteBuffer( new unsigned char[ nLength2 ] );
rtl_zeroMemory( pWriteBuffer.get(), nLength2 );
int nWriteIndex = 0;
-
+
int nNextSectionIndex = 0;
for( it = aSections.begin(); it != aSections.end() && *it < nBeginBinaryIndex; ++it )
;
@@ -3561,17 +3561,17 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
endCompression();
disableStreamEncryption();
-
-
+
+
sal_uInt64 nEndStreamPos = 0;
osl_getFilePos( m_aFile, &nEndStreamPos );
-
+
// and finally close the stream
aLine.setLength( 0 );
aLine.append( "\nendstream\nendobj\n\n" );
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
// write stream length object
aLine.setLength( 0 );
if( ! updateObject( nStreamLengthObject ) )
@@ -3597,21 +3597,21 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
aErrorComment.append( sal_Int32(pFont->GetWeight()) );
emitComment( aErrorComment.getStr() );
}
-
+
if( nStreamObject )
// write font descriptor
nFontDescriptor = emitFontDescriptor( pFont, aInfo, 0, nStreamObject );
-
+
if( nFontDescriptor )
{
if( pEncoding )
nToUnicodeStream = createToUnicodeCMap( nEncoding, &aUnicodes[0], pUnicodesPerGlyph, pEncToUnicodeIndex, SAL_N_ELEMENTS(nEncoding) );
-
+
// write font object
sal_Int32 nObject = createObject();
if( ! updateObject( nObject ) )
throw FontException();
-
+
OStringBuffer aLine( 1024 );
aLine.append( nObject );
aLine.append( " 0 obj\n"
@@ -3640,11 +3640,11 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
"endobj\n\n" );
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
nFontObject = nObject;
-
+
aRet[ rEmbed.m_nNormalFontID ] = nObject;
-
+
// write additional encodings
for( std::list< EmbedEncoding >::iterator enc_it = rEmbed.m_aExtendedEncodings.begin(); enc_it != rEmbed.m_aExtendedEncodings.end(); ++enc_it )
{
@@ -3653,7 +3653,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
sal_Int32 nEncObject = createObject();
if( ! updateObject( nEncObject ) )
throw FontException();
-
+
OutputDevice* pRef = getReferenceDevice();
pRef->Push( PUSH_FONT | PUSH_MAPMODE );
pRef->SetMapMode( MapMode( MAP_PIXEL ) );
@@ -3663,7 +3663,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
aFont.SetPitch( pFont->GetPitch() );
pRef->SetFont( aFont );
pRef->ImplNewFont();
-
+
aLine.setLength( 0 );
aLine.append( nEncObject );
aLine.append( " 0 obj\n"
@@ -3679,7 +3679,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
pEncToUnicodeIndex[nEncoded] = static_cast<sal_Int32>(aUnicodes.size());
aUnicodes.push_back( nEncodedCodes[nEncoded] );
pUnicodesPerGlyph[nEncoded] = 1;
-
+
aLine.append( " /" );
aLine.append( str_it->m_aName );
if( !((++nEncoded) & 15) )
@@ -3687,18 +3687,18 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
aLine.append( "]>>\n"
"endobj\n\n" );
-
+
pRef->Pop();
-
+
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
nToUnicodeStream = createToUnicodeCMap( nEncoding, &aUnicodes[0], pUnicodesPerGlyph, pEncToUnicodeIndex, nEncoded );
-
+
nObject = createObject();
if( ! updateObject( nObject ) )
throw FontException();
-
+
aLine.setLength( 0 );
aLine.append( nObject );
aLine.append( " 0 obj\n"
@@ -3731,7 +3731,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
"endobj\n\n" );
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
aRet[ enc_it->m_nFontID ] = nObject;
}
}
@@ -3742,7 +3742,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
endCompression();
disableStreamEncryption();
}
-
+
if( pFontData )
m_pReferenceDevice->mpGraphics->FreeEmbedFontData( pFontData, nFontLen );
@@ -3968,11 +3968,11 @@ bool PDFWriterImpl::emitFonts()
{
if( ! m_pReferenceDevice->ImplGetGraphics() )
return false;
-
+
OStringBuffer aLine( 1024 );
-
+
std::map< sal_Int32, sal_Int32 > aFontIDToObject;
-
+
OUString aTmpName;
osl_createTempFile( NULL, NULL, &aTmpName.pData );
for( FontSubsetData::iterator it = m_aSubsets.begin(); it != m_aSubsets.end(); ++it )
@@ -3989,7 +3989,7 @@ bool PDFWriterImpl::emitFonts()
int nGlyphs = 1;
// fill arrays and prepare encoding index map
sal_Int32 nToUnicodeStream = 0;
-
+
rtl_zeroMemory( pGlyphIDs, sizeof( pGlyphIDs ) );
rtl_zeroMemory( pEncoding, sizeof( pEncoding ) );
rtl_zeroMemory( pUnicodesPerGlyph, sizeof( pUnicodesPerGlyph ) );
@@ -3997,10 +3997,10 @@ bool PDFWriterImpl::emitFonts()
for( FontEmitMapping::iterator fit = lit->m_aMapping.begin(); fit != lit->m_aMapping.end();++fit )
{
sal_uInt8 nEnc = fit->second.getGlyphId();
-
+
DBG_ASSERT( pGlyphIDs[nEnc] == 0 && pEncoding[nEnc] == 0, "duplicate glyph" );
DBG_ASSERT( nEnc <= lit->m_aMapping.size(), "invalid glyph encoding" );
-
+
pGlyphIDs[ nEnc ] = fit->first;
pEncoding[ nEnc ] = nEnc;
pEncToUnicodeIndex[ nEnc ] = static_cast<sal_Int32>(aUnicodes.size());
@@ -4027,7 +4027,7 @@ bool PDFWriterImpl::emitFonts()
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( aFontFile, osl_Pos_End, 0 ) ) );
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( aFontFile, &nLength1 ) ) );
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( aFontFile, osl_Pos_Absolut, 0 ) ) );
-
+
#if OSL_DEBUG_LEVEL > 1
{
OStringBuffer aLine1( " PDFWriterImpl::emitFonts" );
@@ -4047,17 +4047,17 @@ bool PDFWriterImpl::emitFonts()
"/Filter/FlateDecode"
#endif
"/Length1 " );
-
+
sal_uInt64 nStartPos = 0;
if( aSubsetInfo.m_nFontType == FontSubsetInfo::SFNT_TTF )
{
aLine.append( (sal_Int32)nLength1 );
-
+
aLine.append( ">>\n"
"stream\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nStartPos ) ) );
-
+
// copy font file
beginCompression();
checkAndEnableStreamEncryption( nFontStream );
@@ -4079,7 +4079,7 @@ bool PDFWriterImpl::emitFonts()
else if( (aSubsetInfo.m_nFontType & FontSubsetInfo::TYPE1_PFB) != 0 ) // TODO: also support PFA?
{
boost::shared_array<unsigned char> pBuffer( new unsigned char[ nLength1 ] );
-
+
sal_uInt64 nBytesRead = 0;
CHECK_RETURN( (osl_File_E_None == osl_readFile( aFontFile, pBuffer.get(), nLength1, &nBytesRead ) ) );
DBG_ASSERT( nBytesRead==nLength1, "PDF-FontSubset read incomplete!" );
@@ -4094,12 +4094,12 @@ bool PDFWriterImpl::emitFonts()
aLine.append( (sal_Int32)aSegmentLengths[1] );
aLine.append( "/Length3 " );
aLine.append( (sal_Int32)aSegmentLengths[2] );
-
+
aLine.append( ">>\n"
"stream\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nStartPos ) ) );
-
+
// emit PFB-sections without section headers
beginCompression();
checkAndEnableStreamEncryption( nFontStream );
@@ -4112,19 +4112,19 @@ bool PDFWriterImpl::emitFonts()
fprintf( stderr, "PDF: CreateFontSubset result in not yet supported format=%d\n",aSubsetInfo.m_nFontType);
aLine.append( "0 >>\nstream\n" );
}
-
+
endCompression();
disableStreamEncryption();
// close the file
osl_closeFile( aFontFile );
-
+
sal_uInt64 nEndPos = 0;
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nEndPos ) ) );
// end the stream
aLine.setLength( 0 );
aLine.append( "\nendstream\nendobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
-
+
// emit stream length object
CHECK_RETURN( updateObject( nStreamLengthObject ) );
aLine.setLength( 0 );
@@ -4133,18 +4133,18 @@ bool PDFWriterImpl::emitFonts()
aLine.append( (sal_Int64)(nEndPos-nStartPos) );
aLine.append( "\nendobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
-
+
// write font descriptor
sal_Int32 nFontDescriptor = emitFontDescriptor( it->first, aSubsetInfo, lit->m_nFontID, nFontStream );
-
+
if( nToUnicodeStream )
nToUnicodeStream = createToUnicodeCMap( pEncoding, &aUnicodes[0], pUnicodesPerGlyph, pEncToUnicodeIndex, nGlyphs );
-
+
sal_Int32 nFontObject = createObject();
CHECK_RETURN( updateObject( nFontObject ) );
aLine.setLength( 0 );
aLine.append( nFontObject );
-
+
aLine.append( " 0 obj\n" );
aLine.append( ((aSubsetInfo.m_nFontType & FontSubsetInfo::ANY_TYPE1) != 0) ?
"<</Type/Font/Subtype/Type1/BaseFont/" :
@@ -4174,7 +4174,7 @@ bool PDFWriterImpl::emitFonts()
aLine.append( ">>\n"
"endobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
-
+
aFontIDToObject[ lit->m_nFontID ] = nFontObject;
}
else
@@ -4195,7 +4195,7 @@ bool PDFWriterImpl::emitFonts()
}
}
osl_removeFile( aTmpName.pData );
-
+
// emit embedded fonts
for( FontEmbedData::iterator eit = m_aEmbeddedFonts.begin(); eit != m_aEmbeddedFonts.end(); ++eit )
{
@@ -4242,7 +4242,7 @@ bool PDFWriterImpl::emitFonts()
}
appendBuiltinFontsToDict( aFontDict );
aFontDict.append( "\n>>\nendobj\n\n" );
-
+
CHECK_RETURN( updateObject( getFontDictObject() ) );
CHECK_RETURN( writeBuffer( aFontDict.getStr(), aFontDict.getLength() ) );
return true;
@@ -4424,8 +4424,8 @@ bool PDFWriterImpl::appendDest( sal_Int32 nDestID, OStringBuffer& rBuffer )
}
- const PDFDest& rDest = m_aDests[ nDestID ];
- const PDFPage& rDestPage = m_aPages[ rDest.m_nPage ];
+ const PDFDest& rDest = m_aDests[ nDestID ];
+ const PDFPage& rDestPage = m_aPages[ rDest.m_nPage ];
rBuffer.append( '[' );
rBuffer.append( rDestPage.m_nPageObject );
@@ -4484,7 +4484,7 @@ bool PDFWriterImpl::emitLinkAnnotations()
int nAnnots = m_aLinks.size();
for( int i = 0; i < nAnnots; i++ )
{
- const PDFLink& rLink = m_aLinks[i];
+ const PDFLink& rLink = m_aLinks[i];
if( ! updateObject( rLink.m_nObject ) )
continue;
@@ -4711,7 +4711,7 @@ bool PDFWriterImpl::emitNoteAnnotations()
int nAnnots = m_aNotes.size();
for( int i = 0; i < nAnnots; i++ )
{
- const PDFNoteEntry& rNote = m_aNotes[i];
+ const PDFNoteEntry& rNote = m_aNotes[i];
if( ! updateObject( rNote.m_nObject ) )
return false;
@@ -4916,9 +4916,9 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
sal_Int32 nDelta = aFont.GetHeight()/4;
if( nDelta < 1 )
nDelta = 1;
- rIntern.m_aRect.Left() += nDelta;
- rIntern.m_aRect.Top() += nDelta;
- rIntern.m_aRect.Right() -= nDelta;
+ rIntern.m_aRect.Left() += nDelta;
+ rIntern.m_aRect.Top() += nDelta;
+ rIntern.m_aRect.Right() -= nDelta;
rIntern.m_aRect.Bottom()-= nDelta;
}
}
@@ -4956,7 +4956,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
aDA.append( ' ' );
m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetHeight() ), aDA );
aDA.append( " Tf" );
-
+
/* create an empty appearance stream, let the viewer create
the appearance at runtime. This is because AR5 seems to
paint the widget appearance always, and a dynamically created
@@ -5054,10 +5054,10 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
Rectangle aCheckRect, aTextRect;
if( rWidget.ButtonIsLeft )
{
- aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5067,17 +5067,17 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
else
{
- aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5087,10 +5087,10 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left();
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left();
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
setLineColor( Color( COL_BLACK ) );
setFillColor( Color( COL_TRANSPARENT ) );
@@ -5179,10 +5179,10 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
Rectangle aCheckRect, aTextRect;
if( rWidget.ButtonIsLeft )
{
- aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5192,17 +5192,17 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
else
{
- aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5212,10 +5212,10 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left();
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left();
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
setLineColor( Color( COL_BLACK ) );
setFillColor( Color( COL_TRANSPARENT ) );
@@ -5260,10 +5260,10 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
writeBuffer( aDA.getStr(), aDA.getLength() );
setFillColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ) );
setLineColor( Color( COL_TRANSPARENT ) );
- aCheckRect.Left() += 3*nDelta;
- aCheckRect.Top() += 3*nDelta;
- aCheckRect.Bottom() -= 3*nDelta;
- aCheckRect.Right() -= 3*nDelta;
+ aCheckRect.Left() += 3*nDelta;
+ aCheckRect.Top() += 3*nDelta;
+ aCheckRect.Bottom() -= 3*nDelta;
+ aCheckRect.Right() -= 3*nDelta;
drawEllipse( aCheckRect );
writeBuffer( "\nEMC\n", 5 );
endRedirect();
@@ -6628,7 +6628,7 @@ void PDFWriterImpl::sortWidgets()
namespace vcl {
class PDFStreamIf :
- public cppu::WeakImplHelper1< com::sun::star::io::XOutputStream >
+ public cppu::WeakImplHelper1< com::sun::star::io::XOutputStream >
{
PDFWriterImpl* m_pWriter;
bool m_bWrite;
@@ -6774,10 +6774,10 @@ sal_Int32 PDFWriterImpl::getSystemFont( const Font& i_rFont )
m_aSystemFonts[ pDevFont ] = EmbedFont();
m_aSystemFonts[ pDevFont ].m_nNormalFontID = nFontID;
}
-
+
getReferenceDevice()->Pop();
getReferenceDevice()->ImplNewFont();
-
+
return nFontID;
}
@@ -7383,12 +7383,12 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
if( i < nGlyphs-1 )
{
nChars = pCharPosAry[i+1] - pCharPosAry[i];
- // #i115618# fix for simple RTL+CTL cases
- // TODO: sanitize for RTL ligatures, more complex CTL, etc.
+ // #i115618# fix for simple RTL+CTL cases
+ // TODO: sanitize for RTL ligatures, more complex CTL, etc.
if( nChars < 0 )
- nChars = -nChars;
+ nChars = -nChars;
else if( nChars == 0 )
- nChars = 1;
+ nChars = 1;
pUnicodesPerGlyph[i] = nChars;
for( int n = 1; n < nChars; n++ )
aUnicodes.push_back( rText.GetChar( sal::static_int_cast<xub_StrLen>(pCharPosAry[i]+n) ) );
@@ -7515,14 +7515,14 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
// write eventual emphasis marks
if( m_aCurrentPDFState.m_aFont.GetEmphasisMark() & EMPHASISMARK_STYLE )
{
- PolyPolygon aEmphPoly;
- Rectangle aEmphRect1;
- Rectangle aEmphRect2;
- long nEmphYOff;
- long nEmphWidth;
- long nEmphHeight;
- BOOL bEmphPolyLine;
- FontEmphasisMark nEmphMark;
+ PolyPolygon aEmphPoly;
+ Rectangle aEmphRect1;
+ Rectangle aEmphRect2;
+ long nEmphYOff;
+ long nEmphWidth;
+ long nEmphHeight;
+ BOOL bEmphPolyLine;
+ FontEmphasisMark nEmphMark;
push( PUSH_ALL );
@@ -7711,7 +7711,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, US
Point aPos = rRect.TopLeft();
- long nTextHeight = m_pReferenceDevice->GetTextHeight();
+ long nTextHeight = m_pReferenceDevice->GetTextHeight();
xub_StrLen nMnemonicPos = STRING_NOTFOUND;
String aStr = rOrigStr;
@@ -7921,9 +7921,9 @@ void PDFWriterImpl::drawWaveLine( const Point& rStart, const Point& rStop, sal_I
void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove )
{
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- long nLineHeight = 0;
- long nLinePos = 0;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ long nLineHeight = 0;
+ long nLinePos = 0;
appendStrokingColor( aColor, aLine );
aLine.append( "\n" );
@@ -7991,10 +7991,10 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnd
void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove )
{
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ long nLineHeight = 0;
+ long nLinePos = 0;
+ long nLinePos2 = 0;
if ( eTextLine > UNDERLINE_BOLDWAVE )
eTextLine = UNDERLINE_SINGLE;
@@ -8160,10 +8160,10 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon
void PDFWriterImpl::drawStrikeoutLine( OStringBuffer& aLine, long nWidth, FontStrikeout eStrikeout, Color aColor )
{
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ long nLineHeight = 0;
+ long nLinePos = 0;
+ long nLinePos2 = 0;
if ( eStrikeout > STRIKEOUT_X )
eStrikeout = STRIKEOUT_SINGLE;
@@ -8268,13 +8268,13 @@ void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout
updateGraphicsState();
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- Color aUnderlineColor = m_aCurrentPDFState.m_aTextLineColor;
- Color aOverlineColor = m_aCurrentPDFState.m_aOverlineColor;
- Color aStrikeoutColor = m_aCurrentPDFState.m_aFont.GetColor();
- bool bStrikeoutDone = false;
- bool bUnderlineDone = false;
- bool bOverlineDone = false;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ Color aUnderlineColor = m_aCurrentPDFState.m_aTextLineColor;
+ Color aOverlineColor = m_aCurrentPDFState.m_aOverlineColor;
+ Color aStrikeoutColor = m_aCurrentPDFState.m_aFont.GetColor();
+ bool bStrikeoutDone = false;
+ bool bUnderlineDone = false;
+ bool bOverlineDone = false;
if ( (eStrikeout == STRIKEOUT_SLASH) || (eStrikeout == STRIKEOUT_X) )
{
@@ -8416,12 +8416,12 @@ void PDFWriterImpl::drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nT
// create XObject
m_aTransparentObjects.push_back( TransparencyEmit() );
// FIXME: polygons with beziers may yield incorrect bound rect
- m_aTransparentObjects.back().m_aBoundRect = rPolyPoly.GetBoundRect();
+ m_aTransparentObjects.back().m_aBoundRect = rPolyPoly.GetBoundRect();
// convert rectangle to default user space
m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
+ m_aTransparentObjects.back().m_nObject = createObject();
m_aTransparentObjects.back().m_nExtGStateObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
+ m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
m_aTransparentObjects.back().m_pContentStream = new SvMemoryStream( 256, 256 );
// create XObject's content stream
OStringBuffer aContent( 256 );
@@ -8528,8 +8528,8 @@ SvStream* PDFWriterImpl::endRedirect()
SvStream* pStream = NULL;
if( ! m_aOutputStreams.empty() )
{
- pStream = m_aOutputStreams.front().m_pStream;
- m_aMapMode = m_aOutputStreams.front().m_aMapMode;
+ pStream = m_aOutputStreams.front().m_pStream;
+ m_aMapMode = m_aOutputStreams.front().m_aMapMode;
m_aOutputStreams.pop_front();
}
@@ -8562,11 +8562,11 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uIn
{
// create XObject
m_aTransparentObjects.push_back( TransparencyEmit() );
- m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
+ m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
// convert rectangle to default user space
m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
+ m_aTransparentObjects.back().m_nObject = createObject();
+ m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
// get XObject's content stream
m_aTransparentObjects.back().m_pContentStream = static_cast<SvMemoryStream*>(endRedirect());
m_aTransparentObjects.back().m_nExtGStateObject = createObject();
@@ -8599,11 +8599,11 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, const B
{
// create XObject
m_aTransparentObjects.push_back( TransparencyEmit() );
- m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
+ m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
// convert rectangle to default user space
m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = 0.0;
+ m_aTransparentObjects.back().m_nObject = createObject();
+ m_aTransparentObjects.back().m_fAlpha = 0.0;
// get XObject's content stream
m_aTransparentObjects.back().m_pContentStream = static_cast<SvMemoryStream*>(endRedirect());
m_aTransparentObjects.back().m_nExtGStateObject = createObject();
@@ -9524,9 +9524,9 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
{
CHECK_RETURN( updateObject( rObject.m_nObject ) );
- Bitmap aBitmap;
- Color aTransparentColor( COL_TRANSPARENT );
- bool bWriteMask = false;
+ Bitmap aBitmap;
+ Color aTransparentColor( COL_TRANSPARENT );
+ bool bWriteMask = false;
if( ! bMask )
{
aBitmap = rObject.m_aBitmap.GetBitmap();
@@ -9590,8 +9590,8 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
break;
}
- sal_Int32 nStreamLengthObject = createObject();
- sal_Int32 nMaskObject = 0;
+ sal_Int32 nStreamLengthObject = createObject();
+ sal_Int32 nMaskObject = 0;
#if OSL_DEBUG_LEVEL > 1
{
@@ -9642,7 +9642,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
//check encryption buffer size
if( checkEncryptionBufferSize( pAccess->GetPaletteEntryCount()*3 ) )
{
- int nChar = 0;
+ int nChar = 0;
//fill the encryption buffer
for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
@@ -9787,8 +9787,8 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
if( nMaskObject )
{
BitmapEmit aEmit;
- aEmit.m_nObject = nMaskObject;
- aEmit.m_aBitmap = rObject.m_aBitmap;
+ aEmit.m_nObject = nMaskObject;
+ aEmit.m_aBitmap = rObject.m_aBitmap;
return writeBitmapObject( aEmit, true );
}
@@ -9814,12 +9814,12 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
pStream->Seek( STREAM_SEEK_TO_END );
BitmapID aID;
- aID.m_aPixelSize = rSizePixel;
- aID.m_nSize = pStream->Tell();
+ aID.m_aPixelSize = rSizePixel;
+ aID.m_nSize = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_BEGIN );
- aID.m_nChecksum = rtl_crc32( 0, pStream->GetData(), aID.m_nSize );
+ aID.m_nChecksum = rtl_crc32( 0, pStream->GetData(), aID.m_nSize );
if( ! rMask.IsEmpty() )
- aID.m_nMaskChecksum = rMask.GetChecksum();
+ aID.m_nMaskChecksum = rMask.GetChecksum();
std::list< JPGEmit >::const_iterator it;
for( it = m_aJPGs.begin(); it != m_aJPGs.end() && ! (aID == it->m_aID); ++it )
@@ -9828,12 +9828,12 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
{
m_aJPGs.push_front( JPGEmit() );
JPGEmit& rEmit = m_aJPGs.front();
- rEmit.m_nObject = createObject();
- rEmit.m_aID = aID;
- rEmit.m_pStream = pStream;
+ rEmit.m_nObject = createObject();
+ rEmit.m_aID = aID;
+ rEmit.m_pStream = pStream;
rEmit.m_bTrueColor = bIsTrueColor;
if( !! rMask && rMask.GetSizePixel() == rSizePixel )
- rEmit.m_aMask = rMask;
+ rEmit.m_aMask = rMask;
it = m_aJPGs.begin();
}
@@ -9843,7 +9843,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
aLine.append( "q " );
sal_Int32 nCheckWidth = 0;
m_aPages.back().appendMappedLength( (sal_Int32)rTargetArea.GetWidth(), aLine, false, &nCheckWidth );
- aLine.append( " 0 0 " );
+ aLine.append( " 0 0 " );
sal_Int32 nCheckHeight = 0;
m_aPages.back().appendMappedLength( (sal_Int32)rTargetArea.GetHeight(), aLine, true, &nCheckHeight );
aLine.append( ' ' );
@@ -9903,10 +9903,10 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& rBitmap, bool bDrawMask )
{
BitmapID aID;
- aID.m_aPixelSize = rBitmap.GetSizePixel();
- aID.m_nSize = rBitmap.GetBitCount();
- aID.m_nChecksum = rBitmap.GetBitmap().GetChecksum();
- aID.m_nMaskChecksum = 0;
+ aID.m_aPixelSize = rBitmap.GetSizePixel();
+ aID.m_nSize = rBitmap.GetBitCount();
+ aID.m_nChecksum = rBitmap.GetBitmap().GetChecksum();
+ aID.m_nMaskChecksum = 0;
if( rBitmap.IsAlpha() )
aID.m_nMaskChecksum = rBitmap.GetAlpha().GetChecksum();
else
@@ -9924,10 +9924,10 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx
if( it == m_aBitmaps.end() )
{
m_aBitmaps.push_front( BitmapEmit() );
- m_aBitmaps.front().m_aID = aID;
- m_aBitmaps.front().m_aBitmap = rBitmap;
- m_aBitmaps.front().m_nObject = createObject();
- m_aBitmaps.front().m_bDrawMask = bDrawMask;
+ m_aBitmaps.front().m_aID = aID;
+ m_aBitmaps.front().m_aBitmap = rBitmap;
+ m_aBitmaps.front().m_nObject = createObject();
+ m_aBitmaps.front().m_bDrawMask = bDrawMask;
it = m_aBitmaps.begin();
}
@@ -10002,9 +10002,9 @@ sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size&
if( it == m_aGradients.end() )
{
m_aGradients.push_front( GradientEmit() );
- m_aGradients.front().m_aGradient = rGradient;
- m_aGradients.front().m_nObject = createObject();
- m_aGradients.front().m_aSize = aPtSize;
+ m_aGradients.front().m_aGradient = rGradient;
+ m_aGradients.front().m_nObject = createObject();
+ m_aGradients.front().m_aSize = aPtSize;
it = m_aGradients.begin();
}
@@ -10110,7 +10110,7 @@ void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
return;
if( rPolyPoly.Count() )
{
- PolyPolygon aPolyPoly( rPolyPoly );
+ PolyPolygon aPolyPoly( rPolyPoly );
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
push( PUSH_LINECOLOR );
@@ -10124,9 +10124,9 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
{
MARK( "drawWallpaper" );
- bool bDrawColor = false;
- bool bDrawGradient = false;
- bool bDrawBitmap = false;
+ bool bDrawColor = false;
+ bool bDrawGradient = false;
+ bool bDrawBitmap = false;
BitmapEx aBitmap;
Point aBmpPos = rRect.TopLeft();
@@ -10149,7 +10149,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
{
if( rWall.GetStyle() != WALLPAPER_TILE )
{
- bDrawBitmap = true;
+ bDrawBitmap = true;
if( rWall.IsGradient() )
bDrawGradient = true;
else
@@ -10214,8 +10214,8 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
aTilingStream.append( " Do\n" );
m_aTilings.push_back( TilingEmit() );
- m_aTilings.back().m_nObject = createObject();
- m_aTilings.back().m_aRectangle = Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
+ m_aTilings.back().m_nObject = createObject();
+ m_aTilings.back().m_aRectangle = Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
m_aTilings.back().m_pTilingStream = new SvMemoryStream();
m_aTilings.back().m_pTilingStream->Write( aTilingStream.getStr(), aTilingStream.getLength() );
// phase the tiling so wallpaper begins on upper left
@@ -10243,9 +10243,9 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
}
else
{
- aBmpPos = aRect.TopLeft();
- aBmpSize = aRect.GetSize();
- bDrawBitmap = true;
+ aBmpPos = aRect.TopLeft();
+ aBmpSize = aRect.GetSize();
+ bDrawBitmap = true;
}
if( aBitmap.IsTransparent() )
@@ -10535,7 +10535,7 @@ void PDFWriterImpl::pop()
OSL_ENSURE( m_aGraphicsStack.size() > 1, "pop without push" );
if( m_aGraphicsStack.size() < 2 )
return;
-
+
GraphicsState aState = m_aGraphicsStack.front();
m_aGraphicsStack.pop_front();
GraphicsState& rOld = m_aGraphicsStack.front();
@@ -10646,9 +10646,9 @@ void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sa
return;
m_aNotes.push_back( PDFNoteEntry() );
- m_aNotes.back().m_nObject = createObject();
- m_aNotes.back().m_aContents = rNote;
- m_aNotes.back().m_aRect = rRect;
+ m_aNotes.back().m_nObject = createObject();
+ m_aNotes.back().m_aContents = rNote;
+ m_aNotes.back().m_aRect = rRect;
// convert to default user space now, since the mapmode may change
m_aPages[nPageNr].convertRect( m_aNotes.back().m_aRect );
@@ -10667,9 +10667,9 @@ sal_Int32 PDFWriterImpl::createLink( const Rectangle& rRect, sal_Int32 nPageNr )
sal_Int32 nRet = m_aLinks.size();
m_aLinks.push_back( PDFLink() );
- m_aLinks.back().m_nObject = createObject();
- m_aLinks.back().m_nPage = nPageNr;
- m_aLinks.back().m_aRect = rRect;
+ m_aLinks.back().m_nObject = createObject();
+ m_aLinks.back().m_nPage = nPageNr;
+ m_aLinks.back().m_aRect = rRect;
// convert to default user space now, since the mapmode may change
m_aPages[nPageNr].convertRect( m_aLinks.back().m_aRect );
@@ -10714,7 +10714,7 @@ sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr,
m_aDests.push_back( PDFDest() );
m_aDests.back().m_nPage = nPageNr;
- m_aDests.back().m_eType = eType;
+ m_aDests.back().m_eType = eType;
m_aDests.back().m_aRect = rRect;
// convert to default user space now, since the mapmode may change
m_aPages[nPageNr].convertRect( m_aDests.back().m_aRect );
@@ -10739,7 +10739,7 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL )
if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() )
return -1;
- m_aLinks[ nLinkId ].m_nDest = -1;
+ m_aLinks[ nLinkId ].m_nDest = -1;
using namespace ::com::sun::star;
@@ -10759,7 +10759,7 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL )
if (m_xTrans.is())
m_xTrans->parseStrict( aURL );
- m_aLinks[ nLinkId ].m_aURL = aURL.Complete;
+ m_aLinks[ nLinkId ].m_aURL = aURL.Complete;
return 0;
}
@@ -10843,42 +10843,42 @@ const sal_Char* PDFWriterImpl::getStructureTag( PDFWriter::StructElement eType )
if( aTagStrings.empty() )
{
aTagStrings[ PDFWriter::NonStructElement] = "NonStruct";
- aTagStrings[ PDFWriter::Document ] = "Document";
- aTagStrings[ PDFWriter::Part ] = "Part";
- aTagStrings[ PDFWriter::Article ] = "Art";
- aTagStrings[ PDFWriter::Section ] = "Sect";
- aTagStrings[ PDFWriter::Division ] = "Div";
- aTagStrings[ PDFWriter::BlockQuote ] = "BlockQuote";
- aTagStrings[ PDFWriter::Caption ] = "Caption";
- aTagStrings[ PDFWriter::TOC ] = "TOC";
- aTagStrings[ PDFWriter::TOCI ] = "TOCI";
- aTagStrings[ PDFWriter::Index ] = "Index";
- aTagStrings[ PDFWriter::Paragraph ] = "P";
- aTagStrings[ PDFWriter::Heading ] = "H";
- aTagStrings[ PDFWriter::H1 ] = "H1";
- aTagStrings[ PDFWriter::H2 ] = "H2";
- aTagStrings[ PDFWriter::H3 ] = "H3";
- aTagStrings[ PDFWriter::H4 ] = "H4";
- aTagStrings[ PDFWriter::H5 ] = "H5";
- aTagStrings[ PDFWriter::H6 ] = "H6";
- aTagStrings[ PDFWriter::List ] = "L";
- aTagStrings[ PDFWriter::ListItem ] = "LI";
- aTagStrings[ PDFWriter::LILabel ] = "Lbl";
- aTagStrings[ PDFWriter::LIBody ] = "LBody";
- aTagStrings[ PDFWriter::Table ] = "Table";
- aTagStrings[ PDFWriter::TableRow ] = "TR";
- aTagStrings[ PDFWriter::TableHeader ] = "TH";
- aTagStrings[ PDFWriter::TableData ] = "TD";
- aTagStrings[ PDFWriter::Span ] = "Span";
- aTagStrings[ PDFWriter::Quote ] = "Quote";
- aTagStrings[ PDFWriter::Note ] = "Note";
- aTagStrings[ PDFWriter::Reference ] = "Reference";
- aTagStrings[ PDFWriter::BibEntry ] = "BibEntry";
- aTagStrings[ PDFWriter::Code ] = "Code";
- aTagStrings[ PDFWriter::Link ] = "Link";
- aTagStrings[ PDFWriter::Figure ] = "Figure";
- aTagStrings[ PDFWriter::Formula ] = "Formula";
- aTagStrings[ PDFWriter::Form ] = "Form";
+ aTagStrings[ PDFWriter::Document ] = "Document";
+ aTagStrings[ PDFWriter::Part ] = "Part";
+ aTagStrings[ PDFWriter::Article ] = "Art";
+ aTagStrings[ PDFWriter::Section ] = "Sect";
+ aTagStrings[ PDFWriter::Division ] = "Div";
+ aTagStrings[ PDFWriter::BlockQuote ] = "BlockQuote";
+ aTagStrings[ PDFWriter::Caption ] = "Caption";
+ aTagStrings[ PDFWriter::TOC ] = "TOC";
+ aTagStrings[ PDFWriter::TOCI ] = "TOCI";
+ aTagStrings[ PDFWriter::Index ] = "Index";
+ aTagStrings[ PDFWriter::Paragraph ] = "P";
+ aTagStrings[ PDFWriter::Heading ] = "H";
+ aTagStrings[ PDFWriter::H1 ] = "H1";
+ aTagStrings[ PDFWriter::H2 ] = "H2";
+ aTagStrings[ PDFWriter::H3 ] = "H3";
+ aTagStrings[ PDFWriter::H4 ] = "H4";
+ aTagStrings[ PDFWriter::H5 ] = "H5";
+ aTagStrings[ PDFWriter::H6 ] = "H6";
+ aTagStrings[ PDFWriter::List ] = "L";
+ aTagStrings[ PDFWriter::ListItem ] = "LI";
+ aTagStrings[ PDFWriter::LILabel ] = "Lbl";
+ aTagStrings[ PDFWriter::LIBody ] = "LBody";
+ aTagStrings[ PDFWriter::Table ] = "Table";
+ aTagStrings[ PDFWriter::TableRow ] = "TR";
+ aTagStrings[ PDFWriter::TableHeader ] = "TH";
+ aTagStrings[ PDFWriter::TableData ] = "TD";
+ aTagStrings[ PDFWriter::Span ] = "Span";
+ aTagStrings[ PDFWriter::Quote ] = "Quote";
+ aTagStrings[ PDFWriter::Note ] = "Note";
+ aTagStrings[ PDFWriter::Reference ] = "Reference";
+ aTagStrings[ PDFWriter::BibEntry ] = "BibEntry";
+ aTagStrings[ PDFWriter::Code ] = "Code";
+ aTagStrings[ PDFWriter::Link ] = "Link";
+ aTagStrings[ PDFWriter::Figure ] = "Figure";
+ aTagStrings[ PDFWriter::Formula ] = "Formula";
+ aTagStrings[ PDFWriter::Form ] = "Form";
}
std::map< PDFWriter::StructElement, const char* >::const_iterator it = aTagStrings.find( eType );
@@ -10888,7 +10888,7 @@ const sal_Char* PDFWriterImpl::getStructureTag( PDFWriter::StructElement eType )
void PDFWriterImpl::beginStructureElementMCSeq()
{
- if( m_bEmitStructure &&
+ if( m_bEmitStructure &&
m_nCurrentStructElement > 0 && // StructTreeRoot
! m_aStructure[ m_nCurrentStructElement ].m_bOpenMCSeq // already opened sequence
)
@@ -11011,10 +11011,10 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType,
sal_Int32 nNewId = sal_Int32(m_aStructure.size());
m_aStructure.push_back( PDFStructureElement() );
PDFStructureElement& rEle = m_aStructure.back();
- rEle.m_eType = eType;
- rEle.m_nOwnElement = nNewId;
- rEle.m_nParentElement = m_nCurrentStructElement;
- rEle.m_nFirstPageObject = m_aPages[ m_nCurrentPage ].m_nPageObject;
+ rEle.m_eType = eType;
+ rEle.m_nOwnElement = nNewId;
+ rEle.m_nParentElement = m_nCurrentStructElement;
+ rEle.m_nFirstPageObject = m_aPages[ m_nCurrentPage ].m_nPageObject;
m_aStructure[ m_nCurrentStructElement ].m_aChildren.push_back( nNewId );
m_nCurrentStructElement = nNewId;
@@ -11047,7 +11047,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType,
if( m_bEmitStructure ) // don't create nonexistant objects
{
- rEle.m_nObject = createObject();
+ rEle.m_nObject = createObject();
// update parent's kids list
m_aStructure[ rEle.m_nParentElement ].m_aKids.push_back( rEle.m_nObject );
}
@@ -11102,7 +11102,7 @@ void PDFWriterImpl::endStructureElement()
* This function adds an internal structure list container to overcome the 8191 elements array limitation
* in kids element emission.
* Recursive function
- *
+ *
*/
void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
{
@@ -11160,21 +11160,21 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
m_aStructure.push_back( PDFStructureElement() );
PDFStructureElement& rEleNew = m_aStructure.back();
rEleNew.m_aAlias = aAliasName;
- rEleNew.m_eType = PDFWriter::Division; // a new Div type container
- rEleNew.m_nOwnElement = nNewId;
- rEleNew.m_nParentElement = nCurrentStructElement;
+ rEleNew.m_eType = PDFWriter::Division; // a new Div type container
+ rEleNew.m_nOwnElement = nNewId;
+ rEleNew.m_nParentElement = nCurrentStructElement;
//inherit the same page as the first child to be reparented
- rEleNew.m_nFirstPageObject = m_aStructure[ rEle.m_aChildren.front() ].m_nFirstPageObject;
+ rEleNew.m_nFirstPageObject = m_aStructure[ rEle.m_aChildren.front() ].m_nFirstPageObject;
rEleNew.m_nObject = createObject();//assign a PDF object number
//add the object to the kid list of the parent
aNewKids.push_back( PDFStructureElementKid( rEleNew.m_nObject ) );
aNewChildren.push_back( nNewId );
-
+
std::list< sal_Int32 >::iterator aChildEndIt( rEle.m_aChildren.begin() );
std::list< PDFStructureElementKid >::iterator aKidEndIt( rEle.m_aKids.begin() );
advance( aChildEndIt, ncMaxPDFArraySize );
advance( aKidEndIt, ncMaxPDFArraySize );
-
+
rEleNew.m_aKids.splice( rEleNew.m_aKids.begin(),
rEle.m_aKids,
rEle.m_aKids.begin(),
@@ -11193,7 +11193,7 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
//finally add the new kids resulting from the container added
rEle.m_aKids.insert( rEle.m_aKids.begin(), aNewKids.begin(), aNewKids.end() );
rEle.m_aChildren.insert( rEle.m_aChildren.begin(), aNewChildren.begin(), aNewChildren.end() );
- }
+ }
}
}
}
@@ -11248,42 +11248,42 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
switch( eAttr )
{
case PDFWriter::Placement:
- if( eVal == PDFWriter::Block ||
- eVal == PDFWriter::Inline ||
- eVal == PDFWriter::Before ||
- eVal == PDFWriter::Start ||
+ if( eVal == PDFWriter::Block ||
+ eVal == PDFWriter::Inline ||
+ eVal == PDFWriter::Before ||
+ eVal == PDFWriter::Start ||
eVal == PDFWriter::End )
bInsert = true;
break;
case PDFWriter::WritingMode:
- if( eVal == PDFWriter::LrTb ||
- eVal == PDFWriter::RlTb ||
+ if( eVal == PDFWriter::LrTb ||
+ eVal == PDFWriter::RlTb ||
eVal == PDFWriter::TbRl )
{
bInsert = true;
}
break;
case PDFWriter::TextAlign:
- if( eVal == PDFWriter::Start ||
- eVal == PDFWriter::Center ||
- eVal == PDFWriter::End ||
+ if( eVal == PDFWriter::Start ||
+ eVal == PDFWriter::Center ||
+ eVal == PDFWriter::End ||
eVal == PDFWriter::Justify )
{
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11294,11 +11294,11 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
case PDFWriter::Height:
if( eVal == PDFWriter::Auto )
{
- if( eType == PDFWriter::Figure ||
- eType == PDFWriter::Formula ||
- eType == PDFWriter::Form ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Figure ||
+ eType == PDFWriter::Formula ||
+ eType == PDFWriter::Form ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11306,12 +11306,12 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::BlockAlign:
- if( eVal == PDFWriter::Before ||
- eVal == PDFWriter::Middle ||
- eVal == PDFWriter::After ||
+ if( eVal == PDFWriter::Before ||
+ eVal == PDFWriter::Middle ||
+ eVal == PDFWriter::After ||
eVal == PDFWriter::Justify )
{
- if( eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11319,11 +11319,11 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::InlineAlign:
- if( eVal == PDFWriter::Start ||
- eVal == PDFWriter::Center ||
+ if( eVal == PDFWriter::Start ||
+ eVal == PDFWriter::Center ||
eVal == PDFWriter::End )
{
- if( eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11331,32 +11331,32 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::LineHeight:
- if( eVal == PDFWriter::Normal ||
+ if( eVal == PDFWriter::Normal ||
eVal == PDFWriter::Auto )
{
// only for ILSE and BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
- eType == PDFWriter::TableData ||
- eType == PDFWriter::Span ||
- eType == PDFWriter::Quote ||
- eType == PDFWriter::Note ||
- eType == PDFWriter::Reference ||
- eType == PDFWriter::BibEntry ||
- eType == PDFWriter::Code ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
+ eType == PDFWriter::TableData ||
+ eType == PDFWriter::Span ||
+ eType == PDFWriter::Quote ||
+ eType == PDFWriter::Note ||
+ eType == PDFWriter::Reference ||
+ eType == PDFWriter::BibEntry ||
+ eType == PDFWriter::Code ||
eType == PDFWriter::Link )
{
bInsert = true;
@@ -11364,34 +11364,34 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::TextDecorationType:
- if( eVal == PDFWriter::NONE ||
- eVal == PDFWriter::Underline ||
- eVal == PDFWriter::Overline ||
+ if( eVal == PDFWriter::NONE ||
+ eVal == PDFWriter::Underline ||
+ eVal == PDFWriter::Overline ||
eVal == PDFWriter::LineThrough )
{
// only for ILSE and BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
- eType == PDFWriter::TableData ||
- eType == PDFWriter::Span ||
- eType == PDFWriter::Quote ||
- eType == PDFWriter::Note ||
- eType == PDFWriter::Reference ||
- eType == PDFWriter::BibEntry ||
- eType == PDFWriter::Code ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
+ eType == PDFWriter::TableData ||
+ eType == PDFWriter::Span ||
+ eType == PDFWriter::Quote ||
+ eType == PDFWriter::Note ||
+ eType == PDFWriter::Reference ||
+ eType == PDFWriter::BibEntry ||
+ eType == PDFWriter::Code ||
eType == PDFWriter::Link )
{
bInsert = true;
@@ -11399,14 +11399,14 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::ListNumbering:
- if( eVal == PDFWriter::NONE ||
- eVal == PDFWriter::Disc ||
- eVal == PDFWriter::Circle ||
- eVal == PDFWriter::Square ||
- eVal == PDFWriter::Decimal ||
- eVal == PDFWriter::UpperRoman ||
- eVal == PDFWriter::LowerRoman ||
- eVal == PDFWriter::UpperAlpha ||
+ if( eVal == PDFWriter::NONE ||
+ eVal == PDFWriter::Disc ||
+ eVal == PDFWriter::Circle ||
+ eVal == PDFWriter::Square ||
+ eVal == PDFWriter::Decimal ||
+ eVal == PDFWriter::UpperRoman ||
+ eVal == PDFWriter::LowerRoman ||
+ eVal == PDFWriter::UpperAlpha ||
eVal == PDFWriter::LowerAlpha )
{
if( eType == PDFWriter::List )
@@ -11454,21 +11454,21 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
case PDFWriter::StartIndent:
case PDFWriter::EndIndent:
// just for BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11476,17 +11476,17 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
break;
case PDFWriter::TextIndent:
// paragraph like BLSE and additional elements
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11494,11 +11494,11 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
break;
case PDFWriter::Width:
case PDFWriter::Height:
- if( eType == PDFWriter::Figure ||
- eType == PDFWriter::Formula ||
- eType == PDFWriter::Form ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Figure ||
+ eType == PDFWriter::Formula ||
+ eType == PDFWriter::Form ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11507,28 +11507,28 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
case PDFWriter::LineHeight:
case PDFWriter::BaselineShift:
// only for ILSE and BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
- eType == PDFWriter::TableData ||
- eType == PDFWriter::Span ||
- eType == PDFWriter::Quote ||
- eType == PDFWriter::Note ||
- eType == PDFWriter::Reference ||
- eType == PDFWriter::BibEntry ||
- eType == PDFWriter::Code ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
+ eType == PDFWriter::TableData ||
+ eType == PDFWriter::Span ||
+ eType == PDFWriter::Quote ||
+ eType == PDFWriter::Note ||
+ eType == PDFWriter::Reference ||
+ eType == PDFWriter::BibEntry ||
+ eType == PDFWriter::Code ||
eType == PDFWriter::Link )
{
bInsert = true;
@@ -11537,7 +11537,7 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
case PDFWriter::RowSpan:
case PDFWriter::ColSpan:
// only for table cells
- if( eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11575,9 +11575,9 @@ void PDFWriterImpl::setStructureBoundingBox( const Rectangle& rRect )
if( m_nCurrentStructElement > 0 && m_bEmitStructure )
{
PDFWriter::StructElement eType = m_aStructure[ m_nCurrentStructElement ].m_eType;
- if( eType == PDFWriter::Figure ||
- eType == PDFWriter::Formula ||
- eType == PDFWriter::Form ||
+ if( eType == PDFWriter::Figure ||
+ eType == PDFWriter::Formula ||
+ eType == PDFWriter::Form ||
eType == PDFWriter::Table )
{
m_aStructure[ m_nCurrentStructElement ].m_aBBox = rRect;
@@ -11622,8 +11622,8 @@ void PDFWriterImpl::setPageTransition( PDFWriter::PageTransition eType, sal_uInt
if( nPageNr < 0 || nPageNr >= (sal_Int32)m_aPages.size() )
return;
- m_aPages[ nPageNr ].m_eTransition = eType;
- m_aPages[ nPageNr ].m_nTransTime = nMilliSec;
+ m_aPages[ nPageNr ].m_eTransition = eType;
+ m_aPages[ nPageNr ].m_nTransTime = nMilliSec;
}
void PDFWriterImpl::ensureUniqueRadioOnValues()
@@ -11712,9 +11712,9 @@ sal_Int32 PDFWriterImpl::findRadioGroupWidget( const PDFWriter::RadioButtonWidge
// new group, insert the radiobutton
m_aWidgets.push_back( PDFWidget() );
- m_aWidgets.back().m_nObject = createObject();
- m_aWidgets.back().m_nPage = m_nCurrentPage;
- m_aWidgets.back().m_eType = PDFWriter::RadioButton;
+ m_aWidgets.back().m_nObject = createObject();
+ m_aWidgets.back().m_nPage = m_nCurrentPage;
+ m_aWidgets.back().m_eType = PDFWriter::RadioButton;
m_aWidgets.back().m_nRadioGroup = rBtn.RadioGroup;
m_aWidgets.back().m_nFlags |= 0x0000C000; // NoToggleToOff and Radio bits
@@ -11737,10 +11737,10 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
sal_Int32 nNewWidget = m_aWidgets.size();
m_aWidgets.push_back( PDFWidget() );
- m_aWidgets.back().m_nObject = createObject();
- m_aWidgets.back().m_aRect = rControl.Location;
- m_aWidgets.back().m_nPage = nPageNr;
- m_aWidgets.back().m_eType = rControl.getType();
+ m_aWidgets.back().m_nObject = createObject();
+ m_aWidgets.back().m_aRect = rControl.Location;
+ m_aWidgets.back().m_nPage = nPageNr;
+ m_aWidgets.back().m_eType = rControl.getType();
sal_Int32 nRadioGroupWidget = -1;
// for unknown reasons the radio buttons of a radio group must not have a
@@ -11754,10 +11754,10 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
}
// caution: m_aWidgets must not be changed after here or rNewWidget may be invalid
- PDFWidget& rNewWidget = m_aWidgets[nNewWidget];
- rNewWidget.m_aDescription = rControl.Description;
- rNewWidget.m_aText = rControl.Text;
- rNewWidget.m_nTextStyle = rControl.TextStyle &
+ PDFWidget& rNewWidget = m_aWidgets[nNewWidget];
+ rNewWidget.m_aDescription = rControl.Description;
+ rNewWidget.m_aText = rControl.Text;
+ rNewWidget.m_nTextStyle = rControl.TextStyle &
( TEXT_DRAW_LEFT | TEXT_DRAW_CENTER | TEXT_DRAW_RIGHT | TEXT_DRAW_TOP |
TEXT_DRAW_VCENTER | TEXT_DRAW_BOTTOM |
TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK );
@@ -11794,8 +11794,8 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
* so we need to create a radio button on demand for a new group
* and insert a checkbox for each RadioButtonWidget as its child
*/
- rNewWidget.m_eType = PDFWriter::CheckBox;
- rNewWidget.m_nRadioGroup = rBtn.RadioGroup;
+ rNewWidget.m_eType = PDFWriter::CheckBox;
+ rNewWidget.m_nRadioGroup = rBtn.RadioGroup;
DBG_ASSERT( nRadioGroupWidget >= 0 && nRadioGroupWidget < (sal_Int32)m_aWidgets.size(), "no radio group parent" );
@@ -11808,8 +11808,8 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_aOnValue = rBtn.OnValue;
if( ! rRadioButton.m_aValue.getLength() && rBtn.Selected )
{
- rNewWidget.m_aValue = rNewWidget.m_aOnValue;
- rRadioButton.m_aValue = rNewWidget.m_aOnValue;
+ rNewWidget.m_aValue = rNewWidget.m_aOnValue;
+ rRadioButton.m_aValue = rNewWidget.m_aOnValue;
}
createDefaultRadioButtonAppearance( rNewWidget, rBtn );
@@ -11835,9 +11835,9 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_nTextStyle = TEXT_DRAW_VCENTER;
const PDFWriter::ListBoxWidget& rLstBox = static_cast<const PDFWriter::ListBoxWidget&>(rControl);
- rNewWidget.m_aListEntries = rLstBox.Entries;
+ rNewWidget.m_aListEntries = rLstBox.Entries;
rNewWidget.m_aSelectedEntries = rLstBox.SelectedEntries;
- rNewWidget.m_aValue = rLstBox.Text;
+ rNewWidget.m_aValue = rLstBox.Text;
if( rLstBox.DropDown )
rNewWidget.m_nFlags |= 0x00020000;
if( rLstBox.Sort )
@@ -11853,28 +11853,28 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_nTextStyle = TEXT_DRAW_VCENTER;
const PDFWriter::ComboBoxWidget& rBox = static_cast<const PDFWriter::ComboBoxWidget&>(rControl);
- rNewWidget.m_aValue = rBox.Text;
- rNewWidget.m_aListEntries = rBox.Entries;
+ rNewWidget.m_aValue = rBox.Text;
+ rNewWidget.m_aListEntries = rBox.Entries;
rNewWidget.m_nFlags |= 0x00060000; // combo and edit flag
if( rBox.Sort )
rNewWidget.m_nFlags |= 0x00080000;
PDFWriter::ListBoxWidget aLBox;
- aLBox.Name = rBox.Name;
- aLBox.Description = rBox.Description;
- aLBox.Text = rBox.Text;
- aLBox.TextStyle = rBox.TextStyle;
- aLBox.ReadOnly = rBox.ReadOnly;
- aLBox.Border = rBox.Border;
- aLBox.BorderColor = rBox.BorderColor;
- aLBox.Background = rBox.Background;
- aLBox.BackgroundColor = rBox.BackgroundColor;
- aLBox.TextFont = rBox.TextFont;
- aLBox.TextColor = rBox.TextColor;
- aLBox.DropDown = true;
- aLBox.Sort = rBox.Sort;
- aLBox.MultiSelect = false;
- aLBox.Entries = rBox.Entries;
+ aLBox.Name = rBox.Name;
+ aLBox.Description = rBox.Description;
+ aLBox.Text = rBox.Text;
+ aLBox.TextStyle = rBox.TextStyle;
+ aLBox.ReadOnly = rBox.ReadOnly;
+ aLBox.Border = rBox.Border;
+ aLBox.BorderColor = rBox.BorderColor;
+ aLBox.Background = rBox.Background;
+ aLBox.BackgroundColor = rBox.BackgroundColor;
+ aLBox.TextFont = rBox.TextFont;
+ aLBox.TextColor = rBox.TextColor;
+ aLBox.DropDown = true;
+ aLBox.Sort = rBox.Sort;
+ aLBox.MultiSelect = false;
+ aLBox.Entries = rBox.Entries;
createDefaultListBoxAppearance( rNewWidget, aLBox );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 95b8419a8131..ce72411fbe08 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,19 +86,19 @@ public:
// definition of structs
struct BuiltinFont
{
- const char * m_pName; // Name
- const char * m_pStyleName; // StyleName
- const char * m_pPSName; // PSName
- int m_nAscent;
- int m_nDescent;
- FontFamily m_eFamily; // Family
- CharSet m_eCharSet; // CharSet
- FontPitch m_ePitch; // Pitch
- FontWidth m_eWidthType; // WidthType
- FontWeight m_eWeight; // Weight
- FontItalic m_eItalic; // Italic
- int m_aWidths[256]; // character metrics
-
+ const char * m_pName; // Name
+ const char * m_pStyleName; // StyleName
+ const char * m_pPSName; // PSName
+ int m_nAscent;
+ int m_nDescent;
+ FontFamily m_eFamily; // Family
+ CharSet m_eCharSet; // CharSet
+ FontPitch m_ePitch; // Pitch
+ FontWidth m_eWidthType; // WidthType
+ FontWeight m_eWeight; // Weight
+ FontItalic m_eItalic; // Italic
+ int m_aWidths[256]; // character metrics
+
rtl::OString getNameObject() const;
};
@@ -112,26 +112,26 @@ public:
ResourceMap m_aExtGStates;
ResourceMap m_aShadings;
ResourceMap m_aPatterns;
-
+
void append( rtl::OStringBuffer&, sal_Int32 nFontDictObject );
};
-
+
struct PDFPage
{
- PDFWriterImpl* m_pWriter;
- sal_Int32 m_nPageWidth; // in inch/72
- sal_Int32 m_nPageHeight; // in inch/72
- PDFWriter::Orientation m_eOrientation;
- sal_Int32 m_nPageObject;
- sal_Int32 m_nPageIndex;
- std::vector<sal_Int32> m_aStreamObjects;
- sal_Int32 m_nStreamLengthObject;
- sal_uInt64 m_nBeginStreamPos;
- std::vector<sal_Int32> m_aAnnotations;
- std::vector<sal_Int32> m_aMCIDParents;
- PDFWriter::PageTransition m_eTransition;
- sal_uInt32 m_nTransTime;
- sal_uInt32 m_nDuration;
+ PDFWriterImpl* m_pWriter;
+ sal_Int32 m_nPageWidth; // in inch/72
+ sal_Int32 m_nPageHeight; // in inch/72
+ PDFWriter::Orientation m_eOrientation;
+ sal_Int32 m_nPageObject;
+ sal_Int32 m_nPageIndex;
+ std::vector<sal_Int32> m_aStreamObjects;
+ sal_Int32 m_nStreamLengthObject;
+ sal_uInt64 m_nBeginStreamPos;
+ std::vector<sal_Int32> m_aAnnotations;
+ std::vector<sal_Int32> m_aMCIDParents;
+ PDFWriter::PageTransition m_eTransition;
+ sal_uInt32 m_nTransTime;
+ sal_uInt32 m_nDuration;
bool m_bHasWidgets;
PDFPage( PDFWriterImpl* pWriter, sal_Int32 nPageWidth, sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation );
@@ -166,7 +166,7 @@ public:
// can be important if the source MapMode is not
// symmetrical) to page length and appends it to the buffer
// if pOutLength is set it will be updated to the emitted length
- // (in PDF map mode, that is 10th of point)
+ // (in PDF map mode, that is 10th of point)
void appendMappedLength( sal_Int32 nLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL ) const;
// the same for double values
void appendMappedLength( double fLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL, sal_Int32 nPrecision = 5 ) const;
@@ -185,19 +185,19 @@ public:
struct BitmapID
{
- Size m_aPixelSize;
- sal_Int32 m_nSize;
- sal_Int32 m_nChecksum;
- sal_Int32 m_nMaskChecksum;
-
+ Size m_aPixelSize;
+ sal_Int32 m_nSize;
+ sal_Int32 m_nChecksum;
+ sal_Int32 m_nMaskChecksum;
+
BitmapID() : m_nSize( 0 ), m_nChecksum( 0 ), m_nMaskChecksum( 0 ) {}
BitmapID& operator=( const BitmapID& rCopy )
{
- m_aPixelSize = rCopy.m_aPixelSize;
- m_nSize = rCopy.m_nSize;
- m_nChecksum = rCopy.m_nChecksum;
- m_nMaskChecksum = rCopy.m_nMaskChecksum;
+ m_aPixelSize = rCopy.m_aPixelSize;
+ m_nSize = rCopy.m_nSize;
+ m_nChecksum = rCopy.m_nChecksum;
+ m_nMaskChecksum = rCopy.m_nMaskChecksum;
return *this;
}
@@ -212,20 +212,20 @@ public:
struct BitmapEmit
{
- BitmapID m_aID;
- BitmapEx m_aBitmap;
- sal_Int32 m_nObject;
- bool m_bDrawMask;
+ BitmapID m_aID;
+ BitmapEx m_aBitmap;
+ sal_Int32 m_nObject;
+ bool m_bDrawMask;
BitmapEmit() : m_bDrawMask( false ) {}
};
struct JPGEmit
{
- BitmapID m_aID;
- SvMemoryStream* m_pStream;
- Bitmap m_aMask;
- sal_Int32 m_nObject;
+ BitmapID m_aID;
+ SvMemoryStream* m_pStream;
+ Bitmap m_aMask;
+ sal_Int32 m_nObject;
bool m_bTrueColor;
JPGEmit() : m_pStream( NULL ) {}
@@ -234,9 +234,9 @@ public:
struct GradientEmit
{
- Gradient m_aGradient;
- Size m_aSize;
- sal_Int32 m_nObject;
+ Gradient m_aGradient;
+ Size m_aSize;
+ sal_Int32 m_nObject;
};
// for tilings (drawWallpaper, begin/endPattern)
@@ -248,7 +248,7 @@ public:
SvtGraphicFill::Transform m_aTransform;
ResourceDict m_aResources;
SvMemoryStream* m_pTilingStream;
-
+
TilingEmit()
: m_nObject( 0 ),
m_pTilingStream( NULL )
@@ -258,12 +258,12 @@ public:
// for transparency group XObjects
struct TransparencyEmit
{
- sal_Int32 m_nObject;
- sal_Int32 m_nExtGStateObject;
- double m_fAlpha;
- Rectangle m_aBoundRect;
- SvMemoryStream* m_pContentStream;
- SvMemoryStream* m_pSoftMaskStream;
+ sal_Int32 m_nObject;
+ sal_Int32 m_nExtGStateObject;
+ double m_fAlpha;
+ Rectangle m_aBoundRect;
+ SvMemoryStream* m_pContentStream;
+ SvMemoryStream* m_pSoftMaskStream;
TransparencyEmit()
: m_nObject( 0 ),
@@ -283,12 +283,12 @@ public:
class GlyphEmit
{
// performance: actually this should probably a vector;
- sal_Ucs m_aBufferedUnicodes[3];
+ sal_Ucs m_aBufferedUnicodes[3];
sal_Int32 m_nUnicodes;
sal_Int32 m_nMaxUnicodes;
boost::shared_array<sal_Ucs> m_pUnicodes;
sal_uInt8 m_nSubsetGlyphID;
-
+
public:
GlyphEmit() : m_nUnicodes(0), m_nSubsetGlyphID(0)
{
@@ -301,7 +301,7 @@ public:
void setGlyphId( sal_uInt8 i_nId ) { m_nSubsetGlyphID = i_nId; }
sal_uInt8 getGlyphId() const { return m_nSubsetGlyphID; }
-
+
void addCode( sal_Ucs i_cCode )
{
if( m_nUnicodes == m_nMaxUnicodes )
@@ -331,73 +331,73 @@ public:
typedef std::map< sal_GlyphId, GlyphEmit > FontEmitMapping;
struct FontEmit
{
- sal_Int32 m_nFontID;
- FontEmitMapping m_aMapping;
+ sal_Int32 m_nFontID;
+ FontEmitMapping m_aMapping;
FontEmit( sal_Int32 nID ) : m_nFontID( nID ) {}
};
typedef std::list< FontEmit > FontEmitList;
struct Glyph
{
- sal_Int32 m_nFontID;
- sal_uInt8 m_nSubsetGlyphID;
+ sal_Int32 m_nFontID;
+ sal_uInt8 m_nSubsetGlyphID;
};
typedef std::map< sal_GlyphId, Glyph > FontMapping;
struct FontSubset
{
- FontEmitList m_aSubsets;
- FontMapping m_aMapping;
+ FontEmitList m_aSubsets;
+ FontMapping m_aMapping;
};
typedef std::map< const ImplFontData*, FontSubset > FontSubsetData;
struct EmbedCode
{
- sal_Ucs m_aUnicode;
- rtl::OString m_aName;
+ sal_Ucs m_aUnicode;
+ rtl::OString m_aName;
};
struct EmbedEncoding
{
- sal_Int32 m_nFontID;
- std::vector< EmbedCode > m_aEncVector;
- std::map< sal_Ucs, sal_Int8 > m_aCMap;
+ sal_Int32 m_nFontID;
+ std::vector< EmbedCode > m_aEncVector;
+ std::map< sal_Ucs, sal_Int8 > m_aCMap;
};
struct EmbedFont
{
- sal_Int32 m_nNormalFontID;
- std::list< EmbedEncoding > m_aExtendedEncodings;
-
+ sal_Int32 m_nNormalFontID;
+ std::list< EmbedEncoding > m_aExtendedEncodings;
+
EmbedFont() : m_nNormalFontID( 0 ) {}
};
typedef std::map< const ImplFontData*, EmbedFont > FontEmbedData;
struct PDFDest
{
- sal_Int32 m_nPage;
- PDFWriter::DestAreaType m_eType;
- Rectangle m_aRect;
+ sal_Int32 m_nPage;
+ PDFWriter::DestAreaType m_eType;
+ Rectangle m_aRect;
};
//--->i56629
struct PDFNamedDest
{
rtl::OUString m_aDestName;
- sal_Int32 m_nPage;
- PDFWriter::DestAreaType m_eType;
- Rectangle m_aRect;
+ sal_Int32 m_nPage;
+ PDFWriter::DestAreaType m_eType;
+ Rectangle m_aRect;
};
//<---
-
+
struct PDFOutlineEntry
{
- sal_Int32 m_nParentID;
- sal_Int32 m_nObject;
- sal_Int32 m_nParentObject;
- sal_Int32 m_nNextObject;
- sal_Int32 m_nPrevObject;
- std::vector< sal_Int32 > m_aChildren;
- rtl::OUString m_aTitle;
- sal_Int32 m_nDestID;
-
- PDFOutlineEntry()
+ sal_Int32 m_nParentID;
+ sal_Int32 m_nObject;
+ sal_Int32 m_nParentObject;
+ sal_Int32 m_nNextObject;
+ sal_Int32 m_nPrevObject;
+ std::vector< sal_Int32 > m_aChildren;
+ rtl::OUString m_aTitle;
+ sal_Int32 m_nDestID;
+
+ PDFOutlineEntry()
: m_nParentID( -1 ),
m_nObject( 0 ),
m_nParentObject( 0 ),
@@ -409,9 +409,9 @@ public:
struct PDFAnnotation
{
- sal_Int32 m_nObject;
- Rectangle m_aRect;
- sal_Int32 m_nPage;
+ sal_Int32 m_nObject;
+ Rectangle m_aRect;
+ sal_Int32 m_nPage;
PDFAnnotation()
: m_nObject( -1 ),
@@ -421,11 +421,11 @@ public:
struct PDFLink : public PDFAnnotation
{
- sal_Int32 m_nDest; // set to -1 for URL, to a dest else
- rtl::OUString m_aURL;
+ sal_Int32 m_nDest; // set to -1 for URL, to a dest else
+ rtl::OUString m_aURL;
sal_Int32 m_nStructParent; // struct parent entry
-
- PDFLink()
+
+ PDFLink()
: m_nDest( -1 ),
m_nStructParent( -1 )
{}
@@ -433,7 +433,7 @@ public:
struct PDFNoteEntry : public PDFAnnotation
{
- PDFNote m_aContents;
+ PDFNote m_aContents;
PDFNoteEntry()
{}
@@ -444,34 +444,34 @@ public:
struct PDFWidget : public PDFAnnotation
{
- PDFWriter::WidgetType m_eType;
- rtl::OString m_aName;
- rtl::OUString m_aDescription;
- rtl::OUString m_aText;
- USHORT m_nTextStyle;
- rtl::OUString m_aValue;
+ PDFWriter::WidgetType m_eType;
+ rtl::OString m_aName;
+ rtl::OUString m_aDescription;
+ rtl::OUString m_aText;
+ USHORT m_nTextStyle;
+ rtl::OUString m_aValue;
rtl::OString m_aDAString;
rtl::OString m_aDRDict;
- rtl::OString m_aMKDict;
- rtl::OString m_aMKDictCAString; // i12626, added to be able to encrypt the /CA text string
+ rtl::OString m_aMKDict;
+ rtl::OString m_aMKDictCAString; // i12626, added to be able to encrypt the /CA text string
// since the object number is not known at the moment
// of filling m_aMKDict, the string will be encrypted when emitted.
// the /CA string MUST BE the last added to m_aMKDict
// see code for details
- sal_Int32 m_nFlags;
- sal_Int32 m_nParent; // if not 0, parent's object number
- std::vector<sal_Int32> m_aKids; // widget children, contains object numbers
+ sal_Int32 m_nFlags;
+ sal_Int32 m_nParent; // if not 0, parent's object number
+ std::vector<sal_Int32> m_aKids; // widget children, contains object numbers
std::vector<sal_Int32> m_aKidsIndex; // widget children, contains index to m_aWidgets
rtl::OUString m_aOnValue;
sal_Int32 m_nTabOrder; // lowest number gets first in tab order
- sal_Int32 m_nRadioGroup;
- sal_Int32 m_nMaxLen;
+ sal_Int32 m_nRadioGroup;
+ sal_Int32 m_nMaxLen;
bool m_bSubmit;
bool m_bSubmitGet;
sal_Int32 m_nDest;
- std::vector<rtl::OUString> m_aListEntries;
+ std::vector<rtl::OUString> m_aListEntries;
std::vector<sal_Int32> m_aSelectedEntries;
- PDFAppearanceMap m_aAppearances;
+ PDFAppearanceMap m_aAppearances;
PDFWidget()
: m_eType( PDFWriter::PushButton ),
m_nTextStyle( 0 ),
@@ -484,11 +484,11 @@ public:
m_nDest( -1 )
{}
};
-
+
struct PDFStructureAttribute
{
- PDFWriter::StructAttributeValue eValue;
- sal_Int32 nValue;
+ PDFWriter::StructAttributeValue eValue;
+ sal_Int32 nValue;
PDFStructureAttribute()
: eValue( PDFWriter::Invalid ),
@@ -513,26 +513,26 @@ public:
sal_Int32 nObject; // an object number if nMCID is -1,
// else the page object relevant to MCID
sal_Int32 nMCID; // an MCID if >= 0
-
+
PDFStructureElementKid( sal_Int32 nObj ) : nObject( nObj ), nMCID( -1 ) {}
PDFStructureElementKid( sal_Int32 MCID, sal_Int32 nPage ) : nObject( nPage ), nMCID( MCID ) {}
};
-
+
struct PDFStructureElement
{
- sal_Int32 m_nObject;
- PDFWriter::StructElement m_eType;
+ sal_Int32 m_nObject;
+ PDFWriter::StructElement m_eType;
rtl::OString m_aAlias;
- sal_Int32 m_nOwnElement; // index into structure vector
- sal_Int32 m_nParentElement; // index into structure vector
- sal_Int32 m_nFirstPageObject;
- bool m_bOpenMCSeq;
- std::list< sal_Int32 > m_aChildren; // indexes into structure vector
+ sal_Int32 m_nOwnElement; // index into structure vector
+ sal_Int32 m_nParentElement; // index into structure vector
+ sal_Int32 m_nFirstPageObject;
+ bool m_bOpenMCSeq;
+ std::list< sal_Int32 > m_aChildren; // indexes into structure vector
std::list< PDFStructureElementKid > m_aKids;
- PDFStructAttributes m_aAttributes;
- Rectangle m_aBBox;
- rtl::OUString m_aActualText;
- rtl::OUString m_aAltText;
+ PDFStructAttributes m_aAttributes;
+ Rectangle m_aBBox;
+ rtl::OUString m_aActualText;
+ rtl::OUString m_aAltText;
com::sun::star::lang::Locale m_aLocale;
// m_aContents contains the element's marked content sequence
@@ -549,18 +549,18 @@ public:
}
};
-
+
struct PDFAddStream
{
rtl::OUString m_aMimeType;
PDFOutputStream* m_pStream;
sal_Int32 m_nStreamObject;
bool m_bCompress;
-
+
PDFAddStream() : m_pStream( NULL ), m_nStreamObject( 0 ), m_bCompress( true ) {}
};
-
-
+
+
// helper structure for drawLayout and friends
struct PDFGlyph
{
@@ -569,7 +569,7 @@ public:
sal_Int32 m_nGlyphId;
sal_Int32 m_nMappedFontId;
sal_uInt8 m_nMappedGlyphId;
-
+
PDFGlyph( const Point& rPos,
sal_Int32 nNativeWidth,
sal_Int32 nGlyphId,
@@ -584,7 +584,7 @@ public:
static const sal_Char* getStructureTag( PDFWriter::StructElement );
static const sal_Char* getAttributeTag( PDFWriter::StructAttribute eAtr );
static const sal_Char* getAttributeValueTag( PDFWriter::StructAttributeValue eVal );
-
+
// returns true if compression was done
// else false
static bool compressStream( SvMemoryStream* );
@@ -593,99 +593,99 @@ public:
private:
static const BuiltinFont m_aBuiltinFonts[14];
- OutputDevice* m_pReferenceDevice;
+ OutputDevice* m_pReferenceDevice;
- MapMode m_aMapMode; // PDFWriterImpl scaled units
- std::vector< PDFPage > m_aPages;
- PDFDocInfo m_aDocInfo;
+ MapMode m_aMapMode; // PDFWriterImpl scaled units
+ std::vector< PDFPage > m_aPages;
+ PDFDocInfo m_aDocInfo;
/* maps object numbers to file offsets (needed for xref) */
- std::vector< sal_uInt64 > m_aObjects;
+ std::vector< sal_uInt64 > m_aObjects;
/* contains Bitmaps until they are written to the
* file stream as XObjects*/
- std::list< BitmapEmit > m_aBitmaps;
+ std::list< BitmapEmit > m_aBitmaps;
/* contains JPG streams until written to file */
- std::list<JPGEmit> m_aJPGs;
+ std::list<JPGEmit> m_aJPGs;
/*--->i56629 contains all named destinations ever set during the PDF creation,
destination id is always the destination's position in this vector
*/
- std::vector<PDFNamedDest> m_aNamedDests;
+ std::vector<PDFNamedDest> m_aNamedDests;
//<---
/* contains all dests ever set during the PDF creation,
dest id is always the dest's position in this vector
*/
- std::vector<PDFDest> m_aDests;
+ std::vector<PDFDest> m_aDests;
/* contains all links ever set during PDF creation,
link id is always the link's position in this vector
*/
- std::vector<PDFLink> m_aLinks;
+ std::vector<PDFLink> m_aLinks;
/* makes correctly encoded for export to PDF URLS
*/
com::sun::star::uno::Reference< com::sun::star::util::XURLTransformer > m_xTrans;
/* maps arbitrary link ids for structure attributes to real link ids
(for setLinkPropertyId)
*/
- std::map<sal_Int32, sal_Int32> m_aLinkPropertyMap;
+ std::map<sal_Int32, sal_Int32> m_aLinkPropertyMap;
/* contains all outline items,
object 0 is the outline root
*/
- std::vector<PDFOutlineEntry> m_aOutline;
+ std::vector<PDFOutlineEntry> m_aOutline;
/* contains all notes set during PDF creation
*/
- std::vector<PDFNoteEntry> m_aNotes;
+ std::vector<PDFNoteEntry> m_aNotes;
/* the root of the structure tree
*/
- std::vector<PDFStructureElement> m_aStructure;
+ std::vector<PDFStructureElement> m_aStructure;
/* current object in the structure hierarchy
*/
- sal_Int32 m_nCurrentStructElement;
+ sal_Int32 m_nCurrentStructElement;
/* structure parent tree */
std::vector< rtl::OString > m_aStructParentTree;
/* emit strucure marks currently (aka. NonStructElement or not)
*/
- bool m_bEmitStructure;
- bool m_bNewMCID;
+ bool m_bEmitStructure;
+ bool m_bNewMCID;
/* role map of struct tree root */
std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >
m_aRoleMap;
/* contains all widgets used in the PDF
*/
- std::vector<PDFWidget> m_aWidgets;
+ std::vector<PDFWidget> m_aWidgets;
/* maps radio group id to index of radio group control in m_aWidgets */
- std::map< sal_Int32, sal_Int32 > m_aRadioGroupWidgets;
+ std::map< sal_Int32, sal_Int32 > m_aRadioGroupWidgets;
/* used to store control id during beginControlAppearance/endControlAppearance */
- sal_Int32 m_nCurrentControl;
+ sal_Int32 m_nCurrentControl;
/* hash_map for field names, used to ensure unique field names */
std::hash_map< rtl::OString, sal_Int32, rtl::OStringHash > m_aFieldNameMap;
/* contains Bitmaps for gradient functions until they are written
* to the file stream */
- std::list< GradientEmit > m_aGradients;
+ std::list< GradientEmit > m_aGradients;
/* contains bitmap tiling patterns */
- std::vector< TilingEmit > m_aTilings;
- std::list< TransparencyEmit > m_aTransparentObjects;
+ std::vector< TilingEmit > m_aTilings;
+ std::list< TransparencyEmit > m_aTransparentObjects;
/* contains all font subsets in use */
- FontSubsetData m_aSubsets;
+ FontSubsetData m_aSubsets;
bool m_bEmbedStandardFonts;
- FontEmbedData m_aEmbeddedFonts;
+ FontEmbedData m_aEmbeddedFonts;
FontEmbedData m_aSystemFonts;
- sal_Int32 m_nNextFID;
+ sal_Int32 m_nNextFID;
PDFFontCache m_aFontCache;
- sal_Int32 m_nInheritedPageWidth; // in inch/72
- sal_Int32 m_nInheritedPageHeight; // in inch/72
- PDFWriter::Orientation m_eInheritedOrientation;
- sal_Int32 m_nCurrentPage;
+ sal_Int32 m_nInheritedPageWidth; // in inch/72
+ sal_Int32 m_nInheritedPageHeight; // in inch/72
+ PDFWriter::Orientation m_eInheritedOrientation;
+ sal_Int32 m_nCurrentPage;
- sal_Int32 m_nCatalogObject;
- sal_Int32 m_nResourceDict;
+ sal_Int32 m_nCatalogObject;
+ sal_Int32 m_nResourceDict;
ResourceDict m_aGlobalResourceDict;
sal_Int32 m_nFontDictObject;
std::map< sal_Int32, sal_Int32 > m_aBuiltinFontToObjectMap;
- PDFWriter::PDFWriterContext m_aContext;
- oslFileHandle m_aFile;
- bool m_bOpen;
+ PDFWriter::PDFWriterContext m_aContext;
+ oslFileHandle m_aFile;
+ bool m_bOpen;
/* output redirection; e.g. to accumulate content streams for
@@ -693,31 +693,31 @@ private:
*/
struct StreamRedirect
{
- SvStream* m_pStream;
- MapMode m_aMapMode;
+ SvStream* m_pStream;
+ MapMode m_aMapMode;
Rectangle m_aTargetRect;
ResourceDict m_aResourceDict;
};
- std::list< StreamRedirect > m_aOutputStreams;
+ std::list< StreamRedirect > m_aOutputStreams;
// graphics state
struct GraphicsState
{
- Font m_aFont;
- MapMode m_aMapMode;
- Color m_aLineColor;
- Color m_aFillColor;
- Color m_aTextLineColor;
- Color m_aOverlineColor;
- basegfx::B2DPolyPolygon m_aClipRegion;
+ Font m_aFont;
+ MapMode m_aMapMode;
+ Color m_aLineColor;
+ Color m_aFillColor;
+ Color m_aTextLineColor;
+ Color m_aOverlineColor;
+ basegfx::B2DPolyPolygon m_aClipRegion;
bool m_bClipRegion;
- sal_Int32 m_nAntiAlias;
- sal_Int32 m_nLayoutMode;
+ sal_Int32 m_nAntiAlias;
+ sal_Int32 m_nLayoutMode;
LanguageType m_aDigitLanguage;
- sal_Int32 m_nTransparentPercent;
- sal_uInt16 m_nFlags;
+ sal_Int32 m_nTransparentPercent;
+ sal_uInt16 m_nFlags;
sal_uInt16 m_nUpdateFlags;
-
+
static const sal_uInt16 updateFont = 0x0001;
static const sal_uInt16 updateMapMode = 0x0002;
static const sal_uInt16 updateLineColor = 0x0004;
@@ -763,80 +763,80 @@ private:
GraphicsState& operator=(const GraphicsState& rState )
{
- m_aFont = rState.m_aFont;
- m_aMapMode = rState.m_aMapMode;
- m_aLineColor = rState.m_aLineColor;
- m_aFillColor = rState.m_aFillColor;
- m_aTextLineColor = rState.m_aTextLineColor;
- m_aOverlineColor = rState.m_aOverlineColor;
- m_aClipRegion = rState.m_aClipRegion;
+ m_aFont = rState.m_aFont;
+ m_aMapMode = rState.m_aMapMode;
+ m_aLineColor = rState.m_aLineColor;
+ m_aFillColor = rState.m_aFillColor;
+ m_aTextLineColor = rState.m_aTextLineColor;
+ m_aOverlineColor = rState.m_aOverlineColor;
+ m_aClipRegion = rState.m_aClipRegion;
m_bClipRegion = rState.m_bClipRegion;
- m_nAntiAlias = rState.m_nAntiAlias;
- m_nLayoutMode = rState.m_nLayoutMode;
+ m_nAntiAlias = rState.m_nAntiAlias;
+ m_nLayoutMode = rState.m_nLayoutMode;
m_aDigitLanguage = rState.m_aDigitLanguage;
- m_nTransparentPercent = rState.m_nTransparentPercent;
- m_nFlags = rState.m_nFlags;
+ m_nTransparentPercent = rState.m_nTransparentPercent;
+ m_nFlags = rState.m_nFlags;
m_nUpdateFlags = rState.m_nUpdateFlags;
return *this;
}
};
- std::list< GraphicsState > m_aGraphicsStack;
- GraphicsState m_aCurrentPDFState;
-
- ZCodec* m_pCodec;
- SvMemoryStream* m_pMemStream;
+ std::list< GraphicsState > m_aGraphicsStack;
+ GraphicsState m_aCurrentPDFState;
+ ZCodec* m_pCodec;
+ SvMemoryStream* m_pMemStream;
+
std::vector< PDFAddStream > m_aAdditionalStreams;
std::set< PDFWriter::ErrorCode > m_aErrors;
-
+
rtlDigest m_aDocDigest;
/*
variables for PDF security
-i12626
+i12626
*/
/* used to cipher the stream data and for password management */
- rtlCipher m_aCipher;
- rtlDigest m_aDigest;
+ rtlCipher m_aCipher;
+ rtlDigest m_aDigest;
/* pad string used for password in Standard security handler */
- sal_uInt8 m_nPadString[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nPadString[ENCRYPTED_PWD_SIZE];
/* the owner password, in clear text */
- rtl::OUString m_aOwnerPassword;
+ rtl::OUString m_aOwnerPassword;
/* the padded owner password */
- sal_uInt8 m_nPaddedOwnerPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nPaddedOwnerPassword[ENCRYPTED_PWD_SIZE];
/* the encryption dictionary owner password, according to algorithm 3.3 */
- sal_uInt8 m_nEncryptedOwnerPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nEncryptedOwnerPassword[ENCRYPTED_PWD_SIZE];
/* the user password, in clear text */
- rtl::OUString m_aUserPassword;
+ rtl::OUString m_aUserPassword;
/* the padded user password */
- sal_uInt8 m_nPaddedUserPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nPaddedUserPassword[ENCRYPTED_PWD_SIZE];
/* the encryption dictionary user password, according to algorithm 3.4 or 3.5 depending on the
security handler revision */
- sal_uInt8 m_nEncryptedUserPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nEncryptedUserPassword[ENCRYPTED_PWD_SIZE];
/* the encryption key, formed with the user password according to algorithm 3.2, maximum length is 16 bytes + 3 + 2
for 128 bit security */
- sal_uInt8 m_nEncryptionKey[MAXIMUM_RC4_KEY_LENGTH];
- sal_Int32 m_nKeyLength; // key length, 16 or 5
- sal_Int32 m_nRC4KeyLength; // key length, 16 or 10, to be input to the algorith 3.1
+ sal_uInt8 m_nEncryptionKey[MAXIMUM_RC4_KEY_LENGTH];
+ sal_Int32 m_nKeyLength; // key length, 16 or 5
+ sal_Int32 m_nRC4KeyLength; // key length, 16 or 10, to be input to the algorith 3.1
/* set to true if the following stream must be encrypted, used inside writeBuffer() */
- sal_Bool m_bEncryptThisStream;
+ sal_Bool m_bEncryptThisStream;
/* the numerical value of the access permissions, according to PDF spec, must be signed */
sal_Int32 m_nAccessPermissions;
/* the document ID, the raw MD5 hash */
- sal_uInt8 m_nDocID[MD5_DIGEST_SIZE];
+ sal_uInt8 m_nDocID[MD5_DIGEST_SIZE];
/* string buffer to hold document ID, this is the output string */
- rtl::OStringBuffer m_aDocID;
+ rtl::OStringBuffer m_aDocID;
/* string to hold the PDF creation date */
- rtl::OStringBuffer m_aCreationDateString;
+ rtl::OStringBuffer m_aCreationDateString;
/* string to hold the PDF creation date, for PDF/A metadata */
- rtl::OStringBuffer m_aCreationMetaDateString;
+ rtl::OStringBuffer m_aCreationMetaDateString;
/* the buffer where the data are encrypted, dynamically allocated */
- sal_uInt8 *m_pEncryptionBuffer;
+ sal_uInt8 *m_pEncryptionBuffer;
/* size of the buffer */
- sal_Int32 m_nEncryptionBufferSize;
+ sal_Int32 m_nEncryptionBufferSize;
/* check and reallocate the buffer for encryption */
sal_Bool checkEncryptionBufferSize( register sal_Int32 newSize )
@@ -883,7 +883,7 @@ i12626
// do the MD5 hash
sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
// the i+2 to take into account the generation number, always zero
- rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
+ rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key legth: see algoritm 3.1, step 4: (N+5) max 16
rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
@@ -903,7 +903,7 @@ i12626
// do the MD5 hash
sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
// the i+2 to take into account the generation number, always zero
- rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
+ rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key legth: see algoritm 3.1, step 4: (N+5) max 16
rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
@@ -1035,7 +1035,7 @@ i12626
bool emitAdditionalStreams();
// emits info dict (if applicable)
sal_Int32 emitInfoDict( );
-
+
// acrobat reader 5 and 6 use the order of the annotations
// as their tab order; since PDF1.5 one can make the
// tab order explicit by using the structure tree
@@ -1050,10 +1050,10 @@ i12626
Font replaceFont( const Font& rControlFont, const Font& rAppSetFont );
sal_Int32 getBestBuiltinFont( const Font& rFont );
sal_Int32 getSystemFont( const Font& i_rFont );
-
+
// used for edit and listbox
Font drawFieldBorder( PDFWidget&, const PDFWriter::AnyWidget&, const StyleSettings& );
-
+
void createDefaultPushButtonAppearance( PDFWidget&, const PDFWriter::PushButtonWidget& rWidget );
void createDefaultCheckBoxAppearance( PDFWidget&, const PDFWriter::CheckBoxWidget& rWidget );
void createDefaultRadioButtonAppearance( PDFWidget&, const PDFWriter::RadioButtonWidget& rWidget );
@@ -1069,7 +1069,7 @@ i12626
/* sets the offset of object n to the current position of output file+1
*/
bool updateObject( sal_Int32 n );
-
+
bool writeBuffer( const void* pBuffer, sal_uInt64 nBytes );
void beginCompression();
void endCompression();
@@ -1115,9 +1115,9 @@ public:
PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext );
~PDFWriterImpl();
- /* for OutputDevice so the reference device can have a list
- * that contains only suitable fonts (subsettable or builtin)
- * produces a new font list
+ /* for OutputDevice so the reference device can have a list
+ * that contains only suitable fonts (subsettable or builtin)
+ * produces a new font list
*/
ImplDevFontList* filterDevFontList( ImplDevFontList* pFontList );
/* for OutputDevice: get layout for builtin fonts
@@ -1136,7 +1136,7 @@ public:
bool emit();
std::set< PDFWriter::ErrorCode > getErrors();
void insertError( PDFWriter::ErrorCode eErr ) { m_aErrors.insert( eErr ); }
-
+
Size getCurPageSize() const
{
Size aSize;
@@ -1148,7 +1148,7 @@ public:
PDFWriter::PDFVersion getVersion() const { return m_aContext.Version; }
void setDocInfo( const PDFDocInfo& rInfo );
const PDFDocInfo& getDocInfo() const { return m_aDocInfo; }
-
+
void setDocumentLocale( const com::sun::star::lang::Locale& rLoc )
{ m_aContext.DocumentLocale = rLoc; }
@@ -1174,19 +1174,19 @@ public:
void setFillColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aFillColor = ImplIsColorTransparent(rColor) ? Color( COL_TRANSPARENT ) : rColor;
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFillColor;
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFillColor;
}
void setTextLineColor()
{
m_aGraphicsStack.front().m_aTextLineColor = Color( COL_TRANSPARENT );
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
}
void setTextLineColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aTextLineColor = rColor;
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
}
void setOverlineColor()
@@ -1239,7 +1239,7 @@ public:
m_aGraphicsStack.front().m_nLayoutMode = nLayoutMode;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateLayoutMode;
}
-
+
void setDigitLanguage( LanguageType eLang )
{
m_aGraphicsStack.front().m_aDigitLanguage = eLang;
@@ -1351,7 +1351,7 @@ public:
sal_Int32 createControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr = -1 );
void beginControlAppearance( sal_Int32 nControl );
bool endControlAppearance( PDFWriter::WidgetState eState );
-
+
// additional streams
void addStream( const String& rMimeType, PDFOutputStream* pStream, bool bCompress );
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 990f5d4cdc9a..9e27f79541d1 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,24 +46,24 @@
// - Defines -
// -----------
-#define PNGCHUNK_IHDR 0x49484452
-#define PNGCHUNK_PLTE 0x504c5445
-#define PNGCHUNK_IDAT 0x49444154
-#define PNGCHUNK_IEND 0x49454e44
-#define PNGCHUNK_bKGD 0x624b4744
-#define PNGCHUNK_cHRM 0x6348524d
-#define PNGCHUNK_gAMA 0x67414d41
-#define PNGCHUNK_hIST 0x68495354
-#define PNGCHUNK_pHYs 0x70485973
-#define PNGCHUNK_sBIT 0x73425420
-#define PNGCHUNK_tIME 0x74494d45
-#define PNGCHUNK_tEXt 0x74455874
-#define PNGCHUNK_tRNS 0x74524e53
-#define PNGCHUNK_zTXt 0x7a545874
-#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
-
-#define VIEWING_GAMMA 2.35
-#define DISPLAY_GAMMA 1.0
+#define PNGCHUNK_IHDR 0x49484452
+#define PNGCHUNK_PLTE 0x504c5445
+#define PNGCHUNK_IDAT 0x49444154
+#define PNGCHUNK_IEND 0x49454e44
+#define PNGCHUNK_bKGD 0x624b4744
+#define PNGCHUNK_cHRM 0x6348524d
+#define PNGCHUNK_gAMA 0x67414d41
+#define PNGCHUNK_hIST 0x68495354
+#define PNGCHUNK_pHYs 0x70485973
+#define PNGCHUNK_sBIT 0x73425420
+#define PNGCHUNK_tIME 0x74494d45
+#define PNGCHUNK_tEXt 0x74455874
+#define PNGCHUNK_tRNS 0x74524e53
+#define PNGCHUNK_zTXt 0x7a545874
+#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
+
+#define VIEWING_GAMMA 2.35
+#define DISPLAY_GAMMA 1.0
namespace vcl
{
@@ -74,7 +74,7 @@ namespace vcl
// ------------------------------------------------------------------------------
static const BYTE mpDefaultColorTable[ 256 ] =
-{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
@@ -106,17 +106,17 @@ private:
std::vector< vcl::PNGReader::ChunkData >::iterator maChunkIter;
std::vector< sal_uInt8 >::iterator maDataIter;
- Bitmap* mpBmp;
- BitmapWriteAccess* mpAcc;
- Bitmap* mpMaskBmp;
- AlphaMask* mpAlphaMask;
- BitmapWriteAccess* mpMaskAcc;
- ZCodec* mpZCodec;
- BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpScanPrior; // pointer to the latest scanline
- BYTE* mpTransTab; // for transparency in images with palette colortype
- BYTE* mpScanCurrent; // pointer into the current scanline
- BYTE* mpColorTable; //
+ Bitmap* mpBmp;
+ BitmapWriteAccess* mpAcc;
+ Bitmap* mpMaskBmp;
+ AlphaMask* mpAlphaMask;
+ BitmapWriteAccess* mpMaskAcc;
+ ZCodec* mpZCodec;
+ BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ BYTE* mpScanPrior; // pointer to the latest scanline
+ BYTE* mpTransTab; // for transparency in images with palette colortype
+ BYTE* mpScanCurrent; // pointer into the current scanline
+ BYTE* mpColorTable; //
sal_Size mnStreamSize; // estimate of PNG file size
sal_uInt32 mnChunkType; // Type of current PNG chunk
sal_Int32 mnChunkLen; // Length of current PNG chunk
@@ -132,29 +132,29 @@ private:
sal_uInt32 mnYAdd; // the increment for input images Y coords for the current pass
int mnPreviewShift; // shift to convert orig image coords into preview image coords
int mnPreviewMask; // == ((1 << mnPreviewShift) - 1)
- USHORT mnIStmOldMode;
- USHORT mnTargetDepth; // pixel depth of target bitmap
- BYTE mnTransRed;
- BYTE mnTransGreen;
- BYTE mnTransBlue;
- BYTE mnPngDepth; // pixel depth of PNG data
- BYTE mnColorType;
- BYTE mnCompressionType;
- BYTE mnFilterType;
- BYTE mnInterlaceType;
- BitmapColor mcTranspColor; // transparency mask's transparency "color"
- BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
- BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
- BOOL mbAlphaChannel; // is true for ColorType 4 and 6
- BOOL mbRGBTriple;
- BOOL mbPalette; // FALSE if we need a Palette
- BOOL mbGrayScale;
- BOOL mbzCodecInUse;
- BOOL mbStatus;
- BOOL mbIDAT; // TRUE if finished with enough IDAT chunks
- BOOL mbGamma; // TRUE if Gamma Correction available
- BOOL mbpHYs; // TRUE if pysical size of pixel available
- sal_Bool mbIgnoreGammaChunk;
+ USHORT mnIStmOldMode;
+ USHORT mnTargetDepth; // pixel depth of target bitmap
+ BYTE mnTransRed;
+ BYTE mnTransGreen;
+ BYTE mnTransBlue;
+ BYTE mnPngDepth; // pixel depth of PNG data
+ BYTE mnColorType;
+ BYTE mnCompressionType;
+ BYTE mnFilterType;
+ BYTE mnInterlaceType;
+ BitmapColor mcTranspColor; // transparency mask's transparency "color"
+ BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
+ BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
+ BOOL mbAlphaChannel; // is true for ColorType 4 and 6
+ BOOL mbRGBTriple;
+ BOOL mbPalette; // FALSE if we need a Palette
+ BOOL mbGrayScale;
+ BOOL mbzCodecInUse;
+ BOOL mbStatus;
+ BOOL mbIDAT; // TRUE if finished with enough IDAT chunks
+ BOOL mbGamma; // TRUE if Gamma Correction available
+ BOOL mbpHYs; // TRUE if pysical size of pixel available
+ sal_Bool mbIgnoreGammaChunk;
bool ReadNextChunk();
void ReadRemainingChunks();
@@ -164,19 +164,19 @@ private:
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex );
void ImplSetTranspPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, BOOL bTrans );
void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex, BYTE nAlpha );
- void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha );
- void ImplReadIDAT();
+ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha );
+ void ImplReadIDAT();
bool ImplPreparePass();
void ImplApplyFilter();
void ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd );
- BOOL ImplReadTransparent();
- void ImplGetGamma();
- void ImplGetBackground();
- BYTE ImplScaleColor();
- BOOL ImplReadHeader( const Size& rPreviewSizeHint );
- BOOL ImplReadPalette();
- void ImplGetGrayPalette( sal_uInt16 );
- sal_uInt32 ImplReadsal_uInt32();
+ BOOL ImplReadTransparent();
+ void ImplGetGamma();
+ void ImplGetBackground();
+ BYTE ImplScaleColor();
+ BOOL ImplReadHeader( const Size& rPreviewSizeHint );
+ BOOL ImplReadPalette();
+ void ImplGetGrayPalette( sal_uInt16 );
+ sal_uInt32 ImplReadsal_uInt32();
public:
@@ -185,29 +185,29 @@ public:
BitmapEx GetBitmapEx( const Size& rPreviewSizeHint );
const std::vector< PNGReader::ChunkData >& GetAllChunks();
- void SetIgnoreGammaChunk( sal_Bool bIgnore ){ mbIgnoreGammaChunk = bIgnore; };
+ void SetIgnoreGammaChunk( sal_Bool bIgnore ){ mbIgnoreGammaChunk = bIgnore; };
};
// ------------------------------------------------------------------------------
PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
: mrPNGStream( rPNGStream ),
- mpBmp ( NULL ),
- mpAcc ( NULL ),
- mpMaskBmp ( NULL ),
- mpAlphaMask ( NULL ),
- mpMaskAcc ( NULL ),
- mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
- mpInflateInBuf ( NULL ),
- mpScanPrior ( NULL ),
- mpTransTab ( NULL ),
- mpColorTable ( (sal_uInt8*) mpDefaultColorTable ),
- mbzCodecInUse ( sal_False ),
+ mpBmp ( NULL ),
+ mpAcc ( NULL ),
+ mpMaskBmp ( NULL ),
+ mpAlphaMask ( NULL ),
+ mpMaskAcc ( NULL ),
+ mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
+ mpInflateInBuf ( NULL ),
+ mpScanPrior ( NULL ),
+ mpTransTab ( NULL ),
+ mpColorTable ( (sal_uInt8*) mpDefaultColorTable ),
+ mbzCodecInUse ( sal_False ),
mbStatus( TRUE),
mbIDAT( FALSE ),
- mbGamma ( sal_False ),
- mbpHYs ( sal_False ),
- mbIgnoreGammaChunk ( sal_False )
+ mbGamma ( sal_False ),
+ mbpHYs ( sal_False ),
+ mbIgnoreGammaChunk ( sal_False )
{
// prepare the PNG data stream
mnOrigStreamMode = mrPNGStream.GetNumberFormatInt();
@@ -217,7 +217,7 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
maChunkSeq.reserve( 16 );
maChunkIter = maChunkSeq.begin();
- // estimate PNG file size (to allow sanity checks)
+ // estimate PNG file size (to allow sanity checks)
const sal_Size nStreamPos = mrPNGStream.Tell();
mrPNGStream.Seek( STREAM_SEEK_TO_END );
mnStreamSize = mrPNGStream.Tell();
@@ -382,8 +382,8 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
}
break;
- case PNGCHUNK_gAMA : // the gamma chunk must precede
- { // the 'IDAT' and also the 'PLTE'(if available )
+ case PNGCHUNK_gAMA : // the gamma chunk must precede
+ { // the 'IDAT' and also the 'PLTE'(if available )
if ( !mbIgnoreGammaChunk && ( mbIDAT == FALSE ) )
ImplGetGamma();
}
@@ -398,23 +398,23 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_tRNS :
{
- if ( !mbIDAT ) // the tRNS chunk must precede the IDAT
+ if ( !mbIDAT ) // the tRNS chunk must precede the IDAT
mbStatus = ImplReadTransparent();
}
break;
- case PNGCHUNK_bKGD : // the background chunk must appear
+ case PNGCHUNK_bKGD : // the background chunk must appear
{
- if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the
- ImplGetBackground(); // PLTE(if available ) chunk.
+ if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the
+ ImplGetBackground(); // PLTE(if available ) chunk.
}
break;
case PNGCHUNK_IDAT :
{
- if ( !mpInflateInBuf ) // taking care that the header has properly been read
+ if ( !mpInflateInBuf ) // taking care that the header has properly been read
mbStatus = FALSE;
- else if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes
+ else if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes
ImplReadIDAT();
}
break;
@@ -530,16 +530,16 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
// valid color types are 0,2,3,4 & 6
switch ( mnColorType )
{
- case 0 : // each pixel is a grayscale
+ case 0 : // each pixel is a grayscale
{
switch ( mnPngDepth )
{
case 2 : // 2bit target not available -> use four bits
- mnTargetDepth = 4; // we have to expand the bitmap
+ mnTargetDepth = 4; // we have to expand the bitmap
mbGrayScale = TRUE;
break;
case 16 :
- mnTargetDepth = 8; // we have to reduce the bitmap
+ mnTargetDepth = 8; // we have to reduce the bitmap
// fall through
case 1 :
case 4 :
@@ -552,13 +552,13 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 2 : // each pixel is an RGB triple
+ case 2 : // each pixel is an RGB triple
{
mbRGBTriple = TRUE;
nScansize64 *= 3;
switch ( mnPngDepth )
{
- case 16 : // we have to reduce the bitmap
+ case 16 : // we have to reduce the bitmap
case 8 :
mnTargetDepth = 24;
break;
@@ -568,12 +568,12 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 3 : // each pixel is a palette index
+ case 3 : // each pixel is a palette index
{
switch ( mnPngDepth )
{
case 2 :
- mnTargetDepth = 4; // we have to expand the bitmap
+ mnTargetDepth = 4; // we have to expand the bitmap
// fall through
case 1 :
case 4 :
@@ -586,14 +586,14 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 4 : // each pixel is a grayscale sample followed by an alpha sample
+ case 4 : // each pixel is a grayscale sample followed by an alpha sample
{
nScansize64 *= 2;
mbAlphaChannel = TRUE;
switch ( mnPngDepth )
{
case 16 :
- mnTargetDepth = 8; // we have to reduce the bitmap
+ mnTargetDepth = 8; // we have to reduce the bitmap
case 8 :
mbGrayScale = TRUE;
break;
@@ -603,14 +603,14 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 6 : // each pixel is an RGB triple followed by an alpha sample
+ case 6 : // each pixel is an RGB triple followed by an alpha sample
{
mbRGBTriple = TRUE;
nScansize64 *= 4;
mbAlphaChannel = TRUE;
switch (mnPngDepth )
{
- case 16 : // we have to reduce the bitmap
+ case 16 : // we have to reduce the bitmap
case 8 :
mnTargetDepth = 24;
break;
@@ -832,17 +832,17 @@ void PNGReaderImpl::ImplGetGamma()
if( mnChunkLen < 4 )
return;
- sal_uInt32 nGammaValue = ImplReadsal_uInt32();
- double fGamma = ( ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( (double)nGammaValue / 100000 ) );
- double fInvGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
+ sal_uInt32 nGammaValue = ImplReadsal_uInt32();
+ double fGamma = ( ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( (double)nGammaValue / 100000 ) );
+ double fInvGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
if ( fInvGamma != 1.0 )
{
mbGamma = TRUE;
-
+
if ( mpColorTable == mpDefaultColorTable )
mpColorTable = new sal_uInt8[ 256 ];
-
+
for ( sal_Int32 i = 0; i < 256; i++ )
mpColorTable[ i ] = (sal_uInt8)(pow((double)i/255.0, fInvGamma) * 255.0 + 0.5);
@@ -883,7 +883,7 @@ void PNGReaderImpl::ImplGetBackground()
}
}
break;
-
+
case 2 :
case 6 :
{
@@ -907,12 +907,12 @@ sal_uInt8 PNGReaderImpl::ImplScaleColor()
{
sal_uInt32 nMask = ( ( 1 << mnPngDepth ) - 1 );
sal_uInt16 nCol = ( *maDataIter++ << 8 );
-
+
nCol += *maDataIter++ & (sal_uInt16)nMask;
-
- if ( mnPngDepth > 8 ) // convert 16bit graphics to 8
+
+ if ( mnPngDepth > 8 ) // convert 16bit graphics to 8
nCol >>= 8;
-
+
return (sal_uInt8) nCol;
}
@@ -1205,7 +1205,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mbTransparent )
{
- if ( mnPngDepth == 4 ) // check if source has a two bit pixel format
+ if ( mnPngDepth == 4 ) // check if source has a two bit pixel format
{
for ( sal_Int32 nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, ++nXIndex )
{
@@ -1254,7 +1254,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- if ( mnPngDepth == 4 ) // maybe the source is a two bitmap graphic
+ if ( mnPngDepth == 4 ) // maybe the source is a two bitmap graphic
{ // BMP_FORMAT_4BIT_LSN_PAL
for ( sal_Int32 nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
@@ -1296,7 +1296,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mbAlphaChannel )
{
- if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
+ if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
for ( sal_Int32 nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
ImplSetAlphaPixel( nY, nX, pTmp[ 0 ], pTmp[ 1 ] );
@@ -1309,7 +1309,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else if ( mbTransparent )
{
- if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
+ if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
for ( sal_Int32 nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp++ )
ImplSetAlphaPixel( nY, nX, *pTmp, mpTransTab[ *pTmp ] );
@@ -1322,7 +1322,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else // neither alpha nor transparency
{
- if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
+ if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
if( nXAdd == 1 && mnPreviewShift == 0 ) // copy raw line data if possible
{
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index db92a4474e20..4b394aea5d6d 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,68 +78,68 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL );
~PNGWriterImpl();
- sal_Bool Write( SvStream& rOStm );
+ sal_Bool Write( SvStream& rOStm );
- std::vector< vcl::PNGWriter::ChunkData >& GetChunks();
+ std::vector< vcl::PNGWriter::ChunkData >& GetChunks();
private:
- std::vector< vcl::PNGWriter::ChunkData > maChunkSeq;
-
- sal_Int32 mnCompLevel;
- sal_Int32 mnInterlaced;
- sal_uInt32 mnMaxChunkSize;
- BOOL mbStatus;
-
- BitmapReadAccess* mpAccess;
- BitmapReadAccess* mpMaskAccess;
- ZCodec* mpZCodec;
-
- BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpPreviousScan; // as big as mpDeflateInBuf
- BYTE* mpCurrentScan;
- ULONG mnDeflateInSize;
-
- ULONG mnWidth, mnHeight;
- BYTE mnBitsPerPixel;
- BYTE mnFilterType; // 0 oder 4;
- ULONG mnBBP; // bytes per pixel ( needed for filtering )
- BOOL mbTrueAlpha;
- ULONG mnCRC;
- long mnChunkDatSize;
- ULONG mnLastPercent;
-
- void ImplWritepHYs( const BitmapEx& rBitmapEx );
- void ImplWriteIDAT();
- ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
- void ImplClearFirstScanline();
- void ImplWriteTransparent();
- BOOL ImplWriteHeader();
- void ImplWritePalette();
- void ImplOpenChunk( ULONG nChunkType );
- void ImplWriteChunk( BYTE nNumb );
- void ImplWriteChunk( sal_uInt32 nNumb );
- void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize );
- void ImplCloseChunk( void );
+ std::vector< vcl::PNGWriter::ChunkData > maChunkSeq;
+
+ sal_Int32 mnCompLevel;
+ sal_Int32 mnInterlaced;
+ sal_uInt32 mnMaxChunkSize;
+ BOOL mbStatus;
+
+ BitmapReadAccess* mpAccess;
+ BitmapReadAccess* mpMaskAccess;
+ ZCodec* mpZCodec;
+
+ BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ BYTE* mpPreviousScan; // as big as mpDeflateInBuf
+ BYTE* mpCurrentScan;
+ ULONG mnDeflateInSize;
+
+ ULONG mnWidth, mnHeight;
+ BYTE mnBitsPerPixel;
+ BYTE mnFilterType; // 0 oder 4;
+ ULONG mnBBP; // bytes per pixel ( needed for filtering )
+ BOOL mbTrueAlpha;
+ ULONG mnCRC;
+ long mnChunkDatSize;
+ ULONG mnLastPercent;
+
+ void ImplWritepHYs( const BitmapEx& rBitmapEx );
+ void ImplWriteIDAT();
+ ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
+ void ImplClearFirstScanline();
+ void ImplWriteTransparent();
+ BOOL ImplWriteHeader();
+ void ImplWritePalette();
+ void ImplOpenChunk( ULONG nChunkType );
+ void ImplWriteChunk( BYTE nNumb );
+ void ImplWriteChunk( sal_uInt32 nNumb );
+ void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize );
+ void ImplCloseChunk( void );
};
// ------------------------------------------------------------------------
PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) :
- mnCompLevel ( PNG_DEF_COMPRESSION ),
- mbStatus ( TRUE ),
- mpAccess ( NULL ),
- mpMaskAccess ( NULL ),
- mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
+ mnCompLevel ( PNG_DEF_COMPRESSION ),
+ mbStatus ( TRUE ),
+ mpAccess ( NULL ),
+ mpMaskAccess ( NULL ),
+ mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
mnCRC(0UL),
- mnLastPercent ( 0UL )
+ mnLastPercent ( 0UL )
{
if ( !rBmpEx.IsEmpty() )
{
Bitmap aBmp( rBmpEx.GetBitmap() );
-
- mnInterlaced = 0; // ( aBmp.GetSizePixel().Width() > 128 ) || ( aBmp.GetSizePixel().Height() > 128 ) ? 1 : 0; #i67236#
+
+ mnInterlaced = 0; // ( aBmp.GetSizePixel().Width() > 128 ) || ( aBmp.GetSizePixel().Height() > 128 ) ? 1 : 0; #i67236#
// #i67234# defaulting max chunk size to 256kb when using interlace mode
mnMaxChunkSize = mnInterlaced == 0 ? std::numeric_limits< sal_uInt32 >::max() : 0x40000;
@@ -162,7 +162,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
}
mnBitsPerPixel = (BYTE)aBmp.GetBitCount();
-
+
if( rBmpEx.IsTransparent() )
{
if ( mnBitsPerPixel <= 8 && rBmpEx.IsAlpha() )
@@ -170,8 +170,8 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aBmp.Convert( BMP_CONVERSION_24BIT );
mnBitsPerPixel = 24;
}
-
- if ( mnBitsPerPixel <= 8 ) // transparent palette
+
+ if ( mnBitsPerPixel <= 8 ) // transparent palette
{
aBmp.Convert( BMP_CONVERSION_8BIT_TRANS );
aBmp.Replace( rBmpEx.GetMask(), BMP_COL_TRANS );
@@ -193,7 +193,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
else
{
- mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel
+ mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel
if( mpAccess )
{
if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != FALSE )
@@ -236,7 +236,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
else
{
- mpAccess = aBmp.AcquireReadAccess(); // palette + RGB without alphachannel
+ mpAccess = aBmp.AcquireReadAccess(); // palette + RGB without alphachannel
if( mpAccess )
{
if ( ImplWriteHeader() )
@@ -254,7 +254,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
if ( mbStatus )
{
- ImplOpenChunk( PNGCHUNK_IEND ); // create an IEND chunk
+ ImplOpenChunk( PNGCHUNK_IEND ); // create an IEND chunk
ImplCloseChunk();
}
}
@@ -323,10 +323,10 @@ BOOL PNGWriterImpl::ImplWriteHeader()
else
mnFilterType = 4;
- BYTE nColorType = 2; // colortype:
+ BYTE nColorType = 2; // colortype:
// bit 0 -> palette is used
- if ( mpAccess->HasPalette() ) // bit 1 -> color is used
- nColorType |= 1; // bit 2 -> alpha channel is used
+ if ( mpAccess->HasPalette() ) // bit 1 -> color is used
+ nColorType |= 1; // bit 2 -> alpha channel is used
else
nBitDepth /= 3;
@@ -334,10 +334,10 @@ BOOL PNGWriterImpl::ImplWriteHeader()
nColorType |= 4;
ImplWriteChunk( nBitDepth );
- ImplWriteChunk( nColorType ); // colortype
- ImplWriteChunk((BYTE) 0 ); // compression type
- ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version
- ImplWriteChunk((BYTE) mnInterlaced ); // interlace type
+ ImplWriteChunk( nColorType ); // colortype
+ ImplWriteChunk((BYTE) 0 ); // compression type
+ ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version
+ ImplWriteChunk((BYTE) mnInterlaced ); // interlace type
ImplCloseChunk();
}
else
@@ -349,9 +349,9 @@ BOOL PNGWriterImpl::ImplWriteHeader()
void PNGWriterImpl::ImplWritePalette()
{
- const ULONG nCount = mpAccess->GetPaletteEntryCount();
- BYTE* pTempBuf = new BYTE[ nCount*3 ];
- BYTE* pTmp = pTempBuf;
+ const ULONG nCount = mpAccess->GetPaletteEntryCount();
+ BYTE* pTempBuf = new BYTE[ nCount*3 ];
+ BYTE* pTmp = pTempBuf;
ImplOpenChunk( PNGCHUNK_PLTE );
@@ -417,7 +417,7 @@ void PNGWriterImpl::ImplWriteIDAT ()
mpDeflateInBuf = new BYTE[ mnDeflateInSize ];
- if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
+ if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
{
mpPreviousScan = new BYTE[ mnDeflateInSize ];
mpCurrentScan = new BYTE[ mnDeflateInSize ];
@@ -435,37 +435,37 @@ void PNGWriterImpl::ImplWriteIDAT ()
{
// interlace mode
ULONG nY;
- for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1
+ for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 8 ) );
ImplClearFirstScanline();
- for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 2
+ for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 2
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 4, 8 ) );
ImplClearFirstScanline();
- if ( mnHeight >= 5 ) // pass 3
+ if ( mnHeight >= 5 ) // pass 3
{
for ( nY = 4; nY < mnHeight; nY+=8 )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 4 ) );
ImplClearFirstScanline();
}
- for ( nY = 0; nY < mnHeight; nY+=4 ) // pass 4
+ for ( nY = 0; nY < mnHeight; nY+=4 ) // pass 4
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 2, 4 ) );
ImplClearFirstScanline();
- if ( mnHeight >= 3 ) // pass 5
+ if ( mnHeight >= 3 ) // pass 5
{
for ( nY = 2; nY < mnHeight; nY+=4 )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 2 ) );
ImplClearFirstScanline();
}
- for ( nY = 0; nY < mnHeight; nY+=2 ) // pass 6
+ for ( nY = 0; nY < mnHeight; nY+=2 ) // pass 6
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 1, 2 ) );
ImplClearFirstScanline();
- if ( mnHeight >= 2 ) // pass 7
+ if ( mnHeight >= 2 ) // pass 7
{
for ( nY = 1; nY < mnHeight; nY+=2 )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 1 ) );
@@ -474,7 +474,7 @@ void PNGWriterImpl::ImplWriteIDAT ()
mpZCodec->EndCompression();
mnCRC = mpZCodec->GetCRC();
- if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
+ if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
{
delete[] mpCurrentScan;
delete[] mpPreviousScan;
@@ -509,9 +509,9 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
if ( nXStart < mnWidth )
{
- *pDest++ = mnFilterType; // in this version the filter type is either 0 or 4
+ *pDest++ = mnFilterType; // in this version the filter type is either 0 or 4
- if ( mpAccess->HasPalette() ) // alphachannel is not allowed by pictures including palette entries
+ if ( mpAccess->HasPalette() ) // alphachannel is not allowed by pictures including palette entries
{
switch ( mnBitsPerPixel )
{
@@ -528,8 +528,8 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
else
*pDest |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift;
}
- if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
- } // bufferpointer is to correct
+ if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
+ } // bufferpointer is to correct
break;
case( 4 ):
@@ -560,7 +560,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
}
else
{
- if ( mpMaskAccess ) // mpMaskAccess != NULL -> alphachannel is to create
+ if ( mpMaskAccess ) // mpMaskAccess != NULL -> alphachannel is to create
{
if ( mbTrueAlpha )
{
@@ -608,15 +608,15 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
mnDeflateInSize = pDest - mpCurrentScan;
pDest = mpDeflateInBuf;
- *pDest++ = 4; // filter type
+ *pDest++ = 4; // filter type
ULONG na, nb, nc;
long np, npa, npb, npc;
- BYTE* p1 = mpCurrentScan + 1; // Current Pixel
- BYTE* p2 = p1 - mnBBP; // left pixel
- BYTE* p3 = mpPreviousScan; // upper pixel
- BYTE* p4 = p3 - mnBBP; // upperleft Pixel;
+ BYTE* p1 = mpCurrentScan + 1; // Current Pixel
+ BYTE* p2 = p1 - mnBBP; // left pixel
+ BYTE* p3 = mpPreviousScan; // upper pixel
+ BYTE* p4 = p3 - mnBBP; // upperleft Pixel;
while ( pDest < mpDeflateInBuf + mnDeflateInSize )
{
diff --git a/vcl/source/gdi/polyscan.cxx b/vcl/source/gdi/polyscan.cxx
index b96591b6aa40..4ae653857fdc 100644
--- a/vcl/source/gdi/polyscan.cxx
+++ b/vcl/source/gdi/polyscan.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +40,11 @@
// ----------------
PolyScanline::PolyScanline() :
- mpFirst ( NULL ),
- mpLast ( NULL ),
- mpAct ( NULL ),
- mnLeft ( 0L ),
- mnRight ( 0L )
+ mpFirst ( NULL ),
+ mpLast ( NULL ),
+ mpAct ( NULL ),
+ mnLeft ( 0L ),
+ mnRight ( 0L )
{
}
@@ -90,7 +90,7 @@ void PolyScanline::Insert( long nX )
{
ScanlinePoint* pLast = mpFirst;
ScanlinePoint* pAct = mpFirst->mpNext;
-
+
while( pAct )
{
// insert in the midlle of the scanline?
@@ -99,10 +99,10 @@ void PolyScanline::Insert( long nX )
pLast->mpNext = new ScanlinePoint( nX, pAct );
break;
}
-
+
pLast = pAct;
pAct = pAct->mpNext;
- }
+ }
}
}
}
@@ -152,8 +152,8 @@ PolyScanner::PolyScanner( const Rectangle& rRect )
{
if( !rRect.IsEmpty() )
{
- Rectangle aRect( rRect );
- ULONG nHeight;
+ Rectangle aRect( rRect );
+ ULONG nHeight;
aRect.Justify();
mnLeft = aRect.Left();
@@ -180,9 +180,9 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
if( nCount )
{
- long nLast = nCount - 1;
- Point aFirst( rPoly[ 0 ] );
- Point aLast( rPoly[ (USHORT) nLast ] );
+ long nLast = nCount - 1;
+ Point aFirst( rPoly[ 0 ] );
+ Point aLast( rPoly[ (USHORT) nLast ] );
while( nLast && ( aLast == aFirst ) )
aLast = rPoly[ (USHORT) --nLast ];
@@ -198,10 +198,10 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
else
{
const Rectangle aRect( rPoly.GetBoundRect() );
- ULONG nHeight;
+ ULONG nHeight;
mnLeft = aRect.Left();
- mnTop = aRect.Top();
+ mnTop = aRect.Top();
mnRight = aRect.Right();
mnBottom = aRect.Bottom();
aLast = aFirst;
@@ -268,21 +268,21 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
mpArray[ nY++ - mnTop ].Insert( nX );
else
while( nY > nEndY )
- mpArray[ nY-- - mnTop ].Insert( nX );
+ mpArray[ nY-- - mnTop ].Insert( nX );
}
else
{
const long nDX = labs( rEnd.X() - rStart.X() );
const long nDY = labs( rEnd.Y() - rStart.Y() );
- const long nStartX = rStart.X();
- const long nStartY = rStart.Y();
- const long nEndX = rEnd.X();
- const long nEndY = rEnd.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
- const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
- long nLastX = nStartX;
- long nLastY = nStartY;
- BOOL bLast = FALSE;
+ const long nStartX = rStart.X();
+ const long nStartY = rStart.Y();
+ const long nEndX = rEnd.X();
+ const long nEndY = rEnd.Y();
+ const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
+ const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
+ long nLastX = nStartX;
+ long nLastY = nStartY;
+ BOOL bLast = FALSE;
mpArray[ nStartY - mnTop ].Insert( nStartX );
@@ -307,7 +307,7 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
nLastX = nX;
nLastY = nY;
-
+
if( nD < 0L )
nD += nDY2;
else
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 5c693648d6c1..27d6b9f19b24 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -135,8 +135,8 @@ PrinterOptions::~PrinterOptions()
QueueInfo::QueueInfo()
{
- mnStatus = 0;
- mnJobs = 0;
+ mnStatus = 0;
+ mnJobs = 0;
}
// -----------------------------------------------------------------------
@@ -162,12 +162,12 @@ QueueInfo::~QueueInfo()
bool QueueInfo::operator==( const QueueInfo& rInfo ) const
{
return
- maPrinterName == rInfo.maPrinterName &&
- maDriver == rInfo.maDriver &&
- maLocation == rInfo.maLocation &&
- maComment == rInfo.maComment &&
- mnStatus == rInfo.mnStatus &&
- mnJobs == rInfo.mnJobs;
+ maPrinterName == rInfo.maPrinterName &&
+ maDriver == rInfo.maDriver &&
+ maLocation == rInfo.maLocation &&
+ maComment == rInfo.maComment &&
+ mnStatus == rInfo.mnStatus &&
+ mnJobs == rInfo.mnJobs;
}
// -----------------------------------------------------------------------
@@ -206,9 +206,9 @@ SvStream& operator>>( SvStream& rIStream, QueueInfo& rInfo )
SalPrinterQueueInfo::SalPrinterQueueInfo()
{
- mnStatus = 0;
- mnJobs = QUEUE_JOBS_DONTKNOW;
- mpSysData = NULL;
+ mnStatus = 0;
+ mnJobs = QUEUE_JOBS_DONTKNOW;
+ mpSysData = NULL;
}
// -----------------------------------------------------------------------
@@ -221,7 +221,7 @@ SalPrinterQueueInfo::~SalPrinterQueueInfo()
ImplPrnQueueList::~ImplPrnQueueList()
{
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
for( unsigned int i = 0; i < m_aQueueInfos.size(); i++ )
{
delete m_aQueueInfos[i].mpQueueInfo;
@@ -282,8 +282,8 @@ static void ImplInitPrnQueueList()
void ImplDeletePrnQueueList()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
if ( pPrnList )
{
@@ -296,9 +296,9 @@ void ImplDeletePrnQueueList()
const std::vector<rtl::OUString>& Printer::GetPrinterQueues()
{
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
if ( !pSVData->maGDIData.mpPrinterQueueList )
- ImplInitPrnQueueList();
+ ImplInitPrnQueueList();
return pSVData->maGDIData.mpPrinterQueueList->m_aPrinterList;
}
@@ -315,16 +315,16 @@ const QueueInfo* Printer::GetQueueInfo( const String& rPrinterName, bool bStatus
{
if( !pInfo->mpQueueInfo || bStatusUpdate )
pSVData->mpDefInst->GetPrinterQueueState( pInfo->mpSalQueueInfo );
-
+
if ( !pInfo->mpQueueInfo )
pInfo->mpQueueInfo = new QueueInfo;
-
- pInfo->mpQueueInfo->maPrinterName = pInfo->mpSalQueueInfo->maPrinterName;
- pInfo->mpQueueInfo->maDriver = pInfo->mpSalQueueInfo->maDriver;
- pInfo->mpQueueInfo->maLocation = pInfo->mpSalQueueInfo->maLocation;
- pInfo->mpQueueInfo->maComment = pInfo->mpSalQueueInfo->maComment;
- pInfo->mpQueueInfo->mnStatus = pInfo->mpSalQueueInfo->mnStatus;
- pInfo->mpQueueInfo->mnJobs = pInfo->mpSalQueueInfo->mnJobs;
+
+ pInfo->mpQueueInfo->maPrinterName = pInfo->mpSalQueueInfo->maPrinterName;
+ pInfo->mpQueueInfo->maDriver = pInfo->mpSalQueueInfo->maDriver;
+ pInfo->mpQueueInfo->maLocation = pInfo->mpSalQueueInfo->maLocation;
+ pInfo->mpQueueInfo->maComment = pInfo->mpSalQueueInfo->maComment;
+ pInfo->mpQueueInfo->mnStatus = pInfo->mpSalQueueInfo->mnStatus;
+ pInfo->mpQueueInfo->mnJobs = pInfo->mpSalQueueInfo->mnJobs;
return pInfo->mpQueueInfo;
}
return NULL;
@@ -338,34 +338,34 @@ XubString Printer::GetDefaultPrinterName()
if( !pEnv || !*pEnv )
{
ImplSVData* pSVData = ImplGetSVData();
-
+
return pSVData->mpDefInst->GetDefaultPrinter();
}
- return XubString();
+ return XubString();
}
// =======================================================================
void Printer::ImplInitData()
{
- mbDevOutput = FALSE;
- meOutDevType = OUTDEV_PRINTER;
- mbDefPrinter = FALSE;
- mnError = 0;
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mnPageQueueSize = 0;
- mnCopyCount = 1;
- mbCollateCopy = FALSE;
- mbPrinting = FALSE;
- mbJobActive = FALSE;
- mbPrintFile = FALSE;
- mbInPrintPage = FALSE;
- mbNewJobSetup = FALSE;
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpDisplayDev = NULL;
- mbIsQueuePrinter = FALSE;
+ mbDevOutput = FALSE;
+ meOutDevType = OUTDEV_PRINTER;
+ mbDefPrinter = FALSE;
+ mnError = 0;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mnPageQueueSize = 0;
+ mnCopyCount = 1;
+ mbCollateCopy = FALSE;
+ mbPrinting = FALSE;
+ mbJobActive = FALSE;
+ mbPrintFile = FALSE;
+ mbInPrintPage = FALSE;
+ mbNewJobSetup = FALSE;
+ mpInfoPrinter = NULL;
+ mpPrinter = NULL;
+ mpDisplayDev = NULL;
+ mbIsQueuePrinter = FALSE;
mpPrinterOptions = new PrinterOptions;
// Printer in die Liste eintragen
@@ -409,9 +409,9 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
pJobSetup->maPrinterName = maPrinterName;
pJobSetup->maDriver = maDriver;
- mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
+ mpPrinter = NULL;
+ mpJobGraphics = NULL;
ImplUpdateJobSetupPaper( maJobSetup );
if ( !mpInfoPrinter )
@@ -440,18 +440,18 @@ void Printer::ImplInitDisplay( const Window* pWindow )
{
ImplSVData* pSVData = ImplGetSVData();
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpInfoPrinter = NULL;
+ mpPrinter = NULL;
+ mpJobGraphics = NULL;
if ( pWindow )
mpDisplayDev = new VirtualDevice( *pWindow );
else
mpDisplayDev = new VirtualDevice();
- mpFontList = pSVData->maGDIData.mpScreenFontList;
- mpFontCache = pSVData->maGDIData.mpScreenFontCache;
- mnDPIX = mpDisplayDev->mnDPIX;
- mnDPIY = mpDisplayDev->mnDPIY;
+ mpFontList = pSVData->maGDIData.mpScreenFontList;
+ mpFontCache = pSVData->maGDIData.mpScreenFontCache;
+ mnDPIX = mpDisplayDev->mnDPIX;
+ mnDPIY = mpDisplayDev->mnDPIY;
}
// -----------------------------------------------------------------------
@@ -785,11 +785,11 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
ImplSVData* pSVData = ImplGetSVData();
- mbDefPrinter = pPrinter->mbDefPrinter;
- maPrintFile = pPrinter->maPrintFile;
- mbPrintFile = pPrinter->mbPrintFile;
- mnCopyCount = pPrinter->mnCopyCount;
- mbCollateCopy = pPrinter->mbCollateCopy;
+ mbDefPrinter = pPrinter->mbDefPrinter;
+ maPrintFile = pPrinter->maPrintFile;
+ mbPrintFile = pPrinter->mbPrintFile;
+ mnCopyCount = pPrinter->mnCopyCount;
+ mbCollateCopy = pPrinter->mbCollateCopy;
mnPageQueueSize = pPrinter->mnPageQueueSize;
*mpPrinterOptions = *pPrinter->mpPrinterOptions;
@@ -894,8 +894,8 @@ BOOL Printer::SetOrientation( Orientation eOrientation )
if ( maJobSetup.ImplGetConstData()->meOrientation != eOrientation )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->meOrientation = eOrientation;
if ( IsDisplayPrinter() )
@@ -939,8 +939,8 @@ BOOL Printer::SetPaperBin( USHORT nPaperBin )
if ( (maJobSetup.ImplGetConstData()->mnPaperBin != nPaperBin) &&
(nPaperBin < GetPaperBinCount()) )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->mnPaperBin = nPaperBin;
if ( IsDisplayPrinter() )
@@ -979,10 +979,10 @@ USHORT Printer::GetPaperBin() const
// Map user paper format to a available printer paper formats
void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNearest )
{
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
- int nLandscapeAngle = GetLandscapeAngle();
- int nPaperCount = GetPaperInfoCount();
+ int nLandscapeAngle = GetLandscapeAngle();
+ int nPaperCount = GetPaperInfoCount();
bool bFound = false;
PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight);
@@ -1026,7 +1026,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
}
}
}
-
+
if( ! bFound && bMatchNearest )
{
sal_Int64 nBestMatch = SAL_MAX_INT64;
@@ -1035,11 +1035,11 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
for( int i = 0; i < nPaperCount; i++ )
{
const PaperInfo& rPaperInfo = GetPaperInfo( i );
-
+
// check protrait match
sal_Int64 nDX = pSetupData->mnPaperWidth - rPaperInfo.getWidth();
sal_Int64 nDY = pSetupData->mnPaperHeight - rPaperInfo.getHeight();
- sal_Int64 nMatch = nDX*nDX + nDY*nDY;
+ sal_Int64 nMatch = nDX*nDX + nDY*nDY;
if( nMatch < nBestMatch )
{
nBestMatch = nMatch;
@@ -1074,8 +1074,8 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( maJobSetup.ImplGetConstData()->mePaperFormat != ePaper )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->mePaperFormat = ePaper;
if ( ePaper != PAPER_USER )
{
@@ -1122,17 +1122,17 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( mbInPrintPage )
return FALSE;
- Size aPixSize = LogicToPixel( rSize );
- Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM );
- if ( (maJobSetup.ImplGetConstData()->mePaperFormat != PAPER_USER) ||
+ Size aPixSize = LogicToPixel( rSize );
+ Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM );
+ if ( (maJobSetup.ImplGetConstData()->mePaperFormat != PAPER_USER) ||
(maJobSetup.ImplGetConstData()->mnPaperWidth != aPageSize.Width()) ||
(maJobSetup.ImplGetConstData()->mnPaperHeight != aPageSize.Height()) )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
- pSetupData->mePaperFormat = PAPER_USER;
- pSetupData->mnPaperWidth = aPageSize.Width();
- pSetupData->mnPaperHeight = aPageSize.Height();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ pSetupData->mePaperFormat = PAPER_USER;
+ pSetupData->mnPaperWidth = aPageSize.Width();
+ pSetupData->mnPaperHeight = aPageSize.Height();
if ( IsDisplayPrinter() )
{
@@ -1201,8 +1201,8 @@ BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->meDuplexMode = eDuplex;
if ( IsDisplayPrinter() )
@@ -1308,8 +1308,8 @@ ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
void Printer::ImplEndPrint()
{
- mbPrinting = FALSE;
- mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mnCurPrintPage = 0;
maJobName.Erase();
}
@@ -1343,8 +1343,8 @@ BOOL Printer::EndJob()
bRet = TRUE;
- mbPrinting = FALSE;
- mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mnCurPrintPage = 0;
maJobName.Erase();
mbDevOutput = FALSE;
@@ -1368,15 +1368,15 @@ BOOL Printer::AbortJob()
if ( !IsJobActive() && !IsPrinting() )
return FALSE;
- mbJobActive = FALSE;
- mbInPrintPage = FALSE;
- mpJobGraphics = NULL;
+ mbJobActive = FALSE;
+ mbInPrintPage = FALSE;
+ mpJobGraphics = NULL;
if ( mpPrinter )
{
- mbPrinting = FALSE;
- mnCurPage = 0;
- mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
maJobName.Erase();
ImplReleaseGraphics();
@@ -1442,14 +1442,14 @@ void Printer::ImplEndPage()
void Printer::updatePrinters()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
if ( pPrnList )
{
ImplPrnQueueList* pNewList = new ImplPrnQueueList;
pSVData->mpDefInst->GetPrinterQueueInfo( pNewList );
-
+
bool bChanged = pPrnList->m_aQueueInfos.size() != pNewList->m_aQueueInfos.size();
for( unsigned int i = 0; ! bChanged && i < pPrnList->m_aQueueInfos.size(); i++ )
{
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index b5f9e08daa81..b016bd9f13e5 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +67,7 @@ typedef ::std::list< Component > ComponentList;
// List of (intersecting) actions, plus overall bounds
struct ConnectedComponents
{
- ConnectedComponents() :
+ ConnectedComponents() :
aComponentList(),
aBounds(),
aBgColor(COL_WHITE),
@@ -75,14 +75,14 @@ struct ConnectedComponents
bIsFullyTransparent(false)
{}
- ComponentList aComponentList;
- Rectangle aBounds;
+ ComponentList aComponentList;
+ Rectangle aBounds;
Color aBgColor;
- bool bIsSpecial;
- bool bIsFullyTransparent;
+ bool bIsSpecial;
+ bool bIsFullyTransparent;
};
-typedef ::std::list< ConnectedComponents > ConnectedComponentsList;
+typedef ::std::list< ConnectedComponents > ConnectedComponentsList;
// -----------
@@ -127,7 +127,7 @@ static bool checkRect( Rectangle& io_rPrevRect,
{
// shape needs to fully cover previous content, and have uniform
// color
- const bool bRet(
+ const bool bRet(
rMapModeVDev.LogicToPixel(rCurrRect).IsInside(io_rPrevRect) &&
rMapModeVDev.IsFillColor() );
@@ -136,7 +136,7 @@ static bool checkRect( Rectangle& io_rPrevRect,
io_rPrevRect = rCurrRect;
o_rBgColor = rMapModeVDev.GetFillColor();
}
-
+
return bRet;
}
@@ -155,7 +155,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( rAct.GetType() == META_TRANSPARENT_ACTION )
{
const MetaTransparentAction* pTransAct = static_cast<const MetaTransparentAction*>(&rAct);
- USHORT nTransparency( pTransAct->GetTransparence() );
+ USHORT nTransparency( pTransAct->GetTransparence() );
// #i10613# Respect transparency for draw color
if( nTransparency )
@@ -190,7 +190,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
case META_BMPEX_ACTION:
aBmpEx = static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx();
break;
-
+
case META_BMPEXSCALE_ACTION:
aBmpEx = static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx();
break;
@@ -219,7 +219,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( pRA->HasPalette() )
aActualColor = pRA->GetBestPaletteColor( aBgColor ).operator Color();
-
+
aBmp.ReleaseAccess(pRA);
// did we get true white?
@@ -248,22 +248,22 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
switch( rAct.GetType() )
{
case META_BMPEX_ACTION:
- o_rMtf.AddAction( new MetaBmpAction(
- static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
+ o_rMtf.AddAction( new MetaBmpAction(
+ static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
aBmp ));
break;
case META_BMPEXSCALE_ACTION:
- o_rMtf.AddAction( new MetaBmpScaleAction(
- static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
- static_cast<const MetaBmpExScaleAction&>(rAct).GetSize(),
+ o_rMtf.AddAction( new MetaBmpScaleAction(
+ static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
+ static_cast<const MetaBmpExScaleAction&>(rAct).GetSize(),
aBmp ));
break;
case META_BMPEXSCALEPART_ACTION:
- o_rMtf.AddAction( new MetaBmpScalePartAction(
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize(),
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcPoint(),
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
+ o_rMtf.AddAction( new MetaBmpScalePartAction(
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize(),
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcPoint(),
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
aBmp ));
break;
default:
@@ -277,9 +277,9 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// Returns true, if given action creates visible (i.e. non-transparent) output
static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut )
{
- const bool bLineTransparency( rOut.IsLineColor() ? rOut.GetLineColor().GetTransparency() == 255 : true );
- const bool bFillTransparency( rOut.IsFillColor() ? rOut.GetFillColor().GetTransparency() == 255 : true );
- bool bRet( false );
+ const bool bLineTransparency( rOut.IsLineColor() ? rOut.GetLineColor().GetTransparency() == 255 : true );
+ const bool bFillTransparency( rOut.IsFillColor() ? rOut.GetFillColor().GetTransparency() == 255 : true );
+ bool bRet( false );
switch( rAct.GetType() )
{
@@ -405,7 +405,7 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_LINE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaLineAction&>(rAct).GetStartPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaLineAction&>(rAct).GetStartPoint(),
static_cast<const MetaLineAction&>(rAct).GetEndPoint() );
break;
@@ -459,47 +459,47 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_BMP_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
case META_BMPSCALE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpScaleAction&>(rAct).GetSize() );
break;
case META_BMPSCALEPART_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpScalePartAction&>(rAct).GetDestSize() );
break;
case META_BMPEX_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().GetSizePixel() ) );
break;
case META_BMPEXSCALE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpExScaleAction&>(rAct).GetSize() );
break;
case META_BMPEXSCALEPART_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize() );
break;
case META_MASK_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaMaskAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
case META_MASKSCALE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
static_cast<const MetaMaskScaleAction&>(rAct).GetSize() );
break;
case META_MASKSCALEPART_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaMaskScalePartAction&>(rAct).GetDestSize() );
break;
@@ -524,12 +524,12 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_FLOATTRANSPARENT_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
static_cast<const MetaFloatTransparentAction&>(rAct).GetSize() );
break;
case META_EPS_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
static_cast<const MetaEPSAction&>(rAct).GetSize() );
break;
@@ -544,7 +544,7 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
// #105987# Use API method instead of Impl* methods
// #107490# Set base parameter equal to index parameter
- rOut.GetTextBoundRect( aActionBounds, rTextAct.GetText(), rTextAct.GetIndex(),
+ rOut.GetTextBoundRect( aActionBounds, rTextAct.GetText(), rTextAct.GetIndex(),
rTextAct.GetIndex(), rTextAct.GetLen() );
aActionBounds.Move( aPtLog.X(), aPtLog.Y() );
}
@@ -553,15 +553,15 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
- const long nLen = aString.Len();
+ const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
+ const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
+ const long nLen = aString.Len();
if( nLen )
{
// #105987# ImplLayout takes everything in logical coordinates
- SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
- rTextAct.GetLen(), rTextAct.GetPoint(),
+ SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
+ rTextAct.GetLen(), rTextAct.GetPoint(),
0, rTextAct.GetDXArray() );
if( pSalLayout )
{
@@ -580,8 +580,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_STRETCHTEXT_ACTION:
{
const MetaStretchTextAction& rTextAct = static_cast<const MetaStretchTextAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
- const long nLen = aString.Len();
+ const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
+ const long nLen = aString.Len();
// #i16195# Literate copy from TextArray action, the
// semantics for the ImplLayout call are copied from the
@@ -591,8 +591,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
if( nLen )
{
// #105987# ImplLayout takes everything in logical coordinates
- SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
- rTextAct.GetLen(), rTextAct.GetPoint(),
+ SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
+ rTextAct.GetLen(), rTextAct.GetPoint(),
rTextAct.GetWidth() );
if( pSalLayout )
{
@@ -641,7 +641,7 @@ static bool ImplIsActionHandlingTransparency( const MetaAction& rAct )
}
// remove comment to enable highlighting of generated output
-bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
+bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
long nMaxBmpDPIX, long nMaxBmpDPIY,
bool bReduceTransparency, bool bTransparencyAutoMode,
bool bDownsampleBitmaps,
@@ -649,15 +649,15 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
)
{
MetaAction* pCurrAct;
- bool bTransparent( false );
+ bool bTransparent( false );
rOutMtf.Clear();
if( ! bReduceTransparency || bTransparencyAutoMode )
{
// watch for transparent drawing actions
- for( pCurrAct = ( (GDIMetaFile&) rInMtf ).FirstAction();
- pCurrAct && !bTransparent;
+ for( pCurrAct = ( (GDIMetaFile&) rInMtf ).FirstAction();
+ pCurrAct && !bTransparent;
pCurrAct = ( (GDIMetaFile&) rInMtf ).NextAction() )
{
// #i10613# Extracted "specialness" predicate into extra method
@@ -676,7 +676,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
}
- // #i10613# Determine set of connected components containing transparent objects. These are
+ // #i10613# Determine set of connected components containing transparent objects. These are
// then processed as bitmaps, the original actions are removed from the metafile.
if( !bTransparent )
{
@@ -685,7 +685,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
else
{
- // #i10613#
+ // #i10613#
// This works as follows: we want a number of distinct sets of
// connected components, where each set contains metafile
// actions that are intersecting (note: there are possibly
@@ -827,12 +827,12 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// execute action to get correct MapModes etc.
pCurrAct->Execute( &aMapModeVDev );
-
+
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction();
++nActionNum;
}
- ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements.
+ ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements.
// create an OutputDevice to record mapmode changes and the like
VirtualDevice aMapModeVDev2;
@@ -848,7 +848,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
// up to and including last ink-generating background
// action go to background component
- aBackgroundComponent.aComponentList.push_back(
+ aBackgroundComponent.aComponentList.push_back(
::std::make_pair(
pCurrAct, nActionNum) );
@@ -865,26 +865,26 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// iterate over all actions (start where background action
// search left off)
- for( ;
- pCurrAct;
+ for( ;
+ pCurrAct;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
// execute action to get correct MapModes etc.
pCurrAct->Execute( &aMapModeVDev2 );
- // cache bounds of current action
+ // cache bounds of current action
const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, aMapModeVDev2) );
// accumulate collected bounds here, initialize with current action
- Rectangle aTotalBounds( aBBCurrAct ); // thus,
+ Rectangle aTotalBounds( aBBCurrAct ); // thus,
// aTotalComponents.aBounds
// is
// empty
// for
// non-output-generating
// actions
- bool bTreatSpecial( false );
- ConnectedComponents aTotalComponents;
+ bool bTreatSpecial( false );
+ ConnectedComponents aTotalComponents;
//
// STAGE 2.1: Search for intersecting cc entries
@@ -904,7 +904,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// component.
aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, aMapModeVDev2);
- if( !aBBCurrAct.IsEmpty() &&
+ if( !aBBCurrAct.IsEmpty() &&
!aTotalComponents.bIsFullyTransparent )
{
if( !aBackgroundComponent.aComponentList.empty() &&
@@ -913,18 +913,18 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// it seems the background is not large enough. to
// be on the safe side, combine with this component.
aTotalBounds.Union( aBackgroundComponent.aBounds );
-
+
// extract all aCurr actions to aTotalComponents
- aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
+ aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
aBackgroundComponent.aComponentList );
-
+
if( aBackgroundComponent.bIsSpecial )
bTreatSpecial = true;
}
- ConnectedComponentsList::iterator aCurrCC;
+ ConnectedComponentsList::iterator aCurrCC;
const ConnectedComponentsList::iterator aLastCC( aCCList.end() );
- bool bSomeComponentsChanged;
+ bool bSomeComponentsChanged;
// now, this is unfortunate: since changing anyone of
// the aCCList elements (e.g. by merging or addition
@@ -958,11 +958,11 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// calc union bounding box
aTotalBounds.Union( aCurrCC->aBounds );
-
+
// extract all aCurr actions to aTotalComponents
- aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
+ aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
aCurrCC->aComponentList );
-
+
if( aCurrCC->bIsSpecial )
bTreatSpecial = true;
@@ -1015,7 +1015,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
// added action is special and none of prev components
// special -> do the detailed tests
-
+
// can the action handle transparency correctly
// (i.e. when painted on white background, does the
// action still look correct)?
@@ -1059,19 +1059,19 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// set new bounds and add action to list
aTotalComponents.aBounds = aTotalBounds;
- aTotalComponents.aComponentList.push_back(
+ aTotalComponents.aComponentList.push_back(
::std::make_pair(
pCurrAct, nActionNum) );
// add aTotalComponents as a new entry to aCCList
aCCList.push_back( aTotalComponents );
- DBG_ASSERT( !aTotalComponents.aComponentList.empty(),
+ DBG_ASSERT( !aTotalComponents.aComponentList.empty(),
"Printer::GetPreparedMetaFile empty component" );
- DBG_ASSERT( !aTotalComponents.aBounds.IsEmpty() ||
+ DBG_ASSERT( !aTotalComponents.aBounds.IsEmpty() ||
(aTotalComponents.aBounds.IsEmpty() && aTotalComponents.aComponentList.size() == 1),
"Printer::GetPreparedMetaFile non-output generating actions must be solitary");
- DBG_ASSERT( !aTotalComponents.bIsFullyTransparent ||
+ DBG_ASSERT( !aTotalComponents.bIsFullyTransparent ||
(aTotalComponents.bIsFullyTransparent && aTotalComponents.aComponentList.size() == 1),
"Printer::GetPreparedMetaFile fully transparent actions must be solitary");
}
@@ -1089,11 +1089,11 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
::std::vector< const ConnectedComponents* > aCCList_MemberMap( rInMtf.GetActionCount() );
// iterate over all aCCList members and their contained metaactions
- ConnectedComponentsList::iterator aCurr( aCCList.begin() );
+ ConnectedComponentsList::iterator aCurr( aCCList.begin() );
const ConnectedComponentsList::iterator aLast( aCCList.end() );
for( ; aCurr != aLast; ++aCurr )
{
- ComponentList::iterator aCurrentAction( aCurr->aComponentList.begin() );
+ ComponentList::iterator aCurrentAction( aCurr->aComponentList.begin() );
const ComponentList::iterator aLastAction( aCurr->aComponentList.end() );
for( ; aCurrentAction != aLastAction; ++aCurrentAction )
{
@@ -1107,7 +1107,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// ===========================================================
//
- ComponentList::iterator aCurrAct( aBackgroundComponent.aComponentList.begin() );
+ ComponentList::iterator aCurrAct( aBackgroundComponent.aComponentList.begin() );
const ComponentList::iterator aLastAct( aBackgroundComponent.aComponentList.end() );
for( ; aCurrAct != aLastAct; ++aCurrAct )
{
@@ -1128,7 +1128,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
aTmpSize = mpPDFWriter->getCurPageSize();
aTmpSize = LogicToPixel( aTmpSize, MapMode( MAP_POINT ) );
-
+
// also add error code to PDFWriter
mpPDFWriter->insertError( vcl::PDFWriter::Warning_Transparency_Converted );
}
@@ -1147,7 +1147,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
if( aCurr->bIsSpecial )
{
- Rectangle aBoundRect( aCurr->aBounds );
+ Rectangle aBoundRect( aCurr->aBounds );
aBoundRect.Intersection( aOutputRect );
const double fBmpArea( (double) aBoundRect.GetWidth() * aBoundRect.GetHeight() );
@@ -1167,18 +1167,18 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
if( aBoundRect.GetWidth() && aBoundRect.GetHeight() )
{
Point aDstPtPix( aBoundRect.TopLeft() );
- Size aDstSzPix;
+ Size aDstSzPix;
- VirtualDevice aMapVDev; // here, we record only mapmode information
+ VirtualDevice aMapVDev; // here, we record only mapmode information
aMapVDev.EnableOutput(FALSE);
- VirtualDevice aPaintVDev; // into this one, we render.
+ VirtualDevice aPaintVDev; // into this one, we render.
rOutMtf.AddAction( new MetaPushAction( PUSH_MAPMODE ) );
rOutMtf.AddAction( new MetaMapModeAction() );
aPaintVDev.SetDrawMode( GetDrawMode() );
-
+
while( aDstPtPix.Y() <= aBoundRect.Bottom() )
{
aDstPtPix.X() = aBoundRect.Left();
@@ -1204,8 +1204,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aPaintVDev.EnableOutput(FALSE);
// iterate over all actions
- for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
- pCurrAct;
+ for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
+ pCurrAct;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
// enable output only for
@@ -1222,7 +1222,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
pCurrAct->Execute( &aMapVDev );
- MapMode aMtfMap( aMapVDev.GetMapMode() );
+ MapMode aMtfMap( aMapVDev.GetMapMode() );
const Point aNewOrg( aMapVDev.PixelToLogic( aDstPtPix ) );
aMtfMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
@@ -1259,7 +1259,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// scale down bitmap, if requested
if( bDownsampleBitmaps )
{
- aBandBmp = GetDownsampledBitmap( aDstSzPix,
+ aBandBmp = GetDownsampledBitmap( aDstSzPix,
Point(), aBandBmp.GetSizePixel(),
aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY );
}
@@ -1302,8 +1302,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// iterate over all actions and duplicate the ones not in a
// special aCCList member into rOutMtf
- for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
- pCurrAct;
+ for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
+ pCurrAct;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
const ConnectedComponents* pCurrAssociatedComponent = aCCList_MemberMap[nActionNum];
@@ -1348,7 +1348,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// -----------------------------------------------------------------------------
-Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
+Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY )
{
@@ -1384,8 +1384,8 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
// check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
- if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
- ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
+ if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
+ ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
{
// do scaling
@@ -1442,7 +1442,7 @@ BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz,
{
// do downsampling if neccessary
Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) );
-
+
// #103209# Normalize size (mirroring has to happen outside of this method)
aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
@@ -1453,8 +1453,8 @@ BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz,
const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
// check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
- if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
- ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
+ if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
+ ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
{
// do scaling
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index be7b72ec3213..4951e08eca91 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +65,13 @@ class ImplPageCache
GDIMetaFile aPage;
PrinterController::PageSize aSize;
};
-
+
std::vector< CacheEntry > maPages;
std::vector< sal_Int32 > maPageNumbers;
std::vector< sal_Int32 > maCacheRanking;
-
+
static const sal_Int32 nCacheSize = 6;
-
+
void updateRanking( sal_Int32 nLastHit )
{
if( maCacheRanking[0] != nLastHit )
@@ -86,7 +86,7 @@ class ImplPageCache
maCacheRanking[0] = nLastHit;
}
}
-
+
public:
ImplPageCache()
: maPages( nCacheSize )
@@ -96,7 +96,7 @@ public:
for( sal_Int32 i = 0; i < nCacheSize; i++ )
maCacheRanking[i] = nCacheSize - i - 1;
}
-
+
// caution: does not ensure uniqueness
void insert( sal_Int32 i_nPageNo, const GDIMetaFile& i_rPage, const PrinterController::PageSize& i_rSize )
{
@@ -108,7 +108,7 @@ public:
// so update the ranking
updateRanking( nReplacePage );
}
-
+
// caution: bad algorithm; should there ever be reason to increase the cache size beyond 6
// this needs to be urgently rewritten. However do NOT increase the cache size lightly,
// whole pages can be rather memory intensive
@@ -126,7 +126,7 @@ public:
}
return false;
}
-
+
void invalidate()
{
for( sal_Int32 i = 0; i < nCacheSize; ++i )
@@ -140,18 +140,18 @@ public:
class vcl::ImplPrinterControllerData
{
-public:
+public:
struct ControlDependency
{
rtl::OUString maDependsOnName;
sal_Int32 mnDependsOnEntry;
-
+
ControlDependency() : mnDependsOnEntry( -1 ) {}
};
-
+
typedef std::hash_map< rtl::OUString, size_t, rtl::OUStringHash > PropertyToIndexMap;
typedef std::hash_map< rtl::OUString, ControlDependency, rtl::OUStringHash > ControlDependencyMap;
-
+
boost::shared_ptr<Printer> mpPrinter;
Sequence< PropertyValue > maUIOptions;
std::vector< PropertyValue > maUIProperties;
@@ -165,17 +165,17 @@ public:
view::PrintableState meJobState;
vcl::PrinterController::MultiPageSetup maMultiPage;
-
+
vcl::PrintProgressDialog* mpProgress;
-
+
ImplPageCache maPageCache;
-
+
// set by user through printer config dialog
// if set, pages are centered and trimmed onto the fixed page
Size maFixedPageSize;
sal_Int32 mnDefaultPaperBin;
sal_Int32 mnFixedPaperBin;
-
+
ImplPrinterControllerData() :
mbFirstPage( sal_True ),
mbLastPage( sal_False ),
@@ -186,7 +186,7 @@ public:
mnFixedPaperBin( -1 )
{}
~ImplPrinterControllerData() { delete mpProgress; }
-
+
Size getRealPaperSize( const Size& i_rPageSize ) const
{
if( maFixedPageSize.Width() > 0 && maFixedPageSize.Height() > 0 )
@@ -272,23 +272,23 @@ struct PrintJobAsync
{
boost::shared_ptr<PrinterController> mpController;
JobSetup maInitSetup;
-
+
PrintJobAsync( const boost::shared_ptr<PrinterController>& i_pController,
const JobSetup& i_rInitSetup
)
: mpController( i_pController ), maInitSetup( i_rInitSetup )
{}
-
+
DECL_LINK( ExecJob, void* );
};
IMPL_LINK( PrintJobAsync, ExecJob, void*, EMPTYARG )
{
Printer::ImplPrintJob( mpController, maInitSetup );
-
+
// clean up, do not access members after this
delete this;
-
+
return 0;
}
@@ -328,12 +328,12 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
}
pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ),
makeAny( sal_False ) );
- }
-
+ }
+
// setup printer
// if no specific printer is already set, create one
-
+
// #i108686#
// in case of a UI (platform independent or system dialog) print job, make the printer persistent over jobs
// however if no printer was already set by the print job's originator,
@@ -354,7 +354,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
pController->setPrinter( pPrinter );
}
-
+
// reset last page property
i_pController->setLastPage( sal_False );
@@ -364,7 +364,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
// case 2: "All pages" is selected
// update "Page range" attribute to have a sensible default,
// but leave "All" as selected
-
+
// "Pages" attribute from API is now equivalent to "PageRange"
// AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
// Argh ! That sure needs cleaning up
@@ -433,7 +433,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
return;
}
}
-
+
// check if the printer brings up its own dialog
// in that case leave the work to that dialog
if( ! pController->getPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) &&
@@ -471,16 +471,16 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
{
}
}
-
+
pController->pushPropertiesToPrinter();
-
+
rtl::OUString aJobName;
beans::PropertyValue* pJobNameVal = pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ) );
if( pJobNameVal )
pJobNameVal->Value >>= aJobName;
-
+
pController->getPrinter()->StartJob( String( aJobName ), pController );
-
+
pController->jobFinished( pController->getJobState() );
}
@@ -493,7 +493,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if ( IsJobActive() || IsPrinting() )
return FALSE;
-
+
ULONG nCopies = mnCopyCount;
bool bCollateCopy = mbCollateCopy;
bool bUserCopy = FALSE;
@@ -531,7 +531,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
{
pSingleValue->Value >>= bSinglePrintJobs;
}
-
+
// remark: currently it is still possible to use EnablePrintFile and
// SetPrintFileName to redirect printout into file
// it can be argued that those methods should be removed in favor
@@ -553,10 +553,10 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if ( mbPrintFile )
pPrintFile = &maPrintFile;
- maJobName = i_rJobName;
- mnCurPage = 1;
- mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ maJobName = i_rJobName;
+ mnCurPage = 1;
+ mnCurPrintPage = 1;
+ mbPrinting = TRUE;
if( ImplGetSVData()->maGDIData.mbPrinterPullModel )
{
mbJobActive = TRUE;
@@ -578,11 +578,11 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if ( !mnError )
mnError = PRINTER_GENERALERROR;
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
mpPrinter = NULL;
-
+
return false;
}
}
@@ -592,7 +592,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
// now the real job starts
i_pController->setJobState( view::PrintableState_JOB_STARTED );
i_pController->jobStarted();
-
+
int nJobs = 1;
int nOuterRepeatCount = 1;
int nInnerRepeatCount = 1;
@@ -609,7 +609,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
nCopies = 1;
nOuterRepeatCount = nInnerRepeatCount = 1;
}
-
+
for( int nJobIteration = 0; nJobIteration < nJobs; nJobIteration++ )
{
bool bError = false, bAborted = false;
@@ -648,17 +648,17 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
// FIXME: duplex ?
}
EndJob();
-
+
if( nJobIteration < nJobs-1 )
{
mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
-
+
if ( mpPrinter )
{
- maJobName = i_rJobName;
- mnCurPage = 1;
- mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ maJobName = i_rJobName;
+ mnCurPage = 1;
+ mnCurPrintPage = 1;
+ mbPrinting = TRUE;
}
else
bError = true;
@@ -666,7 +666,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
}
else
bError = true;
-
+
if( bError )
{
mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
@@ -677,11 +677,11 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
: view::PrintableState_JOB_FAILED );
if( mpPrinter )
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
mpPrinter = NULL;
-
+
return false;
}
}
@@ -689,7 +689,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if( i_pController->getJobState() == view::PrintableState_JOB_STARTED )
i_pController->setJobState( view::PrintableState_JOB_SPOOLED );
}
-
+
// make last used printer persistent for UI jobs
if( i_pController->isShowDialogs() && ! i_pController->isDirectPrint() )
{
@@ -699,7 +699,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
GetName()
);
}
-
+
return true;
}
@@ -810,15 +810,15 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
{
aPageSize.aSize.Width() = aIsSize.Width;
aPageSize.aSize.Height() = aIsSize.Height;
-
+
Size aRealPaperSize( getRealPaperSize( aPageSize.aSize ) );
if( aRealPaperSize != aCurSize )
mpPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() );
}
-
+
if( nPaperBin != -1 && nPaperBin != mpPrinter->GetPaperBin() )
mpPrinter->SetPaperBin( nPaperBin );
-
+
return aPageSize;
}
@@ -855,7 +855,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
mpImplData->mpProgress->tick();
Application::Reschedule( true );
}
-
+
if( i_bMayUseCache )
{
PrinterController::PageSize aPageSize;
@@ -868,14 +868,14 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
mpImplData->maPageCache.invalidate();
o_rMtf.Clear();
-
+
// get page parameters
Sequence< PropertyValue > aPageParm( getPageParametersProtected( i_nUnfilteredPage ) );
const MapMode aMapMode( MAP_100TH_MM );
mpImplData->mpPrinter->Push();
mpImplData->mpPrinter->SetMapMode( aMapMode );
-
+
// modify job setup if necessary
PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm );
@@ -891,13 +891,13 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
o_rMtf.Stop();
o_rMtf.WindStart();
mpImplData->mpPrinter->Pop();
-
+
if( i_bMayUseCache )
mpImplData->maPageCache.insert( i_nUnfilteredPage, o_rMtf, aPageSize );
// reset "FirstPage" property to false now we've gotten at least our first one
mpImplData->mbFirstPage = sal_False;
-
+
return aPageSize;
}
@@ -943,14 +943,14 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
int nSubPages = rMPS.nRows * rMPS.nColumns;
if( nSubPages < 1 )
nSubPages = 1;
-
+
// reverse sheet order
if( mpImplData->mbReversePageOrder )
{
int nDocPages = getFilteredPageCount();
i_nFilteredPage = nDocPages - 1 - i_nFilteredPage;
}
-
+
// there is no filtering to be done (and possibly the page size of the
// original page is to be set), when N-Up is "neutral" that is there is
// only one subpage and the margins are 0
@@ -975,12 +975,12 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
}
return aPageSize;
}
-
+
// set last page property really only on the very last page to be rendered
// that is on the last subpage of a NUp run
sal_Bool bIsLastPage = mpImplData->mbLastPage;
mpImplData->mbLastPage = sal_False;
-
+
Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize ) );
// multi page area: page size minus margins + one time spacing right and down
@@ -1002,7 +1002,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
o_rMtf.SetPrefSize( aPaperSize );
o_rMtf.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
-
+
int nDocPages = getPageCountProtected();
for( int nSubPage = 0; nSubPage < nSubPages; nSubPage++ )
{
@@ -1034,10 +1034,10 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
// scale the metafile down to a sub page size
double fScaleX = double(aSubPageSize.Width())/double(aPageSize.aSize.Width());
double fScaleY = double(aSubPageSize.Height())/double(aPageSize.aSize.Height());
- double fScale = std::min( fScaleX, fScaleY );
+ double fScale = std::min( fScaleX, fScaleY );
aPageFile.Scale( fScale, fScale );
aPageFile.WindStart();
-
+
// move the subpage so it is centered in its "cell"
long nOffX = (aSubPageSize.Width() - long(double(aPageSize.aSize.Width()) * fScale)) / 2;
long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2;
@@ -1049,7 +1049,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
Rectangle aSubPageRect( Point( nX, nY ),
Size( long(double(aPageSize.aSize.Width())*fScale),
long(double(aPageSize.aSize.Height())*fScale) ) );
-
+
// append subpage to page
appendSubPage( o_rMtf, aSubPageRect, aPageFile, rMPS.bDrawBorder );
}
@@ -1060,7 +1060,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
// subsequent getPageFile calls have changed the paper, reset it to current value
mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() );
-
+
return PrinterController::PageSize( aPaperSize, true );
}
@@ -1108,7 +1108,7 @@ ULONG PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile&
if( rPrinterOptions.IsConvertToGreyscales() )
{
mpImplData->mpPrinter->SetDrawMode( mpImplData->mpPrinter->GetDrawMode() |
- ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
}
@@ -1139,7 +1139,7 @@ void PrinterController::printFilteredPage( int i_nPage )
{
if( mpImplData->meJobState != view::PrintableState_JOB_STARTED )
return;
-
+
GDIMetaFile aPageFile;
PrinterController::PageSize aPageSize = getFilteredPageFile( i_nPage, aPageFile );
@@ -1170,22 +1170,22 @@ void PrinterController::printFilteredPage( int i_nPage )
aPageFile.WindStart();
aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y(), mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
}
-
+
GDIMetaFile aCleanedFile;
ULONG nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
-
+
mpImplData->mpPrinter->EnableOutput( TRUE );
// actually print the page
mpImplData->mpPrinter->ImplStartPage();
-
+
mpImplData->mpPrinter->Push();
aCleanedFile.WindStart();
aCleanedFile.Play( mpImplData->mpPrinter.get() );
mpImplData->mpPrinter->Pop();
-
+
mpImplData->mpPrinter->ImplEndPage();
-
+
mpImplData->mpPrinter->SetDrawMode( nRestoreDrawMode );
}
@@ -1227,7 +1227,7 @@ bool PrinterController::getReversePrint() const
Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< PropertyValue >& i_rMergeList ) const
{
std::hash_set< rtl::OUString, rtl::OUStringHash > aMergeSet;
- size_t nResultLen = size_t(i_rMergeList.getLength()) + mpImplData->maUIProperties.size() + 3;
+ size_t nResultLen = size_t(i_rMergeList.getLength()) + mpImplData->maUIProperties.size() + 3;
for( int i = 0; i < i_rMergeList.getLength(); i++ )
aMergeSet.insert( i_rMergeList[i].Name );
@@ -1306,7 +1306,7 @@ void PrinterController::setValue( const rtl::OUString& i_rName, const Any& i_rVa
beans::PropertyValue aVal;
aVal.Name = i_rName;
aVal.Value = i_rValue;
-
+
setValue( aVal );
}
@@ -1407,7 +1407,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
if( prop_it != mpImplData->maPropertyToIndex.end() )
{
bEnabled = mpImplData->maUIPropertyEnabled[prop_it->second];
-
+
if( bEnabled )
{
// check control dependencies
@@ -1418,7 +1418,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
// check if the dependency is enabled
// if the dependency is disabled, we are too
bEnabled = isUIOptionEnabled( it->second.maDependsOnName );
-
+
if( bEnabled )
{
// does the dependency have the correct value ?
@@ -1437,7 +1437,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
// could be a dependency on a checked boolean
// in this case the dependency is on a non zero for checked value
bEnabled = ( bDepVal && it->second.mnDependsOnEntry != 0) ||
- ( ! bDepVal && it->second.mnDependsOnEntry == 0);
+ ( ! bDepVal && it->second.mnDependsOnEntry == 0);
}
else
{
@@ -1461,7 +1461,7 @@ rtl::OUString PrinterController::getDependency( const rtl::OUString& i_rProperty
mpImplData->maControlDependencies.find( i_rProperty );
if( it != mpImplData->maControlDependencies.end() )
aDependency = it->second.maDependsOnName;
-
+
return aDependency;
}
@@ -1501,7 +1501,7 @@ rtl::OUString PrinterController::makeEnabled( const rtl::OUString& i_rProperty )
}
}
}
-
+
return aDependency;
}
@@ -1528,7 +1528,7 @@ void PrinterController::createProgressDialog()
bShow = ! bApi;
}
}
-
+
if( bShow && ! Application::IsHeadlessModeEnabled() )
{
mpImplData->mpProgress = new PrintProgressDialog( NULL, getPageCountProtected() );
@@ -1577,7 +1577,7 @@ void PrinterController::pushPropertiesToPrinter()
{
case view::DuplexMode::OFF: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_OFF ); break;
case view::DuplexMode::LONGEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_LONGEDGE ); break;
- case view::DuplexMode::SHORTEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break;
+ case view::DuplexMode::SHORTEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break;
}
}
}
@@ -1704,7 +1704,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
const PropertyValue* i_pVal,
const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
)
-{
+{
sal_Int32 nElements =
1 // ControlType
+ (i_rTitle.getLength() ? 1 : 0) // Text
@@ -1773,7 +1773,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) );
aCtrl[nUsed++].Value <<= sal_False;
}
-
+
sal_Int32 nAddProps = i_rControlOptions.maAddProps.getLength();
for( sal_Int32 i = 0; i < nAddProps; i++ )
aCtrl[ nUsed++ ] = i_rControlOptions.maAddProps[i];
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index e22b37c0970c..1539f856570d 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +56,15 @@
ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
{
// save boundaries
- mnYTop = nTop;
- mnYBottom = nBottom;
+ mnYTop = nTop;
+ mnYBottom = nBottom;
// initialize lists
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
- mbTouched = FALSE;
+ mpNextBand = NULL;
+ mpPrevBand = NULL;
+ mpFirstSep = NULL;
+ mpFirstBandPoint = NULL;
+ mbTouched = FALSE;
}
// -----------------------------------------------------------------------
@@ -74,15 +74,15 @@ ImplRegionBand::ImplRegionBand(
const bool bIgnorePoints)
{
// copy boundaries
- mnYTop = rRegionBand.mnYTop;
- mnYBottom = rRegionBand.mnYBottom;
- mbTouched = rRegionBand.mbTouched;
+ mnYTop = rRegionBand.mnYTop;
+ mnYBottom = rRegionBand.mnYBottom;
+ mbTouched = rRegionBand.mbTouched;
// initialisation
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
+ mpNextBand = NULL;
+ mpPrevBand = NULL;
+ mpFirstSep = NULL;
+ mpFirstBandPoint = NULL;
// copy all elements of the list with separations
ImplRegionBandSep* pNewSep;
@@ -91,11 +91,11 @@ ImplRegionBand::ImplRegionBand(
while ( pSep )
{
// create new and copy data
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = pSep->mnXLeft;
- pNewSep->mnXRight = pSep->mnXRight;
- pNewSep->mbRemoved = pSep->mbRemoved;
- pNewSep->mpNextSep = NULL;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = pSep->mnXLeft;
+ pNewSep->mnXRight = pSep->mnXRight;
+ pNewSep->mbRemoved = pSep->mbRemoved;
+ pNewSep->mpNextSep = NULL;
if ( pSep == rRegionBand.mpFirstSep )
mpFirstSep = pNewSep;
else
@@ -117,7 +117,7 @@ ImplRegionBand::ImplRegionBand(
pPointCopy->mnLineId = pPoint->mnLineId;
pPointCopy->mbEndPoint = pPoint->mbEndPoint;
pPointCopy->meLineType = pPoint->meLineType;
-
+
if (pPrevPointCopy != NULL)
pPrevPointCopy->mpNextBandPoint = pPointCopy;
else
@@ -218,11 +218,11 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
{
if ( !mpFirstBandPoint )
{
- mpFirstBandPoint = new ImplRegionBandPoint;
- mpFirstBandPoint->mnX = nX;
- mpFirstBandPoint->mnLineId = nLineId;
- mpFirstBandPoint->mbEndPoint = bEndPoint;
- mpFirstBandPoint->meLineType = eLineType;
+ mpFirstBandPoint = new ImplRegionBandPoint;
+ mpFirstBandPoint->mnX = nX;
+ mpFirstBandPoint->mnLineId = nLineId;
+ mpFirstBandPoint->mbEndPoint = bEndPoint;
+ mpFirstBandPoint->meLineType = eLineType;
mpFirstBandPoint->mpNextBandPoint = NULL;
return TRUE;
}
@@ -278,7 +278,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// search appropriate position and insert point into the list
ImplRegionBandPoint* pNewRegionBandPoint;
-
+
pRegionBandPoint = mpFirstBandPoint;
pLastTestedRegionBandPoint = NULL;
while ( pRegionBandPoint )
@@ -286,12 +286,12 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// new point completly left? -> insert as first point
if ( nX <= pRegionBandPoint->mnX )
{
- pNewRegionBandPoint = new ImplRegionBandPoint;
- pNewRegionBandPoint->mnX = nX;
- pNewRegionBandPoint->mnLineId = nLineId;
- pNewRegionBandPoint->mbEndPoint = bEndPoint;
- pNewRegionBandPoint->meLineType = eLineType;
- pNewRegionBandPoint->mpNextBandPoint = pRegionBandPoint;
+ pNewRegionBandPoint = new ImplRegionBandPoint;
+ pNewRegionBandPoint->mnX = nX;
+ pNewRegionBandPoint->mnLineId = nLineId;
+ pNewRegionBandPoint->mbEndPoint = bEndPoint;
+ pNewRegionBandPoint->meLineType = eLineType;
+ pNewRegionBandPoint->mpNextBandPoint = pRegionBandPoint;
// connections to the new point
if ( !pLastTestedRegionBandPoint )
@@ -308,12 +308,12 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
}
// not inserted -> add to the end of the list
- pNewRegionBandPoint = new ImplRegionBandPoint;
- pNewRegionBandPoint->mnX = nX;
- pNewRegionBandPoint->mnLineId = nLineId;
- pNewRegionBandPoint->mbEndPoint = bEndPoint;
- pNewRegionBandPoint->meLineType = eLineType;
- pNewRegionBandPoint->mpNextBandPoint = NULL;
+ pNewRegionBandPoint = new ImplRegionBandPoint;
+ pNewRegionBandPoint->mnX = nX;
+ pNewRegionBandPoint->mnLineId = nLineId;
+ pNewRegionBandPoint->mbEndPoint = bEndPoint;
+ pNewRegionBandPoint->meLineType = eLineType;
+ pNewRegionBandPoint->mpNextBandPoint = NULL;
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
@@ -342,8 +342,8 @@ void ImplRegionBand::ScaleX( double fHorzScale )
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
- pSep->mnXLeft = FRound( pSep->mnXLeft * fHorzScale );
- pSep->mnXRight = FRound( pSep->mnXRight * fHorzScale );
+ pSep->mnXLeft = FRound( pSep->mnXLeft * fHorzScale );
+ pSep->mnXRight = FRound( pSep->mnXRight * fHorzScale );
pSep = pSep->mpNextSep;
}
}
@@ -402,11 +402,11 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
// band empty? -> add element
if ( !mpFirstSep )
{
- mpFirstSep = new ImplRegionBandSep;
- mpFirstSep->mnXLeft = nXLeft;
- mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep = new ImplRegionBandSep;
+ mpFirstSep->mnXLeft = nXLeft;
+ mpFirstSep->mnXRight = nXRight;
+ mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mpNextSep = NULL;
return;
}
@@ -423,10 +423,10 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
// new separation completly left? -> new separation!
if ( nXRight < pSep->mnXLeft )
{
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = nXLeft;
- pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = nXLeft;
+ pNewSep->mnXRight = nXRight;
+ pNewSep->mbRemoved = FALSE;
pNewSep->mpNextSep = pSep;
if ( pSep == mpFirstSep )
@@ -450,13 +450,13 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
// not inserted, but last element? -> add to the end of the list
if ( !pSep->mpNextSep && (nXLeft > pSep->mnXRight) )
{
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = nXLeft;
- pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = nXLeft;
+ pNewSep->mnXRight = nXRight;
+ pNewSep->mbRemoved = FALSE;
- pSep->mpNextSep = pNewSep;
- pNewSep->mpNextSep = NULL;
+ pSep->mpNextSep = pNewSep;
+ pNewSep->mpNextSep = NULL;
break;
}
@@ -569,10 +569,10 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
{
if ( (nXLeft >= pSep->mnXLeft) && (nXRight <= pSep->mnXRight) )
{
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = pSep->mnXLeft;
- pNewSep->mnXRight = nXLeft-1;
- pNewSep->mbRemoved = FALSE;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = pSep->mnXLeft;
+ pNewSep->mnXRight = nXLeft-1;
+ pNewSep->mbRemoved = FALSE;
pSep->mnXLeft = nXRight+1;
@@ -609,29 +609,29 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// order, and added four more cases. The code below references
// those numbers via #1, #2, etc.
//
- // Num Mnem newX:oldX newY:oldY Description Result Can quit?
+ // Num Mnem newX:oldX newY:oldY Description Result Can quit?
//
- // #1 Empty band - - The band is empty, thus, simply add new bandSep just add Yes
+ // #1 Empty band - - The band is empty, thus, simply add new bandSep just add Yes
//
- // #2 apart - - The rectangles are disjunct, add new one as is just add Yes
+ // #2 apart - - The rectangles are disjunct, add new one as is just add Yes
//
- // #3 atop == == The rectangles are _exactly_ the same, remove existing just remove Yes
+ // #3 atop == == The rectangles are _exactly_ the same, remove existing just remove Yes
//
- // #4 around < > The new rectangle extends the old to both sides intersect No
+ // #4 around < > The new rectangle extends the old to both sides intersect No
//
- // #5 left < < The new rectangle is left of the old (but intersects) intersect Yes
+ // #5 left < < The new rectangle is left of the old (but intersects) intersect Yes
//
- // #5b left-atop < == The new is left of the old, and coincides on the right intersect Yes
+ // #5b left-atop < == The new is left of the old, and coincides on the right intersect Yes
//
- // #6 right > > The new is right of the old (but intersects) intersect No
+ // #6 right > > The new is right of the old (but intersects) intersect No
//
- // #6b right-atop == > The new is right of the old, and coincides on the left intersect No
+ // #6b right-atop == > The new is right of the old, and coincides on the left intersect No
//
- // #7 inside > < The new is fully inside the old intersect Yes
+ // #7 inside > < The new is fully inside the old intersect Yes
//
- // #8 inside-right > == The new is fully inside the old, coincides on the right intersect Yes
+ // #8 inside-right > == The new is fully inside the old, coincides on the right intersect Yes
//
- // #9 inside-left == < The new is fully inside the old, coincides on the left intersect Yes
+ // #9 inside-left == < The new is fully inside the old, coincides on the left intersect Yes
//
//
// Then, to correctly perform XOr, the segment that's switched off
@@ -645,15 +645,15 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// trailing band sep from 11 to 14. This mimicks the xor look of a
// bitmap operation.
//
-
+
// band empty? -> add element
if ( !mpFirstSep )
{
- mpFirstSep = new ImplRegionBandSep;
- mpFirstSep->mnXLeft = nXLeft;
- mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep = new ImplRegionBandSep;
+ mpFirstSep->mnXLeft = nXLeft;
+ mpFirstSep->mnXRight = nXRight;
+ mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mpNextSep = NULL;
return;
}
@@ -682,10 +682,10 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep;
pNewSep->mbRemoved = FALSE;
-
+
// connections from the new separation
pNewSep->mpNextSep = pSep;
-
+
// connections to the new separation
if ( pSep == mpFirstSep )
mpFirstSep = pNewSep;
@@ -735,7 +735,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
else
{
pSep->mnXLeft = nXRight+1; // 9
-
+
pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
break;
}
@@ -747,7 +747,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
"ImplRegionBand::XOr(): Case 4,5,6,7 expected all coordinates to be not equal!" );
// The plain-jane check would look like this:
- //
+ //
// if( nXLeft < nOldLeft )
// {
// // #4,5
@@ -772,7 +772,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// // #7 done!
// }
// }
- //
+ //
// but since we generally don't have to care whether
// it's 4 or 6 (only that we must not stop processing
// here), condensed that in such a way that only the
@@ -811,16 +811,16 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep->mpNextSep;
pNewSep->mbRemoved = FALSE;
-
+
// connections from the new separation
pSep->mpNextSep = pNewSep;
-
+
pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
break;
}
}
}
-
+
pPrevSep = pSep;
pSep = pSep->mpNextSep;
}
@@ -833,11 +833,11 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = NULL;
pNewSep->mbRemoved = FALSE;
-
+
// connections from the new separation
pPrevSep->mpNextSep = pNewSep;
}
-
+
OptimizeBand();
}
@@ -915,8 +915,8 @@ long ImplRegionBand::GetXRightBoundary() const
BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
{
- ImplRegionBandSep* pOwnRectBandSep = mpFirstSep;
- ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep;
+ ImplRegionBandSep* pOwnRectBandSep = mpFirstSep;
+ ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep;
while ( pOwnRectBandSep && pSecondRectBandSep )
{
// get boundaries of current rectangle
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index ed58a5d90ade..48a5d62feee5 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +82,7 @@ bool ImplIsPolygonRectilinear (const PolyPolygon& rPolyPoly)
const USHORT nPolyCount = rPolyPoly.Count();
for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const USHORT nSize = aPoly.GetSize();
@@ -186,7 +186,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
const USHORT nPolyCount = rPolyPoly.Count();
for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const USHORT nSize = aPoly.GetSize();
@@ -216,7 +216,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
const long nTop (::std::min(aStart.Y(), aEnd.Y()));
const long nBottom (::std::max(aStart.Y(), aEnd.Y()));
const LineType eLineType (aStart.Y() > aEnd.Y() ? LINE_DESCENDING : LINE_ASCENDING);
-
+
// Make sure that the current line is covered by bands.
ImplAddMissingBands(pImplRegion, nTop,nBottom);
@@ -284,14 +284,14 @@ ImplRegion* ImplGeneralPolygonToBands (
// initialisation and creation of Bands
ImplRegion* pImplRegion = new ImplRegion();
pImplRegion->CreateBandRange( rPolygonBoundingBox.Top(), rPolygonBoundingBox.Bottom() );
-
+
// insert polygons
const USHORT nPolyCount = rPolyPoly.Count();
for ( USHORT nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
// get reference to current polygon
- const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
- const USHORT nSize = aPoly.GetSize();
+ const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
+ const USHORT nSize = aPoly.GetSize();
// not enough points ( <= 2 )? -> nothing to do!
if ( nSize <= 2 )
@@ -320,7 +320,7 @@ ImplRegion* ImplGeneralPolygonToBands (
#ifdef DBG_UTIL
const char* ImplDbgTestRegion( const void* pObj )
{
- Region* pRegion = (Region*)pObj;
+ Region* pRegion = (Region*)pObj;
ImplRegion* pImplRegion = pRegion->ImplGetImplRegion();
if ( aImplNullRegion.mnRefCount )
@@ -338,8 +338,8 @@ const char* ImplDbgTestRegion( const void* pObj )
if ( (pImplRegion != &aImplEmptyRegion) && (pImplRegion != &aImplNullRegion) )
{
- ULONG nCount = 0;
- const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
+ ULONG nCount = 0;
+ const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
while ( pBand )
{
if ( pBand->mnYBottom < pBand->mnYTop )
@@ -420,27 +420,27 @@ inline void Region::ImplPolyPolyRegionToBandRegion()
// =======================================================================
ImplRegionBase::ImplRegionBase( int nRefCount )
-: mnRefCount( nRefCount )
-, mnRectCount( 0 )
-, mpPolyPoly( NULL )
-, mpB2DPolyPoly( NULL )
+: mnRefCount( nRefCount )
+, mnRectCount( 0 )
+, mpPolyPoly( NULL )
+, mpB2DPolyPoly( NULL )
{}
// ------------------------------------------------------------------------
ImplRegion::ImplRegion()
{
- mpFirstBand = NULL;
- mpLastCheckedBand = NULL;
+ mpFirstBand = NULL;
+ mpLastCheckedBand = NULL;
}
// ------------------------------------------------------------------------
ImplRegion::ImplRegion( const PolyPolygon& rPolyPoly )
{
- mpFirstBand = NULL;
- mpLastCheckedBand = NULL;
- mpPolyPoly = new PolyPolygon( rPolyPoly );
+ mpFirstBand = NULL;
+ mpLastCheckedBand = NULL;
+ mpPolyPoly = new PolyPolygon( rPolyPoly );
}
// ------------------------------------------------------------------------
@@ -455,7 +455,7 @@ ImplRegion::ImplRegion( const basegfx::B2DPolyPolygon& rPolyPoly )
// -----------------------------------------------------------------------
ImplRegion::ImplRegion( const ImplRegion& rImplRegion )
-: ImplRegionBase()
+: ImplRegionBase()
{
mpFirstBand = NULL;
mpLastCheckedBand = NULL;
@@ -577,20 +577,20 @@ BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
}
else if ( rStartPt.Y() != rEndPt.Y() )
{
- const long nDX = labs( rEndPt.X() - rStartPt.X() );
- const long nDY = labs( rEndPt.Y() - rStartPt.Y() );
- const long nStartX = rStartPt.X();
- const long nStartY = rStartPt.Y();
- const long nEndX = rEndPt.X();
- const long nEndY = rEndPt.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
- const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
+ const long nDX = labs( rEndPt.X() - rStartPt.X() );
+ const long nDY = labs( rEndPt.Y() - rStartPt.Y() );
+ const long nStartX = rStartPt.X();
+ const long nStartY = rStartPt.Y();
+ const long nEndX = rEndPt.X();
+ const long nEndY = rEndPt.Y();
+ const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
+ const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
if ( nDX >= nDY )
{
- const long nDYX = ( nDY - nDX ) << 1;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
+ const long nDYX = ( nDY - nDX ) << 1;
+ const long nDY2 = nDY << 1;
+ long nD = nDY2 - nDX;
for ( nX = nStartX, nY = nStartY; nX != nEndX; nX += nXInc )
{
@@ -604,9 +604,9 @@ BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
}
else
{
- const long nDYX = ( nDX - nDY ) << 1;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
+ const long nDYX = ( nDX - nDY ) << 1;
+ const long nDY2 = nDX << 1;
+ long nD = nDY2 - nDY;
for ( nX = nStartX, nY = nStartY; nY != nEndY; nY += nYInc )
{
@@ -1178,10 +1178,10 @@ void Region::ImplCreateRectRegion( const Rectangle& rRect )
else
{
// get justified rectangle
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nRight = Max( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
// create instance of implementation class
mpImplRegion = new ImplRegion();
@@ -1382,10 +1382,10 @@ BOOL Region::Union( const Rectangle& rRect )
ImplCopyData();
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// insert bands if the boundaries are not allready in the list
mpImplRegion->InsertBands( nTop, nBottom );
@@ -1449,10 +1449,10 @@ BOOL Region::Intersect( const Rectangle& rRect )
return TRUE;
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// is own region NULL-region? -> copy data!
if ( mpImplRegion == &aImplNullRegion )
@@ -1535,10 +1535,10 @@ BOOL Region::Exclude( const Rectangle& rRect )
ImplCopyData();
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// insert bands if the boundaries are not allready in the list
mpImplRegion->InsertBands( nTop, nBottom );
@@ -1577,10 +1577,10 @@ BOOL Region::XOr( const Rectangle& rRect )
ImplCopyData();
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// insert bands if the boundaries are not allready in the list
mpImplRegion->InsertBands( nTop, nBottom );
@@ -1657,7 +1657,7 @@ BOOL Region::Intersect( const Region& rRegion )
// same instance data? -> nothing to do!
if ( mpImplRegion == rRegion.mpImplRegion )
return TRUE;
-
+
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
@@ -1921,7 +1921,7 @@ Rectangle Region::GetBoundRect() const
return aRect;
// get the boundaries of the first band
- long nYTop = mpImplRegion->mpFirstBand->mnYTop;
+ long nYTop = mpImplRegion->mpFirstBand->mnYTop;
long nYBottom = mpImplRegion->mpFirstBand->mnYBottom;
long nXLeft = mpImplRegion->mpFirstBand->GetXLeftBoundary();
long nXRight = mpImplRegion->mpFirstBand->GetXRightBoundary();
@@ -1930,9 +1930,9 @@ Rectangle Region::GetBoundRect() const
ImplRegionBand* pBand = mpImplRegion->mpFirstBand->mpNextBand;
while ( pBand )
{
- nYBottom = pBand->mnYBottom;
- nXLeft = Min( nXLeft, pBand->GetXLeftBoundary() );
- nXRight = Max( nXRight, pBand->GetXRightBoundary() );
+ nYBottom = pBand->mnYBottom;
+ nXLeft = Min( nXLeft, pBand->GetXLeftBoundary() );
+ nXRight = Max( nXRight, pBand->GetXRightBoundary() );
pBand = pBand->mpNextBand;
}
@@ -1994,7 +1994,7 @@ const basegfx::B2DPolyPolygon Region::GetB2DPolyPolygon() const
// TODO: cache the converted polygon?
// mpImplRegion->mpB2DPolyPoly = aRet;
}
-
+
return aRet;
}
@@ -2020,7 +2020,7 @@ basegfx::B2DPolyPolygon Region::ConvertToB2DPolyPolygon()
}
EndEnumRects( aHdl );
}
-
+
return aRet;
}
@@ -2043,17 +2043,17 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
return FALSE;
// initialise pointer for first access
- ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
- ImplRegionBandSep* pCurrRectBandSep = pCurrRectBand->mpFirstSep;
+ ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
+ ImplRegionBandSep* pCurrRectBandSep = pCurrRectBand->mpFirstSep;
DBG_ASSERT( pCurrRectBandSep != NULL, "Erstes Band wurde nicht optimiert." );
if ( !pCurrRectBandSep )
return FALSE;
// get boundaries of current rectangle
- rX = pCurrRectBandSep->mnXLeft;
- rY = pCurrRectBand->mnYTop;
- rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
+ rX = pCurrRectBandSep->mnXLeft;
+ rY = pCurrRectBand->mnYTop;
+ rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
rHeight = pCurrRectBand->mnYBottom - pCurrRectBand->mnYTop + 1;
// save pointers
@@ -2076,8 +2076,8 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
return FALSE;
// get last pointers
- ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
- ImplRegionBandSep* pCurrRectBandSep = (ImplRegionBandSep*)rImplRegionInfo.mpVoidCurrRectBandSep;
+ ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
+ ImplRegionBandSep* pCurrRectBandSep = (ImplRegionBandSep*)rImplRegionInfo.mpVoidCurrRectBandSep;
// get next separation from current band
pCurrRectBandSep = pCurrRectBandSep->mpNextSep;
@@ -2097,9 +2097,9 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
}
// get boundaries of current rectangle
- rX = pCurrRectBandSep->mnXLeft;
- rY = pCurrRectBand->mnYTop;
- rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
+ rX = pCurrRectBandSep->mnXLeft;
+ rY = pCurrRectBand->mnYTop;
+ rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
rHeight = pCurrRectBand->mnYBottom - pCurrRectBand->mnYTop + 1;
// save new pointers
@@ -2321,10 +2321,10 @@ BOOL Region::operator==( const Region& rRegion ) const
}
// initialise pointers
- ImplRegionBand* pOwnRectBand = mpImplRegion->mpFirstBand;
- ImplRegionBandSep* pOwnRectBandSep = pOwnRectBand->mpFirstSep;
- ImplRegionBand* pSecondRectBand = rRegion.mpImplRegion->mpFirstBand;
- ImplRegionBandSep* pSecondRectBandSep = pSecondRectBand->mpFirstSep;
+ ImplRegionBand* pOwnRectBand = mpImplRegion->mpFirstBand;
+ ImplRegionBandSep* pOwnRectBandSep = pOwnRectBand->mpFirstSep;
+ ImplRegionBand* pSecondRectBand = rRegion.mpImplRegion->mpFirstBand;
+ ImplRegionBandSep* pSecondRectBandSep = pSecondRectBand->mpFirstSep;
while ( pOwnRectBandSep && pSecondRectBandSep )
{
// get boundaries of current rectangle
@@ -2394,9 +2394,9 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
{
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
- VersionCompat aCompat( rIStrm, STREAM_READ );
- UINT16 nVersion;
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStrm, STREAM_READ );
+ UINT16 nVersion;
+ UINT16 nTmp16;
// statische Object haben RefCount von 0
if ( rRegion.mpImplRegion->mnRefCount )
@@ -2474,7 +2474,7 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
rRegion.mpImplRegion->mnRectCount++;
}
}
-
+
if( rIStrm.IsEof() )
{
DBG_ERROR( "premature end of region stream" );
@@ -2555,7 +2555,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
// put endmarker
rOStrm << (UINT16) STREAMENTRY_END;
-
+
// write polypolygon if available
const BOOL bHasPolyPolygon = rRegion.HasPolyPolygon();
rOStrm << bHasPolyPolygon;
@@ -2565,7 +2565,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
// #i105373#
PolyPolygon aNoCurvePolyPolygon;
rRegion.GetPolyPolygon().AdaptiveSubdivide(aNoCurvePolyPolygon);
-
+
rOStrm << aNoCurvePolyPolygon;
}
}
@@ -2781,7 +2781,7 @@ RegionHandle Region::BeginEnumRects()
ImplRegionHandle* pData = new ImplRegionHandle;
pData->mpRegion = new Region( *this );
- pData->mbFirst = TRUE;
+ pData->mbFirst = TRUE;
// save pointers
pData->mpCurrRectBand = pData->mpRegion->mpImplRegion->mpFirstBand;
@@ -2823,10 +2823,10 @@ BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
}
// get boundaries of current rectangle
- rRect.Top() = pData->mpCurrRectBand->mnYTop;
- rRect.Bottom() = pData->mpCurrRectBand->mnYBottom;
- rRect.Left() = pData->mpCurrRectBandSep->mnXLeft;
- rRect.Right() = pData->mpCurrRectBandSep->mnXRight;
+ rRect.Top() = pData->mpCurrRectBand->mnYTop;
+ rRect.Bottom() = pData->mpCurrRectBand->mnYBottom;
+ rRect.Left() = pData->mpCurrRectBandSep->mnXLeft;
+ rRect.Right() = pData->mpCurrRectBandSep->mnXRight;
return TRUE;
}
@@ -2895,13 +2895,13 @@ static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOu
Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
{
//return Region( rPolyPoly );
-
+
// check if it's worth extracting the XOr'ing the Rectangles
// empiricism shows that break even between XOr'ing rectangles separately
// and ImplPolyPolyRegionToBandRegion is at half rectangles/half polygons
int nPolygonRects = 0, nPolygonPolygons = 0;
int nPolygons = rPolyPoly.Count();
-
+
for( USHORT i = 0; i < nPolygons; i++ )
{
const Polygon& rPoly = rPolyPoly[i];
@@ -2912,7 +2912,7 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
}
if( nPolygonPolygons > nPolygonRects )
return Region( rPolyPoly );
-
+
Region aResult;
Rectangle aRect;
for( USHORT i = 0; i < nPolygons; i++ )
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index ea8d10377e61..c01cd8add7ad 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +75,7 @@ SalFrameGeometry SalFrame::GetGeometry()
// ----------------------------------------------------------------------------
-SalGraphics::SalGraphics()
+SalGraphics::SalGraphics()
: m_nLayout( 0 ),
m_bAntiAliasB2DDraw(false)
{
@@ -279,7 +279,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
basegfx::B2DPoint aRet( i_rPoint );
@@ -308,9 +308,9 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
-
+
basegfx::B2DPolygon aRet;
if( w )
{
@@ -319,9 +319,9 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
{
aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev, i_bBack ) );
if( i_rPoly.isPrevControlPointUsed( i ) )
- aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
+ aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
if( i_rPoly.isNextControlPointUsed( i ) )
- aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
+ aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
}
aRet.setClosed( i_rPoly.isClosed() );
aRet.flip();
@@ -338,9 +338,9 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
-
+
basegfx::B2DPolyPolygon aRet;
if( w )
{
@@ -357,9 +357,9 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
// ----------------------------------------------------------------------------
-BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return unionClipRegion( nX, nY, nWidth, nHeight );
}
@@ -375,19 +375,19 @@ BOOL SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const
return unionClipRegion( rPoly );
}
-void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY );
}
-void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY, nSalColor );
}
-void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
+void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -396,16 +396,16 @@ void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const Out
}
drawLine( nX1, nY1, nX2, nY2 );
}
-void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
drawRect( nX, nY, nWidth, nHeight );
}
-bool SalGraphics::drawPolyLine(
+bool SalGraphics::drawPolyLine(
const basegfx::B2DPolygon& /*rPolyPolygon*/,
double /*fTransparency*/,
- const basegfx::B2DVector& /*rLineWidths*/,
+ const basegfx::B2DVector& /*rLineWidths*/,
basegfx::B2DLineJoin /*eLineJoin*/)
{
return false;
@@ -416,7 +416,7 @@ void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const Out
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -429,7 +429,7 @@ void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const Outp
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -448,7 +448,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
{
ULONG nPoints = pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
- mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
+ mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
}
drawPolyPolygon( nPoly, pPoints, (PCONSTSALPOINT*)pPtAry2 );
@@ -464,7 +464,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& i_rPolyPolygon, double i_fTransparency, const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
basegfx::B2DPolyPolygon aMirror( mirror( i_rPolyPolygon, i_pOutDev ) );
bRet = drawPolyPolygon( aMirror, i_fTransparency );
@@ -482,10 +482,10 @@ bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fT
sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -497,10 +497,10 @@ sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry,
sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -513,7 +513,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3
const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev )
{
sal_Bool bRet = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
@@ -522,7 +522,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3
{
ULONG nPoints = i_pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
- mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
+ mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
}
bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, (PCONSTSALPOINT*)pPtAry2, i_pFlgAry );
@@ -541,7 +541,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
basegfx::B2DPolygon aMirror( mirror( i_rPolygon, i_pOutDev ) );
bRet = drawPolyLine( aMirror, fTransparency, i_rLineWidth, i_eLineJoin );
@@ -551,54 +551,54 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
return bRet;
}
-void SalGraphics::CopyArea( long nDestX, long nDestY,
+void SalGraphics::CopyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
USHORT nFlags, const OutputDevice *pOutDev )
{
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
mirror( nDestX, nSrcWidth, pOutDev );
mirror( nSrcX, nSrcWidth, pOutDev );
}
copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, nFlags );
}
-void SalGraphics::CopyBits( const SalTwoRect* pPosAry,
+void SalGraphics::CopyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev )
{
- if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) ||
+ if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) ||
(pSrcGraphics && ( (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) || (pSrcOutDev && pSrcOutDev->IsRTLEnabled()) ) ) )
{
SalTwoRect pPosAry2 = *pPosAry;
if( (pSrcGraphics && (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL)) || (pSrcOutDev && pSrcOutDev->IsRTLEnabled()) )
- mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev );
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev );
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
copyBits( &pPosAry2, pSrcGraphics );
}
else
copyBits( pPosAry, pSrcGraphics );
}
-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap );
}
else
drawBitmap( pPosAry, rSalBitmap );
}
-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap, nTransparentColor );
}
else
@@ -611,49 +611,49 @@ void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap, rTransparentBitmap );
}
else
drawBitmap( pPosAry, rSalBitmap, rTransparentBitmap );
}
-void SalGraphics::DrawMask( const SalTwoRect* pPosAry,
+void SalGraphics::DrawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawMask( &pPosAry2, rSalBitmap, nMaskColor );
}
else
drawMask( pPosAry, rSalBitmap, nMaskColor );
}
-SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return getBitmap( nX, nY, nWidth, nHeight );
}
-SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
+SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
return getPixel( nX, nY );
}
-void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
invert( nX, nY, nWidth, nHeight, nFlags );
}
-void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags );
delete [] pPtAry2;
}
@@ -661,7 +661,7 @@ void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nF
invert( nPoints, pPtAry, nFlags );
}
-BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
+BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -761,7 +761,7 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
+ if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion ) )
{
mirror( rNativeBoundingRegion, pOutDev, true );
@@ -776,26 +776,26 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
}
}
else
- return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
+ return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion );
}
bool SalGraphics::DrawAlphaBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSourceBitmap,
- const SalBitmap& rAlphaBitmap,
+ const SalBitmap& rAlphaBitmap,
const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = rPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
return drawAlphaBitmap( pPosAry2, rSourceBitmap, rAlphaBitmap );
}
else
return drawAlphaBitmap( rPosAry, rSourceBitmap, rAlphaBitmap );
}
-bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
+bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
sal_uInt8 nTransparency, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 970b0ff3cd0b..ded9d9e148ff 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
#include <unicode/uchar.h>
#if defined _MSC_VER
#pragma warning(pop)
-#endif
+#endif
#include <algorithm>
@@ -109,7 +109,7 @@ bool IsDiacritic( sal_UCS4 nChar )
if( (pRange->mnMin <= nChar) && (nChar < pRange->mnEnd) )
return true;
- return false;
+ return false;
}
// =======================================================================
@@ -265,7 +265,7 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang )
case LANGUAGE_FARSI & LANGUAGE_MASK_PRIMARY:
case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY:
case LANGUAGE_PUNJABI & LANGUAGE_MASK_PRIMARY: //???
- case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY:
+ case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY:
nOffset = 0x06F0 - '0'; // eastern arabic-indic digits
break;
case LANGUAGE_BENGALI & LANGUAGE_MASK_PRIMARY:
@@ -554,7 +554,7 @@ ImplLayoutArgs::ImplLayoutArgs( const xub_Unicode* pStr, int nLen,
UBiDi* pParaBidi = ubidi_openSized( mnLength, 0, &rcI18n );
if( !pParaBidi )
return;
- ubidi_setPara( pParaBidi, reinterpret_cast<const UChar *>(mpStr), mnLength, nLevel, NULL, &rcI18n ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pParaBidi, reinterpret_cast<const UChar *>(mpStr), mnLength, nLevel, NULL, &rcI18n ); // UChar != sal_Unicode in MinGW
UBiDi* pLineBidi = pParaBidi;
int nSubLength = mnEndCharPos - mnMinCharPos;
@@ -983,7 +983,7 @@ bool GenericSalLayout::GetCharWidths( sal_Int32* pCharWidths ) const
if( pN->IsClusterStart() )
break;
if( pN->IsDiacritic() )
- continue; // ignore diacritics
+ continue; // ignore diacritics
if( nXPosMax > pN->maLinearPos.X() )
nXPosMax = pN->maLinearPos.X();
}
@@ -1246,10 +1246,10 @@ void GenericSalLayout::ApplyAsianKerning( const sal_Unicode* pStr, int nLength )
{
// ignore code ranges that are not affected by asian punctuation compression
const sal_Unicode cHere = pStr[n];
- if( ((0x3000 != (cHere & 0xFF00)) && (0x2010 != (cHere & 0xFFF0))) || (0xFF00 != (cHere & 0xFF00)) )
+ if( ((0x3000 != (cHere & 0xFF00)) && (0x2010 != (cHere & 0xFFF0))) || (0xFF00 != (cHere & 0xFF00)) )
continue;
const sal_Unicode cNext = pStr[n+1];
- if( ((0x3000 != (cNext & 0xFF00)) && (0x2010 != (cNext & 0xFFF0))) || (0xFF00 != (cNext & 0xFF00)) )
+ if( ((0x3000 != (cNext & 0xFF00)) && (0x2010 != (cNext & 0xFFF0))) || (0xFF00 != (cNext & 0xFF00)) )
continue;
// calculate compression values
@@ -1509,7 +1509,7 @@ void GenericSalLayout::MoveGlyph( int nStart, long nNewXPos )
return;
GlyphItem* pG = mpGlyphItems + nStart;
- // the nNewXPos argument determines the new cell position
+ // the nNewXPos argument determines the new cell position
// as RTL-glyphs are right justified in their cell
// the cell position needs to be adjusted to the glyph position
if( pG->IsRTLGlyph() )
@@ -1829,7 +1829,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
if( n > 0 )
{
// drop the NotDef glyphs in the base layout run if a fallback run exists
- while (
+ while (
(maFallbackRuns[ n-1 ].PosIsInRun( nCharPos[0] ) ) &&
(!maFallbackRuns[ n ].PosIsInAnyRun( nCharPos[0] ) )
)
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 088910304091..9cbe0fd2f082 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,35 +37,35 @@
// - Defines -
// -----------
-#define IMPL_CASE_GET_FORMAT( Format ) \
-case( BMP_FORMAT##Format ): \
- pFncGetPixel = BitmapReadAccess::GetPixelFor##Format; \
+#define IMPL_CASE_GET_FORMAT( Format ) \
+case( BMP_FORMAT##Format ): \
+ pFncGetPixel = BitmapReadAccess::GetPixelFor##Format; \
break
// -----------------------------------------------------------------------------
-#define IMPL_CASE_SET_FORMAT( Format, BitCount ) \
-case( BMP_FORMAT##Format ): \
-{ \
- pFncSetPixel = BitmapReadAccess::SetPixelFor##Format; \
- pDstBuffer->mnBitCount = BitCount; \
-} \
+#define IMPL_CASE_SET_FORMAT( Format, BitCount ) \
+case( BMP_FORMAT##Format ): \
+{ \
+ pFncSetPixel = BitmapReadAccess::SetPixelFor##Format; \
+ pDstBuffer->mnBitCount = BitCount; \
+} \
break
// -----------------------------------------------------------------------------
-#define DOUBLE_SCANLINES() \
-while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
-{ \
- memcpy( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \
- nActY++; \
+#define DOUBLE_SCANLINES() \
+while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
+{ \
+ memcpy( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \
+ nActY++; \
}
// -----------
// - Inlines -
// -----------
-#define TC_TO_PAL_COLORS 4096
+#define TC_TO_PAL_COLORS 4096
static long ImplIndexFromColor( const BitmapColor& rCol )
{
@@ -85,22 +85,22 @@ static long ImplIndexFromColor( const BitmapColor& rCol )
}
-#define COLOR_TO_INDEX( _def_rCol )
+#define COLOR_TO_INDEX( _def_rCol )
// ------------------------
// - conversion functions -
// ------------------------
-static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
- BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
- BitmapColor aIndex( 0 );
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
+ BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
+ BitmapColor aIndex( 0 );
for( USHORT i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
{
@@ -125,20 +125,20 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
// -----------------------------------------------------------------------------
-static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
- const BitmapColor* pColBuf = rSrcBuffer.maPalette.ImplGetColorBuffer();
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ const BitmapColor* pColBuf = rSrcBuffer.maPalette.ImplGetColorBuffer();
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_1BIT_MSB_PAL )
{
- const BitmapColor aCol0( pColBuf[ 0 ] );
- const BitmapColor aCol1( pColBuf[ 1 ] );
- long nMapX;
+ const BitmapColor aCol0( pColBuf[ 0 ] );
+ const BitmapColor aCol1( pColBuf[ 1 ] );
+ long nMapX;
for( long nActY = 0, nMapY; nActY < nHeight; nActY++ )
{
@@ -147,7 +147,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
for( long nX = 0L; nX < nWidth; )
{
nMapX = pMapX[ nX ];
- pFncSetPixel( pDstScan, nX++,
+ pFncSetPixel( pDstScan, nX++,
pSrcScan[ nMapX >> 3 ] & ( 1 << ( 7 - ( nMapX & 7 ) ) ) ? aCol1 : aCol0,
rDstMask );
}
@@ -166,7 +166,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
for( long nX = 0L; nX < nWidth; )
{
nMapX = pMapX[ nX ];
- pFncSetPixel( pDstScan, nX++,
+ pFncSetPixel( pDstScan, nX++,
pColBuf[ ( pSrcScan[ nMapX >> 1 ] >> ( nMapX & 1 ? 0 : 4 ) ) & 0x0f ],
rDstMask );
}
@@ -202,18 +202,18 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
// -----------------------------------------------------------------------------
-static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_24BIT_TC_BGR )
{
BitmapColor aCol;
- BYTE* pPixel;
+ BYTE* pPixel;
for( long nActY = 0, nMapY; nActY < nHeight; nActY++ )
{
@@ -246,16 +246,16 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
// -----------------------------------------------------------------------------
-static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
- BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- BYTE* pColToPalMap = new BYTE[ TC_TO_PAL_COLORS ];
- BitmapColor aIndex( 0 );
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
+ BYTE* pColToPalMap = new BYTE[ TC_TO_PAL_COLORS ];
+ BitmapColor aIndex( 0 );
for( long nR = 0; nR < 16; nR++ )
{
@@ -293,12 +293,12 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
// - StretchAndConvert -
// ---------------------
-BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
+BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
ULONG nDstBitmapFormat, BitmapPalette* pDstPal, ColorMask* pDstMask )
{
- FncGetPixel pFncGetPixel;
- FncSetPixel pFncSetPixel;
- BitmapBuffer* pDstBuffer = new BitmapBuffer;
+ FncGetPixel pFncGetPixel;
+ FncSetPixel pFncSetPixel;
+ BitmapBuffer* pDstBuffer = new BitmapBuffer;
long i;
// set function for getting pixels
@@ -402,7 +402,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
bool bFastConvert = ImplFastBitmapConversion( *pDstBuffer, rSrcBuffer, rTwoRect );
if( bFastConvert )
return pDstBuffer;
-
+
const long nSrcX = rTwoRect.mnSrcX, nSrcY = rTwoRect.mnSrcY;
const long nSrcDX = rTwoRect.mnSrcWidth, nSrcDY = rTwoRect.mnSrcHeight;
const long nDstDX = rTwoRect.mnDestWidth, nDstDY = rTwoRect.mnDestHeight;
@@ -431,7 +431,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
delete pDstBuffer;
return NULL;
}
-
+
// horizontal mapping table
if( nDstDX != nSrcDX )
{
@@ -488,7 +488,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
// do buffer scaling and conversion
if( rSrcBuffer.mnBitCount <= 8 && pDstBuffer->mnBitCount <= 8 )
{
- ImplPALToPAL( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
+ ImplPALToPAL( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
pSrcScan, pDstScan, pMapX, pMapY );
}
else if( rSrcBuffer.mnBitCount <= 8 && pDstBuffer->mnBitCount > 8 )
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index 0912f2e20125..6ed2079755c6 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +72,11 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
*
* 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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControl( ControlType,
+BOOL SalGraphics::drawNativeControl( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -93,11 +93,11 @@ BOOL SalGraphics::drawNativeControl( ControlType,
* 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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControlText( ControlType,
+BOOL SalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -117,9 +117,9 @@ BOOL SalGraphics::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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
BOOL SalGraphics::getNativeControlRegion( ControlType,
ControlPart,
diff --git a/vcl/source/gdi/svcompat.cxx b/vcl/source/gdi/svcompat.cxx
index 8415d5bbfc39..31f61d92b45b 100644
--- a/vcl/source/gdi/svcompat.cxx
+++ b/vcl/source/gdi/svcompat.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 6a9470abe251..d0f00a932491 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index e3aac410b300..22e3a3211446 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,17 +76,17 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
if ( !mpVirDev )
{
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
- throw ::com::sun::star::uno::RuntimeException(
+ throw ::com::sun::star::uno::RuntimeException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not create system bitmap!" ) ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
//GetpApp()->Exception( EXC_SYSOBJNOTCREATED );
}
- mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() );
- mnOutWidth = nDX;
- mnOutHeight = nDY;
- mbScreenComp = TRUE;
- mnAlphaDepth = -1;
+ mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() );
+ mnOutWidth = nDX;
+ mnOutHeight = nDY;
+ mbScreenComp = TRUE;
+ mnAlphaDepth = -1;
// #i59315# init vdev size from system object, when passed a
// SystemGraphicsData. Otherwise, output size will always
@@ -102,17 +102,17 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
mbScreenComp = ((VirtualDevice*)pOutDev)->mbScreenComp;
- meOutDevType = OUTDEV_VIRDEV;
- mbDevOutput = TRUE;
- mpFontList = pSVData->maGDIData.mpScreenFontList;
- mpFontCache = pSVData->maGDIData.mpScreenFontCache;
- mnDPIX = pOutDev->mnDPIX;
- mnDPIY = pOutDev->mnDPIY;
- maFont = pOutDev->maFont;
+ meOutDevType = OUTDEV_VIRDEV;
+ mbDevOutput = TRUE;
+ mpFontList = pSVData->maGDIData.mpScreenFontList;
+ mpFontCache = pSVData->maGDIData.mpScreenFontCache;
+ mnDPIX = pOutDev->mnDPIX;
+ mnDPIY = pOutDev->mnDPIY;
+ maFont = pOutDev->maFont;
if( maTextColor != pOutDev->maTextColor )
{
- maTextColor = pOutDev->maTextColor;
+ maTextColor = pOutDev->maTextColor;
mbInitTextColor = true;
}
@@ -235,15 +235,15 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
if ( bRet )
{
- mnOutWidth = rNewSize.Width();
+ mnOutWidth = rNewSize.Width();
mnOutHeight = rNewSize.Height();
Erase();
}
}
else
{
- SalVirtualDevice* pNewVirDev;
- ImplSVData* pSVData = ImplGetSVData();
+ SalVirtualDevice* pNewVirDev;
+ ImplSVData* pSVData = ImplGetSVData();
// we need a graphics
if ( !mpGraphics )
@@ -269,12 +269,12 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
nHeight = mnOutHeight;
else
nHeight = nNewHeight;
- aPosAry.mnSrcX = 0;
- aPosAry.mnSrcY = 0;
- aPosAry.mnSrcWidth = nWidth;
+ aPosAry.mnSrcX = 0;
+ aPosAry.mnSrcY = 0;
+ aPosAry.mnSrcWidth = nWidth;
aPosAry.mnSrcHeight = nHeight;
- aPosAry.mnDestX = 0;
- aPosAry.mnDestY = 0;
+ aPosAry.mnDestX = 0;
+ aPosAry.mnDestY = 0;
aPosAry.mnDestWidth = nWidth;
aPosAry.mnDestHeight = nHeight;
@@ -283,7 +283,7 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
ImplReleaseGraphics();
pSVData->mpDefInst->DestroyVirtualDevice( mpVirDev );
mpVirDev = pNewVirDev;
- mnOutWidth = rNewSize.Width();
+ mnOutWidth = rNewSize.Width();
mnOutHeight = rNewSize.Height();
bRet = TRUE;
}
@@ -302,11 +302,11 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
// -----------------------------------------------------------------------
-// #i32109#: Fill opaque areas correctly (without relying on
+// #i32109#: Fill opaque areas correctly (without relying on
// fill/linecolor state)
void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
{
- // Set line and fill color to black (->opaque),
+ // Set line and fill color to black (->opaque),
// fill rect with that (linecolor, too, because of
// those pesky missing pixel problems)
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
@@ -441,7 +441,7 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
void VirtualDevice::Compat_ZeroExtleadBug()
{
- meRefDevMode = (BYTE)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
+ meRefDevMode = (BYTE)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 2feff9a9f5ef..fd9d1a51657a 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +45,12 @@ DBG_NAME( Wallpaper );
ImplWallpaper::ImplWallpaper() :
maColor( COL_TRANSPARENT )
{
- mnRefCount = 1;
- mpBitmap = NULL;
- mpCache = NULL;
- mpGradient = NULL;
- mpRect = NULL;
- meStyle = WALLPAPER_NULL;
+ mnRefCount = 1;
+ mpBitmap = NULL;
+ mpCache = NULL;
+ mpGradient = NULL;
+ mpRect = NULL;
+ meStyle = WALLPAPER_NULL;
}
// -----------------------------------------------------------------------
@@ -111,8 +111,8 @@ void ImplWallpaper::ImplReleaseCachedBitmap()
SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
delete rImplWallpaper.mpRect;
rImplWallpaper.mpRect = NULL;
@@ -166,11 +166,11 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
{
- VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
- BOOL bRect = ( rImplWallpaper.mpRect != NULL );
- BOOL bGrad = ( rImplWallpaper.mpGradient != NULL );
- BOOL bBmp = ( rImplWallpaper.mpBitmap != NULL );
- BOOL bDummy = FALSE;
+ VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
+ BOOL bRect = ( rImplWallpaper.mpRect != NULL );
+ BOOL bGrad = ( rImplWallpaper.mpGradient != NULL );
+ BOOL bBmp = ( rImplWallpaper.mpBitmap != NULL );
+ BOOL bDummy = FALSE;
// version 1
rOStm << rImplWallpaper.maColor << (UINT16) rImplWallpaper.meStyle;
@@ -242,9 +242,9 @@ Wallpaper::Wallpaper( const Color& rColor )
{
DBG_CTOR( Wallpaper, NULL );
- mpImplWallpaper = new ImplWallpaper;
- mpImplWallpaper->maColor = rColor;
- mpImplWallpaper->meStyle = WALLPAPER_TILE;
+ mpImplWallpaper = new ImplWallpaper;
+ mpImplWallpaper->maColor = rColor;
+ mpImplWallpaper->meStyle = WALLPAPER_TILE;
}
// -----------------------------------------------------------------------
@@ -253,9 +253,9 @@ Wallpaper::Wallpaper( const BitmapEx& rBmpEx )
{
DBG_CTOR( Wallpaper, NULL );
- mpImplWallpaper = new ImplWallpaper;
- mpImplWallpaper->mpBitmap = new BitmapEx( rBmpEx );
- mpImplWallpaper->meStyle = WALLPAPER_TILE;
+ mpImplWallpaper = new ImplWallpaper;
+ mpImplWallpaper->mpBitmap = new BitmapEx( rBmpEx );
+ mpImplWallpaper->meStyle = WALLPAPER_TILE;
}
// -----------------------------------------------------------------------
@@ -264,9 +264,9 @@ Wallpaper::Wallpaper( const Gradient& rGradient )
{
DBG_CTOR( Wallpaper, NULL );
- mpImplWallpaper = new ImplWallpaper;
+ mpImplWallpaper = new ImplWallpaper;
mpImplWallpaper->mpGradient = new Gradient( rGradient );
- mpImplWallpaper->meStyle = WALLPAPER_TILE;
+ mpImplWallpaper->meStyle = WALLPAPER_TILE;
}
// -----------------------------------------------------------------------
@@ -301,11 +301,11 @@ void Wallpaper::SetColor( const Color& rColor )
// -----------------------------------------------------------------------
-const Color& Wallpaper::GetColor() const
-{
+const Color& Wallpaper::GetColor() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return mpImplWallpaper->maColor;
+ return mpImplWallpaper->maColor;
}
// -----------------------------------------------------------------------
@@ -326,11 +326,11 @@ void Wallpaper::SetStyle( WallpaperStyle eStyle )
// -----------------------------------------------------------------------
-WallpaperStyle Wallpaper::GetStyle() const
-{
+WallpaperStyle Wallpaper::GetStyle() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return mpImplWallpaper->meStyle;
+ return mpImplWallpaper->meStyle;
}
// -----------------------------------------------------------------------
@@ -392,11 +392,11 @@ BitmapEx Wallpaper::GetBitmap() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsBitmap() const
-{
+BOOL Wallpaper::IsBitmap() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return (mpImplWallpaper->mpBitmap != 0);
+ return (mpImplWallpaper->mpBitmap != 0);
}
@@ -450,11 +450,11 @@ Gradient Wallpaper::GetGradient() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsGradient() const
-{
+BOOL Wallpaper::IsGradient() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return (mpImplWallpaper->mpGradient != 0);
+ return (mpImplWallpaper->mpGradient != 0);
}
@@ -530,11 +530,11 @@ Rectangle Wallpaper::GetRect() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsRect() const
-{
+BOOL Wallpaper::IsRect() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return (mpImplWallpaper->mpRect != 0);
+ return (mpImplWallpaper->mpRect != 0);
}
@@ -600,7 +600,7 @@ BOOL Wallpaper::operator==( const Wallpaper& rWallpaper ) const
return TRUE;
if ( ( mpImplWallpaper->meStyle != rWallpaper.mpImplWallpaper->meStyle ) ||
- ( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) )
+ ( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) )
return FALSE;
if ( mpImplWallpaper->mpRect != rWallpaper.mpImplWallpaper->mpRect
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 972540f6c7b7..543df46e3894 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -238,7 +238,7 @@ bool FtFontFile::Map()
mpFileMap = (const unsigned char*)
mmap( NULL, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 );
if( mpFileMap == MAP_FAILED )
- mpFileMap = NULL;
+ mpFileMap = NULL;
close( nFile );
#elif defined(WNT)
void* pFileDesc = ::CreateFile( pFileName, GENERIC_READ, FILE_SHARE_READ,
@@ -521,7 +521,7 @@ void* FreetypeServerFont::GetFtFace() const
FreetypeManager::~FreetypeManager()
{
-// This crashes on Solaris 10
+// This crashes on Solaris 10
// TODO: check which versions have this problem
//
// FT_Error rcFT = FT_Done_FreeType( aLibFT );
@@ -1295,7 +1295,7 @@ void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
int nLoadFlags = mnLoadFlags;
// if( mbArtItalic )
-// nLoadFlags |= FT_LOAD_NO_BITMAP;
+// nLoadFlags |= FT_LOAD_NO_BITMAP;
FT_Error rc = -1;
#if (FTVERSION <= 2008)
@@ -1437,7 +1437,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
// becomes an expensive nop when a glyph covers no pixels.
FT_BBox cbox;
FT_Glyph_Get_CBox(pGlyphFT, ft_glyph_bbox_unscaled, &cbox);
-
+
if( (cbox.xMax - cbox.xMin) == 0 || (cbox.yMax - cbox.yMin == 0) )
{
nAngle = 0;
@@ -1445,7 +1445,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
FT_Done_Glyph( pGlyphFT );
return true;
}
-
+
if( pGlyphFT->format != FT_GLYPH_FORMAT_BITMAP )
{
if( pGlyphFT->format == FT_GLYPH_FORMAT_OUTLINE )
@@ -1549,7 +1549,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
FT_Int nLoadFlags = mnLoadFlags;
if( mbArtItalic )
- nLoadFlags |= FT_LOAD_NO_BITMAP;
+ nLoadFlags |= FT_LOAD_NO_BITMAP;
#if (FTVERSION <= 2004) && !defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER)
// autohinting in FT<=2.0.4 makes antialiased glyphs look worse
@@ -1723,7 +1723,7 @@ bool FreetypeServerFont::GetFontCodeRanges( CmapResult& rResult ) const
{
rResult.mbSymbolic = mpFontInfo->IsSymbolFont();
- // TODO: is the full CmapResult needed on platforms calling this?
+ // TODO: is the full CmapResult needed on platforms calling this?
if( FT_IS_SFNT( maFaceFT ) )
{
ULONG nLength = 0;
@@ -1742,11 +1742,11 @@ bool FreetypeServerFont::GetFontCodeRanges( CmapResult& rResult ) const
for( sal_uInt32 cCode = FT_Get_First_Char( maFaceFT, &nGlyphIndex );; )
{
if( !nGlyphIndex )
- break;
- aCodes.push_back( cCode ); // first code inside range
+ break;
+ aCodes.push_back( cCode ); // first code inside range
sal_uInt32 cNext = cCode;
do cNext = FT_Get_Next_Char( maFaceFT, cCode, &nGlyphIndex ); while( cNext == ++cCode );
- aCodes.push_back( cCode ); // first code outside range
+ aCodes.push_back( cCode ); // first code outside range
cCode = cNext;
}
@@ -1952,10 +1952,10 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
}
break;
- case 2: // version 0, kerning format 2
+ case 2: // version 0, kerning format 2
{
const FT_Byte* pSubTable = pBuffer;
- /*USHORT nRowWidth =*/ NEXT_U16( pBuffer );
+ /*USHORT nRowWidth =*/ NEXT_U16( pBuffer );
USHORT nOfsLeft = NEXT_U16( pBuffer );
USHORT nOfsRight = NEXT_U16( pBuffer );
USHORT nOfsArray = NEXT_U16( pBuffer );
@@ -2148,7 +2148,7 @@ void PolyArgs::ClosePolygon()
const sal_uInt16 nPolySize(aPoly.GetSize());
if(nPolySize)
{
- if((aPoly.HasFlags() && POLY_CONTROL == aPoly.GetFlags(nPolySize - 1))
+ if((aPoly.HasFlags() && POLY_CONTROL == aPoly.GetFlags(nPolySize - 1))
|| (aPoly.GetPoint(nPolySize - 1) != aPoly.GetPoint(0)))
{
aPoly.SetSize(nPolySize + 1);
diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx
index 95f792fa9647..9dded55f37bb 100644
--- a/vcl/source/glyphs/gcach_ftyp.hxx
+++ b/vcl/source/glyphs/gcach_ftyp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -220,9 +220,9 @@ private:
FT_SizeRec_* maSizeFT;
bool mbFaceOk;
- bool mbArtItalic;
- bool mbArtBold;
- bool mbUseGamma;
+ bool mbArtItalic;
+ bool mbArtBold;
+ bool mbUseGamma;
typedef ::std::hash_map<int,int> GlyphSubstitution;
GlyphSubstitution maGlyphSubstitution;
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index bed698d9c1aa..cda874968d1a 100644
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -336,7 +336,7 @@ void IcuFontFromServerFont::getGlyphAdvance( LEGlyphID nGlyphIndex,
// -----------------------------------------------------------------------
le_bool IcuFontFromServerFont::getGlyphPoint( LEGlyphID,
- le_int32
+ le_int32
#if OSL_DEBUG_LEVEL > 1
pointNumber
#endif
@@ -552,13 +552,13 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
{
// left-to-right case
if( nClusterMinPos > nCharPos )
- nClusterMinPos = nCharPos; // extend cluster
+ nClusterMinPos = nCharPos; // extend cluster
else if( nCharPos <= nClusterMaxPos )
- /*NOTHING*/; // inside cluster
+ /*NOTHING*/; // inside cluster
else if( bDiacritic )
- nClusterMaxPos = nCharPos; // add diacritic to cluster
+ nClusterMaxPos = nCharPos; // add diacritic to cluster
else {
- nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
+ nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
bInCluster = false;
}
}
@@ -566,12 +566,12 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
{
// right-to-left case
if( nClusterMaxPos < nCharPos )
- nClusterMaxPos = nCharPos; // extend cluster
+ nClusterMaxPos = nCharPos; // extend cluster
else if( nCharPos >= nClusterMinPos )
- /*NOTHING*/; // inside cluster
+ /*NOTHING*/; // inside cluster
else if( bDiacritic )
{
- nClusterMinPos = nCharPos; // ICU often has [diacritic* baseglyph*]
+ nClusterMinPos = nCharPos; // ICU often has [diacritic* baseglyph*]
if( bClusterStart ) {
nClusterMaxPos = nCharPos;
bInCluster = false;
@@ -579,7 +579,7 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
}
else
{
- nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
+ nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
bInCluster = !bClusterStart;
}
}
diff --git a/vcl/source/glyphs/gcach_rbmp.cxx b/vcl/source/glyphs/gcach_rbmp.cxx
index f951590b4b45..aad08d09793a 100644
--- a/vcl/source/glyphs/gcach_rbmp.cxx
+++ b/vcl/source/glyphs/gcach_rbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -212,7 +212,7 @@ bool RawBitmap::Rotate( int nAngle )
unsigned char* pBuf = new unsigned char[ nBufSize ];
if( !pBuf )
return false;
-
+
memset( pBuf, 0, nBufSize );
int i;
diff --git a/vcl/source/glyphs/gcach_vdev.cxx b/vcl/source/glyphs/gcach_vdev.cxx
index 7a090de30128..aecde028fc64 100644
--- a/vcl/source/glyphs/gcach_vdev.cxx
+++ b/vcl/source/glyphs/gcach_vdev.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +57,22 @@ void VirtDevServerFont::AnnounceFonts( ImplDevFontList* pToAdd )
ImplFontData& rData = *new ImplFontData;
rData.SetSysData( new FontSysData( (void*)SERVERFONT_MAGIC ) );
- rData.maName = aFontInfo.GetName();
- rData.maStyleName = aFontInfo.GetStyleName();
- rData.mnWidth = aFontInfo.GetWidth();
- rData.mnHeight = aFontInfo.GetHeight();
- rData.meFamily = aFontInfo.GetFamily();
- rData.meCharSet = aFontInfo.GetCharSet();
- rData.mePitch = aFontInfo.GetPitch();
- rData.meWidthType = aFontInfo.GetWidthType();
- rData.meWeight = aFontInfo.GetWeight();
- rData.meItalic = aFontInfo.GetItalic();
- rData.meType = aFontInfo.GetType();
- rData.meFamily = aFontInfo.GetFamily();
-
- rData.mbOrientation = true; // TODO: where to get this info?
- rData.mbDevice = false;
- rData.mnQuality = 0; // prefer client-side fonts if available
+ rData.maName = aFontInfo.GetName();
+ rData.maStyleName = aFontInfo.GetStyleName();
+ rData.mnWidth = aFontInfo.GetWidth();
+ rData.mnHeight = aFontInfo.GetHeight();
+ rData.meFamily = aFontInfo.GetFamily();
+ rData.meCharSet = aFontInfo.GetCharSet();
+ rData.mePitch = aFontInfo.GetPitch();
+ rData.meWidthType = aFontInfo.GetWidthType();
+ rData.meWeight = aFontInfo.GetWeight();
+ rData.meItalic = aFontInfo.GetItalic();
+ rData.meType = aFontInfo.GetType();
+ rData.meFamily = aFontInfo.GetFamily();
+
+ rData.mbOrientation = true; // TODO: where to get this info?
+ rData.mbDevice = false;
+ rData.mnQuality = 0; // prefer client-side fonts if available
pToAdd->Add( &rData );
}
@@ -98,7 +98,7 @@ VirtDevServerFont* VirtDevServerFont::CreateFont( const ImplFontSelectData& rFSD
// -----------------------------------------------------------------------
VirtDevServerFont::VirtDevServerFont( const ImplFontSelectData& rFSD )
-: ServerFont( rFSD)
+: ServerFont( rFSD)
{}
// -----------------------------------------------------------------------
@@ -108,37 +108,37 @@ void VirtDevServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor
const ImplFontSelectData& aFSD = GetFontSelData();
Font aFont;
- aFont.SetName ( aFSD.maName );
- aFont.SetStyleName ( aFSD.maStyleName );
- aFont.SetHeight ( aFSD.mnHeight );
- aFont.SetWidth ( aFSD.mnWidth );
+ aFont.SetName ( aFSD.maName );
+ aFont.SetStyleName ( aFSD.maStyleName );
+ aFont.SetHeight ( aFSD.mnHeight );
+ aFont.SetWidth ( aFSD.mnWidth );
aFont.SetOrientation( aFSD.mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
FontMetric aMetric( vdev.GetFontMetric( aFont ) );
rFactor = 0x100;
- rTo.mnAscent = aMetric.GetAscent();
- rTo.mnDescent = aMetric.GetDescent();
- rTo.mnIntLeading = aMetric.GetIntLeading();
- rTo.mnExtLeading = aMetric.GetExtLeading();
- rTo.mnSlant = aMetric.GetSlant();
- rTo.meType = aMetric.GetType();
- rTo.mnFirstChar = 0x0020; // TODO: where to get this info?
- rTo.mnLastChar = 0xFFFE; // TODO: where to get this info?
-
- rTo.mnWidth = aFSD.mnWidth;
- rTo.maName = aFSD.maName;
- rTo.maStyleName = aFSD.maStyleName;
- rTo.mnOrientation = aFSD.mnOrientation;
- rTo.meFamily = aFSD.meFamily;
- rTo.meCharSet = aFSD.meCharSet;
- rTo.meWeight = aFSD.meWeight;
- rTo.meItalic = aFSD.meItalic;
- rTo.mePitch = aFSD.mePitch;
- rTo.mbDevice = FALSE;
+ rTo.mnAscent = aMetric.GetAscent();
+ rTo.mnDescent = aMetric.GetDescent();
+ rTo.mnIntLeading = aMetric.GetIntLeading();
+ rTo.mnExtLeading = aMetric.GetExtLeading();
+ rTo.mnSlant = aMetric.GetSlant();
+ rTo.meType = aMetric.GetType();
+ rTo.mnFirstChar = 0x0020; // TODO: where to get this info?
+ rTo.mnLastChar = 0xFFFE; // TODO: where to get this info?
+
+ rTo.mnWidth = aFSD.mnWidth;
+ rTo.maName = aFSD.maName;
+ rTo.maStyleName = aFSD.maStyleName;
+ rTo.mnOrientation = aFSD.mnOrientation;
+ rTo.meFamily = aFSD.meFamily;
+ rTo.meCharSet = aFSD.meCharSet;
+ rTo.meWeight = aFSD.meWeight;
+ rTo.meItalic = aFSD.meItalic;
+ rTo.mePitch = aFSD.mePitch;
+ rTo.mbDevice = FALSE;
}
// -----------------------------------------------------------------------
@@ -153,19 +153,19 @@ int VirtDevServerFont::GetGlyphIndex( sal_Unicode aChar ) const
void VirtDevServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
{
Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
+ aFont.SetName ( GetFontSelData().maName );
+ aFont.SetStyleName ( GetFontSelData().maStyleName );
+ aFont.SetHeight ( GetFontSelData().mnHeight );
+ aFont.SetWidth ( GetFontSelData().mnWidth );
aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
// get glyph metrics
sal_Int32 nCharWidth = 10;
-// TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth );
+// TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth );
rGD.SetCharWidth( nCharWidth );
sal_Unicode aChar = nGlyphIndex;
@@ -209,7 +209,7 @@ bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const
// -----------------------------------------------------------------------
-bool VirtDevServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const
+bool VirtDevServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const
{
return false;
}
@@ -226,12 +226,12 @@ int VirtDevServerFont::GetGlyphKernValue( int, int ) const
ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) const
{
Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
+ aFont.SetName ( GetFontSelData().maName );
+ aFont.SetStyleName ( GetFontSelData().maStyleName );
+ aFont.SetHeight ( GetFontSelData().mnHeight );
+ aFont.SetWidth ( GetFontSelData().mnWidth );
aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
@@ -247,9 +247,9 @@ ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) cons
KerningPair* pFrom = pKernPairs;
for ( ULONG n = 0; n < nPairs; n++ )
{
- pTo->mnChar1 = pFrom->nChar1;
- pTo->mnChar2 = pFrom->nChar2;
- pTo->mnKern = pFrom->nKern;
+ pTo->mnChar1 = pFrom->nChar1;
+ pTo->mnChar2 = pFrom->nChar2;
+ pTo->mnKern = pFrom->nKern;
++pFrom;
++pTo;
}
@@ -267,12 +267,12 @@ bool VirtDevServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPoly
return false;
/*
Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
+ aFont.SetName ( GetFontSelData().maName );
+ aFont.SetStyleName ( GetFontSelData().maStyleName );
+ aFont.SetHeight ( GetFontSelData().mnHeight );
+ aFont.SetWidth ( GetFontSelData().mnWidth );
aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
diff --git a/vcl/source/glyphs/gcach_vdev.hxx b/vcl/source/glyphs/gcach_vdev.hxx
index 48d602677c16..fecfff6f3fd1 100644
--- a/vcl/source/glyphs/gcach_vdev.hxx
+++ b/vcl/source/glyphs/gcach_vdev.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +33,23 @@
class VirtDevServerFont : public ServerFont
{
public:
- virtual bool GetAntialiasAdvice( void ) const;
- virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
- virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
- virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const;
+ virtual bool GetAntialiasAdvice( void ) const;
+ virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
+ virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
+ virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const;
protected:
friend class GlyphCache;
- static void AnnounceFonts( ImplDevFontList* );
- static void ClearFontList();
+ static void AnnounceFonts( ImplDevFontList* );
+ static void ClearFontList();
- static VirtDevServerFont* CreateFont( const ImplFontSelectData& );
- virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
- virtual ULONG GetKernPairs( ImplKernPairData** ) const;
+ static VirtDevServerFont* CreateFont( const ImplFontSelectData& );
+ virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
+ virtual ULONG GetKernPairs( ImplKernPairData** ) const;
virtual int GetGlyphKernValue( int, int ) const;
- virtual int GetGlyphIndex( sal_Unicode ) const;
- virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const;
+ virtual int GetGlyphIndex( sal_Unicode ) const;
+ virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const;
private:
VirtDevServerFont( const ImplFontSelectData& );
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx
index 159639ccdd05..a528244eab63 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
#include <vcl/graphite_features.hxx>
#endif
-#include <rtl/ustring.hxx> // used only for string=>hashvalue
+#include <rtl/ustring.hxx> // used only for string=>hashvalue
#include <osl/file.hxx>
#include <tools/debug.hxx>
@@ -223,9 +223,9 @@ ServerFont* GlyphCache::CacheFont( const ImplFontSelectData& rFontSelData )
if( nFontId <= 0 )
return NULL;
- // the FontList's key mpFontData member is reinterpreted as font id
+ // the FontList's key mpFontData member is reinterpreted as font id
ImplFontSelectData aFontSelData = rFontSelData;
- aFontSelData.mpFontData = reinterpret_cast<ImplFontData*>( nFontId );
+ aFontSelData.mpFontData = reinterpret_cast<ImplFontData*>( nFontId );
FontList::iterator it = maFontList.find( aFontSelData );
if( it != maFontList.end() )
{
diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx
index f5272333bf8d..6e3591b9277e 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/glyphs/graphite_cache.cxx b/vcl/source/glyphs/graphite_cache.cxx
index 51c898b1a951..20f354b5b9f3 100644
--- a/vcl/source/glyphs/graphite_cache.cxx
+++ b/vcl/source/glyphs/graphite_cache.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx
index 23325f963b37..7b0ba0afa1ac 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
// Description:
// Parse a string of features specified as & separated pairs.
// e.g.
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index a464dbbd8bf6..0a674a21d492 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
// Description: An implementation of the SalLayout interface that uses the
// Graphite engine.
diff --git a/vcl/source/glyphs/graphite_serverfont.cxx b/vcl/source/glyphs/graphite_serverfont.cxx
index cda2cd434cba..dcf9768f78cc 100644
--- a/vcl/source/glyphs/graphite_serverfont.cxx
+++ b/vcl/source/glyphs/graphite_serverfont.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/glyphs/graphite_textsrc.cxx b/vcl/source/glyphs/graphite_textsrc.cxx
index e8967701a52c..abea305da96e 100644
--- a/vcl/source/glyphs/graphite_textsrc.cxx
+++ b/vcl/source/glyphs/graphite_textsrc.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/glyphs/graphite_textsrc.hxx b/vcl/source/glyphs/graphite_textsrc.hxx
index ca905fc0d824..7c675c6f5b38 100644
--- a/vcl/source/glyphs/graphite_textsrc.hxx
+++ b/vcl/source/glyphs/graphite_textsrc.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#ifndef _SV_GRAPHITETEXTSRC_HXX
#define _SV_GRAPHITETEXTSRC_HXX
// Description: Implements the Graphite interfaces IGrTextSource and
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 32f5ea768066..8cb4bd4ec757 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -467,7 +467,7 @@ uno::Reference< rendering::XBitmap > SAL_CALL VclCanvasBitmap::getScaledBitmap(
}
// XIntegerReadOnlyBitmap
-uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerBitmapLayout& bitmapLayout,
+uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerBitmapLayout& bitmapLayout,
const geometry::IntegerRectangle2D& rect ) throw( lang::IndexOutOfBoundsException,
rendering::VolatileContentDestroyedException,
uno::RuntimeException)
@@ -572,8 +572,8 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
return aRet;
}
-uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::IntegerBitmapLayout& bitmapLayout,
- const geometry::IntegerPoint2D& pos ) throw (lang::IndexOutOfBoundsException,
+uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::IntegerBitmapLayout& bitmapLayout,
+ const geometry::IntegerPoint2D& pos ) throw (lang::IndexOutOfBoundsException,
rendering::VolatileContentDestroyedException,
uno::RuntimeException)
{
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index aa667a3f6492..d57c9f4ec767 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +81,7 @@ namespace vcl
{
namespace unotools
{
- // #i79917# removed helpers bezierSequenceFromPolygon and
+ // #i79917# removed helpers bezierSequenceFromPolygon and
// pointSequenceFromPolygon here
// Also all helpers using tools Polygon and PolyPolygon will get mapped to the
// B2DPolygon helpers for these cases, see comments with the same TaskID below.
@@ -89,8 +89,8 @@ namespace vcl
//---------------------------------------------------------------------------------------
- uno::Reference< rendering::XPolyPolygon2D > xPolyPolygonFromPolygon( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
- const ::Polygon& inputPolygon )
+ uno::Reference< rendering::XPolyPolygon2D > xPolyPolygonFromPolygon( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
+ const ::Polygon& inputPolygon )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xPolyPolygonFromPolygon()" );
@@ -102,7 +102,7 @@ namespace vcl
//---------------------------------------------------------------------------------------
uno::Reference< rendering::XPolyPolygon2D > xPolyPolygonFromPolyPolygon( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
- const ::PolyPolygon& inputPolyPolygon )
+ const ::PolyPolygon& inputPolyPolygon )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xPolyPolygonFromPolyPolygon()" );
@@ -165,8 +165,8 @@ namespace vcl
//---------------------------------------------------------------------------------------
- uno::Reference< rendering::XBitmap > xBitmapFromBitmap( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
- const ::Bitmap& inputBitmap )
+ uno::Reference< rendering::XBitmap > xBitmapFromBitmap( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
+ const ::Bitmap& inputBitmap )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xBitmapFromBitmap()" );
@@ -175,8 +175,8 @@ namespace vcl
//---------------------------------------------------------------------------------------
- uno::Reference< rendering::XBitmap > xBitmapFromBitmapEx( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
- const ::BitmapEx& inputBitmap )
+ uno::Reference< rendering::XBitmap > xBitmapFromBitmapEx( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
+ const ::BitmapEx& inputBitmap )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xBitmapFromBitmapEx()" );
@@ -204,10 +204,10 @@ namespace vcl
namespace
{
- inline bool operator==( const rendering::IntegerBitmapLayout& rLHS,
+ inline bool operator==( const rendering::IntegerBitmapLayout& rLHS,
const rendering::IntegerBitmapLayout& rRHS )
{
- return
+ return
rLHS.ScanLineBytes == rRHS.ScanLineBytes &&
rLHS.ScanLineStride == rRHS.ScanLineStride &&
rLHS.PlaneStride == rRHS.PlaneStride &&
@@ -343,16 +343,16 @@ namespace vcl
OSL_ENSURE(aLayout.ColorSpace.is(),
"Cannot convert image without color space!");
if( !aLayout.ColorSpace.is() )
- return ::BitmapEx();
+ return ::BitmapEx();
nDepth = aLayout.ColorSpace->getBitsPerPixel();
if( xInputBitmap->hasAlpha() )
{
// determine alpha channel depth
- const uno::Sequence<sal_Int8> aTags(
+ const uno::Sequence<sal_Int8> aTags(
aLayout.ColorSpace->getComponentTags() );
- const uno::Sequence<sal_Int32> aDepths(
+ const uno::Sequence<sal_Int32> aDepths(
aLayout.ColorSpace->getComponentBitCounts() );
const sal_Int8* pStart(aTags.getConstArray());
const sal_Size nLen(aTags.getLength());
@@ -385,7 +385,7 @@ namespace vcl
else
nDepth = 8;
- const USHORT nPaletteEntries(
+ const USHORT nPaletteEntries(
sal::static_int_cast<USHORT>(
std::min(sal_Int32(255), nEntryCount)));
@@ -397,7 +397,7 @@ namespace vcl
uno::Sequence<double> aPaletteEntry;
for( USHORT j=0; j<nPaletteEntries; ++j )
{
- if( !xPalette->getIndex(aPaletteEntry,j) &&
+ if( !xPalette->getIndex(aPaletteEntry,j) &&
nAlphaDepth == 0 )
{
nAlphaDepth = 1;
@@ -413,26 +413,26 @@ namespace vcl
}
}
- const ::Size aPixelSize(
+ const ::Size aPixelSize(
sizeFromIntegerSize2D(xInputBitmap->getSize()));
// normalize bitcount
- nDepth =
+ nDepth =
( nDepth <= 1 ) ? 1 :
( nDepth <= 4 ) ? 4 :
- ( nDepth <= 8 ) ? 8 : 24;
+ ( nDepth <= 8 ) ? 8 : 24;
::Bitmap aBitmap( aPixelSize,
sal::static_int_cast<USHORT>(nDepth),
aLayout.Palette.is() ? &aPalette : NULL );
::Bitmap aAlpha;
if( nAlphaDepth )
- aAlpha = ::Bitmap( aPixelSize,
+ aAlpha = ::Bitmap( aPixelSize,
sal::static_int_cast<USHORT>(nAlphaDepth),
&::Bitmap::GetGreyPalette(
sal::static_int_cast<USHORT>(1L << nAlphaDepth)) );
- { // limit scoped access
+ { // limit scoped access
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
aBitmap );
ScopedBitmapWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : NULL,
@@ -447,7 +447,7 @@ namespace vcl
if( !readBmp(nWidth,nHeight,aLayout,xInputBitmap,
pWriteAccess,pAlphaWriteAccess) )
continue;
- } // limit scoped access
+ } // limit scoped access
if( nAlphaDepth )
return ::BitmapEx( aBitmap,
@@ -639,8 +639,8 @@ namespace vcl
{
return uno::Sequence< beans::PropertyValue >();
}
- virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >& deviceColor,
- const uno::Reference< rendering::XColorSpace >& targetColorSpace ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >& deviceColor,
+ const uno::Reference< rendering::XColorSpace >& targetColorSpace ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
// TODO(P3): if we know anything about target
@@ -653,7 +653,7 @@ namespace vcl
{
const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
@@ -670,7 +670,7 @@ namespace vcl
{
const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
@@ -687,7 +687,7 @@ namespace vcl
{
const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
@@ -786,7 +786,7 @@ namespace vcl
return aRet;
}
- Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor )
+ Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor )
{
ENSURE_ARG_OR_THROW( rColor.getLength() == 4,
"color must have 4 channels" );
@@ -802,7 +802,7 @@ namespace vcl
return aColor;
}
- uno::Sequence< double > VCL_DLLPUBLIC colorToDoubleSequence(
+ uno::Sequence< double > VCL_DLLPUBLIC colorToDoubleSequence(
const Color& rColor,
const uno::Reference< rendering::XColorSpace >& xColorSpace )
{
@@ -816,7 +816,7 @@ namespace vcl
return xColorSpace->convertFromARGB(aSeq);
}
- Color VCL_DLLPUBLIC doubleSequenceToColor(
+ Color VCL_DLLPUBLIC doubleSequenceToColor(
const uno::Sequence< double > rColor,
const uno::Reference< rendering::XColorSpace >& xColorSpace )
{
diff --git a/vcl/source/helper/evntpost.cxx b/vcl/source/helper/evntpost.cxx
index a8a68640ec36..b97e6d9e770f 100644
--- a/vcl/source/helper/evntpost.cxx
+++ b/vcl/source/helper/evntpost.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 398b8338884d..d2612a028c9e 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,7 +99,7 @@ void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
DBG_ASSERT( ! pSVData->mbDeInit, "DeleteOnDeinit added after DeiInitVCL !" );
if( pSVData->mbDeInit )
return;
-
+
if( pSVData->mpDeinitDeleteList == NULL )
pSVData->mpDeinitDeleteList = new std::list< DeleteOnDeinitBase* >();
pSVData->mpDeinitDeleteList->push_back( i_pContainer );
@@ -107,7 +107,7 @@ void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
void DeleteOnDeinitBase::ImplDeleteOnDeInit()
{
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
if( pSVData->mpDeinitDeleteList )
{
for( std::list< vcl::DeleteOnDeinitBase* >::iterator it = pSVData->mpDeinitDeleteList->begin();
diff --git a/vcl/source/helper/smartid.cxx b/vcl/source/helper/smartid.cxx
index 41a4cbe814ea..d96539494906 100644
--- a/vcl/source/helper/smartid.cxx
+++ b/vcl/source/helper/smartid.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -227,7 +227,7 @@ BOOL SmartId::Matches( const SmartId &rId ) const
return FALSE;
else if ( HasString() && rId.HasString() )
return Matches( rId.GetStr() );
- else
+ else
return rId.HasNumeric() && Matches( rId.GetNum() );
}
@@ -240,7 +240,7 @@ BOOL SmartId::Equals( const SmartId &rId ) const
&& mpData->bHasNumericId == rId.mpData->bHasNumericId;
else if ( !mpData && !rId.mpData )
return TRUE;
- else
+ else
return FALSE;
}
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 7009468a02ec..bfbf85ebf21e 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -127,12 +127,12 @@ String GetCommandLineToken( int nToken, const String& rLine )
int nLen = rLine.Len();
if( ! nLen )
return String();
-
+
int nActualToken = 0;
sal_Unicode* pBuffer = (sal_Unicode*)alloca( sizeof(sal_Unicode)*( nLen + 1 ) );
const sal_Unicode* pRun = rLine.GetBuffer();
sal_Unicode* pLeap = NULL;
-
+
while( *pRun && nActualToken <= nToken )
{
while( *pRun && isSpace( *pRun ) )
@@ -168,7 +168,7 @@ String GetCommandLineToken( int nToken, const String& rLine )
}
*pLeap = 0;
-
+
String aRet( pBuffer );
return aRet;
}
@@ -178,12 +178,12 @@ ByteString GetCommandLineToken( int nToken, const ByteString& rLine )
int nLen = rLine.Len();
if( ! nLen )
return ByteString();
-
+
int nActualToken = 0;
char* pBuffer = (char*)alloca( nLen + 1 );
const char* pRun = rLine.GetBuffer();
char* pLeap = NULL;
-
+
while( *pRun && nActualToken <= nToken )
{
while( *pRun && isSpace( *pRun ) )
@@ -219,7 +219,7 @@ ByteString GetCommandLineToken( int nToken, const ByteString& rLine )
}
*pLeap = 0;
-
+
ByteString aRet( pBuffer );
return aRet;
}
@@ -228,10 +228,10 @@ int GetCommandLineTokenCount( const String& rLine )
{
if( ! rLine.Len() )
return 0;
-
+
int nTokenCount = 0;
const sal_Unicode *pRun = rLine.GetBuffer();
-
+
while( *pRun )
{
@@ -271,7 +271,7 @@ int GetCommandLineTokenCount( const String& rLine )
}
nTokenCount++;
}
-
+
return nTokenCount;
}
@@ -279,10 +279,10 @@ int GetCommandLineTokenCount( const ByteString& rLine )
{
if( ! rLine.Len() )
return 0;
-
+
int nTokenCount = 0;
const char *pRun = rLine.GetBuffer();
-
+
while( *pRun )
{
@@ -322,7 +322,7 @@ int GetCommandLineTokenCount( const ByteString& rLine )
}
nTokenCount++;
}
-
+
return nTokenCount;
}
@@ -331,7 +331,7 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect )
int nLen = rLine.Len();
if( ! nLen )
return String();
-
+
sal_Unicode *pBuffer = (sal_Unicode*)alloca( sizeof(sal_Unicode)*(nLen + 1) );
const sal_Unicode *pRun = rLine.GetBuffer();
sal_Unicode *pLeap = pBuffer;
@@ -380,7 +380,7 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect )
*pLeap = 0;
String aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer );
- return aRet;
+ return aRet;
}
ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
@@ -388,7 +388,7 @@ ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
int nLen = rLine.Len();
if( ! nLen )
return ByteString();
-
+
char *pBuffer = (char*)alloca( nLen + 1 );
const char *pRun = rLine.GetBuffer();
char *pLeap = pBuffer;
@@ -437,7 +437,7 @@ ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
*pLeap = 0;
ByteString aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer );
- return aRet;
+ return aRet;
}
} // namespace
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 85ccffd34b6c..e929009ed18c 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index 972441cef060..976af9f0420c 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ Any SAL_CALL DisplayConnection::getIdentifier() throw()
void DisplayConnection::dispatchDowningEvent()
{
SolarMutexReleaser aRel;
-
+
MutexGuard aGuard( m_aMutex );
Any aEvent;
std::list< Reference< XEventHandler > > aLocalList( m_aHandlers );
diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx
index 66dec1e9afc1..138aa7987434 100644
--- a/vcl/source/salmain/salmain.cxx
+++ b/vcl/source/salmain/salmain.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/src/btntext.src b/vcl/source/src/btntext.src
index 6d2360dae6cb..99579f00b107 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +103,13 @@ SV_BUTTONHELPTEXT_MORE
};
Finnische-Texte:
-OK OK
-CANCEL Peruuta
-HELP ~Ohje
-MORE ~Enemmän
-YES ~Kyllä
-NO ~Ei
-RETRY ~Yritäuudelleen
+OK OK
+CANCEL Peruuta
+HELP ~Ohje
+MORE ~Enemmän
+YES ~Kyllä
+NO ~Ei
+RETRY ~Yritäuudelleen
*/
diff --git a/vcl/source/src/helptext.src b/vcl/source/src/helptext.src
index a42a9531d9ee..327266c13b50 100644
--- a/vcl/source/src/helptext.src
+++ b/vcl/source/src/helptext.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/src/images.src b/vcl/source/src/images.src
index fdb1e755c86a..20ba1cbd3dd0 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/src/menu.src b/vcl/source/src/menu.src
index 1833093adfac..f4e59c1c8030 100644
--- a/vcl/source/src/menu.src
+++ b/vcl/source/src/menu.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,46 +36,46 @@ String SV_RESID_STRING_NOSELECTIONPOSSIBLE
Menu SV_RESID_MENU_EDIT
{
- ItemList =
+ ItemList =
{
MenuItem
{
- Identifier = SV_MENU_EDIT_UNDO ;
+ Identifier = SV_MENU_EDIT_UNDO ;
Text [ en-US ] = "~Undo" ;
};
- MenuItem { Separator = TRUE ; };
+ MenuItem { Separator = TRUE ; };
MenuItem
{
- Identifier = SV_MENU_EDIT_CUT ;
+ Identifier = SV_MENU_EDIT_CUT ;
Text [ en-US ] = "Cu~t" ;
};
MenuItem
{
- Identifier = SV_MENU_EDIT_COPY ;
+ Identifier = SV_MENU_EDIT_COPY ;
Text [ en-US ] = "~Copy" ;
};
MenuItem
{
- Identifier = SV_MENU_EDIT_PASTE ;
+ Identifier = SV_MENU_EDIT_PASTE ;
Text [ en-US ] = "~Paste" ;
};
MenuItem
{
- Identifier = SV_MENU_EDIT_DELETE ;
+ Identifier = SV_MENU_EDIT_DELETE ;
Text [ en-US ] = "~Delete" ;
};
- MenuItem { Separator = TRUE ; };
+ MenuItem { Separator = TRUE ; };
MenuItem
{
- Identifier = SV_MENU_EDIT_SELECTALL ;
+ Identifier = SV_MENU_EDIT_SELECTALL ;
Text [ en-US ] = "Select ~All" ;
};
- MenuItem { Separator = TRUE ; };
+ MenuItem { Separator = TRUE ; };
MenuItem
{
Identifier = SV_MENU_EDIT_INSERTSYMBOL;
Text [ en-US ] = "~Special Character...";
-
+
};
};
};
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 58f0a477c848..34519022560b 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +35,9 @@ ModalDialog SV_DLG_PRINT
Moveable = TRUE;
Maxable = TRUE;
SVLook = TRUE;
-
+
Size = MAP_APPFONT( 350, 215 );
-
+
OKButton SV_PRINT_OK
{
DefButton = TRUE;
@@ -55,7 +55,7 @@ ModalDialog SV_DLG_PRINT
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 50, 15 );
};
-
+
Window SV_PRINT_PAGE_PREVIEW
{
Pos = MAP_APPFONT( 5, 5 );
@@ -114,7 +114,7 @@ ModalDialog SV_DLG_PRINT
{
Text [en-US] = "Default printer";
};
-
+
String SV_PRINT_PRINTPREVIEW_TXT
{
@@ -125,7 +125,7 @@ ModalDialog SV_DLG_PRINT
{
Text [en-US] = "Page Layout";
Hide = TRUE;
-
+
FixedLine SV_PRINT_PRT_NUP_LAYOUT_FL
{
Pos = MAP_APPFONT( 5, 5 );
@@ -300,12 +300,12 @@ ModalDialog SV_DLG_PRINT
HelpText [en-US] = "Check to draw a border around each page.";
};
};
-
+
TabPage SV_PRINT_TAB_JOB
{
Text [en-US] = "General";
Hide = TRUE;
-
+
FixedLine SV_PRINT_PRINTERS_FL
{
Pos = MAP_APPFONT( 5, 5 );
@@ -387,22 +387,22 @@ ModalDialog SV_DLG_PRINT
Text [en-US] = "Collate";
HelpText [en-US] = "Select whether copies should be collated or not.";
};
-
+
Image SV_PRINT_COLLATE_IMG
{
ImageBitmap = Bitmap { File = "collate.png" ; };
};
-
+
Image SV_PRINT_NOCOLLATE_IMG
{
ImageBitmap = Bitmap { File = "ncollate.png" ; };
};
-
+
Image SV_PRINT_COLLATE_HC_IMG
{
ImageBitmap = Bitmap { File = "collate_h.png" ; };
};
-
+
Image SV_PRINT_NOCOLLATE_HC_IMG
{
ImageBitmap = Bitmap { File = "ncollate_h.png" ; };
@@ -440,7 +440,7 @@ ModalDialog SV_DLG_PRINT
Size = MAP_APPFONT( 200, 12 );
Text [en-US] = "Print in ~reverse page order";
HelpText [en-US] = "Check to print pages in reverse order.";
- };
+ };
};
};
@@ -451,9 +451,9 @@ ModelessDialog SV_DLG_PRINT_PROGRESS
Sizeable = FALSE;
Moveable = TRUE;
SVLook = TRUE;
-
+
Size = MAP_APPFONT( 120, 70 );
-
+
CancelButton SV_PRINT_PROGRESS_CANCEL
{
Pos = MAP_APPFONT( 35, 50 );
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 2c6574220a5f..90787a620e14 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/src/units.src b/vcl/source/src/units.src
index 0a680fcb1913..aff92ad105b5 100644
--- a/vcl/source/src/units.src
+++ b/vcl/source/src/units.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 641686756b74..e334cc37ac48 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 9c310a914c2d..96f9f2023171 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +43,15 @@
DECLARE_TABLE( ImplAccelTable, ImplAccelEntry* )
DECLARE_LIST( ImplAccelList, ImplAccelEntry* )
-#define ACCELENTRY_NOTFOUND ((USHORT)0xFFFF)
+#define ACCELENTRY_NOTFOUND ((USHORT)0xFFFF)
// =======================================================================
class ImplAccelData
{
public:
- ImplAccelTable maKeyTable; // Fuer KeyCodes, die mit einem Code erzeugt wurden
- ImplAccelList maIdList; // Id-List
+ ImplAccelTable maKeyTable; // Fuer KeyCodes, die mit einem Code erzeugt wurden
+ ImplAccelList maIdList; // Id-List
};
// =======================================================================
@@ -63,11 +63,11 @@ DBG_NAME( Accelerator )
USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
USHORT* pIndex = NULL )
{
- ULONG nLow;
- ULONG nHigh;
- ULONG nMid;
- ULONG nCount = pList->Count();
- USHORT nCompareId;
+ ULONG nLow;
+ ULONG nHigh;
+ ULONG nMid;
+ ULONG nCount = pList->Count();
+ USHORT nCompareId;
// Abpruefen, ob der erste Key groesser als der Vergleichskey ist
if ( !nCount || (nId < pList->GetObject( 0 )->mnId) )
@@ -111,8 +111,8 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
{
- USHORT nInsIndex;
- USHORT nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex );
+ USHORT nInsIndex;
+ USHORT nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
@@ -156,10 +156,10 @@ static USHORT ImplAccelEntryGetFirstPos( ImplAccelList* pList, USHORT nId )
void Accelerator::ImplInit()
{
- mnCurId = 0;
- mnCurRepeat = 0;
- mbIsCancel = FALSE;
- mpDel = NULL;
+ mnCurId = 0;
+ mnCurRepeat = 0;
+ mbIsCancel = FALSE;
+ mpDel = NULL;
}
// -----------------------------------------------------------------------
@@ -245,12 +245,12 @@ void Accelerator::ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode,
}
// Neuen Eintrag holen und fuellen
- ImplAccelEntry* pEntry = new ImplAccelEntry;
- pEntry->mnId = nItemId;
- pEntry->maKeyCode = rKeyCode;
- pEntry->mpAccel = pAutoAccel;
- pEntry->mpAutoAccel = pAutoAccel;
- pEntry->mbEnabled = bEnable;
+ ImplAccelEntry* pEntry = new ImplAccelEntry;
+ pEntry->mnId = nItemId;
+ pEntry->maKeyCode = rKeyCode;
+ pEntry->mpAccel = pAutoAccel;
+ pEntry->mpAutoAccel = pAutoAccel;
+ pEntry->mbEnabled = bEnable;
// Ab in die Tabellen
ULONG nCode = rKeyCode.GetFullKeyCode();
@@ -369,16 +369,16 @@ void Accelerator::InsertItem( const ResId& rResId )
{
DBG_CHKTHIS( Accelerator, NULL );
- ULONG nObjMask;
- USHORT nAccelKeyId;
- USHORT bDisable;
- KeyCode aKeyCode;
- Accelerator* pAutoAccel = NULL;
+ ULONG nObjMask;
+ USHORT nAccelKeyId;
+ USHORT bDisable;
+ KeyCode aKeyCode;
+ Accelerator* pAutoAccel = NULL;
GetRes( rResId.SetRT( RSC_ACCELITEM ) );
- nObjMask = ReadLongRes();
- nAccelKeyId = sal::static_int_cast<USHORT>(ReadLongRes());
- bDisable = ReadShortRes();
+ nObjMask = ReadLongRes();
+ nAccelKeyId = sal::static_int_cast<USHORT>(ReadLongRes());
+ bDisable = ReadShortRes();
if ( nObjMask & ACCELITEM_KEY )
{
@@ -565,16 +565,16 @@ BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat )
if ( pEntry->mbEnabled )
{
BOOL bDel = FALSE;
- mnCurId = pEntry->mnId;
- maCurKeyCode = rKeyCode;
- mnCurRepeat = nRepeat;
- mpDel = &bDel;
+ mnCurId = pEntry->mnId;
+ maCurKeyCode = rKeyCode;
+ mnCurRepeat = nRepeat;
+ mpDel = &bDel;
Select();
if ( !bDel )
{
- mnCurId = 0;
- maCurKeyCode = KeyCode();
- mnCurRepeat = 0;
+ mnCurId = 0;
+ maCurKeyCode = KeyCode();
+ mnCurRepeat = 0;
}
return TRUE;
@@ -712,11 +712,11 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel )
DBG_CHKOBJ( &rAccel, Accelerator, NULL );
// Neue Daten zuweisen
- maHelpStr = rAccel.maHelpStr;
- maCurKeyCode = KeyCode();
- mnCurId = 0;
- mnCurRepeat = 0;
- mbIsCancel = FALSE;
+ maHelpStr = rAccel.maHelpStr;
+ maCurKeyCode = KeyCode();
+ mnCurId = 0;
+ mnCurRepeat = 0;
+ mbIsCancel = FALSE;
// Tabellen loeschen und kopieren
ImplDeleteData();
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index b9baf849f211..09838342dacf 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel )
//e.g. #i90599#. Someone starts typing a sequence in a dialog, but doesn't
//end it, and then closes the dialog, deleting the accelerators. So if
//we're removing an accelerator that a sub-accelerator which is in the
- //sequence list, throw away the entire sequence
+ //sequence list, throw away the entire sequence
if ( mpSequenceList )
{
for (USHORT i = 0; i < pAccel->GetItemCount(); ++i)
diff --git a/vcl/source/window/arrange.cxx b/vcl/source/window/arrange.cxx
index 88e9af2b9f1c..28658806bc3a 100644
--- a/vcl/source/window/arrange.cxx
+++ b/vcl/source/window/arrange.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ void WindowArranger::setParent( WindowArranger* i_pParent )
void WindowArranger::setParentWindow( Window* i_pNewParent )
{
m_pParentWindow = i_pNewParent;
-
+
size_t nEle = countElements();
for( size_t i = 0; i < nEle; i++ )
{
@@ -168,7 +168,7 @@ Size WindowArranger::Element::getOptimalSize( WindowSizeType i_eType ) const
aResult.Width() += m_nLeftBorder + m_nRightBorder;
aResult.Height() += m_nTopBorder + m_nBottomBorder;
}
-
+
return aResult;
}
@@ -237,7 +237,7 @@ Size RowOrColumn::getOptimalSize( WindowSizeType i_eType ) const
aRet.Height() -= m_nBorderWidth;
else
aRet.Width() -= m_nBorderWidth;
-
+
// add the outer border
aRet.Width() += 2*m_nOuterBorder;
aRet.Height() += 2*m_nOuterBorder;
@@ -268,7 +268,7 @@ void RowOrColumn::distributeRowWidth( std::vector<Size>& io_rSizes, long /*i_nUs
aIndices.push_back( i );
}
}
-
+
// distribute extra space evenly among collected elements
nElements = aIndices.size();
if( nElements > 0 )
@@ -308,7 +308,7 @@ void RowOrColumn::distributeColumnHeight( std::vector<Size>& io_rSizes, long /*i
aIndices.push_back( i );
}
}
-
+
// distribute extra space evenly among collected elements
nElements = aIndices.size();
if( nElements > 0 )
@@ -498,7 +498,7 @@ void LabeledElement::resize()
Size aElementSize( m_aElement.getOptimalSize( WINDOWSIZE_PREFERRED ) );
if( m_nDistance + aLabelSize.Width() + aElementSize.Width() > m_aManagedArea.GetWidth() )
aElementSize = m_aElement.getOptimalSize( WINDOWSIZE_MINIMUM );
-
+
// align label and element vertically in LabeledElement
long nYOff = (m_aManagedArea.GetHeight() - 2*m_nOuterBorder - aLabelSize.Height()) / 2;
Point aPos( m_aManagedArea.Left(),
@@ -507,13 +507,13 @@ void LabeledElement::resize()
if( m_nLabelColumnWidth != 0 )
aSize.Width() = m_nLabelColumnWidth;
m_aLabel.setPosSize( aPos, aSize );
-
+
aPos.X() += aSize.Width() + m_nDistance;
nYOff = (m_aManagedArea.GetHeight() - 2*m_nOuterBorder - aElementSize.Height()) / 2;
aPos.Y() = m_aManagedArea.Top() + m_nOuterBorder + nYOff;
aSize.Width() = aElementSize.Width();
aSize.Height() = m_aManagedArea.GetHeight() - 2*m_nOuterBorder;
-
+
// label style
// 0: position left and right
// 1: keep the element close to label and grow it
@@ -592,7 +592,7 @@ Size LabelColumn::getOptimalSize( WindowSizeType i_eType ) const
{
long nWidth = getLabelWidth();
Size aColumnSize;
-
+
// every child is a LabeledElement
size_t nEle = countElements();
for( size_t i = 0; i < nEle; i++ )
@@ -629,7 +629,7 @@ Size LabelColumn::getOptimalSize( WindowSizeType i_eType ) const
}
if( aElementSize.Height() )
{
- aColumnSize.Height() += getBorderWidth() + aElementSize.Height();
+ aColumnSize.Height() += getBorderWidth() + aElementSize.Height();
}
}
if( nEle > 0 && aColumnSize.Height() )
@@ -732,7 +732,7 @@ MatrixArranger::~MatrixArranger()
Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights ) const
{
Size aMatrixSize( 2*m_nOuterBorder, 2*m_nOuterBorder );
-
+
// first find out the current number of rows and columns
sal_uInt32 nRows = 0, nColumns = 0;
for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
@@ -743,11 +743,11 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
if( it->m_nY >= nRows )
nRows = it->m_nY+1;
}
-
+
// now allocate row and column depth vectors
o_rColumnWidths = std::vector< long >( nColumns, 0 );
o_rRowHeights = std::vector< long >( nRows, 0 );
-
+
// get sizes an allocate them into rows/columns
for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
it != m_aElements.end(); ++it )
@@ -758,18 +758,18 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
if( aSize.Height() > o_rRowHeights[ it->m_nY ] )
o_rRowHeights[ it->m_nY ] = aSize.Height();
}
-
+
// add up sizes
for( sal_uInt32 i = 0; i < nColumns; i++ )
aMatrixSize.Width() += o_rColumnWidths[i] + m_nBorderX;
if( nColumns > 0 )
aMatrixSize.Width() -= m_nBorderX;
-
+
for( sal_uInt32 i = 0; i < nRows; i++ )
aMatrixSize.Height() += o_rRowHeights[i] + m_nBorderY;
if( nRows > 0 )
aMatrixSize.Height() -= m_nBorderY;
-
+
return aMatrixSize;
}
@@ -784,7 +784,7 @@ void MatrixArranger::resize()
// assure that we have at least one row and column
if( m_aElements.empty() )
return;
-
+
// check if we can get optimal size, else fallback to minimal size
std::vector<long> aColumnWidths, aRowHeights;
Size aOptSize( getOptimalSize( WINDOWSIZE_PREFERRED, aColumnWidths, aRowHeights ) );
@@ -798,20 +798,20 @@ void MatrixArranger::resize()
if( aOptSize.Width() > m_aManagedArea.GetWidth() )
aColumnWidths = aMinColumnWidths;
}
-
+
// FIXME: distribute extra space available
-
+
// prepare offsets
std::vector<long> aColumnX( aColumnWidths.size() );
aColumnX[0] = m_aManagedArea.Left() + m_nOuterBorder;
for( size_t i = 1; i < aColumnX.size(); i++ )
aColumnX[i] = aColumnX[i-1] + aColumnWidths[i-1] + m_nBorderX;
-
+
std::vector<long> aRowY( aRowHeights.size() );
aRowY[0] = m_aManagedArea.Top() + m_nOuterBorder;
for( size_t i = 1; i < aRowY.size(); i++ )
aRowY[i] = aRowY[i-1] + aRowHeights[i-1] + m_nBorderY;
-
+
// now iterate over the elements and assign their positions
for( std::vector< MatrixElement >::iterator it = m_aElements.begin();
it != m_aElements.end(); ++it )
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index ebb63f07b11b..1e3c99b3bce2 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +103,10 @@ void Window::ImplCalcSymbolRect( Rectangle& rRect )
// Zwischen dem Symbol und dem Button-Rand lassen wir 5% Platz
long nExtraWidth = ((rRect.GetWidth()*50)+500)/1000;
long nExtraHeight = ((rRect.GetHeight()*50)+500)/1000;
- rRect.Left() += nExtraWidth;
- rRect.Right() -= nExtraWidth;
- rRect.Top() += nExtraHeight;
- rRect.Bottom() -= nExtraHeight;
+ rRect.Left() += nExtraWidth;
+ rRect.Right() -= nExtraWidth;
+ rRect.Top() += nExtraHeight;
+ rRect.Bottom() -= nExtraHeight;
}
// -----------------------------------------------------------------------
@@ -115,8 +115,8 @@ static void ImplDrawBrdWinSymbol( OutputDevice* pDev,
const Rectangle& rRect, SymbolType eSymbol )
{
// Zwischen dem Symbol und dem Button lassen wir 5% Platz
- DecorationView aDecoView( pDev );
- Rectangle aTempRect = rRect;
+ DecorationView aDecoView( pDev );
+ Rectangle aTempRect = rRect;
Window::ImplCalcSymbolRect( aTempRect );
aDecoView.DrawSymbol( aTempRect, eSymbol,
pDev->GetSettings().GetStyleSettings().GetButtonTextColor(), 0 );
@@ -213,7 +213,7 @@ void ImplBorderWindowView::ImplInitTitle( ImplBorderFrameData* pData )
if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) ||
(pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
{
- pData->mnTitleType = BORDERWINDOW_TITLE_NONE;
+ pData->mnTitleType = BORDERWINDOW_TITLE_NONE;
pData->mnTitleHeight = 0;
}
else
@@ -425,10 +425,10 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
{
if ( bTracking )
{
- Point aPos = pBorderWindow->GetPosPixel();
- Size aSize = pBorderWindow->GetOutputSizePixel();
- pData->mnTrackX = aPos.X();
- pData->mnTrackY = aPos.Y();
+ Point aPos = pBorderWindow->GetPosPixel();
+ Size aSize = pBorderWindow->GetOutputSizePixel();
+ pData->mnTrackX = aPos.X();
+ pData->mnTrackY = aPos.Y();
pData->mnTrackWidth = aSize.Width();
pData->mnTrackHeight = aSize.Height();
@@ -781,8 +781,8 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
{
/*
// adjusting mousepos not required, we allow the whole screen (no desktop anymore...)
- Point aFrameMousePos = pBorderWindow->ImplOutputToFrame( aMousePos );
- Size aFrameSize = pBorderWindow->ImplGetFrameWindow()->GetOutputSizePixel();
+ Point aFrameMousePos = pBorderWindow->ImplOutputToFrame( aMousePos );
+ Size aFrameSize = pBorderWindow->ImplGetFrameWindow()->GetOutputSizePixel();
if ( aFrameMousePos.X() < 0 )
aFrameMousePos.X() = 0;
if ( aFrameMousePos.Y() < 0 )
@@ -794,8 +794,8 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
aMousePos = pBorderWindow->ImplFrameToOutput( aFrameMousePos );
*/
- aMousePos.X() -= pData->maMouseOff.X();
- aMousePos.Y() -= pData->maMouseOff.Y();
+ aMousePos.X() -= pData->maMouseOff.X();
+ aMousePos.Y() -= pData->maMouseOff.Y();
if ( pData->mnHitTest & BORDERWINDOW_HITTEST_TITLE )
{
@@ -819,18 +819,18 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
}
else
{
- Point aOldPos = pBorderWindow->GetPosPixel();
- Size aSize = pBorderWindow->GetSizePixel();
- Rectangle aNewRect( aOldPos, aSize );
- long nOldWidth = aSize.Width();
- long nOldHeight = aSize.Height();
- long nBorderWidth = pData->mnLeftBorder+pData->mnRightBorder;
- long nBorderHeight = pData->mnTopBorder+pData->mnBottomBorder;
- long nMinWidth = pBorderWindow->mnMinWidth+nBorderWidth;
- long nMinHeight = pBorderWindow->mnMinHeight+nBorderHeight;
- long nMinWidth2 = nBorderWidth;
- long nMaxWidth = pBorderWindow->mnMaxWidth+nBorderWidth;
- long nMaxHeight = pBorderWindow->mnMaxHeight+nBorderHeight;
+ Point aOldPos = pBorderWindow->GetPosPixel();
+ Size aSize = pBorderWindow->GetSizePixel();
+ Rectangle aNewRect( aOldPos, aSize );
+ long nOldWidth = aSize.Width();
+ long nOldHeight = aSize.Height();
+ long nBorderWidth = pData->mnLeftBorder+pData->mnRightBorder;
+ long nBorderHeight = pData->mnTopBorder+pData->mnBottomBorder;
+ long nMinWidth = pBorderWindow->mnMinWidth+nBorderWidth;
+ long nMinHeight = pBorderWindow->mnMinHeight+nBorderHeight;
+ long nMinWidth2 = nBorderWidth;
+ long nMaxWidth = pBorderWindow->mnMaxWidth+nBorderWidth;
+ long nMaxHeight = pBorderWindow->mnMaxHeight+nBorderHeight;
if ( pData->mnTitleHeight )
{
@@ -879,11 +879,11 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
{
// adjust size for Resizing-call
aSize = aNewRect.GetSize();
- aSize.Width() -= nBorderWidth;
- aSize.Height() -= nBorderHeight;
+ aSize.Width() -= nBorderWidth;
+ aSize.Height() -= nBorderHeight;
((SystemWindow*)pBorderWindow->ImplGetClientWindow())->Resizing( aSize );
- aSize.Width() += nBorderWidth;
- aSize.Height() += nBorderHeight;
+ aSize.Width() += nBorderWidth;
+ aSize.Height() += nBorderHeight;
if ( aSize.Width() < nMinWidth )
aSize.Width() = nMinWidth;
if ( aSize.Height() < nMinHeight )
@@ -921,8 +921,8 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
}
else
{
- pData->mnTrackX = aNewRect.Left();
- pData->mnTrackY = aNewRect.Top();
+ pData->mnTrackX = aNewRect.Left();
+ pData->mnTrackY = aNewRect.Top();
pData->mnTrackWidth = aNewRect.GetWidth();
pData->mnTrackHeight = aNewRect.GetHeight();
pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), SHOWTRACK_BIG );
@@ -947,8 +947,8 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
{
if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE )
{
- nHelpId = SV_HELPTEXT_CLOSE;
- rHelpRect = pData->maCloseRect;
+ nHelpId = SV_HELPTEXT_CLOSE;
+ rHelpRect = pData->maCloseRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_ROLL )
{
@@ -956,33 +956,33 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
nHelpId = SV_HELPTEXT_ROLLDOWN;
else
nHelpId = SV_HELPTEXT_ROLLUP;
- rHelpRect = pData->maRollRect;
+ rHelpRect = pData->maRollRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_DOCK )
{
- nHelpId = SV_HELPTEXT_MAXIMIZE;
- rHelpRect = pData->maDockRect;
+ nHelpId = SV_HELPTEXT_MAXIMIZE;
+ rHelpRect = pData->maDockRect;
}
/* no help string available
else if ( nHitTest & BORDERWINDOW_HITTEST_MENU )
{
- nHelpId = SV_HELPTEXT_MENU;
- rHelpRect = pData->maMenuRect;
+ nHelpId = SV_HELPTEXT_MENU;
+ rHelpRect = pData->maMenuRect;
}*/
else if ( nHitTest & BORDERWINDOW_HITTEST_HIDE )
{
- nHelpId = SV_HELPTEXT_MINIMIZE;
- rHelpRect = pData->maHideRect;
+ nHelpId = SV_HELPTEXT_MINIMIZE;
+ rHelpRect = pData->maHideRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_HELP )
{
- nHelpId = SV_HELPTEXT_HELP;
- rHelpRect = pData->maHelpRect;
+ nHelpId = SV_HELPTEXT_HELP;
+ rHelpRect = pData->maHelpRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_PIN )
{
- nHelpId = SV_HELPTEXT_ALWAYSVISIBLE;
- rHelpRect = pData->maPinRect;
+ nHelpId = SV_HELPTEXT_ALWAYSVISIBLE;
+ rHelpRect = pData->maPinRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_TITLE )
{
@@ -991,7 +991,7 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
// tooltip only if title truncated
if( pData->mbTitleClipped )
{
- rHelpRect = pData->maTitleRect;
+ rHelpRect = pData->maTitleRect;
// no help id, use window title as help string
aHelpStr = pData->mpBorderWindow->GetText();
}
@@ -1047,10 +1047,10 @@ void ImplNoBorderWindowView::Init( OutputDevice*, long, long )
void ImplNoBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- rLeftBorder = 0;
- rTopBorder = 0;
- rRightBorder = 0;
- rBottomBorder = 0;
+ rLeftBorder = 0;
+ rTopBorder = 0;
+ rRightBorder = 0;
+ rBottomBorder = 0;
}
// -----------------------------------------------------------------------
@@ -1083,18 +1083,18 @@ ImplSmallBorderWindowView::ImplSmallBorderWindowView( ImplBorderWindow* pBorderW
void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeight )
{
- mpOutDev = pDev;
- mnWidth = nWidth;
- mnHeight = nHeight;
+ mpOutDev = pDev;
+ mnWidth = nWidth;
+ mnHeight = nHeight;
mbNWFBorder = false;
USHORT nBorderStyle = mpBorderWindow->GetBorderStyle();
if ( nBorderStyle & WINDOW_BORDER_NOBORDER )
{
- mnLeftBorder = 0;
- mnTopBorder = 0;
- mnRightBorder = 0;
- mnBottomBorder = 0;
+ mnLeftBorder = 0;
+ mnTopBorder = 0;
+ mnRightBorder = 0;
+ mnBottomBorder = 0;
}
else
{
@@ -1107,7 +1107,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
Window *pWin = NULL, *pCtrl = NULL;
if( mpOutDev->GetOutDevType() == OUTDEV_WINDOW )
pWin = (Window*) mpOutDev;
-
+
ControlType aCtrlType = 0;
if( pWin && (pCtrl = mpBorderWindow->GetWindow( WINDOW_CLIENT )) != NULL )
{
@@ -1163,18 +1163,18 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mnBottomBorder = aBounds.Bottom() - aContent.Bottom();
if( mnWidth && mnHeight )
{
-
+
mpBorderWindow->SetPaintTransparent( TRUE );
mpBorderWindow->SetBackground();
pCtrl->SetPaintTransparent( TRUE );
-
+
Window* pCompoundParent = NULL;
if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() )
pCompoundParent = pWin->GetParent();
-
+
if( pCompoundParent )
pCompoundParent->SetPaintTransparent( TRUE );
-
+
if( mnWidth < aBounds.GetWidth() || mnHeight < aBounds.GetHeight() )
{
if( ! pCompoundParent ) // compound controls have to fix themselves
@@ -1193,7 +1193,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mbNWFBorder = false;
}
}
-
+
if( ! mbNWFBorder )
{
USHORT nStyle = FRAME_DRAW_NODRAW;
@@ -1205,14 +1205,14 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
nStyle |= FRAME_DRAW_DOUBLEIN;
if ( nBorderStyle & WINDOW_BORDER_MONO )
nStyle |= FRAME_DRAW_MONO;
-
- DecorationView aDecoView( mpOutDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle );
- mnLeftBorder = aCalcRect.Left();
- mnTopBorder = aCalcRect.Top();
- mnRightBorder = aRect.Right()-aCalcRect.Right();
- mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
+
+ DecorationView aDecoView( mpOutDev );
+ Rectangle aRect( 0, 0, 10, 10 );
+ Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle );
+ mnLeftBorder = aCalcRect.Left();
+ mnTopBorder = aCalcRect.Top();
+ mnRightBorder = aRect.Right()-aCalcRect.Right();
+ mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
}
}
}
@@ -1222,10 +1222,10 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
void ImplSmallBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- rLeftBorder = mnLeftBorder;
- rTopBorder = mnTopBorder;
- rRightBorder = mnRightBorder;
- rBottomBorder = mnBottomBorder;
+ rLeftBorder = mnLeftBorder;
+ rTopBorder = mnTopBorder;
+ rRightBorder = mnRightBorder;
+ rBottomBorder = mnBottomBorder;
}
// -----------------------------------------------------------------------
@@ -1291,12 +1291,12 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
break;
case WINDOW_COMBOBOX:
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
+ case WINDOW_PATTERNBOX:
+ case WINDOW_NUMERICBOX:
+ case WINDOW_METRICBOX:
case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
+ case WINDOW_DATEBOX:
+ case WINDOW_TIMEBOX:
case WINDOW_LONGCURRENCYBOX:
if( pCtrl->GetStyle() & WB_DROPDOWN )
{
@@ -1314,7 +1314,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
break;
}
}
-
+
if ( aCtrlType && pCtrl->IsNativeControlSupported(aCtrlType, aCtrlPart) )
{
ImplControlValue aControlValue;
@@ -1333,18 +1333,18 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
if( pCtrl->HasFocus() || pCtrl->HasChildPathFocus() )
nState |= CTRL_STATE_FOCUSED;
}
-
+
BOOL bMouseOver = FALSE;
Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD );
while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == FALSE )
pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT );
-
+
if( bMouseOver )
nState |= CTRL_STATE_ROLLOVER;
Point aPoint;
Rectangle aCtrlRegion( aPoint, Size( mnWidth, mnHeight ) );
-
+
Rectangle aBoundingRgn( aPoint, Size( mnWidth, mnHeight ) );
Rectangle aContentRgn( aCtrlRegion );
if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
@@ -1354,7 +1354,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
{
aCtrlRegion=aContentRgn;
}
-
+
bNativeOK = pWin->DrawNativeControl( aCtrlType, aCtrlPart, aCtrlRegion, nState,
aControlValue, rtl::OUString() );
@@ -1398,11 +1398,11 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
nStyle |= FRAME_DRAW_MENU;
// tell DrawFrame that we're drawing a window border of a frame window to avoid round corners
if( pWin && pWin == pWin->ImplGetFrameWindow() )
- nStyle |= FRAME_DRAW_WINDOWBORDER;
+ nStyle |= FRAME_DRAW_WINDOWBORDER;
- DecorationView aDecoView( mpOutDev );
- Point aTmpPoint;
- Rectangle aInRect( aTmpPoint, Size( mnWidth, mnHeight ) );
+ DecorationView aDecoView( mpOutDev );
+ Point aTmpPoint;
+ Rectangle aInRect( aTmpPoint, Size( mnWidth, mnHeight ) );
aDecoView.DrawFrame( aInRect, nStyle );
}
}
@@ -1416,20 +1416,20 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow )
{
- maFrameData.mpBorderWindow = pBorderWindow;
- maFrameData.mbDragFull = FALSE;
- maFrameData.mnHitTest = 0;
- maFrameData.mnPinState = 0;
- maFrameData.mnCloseState = 0;
- maFrameData.mnRollState = 0;
- maFrameData.mnDockState = 0;
- maFrameData.mnMenuState = 0;
- maFrameData.mnHideState = 0;
- maFrameData.mnHelpState = 0;
- maFrameData.mbTitleClipped = 0;
+ maFrameData.mpBorderWindow = pBorderWindow;
+ maFrameData.mbDragFull = FALSE;
+ maFrameData.mnHitTest = 0;
+ maFrameData.mnPinState = 0;
+ maFrameData.mnCloseState = 0;
+ maFrameData.mnRollState = 0;
+ maFrameData.mnDockState = 0;
+ maFrameData.mnMenuState = 0;
+ maFrameData.mnHideState = 0;
+ maFrameData.mnHelpState = 0;
+ maFrameData.mbTitleClipped = 0;
- mpATitleVirDev = NULL;
- mpDTitleVirDev = NULL;
+ mpATitleVirDev = NULL;
+ mpDTitleVirDev = NULL;
}
// -----------------------------------------------------------------------
@@ -1481,19 +1481,19 @@ Rectangle ImplStdBorderWindowView::GetMenuRect() const
void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeight )
{
- ImplBorderFrameData* pData = &maFrameData;
- ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
- const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
- DecorationView aDecoView( pDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEOUT | FRAME_DRAW_NODRAW );
+ ImplBorderFrameData* pData = &maFrameData;
+ ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
+ const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
+ DecorationView aDecoView( pDev );
+ Rectangle aRect( 0, 0, 10, 10 );
+ Rectangle aCalcRect = aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEOUT | FRAME_DRAW_NODRAW );
- pData->mpOutDev = pDev;
- pData->mnWidth = nWidth;
- pData->mnHeight = nHeight;
+ pData->mpOutDev = pDev;
+ pData->mnWidth = nWidth;
+ pData->mnHeight = nHeight;
- pData->mnTitleType = pBorderWindow->mnTitleType;
- pData->mbFloatWindow = pBorderWindow->mbFloatWindow;
+ pData->mnTitleType = pBorderWindow->mnTitleType;
+ pData->mbFloatWindow = pBorderWindow->mbFloatWindow;
if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
pData->mnBorderSize = 0;
@@ -1501,15 +1501,15 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
pData->mnBorderSize = 0;
else
pData->mnBorderSize = rStyleSettings.GetBorderSize();
- pData->mnLeftBorder = aCalcRect.Left();
- pData->mnTopBorder = aCalcRect.Top();
- pData->mnRightBorder = aRect.Right()-aCalcRect.Right();
- pData->mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
+ pData->mnLeftBorder = aCalcRect.Left();
+ pData->mnTopBorder = aCalcRect.Top();
+ pData->mnRightBorder = aRect.Right()-aCalcRect.Right();
+ pData->mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
pData->mnLeftBorder += pData->mnBorderSize;
- pData->mnTopBorder += pData->mnBorderSize;
+ pData->mnTopBorder += pData->mnBorderSize;
pData->mnRightBorder += pData->mnBorderSize;
pData->mnBottomBorder += pData->mnBorderSize;
- pData->mnNoTitleTop = pData->mnTopBorder;
+ pData->mnNoTitleTop = pData->mnTopBorder;
ImplInitTitle( &maFrameData );
if ( pData->mnTitleHeight )
@@ -1522,27 +1522,27 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
// highlighted buttons in the title
pBorderWindow->SetBackground( rStyleSettings.GetFaceColor() );
- pData->maTitleRect.Left() = pData->mnLeftBorder;
- pData->maTitleRect.Right() = nWidth-pData->mnRightBorder-1;
- pData->maTitleRect.Top() = pData->mnTopBorder;
+ pData->maTitleRect.Left() = pData->mnLeftBorder;
+ pData->maTitleRect.Right() = nWidth-pData->mnRightBorder-1;
+ pData->maTitleRect.Top() = pData->mnTopBorder;
pData->maTitleRect.Bottom() = pData->maTitleRect.Top()+pData->mnTitleHeight-1;
if ( pData->mnTitleType & (BORDERWINDOW_TITLE_NORMAL | BORDERWINDOW_TITLE_SMALL) )
{
- long nLeft = pData->maTitleRect.Left();
- long nRight = pData->maTitleRect.Right();
- long nItemTop = pData->maTitleRect.Top();
- long nItemBottom = pData->maTitleRect.Bottom();
- nLeft += 1;
- nRight -= 3;
- nItemTop += 2;
- nItemBottom -= 2;
+ long nLeft = pData->maTitleRect.Left();
+ long nRight = pData->maTitleRect.Right();
+ long nItemTop = pData->maTitleRect.Top();
+ long nItemBottom = pData->maTitleRect.Bottom();
+ nLeft += 1;
+ nRight -= 3;
+ nItemTop += 2;
+ nItemBottom -= 2;
if ( pBorderWindow->GetStyle() & WB_PINABLE )
{
Image aImage;
ImplGetPinImage( 0, 0, aImage );
- pData->maPinRect.Top() = nItemTop;
+ pData->maPinRect.Top() = nItemTop;
pData->maPinRect.Bottom() = nItemBottom;
pData->maPinRect.Left() = nLeft;
pData->maPinRect.Right() = pData->maPinRect.Left()+aImage.GetSizePixel().Width();
@@ -1551,10 +1551,10 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
if ( pBorderWindow->GetStyle() & WB_CLOSEABLE )
{
- pData->maCloseRect.Top() = nItemTop;
+ pData->maCloseRect.Top() = nItemTop;
pData->maCloseRect.Bottom() = nItemBottom;
- pData->maCloseRect.Right() = nRight;
- pData->maCloseRect.Left() = pData->maCloseRect.Right()-pData->maCloseRect.GetHeight()+1;
+ pData->maCloseRect.Right() = nRight;
+ pData->maCloseRect.Left() = pData->maCloseRect.Right()-pData->maCloseRect.GetHeight()+1;
nRight -= pData->maCloseRect.GetWidth()+3;
}
@@ -1619,7 +1619,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
pData->maHelpRect.SetEmpty();
}
- pData->mnTopBorder += pData->mnTitleHeight;
+ pData->mnTopBorder += pData->mnTitleHeight;
}
else
{
@@ -1639,10 +1639,10 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
void ImplStdBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- rLeftBorder = maFrameData.mnLeftBorder;
- rTopBorder = maFrameData.mnTopBorder;
- rRightBorder = maFrameData.mnRightBorder;
- rBottomBorder = maFrameData.mnBottomBorder;
+ rLeftBorder = maFrameData.mnLeftBorder;
+ rTopBorder = maFrameData.mnTopBorder;
+ rRightBorder = maFrameData.mnRightBorder;
+ rBottomBorder = maFrameData.mnBottomBorder;
}
// -----------------------------------------------------------------------
@@ -1656,13 +1656,13 @@ long ImplStdBorderWindowView::CalcTitleWidth() const
void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset )
{
- ImplBorderFrameData* pData = &maFrameData;
- OutputDevice* pDev = pOutDev ? pOutDev : pData->mpOutDev;
- ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
- Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
- Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
- const StyleSettings& rStyleSettings = pData->mpOutDev->GetSettings().GetStyleSettings();
- DecorationView aDecoView( pDev );
+ ImplBorderFrameData* pData = &maFrameData;
+ OutputDevice* pDev = pOutDev ? pOutDev : pData->mpOutDev;
+ ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
+ Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
+ Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
+ const StyleSettings& rStyleSettings = pData->mpOutDev->GetSettings().GetStyleSettings();
+ DecorationView aDecoView( pDev );
Color aFaceColor( rStyleSettings.GetFaceColor() );
Color aFrameColor( aFaceColor );
@@ -1740,7 +1740,7 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
if ( pData->mnTitleType != BORDERWINDOW_TITLE_TEAROFF )
{
- aInRect.Left() += 2;
+ aInRect.Left() += 2;
aInRect.Right() -= 2;
if ( !pData->maPinRect.IsEmpty() )
@@ -1870,8 +1870,8 @@ void ImplBorderWindow::ImplInit( Window* pParent,
nTestStyle |= WB_APP;
nStyle &= nTestStyle;
- mpWindowImpl->mbBorderWin = TRUE;
- mbSmallOutBorder = FALSE;
+ mpWindowImpl->mbBorderWin = TRUE;
+ mbSmallOutBorder = FALSE;
if ( nTypeStyle & BORDERWINDOW_STYLE_FRAME )
{
if( (nStyle & WB_SYSTEMCHILDWINDOW) )
@@ -1882,15 +1882,15 @@ void ImplBorderWindow::ImplInit( Window* pParent,
}
else if( (nStyle & (WB_OWNERDRAWDECORATION | WB_POPUP)) )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? FALSE : TRUE;
+ mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbFrame = TRUE;
+ mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? FALSE : TRUE;
}
else
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = FALSE;
+ mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbFrame = TRUE;
+ mbFrameBorder = FALSE;
// closeable windows may have a border as well, eg. system floating windows without caption
if ( (nOrgStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE/* | WB_CLOSEABLE*/)) == WB_BORDER )
mbSmallOutBorder = TRUE;
@@ -1898,11 +1898,11 @@ void ImplBorderWindow::ImplInit( Window* pParent,
}
else if ( nTypeStyle & BORDERWINDOW_STYLE_OVERLAP )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mbFrameBorder = TRUE;
+ mpWindowImpl->mbOverlapWin = TRUE;
+ mbFrameBorder = TRUE;
}
else
- mbFrameBorder = FALSE;
+ mbFrameBorder = FALSE;
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
mbFloatWindow = TRUE;
@@ -1914,26 +1914,26 @@ void ImplBorderWindow::ImplInit( Window* pParent,
SetTextFillColor();
mpMenuBarWindow = NULL;
- mnMinWidth = 0;
- mnMinHeight = 0;
- mnMaxWidth = SHRT_MAX;
- mnMaxHeight = SHRT_MAX;
- mnRollHeight = 0;
+ mnMinWidth = 0;
+ mnMinHeight = 0;
+ mnMaxWidth = SHRT_MAX;
+ mnMaxHeight = SHRT_MAX;
+ mnRollHeight = 0;
mnOrgMenuHeight = 0;
- mbPined = FALSE;
- mbRollUp = FALSE;
- mbMenuHide = FALSE;
- mbDockBtn = FALSE;
- mbMenuBtn = FALSE;
- mbHideBtn = FALSE;
- mbHelpBtn = FALSE;
+ mbPined = FALSE;
+ mbRollUp = FALSE;
+ mbMenuHide = FALSE;
+ mbDockBtn = FALSE;
+ mbMenuBtn = FALSE;
+ mbHideBtn = FALSE;
+ mbHelpBtn = FALSE;
mbDisplayActive = IsActive();
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
mnTitleType = BORDERWINDOW_TITLE_SMALL;
else
mnTitleType = BORDERWINDOW_TITLE_NORMAL;
- mnBorderStyle = WINDOW_BORDER_NORMAL;
+ mnBorderStyle = WINDOW_BORDER_NORMAL;
InitView();
}
@@ -1942,7 +1942,7 @@ void ImplBorderWindow::ImplInit( Window* pParent,
ImplBorderWindow::ImplBorderWindow( Window* pParent,
SystemParentData* pSystemParentData,
WinBits nStyle, USHORT nTypeStyle
- ) : Window( WINDOW_BORDERWINDOW )
+ ) : Window( WINDOW_BORDERWINDOW )
{
ImplInit( pParent, nStyle, nTypeStyle, pSystemParentData );
}
@@ -2030,8 +2030,8 @@ void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt )
// no keyboard help for border win
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) && !rHEvt.KeyboardActivated() )
{
- Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
+ Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
+ Rectangle aHelpRect;
String aHelpStr( mpBorderView->RequestHelp( aMousePosPixel, aHelpRect ) );
// Rechteck ermitteln
@@ -2194,8 +2194,8 @@ void ImplBorderWindow::UpdateView( BOOL bNewView, const Size& rNewOutSize )
GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
if ( aOldSize.Width() || aOldSize.Height() )
{
- aOutputSize.Width() += nLeftBorder+nRightBorder;
- aOutputSize.Height() += nTopBorder+nBottomBorder;
+ aOutputSize.Width() += nLeftBorder+nRightBorder;
+ aOutputSize.Height() += nTopBorder+nBottomBorder;
if ( aOutputSize == GetSizePixel() )
InvalidateBorder();
else
@@ -2217,10 +2217,10 @@ void ImplBorderWindow::InvalidateBorder()
mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
if ( nLeftBorder || nTopBorder || nRightBorder || nBottomBorder )
{
- Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
- Region aRegion( aWinRect );
+ Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
+ Region aRegion( aWinRect );
aWinRect.Left() += nLeftBorder;
- aWinRect.Top() += nTopBorder;
+ aWinRect.Top() += nTopBorder;
aWinRect.Right() -= nRightBorder;
aWinRect.Bottom() -= nBottomBorder;
// kein Output-Bereich mehr, dann alles invalidieren
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 889961cf4751..55be841666a0 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +43,11 @@
struct ImplBtnDlgItem
{
- USHORT mnId;
- BOOL mbOwnButton;
- BOOL mbDummyAlign;
- long mnSepSize;
- PushButton* mpPushButton;
+ USHORT mnId;
+ BOOL mbOwnButton;
+ BOOL mbDummyAlign;
+ long mnSepSize;
+ PushButton* mpPushButton;
};
DECLARE_LIST( ImplBtnDlgItemList, ImplBtnDlgItem* )
@@ -56,11 +56,11 @@ DECLARE_LIST( ImplBtnDlgItemList, ImplBtnDlgItem* )
void ButtonDialog::ImplInitButtonDialogData()
{
- mpItemList = new ImplBtnDlgItemList( 8, 8 );
- mnButtonSize = 0;
- mnCurButtonId = 0;
- mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND;
- mbFormat = TRUE;
+ mpItemList = new ImplBtnDlgItemList( 8, 8 );
+ mnButtonSize = 0;
+ mnCurButtonId = 0;
+ mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND;
+ mbFormat = TRUE;
}
// -----------------------------------------------------------------------
@@ -86,7 +86,7 @@ ButtonDialog::ButtonDialog( Window* pParent, const ResId& rResId ) :
Dialog( WINDOW_BUTTONDIALOG )
{
ImplInitButtonDialogData();
- rResId.SetRT( RSC_DIALOG ); // !!!!!!!!!! RSC_BUTTONDIALOG !!!!!!!!
+ rResId.SetRT( RSC_DIALOG ); // !!!!!!!!!! RSC_BUTTONDIALOG !!!!!!!!
ImplInit( pParent, ImplInitRes( rResId ) );
ImplLoadRes( rResId );
}
@@ -112,7 +112,7 @@ ButtonDialog::~ButtonDialog()
PushButton* ButtonDialog::ImplCreatePushButton( USHORT nBtnFlags )
{
PushButton* pBtn;
- WinBits nStyle = 0;
+ WinBits nStyle = 0;
if ( nBtnFlags & BUTTONDIALOG_DEFBUTTON )
nStyle |= WB_DEFBUTTON;
@@ -155,9 +155,9 @@ long ButtonDialog::ImplGetButtonSize()
return mnButtonSize;
// Calculate ButtonSize
- long nLastSepSize = 0;
- long nSepSize = 0;
- long nButtonCount = 0;
+ long nLastSepSize = 0;
+ long nSepSize = 0;
+ long nButtonCount = 0;
maCtrlSize = Size( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
ImplBtnDlgItem* pItem = mpItemList->First();
while ( pItem )
@@ -205,9 +205,9 @@ void ButtonDialog::ImplPosControls()
// determine dialog size
ImplBtnDlgItem* pItem;
- Size aDlgSize = maPageSize;
- long nX;
- long nY;
+ Size aDlgSize = maPageSize;
+ long nX;
+ long nY;
if ( GetStyle() & WB_HORZ )
{
if ( mnButtonSize+(IMPL_DIALOG_OFFSET*2) > aDlgSize.Width() )
@@ -334,11 +334,11 @@ void ButtonDialog::AddButton( const XubString& rText, USHORT nId,
USHORT nBtnFlags, long nSepPixel )
{
// PageItem anlegen
- ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
- pItem->mnId = nId;
- pItem->mbOwnButton = TRUE;
- pItem->mnSepSize = nSepPixel;
- pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
+ ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
+ pItem->mnId = nId;
+ pItem->mbOwnButton = TRUE;
+ pItem->mnSepSize = nSepPixel;
+ pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
if ( rText.Len() )
pItem->mpPushButton->SetText( rText );
@@ -357,10 +357,10 @@ void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId,
USHORT nBtnFlags, long nSepPixel )
{
// PageItem anlegen
- ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
- pItem->mnId = nId;
- pItem->mbOwnButton = TRUE;
- pItem->mnSepSize = nSepPixel;
+ ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
+ pItem->mnId = nId;
+ pItem->mbOwnButton = TRUE;
+ pItem->mnSepSize = nSepPixel;
if ( eType == BUTTON_OK )
nBtnFlags |= BUTTONDIALOG_OKBUTTON;
@@ -371,9 +371,9 @@ void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId,
pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
// Standard-Buttons have the right text already
- if ( !((eType == BUTTON_OK) && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
+ if ( !((eType == BUTTON_OK) && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
!((eType == BUTTON_CANCEL) && (pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
- !((eType == BUTTON_HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
+ !((eType == BUTTON_HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
{
pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
pItem->mpPushButton->SetHelpText( Button::GetStandardHelpText( eType ) );
@@ -394,11 +394,11 @@ void ButtonDialog::AddButton( PushButton* pBtn, USHORT nId,
USHORT nBtnFlags, long nSepPixel )
{
// PageItem anlegen
- ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
- pItem->mnId = nId;
- pItem->mbOwnButton = FALSE;
- pItem->mnSepSize = nSepPixel;
- pItem->mpPushButton = pBtn;
+ ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
+ pItem->mnId = nId;
+ pItem->mbOwnButton = FALSE;
+ pItem->mnSepSize = nSepPixel;
+ pItem->mpPushButton = pBtn;
if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON )
mnFocusButtonId = nId;
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index ae5b765909ba..f956e4cef9d6 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
CommandExtTextInputData::CommandExtTextInputData()
{
- mpTextAttr = NULL;
- mnCursorPos = 0;
- mnDeltaStart = 0;
- mnOldTextLen = 0;
- mnCursorFlags = 0;
- mbOnlyCursor = FALSE;
+ mpTextAttr = NULL;
+ mnCursorPos = 0;
+ mnDeltaStart = 0;
+ mnOldTextLen = 0;
+ mnCursorFlags = 0;
+ mbOnlyCursor = FALSE;
}
// -----------------------------------------------------------------------
@@ -63,11 +63,11 @@ CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
}
else
mpTextAttr = NULL;
- mnCursorPos = nCursorPos;
- mnDeltaStart = nDeltaStart;
- mnOldTextLen = nOldTextLen;
- mnCursorFlags = nCursorFlags;
- mbOnlyCursor = bOnlyCursor;
+ mnCursorPos = nCursorPos;
+ mnDeltaStart = nDeltaStart;
+ mnOldTextLen = nOldTextLen;
+ mnCursorFlags = nCursorFlags;
+ mbOnlyCursor = bOnlyCursor;
}
// -----------------------------------------------------------------------
@@ -82,11 +82,11 @@ CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData&
}
else
mpTextAttr = NULL;
- mnCursorPos = rData.mnCursorPos;
- mnDeltaStart = rData.mnDeltaStart;
- mnOldTextLen = rData.mnOldTextLen;
- mnCursorFlags = rData.mnCursorFlags;
- mbOnlyCursor = rData.mbOnlyCursor;
+ mnCursorPos = rData.mnCursorPos;
+ mnDeltaStart = rData.mnDeltaStart;
+ mnOldTextLen = rData.mnOldTextLen;
+ mnCursorFlags = rData.mnCursorFlags;
+ mbOnlyCursor = rData.mbOnlyCursor;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 21ef136ad663..11a998b5a879 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
struct ImplCursorData
{
- AutoTimer maTimer; // Timer
- Point maPixPos; // Pixel-Position
- Point maPixRotOff; // Pixel-Offset-Position
- Size maPixSize; // Pixel-Size
- long mnPixSlant; // Pixel-Slant
- short mnOrientation; // Pixel-Orientation
- unsigned char mnDirection; // indicates writing direction
- USHORT mnStyle; // Cursor-Style
- BOOL mbCurVisible; // Ist Cursor aktuell sichtbar
- Window* mpWindow; // Zugeordnetes Windows
+ AutoTimer maTimer; // Timer
+ Point maPixPos; // Pixel-Position
+ Point maPixRotOff; // Pixel-Offset-Position
+ Size maPixSize; // Pixel-Size
+ long mnPixSlant; // Pixel-Slant
+ short mnOrientation; // Pixel-Orientation
+ unsigned char mnDirection; // indicates writing direction
+ USHORT mnStyle; // Cursor-Style
+ BOOL mbCurVisible; // Ist Cursor aktuell sichtbar
+ Window* mpWindow; // Zugeordnetes Windows
};
// =======================================================================
@@ -58,7 +58,7 @@ struct ImplCursorData
static void ImplCursorInvert( ImplCursorData* pData )
{
Window* pWindow = pData->mpWindow;
- BOOL bMapMode = pWindow->IsMapModeEnabled();
+ BOOL bMapMode = pWindow->IsMapModeEnabled();
pWindow->EnableMapMode( FALSE );
USHORT nInvertStyle;
if ( pData->mnStyle & CURSOR_SHADOW )
@@ -95,10 +95,10 @@ static void ImplCursorInvert( ImplCursorData* pData )
// left-to-right
pAry[0] = aPoly.GetPoint( 0 );
pAry[1] = aPoly.GetPoint( 1 );
- pAry[2] = pAry[1];
+ pAry[2] = pAry[1];
pAry[2].X() += delta;
pAry[3] = pAry[1];
- pAry[3].Y() += delta;
+ pAry[3].Y() += delta;
pAry[4] = aPoly.GetPoint( 2 );
pAry[5] = aPoly.GetPoint( 3 );
pAry[6] = aPoly.GetPoint( 4 );
@@ -110,8 +110,8 @@ static void ImplCursorInvert( ImplCursorData* pData )
pAry[1] = aPoly.GetPoint( 1 );
pAry[2] = aPoly.GetPoint( 2 );
pAry[3] = aPoly.GetPoint( 3 );
- pAry[4] = pAry[0];
- pAry[4].Y() += delta;
+ pAry[4] = pAry[0];
+ pAry[4].Y() += delta;
pAry[5] = pAry[0];
pAry[5].X() -= delta;
pAry[6] = aPoly.GetPoint( 4 );
@@ -135,13 +135,13 @@ void Cursor::ImplDraw()
{
if ( mpData && mpData->mpWindow && !mpData->mbCurVisible )
{
- Window* pWindow = mpData->mpWindow;
- mpData->maPixPos = pWindow->LogicToPixel( maPos );
- mpData->maPixSize = pWindow->LogicToPixel( maSize );
- mpData->mnPixSlant = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width();
- mpData->mnOrientation = mnOrientation;
- mpData->mnDirection = mnDirection;
- long nOffsetY = pWindow->LogicToPixel( Size( 0, mnOffsetY ) ).Height();
+ Window* pWindow = mpData->mpWindow;
+ mpData->maPixPos = pWindow->LogicToPixel( maPos );
+ mpData->maPixSize = pWindow->LogicToPixel( maSize );
+ mpData->mnPixSlant = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width();
+ mpData->mnOrientation = mnOrientation;
+ mpData->mnDirection = mnDirection;
+ long nOffsetY = pWindow->LogicToPixel( Size( 0, mnOffsetY ) ).Height();
// Position um den Offset korrigieren
mpData->maPixPos.Y() -= nOffsetY;
@@ -198,8 +198,8 @@ void Cursor::ImplShow( BOOL bDrawDirect )
mpData->maTimer.SetTimeoutHdl( LINK( this, Cursor, ImplTimerHdl ) );
}
- mpData->mpWindow = pWindow;
- mpData->mnStyle = mnStyle;
+ mpData->mpWindow = pWindow;
+ mpData->mnStyle = mnStyle;
if ( bDrawDirect )
ImplDraw();
@@ -262,14 +262,14 @@ IMPL_LINK( Cursor, ImplTimerHdl, AutoTimer*, EMPTYARG )
Cursor::Cursor()
{
- mpData = NULL;
- mpWindow = NULL;
- mnSlant = 0;
- mnOffsetY = 0;
- mnOrientation = 0;
- mnDirection = 0;
- mnStyle = 0;
- mbVisible = FALSE;
+ mpData = NULL;
+ mpWindow = NULL;
+ mnSlant = 0;
+ mnOffsetY = 0;
+ mnOrientation = 0;
+ mnDirection = 0;
+ mnStyle = 0;
+ mbVisible = FALSE;
}
// -----------------------------------------------------------------------
@@ -278,13 +278,13 @@ Cursor::Cursor( const Cursor& rCursor ) :
maSize( rCursor.maSize ),
maPos( rCursor.maPos )
{
- mpData = NULL;
- mpWindow = NULL;
- mnSlant = rCursor.mnSlant;
- mnOrientation = rCursor.mnOrientation;
- mnDirection = rCursor.mnDirection;
- mnStyle = 0;
- mbVisible = rCursor.mbVisible;
+ mpData = NULL;
+ mpWindow = NULL;
+ mnSlant = rCursor.mnSlant;
+ mnOrientation = rCursor.mnOrientation;
+ mnDirection = rCursor.mnDirection;
+ mnStyle = 0;
+ mbVisible = rCursor.mbVisible;
}
// -----------------------------------------------------------------------
@@ -436,12 +436,12 @@ void Cursor::SetDirection( unsigned char nNewDirection )
Cursor& Cursor::operator=( const Cursor& rCursor )
{
- maPos = rCursor.maPos;
- maSize = rCursor.maSize;
- mnSlant = rCursor.mnSlant;
- mnOrientation = rCursor.mnOrientation;
- mnDirection = rCursor.mnDirection;
- mbVisible = rCursor.mbVisible;
+ maPos = rCursor.maPos;
+ maSize = rCursor.maSize;
+ mnSlant = rCursor.mnSlant;
+ mnOrientation = rCursor.mnOrientation;
+ mnDirection = rCursor.mnDirection;
+ mbVisible = rCursor.mbVisible;
ImplNew();
return *this;
@@ -451,12 +451,12 @@ Cursor& Cursor::operator=( const Cursor& rCursor )
BOOL Cursor::operator==( const Cursor& rCursor ) const
{
- if ( (maPos == rCursor.maPos) &&
- (maSize == rCursor.maSize) &&
- (mnSlant == rCursor.mnSlant) &&
- (mnOrientation == rCursor.mnOrientation) &&
- (mnDirection == rCursor.mnDirection) &&
- (mbVisible == rCursor.mbVisible) )
+ if ( (maPos == rCursor.maPos) &&
+ (maSize == rCursor.maSize) &&
+ (mnSlant == rCursor.mnSlant) &&
+ (mnOrientation == rCursor.mnOrientation) &&
+ (mnDirection == rCursor.mnDirection) &&
+ (mbVisible == rCursor.mbVisible) )
return TRUE;
else
return FALSE;
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 0cb89a025f5d..1471b0a496d3 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +38,9 @@
// =======================================================================
-#define BUTTON_DRAW_FLATTEST (BUTTON_DRAW_FLAT | \
- BUTTON_DRAW_PRESSED | \
- BUTTON_DRAW_CHECKED | \
+#define BUTTON_DRAW_FLATTEST (BUTTON_DRAW_FLAT | \
+ BUTTON_DRAW_PRESSED | \
+ BUTTON_DRAW_CHECKED | \
BUTTON_DRAW_HIGHLIGHT)
// =======================================================================
@@ -48,11 +48,11 @@
void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect,
USHORT nStyle, BOOL bClose )
{
- DecorationView aView( pDev );
- const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
- Rectangle aRect = rRect;
- Color aColor1;
- Color aColor2;
+ DecorationView aView( pDev );
+ const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
+ Rectangle aRect = rRect;
+ Color aColor1;
+ Color aColor2;
pDev->SetFillColor();
@@ -68,10 +68,10 @@ void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect,
}
aView.DrawFrame( aRect, aColor1, aColor2 );
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
+ aRect.Left() += 2;
+ aRect.Top() += 2;
+ aRect.Right() -= 2;
+ aRect.Bottom() -= 2;
if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
pDev->SetLineColor( rStyleSettings.GetLightColor() );
@@ -114,22 +114,22 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
SymbolType eType )
{
// Groessen vorberechnen
- long nMin = Min( rRect.GetWidth(), rRect.GetHeight() );
- long nSize = nMin;
+ long nMin = Min( rRect.GetWidth(), rRect.GetHeight() );
+ long nSize = nMin;
if ( nMin & 0x01 )
nMin--;
- Point aCenter = rRect.Center();
- long nCenterX = aCenter.X();
- long nCenterY = aCenter.Y();
- long n2 = nMin / 2;
- long n4 = nMin / 4;
- long nLeft;
- long nTop;
- long nRight;
- long nBottom;
- long nTemp;
- long i;
+ Point aCenter = rRect.Center();
+ long nCenterX = aCenter.X();
+ long nCenterY = aCenter.Y();
+ long n2 = nMin / 2;
+ long n4 = nMin / 4;
+ long nLeft;
+ long nTop;
+ long nRight;
+ long nBottom;
+ long nTemp;
+ long i;
switch ( eType )
{
@@ -339,8 +339,8 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
{
if ( !( nSize & 0x01 ))
{
- // An even rectangle size means we have to use a smaller size for
- // our arrows as we want to use one pixel for the spearhead! Otherwise
+ // An even rectangle size means we have to use a smaller size for
+ // our arrows as we want to use one pixel for the spearhead! Otherwise
// it will be clipped!
nCenterX++;
n2 = ( nMin-1 ) / 2;
@@ -369,9 +369,9 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
case SYMBOL_RADIOCHECKMARK:
case SYMBOL_RECORD:
{
- const long nExt = ( n2 << 1 ) + 1;
- Bitmap aBmp( Size( nExt, nExt ), 1 );
- BitmapWriteAccess* pWAcc = aBmp.AcquireWriteAccess();
+ const long nExt = ( n2 << 1 ) + 1;
+ Bitmap aBmp( Size( nExt, nExt ), 1 );
+ BitmapWriteAccess* pWAcc = aBmp.AcquireWriteAccess();
if( pWAcc )
{
@@ -472,8 +472,8 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
aRectSize.Width() = 1;
else if ( nMin > 20 )
aRectSize.Width() = nMin/10;
- nLeft = nCenterX-n2+1;
- nTop = nCenterY-n2+1;
+ nLeft = nCenterX-n2+1;
+ nTop = nCenterY-n2+1;
nBottom = nCenterY-n2+nMin-aRectSize.Width()+1;
i = 0;
while ( i < nMin-aRectSize.Width()+1 )
@@ -674,11 +674,11 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
const Color& rColor, USHORT nStyle )
{
- const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
- Rectangle aRect = mpOutDev->LogicToPixel( rRect );
- Color aOldLineColor = mpOutDev->GetLineColor();
- Color aOldFillColor = mpOutDev->GetFillColor();
- BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
+ const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
+ Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ Color aOldLineColor = mpOutDev->GetLineColor();
+ Color aOldFillColor = mpOutDev->GetFillColor();
+ BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->SetLineColor();
mpOutDev->SetFillColor( rColor );
mpOutDev->EnableMapMode( FALSE );
@@ -722,10 +722,10 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
const Color& rLeftTopColor,
const Color& rRightBottomColor )
{
- Rectangle aRect = mpOutDev->LogicToPixel( rRect );
- Color aOldLineColor = mpOutDev->GetLineColor();
- Color aOldFillColor = mpOutDev->GetFillColor();
- BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
+ Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ Color aOldLineColor = mpOutDev->GetLineColor();
+ Color aOldFillColor = mpOutDev->GetFillColor();
+ BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->EnableMapMode( FALSE );
mpOutDev->SetLineColor();
mpOutDev->ImplDraw2ColorFrame( aRect, rLeftTopColor, rRightBottomColor );
@@ -827,10 +827,10 @@ static void ImplDrawDPILineRect( OutputDevice* pDev, Rectangle& rRect,
}
}
- rRect.Left() += nLineWidth;
- rRect.Top() += nLineHeight;
- rRect.Right() -= nLineWidth;
- rRect.Bottom() -= nLineHeight;
+ rRect.Left() += nLineWidth;
+ rRect.Top() += nLineHeight;
+ rRect.Right() -= nLineWidth;
+ rRect.Bottom() -= nLineHeight;
}
// =======================================================================
@@ -848,7 +848,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
// UseFlatBorders disables 3D style for all frames except menus
// menus may use different border colors (eg on XP)
- // normal frames will be drawn using the shadow color
+ // normal frames will be drawn using the shadow color
// whereas window frame borders will use black
BOOL bFlatBorders = ( !bMenuStyle && rStyleSettings.GetUseFlatBorders() );
@@ -893,10 +893,10 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
if ( nFrameStyle == FRAME_DRAW_GROUP )
{
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 2;
+ rRect.Top() += 2;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
else if ( (nFrameStyle == FRAME_DRAW_IN) ||
(nFrameStyle == FRAME_DRAW_OUT) )
@@ -908,10 +908,10 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
}
else // FRAME_DRAW_DOUBLEIN || FRAME_DRAW_DOUBLEOUT
{
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 2;
+ rRect.Top() += 2;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
}
}
@@ -925,8 +925,8 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
ImplControlValue aControlValue( nValueStyle );
Rectangle aBound, aContent;
Rectangle aNatRgn( rRect );
- if( pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
- aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
+ if( pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
+ aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
if( pWin->DrawNativeControl( CTRL_FRAME, PART_BORDER, aContent, CTRL_STATE_ENABLED,
aControlValue, rtl::OUString()) )
@@ -1023,7 +1023,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
rStyleSettings.GetDarkShadowColor() :
rStyleSettings.GetLightBorderColor(),
rStyleSettings.GetDarkShadowColor() );
-
+
}
rRect.Left()++;
@@ -1070,8 +1070,8 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
Rectangle DecorationView::DrawFrame( const Rectangle& rRect, USHORT nStyle )
{
- Rectangle aRect = rRect;
- BOOL bOldMap = mpOutDev->IsMapModeEnabled();
+ Rectangle aRect = rRect;
+ BOOL bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
aRect = mpOutDev->LogicToPixel( aRect );
@@ -1133,25 +1133,25 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
pDev->SetFillColor( aBlackColor );
Rectangle aRect1;
Rectangle aRect2;
- aRect1.Left() = aFillRect.Left();
- aRect1.Right() = aFillRect.Right(),
- aRect2.Top() = aFillRect.Top();
+ aRect1.Left() = aFillRect.Left();
+ aRect1.Right() = aFillRect.Right(),
+ aRect2.Top() = aFillRect.Top();
aRect2.Bottom() = aFillRect.Bottom();
if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
{
- aRect1.Top() = aFillRect.Top();
+ aRect1.Top() = aFillRect.Top();
aRect1.Bottom() = aBrdSize.Height()-1;
- aRect2.Left() = aFillRect.Left();
- aRect2.Right() = aFillRect.Left()+aBrdSize.Width()-1;
+ aRect2.Left() = aFillRect.Left();
+ aRect2.Right() = aFillRect.Left()+aBrdSize.Width()-1;
aFillRect.Left() += aBrdSize.Width();
aFillRect.Top() += aBrdSize.Height();
}
else
{
- aRect1.Top() = aFillRect.Bottom()-aBrdSize.Height()+1;
+ aRect1.Top() = aFillRect.Bottom()-aBrdSize.Height()+1;
aRect1.Bottom() = aFillRect.Bottom();
- aRect2.Left() = aFillRect.Right()-aBrdSize.Width()+1;
- aRect2.Right() = aFillRect.Right(),
+ aRect2.Left() = aFillRect.Right()-aBrdSize.Width()+1;
+ aRect2.Right() = aFillRect.Right(),
aFillRect.Right() -= aBrdSize.Width();
aFillRect.Bottom() -= aBrdSize.Height();
}
@@ -1286,32 +1286,32 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
{
if ( (rRect.GetHeight() > 10) && (rRect.GetWidth() > 10) )
{
- rRect.Left() += 4;
- rRect.Top() += 4;
- rRect.Right() -= 1;
- rRect.Bottom() -= 1;
+ rRect.Left() += 4;
+ rRect.Top() += 4;
+ rRect.Right() -= 1;
+ rRect.Bottom() -= 1;
}
else
{
- rRect.Left() += 3;
- rRect.Top() += 3;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 3;
+ rRect.Top() += 3;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
}
else if ( nStyle & BUTTON_DRAW_CHECKED )
{
- rRect.Left() += 3;
- rRect.Top() += 3;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 3;
+ rRect.Top() += 3;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
else
{
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 3;
- rRect.Bottom() -= 3;
+ rRect.Left() += 2;
+ rRect.Top() += 2;
+ rRect.Right() -= 3;
+ rRect.Bottom() -= 3;
}
}
@@ -1319,8 +1319,8 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
Rectangle DecorationView::DrawButton( const Rectangle& rRect, USHORT nStyle )
{
- Rectangle aRect = rRect;
- BOOL bOldMap = mpOutDev->IsMapModeEnabled();
+ Rectangle aRect = rRect;
+ BOOL bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
aRect = mpOutDev->LogicToPixel( aRect );
@@ -1367,7 +1367,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev->SetLineColor( Color( COL_BLACK ) );
else
mpOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
-
+
mpOutDev->DrawLine( aStart, aStop );
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
{
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 50692a2070b2..dd8dccaf0597 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -1063,8 +1063,8 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
{
Window* pWindow = NULL;
- if( nMyType == WINDOW_FIXEDTEXT ||
- nMyType == WINDOW_FIXEDLINE ||
+ if( nMyType == WINDOW_FIXEDTEXT ||
+ nMyType == WINDOW_FIXEDLINE ||
nMyType == WINDOW_GROUPBOX )
{
// #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
@@ -1102,8 +1102,8 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
if( pSWindow && pSWindow->IsVisible() && ! (pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if( nType != WINDOW_FIXEDTEXT &&
- nType != WINDOW_FIXEDLINE &&
+ if( nType != WINDOW_FIXEDTEXT &&
+ nType != WINDOW_FIXEDLINE &&
nType != WINDOW_GROUPBOX )
{
pWindow = pSWindow;
@@ -1171,9 +1171,9 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
nFormEnd );
if( pSWindow && nIndex != nFormStart )
{
- if( nMyType == WINDOW_PUSHBUTTON ||
- nMyType == WINDOW_HELPBUTTON ||
- nMyType == WINDOW_OKBUTTON ||
+ if( nMyType == WINDOW_PUSHBUTTON ||
+ nMyType == WINDOW_HELPBUTTON ||
+ nMyType == WINDOW_OKBUTTON ||
nMyType == WINDOW_CANCELBUTTON )
{
nFormStart = nIndex-1;
@@ -1188,8 +1188,8 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
if( pSWindow && pSWindow->IsVisible() && !(pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if ( ( nType == WINDOW_FIXEDTEXT ||
- nType == WINDOW_FIXEDLINE ||
+ if ( ( nType == WINDOW_FIXEDTEXT ||
+ nType == WINDOW_FIXEDLINE ||
nType == WINDOW_GROUPBOX ) )
{
// a fixed text can't be labeld by a fixed text.
@@ -1226,8 +1226,8 @@ Window* Window::GetLabeledBy() const
if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
return NULL;
-// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
-// GetType() == WINDOW_FIXEDLINE ||
+// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
+// GetType() == WINDOW_FIXEDLINE ||
// GetType() == WINDOW_GROUPBOX ) )
// #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
// See tools/options/print for example.
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index d9417e3bacf0..038e8d189954 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -195,7 +195,7 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde )
else
{
// fire dragOver on listeners of current window
- nListeners = fireDragOverEvent( pChildWindow, dtde.Context, dtde.DropAction, location,
+ nListeners = fireDragOverEvent( pChildWindow, dtde.Context, dtde.DropAction, location,
dtde.SourceActions );
}
diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx
index 4566852bc966..c27afb97f172 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlcon.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +37,18 @@ using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::datatransfer::dnd;
//==================================================================================================
-//
+//
//==================================================================================================
DNDListenerContainer::DNDListenerContainer( sal_Int8 nDefaultActions )
: WeakComponentImplHelper4< XDragGestureRecognizer, XDropTargetDragContext, XDropTargetDropContext, XDropTarget >(GetMutex())
{
m_bActive = sal_True;
- m_nDefaultActions = nDefaultActions;
+ m_nDefaultActions = nDefaultActions;
}
//==================================================================================================
-//
+//
//==================================================================================================
DNDListenerContainer::~DNDListenerContainer()
@@ -58,8 +58,8 @@ DNDListenerContainer::~DNDListenerContainer()
//==================================================================================================
// DNDListenerContainer::addDragGestureListener
//==================================================================================================
-
-void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< XDragGestureListener >& dgl )
+
+void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< XDragGestureListener >& dgl )
throw(RuntimeException)
{
rBHelper.addListener( getCppuType( ( const Reference< XDragGestureListener > * ) 0 ), dgl );
@@ -69,7 +69,7 @@ void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< XDr
// DNDListenerContainer::removeDragGestureListener
//==================================================================================================
-void SAL_CALL DNDListenerContainer::removeDragGestureListener( const Reference< XDragGestureListener >& dgl )
+void SAL_CALL DNDListenerContainer::removeDragGestureListener( const Reference< XDragGestureListener >& dgl )
throw(RuntimeException)
{
rBHelper.removeListener( getCppuType( ( const Reference< XDragGestureListener > * ) 0 ), dgl );
@@ -79,16 +79,16 @@ void SAL_CALL DNDListenerContainer::removeDragGestureListener( const Reference<
// DNDListenerContainer::resetRecognizer
//==================================================================================================
-void SAL_CALL DNDListenerContainer::resetRecognizer( )
+void SAL_CALL DNDListenerContainer::resetRecognizer( )
throw(RuntimeException)
{
}
-
+
//==================================================================================================
// DNDListenerContainer::addDropTargetListener
//==================================================================================================
-void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< XDropTargetListener >& dtl )
+void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< XDropTargetListener >& dtl )
throw(RuntimeException)
{
rBHelper.addListener( getCppuType( ( const Reference< XDropTargetListener > * ) 0 ), dtl );
@@ -98,7 +98,7 @@ void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< XDro
// DNDListenerContainer::removeDropTargetListener
//==================================================================================================
-void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< XDropTargetListener >& dtl )
+void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< XDropTargetListener >& dtl )
throw(RuntimeException)
{
rBHelper.removeListener( getCppuType( ( const Reference< XDropTargetListener > * ) 0 ), dtl );
@@ -108,7 +108,7 @@ void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< X
// DNDListenerContainer::isActive
//==================================================================================================
-sal_Bool SAL_CALL DNDListenerContainer::isActive( )
+sal_Bool SAL_CALL DNDListenerContainer::isActive( )
throw(RuntimeException)
{
return m_bActive;
@@ -118,7 +118,7 @@ sal_Bool SAL_CALL DNDListenerContainer::isActive( )
// DNDListenerContainer::setActive
//==================================================================================================
-void SAL_CALL DNDListenerContainer::setActive( sal_Bool active )
+void SAL_CALL DNDListenerContainer::setActive( sal_Bool active )
throw(RuntimeException)
{
m_bActive = active;
@@ -128,7 +128,7 @@ void SAL_CALL DNDListenerContainer::setActive( sal_Bool active )
// DNDListenerContainer::getDefaultActions
//==================================================================================================
-sal_Int8 SAL_CALL DNDListenerContainer::getDefaultActions( )
+sal_Int8 SAL_CALL DNDListenerContainer::getDefaultActions( )
throw(RuntimeException)
{
return m_nDefaultActions;
@@ -138,7 +138,7 @@ sal_Int8 SAL_CALL DNDListenerContainer::getDefaultActions( )
// DNDListenerContainer::setDefaultActions
//==================================================================================================
-void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions )
+void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions )
throw(RuntimeException)
{
m_nDefaultActions = actions;
@@ -148,7 +148,7 @@ void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions )
// DNDListenerContainer::fireDropEvent
//==================================================================================================
-sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDropContext >& context,
+sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDropContext >& context,
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
const Reference< XTransferable >& transferable )
{
@@ -156,17 +156,17 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
-
+
// remember context to use in own context methods
m_xDropTargetDropContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDropEvent aEvent( static_cast < XDropTarget * > (this), 0,
- static_cast < XDropTargetDropContext * > (this), dropAction,
+ DropTargetDropEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ static_cast < XDropTargetDropContext * > (this), dropAction,
locationX, locationY, sourceActions, transferable );
while (aIterator.hasMoreElements())
@@ -226,10 +226,10 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
sal_uInt32 DNDListenerContainer::fireDragExitEvent()
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -268,14 +268,14 @@ sal_uInt32 DNDListenerContainer::fireDragExitEvent()
// DNDListenerContainer::fireDragOverEvent
//==================================================================================================
-sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTargetDragContext >& context,
+sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTargetDragContext >& context,
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -284,8 +284,8 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
m_xDropTargetDragContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
- static_cast < XDropTargetDragContext * > (this),
+ DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ static_cast < XDropTargetDragContext * > (this),
dropAction, locationX, locationY, sourceActions );
while (aIterator.hasMoreElements())
@@ -336,14 +336,14 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
//==================================================================================================
sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTargetDragContext >& context,
- sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
+ sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
const Sequence< DataFlavor >& dataFlavors )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -352,7 +352,7 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge
m_xDropTargetDragContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDragEnterEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ DropTargetDragEnterEvent aEvent( static_cast < XDropTarget * > (this), 0,
static_cast < XDropTargetDragContext * > (this),
dropAction, locationX, locationY, sourceActions, dataFlavors );
@@ -407,10 +407,10 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -419,7 +419,7 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
m_xDropTargetDragContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
static_cast < XDropTargetDragContext * > (this),
dropAction, locationX, locationY, sourceActions );
@@ -474,16 +474,16 @@ sal_uInt32 DNDListenerContainer::fireDragGestureEvent( sal_Int8 dragAction, sal_
sal_Int32 dragOriginY, const Reference< XDragSource >& dragSource, const Any& triggerEvent )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDragGestureListener > * ) 0) );
-
+
if( pContainer )
{
OInterfaceIteratorHelper aIterator( *pContainer );
// do not construct the event before you are sure at least one listener is registered
- DragGestureEvent aEvent( static_cast < XDragGestureRecognizer * > (this), dragAction,
+ DragGestureEvent aEvent( static_cast < XDragGestureRecognizer * > (this), dragAction,
dragOriginX, dragOriginY, dragSource, triggerEvent );
while( aIterator.hasMoreElements() )
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 231f17759b86..646fa3156ebe 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +73,7 @@ static void ImplInitBackground( DockingAreaWindow* pThis )
DockingAreaWindow::DockingAreaWindow( Window* pParent ) :
Window( WINDOW_DOCKINGAREA )
{
- ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL );
+ ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL );
mpImplData = new ImplData;
ImplInitBackground( this );
@@ -103,7 +103,7 @@ static void ImplInvalidateMenubar( DockingAreaWindow* pThis )
// due to a possible comon gradient covering menubar and top dockingarea
// the menubar must be repainted if the top dockingarea changes size or visibility
if( ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG &&
- (pThis->GetAlign() == WINDOWALIGN_TOP)
+ (pThis->GetAlign() == WINDOWALIGN_TOP)
&& pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL )
&& pThis->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
@@ -168,8 +168,8 @@ void DockingAreaWindow::Paint( const Rectangle& )
// draw a single toolbar background covering the whole docking area
Point tmp;
Rectangle aCtrlRegion( tmp, GetOutputSizePixel() );
-
- DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
+
+ DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aCtrlRegion, nState, aControlValue, rtl::OUString() );
// each toolbar gets a thin border to better recognize its borders on the homogeneous docking area
@@ -195,7 +195,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
}
else
{
- // create map to find toolbar lines
+ // create map to find toolbar lines
Size aOutSz = GetOutputSizePixel();
std::map< int, int > ranges;
USHORT nChildren = GetChildCount();
@@ -229,7 +229,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
aTBRect.Top() = 0;
aTBRect.Bottom() = aOutSz.Height() - 1;
}
- DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
+ DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aTBRect, nState, aControlValue, rtl::OUString() );
}
}
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index ee8e584ac234..b472b8ccc0a1 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,13 +59,13 @@ class ImplDockFloatWin2 : public FloatingWindow
{
private:
ImplDockingWindowWrapper* mpDockWin;
- ULONG mnLastTicks;
- Timer maDockTimer;
- Timer maEndDockTimer;
- Point maDockPos;
- Rectangle maDockRect;
+ ULONG mnLastTicks;
+ Timer maDockTimer;
+ Timer maEndDockTimer;
+ Point maDockPos;
+ Rectangle maDockRect;
BOOL mbInMove;
- ULONG mnLastUserEvent;
+ ULONG mnLastUserEvent;
DECL_LINK( DockingHdl, ImplDockFloatWin2* );
DECL_LINK( DockTimerHdl, ImplDockFloatWin2* );
@@ -75,14 +75,14 @@ public:
ImplDockingWindowWrapper* pDockingWin );
~ImplDockFloatWin2();
- virtual void Move();
- virtual void Resize();
- virtual void TitleButtonClick( USHORT nButton );
- virtual void Pin();
- virtual void Roll();
- virtual void PopupModeEnd();
- virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual void Move();
+ virtual void Resize();
+ virtual void TitleButtonClick( USHORT nButton );
+ virtual void Pin();
+ virtual void Roll();
+ virtual void PopupModeEnd();
+ virtual void Resizing( Size& rSize );
+ virtual BOOL Close();
using Window::SetPosSizePixel;
virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
@@ -213,8 +213,8 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG )
}
}
- if( mpDockWin->IsDockable() &&
- mpDockWin->GetWindow()->IsVisible() &&
+ if( mpDockWin->IsDockable() &&
+ mpDockWin->GetWindow()->IsVisible() &&
(Time::GetSystemTicks() - mnLastTicks > 500) &&
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
!(aState.mnState & KEY_MOD1) && // i43499 CTRL disables docking now
@@ -433,7 +433,7 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin
void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow )
{
StartPopupMode( pParentToolBox, pWindow, FLOATWIN_POPUPMODE_ALLOWTEAROFF |
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
+ FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE |
FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE );
}
@@ -512,14 +512,14 @@ Rectangle DockingManager::GetPosSizePixel( const Window *pWindow )
// if TEAROFF_DASHED defined a single dashed line is used
// otherwise multiple smaller lines will be painted
-//#define TEAROFF_DASHED
+//#define TEAROFF_DASHED
// size of the drag area
#ifdef TEAROFF_DASHED
-#define POPUP_DRAGBORDER 2
-#define POPUP_DRAGGRIP 5
+#define POPUP_DRAGBORDER 2
+#define POPUP_DRAGGRIP 5
#else
-#define POPUP_DRAGBORDER 3
+#define POPUP_DRAGBORDER 3
#define POPUP_DRAGGRIP 5
#endif
#define POPUP_DRAGHEIGHT (POPUP_DRAGGRIP+POPUP_DRAGBORDER+POPUP_DRAGBORDER)
@@ -531,11 +531,11 @@ private:
ImplDockingWindowWrapper* mpDockingWin;
BOOL mbHighlight;
BOOL mbMoving;
- bool mbTrackingEnabled;
+ bool mbTrackingEnabled;
Point maDelta;
Point maTearOffPosition;
- bool mbGripAtBottom;
- bool mbHasGrip;
+ bool mbGripAtBottom;
+ bool mbHasGrip;
void ImplSetBorder();
public:
@@ -557,13 +557,13 @@ public:
void DrawGrip();
void DrawBorder();
- bool hasGrip() const { return mbHasGrip; }
+ bool hasGrip() const { return mbHasGrip; }
};
-ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) :
+ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) :
FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW)
{
- mpWindowImpl->mbToolbarFloatingWindow = TRUE; // indicate window type, required for accessibility
+ mpWindowImpl->mbToolbarFloatingWindow = TRUE; // indicate window type, required for accessibility
// which should not see this window as a toplevel window
mpDockingWin = pDockingWin;
mbHighlight = FALSE;
@@ -586,7 +586,7 @@ ImplPopupFloatWin::~ImplPopupFloatWin()
// this is to avoid appearance of this window as standalone window in the accessibility hierarchy
// as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar
- // has to provide accessibility support (as implemented in the toolkit)
+ // has to provide accessibility support (as implemented in the toolkit)
// so the contained toolbar should appear as child of the correponsing toolbar item of the parent toolbar
return ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >();
}
@@ -617,7 +617,7 @@ void ImplPopupFloatWin::ImplSetBorder()
void ImplPopupFloatWin::Resize()
{
// the borderview overwrites the border during resize so restore it
- ImplSetBorder();
+ ImplSetBorder();
}
Rectangle ImplPopupFloatWin::GetDragRect() const
@@ -740,8 +740,8 @@ void ImplPopupFloatWin::DrawGrip()
//aRect.nLeft = aRect.nLeft + (aRect.getWidth() - width) / 2;
aRect.nLeft = (aRect.nLeft + aRect.nRight - width) / 2;
aRect.nRight = aRect.nLeft + width;
-
- int i=0;
+
+ int i=0;
while( i< POPUP_DRAGGRIP )
{
DrawRect( aRect );
@@ -836,7 +836,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
{
// move the window according to mouse pos
PointerState aState = GetParent()->GetPointerState();
- if (ImplHasMirroredGraphics() && IsRTLEnabled())
+ if (ImplHasMirroredGraphics() && IsRTLEnabled())
ImplMirrorFramePos(aState.maPos);
maTearOffPosition = aState.maPos - maDelta;
GetWindow( WINDOW_BORDER )->SetPosPixel( maTearOffPosition );
@@ -853,8 +853,8 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow )
mpDockingWindow = (Window*) pWindow;
mpParent = pWindow->GetParent();
- mbDockable = TRUE;
- mbLocked = FALSE;
+ mbDockable = TRUE;
+ mbLocked = FALSE;
mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES);
DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow );
if( pDockWin )
@@ -1145,7 +1145,7 @@ BOOL ImplDockingWindowWrapper::Close()
void ImplDockingWindowWrapper::ToggleFloatingMode()
{
// notify dockingwindow/toolbox
- // note: this must be done *before* notifying the
+ // note: this must be done *before* notifying the
// listeners to have the toolbox in the proper state
if( GetWindow()->ImplIsDockingWindow() )
((DockingWindow*) GetWindow())->ToggleFloatingMode();
@@ -1231,7 +1231,7 @@ BOOL ImplDockingWindowWrapper::IsTitleButtonVisible( USHORT nButton ) const
{
if ( nButton == TITLE_BUTTON_DOCKING )
return mbDockBtn;
- else // if ( nButton == TITLE_BUTTON_HIDE )
+ else // if ( nButton == TITLE_BUTTON_HIDE )
return mbHideBtn;
}
}
@@ -1313,7 +1313,7 @@ IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG )
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
- ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
+ ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
@@ -1371,7 +1371,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ?
mnFloatBits | WB_SYSTEMWINDOW
//#ifdef __USE_OWNERDRAWDECORATION__
- | WB_OWNERDRAWDECORATION
+ | WB_OWNERDRAWDECORATION
//#endif
: mnFloatBits,
this );
@@ -1445,7 +1445,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
- ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
+ ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index a176f97d88d5..7e575b66205e 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,8 +59,8 @@ public:
ImplData();
~ImplData();
- Window* mpParent;
- Size maMaxOutSize;
+ Window* mpParent;
+ Size maMaxOutSize;
};
DockingWindow::ImplData::ImplData()
@@ -79,12 +79,12 @@ class ImplDockFloatWin : public FloatingWindow
{
private:
DockingWindow* mpDockWin;
- ULONG mnLastTicks;
- Timer maDockTimer;
- Point maDockPos;
- Rectangle maDockRect;
+ ULONG mnLastTicks;
+ Timer maDockTimer;
+ Point maDockPos;
+ Rectangle maDockRect;
BOOL mbInMove;
- ULONG mnLastUserEvent;
+ ULONG mnLastUserEvent;
DECL_LINK( DockingHdl, ImplDockFloatWin* );
DECL_LINK( DockTimerHdl, ImplDockFloatWin* );
@@ -93,14 +93,14 @@ public:
DockingWindow* pDockingWin );
~ImplDockFloatWin();
- virtual void Move();
- virtual void Resize();
- virtual void TitleButtonClick( USHORT nButton );
- virtual void Pin();
- virtual void Roll();
- virtual void PopupModeEnd();
- virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual void Move();
+ virtual void Resize();
+ virtual void TitleButtonClick( USHORT nButton );
+ virtual void Pin();
+ virtual void Roll();
+ virtual void PopupModeEnd();
+ virtual void Resizing( Size& rSize );
+ virtual BOOL Close();
ULONG GetLastTicks() const { return mnLastTicks; }
};
@@ -175,8 +175,8 @@ IMPL_LINK( ImplDockFloatWin, DockingHdl, ImplDockFloatWin*, EMPTYARG )
PointerState aState = mpDockWin->GetParent()->GetPointerState();
mnLastUserEvent = 0;
- if( mpDockWin->IsDockable() &&
- (Time::GetSystemTicks() - mnLastTicks > 500) &&
+ if( mpDockWin->IsDockable() &&
+ (Time::GetSystemTicks() - mnLastTicks > 500) &&
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
!(aState.mnState & KEY_MOD1) ) // i43499 CTRL disables docking now
{
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 9896333174ce..816bd63d215c 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
ImplData();
~ImplData();
- ToolBox* mpBox;
- Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
+ ToolBox* mpBox;
+ Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
};
FloatingWindow::ImplData::ImplData()
@@ -264,7 +264,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
BOOL bRTL = Application::GetSettings().GetLayoutRTL();
- Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
+ Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) );
Rectangle devRectRTL( devRect );
@@ -339,13 +339,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
bBreak = FALSE;
}
if( bBreak )
- {
+ {
e1 = devRect.TopLeft();
e2 = devRect.BottomLeft();
// set non-zero width
e2.X()++;
// don't clip corners
- e1.Y()++;
+ e1.Y()++;
e2.Y()--;
}
break;
@@ -363,13 +363,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
bBreak = FALSE;
}
if( bBreak )
- {
+ {
e1 = devRect.TopRight();
e2 = devRect.BottomRight();
// set non-zero width
e2.X()++;
// don't clip corners
- e1.Y()++;
+ e1.Y()++;
e2.Y()--;
}
break;
@@ -379,13 +379,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if ( aPos.Y() < aScreenRect.Top() )
bBreak = FALSE;
if( bBreak )
- {
+ {
e1 = devRect.TopLeft();
e2 = devRect.TopRight();
// set non-zero height
e2.Y()++;
// don't clip corners
- e1.X()++;
+ e1.X()++;
e2.X()--;
}
break;
@@ -394,13 +394,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() )
bBreak = FALSE;
if( bBreak )
- {
+ {
e1 = devRect.BottomLeft();
e2 = devRect.BottomRight();
// set non-zero height
e2.Y()++;
// don't clip corners
- e1.X()++;
+ e1.X()++;
e2.X()--;
}
break;
@@ -483,7 +483,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin
else
aAbsolute = Point( pReference->OutputToAbsoluteScreenPixel(
pReference->ScreenToOutputPixel(rPos) ) );
-
+
do
{
// compute the floating window's size in absolute screen coordinates
@@ -499,8 +499,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin
return pWin;
}
- // test, if mouse is in rectangle, (this is typically the rect of the active
- // toolbox item or similar)
+ // test, if mouse is in rectangle, (this is typically the rect of the active
+ // toolbox item or similar)
// note: maFloatRect is set in FloatingWindow::StartPopupMode() and
// is already in absolute device coordinates
if ( pWin->maFloatRect.IsInside( aAbsolute ) )
@@ -669,7 +669,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
if ( IsRollUp() )
RollDown();
- // remove title
+ // remove title
mnOldTitle = mnTitle;
if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && GetText().Len() )
SetTitleType( FLOATWIN_TITLE_POPUP );
@@ -750,15 +750,15 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, ULONG nFlags )
aRect.SetPos( aPos );
nFlags |=
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
-// FLOATWIN_POPUPMODE_NOMOUSECLOSE |
+ FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
+// FLOATWIN_POPUPMODE_NOMOUSECLOSE |
FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE |
-// FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE | // #105968# floating toolboxes should close when clicked in (parent's) float rect
+// FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE | // #105968# floating toolboxes should close when clicked in (parent's) float rect
FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE;
-// | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
+// | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
/*
- * FLOATWIN_POPUPMODE_NOKEYCLOSE |
+ * FLOATWIN_POPUPMODE_NOKEYCLOSE |
* don't set since it disables closing floaters with escape
*/
@@ -792,7 +792,7 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this )
pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
-
+
// Fenster aus der Liste austragen
pSVData->maWinData.mpFirstFloat = mpNextFloat;
mpNextFloat = NULL;
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index a0926ec789ad..b662b054a761 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/javachild.cxx b/vcl/source/window/javachild.cxx
index 3b26e92829a7..250b82010855 100644
--- a/vcl/source/window/javachild.cxx
+++ b/vcl/source/window/javachild.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-
+
#ifdef SOLAR_JAVA
#include <jni.h>
#endif
@@ -83,20 +83,20 @@ void JavaChildWindow::implTestJavaException( void* pEnv )
#ifdef SOLAR_JAVA
JNIEnv* pJavaEnv = reinterpret_cast< JNIEnv* >( pEnv );
jthrowable jtThrowable = pJavaEnv->ExceptionOccurred();
-
- if( jtThrowable )
+
+ if( jtThrowable )
{ // is it a java exception ?
#if OSL_DEBUG_LEVEL > 1
pJavaEnv->ExceptionDescribe();
-#endif // OSL_DEBUG_LEVEL > 1
+#endif // OSL_DEBUG_LEVEL > 1
pJavaEnv->ExceptionClear();
jclass jcThrowable = pJavaEnv->FindClass("java/lang/Throwable");
jmethodID jmThrowable_getMessage = pJavaEnv->GetMethodID(jcThrowable, "getMessage", "()Ljava/lang/String;");
jstring jsMessage = (jstring) pJavaEnv->CallObjectMethod(jtThrowable, jmThrowable_getMessage);
::rtl::OUString ouMessage;
-
- if(jsMessage)
+
+ if(jsMessage)
{
const jchar * jcMessage = pJavaEnv->GetStringChars(jsMessage, NULL);
ouMessage = ::rtl::OUString(jcMessage);
@@ -112,7 +112,7 @@ void JavaChildWindow::implTestJavaException( void* pEnv )
sal_IntPtr JavaChildWindow::getParentWindowHandleForJava()
{
- sal_IntPtr nRet = 0;
+ sal_IntPtr nRet = 0;
#if defined WNT
nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd );
@@ -122,7 +122,7 @@ sal_IntPtr JavaChildWindow::getParentWindowHandleForJava()
#elif defined UNX
#ifdef SOLAR_JAVA
uno::Reference< lang::XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
-
+
if( xFactory.is() && ( GetSystemData()->aWindow > 0 ) )
{
try
@@ -130,65 +130,65 @@ sal_IntPtr JavaChildWindow::getParentWindowHandleForJava()
::rtl::Reference< ::jvmaccess::VirtualMachine > xVM;
uno::Reference< java::XJavaVM > xJavaVM( xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.java.JavaVirtualMachine") ) ), uno::UNO_QUERY );
uno::Sequence< sal_Int8 > aProcessID( 17 );
-
+
rtl_getGlobalProcessId( (sal_uInt8*) aProcessID.getArray() );
aProcessID[ 16 ] = 0;
OSL_ENSURE(sizeof (sal_Int64) >= sizeof (jvmaccess::VirtualMachine *), "Pointer cannot be represented as sal_Int64");
sal_Int64 nPointer = reinterpret_cast< sal_Int64 >( static_cast< jvmaccess::VirtualMachine * >(0));
xJavaVM->getJavaVM(aProcessID) >>= nPointer;
xVM = reinterpret_cast< jvmaccess::VirtualMachine * >(nPointer);
-
+
if( xVM.is() )
{
try
{
::jvmaccess::VirtualMachine::AttachGuard aVMAttachGuard( xVM );
JNIEnv* pEnv = aVMAttachGuard.getEnvironment();
-
- jclass jcToolkit = pEnv->FindClass("java/awt/Toolkit");
+
+ jclass jcToolkit = pEnv->FindClass("java/awt/Toolkit");
implTestJavaException(pEnv);
-
+
jmethodID jmToolkit_getDefaultToolkit = pEnv->GetStaticMethodID( jcToolkit, "getDefaultToolkit", "()Ljava/awt/Toolkit;" );
implTestJavaException(pEnv);
-
+
pEnv->CallStaticObjectMethod(jcToolkit, jmToolkit_getDefaultToolkit);
implTestJavaException(pEnv);
-
+
jclass jcMotifAppletViewer = pEnv->FindClass("sun/plugin/navig/motif/MotifAppletViewer");
if( pEnv->ExceptionOccurred() )
{
pEnv->ExceptionClear();
-
- jcMotifAppletViewer = pEnv->FindClass( "sun/plugin/viewer/MNetscapePluginContext");
+
+ jcMotifAppletViewer = pEnv->FindClass( "sun/plugin/viewer/MNetscapePluginContext");
implTestJavaException(pEnv);
}
-
- jclass jcClassLoader = pEnv->FindClass("java/lang/ClassLoader");
+
+ jclass jcClassLoader = pEnv->FindClass("java/lang/ClassLoader");
implTestJavaException(pEnv);
-
+
jmethodID jmClassLoader_loadLibrary = pEnv->GetStaticMethodID( jcClassLoader, "loadLibrary", "(Ljava/lang/Class;Ljava/lang/String;Z)V");
implTestJavaException(pEnv);
-
+
jstring jsplugin = pEnv->NewStringUTF("javaplugin_jni");
implTestJavaException(pEnv);
-
- pEnv->CallStaticVoidMethod(jcClassLoader, jmClassLoader_loadLibrary, jcMotifAppletViewer, jsplugin, JNI_FALSE);
+
+ pEnv->CallStaticVoidMethod(jcClassLoader, jmClassLoader_loadLibrary, jcMotifAppletViewer, jsplugin, JNI_FALSE);
implTestJavaException(pEnv);
-
+
jmethodID jmMotifAppletViewer_getWidget = pEnv->GetStaticMethodID( jcMotifAppletViewer, "getWidget", "(IIIII)I" );
implTestJavaException(pEnv);
-
+
const Size aSize( GetOutputSizePixel() );
- jint ji_widget = pEnv->CallStaticIntMethod( jcMotifAppletViewer, jmMotifAppletViewer_getWidget,
+ jint ji_widget = pEnv->CallStaticIntMethod( jcMotifAppletViewer, jmMotifAppletViewer_getWidget,
GetSystemData()->aWindow, 0, 0, aSize.Width(), aSize.Height() );
implTestJavaException(pEnv);
-
+
nRet = static_cast< sal_IntPtr >( ji_widget );
}
catch( uno::RuntimeException& )
{
}
-
+
if( !nRet )
nRet = static_cast< sal_IntPtr >( GetSystemData()->aWindow );
}
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 575b8022b739..19ff6c93178e 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,9 +96,9 @@ KeyCode::KeyCode( const ResId& rResId )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nKeyCode = pResMgr->ReadLong();
- ULONG nModifier = pResMgr->ReadLong();
- ULONG nKeyFunc = pResMgr->ReadLong();
+ ULONG nKeyCode = pResMgr->ReadLong();
+ ULONG nModifier = pResMgr->ReadLong();
+ ULONG nKeyFunc = pResMgr->ReadLong();
eFunc = (KeyFuncType)nKeyFunc;
if ( eFunc != KEYFUNC_DONTKNOW )
diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx
index 2677c31cc100..9a2b4dc1db7c 100644
--- a/vcl/source/window/keyevent.cxx
+++ b/vcl/source/window/keyevent.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +72,7 @@ void KeyEvent::InitKeyEvent( ::com::sun::star::awt::KeyEvent& rEvent ) const
}
KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
-{
+{
KeyEvent aClone(*this);
USHORT nCode = maKeyCode.GetCode();
@@ -92,11 +92,11 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
switch (nCode)
{
case KEY_DOWN: aClone.maKeyCode = KeyCode(KEY_RIGHT, nMod); break;
- case KEY_UP: aClone.maKeyCode = KeyCode(KEY_LEFT, nMod); break;
- case KEY_LEFT: aClone.maKeyCode = KeyCode(KEY_DOWN, nMod); break;
+ case KEY_UP: aClone.maKeyCode = KeyCode(KEY_LEFT, nMod); break;
+ case KEY_LEFT: aClone.maKeyCode = KeyCode(KEY_DOWN, nMod); break;
case KEY_RIGHT: aClone.maKeyCode = KeyCode(KEY_UP, nMod); break;
}
- break;
+ break;
case TextDirectionality_LeftToRight_TopToBottom:
/* do nothing */
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e6722c3d90d3..e269766321b6 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +81,9 @@ namespace vcl
struct MenuLayoutData : public ControlLayoutData
{
- std::vector< USHORT > m_aLineItemIds;
- std::vector< USHORT > m_aLineItemPositions;
- std::map< USHORT, Rectangle > m_aVisibleItemBoundRects;
+ std::vector< USHORT > m_aLineItemIds;
+ std::vector< USHORT > m_aLineItemPositions;
+ std::map< USHORT, Rectangle > m_aVisibleItemBoundRects;
};
}
@@ -114,8 +114,8 @@ static BOOL ImplHilite( const MouseEvent& rMEvt )
// read XWP settings at program startup
if (init == FALSE) {
- BOOL rc;
- ULONG cb = sizeof(HOOKCONFIG);
+ BOOL rc;
+ ULONG cb = sizeof(HOOKCONFIG);
memset(&hc, 0, sizeof(HOOKCONFIG));
rc = PrfQueryProfileData( HINI_USER, INIAPP_XWPHOOK, INIKEY_HOOK_CONFIG,
&hc, &cb);
@@ -148,29 +148,29 @@ static BOOL ImplAccelDisabled()
struct MenuItemData
{
- USHORT nId; // SV Id
- MenuItemType eType; // MenuItem-Type
- MenuItemBits nBits; // MenuItem-Bits
- Menu* pSubMenu; // Pointer auf das SubMenu
- Menu* pAutoSubMenu; // Pointer auf SubMenu aus Resource
- XubString aText; // Menu-Text
- XubString aHelpText; // Help-String
- XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
- XubString aCommandStr; // CommandString
+ USHORT nId; // SV Id
+ MenuItemType eType; // MenuItem-Type
+ MenuItemBits nBits; // MenuItem-Bits
+ Menu* pSubMenu; // Pointer auf das SubMenu
+ Menu* pAutoSubMenu; // Pointer auf SubMenu aus Resource
+ XubString aText; // Menu-Text
+ XubString aHelpText; // Help-String
+ XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
+ XubString aCommandStr; // CommandString
XubString aHelpCommandStr; // Help command string (to reference external help)
- ULONG nHelpId; // Help-Id
- ULONG nUserValue; // User value
- Image aImage; // Image
- KeyCode aAccelKey; // Accelerator-Key
- BOOL bChecked; // Checked
- BOOL bEnabled; // Enabled
- BOOL bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true)
- BOOL bIsTemporary; // Temporary inserted ('No selection possible')
- BOOL bMirrorMode;
- long nItemImageAngle;
- Size aSz; // nur temporaer gueltig
- XubString aAccessibleName; // accessible name
- XubString aAccessibleDescription; // accessible description
+ ULONG nHelpId; // Help-Id
+ ULONG nUserValue; // User value
+ Image aImage; // Image
+ KeyCode aAccelKey; // Accelerator-Key
+ BOOL bChecked; // Checked
+ BOOL bEnabled; // Enabled
+ BOOL bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true)
+ BOOL bIsTemporary; // Temporary inserted ('No selection possible')
+ BOOL bMirrorMode;
+ long nItemImageAngle;
+ Size aSz; // nur temporaer gueltig
+ XubString aAccessibleName; // accessible name
+ XubString aAccessibleDescription; // accessible description
SalMenuItem* pSalMenuItem; // access to native menu
@@ -188,7 +188,7 @@ struct MenuItemData
return bChecked || ( nBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) );
}
};
-
+
MenuItemData::~MenuItemData()
{
if( pAutoSubMenu )
@@ -225,7 +225,7 @@ public:
{ return (MenuItemData*)List::GetObject( nPos ); }
MenuItemData* SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, USHORT& rPos, USHORT& nDuplicates, USHORT nCurrentPos ) const;
- USHORT GetItemCount( xub_Unicode cSelectChar ) const;
+ USHORT GetItemCount( xub_Unicode cSelectChar ) const;
USHORT GetItemCount( KeyCode aKeyCode ) const;
uno::Reference< i18n::XCharacterClassification > GetCharClass() const;
@@ -247,20 +247,20 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
const XubString& rStr, const Image& rImage,
Menu* pMenu, USHORT nPos )
{
- MenuItemData* pData = new MenuItemData( rStr, rImage );
- pData->nId = nId;
- pData->eType = eType;
- pData->nBits = nBits;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
- pData->nHelpId = 0;
- pData->nUserValue = 0;
- pData->bChecked = FALSE;
- pData->bEnabled = TRUE;
- pData->bVisible = TRUE;
- pData->bIsTemporary = FALSE;
- pData->bMirrorMode = FALSE;
- pData->nItemImageAngle = 0;
+ MenuItemData* pData = new MenuItemData( rStr, rImage );
+ pData->nId = nId;
+ pData->eType = eType;
+ pData->nBits = nBits;
+ pData->pSubMenu = NULL;
+ pData->pAutoSubMenu = NULL;
+ pData->nHelpId = 0;
+ pData->nUserValue = 0;
+ pData->bChecked = FALSE;
+ pData->bEnabled = TRUE;
+ pData->bVisible = TRUE;
+ pData->bIsTemporary = FALSE;
+ pData->bMirrorMode = FALSE;
+ pData->nItemImageAngle = 0;
SalItemParams aSalMIData;
aSalMIData.nId = nId;
@@ -279,20 +279,20 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
void MenuItemList::InsertSeparator( USHORT nPos )
{
- MenuItemData* pData = new MenuItemData;
- pData->nId = 0;
- pData->eType = MENUITEM_SEPARATOR;
- pData->nBits = 0;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
- pData->nHelpId = 0;
- pData->nUserValue = 0;
- pData->bChecked = FALSE;
- pData->bEnabled = TRUE;
- pData->bVisible = TRUE;
- pData->bIsTemporary = FALSE;
- pData->bMirrorMode = FALSE;
- pData->nItemImageAngle = 0;
+ MenuItemData* pData = new MenuItemData;
+ pData->nId = 0;
+ pData->eType = MENUITEM_SEPARATOR;
+ pData->nBits = 0;
+ pData->pSubMenu = NULL;
+ pData->pAutoSubMenu = NULL;
+ pData->nHelpId = 0;
+ pData->nUserValue = 0;
+ pData->bChecked = FALSE;
+ pData->bEnabled = TRUE;
+ pData->bVisible = TRUE;
+ pData->bIsTemporary = FALSE;
+ pData->bMirrorMode = FALSE;
+ pData->nItemImageAngle = 0;
SalItemParams aSalMIData;
aSalMIData.nId = 0;
@@ -338,7 +338,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
USHORT nListCount = (USHORT)Count();
// try character code first
- nDuplicates = GetItemCount( cSelectChar ); // return number of duplicates
+ nDuplicates = GetItemCount( cSelectChar ); // return number of duplicates
if( nDuplicates )
{
for ( rPos = 0; rPos < nListCount; rPos++)
@@ -347,7 +347,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
if ( pData->bEnabled && rI18nHelper.MatchMnemonic( pData->aText, cSelectChar ) )
{
if( nDuplicates > 1 && rPos == nCurrentPos )
- continue; // select next entry with the same mnemonic
+ continue; // select next entry with the same mnemonic
else
return pData;
}
@@ -355,7 +355,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
}
// nothing found, try keycode instead
- nDuplicates = GetItemCount( aKeyCode ); // return number of duplicates
+ nDuplicates = GetItemCount( aKeyCode ); // return number of duplicates
if( nDuplicates )
{
@@ -374,13 +374,13 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
KeyCode mnKeyCode;
xub_Unicode mnUnicode = pData->aText.GetChar(n+1);
Window* pDefWindow = ImplGetDefaultWindow();
- if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguage(), mnKeyCode )
+ if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguage(), mnKeyCode )
&& aKeyCode.GetCode() == mnKeyCode.GetCode())
|| (ascii && rI18nHelper.MatchMnemonic( pData->aText, ascii ) ) )
{
if( nDuplicates > 1 && rPos == nCurrentPos )
- continue; // select next entry with the same mnemonic
+ continue; // select next entry with the same mnemonic
else
return pData;
}
@@ -430,7 +430,7 @@ USHORT MenuItemList::GetItemCount( KeyCode aKeyCode ) const
// if MapUnicodeToKeyCode fails or is unsupported we try the pure ascii mapping of the keycodes
// so we have working shortcuts when ascii mnemonics are used
Window* pDefWindow = ImplGetDefaultWindow();
- if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), Application::GetSettings().GetUILanguage(), mnKeyCode )
+ if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), Application::GetSettings().GetUILanguage(), mnKeyCode )
&& aKeyCode.GetCode() == mnKeyCode.GetCode())
|| ( ascii && rI18nHelper.MatchMnemonic( pData->aText, ascii ) ) )
nItems++;
@@ -488,7 +488,7 @@ private:
DECL_LINK( ShowHideListener, VclWindowEvent* );
void StateChanged( StateChangedType nType );
- void DataChanged( const DataChangedEvent& rDCEvt );
+ void DataChanged( const DataChangedEvent& rDCEvt );
protected:
Region ImplCalcClipRegion( BOOL bIncludeLogo = TRUE ) const;
void ImplInitClipRegion();
@@ -499,7 +499,7 @@ protected:
void ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd = FALSE );
void ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown );
long ImplGetStartY() const;
- Rectangle ImplGetItemRect( USHORT nPos );
+ Rectangle ImplGetItemRect( USHORT nPos );
public:
MenuFloatingWindow( Menu* pMenu, Window* pParent, WinBits nStyle );
@@ -600,7 +600,7 @@ void DecoToolBox::calcMinSize()
if( GetItemCount() == 0 )
{
ResMgr* pResMgr = ImplGetResMgr();
-
+
Bitmap aBitmap;
if( pResMgr )
aBitmap = Bitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) );
@@ -616,7 +616,7 @@ void DecoToolBox::calcMinSize()
}
}
aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT );
- maMinSize = aTbx.CalcWindowSizePixel();
+ maMinSize = aTbx.CalcWindowSizePixel();
}
Size DecoToolBox::getMinSize()
@@ -638,21 +638,21 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
{
lastSize = nMaxHeight - border;
- Color aEraseColor( 255, 255, 255, 255 );
- BitmapEx aBmpExDst( maImage.GetBitmapEx() );
- BitmapEx aBmpExSrc( GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ Color aEraseColor( 255, 255, 255, 255 );
+ BitmapEx aBmpExDst( maImage.GetBitmapEx() );
+ BitmapEx aBmpExSrc( GetSettings().GetStyleSettings().GetHighContrastMode() ?
maImageHC.GetBitmapEx() : aBmpExDst );
-
+
aEraseColor.SetTransparency( 255 );
aBmpExDst.Erase( aEraseColor );
aBmpExDst.SetSizePixel( Size( lastSize, lastSize ) );
-
+
Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
- Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
- (lastSize - maImage.GetSizePixel().Height())/2 ),
+ Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
+ (lastSize - maImage.GetSizePixel().Height())/2 ),
maImage.GetSizePixel() );
-
+
aBmpExDst.CopyPixel( aDestRect, aSrcRect, &aBmpExSrc );
SetItemImage( IID_DOCUMENTCLOSE, Image( aBmpExDst ) );
}
@@ -676,7 +676,7 @@ private:
USHORT m_nId;
Link m_aSelectLink;
Link m_aHighlightLink;
-
+
AddButtonEntry() : m_nId( 0 ) {}
};
@@ -686,12 +686,12 @@ private:
ULONG nSaveFocusId;
BOOL mbAutoPopup;
BOOL bIgnoreFirstMove;
- BOOL bStayActive;
+ BOOL bStayActive;
DecoToolBox aCloser;
PushButton aFloatBtn;
PushButton aHideBtn;
-
+
std::map< USHORT, AddButtonEntry > m_aAddButtons;
void HighlightItem( USHORT nPos, BOOL bHighlight );
@@ -700,8 +700,8 @@ private:
USHORT ImplFindEntry( const Point& rMousePos ) const;
void ImplCreatePopup( BOOL bPreSelectFirst );
BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE );
- Rectangle ImplGetItemRect( USHORT nPos );
-
+ Rectangle ImplGetItemRect( USHORT nPos );
+
void ImplInitStyleSettings();
DECL_LINK( CloserHdl, PushButton* );
@@ -742,7 +742,7 @@ public:
void SetAutoPopup( BOOL bAuto ) { mbAutoPopup = bAuto; }
void ImplLayoutChanged();
Size MinCloseButtonSize();
-
+
// add an arbitrary button to the menubar (will appear next to closer)
USHORT AddMenuBarButton( const Image&, const Link&, const String&, USHORT nPos );
void SetMenuBarButtonHighlightHdl( USHORT nId, const Link& );
@@ -793,7 +793,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
{
if( ! pMenu )
return FALSE;
-
+
BOOL bDone = FALSE;
USHORT nId = 0;
@@ -846,7 +846,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
// den Hilfe-Index
String aCommand = pMenu->GetItemCommand( nId );
ULONG nHelpId = pMenu->GetHelpId( nId );
-
+
if ( aCommand.Len() )
pHelp->Start( aCommand, NULL );
else if ( nHelpId )
@@ -913,7 +913,7 @@ Menu::Menu( BOOL bMenubar )
Menu::~Menu()
{
DBG_DTOR( Menu, NULL );
-
+
vcl::LazyDeletor<Menu>::Undelete( this );
ImplCallEventListeners( VCLEVENT_OBJECT_DYING, ITEMPOS_INVALID );
@@ -978,7 +978,7 @@ void Menu::ImplInit()
bCanceled = FALSE;
bInCallback = FALSE;
bKilled = FALSE;
- mpLayoutData = NULL;
+ mpLayoutData = NULL;
mpFirstDel = NULL; // Dtor notification list
// Native-support: returns NULL if not supported
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu( bIsMenuBar );
@@ -994,7 +994,7 @@ void Menu::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
-
+
rResId.SetRT( RSC_MENU );
GetRes( rResId );
@@ -1103,7 +1103,7 @@ void Menu::Deactivate()
if( !aDelData.isDeleted() )
{
bInCallback = FALSE;
-
+
if ( this == pStartMenu )
GetpApp()->HideHelpStatusText();
}
@@ -1119,9 +1119,6 @@ void Menu::Highlight()
if ( pStartMenu && ( pStartMenu != this ) )
pStartMenu->aHighlightHdl.Call( this );
}
-
- if ( !aDelData.isDeleted() && GetCurItemId() )
- GetpApp()->ShowHelpStatusText( GetHelpText( GetCurItemId() ) );
}
void Menu::ImplSelect()
@@ -1283,7 +1280,7 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos )
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
-
+
ULONG nObjMask;
GetRes( rResId.SetRT( RSC_MENUITEM ) );
@@ -1623,7 +1620,7 @@ void Menu::SetPopupMenu( USHORT nItemId, PopupMenu* pMenu )
// data exchange
pData->pSubMenu = pMenu;
-
+
// #112023# Make sure pStartedFrom does not point to invalid (old) data
if ( pData->pSubMenu )
pData->pSubMenu->pStartedFrom = 0;
@@ -1906,9 +1903,9 @@ void Menu::SetItemImage( USHORT nItemId, const Image& rImage )
static inline Image ImplRotImage( const Image& rImage, long nAngle10 )
{
- Image aRet;
- BitmapEx aBmpEx( rImage.GetBitmapEx() );
-
+ Image aRet;
+ BitmapEx aBmpEx( rImage.GetBitmapEx() );
+
aBmpEx.Rotate( nAngle10, COL_WHITE );
return Image( aBmpEx );
@@ -1933,9 +1930,9 @@ void Menu::SetItemImageAngle( USHORT nItemId, long nAngle10 )
static inline Image ImplMirrorImage( const Image& rImage )
{
- Image aRet;
- BitmapEx aBmpEx( rImage.GetBitmapEx() );
-
+ Image aRet;
+ BitmapEx aBmpEx( rImage.GetBitmapEx() );
+
aBmpEx.Mirror( BMP_MIRROR_HORZ );
return Image( aBmpEx );
@@ -2024,7 +2021,7 @@ const XubString& Menu::GetHelpCommand( USHORT nItemId ) const
else
return ImplGetSVEmptyStr();
}
-
+
void Menu::SetHelpText( USHORT nItemId, const XubString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2039,7 +2036,7 @@ const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const
if ( pData )
{
- if ( !pData->aHelpText.Len() &&
+ if ( !pData->aHelpText.Len() &&
(( pData->nHelpId ) || ( pData->aCommandStr.Len() )))
{
Help* pHelp = Application::GetHelp();
@@ -2155,7 +2152,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
// check for separator
if( pNextData && pNextData->bVisible && pNextData->eType == MENUITEM_SEPARATOR )
bVisible = FALSE;
-
+
if( bVisible )
{
for( n = nPos; n > 0; n-- )
@@ -2175,7 +2172,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
// Fuer den Menubar nicht erlaubt, weil ich nicht mitbekomme
// ob dadurch ein Eintrag verschwindet oder wieder da ist.
- if ( bVisible && !bIsMenuBar && ( nMenuFlags & MENU_FLAG_HIDEDISABLEDENTRIES ) &&
+ if ( bVisible && !bIsMenuBar && ( nMenuFlags & MENU_FLAG_HIDEDISABLEDENTRIES ) &&
!( nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ) )
{
if( !pData ) // e.g. nPos == ITEMPOS_INVALID
@@ -2213,7 +2210,7 @@ BOOL Menu::ImplIsSelectable( USHORT nPos ) const
// check general visibility first
if ( pData && ( pData->nBits & MIB_NOSELECT ) )
bSelectable = FALSE;
-
+
return bSelectable;
}
@@ -2258,14 +2255,14 @@ void Menu::SelectItem( USHORT nItemId )
}
void Menu::SetAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible )
-{
+{
mxAccessible = rxAccessible;
}
long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) const
{
rMaxWidth = rCheckHeight = rRadioHeight = 0;
-
+
if( ! bIsMenuBar )
{
ImplControlValue aVal;
@@ -2519,7 +2516,7 @@ Size Menu::ImplCalcSize( Window* pWin )
{
nTextPos = (USHORT)(2*nExtra);
aSz.Height() = nFontHeight+6;
-
+
// get menubar height from native methods if supported
if( pWindow->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
@@ -2565,10 +2562,10 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
ImplControlValue aControlValue;
Rectangle aCtrlRegion( i_rRect );
ControlState nState = CTRL_STATE_PRESSED | CTRL_STATE_ENABLED;
-
+
aControlValue.setTristateVal( BUTTONVALUE_ON );
-
- bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
+
+ bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
aCtrlRegion, nState, aControlValue,
rtl::OUString() );
}
@@ -2597,7 +2594,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
if ( pLogo )
aTopLeft.X() = pLogo->aBitmap.GetSizePixel().Width();
-
+
int nOuterSpace = 0;
if( !bIsMenuBar )
{
@@ -2679,23 +2676,23 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
ControlPart nPart = ((pData->nBits & MIB_RADIOCHECK)
? PART_MENU_ITEM_RADIO_MARK
: PART_MENU_ITEM_CHECK_MARK);
-
+
ControlState nState = 0;
-
+
if ( pData->bChecked )
nState |= CTRL_STATE_PRESSED;
-
+
if ( pData->bEnabled )
nState |= CTRL_STATE_ENABLED;
-
+
if ( bHighlighted )
nState |= CTRL_STATE_SELECTED;
-
+
long nCtrlHeight = (pData->nBits & MIB_RADIOCHECK) ? nCheckHeight : nRadioHeight;
aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight)/2;
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
-
- Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
+
+ Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
pWin->DrawNativeControl( CTRL_MENU_POPUP, nPart,
aCheckRect,
nState,
@@ -2705,7 +2702,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
else if ( pData->bChecked ) // by default do nothing for unchecked items
{
ImplPaintCheckBackground( pWin, aOuterCheckRect, pThisItemOnly && bHighlighted );
-
+
SymbolType eSymbol;
Size aSymbolSize;
if ( pData->nBits & MIB_RADIOCHECK )
@@ -3206,7 +3203,7 @@ BOOL Menu::GetSystemMenuData( SystemMenuData* pData ) const
bool Menu::IsHighlighted( USHORT nItemPos ) const
{
bool bRet = false;
-
+
if( pWindow )
{
if( bIsMenuBar )
@@ -3214,7 +3211,7 @@ bool Menu::IsHighlighted( USHORT nItemPos ) const
else
bRet = ( nItemPos == static_cast< MenuFloatingWindow * > (pWindow)->GetHighlightedItem() );
}
-
+
return bRet;
}
@@ -3323,7 +3320,7 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu )
// depending on the native implementation or the displayable flag
// the menubar windows is supressed (ie, height=0)
- if( !((MenuBar*) pMenu)->IsDisplayable() ||
+ if( !((MenuBar*) pMenu)->IsDisplayable() ||
( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) )
nHeight = 0;
@@ -3347,7 +3344,7 @@ BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu )
BOOL bDone = FALSE;
// No keyboard processing when system handles the menu or our menubar is invisible
- if( !IsDisplayable() ||
+ if( !IsDisplayable() ||
( ImplGetSalMenu() && ImplGetSalMenu()->VisibleMenuBar() ) )
return bDone;
@@ -3392,11 +3389,11 @@ BOOL MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = TRUE;
pMenu->Activate();
-
+
if( !aDelData.isDeleted() )
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = FALSE;
}
return TRUE;
}
@@ -3408,10 +3405,10 @@ BOOL MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = TRUE;
pMenu->Deactivate();
if( !aDelData.isDeleted() )
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = FALSE;
}
return TRUE;
}
@@ -3484,7 +3481,7 @@ void MenuBar::RemoveMenuBarButton( USHORT nId )
BOOL MenuBar::HandleMenuButtonEvent( Menu *, USHORT i_nButtonId ) const
{
- return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId );
+ return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId );
}
// -----------------------------------------------------------------------
@@ -3771,7 +3768,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
if ( bRealExecute )
{
pWin->ImplAddDel( &aDelData );
-
+
ImplDelData aModalWinDel;
pW->ImplAddDel( &aModalWinDel );
pW->ImplIncModalCount();
@@ -3943,7 +3940,7 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt
aSubmenuCloseTimer.SetTimeout( GetSettings().GetMouseSettings().GetMenuDelay() );
aSubmenuCloseTimer.SetTimeoutHdl( LINK( this, MenuFloatingWindow, SubmenuClose ) );
aScrollTimer.SetTimeoutHdl( LINK( this, MenuFloatingWindow, AutoScroll ) );
-
+
AddEventListener( LINK( this, MenuFloatingWindow, ShowHideListener ) );
}
@@ -3955,7 +3952,7 @@ void MenuFloatingWindow::doShutdown()
// otherwise the entry will not be read when the menu is opened again
if( nHighlightedItem != ITEMPOS_INVALID )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
-
+
if( !bKeyInput && pMenu && pMenu->pStartedFrom && !pMenu->pStartedFrom->bIsMenuBar )
{
// #102461# remove highlight in parent
@@ -3974,12 +3971,12 @@ void MenuFloatingWindow::doShutdown()
pPWin->HighlightItem( i, FALSE );
}
}
-
+
// free the reference to the accessible component
SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
-
+
aHighlightChangedTimer.Stop();
-
+
// #95056# invalidate screen area covered by system window
// so this can be taken into account if the commandhandler performs a scroll operation
if( GetParent() )
@@ -4047,7 +4044,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
{
if( ! pMenu )
return;
-
+
long nY = nScrollerHeight;
long nMouseY = rMEvt.GetPosPixel().Y();
Size aOutSz = GetOutputSizePixel();
@@ -4180,7 +4177,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
{
if( ! pMenu )
return 0;
-
+
MenuItemData* pItemData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
if ( pItemData )
{
@@ -4256,7 +4253,7 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent*, pEvent )
{
if( ! pMenu )
return 0;
-
+
if( pEvent->GetId() == VCLEVENT_WINDOW_SHOW )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_SHOW, ITEMPOS_INVALID );
else if( pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
@@ -4359,7 +4356,7 @@ void MenuFloatingWindow::EndExecute()
ImplGetSVData()->maWinData.mbNoDeactivate = FALSE;
}
}
-
+
// Wenn von woanders gestartet, dann ab dort aufraumen:
MenuFloatingWindow* pCleanUpFrom = this;
MenuFloatingWindow* pWin = this;
@@ -4483,7 +4480,7 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp )
{
KillActivePopup();
Update();
-
+
if( ! pMenu )
return;
@@ -4648,7 +4645,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
{
if( ! pMenu )
return;
-
+
Size aSz = GetOutputSizePixel();
long nStartY = ImplGetStartY();
long nY = nScrollerHeight+nStartY;
@@ -4659,7 +4656,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
int nOuterSpace = ImplGetSVData()->maNWFData.mnMenuFormatExtraBorder;
nY += nOuterSpace;
-
+
USHORT nCount = (USHORT)pMenu->pItemList->Count();
for ( USHORT n = 0; n < nCount; n++ )
{
@@ -4679,7 +4676,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
long nFontHeight = GetTextHeight();
aItemRect.Right() -= nFontHeight + nFontHeight/4;
}
-
+
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
Size aPxSize( GetOutputSizePixel() );
@@ -4724,7 +4721,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
}
else
SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() );
-
+
DrawRect( aItemRect );
}
pMenu->ImplPaint( this, nScrollerHeight, nStartY, pData, bHighlight );
@@ -4742,7 +4739,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos )
{
if( ! pMenu )
return Rectangle();
-
+
Rectangle aRect;
Size aSz = GetOutputSizePixel();
long nStartY = ImplGetStartY();
@@ -4780,7 +4777,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
{
if( ! pMenu )
return;
-
+
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
USHORT n = nHighlightedItem;
@@ -5026,7 +5023,7 @@ void MenuFloatingWindow::Paint( const Rectangle& )
{
if( ! pMenu )
return;
-
+
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
SetClipRegion();
@@ -5055,7 +5052,7 @@ void MenuFloatingWindow::ImplDrawScroller( BOOL bUp )
{
if( ! pMenu )
return;
-
+
SetClipRegion();
Size aOutSz = GetOutputSizePixel();
@@ -5166,30 +5163,30 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) :
{
BitmapEx aBitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) );
BitmapEx aBitmapHC( ResId( SV_RESID_BITMAP_CLOSEDOCHC, *pResMgr ) );
-
+
aCloser.maImage = Image( aBitmap );
aCloser.maImageHC = Image( aBitmapHC );
-
+
aCloser.SetOutStyle( TOOLBOX_STYLE_FLAT );
aCloser.SetBackground();
aCloser.SetPaintTransparent( TRUE );
aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP );
-
+
aCloser.InsertItem( IID_DOCUMENTCLOSE,
GetSettings().GetStyleSettings().GetHighContrastMode() ? aCloser.maImageHC : aCloser.maImage, 0 );
aCloser.SetSelectHdl( LINK( this, MenuBarWindow, CloserHdl ) );
aCloser.AddEventListener( LINK( this, MenuBarWindow, ToolboxEventHdl ) );
aCloser.SetQuickHelpText( IID_DOCUMENTCLOSE, XubString( ResId( SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr ) ) );
-
+
aFloatBtn.SetClickHdl( LINK( this, MenuBarWindow, FloatHdl ) );
aFloatBtn.SetSymbol( SYMBOL_FLOAT );
aFloatBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_RESTORE, *pResMgr ) ) );
-
+
aHideBtn.SetClickHdl( LINK( this, MenuBarWindow, HideHdl ) );
aHideBtn.SetSymbol( SYMBOL_HIDE );
aHideBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_MINIMIZE, *pResMgr ) ) );
}
-
+
ImplInitStyleSettings();
AddEventListener( LINK( this, MenuBarWindow, ShowHideListener ) );
@@ -5244,7 +5241,7 @@ IMPL_LINK( MenuBarWindow, CloserHdl, PushButton*, EMPTYARG )
{
if( ! pMenu )
return 0;
-
+
if( aCloser.GetCurItemId() == IID_DOCUMENTCLOSE )
{
// #i106052# call close hdl asynchronously to ease handler implementation
@@ -5271,7 +5268,7 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent )
{
if( ! pMenu )
return 0;
-
+
MenuBar::MenuBarButtonCallbackArg aArg;
aArg.nId = 0xffff;
aArg.bHighlight = (pEvent->GetId() == VCLEVENT_TOOLBOX_HIGHLIGHT);
@@ -5295,7 +5292,7 @@ IMPL_LINK( MenuBarWindow, ShowHideListener, VclWindowEvent*, pEvent )
{
if( ! pMenu )
return 0;
-
+
if( pEvent->GetId() == VCLEVENT_WINDOW_SHOW )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_SHOW, ITEMPOS_INVALID );
else if( pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
@@ -5433,7 +5430,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt )
}
USHORT nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
- if ( ( nEntry != ITEMPOS_INVALID )
+ if ( ( nEntry != ITEMPOS_INVALID )
#ifdef OS2
&& ( ImplHilite(rMEvt) )
#endif
@@ -5445,7 +5442,7 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
{
if( ! pMenu )
return;
-
+
// #57934# ggf. das aktive Popup sofort schliessen, damit TH's Hintergrundsicherung funktioniert.
MenuItemData* pNextData = pMenu->pItemList->GetDataFromPos( n );
if ( pActivePopup && pActivePopup->ImplGetWindow() && ( !pNextData || ( pActivePopup != pNextData->pSubMenu ) ) )
@@ -5466,10 +5463,10 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
if( !ImplGetSVData()->maWinData.mbNoSaveFocus )
{
// we didn't clean up last time
- Window::EndSaveFocus( nSaveFocusId, FALSE ); // clean up
+ Window::EndSaveFocus( nSaveFocusId, FALSE ); // clean up
nSaveFocusId = 0;
if( !bNoSaveFocus )
- nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
+ nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
}
else {
; // do nothing: we 're activated again from taskpanelist, focus was already saved
@@ -5478,7 +5475,7 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
else
{
if( !bNoSaveFocus )
- nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
+ nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
}
}
else
@@ -5528,7 +5525,7 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
{
if( ! pMenu )
return;
-
+
long nX = 0;
ULONG nCount = pMenu->pItemList->Count();
for ( ULONG n = 0; n < nCount; n++ )
@@ -5559,7 +5556,7 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
aControlValue,
OUString() );
ImplAddNWFSeparator( this, aControlValue );
-
+
// draw selected item
DrawNativeControl( CTRL_MENUBAR, PART_MENU_ITEM,
aRect,
@@ -5619,7 +5616,7 @@ Rectangle MenuBarWindow::ImplGetItemRect( USHORT nPos )
aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
break;
}
-
+
nX += pData->aSz.Width();
}
}
@@ -5636,7 +5633,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
{
if( ! pMenu )
return FALSE;
-
+
if ( pMenu->bInCallback )
return TRUE; // schlucken
@@ -5682,7 +5679,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
else
n = pMenu->GetItemCount()-1;
}
-
+
// handling gtk like (aka mbOpenMenuOnF10)
// do not highlight an item when opening a sub menu
// unless there already was a higlighted sub menu item
@@ -5806,7 +5803,7 @@ void MenuBarWindow::Paint( const Rectangle& )
{
if( ! pMenu )
return;
-
+
// no VCL paint if native menus
if( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() )
{
@@ -5936,7 +5933,7 @@ void MenuBarWindow::ImplLayoutChanged()
// depending on the native implementation or the displayable flag
// the menubar windows is supressed (ie, height=0)
- if( !((MenuBar*) pMenu)->IsDisplayable() ||
+ if( !((MenuBar*) pMenu)->IsDisplayable() ||
( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) )
nHeight = 0;
@@ -6012,7 +6009,7 @@ USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLi
std::map< USHORT, AddButtonEntry >::const_iterator it;
if( i_nPos > m_aAddButtons.size() )
i_nPos = static_cast<USHORT>(m_aAddButtons.size());
- do
+ do
{
nId++;
it = m_aAddButtons.find( nId );
@@ -6027,10 +6024,10 @@ USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLi
aFloatBtn.IsVisible(),
aHideBtn.IsVisible() );
ImplLayoutChanged();
-
+
if( pMenu->mpSalMenu )
pMenu->mpSalMenu->AddMenuBarButton( SalMenuButtonItem( nId, i_rImage, i_rToolTip ) );
-
+
return nId;
}
@@ -6055,7 +6052,7 @@ Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( USHORT nId )
return Rectangle();
}
}
-
+
if( aRect.IsEmpty() )
{
aRect = aCloser.GetItemRect( nId );
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index 3b61abb81bee..b73726c71e79 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -345,7 +345,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// do
// {
// c = aKey.GetChar( nIndex );
-//
+//
// nMnemonicIndex = ImplGetMnemonicIndex( c );
// if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
// {
@@ -354,7 +354,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// bChanged = TRUE;
// break;
// }
-//
+//
// // Search for next word
// do
// {
@@ -388,7 +388,7 @@ String MnemonicGenerator::EraseAllMnemonicChars( const String& rStr )
String aStr = rStr;
xub_StrLen nLen = aStr.Len();
xub_StrLen i = 0;
-
+
while ( i < nLen )
{
if ( aStr.GetChar( i ) == '~' )
@@ -397,8 +397,8 @@ String MnemonicGenerator::EraseAllMnemonicChars( const String& rStr )
if( i > 0 && (i+2) < nLen )
{
sal_Unicode c = aStr.GetChar(i+1);
- if( aStr.GetChar( i-1 ) == '(' &&
- aStr.GetChar( i+2 ) == ')' &&
+ if( aStr.GetChar( i-1 ) == '(' &&
+ aStr.GetChar( i+2 ) == ')' &&
c >= MNEMONIC_RANGE_2_START && c <= MNEMONIC_RANGE_2_END )
{
aStr.Erase( i-1, 4 );
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index f76c29e5ba9c..297804765452 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/mouseevent.cxx b/vcl/source/window/mouseevent.cxx
index 4dbb7385f94f..e43a0f67896e 100644
--- a/vcl/source/window/mouseevent.cxx
+++ b/vcl/source/window/mouseevent.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 7a21ab627381..bad0c0c94bda 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +70,11 @@ static void ImplInitMsgBoxImageList()
void MessBox::ImplInitMessBoxData()
{
- mpFixedText = NULL;
- mpFixedImage = NULL;
- mnSoundType = 0;
- mbHelpBtn = FALSE;
- mbSound = TRUE;
+ mpFixedText = NULL;
+ mpFixedImage = NULL;
+ mnSoundType = 0;
+ mbHelpBtn = FALSE;
+ mbSound = TRUE;
mpCheckBox = NULL;
mbCheck = FALSE;
}
@@ -84,11 +84,11 @@ void MessBox::ImplInitMessBoxData()
void MessBox::ImplInitButtons()
{
WinBits nStyle = GetStyle();
- USHORT nOKFlags = BUTTONDIALOG_OKBUTTON;
- USHORT nCancelFlags = BUTTONDIALOG_CANCELBUTTON;
- USHORT nRetryFlags = 0;
- USHORT nYesFlags = 0;
- USHORT nNoFlags = 0;
+ USHORT nOKFlags = BUTTONDIALOG_OKBUTTON;
+ USHORT nCancelFlags = BUTTONDIALOG_CANCELBUTTON;
+ USHORT nRetryFlags = 0;
+ USHORT nYesFlags = 0;
+ USHORT nNoFlags = 0;
if ( nStyle & WB_OK_CANCEL )
{
@@ -189,13 +189,13 @@ MessBox::MessBox( Window* pParent, const ResId& rResId ) :
ImplInitMessBoxData();
GetRes( rResId.SetRT( RSC_MESSBOX ) );
- USHORT nHiButtons = ReadShortRes();
- USHORT nLoButtons = ReadShortRes();
+ USHORT nHiButtons = ReadShortRes();
+ USHORT nLoButtons = ReadShortRes();
USHORT nHiDefButton = ReadShortRes();
USHORT nLoDefButton = ReadShortRes();
- USHORT nHiHelpId = ReadShortRes();
- USHORT nLoHelpId = ReadShortRes();
- /* USHORT bSysModal = */ ReadShortRes();
+ USHORT nHiHelpId = ReadShortRes();
+ USHORT nLoHelpId = ReadShortRes();
+ /* USHORT bSysModal = */ ReadShortRes();
SetHelpId( ((ULONG)nHiHelpId << 16) + nLoHelpId );
WinBits nBits = (((ULONG)nHiButtons << 16) + nLoButtons) |
(((ULONG)nHiDefButton << 16) + nLoDefButton);
@@ -247,21 +247,21 @@ void MessBox::ImplPosControls()
}
}
- XubString aMessText( maMessText );
- TextRectInfo aTextInfo;
- Rectangle aRect( 0, 0, 30000, 30000 );
- Rectangle aFormatRect;
- Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y );
- Size aImageSize;
- Size aPageSize;
- Size aFixedSize;
- long nTitleWidth;
- long nButtonSize = ImplGetButtonSize();
- long nMaxWidth = GetDesktopRectPixel().GetWidth()-8;
- long nMaxLineWidth;
- long nWidth;
- WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL | WB_INFO;
- USHORT nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
+ XubString aMessText( maMessText );
+ TextRectInfo aTextInfo;
+ Rectangle aRect( 0, 0, 30000, 30000 );
+ Rectangle aFormatRect;
+ Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y );
+ Size aImageSize;
+ Size aPageSize;
+ Size aFixedSize;
+ long nTitleWidth;
+ long nButtonSize = ImplGetButtonSize();
+ long nMaxWidth = GetDesktopRectPixel().GetWidth()-8;
+ long nMaxLineWidth;
+ long nWidth;
+ WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL | WB_INFO;
+ USHORT nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
if ( mpFixedText )
delete mpFixedText;
@@ -279,8 +279,8 @@ void MessBox::ImplPosControls()
// Message-Text um Tabs bereinigen
- XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) );
- USHORT nIndex = 0;
+ XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) );
+ USHORT nIndex = 0;
while ( nIndex != STRING_NOTFOUND )
nIndex = aMessText.SearchAndReplace( '\t', aTabStr, nIndex );
@@ -304,7 +304,7 @@ void MessBox::ImplPosControls()
aImageSize = maImage.GetSizePixel();
if ( aImageSize.Width() )
{
- aImageSize.Width() += 4;
+ aImageSize.Width() += 4;
aImageSize.Height() += 4;
aTextPos.X() += aImageSize.Width()+IMPL_SEP_MSGBOX_IMAGE;
mpFixedImage = new FixedImage( this );
@@ -348,19 +348,19 @@ void MessBox::ImplPosControls()
}
// Style fuer FixedText ermitteln
- aPageSize.Width() = aImageSize.Width();
- aFixedSize.Width() = aTextInfo.GetMaxLineWidth()+1;
+ aPageSize.Width() = aImageSize.Width();
+ aFixedSize.Width() = aTextInfo.GetMaxLineWidth()+1;
aFixedSize.Height() = aFormatRect.GetHeight();
if ( aFixedSize.Height() < aImageSize.Height() )
{
nWinStyle |= WB_VCENTER;
- aPageSize.Height() = aImageSize.Height();
+ aPageSize.Height() = aImageSize.Height();
aFixedSize.Height() = aImageSize.Height();
}
else
{
nWinStyle |= WB_TOP;
- aPageSize.Height() = aFixedSize.Height();
+ aPageSize.Height() = aFixedSize.Height();
}
if ( aImageSize.Width() )
aPageSize.Width() += IMPL_SEP_MSGBOX_IMAGE;
@@ -585,7 +585,7 @@ void ErrorBox::ImplInitErrorBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_ERROR)+1;
}
diff --git a/vcl/source/window/popupmenuwindow.cxx b/vcl/source/window/popupmenuwindow.cxx
index 46fc51d8176d..d96279e86b09 100644
--- a/vcl/source/window/popupmenuwindow.cxx
+++ b/vcl/source/window/popupmenuwindow.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 98e7c279559a..8ce5ed61d13d 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -168,7 +168,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
aNewSize.Height() -= 2;
Size aScaledSize;
double fScale = 1.0;
-
+
// #i106435# catch corner case of Size(0,0)
Size aOrigSize( maOrigSize );
if( aOrigSize.Width() < 1 )
@@ -189,9 +189,9 @@ void PrintDialog::PrintPreviewWindow::Resize()
}
aScaledSize.Width() = long(aScaledSize.Width()*fScale);
aScaledSize.Height() = long(aScaledSize.Height()*fScale);
-
+
maPreviewSize = aScaledSize;
-
+
// #i104784# if we render the page too small then rounding issues result in
// layout artifacts looking really bad. So scale the page unto a device that is not
// full page size but not too small either. This also results in much better visual
@@ -205,7 +205,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
aScaledSize.Height() *= 2;
fZoom /= 2.0;
}
-
+
maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
}
@@ -233,10 +233,10 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
else
{
GDIMetaFile aMtf( maMtf );
-
+
Point aOffset( (aSize.Width() - maPreviewSize.Width()) / 2,
(aSize.Height() - maPreviewSize.Height()) / 2 );
-
+
Size aVDevSize( maPageVDev.GetOutputSizePixel() );
const Size aLogicSize( maPageVDev.PixelToLogic( aVDevSize, MapMode( MAP_100TH_MM ) ) );
Size aOrigSize( maOrigSize );
@@ -245,8 +245,8 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
if( aOrigSize.Height() < 1 )
aOrigSize.Height() = aLogicSize.Height();
double fScale = double(aLogicSize.Width())/double(aOrigSize.Width());
-
-
+
+
maPageVDev.Erase();
maPageVDev.Push();
maPageVDev.SetMapMode( MAP_100TH_MM );
@@ -255,11 +255,11 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
aMtf.WindStart();
aMtf.Play( &maPageVDev, Point( 0, 0 ), aLogicSize );
maPageVDev.Pop();
-
+
SetMapMode( MAP_PIXEL );
maPageVDev.SetMapMode( MAP_PIXEL );
DrawOutDev( aOffset, maPreviewSize, Point( 0, 0 ), aVDevSize, maPageVDev );
-
+
DecorationView aVw( this );
Rectangle aFrame( aOffset + Point( -1, -1 ), Size( maPreviewSize.Width() + 2, maPreviewSize.Height() + 2 ) );
aVw.DrawFrame( aFrame, FRAME_DRAW_GROUP );
@@ -340,7 +340,7 @@ void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect )
Window::Paint( i_rRect );
SetMapMode( MAP_PIXEL );
SetTextColor( GetSettings().GetStyleSettings().GetFieldTextColor() );
-
+
int nPages = mnRows * mnColumns;
Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
aFont.SetSize( Size( 0, 24 ) );
@@ -356,7 +356,7 @@ void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect )
long nFontHeight = long(24.0*fScale) - 3;
if( nFontHeight < 5 )
nFontHeight = 5;
- aFont.SetSize( Size( 0, nFontHeight ) );
+ aFont.SetSize( Size( 0, nFontHeight ) );
SetFont( aFont );
long nTextHeight = GetTextHeight();
for( int i = 0; i < nPages; i++ )
@@ -408,11 +408,11 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
, maBorderCB( this, VclResId( SV_PRINT_PRT_NUP_BORDER_CB ) )
{
FreeResource();
-
+
maNupOrderWin.Show();
maPagesBtn.Check( TRUE );
maBrochureBtn.Show( FALSE );
-
+
// setup field units for metric fields
const LocaleDataWrapper& rLocWrap( maPageMarginEdt.GetLocaleDataWrapper() );
FieldUnit eUnit = FUNIT_MM;
@@ -429,7 +429,7 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
// set precision
maPageMarginEdt.SetDecimalDigits( nDigits );
maSheetMarginEdt.SetDecimalDigits( nDigits );
-
+
SMHID1( "NUpPage" );
maNupLine.SMHID2("NUpPage", "Layout");
maBrochureBtn.SMHID2("NUpPage", "Brochure" );
@@ -437,7 +437,7 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
maPagesBoxTitleTxt.SMHID2( "NUpPage", "PagesPerSheetLabel" );
maNupPagesBox.SMHID2( "NUpPage", "PagesPerSheetBox" );
maNupNumPagesTxt.SMHID2( "NUpPage", "Columns" );
- maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" );
+ maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" );
maNupTimesTxt.SMHID2( "NUpPage", "Rows" );
maNupRowsEdt.SMHID2( "NUpPage", "RowsBox" );
maPageMarginTxt1.SMHID2( "NUpPage", "PageMargin" );
@@ -506,7 +506,7 @@ void PrintDialog::NUpTabPage::setupLayout()
maLayout.setParentWindow( this );
maLayout.setOuterBorder( aBorder.Width() );
-
+
maLayout.addWindow( &maNupLine );
boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &maLayout, false ) );
maLayout.addChild( xRow );
@@ -519,12 +519,12 @@ void PrintDialog::NUpTabPage::setupLayout()
boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xShowNupCol.get() ) );
xShowNupCol->addChild( xSpacer );
- boost::shared_ptr< vcl::LabelColumn > xMainCol( new vcl::LabelColumn( xIndent.get() ) );
+ boost::shared_ptr< vcl::LabelColumn > xMainCol( new vcl::LabelColumn( xIndent.get() ) );
xIndent->setChild( xMainCol );
-
+
size_t nPagesIndex = xMainCol->addRow( &maPagesBtn, &maNupPagesBox );
mxPagesBtnLabel = boost::dynamic_pointer_cast<vcl::LabeledElement>( xMainCol->getChild( nPagesIndex ) );
-
+
xRow.reset( new vcl::RowOrColumn( xMainCol.get(), false ) );
xMainCol->addRow( &maNupNumPagesTxt, xRow, nIndent );
xRow->addWindow( &maNupColEdt );
@@ -535,16 +535,16 @@ void PrintDialog::NUpTabPage::setupLayout()
xLab->setLabel( &maPageMarginEdt );
xLab->setElement( &maPageMarginTxt2 );
xMainCol->addRow( &maPageMarginTxt1, xLab, nIndent );
-
+
xLab.reset( new vcl::LabeledElement( xMainCol.get(), 2 ) );
xLab->setLabel( &maSheetMarginEdt );
xLab->setElement( &maSheetMarginTxt2 );
xMainCol->addRow( &maSheetMarginTxt1, xLab, nIndent );
xMainCol->addRow( &maNupOrientationTxt, &maNupOrientationBox, nIndent );
- xMainCol->addRow( &maNupOrderTxt, &maNupOrderBox, nIndent );
+ xMainCol->addRow( &maNupOrderTxt, &maNupOrderBox, nIndent );
xMainCol->setBorders( xMainCol->addWindow( &maBorderCB ), nIndent, 0, 0, 0 );
-
+
xSpacer.reset( new vcl::Spacer( xMainCol.get(), 0, Size( 10, aBorder.Width() ) ) );
xMainCol->addChild( xSpacer );
@@ -552,7 +552,7 @@ void PrintDialog::NUpTabPage::setupLayout()
xMainCol->addRow( &maBrochureBtn, xRow );
// remember brochure row for dependencies
mxBrochureDep = xRow;
-
+
// initially advanced controls are not shown, rows=columns=1
showAdvancedControls( false );
}
@@ -623,12 +623,12 @@ PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId )
maCopyCountField.SMHID2( "JobPage", "Copies" );
maCollateBox.SMHID2( "JobPage", "Collate" );
maCollateImage.SMHID2( "JobPage", "CollateImage" );
-
+
maCopySpacer.Show();
maStatusTxt.Show();
maCommentTxt.Show();
maLocationTxt.Show();
-
+
setupLayout();
}
@@ -641,7 +641,7 @@ void PrintDialog::JobTabPage::setupLayout()
// HACK: this is not a dropdown box, but the dropdown line count
// sets the results of GetOptimalSize in a normal ListBox
maPrinters.SetDropDownLineCount( 4 );
-
+
Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
maLayout.setParentWindow( this );
@@ -656,9 +656,9 @@ void PrintDialog::JobTabPage::setupLayout()
boost::shared_ptr< vcl::RowOrColumn > xDetRow( new vcl::RowOrColumn( &maLayout, false ) );
maLayout.addChild( xDetRow );
xDetRow->addWindow( &maDetailsBtn );
- xDetRow->addChild( new vcl::Spacer( xDetRow.get(), 2 ) );
+ xDetRow->addChild( new vcl::Spacer( xDetRow.get(), 2 ) );
xDetRow->addWindow( &maSetupButton );
-
+
// create an indent for details
boost::shared_ptr< vcl::Indenter > xIndent( new vcl::Indenter( &maLayout ) );
maLayout.addChild( xIndent );
@@ -675,7 +675,7 @@ void PrintDialog::JobTabPage::setupLayout()
maLayout.addWindow( &maCopies );
boost::shared_ptr< vcl::RowOrColumn > xRangeRow( new vcl::RowOrColumn( &maLayout, false, aBorder.Width() ) );
maLayout.addChild( xRangeRow );
-
+
// create print range and add to range row
mxPrintRange.reset( new vcl::RowOrColumn( xRangeRow.get() ) );
xRangeRow->addChild( mxPrintRange );
@@ -683,7 +683,7 @@ void PrintDialog::JobTabPage::setupLayout()
boost::shared_ptr< vcl::RowOrColumn > xCopyCollateCol( new vcl::RowOrColumn( xRangeRow.get() ) );
xRangeRow->addChild( xCopyCollateCol );
-
+
// add copies row to copy/collate column
boost::shared_ptr< vcl::LabeledElement > xCopiesRow( new vcl::LabeledElement( xCopyCollateCol.get(), 2 ) );
xCopyCollateCol->addChild( xCopiesRow );
@@ -702,7 +702,7 @@ void PrintDialog::JobTabPage::readFromSettings()
{
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue;
-
+
aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CollateBox" ) ) );
if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) )
@@ -750,7 +750,7 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe
maToFileBox.SMHID2( "OptPage", "ToFile" );
maCollateSingleJobsBox.SMHID2( "OptPage", "SingleJobs" );
maReverseOrderBox.SMHID2( "OptPage", "Reverse" );
-
+
setupLayout();
}
@@ -764,7 +764,7 @@ void PrintDialog::OutputOptPage::setupLayout()
maLayout.setParentWindow( this );
maLayout.setOuterBorder( aBorder.Width() );
-
+
maLayout.addWindow( &maOptionsLine );
boost::shared_ptr<vcl::Indenter> xIndent( new vcl::Indenter( &maLayout, aBorder.Width() ) );
maLayout.addChild( xIndent );
@@ -787,7 +787,7 @@ void PrintDialog::OutputOptPage::storeToSettings()
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToFile" ) ),
rtl::OUString::createFromAscii( maToFileBox.IsChecked() ? "true" : "false" ) );
}
-
+
void PrintDialog::OutputOptPage::Resize()
{
maLayout.setManagedArea( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
@@ -818,32 +818,32 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
, mbShowLayoutPage( sal_True )
{
FreeResource();
-
+
// save printbutton text, gets exchanged occasionally with print to file
maPrintText = maOKButton.GetText();
-
+
// setup preview controls
maForwardBtn.SetStyle( maForwardBtn.GetStyle() | WB_BEVELBUTTON );
maBackwardBtn.SetStyle( maBackwardBtn.GetStyle() | WB_BEVELBUTTON );
-
+
// insert the job (general) tab page first
maTabCtrl.InsertPage( SV_PRINT_TAB_JOB, maJobPage.GetText() );
maTabCtrl.SetTabPage( SV_PRINT_TAB_JOB, &maJobPage );
-
+
// set symbols on forward and backward button
maBackwardBtn.SetSymbol( SYMBOL_PREV );
maForwardBtn.SetSymbol( SYMBOL_NEXT );
maBackwardBtn.ImplSetSmallSymbol( TRUE );
maForwardBtn.ImplSetSmallSymbol( TRUE );
-
+
maPageStr = maNumPagesText.GetText();
-
+
// init reverse print
maOptionsPage.maReverseOrderBox.Check( maPController->getReversePrint() );
// get the first page
preparePreview( true, true );
-
+
// fill printer listbox
const std::vector< rtl::OUString >& rQueues( Printer::GetPrinterQueues() );
for( std::vector< rtl::OUString >::const_iterator it = rQueues.begin();
@@ -876,10 +876,10 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
}
// update the text fields for the printer
updatePrinterText();
-
+
// set a select handler
maJobPage.maPrinters.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
-
+
// setup sizes for N-Up
Size aNupSize( maPController->getPrinter()->PixelToLogic(
maPController->getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
@@ -895,7 +895,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
}
maNUpPage.initFromMultiPageSetup( maPController->getMultipage() );
-
+
// setup click handler on the various buttons
maOKButton.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
#if OSL_DEBUG_LEVEL > 1
@@ -912,7 +912,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
maOptionsPage.maReverseOrderBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maOptionsPage.maCollateSingleJobsBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maNUpPage.maPagesBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
-
+
// setup modify hdl
maPageEdit.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
maJobPage.maCopyCountField.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
@@ -921,20 +921,20 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
maNUpPage.maPageMarginEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
maNUpPage.maSheetMarginEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
- // setup select hdl
+ // setup select hdl
maNUpPage.maNupPagesBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
maNUpPage.maNupOrientationBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
maNUpPage.maNupOrderBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
// setup the layout
setupLayout();
-
+
// setup optional UI options set by application
setupOptionalUI();
-
+
// set change handler for UI options
maPController->setOptionChangeHdl( LINK( this, PrintDialog, UIOptionsChanged ) );
-
+
// set min size pixel to current size
Size aOutSize( GetOutputSizePixel() );
SetMinOutputSizePixel( aOutSize );
@@ -960,7 +960,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
SetOutputSizePixel( aOutSize );
}
}
-
+
// set HelpIDs
SMHID1( "Dialog" );
maOKButton.SMHID1( "OK" );
@@ -984,10 +984,10 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
// restore settings from last run
readFromSettings();
-
+
// setup dependencies
checkControlDependencies();
-
+
}
PrintDialog::~PrintDialog()
@@ -1004,11 +1004,11 @@ void PrintDialog::setupLayout()
Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
maLayout.setParentWindow( this );
-
+
boost::shared_ptr< vcl::RowOrColumn > xPreviewAndTab( new vcl::RowOrColumn( &maLayout, false ) );
size_t nIndex = maLayout.addChild( xPreviewAndTab, 5 );
maLayout.setBorders( nIndex, aBorder.Width(), aBorder.Width(), aBorder.Width(), 0 );
-
+
// setup column for preview and sub controls
boost::shared_ptr< vcl::RowOrColumn > xPreview( new vcl::RowOrColumn( xPreviewAndTab.get() ) );
xPreviewAndTab->addChild( xPreview, 5 );
@@ -1026,18 +1026,18 @@ void PrintDialog::setupLayout()
mxPreviewCtrls->addWindow( &maForwardBtn );
xSpacer.reset( new vcl::Spacer( mxPreviewCtrls.get(), 2 ) );
mxPreviewCtrls->addChild( xSpacer );
-
+
// continue with the tab ctrl
xPreviewAndTab->addWindow( &maTabCtrl );
-
+
// add the button line
maLayout.addWindow( &maButtonLine );
-
+
// add the row for the buttons
boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &maLayout, false ) );
nIndex = maLayout.addChild( xButtons );
maLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() );
-
+
Size aMinSize( maCancelButton.GetSizePixel() );
// insert help button
xButtons->setMinimumSize( xButtons->addWindow( &maHelpButton ), aMinSize );
@@ -1053,7 +1053,7 @@ void PrintDialog::readFromSettings()
maJobPage.readFromSettings();
maNUpPage.readFromSettings();
maOptionsPage.readFromSettings();
-
+
// read last selected tab page; if it exists, actiavte it
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
@@ -1076,7 +1076,7 @@ void PrintDialog::storeToSettings()
maJobPage.storeToSettings();
maNUpPage.storeToSettings();
maOptionsPage.storeToSettings();
-
+
// store last selected printer
SettingsConfigItem* pItem = SettingsConfigItem::get();
pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
@@ -1135,7 +1135,7 @@ static void setHelpText( Window* /*i_pWindow*/, const Sequence< rtl::OUString >&
{
// without a help text set and the correct smartID,
// help texts will be retrieved from the online help system
-
+
// passed help texts for optional UI is used only for native dialogs which currently
// cannot access the same (rather implicit) mechanism
}
@@ -1159,9 +1159,9 @@ void PrintDialog::setupOptionalUI()
USHORT nOptPageId = 9, nCurSubGroup = 0;
bool bOnStaticPage = false;
bool bSubgroupOnStaticPage = false;
-
+
std::multimap< rtl::OUString, vcl::RowOrColumn* > aPropertyToDependencyRowMap;
-
+
const Sequence< PropertyValue >& rOptions( maPController->getUIOptions() );
for( int i = 0; i < rOptions.getLength(); i++ )
{
@@ -1252,10 +1252,10 @@ void PrintDialog::setupOptionalUI()
mbShowLayoutPage = ! bNoLayoutPage;
}
}
-
+
// bUseDependencyRow should only be true if a dependency exists
bUseDependencyRow = bUseDependencyRow && (aDependsOnName.getLength() != 0);
-
+
// is it necessary to switch between static and dynamic pages ?
bool bSwitchPage = false;
if( aGroupingHint.getLength() )
@@ -1312,12 +1312,12 @@ void PrintDialog::setupOptionalUI()
pNewGroup->SetText( aText );
maTabCtrl.InsertPage( ++nOptPageId, aText );
maTabCtrl.SetTabPage( nOptPageId, pNewGroup );
-
+
// set help id
setSmartId( pNewGroup, "TabPage", nOptPageId );
// set help text
setHelpText( pNewGroup, aHelpTexts, 0 );
-
+
// reset subgroup counter
nCurSubGroup = 0;
@@ -1344,7 +1344,7 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pNewSub );
pNewSub->SetText( aText );
pNewSub->Show();
-
+
// set help id
setSmartId( pNewSub, "FixedLine", sal_Int32( nCurSubGroup++ ) );
// set help text
@@ -1377,16 +1377,16 @@ void PrintDialog::setupOptionalUI()
maNUpPage.maBrochureBtn.Check( bVal );
maNUpPage.maBrochureBtn.Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL );
maNUpPage.maBrochureBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( &maNUpPage.maBrochureBtn );
maControlToPropertyMap[&maNUpPage.maBrochureBtn] = aPropertyName;
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, maNUpPage.mxBrochureDep.get() ) );
- }
+ }
else
{
vcl::RowOrColumn* pSaveCurColumn = pCurColumn;
-
+
if( bUseDependencyRow )
{
// find the correct dependency row (if any)
@@ -1414,26 +1414,26 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pNewBox );
pNewBox->SetText( aText );
pNewBox->Show();
-
+
sal_Bool bVal = sal_False;
PropertyValue* pVal = maPController->getValue( aPropertyName );
if( pVal )
pVal->Value >>= bVal;
pNewBox->Check( bVal );
pNewBox->SetToggleHdl( LINK( this, PrintDialog, UIOption_CheckHdl ) );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pNewBox );
maControlToPropertyMap[pNewBox] = aPropertyName;
-
+
// set help id
setSmartId( pNewBox, "CheckBox", -1, aPropertyName );
// set help text
setHelpText( pNewBox, aHelpTexts, 0 );
-
+
vcl::RowOrColumn* pDependencyRow = new vcl::RowOrColumn( pCurColumn, false );
pCurColumn->addChild( pDependencyRow );
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pDependencyRow ) );
-
+
// add checkbox to current column
pDependencyRow->addWindow( pNewBox );
}
@@ -1447,7 +1447,7 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pHeading );
pHeading->SetText( aText );
pHeading->Show();
-
+
// set help id
setSmartId( pHeading, "FixedText", -1, aPropertyName );
// set help text
@@ -1473,7 +1473,7 @@ void PrintDialog::setupOptionalUI()
boost::shared_ptr<vcl::RowOrColumn> pDependencyRow( new vcl::RowOrColumn( pLabel.get(), false ) );
pLabel->setElement( pDependencyRow );
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pDependencyRow.get() ) );
-
+
RadioButton* pBtn = new RadioButton( pCurParent, m == 0 ? WB_GROUP : 0 );
maControls.push_front( pBtn );
pBtn->SetText( aChoices[m] );
@@ -1483,7 +1483,7 @@ void PrintDialog::setupOptionalUI()
maPropertyToWindowMap[ aPropertyName ].push_back( pBtn );
maControlToPropertyMap[pBtn] = aPropertyName;
maControlToNumValMap[pBtn] = m;
-
+
// set help id
setSmartId( pBtn, "RadioButton", m, aPropertyName );
// set help text
@@ -1501,7 +1501,7 @@ void PrintDialog::setupOptionalUI()
vcl::RowOrColumn* pFieldColumn = new vcl::RowOrColumn( pCurColumn, false );
pCurColumn->addChild( pFieldColumn );
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pFieldColumn ) );
-
+
vcl::LabeledElement* pLabel = NULL;
if( aText.getLength() )
{
@@ -1510,21 +1510,21 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pHeading );
pHeading->SetText( aText );
pHeading->Show();
-
+
// set help id
setSmartId( pHeading, "FixedText", -1, aPropertyName );
-
+
// add to row
pLabel = new vcl::LabeledElement( pFieldColumn, 2 );
pFieldColumn->addChild( pLabel );
pLabel->setLabel( pHeading );
}
-
+
if( aCtrlType.equalsAscii( "List" ) )
{
ListBox* pList = new ListBox( pCurParent, WB_DROPDOWN | WB_BORDER );
maControls.push_front( pList );
-
+
// iterate options
for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
{
@@ -1538,15 +1538,15 @@ void PrintDialog::setupOptionalUI()
pList->SetSelectHdl( LINK( this, PrintDialog, UIOption_SelectHdl ) );
pList->SetDropDownLineCount( static_cast<USHORT>(aChoices.getLength()) );
pList->Show();
-
+
// set help id
setSmartId( pList, "ListBox", -1, aPropertyName );
// set help text
setHelpText( pList, aHelpTexts, 0 );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pList );
maControlToPropertyMap[pList] = aPropertyName;
-
+
// finish the pair
if( pLabel )
pLabel->setElement( pList );
@@ -1557,7 +1557,7 @@ void PrintDialog::setupOptionalUI()
{
NumericField* pField = new NumericField( pCurParent, WB_BORDER | WB_SPIN );
maControls.push_front( pField );
-
+
// set min/max and current value
if( nMinValue != nMaxValue )
{
@@ -1571,15 +1571,15 @@ void PrintDialog::setupOptionalUI()
pField->SetValue( nCurVal );
pField->SetModifyHdl( LINK( this, PrintDialog, UIOption_ModifyHdl ) );
pField->Show();
-
+
// set help id
setSmartId( pField, "NumericField", -1, aPropertyName );
// set help text
setHelpText( pField, aHelpTexts, 0 );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pField );
maControlToPropertyMap[pField] = aPropertyName;
-
+
// add to row
if( pLabel )
pLabel->setElement( pField );
@@ -1590,7 +1590,7 @@ void PrintDialog::setupOptionalUI()
{
Edit* pField = new Edit( pCurParent, WB_BORDER );
maControls.push_front( pField );
-
+
rtl::OUString aCurVal;
PropertyValue* pVal = maPController->getValue( aPropertyName );
if( pVal && pVal->Value.hasValue() )
@@ -1598,15 +1598,15 @@ void PrintDialog::setupOptionalUI()
pField->SetText( aCurVal );
pField->SetModifyHdl( LINK( this, PrintDialog, UIOption_ModifyHdl ) );
pField->Show();
-
+
// set help id
setSmartId( pField, "Edit", -1, aPropertyName );
// set help text
setHelpText( pField, aHelpTexts, 0 );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pField );
maControlToPropertyMap[pField] = aPropertyName;
-
+
// add to row
if( pLabel )
pLabel->setElement( pField );
@@ -1618,11 +1618,11 @@ void PrintDialog::setupOptionalUI()
{
DBG_ERROR( "Unsupported UI option" );
}
-
+
pCurColumn = pSaveCurColumn;
}
}
-
+
// #i106506# if no brochure button, then the singular Pages radio button
// makes no sense, so replace it by a FixedText label
if( ! maNUpPage.maBrochureBtn.IsVisible() )
@@ -1635,17 +1635,17 @@ void PrintDialog::setupOptionalUI()
maNUpPage.maPagesBtn.Show( FALSE );
}
}
-
+
// update enable states
checkOptionalControlDependencies();
-
+
// print range empty (currently math only) -> hide print range and spacer line
if( maJobPage.mxPrintRange->countElements() == 0 )
{
maJobPage.mxPrintRange->show( false, false );
maJobPage.maCopySpacer.Show( FALSE );
}
-
+
#ifdef WNT
// FIXME: the GetNativeControlRegion call on Windows has some issues
// (which skew the results of GetOptimalSize())
@@ -1709,7 +1709,7 @@ void PrintDialog::setupOptionalUI()
maJobPage.Resize();
maNUpPage.Resize();
maOptionsPage.Resize();
-
+
Size aSz = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
SetOutputSizePixel( aSz );
}
@@ -1728,14 +1728,14 @@ void PrintDialog::checkControlDependencies()
maJobPage.maCollateBox.Enable( maJobPage.mnCollateUIMode == 0 );
else
maJobPage.maCollateBox.Enable( FALSE );
-
+
Image aImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateImg : maJobPage.maNoCollateImg );
Image aHCImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateHCImg : maJobPage.maNoCollateHCImg );
bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
-
+
Size aImgSize( aImg.GetSizePixel() );
Size aHCImgSize( aHCImg.GetSizePixel() );
-
+
if( aHCImgSize.Width() > aImgSize.Width() )
aImgSize.Width() = aHCImgSize.Width();
if( aHCImgSize.Height() > aImgSize.Height() )
@@ -1802,7 +1802,7 @@ void PrintDialog::checkOptionalControlDependencies()
bShouldbeEnabled = true;
}
}
-
+
bool bIsEnabled = it->first->IsEnabled();
// Enable does not do a change check first, so can be less cheap than expected
if( bShouldbeEnabled != bIsEnabled )
@@ -1851,7 +1851,7 @@ void PrintDialog::setPreviewText( sal_Int32 )
{
rtl::OUString aNewText( searchAndReplace( maPageStr, "%n", 2, rtl::OUString::valueOf( mnCachedPages ) ) );
maNumPagesText.SetText( aNewText );
-
+
// if layout is already established the refresh layout of
// preview controls since text length may have changes
if( mxPreviewCtrls.get() )
@@ -1863,17 +1863,17 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
// page range may have changed depending on options
sal_Int32 nPages = maPController->getFilteredPageCount();
mnCachedPages = nPages;
-
+
if( mnCurPage >= nPages )
mnCurPage = nPages-1;
if( mnCurPage < 0 )
mnCurPage = 0;
-
+
setPreviewText( mnCurPage );
maPageEdit.SetMin( 1 );
maPageEdit.SetMax( nPages );
-
+
if( i_bNewPage )
{
const MapMode aMapMode( MAP_100TH_MM );
@@ -1889,12 +1889,12 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
aMtf.Move( aOff.X(), aOff.Y() );
}
}
-
+
Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr,
aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY()
);
-
+
maForwardBtn.Enable( mnCurPage < nPages-1 );
maBackwardBtn.Enable( mnCurPage != 0 );
maPageEdit.Enable( nPages > 1 );
@@ -1924,7 +1924,7 @@ void PrintDialog::updateNupFromPages()
long nPageMargin = long(maNUpPage.maPageMarginEdt.Denormalize(maNUpPage.maPageMarginEdt.GetValue( FUNIT_100TH_MM )));
long nSheetMargin = long(maNUpPage.maSheetMarginEdt.Denormalize(maNUpPage.maSheetMarginEdt.GetValue( FUNIT_100TH_MM )));
bool bCustom = false;
-
+
if( nPages == 1 )
{
nRows = nCols = 1;
@@ -1960,12 +1960,12 @@ void PrintDialog::updateNupFromPages()
}
else
bCustom = true;
-
+
if( nPages > 1 )
{
// set upper limits for margins based on job page size and rows/columns
Size aSize( getJobPageSize() );
-
+
// maximum sheet distance: 1/2 sheet
long nHorzMax = aSize.Width()/2;
long nVertMax = aSize.Height()/2;
@@ -1973,11 +1973,11 @@ void PrintDialog::updateNupFromPages()
nSheetMargin = nHorzMax;
if( nSheetMargin > nVertMax )
nSheetMargin = nVertMax;
-
- maNUpPage.maSheetMarginEdt.SetMax(
- maNUpPage.maSheetMarginEdt.Normalize(
+
+ maNUpPage.maSheetMarginEdt.SetMax(
+ maNUpPage.maSheetMarginEdt.Normalize(
nHorzMax > nVertMax ? nVertMax : nHorzMax ), FUNIT_100TH_MM );
-
+
// maximum page distance
nHorzMax = (aSize.Width() - 2*nSheetMargin);
if( nCols > 1 )
@@ -1985,12 +1985,12 @@ void PrintDialog::updateNupFromPages()
nVertMax = (aSize.Height() - 2*nSheetMargin);
if( nRows > 1 )
nHorzMax /= (nRows-1);
-
+
if( nPageMargin > nHorzMax )
nPageMargin = nHorzMax;
if( nPageMargin > nVertMax )
nPageMargin = nVertMax;
-
+
maNUpPage.maPageMarginEdt.SetMax(
maNUpPage.maSheetMarginEdt.Normalize(
nHorzMax > nVertMax ? nVertMax : nHorzMax ), FUNIT_100TH_MM );
@@ -2000,7 +2000,7 @@ void PrintDialog::updateNupFromPages()
maNUpPage.maNupColEdt.SetValue( nCols );
maNUpPage.maPageMarginEdt.SetValue( maNUpPage.maPageMarginEdt.Normalize( nPageMargin ), FUNIT_100TH_MM );
maNUpPage.maSheetMarginEdt.SetValue( maNUpPage.maSheetMarginEdt.Normalize( nSheetMargin ), FUNIT_100TH_MM );
-
+
maNUpPage.showAdvancedControls( bCustom );
if( bCustom )
{
@@ -2024,29 +2024,29 @@ void PrintDialog::updateNup()
int nCols = int(maNUpPage.maNupColEdt.GetValue());
long nPageMargin = long(maNUpPage.maPageMarginEdt.Denormalize(maNUpPage.maPageMarginEdt.GetValue( FUNIT_100TH_MM )));
long nSheetMargin = long(maNUpPage.maSheetMarginEdt.Denormalize(maNUpPage.maSheetMarginEdt.GetValue( FUNIT_100TH_MM )));
-
+
PrinterController::MultiPageSetup aMPS;
aMPS.nRows = nRows;
aMPS.nColumns = nCols;
aMPS.nRepeat = 1;
- aMPS.nLeftMargin =
- aMPS.nTopMargin =
- aMPS.nRightMargin =
+ aMPS.nLeftMargin =
+ aMPS.nTopMargin =
+ aMPS.nRightMargin =
aMPS.nBottomMargin = nSheetMargin;
-
+
aMPS.nHorizontalSpacing =
aMPS.nVerticalSpacing = nPageMargin;
aMPS.bDrawBorder = maNUpPage.maBorderCB.IsChecked();
-
- int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData(
+
+ int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData(
maNUpPage.maNupOrderBox.GetSelectEntryPos() )));
if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTD )
aMPS.nOrder = PrinterController::LRTB;
else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TDLR )
aMPS.nOrder = PrinterController::TBLR;
-
- int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData(
+
+ int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData(
maNUpPage.maNupOrientationBox.GetSelectEntryPos() )));
if( nOrientationMode == SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE )
aMPS.aPaperSize = maNupLandscapeSize;
@@ -2057,18 +2057,18 @@ void PrintDialog::updateNup()
// get size of first real page to see if it is portrait or landscape
// we assume same page sizes for all the pages for this
Size aPageSize = getJobPageSize();
-
+
Size aMultiSize( aPageSize.Width() * nCols, aPageSize.Height() * nRows );
if( aMultiSize.Width() > aMultiSize.Height() ) // fits better on landscape
aMPS.aPaperSize = maNupLandscapeSize;
else
- aMPS.aPaperSize = maNupPortraitSize;
+ aMPS.aPaperSize = maNupPortraitSize;
}
-
+
maPController->setMultipage( aMPS );
-
+
maNUpPage.maNupOrderWin.setValues( nOrderMode, nCols, nRows );
-
+
preparePreview( true, true );
}
@@ -2092,7 +2092,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
maNUpPage.maPagesBtn.Check();
updateNupFromPages();
}
-
+
return 0;
}
@@ -2133,9 +2133,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
{
sal_Bool bVal = maNUpPage.maBrochureBtn.IsChecked();
pVal->Value <<= bVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2328,12 +2328,12 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox )
if( pVal )
{
makeEnabled( i_pBox );
-
+
sal_Bool bVal = i_pBox->IsChecked();
pVal->Value <<= bVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2352,12 +2352,12 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
if( pVal && it != maControlToNumValMap.end() )
{
makeEnabled( i_pBtn );
-
+
sal_Int32 nVal = it->second;
pVal->Value <<= nVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2371,12 +2371,12 @@ IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox )
if( pVal )
{
makeEnabled( i_pBox );
-
+
sal_Int32 nVal( i_pBox->GetSelectEntryPos() );
pVal->Value <<= nVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2407,9 +2407,9 @@ IMPL_LINK( PrintDialog, UIOption_ModifyHdl, Edit*, i_pBox )
rtl::OUString aVal( i_pBox->GetText() );
pVal->Value <<= aVal;
}
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2472,9 +2472,9 @@ PrintProgressDialog::PrintProgressDialog( Window* i_pParent, int i_nMax ) :
if( mnMax < 1 )
mnMax = 1;
-
+
maStr = maText.GetText();
-
+
maButton.SetClickHdl( LINK( this, PrintProgressDialog, ClickHdl ) );
}
@@ -2487,7 +2487,7 @@ IMPL_LINK( PrintProgressDialog, ClickHdl, Button*, pButton )
{
if( pButton == &maButton )
mbCanceled = true;
-
+
return 0;
}
@@ -2514,7 +2514,7 @@ void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax )
{
if( maProgressRect.IsEmpty() )
implCalcProgressRect();
-
+
mnCur = i_nCurrent;
if( i_nMax != -1 )
mnMax = i_nMax;
@@ -2525,7 +2525,7 @@ void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax )
rtl::OUString aNewText( searchAndReplace( maStr, "%p", 2, rtl::OUString::valueOf( mnCur ) ) );
aNewText = searchAndReplace( aNewText, "%n", 2, rtl::OUString::valueOf( mnMax ) );
maText.SetText( aNewText );
-
+
// update progress
Invalidate( maProgressRect, INVALIDATE_UPDATE );
}
@@ -2545,7 +2545,7 @@ void PrintProgressDialog::Paint( const Rectangle& )
{
if( maProgressRect.IsEmpty() )
implCalcProgressRect();
-
+
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Color aPrgsColor = rStyleSettings.GetHighlightColor();
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 159216beb484..3ebdfc936a7f 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx
index 0b00d0940059..d366c2a66c06 100644
--- a/vcl/source/window/scrwnd.hxx
+++ b/vcl/source/window/scrwnd.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +34,13 @@
// - Defines -
// -----------
-#define WHEELMODE_NONE 0x00000000UL
-#define WHEELMODE_VH 0x00000001UL
-#define WHEELMODE_V 0x00000002UL
-#define WHEELMODE_H 0x00000004UL
-#define WHEELMODE_SCROLL_VH 0x00000008UL
-#define WHEELMODE_SCROLL_V 0x00000010UL
-#define WHEELMODE_SCROLL_H 0x00000020UL
+#define WHEELMODE_NONE 0x00000000UL
+#define WHEELMODE_VH 0x00000001UL
+#define WHEELMODE_V 0x00000002UL
+#define WHEELMODE_H 0x00000004UL
+#define WHEELMODE_SCROLL_VH 0x00000008UL
+#define WHEELMODE_SCROLL_V 0x00000010UL
+#define WHEELMODE_SCROLL_H 0x00000020UL
// -------------------
// - ImplWheelWindow -
@@ -52,44 +52,44 @@ class ImplWheelWindow : public FloatingWindow
{
private:
- ImageList maImgList;
- Bitmap maWheelBmp;
- CommandScrollData maCommandScrollData;
- Point maLastMousePos;
- Point maCenter;
- Timer* mpTimer;
- ULONG mnRepaintTime;
- ULONG mnTimeout;
- ULONG mnWheelMode;
- ULONG mnMaxWidth;
- ULONG mnActWidth;
- ULONG mnActDist;
- long mnActDeltaX;
- long mnActDeltaY;
-
- void ImplCreateImageList();
- void ImplSetRegion( const Bitmap& rRegionBmp );
+ ImageList maImgList;
+ Bitmap maWheelBmp;
+ CommandScrollData maCommandScrollData;
+ Point maLastMousePos;
+ Point maCenter;
+ Timer* mpTimer;
+ ULONG mnRepaintTime;
+ ULONG mnTimeout;
+ ULONG mnWheelMode;
+ ULONG mnMaxWidth;
+ ULONG mnActWidth;
+ ULONG mnActDist;
+ long mnActDeltaX;
+ long mnActDeltaY;
+
+ void ImplCreateImageList();
+ void ImplSetRegion( const Bitmap& rRegionBmp );
using Window::ImplGetMousePointer;
- PointerStyle ImplGetMousePointer( long nDistX, long nDistY );
- void ImplDrawWheel();
- void ImplRecalcScrollValues();
-
+ PointerStyle ImplGetMousePointer( long nDistX, long nDistY );
+ void ImplDrawWheel();
+ void ImplRecalcScrollValues();
+
DECL_LINK( ImplScrollHdl, Timer* pTimer );
-
-protected:
-
- virtual void Paint( const Rectangle& rRect );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
-
-public:
-
+
+protected:
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+
+public:
+
ImplWheelWindow( Window* pParent );
~ImplWheelWindow();
void ImplStop();
- void ImplSetWheelMode( ULONG nWheelMode );
- ULONG ImplGetWheelMode() const { return mnWheelMode; }
+ void ImplSetWheelMode( ULONG nWheelMode );
+ ULONG ImplGetWheelMode() const { return mnWheelMode; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 88ec11d4cc66..46f6fafeabd9 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
inline BOOL SelectionEngine::ShouldDeselect( BOOL bModifierKey1 ) const
{
-// return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 );
+// return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 );
return eSelMode != MULTIPLE_SELECTION || !bModifierKey1;
}
@@ -203,7 +203,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
nFlags &= (~SELENG_CMDEVT);
if ( !pFunctionSet || !pWin )
return FALSE;
- const bool bRightClickCursorPositioning =
+ const bool bRightClickCursorPositioning =
rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection();
if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning )
return FALSE;
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index df03cf321ce3..4c1b2457083d 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +41,8 @@
#include <rtl/instance.hxx>
#include <vcl/window.h>
-namespace
-{
+namespace
+{
struct ImplBlackWall
: public rtl::StaticWithInit<Wallpaper, ImplBlackWall> {
Wallpaper operator () () {
@@ -54,7 +54,7 @@ namespace
Wallpaper operator () () {
return Wallpaper(COL_LIGHTGRAY);
}
- };
+ };
}
// =======================================================================
@@ -62,11 +62,11 @@ namespace
void Splitter::ImplInitSplitterData()
{
ImplGetWindowImpl()->mbSplitter = TRUE;
- mpRefWin = NULL;
- mnSplitPos = 0;
- mnLastSplitPos = 0;
+ mpRefWin = NULL;
+ mnSplitPos = 0;
+ mnLastSplitPos = 0;
mnStartSplitPos = 0;
- mbDragFull = FALSE;
+ mbDragFull = FALSE;
mbKbdSplitting = FALSE;
mbInKeyEvent = 0;
mnKeyboardStepSize = SPLITTER_DEFAULTSTEPSIZE;
@@ -103,11 +103,11 @@ void Splitter::ImplInit( Window* pParent, WinBits nWinStyle )
if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
SetBackground( ImplWhiteWall::get() );
- else
+ else
SetBackground( ImplBlackWall::get() );
TaskPaneList *pTList = GetSystemWindow()->GetTaskPaneList();
- pTList->AddWindow( this );
+ pTList->AddWindow( this );
}
// -----------------------------------------------------------------------
@@ -138,13 +138,13 @@ void Splitter::ImplDrawSplitter()
if ( mbHorzSplit )
{
- aInvRect.Left() = maDragPos.X() - 1;
- aInvRect.Right() = maDragPos.X() + 1;
+ aInvRect.Left() = maDragPos.X() - 1;
+ aInvRect.Right() = maDragPos.X() + 1;
}
else
{
- aInvRect.Top() = maDragPos.Y() - 1;
- aInvRect.Bottom() = maDragPos.Y() + 1;
+ aInvRect.Top() = maDragPos.Y() - 1;
+ aInvRect.Bottom() = maDragPos.Y() + 1;
}
mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), SHOWTRACK_SPLIT );
@@ -179,7 +179,7 @@ Splitter::Splitter( Window* pParent, const ResId& rResId ) :
Splitter::~Splitter()
{
TaskPaneList *pTList = GetSystemWindow()->GetTaskPaneList();
- pTList->RemoveWindow( this );
+ pTList->RemoveWindow( this );
}
// -----------------------------------------------------------------------
@@ -195,7 +195,7 @@ long Splitter::GetKeyboardStepSize() const
{
return mnKeyboardStepSize;
}
-
+
// -----------------------------------------------------------------------
Splitter* Splitter::ImplFindSibling()
@@ -217,7 +217,7 @@ Splitter* Splitter::ImplFindSibling()
}
// -----------------------------------------------------------------------
-
+
BOOL Splitter::ImplSplitterActive()
{
// is splitter in document or at scrollbar handle ?
@@ -401,7 +401,7 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode )
int maxiter = 500; // avoid endless loop
int delta=0;
int delta_step = mbHorzSplit ? aSize.Width()/10 : aSize.Height()/10;
-
+
// use the specified step size if it was set
if( mnKeyboardStepSize != SPLITTER_DEFAULTSTEPSIZE )
delta_step = mnKeyboardStepSize;
@@ -417,16 +417,16 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode )
switch( nCode )
{
- case KEY_LEFT:
+ case KEY_LEFT:
aNewPos.X()-=delta;
break;
- case KEY_RIGHT:
+ case KEY_RIGHT:
aNewPos.X()+=delta;
break;
- case KEY_UP:
+ case KEY_UP:
aNewPos.Y()-=delta;
break;
- case KEY_DOWN:
+ case KEY_DOWN:
aNewPos.Y()+=delta;
break;
default:
@@ -447,7 +447,7 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode )
if ( aNewPos.Y() == maDragPos.Y() )
continue;
}
-
+
maDragPos = aNewPos;
long nNewPos;
if ( mbHorzSplit )
@@ -557,7 +557,7 @@ void Splitter::ImplStartKbdSplitting()
StartSplit();
- // determine start position
+ // determine start position
// because we have no mouse position we take either the position
// of the splitter window or the last split position
// the other coordinate is just the center of the reference window
@@ -728,7 +728,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt )
GrabFocusToDocument();
break;
}
- mbInKeyEvent = 0;
+ mbInKeyEvent = 0;
}
// -----------------------------------------------------------------------
@@ -751,7 +751,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
{
if( newFaceColor.IsDark() )
SetBackground( ImplWhiteWall::get() );
- else
+ else
SetBackground( ImplBlackWall::get() );
}
}
@@ -762,7 +762,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
void Splitter::Paint( const Rectangle& rPaintRect )
{
if( HasFocus() || mbKbdSplitting )
- {
+ {
Color oldFillCol = GetFillColor();
Color oldLineCol = GetLineColor();
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index ebf06634a3b3..75c81639bc8e 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,49 +51,49 @@
// Achtung: Darf keine Objekte enthalten, da mit memmove/memcpy gearbeitet wird
struct ImplSplitItem
{
- long mnSize;
- long mnPixSize;
- long mnLeft;
- long mnTop;
- long mnWidth;
- long mnHeight;
- long mnSplitPos;
- long mnSplitSize;
- long mnOldSplitPos;
- long mnOldSplitSize;
- long mnOldWidth;
- long mnOldHeight;
- ImplSplitSet* mpSet;
- Window* mpWindow;
- Window* mpOrgParent;
- USHORT mnId;
+ long mnSize;
+ long mnPixSize;
+ long mnLeft;
+ long mnTop;
+ long mnWidth;
+ long mnHeight;
+ long mnSplitPos;
+ long mnSplitSize;
+ long mnOldSplitPos;
+ long mnOldSplitSize;
+ long mnOldWidth;
+ long mnOldHeight;
+ ImplSplitSet* mpSet;
+ Window* mpWindow;
+ Window* mpOrgParent;
+ USHORT mnId;
SplitWindowItemBits mnBits;
- BOOL mbFixed;
- BOOL mbSubSize;
+ BOOL mbFixed;
+ BOOL mbSubSize;
};
struct ImplSplitSet
{
- ImplSplitItem* mpItems;
- Wallpaper* mpWallpaper;
- Bitmap* mpBitmap;
- long mnLastSize;
- long mnSplitSize;
- USHORT mnItems;
- USHORT mnId;
- BOOL mbCalcPix;
+ ImplSplitItem* mpItems;
+ Wallpaper* mpWallpaper;
+ Bitmap* mpBitmap;
+ long mnLastSize;
+ long mnSplitSize;
+ USHORT mnItems;
+ USHORT mnId;
+ BOOL mbCalcPix;
};
-#define SPLITWIN_SPLITSIZE 3
-#define SPLITWIN_SPLITSIZEEX 4
-#define SPLITWIN_SPLITSIZEEXLN 6
-#define SPLITWIN_SPLITSIZEAUTOHIDE 36
-#define SPLITWIN_SPLITSIZEFADE 36
+#define SPLITWIN_SPLITSIZE 3
+#define SPLITWIN_SPLITSIZEEX 4
+#define SPLITWIN_SPLITSIZEEXLN 6
+#define SPLITWIN_SPLITSIZEAUTOHIDE 36
+#define SPLITWIN_SPLITSIZEFADE 36
-#define SPLIT_HORZ ((USHORT)0x0001)
-#define SPLIT_VERT ((USHORT)0x0002)
-#define SPLIT_WINDOW ((USHORT)0x0004)
-#define SPLIT_NOSPLIT ((USHORT)0x8000)
+#define SPLIT_HORZ ((USHORT)0x0001)
+#define SPLIT_VERT ((USHORT)0x0002)
+#define SPLIT_WINDOW ((USHORT)0x0004)
+#define SPLIT_NOSPLIT ((USHORT)0x8000)
// -----------------------------------------------------------------------
@@ -107,39 +107,39 @@ static void ImplCalcBorder( WindowAlign eAlign, BOOL bNoAlign,
{
if ( bNoAlign )
{
- rLeft = 2;
- rTop = 2;
- rRight = 2;
+ rLeft = 2;
+ rTop = 2;
+ rRight = 2;
rBottom = 2;
}
else
{
if ( eAlign == WINDOWALIGN_TOP )
{
- rLeft = 2;
- rTop = 2;
- rRight = 2;
+ rLeft = 2;
+ rTop = 2;
+ rRight = 2;
rBottom = 0;
}
else if ( eAlign == WINDOWALIGN_LEFT )
{
- rLeft = 2;
- rTop = 2;
- rRight = 0;
+ rLeft = 2;
+ rTop = 2;
+ rRight = 0;
rBottom = 2;
}
else if ( eAlign == WINDOWALIGN_BOTTOM )
{
- rLeft = 2;
- rTop = 0;
- rRight = 2;
+ rLeft = 2;
+ rTop = 0;
+ rRight = 2;
rBottom = 2;
}
else
{
- rLeft = 0;
- rTop = 2;
- rRight = 2;
+ rLeft = 0;
+ rTop = 2;
+ rRight = 2;
rBottom = 2;
}
}
@@ -149,15 +149,15 @@ static void ImplCalcBorder( WindowAlign eAlign, BOOL bNoAlign,
void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
{
- const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
- long nDX = pWin->mnDX;
- long nDY = pWin->mnDY;
+ const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
+ long nDX = pWin->mnDX;
+ long nDY = pWin->mnDY;
if ( pWin->mbNoAlign )
{
- DecorationView aDecoView( pWin );
- Point aTmpPoint;
- Rectangle aRect( aTmpPoint, Size( nDX, nDY ) );
+ DecorationView aDecoView( pWin );
+ Point aTmpPoint;
+ Rectangle aRect( aTmpPoint, Size( nDX, nDY ) );
aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEIN );
}
else
@@ -254,9 +254,9 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin )
{
if ( pWin->mbFadeOut || pWin->mbAutoHide )
{
- const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
- long nDX = pWin->mnDX;
- long nDY = pWin->mnDY;
+ const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
+ long nDX = pWin->mnDX;
+ long nDY = pWin->mnDY;
if ( pWin->meAlign == WINDOWALIGN_LEFT )
{
@@ -296,9 +296,9 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId )
if ( pSet->mnId == nId )
return pSet;
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -323,9 +323,9 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId )
static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -353,9 +353,9 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos
static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -380,18 +380,18 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
BOOL bRows, BOOL bDown = TRUE )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i].mnWidth && pItems[i].mnHeight )
{
// Wegen ICC auftrennen
- Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
- Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
- Rectangle aRect( aPoint, aSize );
+ Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
+ Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
+ Rectangle aRect( aPoint, aSize );
if ( bRows )
{
if ( bDown )
@@ -427,9 +427,9 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
static void ImplDeleteSet( ImplSplitSet* pSet )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -469,27 +469,27 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( !pSet->mpItems )
return;
- USHORT i;
- USHORT j;
- USHORT nMins;
- USHORT nCalcItems;
- USHORT nItems = pSet->mnItems;
- USHORT nVisItems;
- USHORT nAbsItems;
- long nCalcSize;
- long nSizeDelta;
- long nCurSize;
- long nSizeWinSize;
- long nNewSizeWinSize;
- long nTemp;
- long nTempErr;
- long nErrorSum;
- long nCurSizeDelta;
- long nPos;
- long nMaxPos;
- long* pSize;
- ImplSplitItem* pItems = pSet->mpItems;
- BOOL bEmpty;
+ USHORT i;
+ USHORT j;
+ USHORT nMins;
+ USHORT nCalcItems;
+ USHORT nItems = pSet->mnItems;
+ USHORT nVisItems;
+ USHORT nAbsItems;
+ long nCalcSize;
+ long nSizeDelta;
+ long nCurSize;
+ long nSizeWinSize;
+ long nNewSizeWinSize;
+ long nTemp;
+ long nTempErr;
+ long nErrorSum;
+ long nCurSizeDelta;
+ long nPos;
+ long nMaxPos;
+ long* pSize;
+ ImplSplitItem* pItems = pSet->mpItems;
+ BOOL bEmpty;
// Anzahl sichtbarer Items ermitteln
nVisItems = 0;
@@ -509,10 +509,10 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( pSet->mbCalcPix || (pSet->mnLastSize != nCalcSize) )
{
long nPercentFactor = 10;
- long nRelCount = 0;
- long nPercent = 0;
- long nRelPercent = 0;
- long nAbsSize = 0;
+ long nRelCount = 0;
+ long nPercent = 0;
+ long nRelPercent = 0;
+ long nAbsSize = 0;
for ( i = 0; i < nItems; i++ )
{
if ( !(pItems[i].mnBits & SWIB_INVISIBLE) )
@@ -573,11 +573,11 @@ static void ImplCalcSet( ImplSplitSet* pSet,
pSet->mnLastSize = nCalcSize;
// Fenster einpassen
- nSizeDelta = nCalcSize-nCurSize;
+ nSizeDelta = nCalcSize-nCurSize;
if ( nSizeDelta )
{
- nAbsItems = 0;
- nSizeWinSize = 0;
+ nAbsItems = 0;
+ nSizeWinSize = 0;
nNewSizeWinSize = 0;
// Zuerst die absoluten Items relativ resizen
@@ -610,8 +610,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
// Jetzt die Rundunsfehler ausgleichen
- j = 0;
- nMins = 0;
+ j = 0;
+ nMins = 0;
while ( nSizeDelta && (nItems != nMins) )
{
// Feststellen, welche Items berechnet werden duerfen
@@ -649,9 +649,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
// Groessen von den einzelnen Items abziehen
- nErrorSum = nSizeDelta % nCalcItems;
- nCurSizeDelta = nSizeDelta / nCalcItems;
- nMins = 0;
+ nErrorSum = nSizeDelta % nCalcItems;
+ nCurSizeDelta = nSizeDelta / nCalcItems;
+ nMins = 0;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i].mnBits & SWIB_INVISIBLE )
@@ -728,8 +728,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
{
pItems[i].mnOldSplitPos = pItems[i].mnSplitPos;
pItems[i].mnOldSplitSize = pItems[i].mnSplitSize;
- pItems[i].mnOldWidth = pItems[i].mnWidth;
- pItems[i].mnOldHeight = pItems[i].mnHeight;
+ pItems[i].mnOldWidth = pItems[i].mnWidth;
+ pItems[i].mnOldHeight = pItems[i].mnHeight;
if ( pItems[i].mnBits & SWIB_INVISIBLE )
bEmpty = TRUE;
@@ -751,8 +751,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( bEmpty )
{
- pItems[i].mnWidth = 0;
- pItems[i].mnHeight = 0;
+ pItems[i].mnWidth = 0;
+ pItems[i].mnHeight = 0;
pItems[i].mnSplitSize = 0;
}
else
@@ -843,9 +843,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL bHide,
BOOL bRows, BOOL /*bDown*/ )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
if ( pWindow->IsReallyVisible() && pWindow->IsUpdateMode() && pWindow->mbInvalidate )
{
@@ -856,7 +856,7 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// Evt. alles invalidieren oder nur einen kleinen Teil
if ( (pItems[i].mnOldSplitPos != pItems[i].mnSplitPos) ||
(pItems[i].mnOldSplitSize != pItems[i].mnSplitSize) ||
- (pItems[i].mnOldWidth != pItems[i].mnWidth) ||
+ (pItems[i].mnOldWidth != pItems[i].mnWidth) ||
(pItems[i].mnOldHeight != pItems[i].mnHeight) )
{
Rectangle aRect;
@@ -864,33 +864,33 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// Old Rect invalidieren
if ( bRows )
{
- aRect.Left() = pItems[i].mnLeft;
- aRect.Right() = pItems[i].mnLeft+pItems[i].mnOldWidth-1;
- aRect.Top() = pItems[i].mnOldSplitPos;
- aRect.Bottom() = aRect.Top() + pItems[i].mnOldSplitSize;
+ aRect.Left() = pItems[i].mnLeft;
+ aRect.Right() = pItems[i].mnLeft+pItems[i].mnOldWidth-1;
+ aRect.Top() = pItems[i].mnOldSplitPos;
+ aRect.Bottom() = aRect.Top() + pItems[i].mnOldSplitSize;
}
else
{
- aRect.Top() = pItems[i].mnTop;
- aRect.Bottom() = pItems[i].mnTop+pItems[i].mnOldHeight-1;
- aRect.Left() = pItems[i].mnOldSplitPos;
- aRect.Right() = aRect.Left() + pItems[i].mnOldSplitSize;
+ aRect.Top() = pItems[i].mnTop;
+ aRect.Bottom() = pItems[i].mnTop+pItems[i].mnOldHeight-1;
+ aRect.Left() = pItems[i].mnOldSplitPos;
+ aRect.Right() = aRect.Left() + pItems[i].mnOldSplitSize;
}
pWindow->Invalidate( aRect );
// New Rect invalidieren
if ( bRows )
{
- aRect.Left() = pItems[i].mnLeft;
- aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
- aRect.Top() = pItems[i].mnSplitPos;
- aRect.Bottom() = aRect.Top() + pItems[i].mnSplitSize;
+ aRect.Left() = pItems[i].mnLeft;
+ aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
+ aRect.Top() = pItems[i].mnSplitPos;
+ aRect.Bottom() = aRect.Top() + pItems[i].mnSplitSize;
}
else
{
- aRect.Top() = pItems[i].mnTop;
- aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
- aRect.Left() = pItems[i].mnSplitPos;
- aRect.Right() = aRect.Left() + pItems[i].mnSplitSize;
+ aRect.Top() = pItems[i].mnTop;
+ aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
+ aRect.Left() = pItems[i].mnSplitPos;
+ aRect.Right() = aRect.Left() + pItems[i].mnSplitSize;
}
pWindow->Invalidate( aRect );
@@ -898,10 +898,10 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// nicht von Fenstern ueberladen werden
if ( pItems[i].mpSet && !pItems[i].mpSet->mpItems )
{
- aRect.Left() = pItems[i].mnLeft;
- aRect.Top() = pItems[i].mnTop;
- aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
- aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
+ aRect.Left() = pItems[i].mnLeft;
+ aRect.Top() = pItems[i].mnTop;
+ aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
+ aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
pWindow->Invalidate( aRect );
}
}
@@ -946,9 +946,9 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
static void ImplCalcLogSize( ImplSplitItem* pItems, USHORT nItems )
{
// Original-Groessen updaten
- USHORT i;
- long nRelSize = 0;
- long nPerSize = 0;
+ USHORT i;
+ long nRelSize = 0;
+ long nPerSize = 0;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i].mnBits & SWIB_RELATIVESIZE )
@@ -985,8 +985,8 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
{
if ( pBitmap )
{
- Point aPos = rRect.TopLeft();
- Size aBmpSize = pBitmap->GetSizePixel();
+ Point aPos = rRect.TopLeft();
+ Size aBmpSize = pBitmap->GetSizePixel();
pWindow->Push( PUSH_CLIPREGION );
pWindow->IntersectClipRegion( rRect );
do
@@ -1011,9 +1011,9 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
// Beim Mainset auch den Hintergrund zeichnen
if ( pSet->mnId == 0 )
@@ -1036,9 +1036,9 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet )
if ( pSet->mpBitmap || pSet->mpWallpaper )
{
// Wegen ICC auftrennen
- Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
- Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
- Rectangle aRect( aPoint, aSize );
+ Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
+ Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
+ Rectangle aRect( aPoint, aSize );
ImplDrawBack( pWindow, aRect, pSet->mpWallpaper, pSet->mpBitmap );
}
}
@@ -1059,13 +1059,13 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
if ( !pSet->mpItems )
return;
- USHORT i;
- USHORT nItems = pSet->mnItems;
- long nPos;
- long nTop;
- long nBottom;
- ImplSplitItem* pItems = pSet->mpItems;
- const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ long nPos;
+ long nTop;
+ long nBottom;
+ ImplSplitItem* pItems = pSet->mpItems;
+ const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
BOOL bFlat = (pWindow->GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW;
@@ -1079,7 +1079,7 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
long nSplitSize = pSet->mnSplitSize;
if ( bRows )
{
- nTop = pItems[i].mnLeft;
+ nTop = pItems[i].mnLeft;
nBottom = pItems[i].mnLeft+pItems[i].mnWidth-1;
if ( bFlat ) nPos--;
@@ -1109,7 +1109,7 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
}
else
{
- nTop = pItems[i].mnTop;
+ nTop = pItems[i].mnTop;
nBottom = pItems[i].mnTop+pSet->mpItems[i].mnHeight-1;
if ( bFlat ) nPos--;
@@ -1155,15 +1155,15 @@ USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
if ( !pSet->mpItems )
return 0;
- USHORT i;
- USHORT nSplitTest;
- USHORT nItems = pSet->mnItems;
- long nMPos1;
- long nMPos2;
- long nPos;
- long nTop;
- long nBottom;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nSplitTest;
+ USHORT nItems = pSet->mnItems;
+ long nMPos1;
+ long nMPos2;
+ long nPos;
+ long nTop;
+ long nBottom;
+ ImplSplitItem* pItems = pSet->mpItems;
if ( bRows )
{
@@ -1182,12 +1182,12 @@ USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
{
if ( bRows )
{
- nTop = pItems[i].mnLeft;
+ nTop = pItems[i].mnLeft;
nBottom = pItems[i].mnLeft+pItems[i].mnWidth-1;
}
else
{
- nTop = pItems[i].mnTop;
+ nTop = pItems[i].mnTop;
nBottom = pItems[i].mnTop+pItems[i].mnHeight-1;
}
nPos = pItems[i].mnSplitPos;
@@ -1234,9 +1234,9 @@ USHORT SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
// Resizeable SplitWindow muss anders behandelt werden
if ( pWindow->mnWinStyle & WB_SIZEABLE )
{
- long nTPos;
- long nPos;
- long nBorder;
+ long nTPos;
+ long nPos;
+ long nBorder;
if ( pWindow->mbHorz )
{
@@ -1313,10 +1313,10 @@ void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos )
}
else
{
- aRect.Left() = pThis->maDragRect.Left();
- aRect.Right() = pThis->maDragRect.Right();
- aRect.Top() = rPos.Y();
- aRect.Bottom() = aRect.Top()+pThis->mpSplitSet->mnSplitSize-1;
+ aRect.Left() = pThis->maDragRect.Left();
+ aRect.Right() = pThis->maDragRect.Right();
+ aRect.Top() = rPos.Y();
+ aRect.Bottom() = aRect.Top()+pThis->mpSplitSet->mnSplitSize-1;
if ( !(pThis->mnWinStyle & WB_NOSPLITDRAW) )
aRect.Bottom()--;
if ( (pThis->mnSplitTest & SPLIT_WINDOW) &&
@@ -1333,53 +1333,53 @@ void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos )
void SplitWindow::ImplInit( Window* pParent, WinBits nStyle )
{
- ImplSplitSet* pNewSet = new ImplSplitSet;
- pNewSet->mpItems = NULL;
- pNewSet->mpWallpaper = NULL;
- pNewSet->mpBitmap = NULL;
- pNewSet->mnLastSize = 0;
- pNewSet->mnItems = 0;
- pNewSet->mnId = 0;
- pNewSet->mnSplitSize = SPLITWIN_SPLITSIZE;
- pNewSet->mbCalcPix = TRUE;
-
- mpMainSet = pNewSet;
- mpBaseSet = pNewSet;
- mpSplitSet = NULL;
- mpLastSizes = NULL;
- mnDX = 0;
- mnDY = 0;
- mnLeftBorder = 0;
- mnTopBorder = 0;
- mnRightBorder = 0;
- mnBottomBorder = 0;
- mnMaxSize = 0;
- mnMouseOff = 0;
- meAlign = WINDOWALIGN_TOP;
- mnWinStyle = nStyle;
- mnSplitTest = 0;
- mnSplitPos = 0;
- mnMouseModifier = 0;
- mnMStartPos = 0;
- mnMSplitPos = 0;
- mbDragFull = FALSE;
- mbHorz = TRUE;
- mbBottomRight = FALSE;
- mbCalc = FALSE;
- mbRecalc = TRUE;
- mbInvalidate = TRUE;
- mbAutoHide = FALSE;
- mbFadeIn = FALSE;
- mbFadeOut = FALSE;
- mbAutoHideIn = FALSE;
- mbAutoHideDown = FALSE;
- mbFadeInDown = FALSE;
- mbFadeOutDown = FALSE;
- mbAutoHidePressed = FALSE;
- mbFadeInPressed = FALSE;
- mbFadeOutPressed = FALSE;
- mbFadeNoButtonMode = FALSE;
- mbNoAlign = FALSE;
+ ImplSplitSet* pNewSet = new ImplSplitSet;
+ pNewSet->mpItems = NULL;
+ pNewSet->mpWallpaper = NULL;
+ pNewSet->mpBitmap = NULL;
+ pNewSet->mnLastSize = 0;
+ pNewSet->mnItems = 0;
+ pNewSet->mnId = 0;
+ pNewSet->mnSplitSize = SPLITWIN_SPLITSIZE;
+ pNewSet->mbCalcPix = TRUE;
+
+ mpMainSet = pNewSet;
+ mpBaseSet = pNewSet;
+ mpSplitSet = NULL;
+ mpLastSizes = NULL;
+ mnDX = 0;
+ mnDY = 0;
+ mnLeftBorder = 0;
+ mnTopBorder = 0;
+ mnRightBorder = 0;
+ mnBottomBorder = 0;
+ mnMaxSize = 0;
+ mnMouseOff = 0;
+ meAlign = WINDOWALIGN_TOP;
+ mnWinStyle = nStyle;
+ mnSplitTest = 0;
+ mnSplitPos = 0;
+ mnMouseModifier = 0;
+ mnMStartPos = 0;
+ mnMSplitPos = 0;
+ mbDragFull = FALSE;
+ mbHorz = TRUE;
+ mbBottomRight = FALSE;
+ mbCalc = FALSE;
+ mbRecalc = TRUE;
+ mbInvalidate = TRUE;
+ mbAutoHide = FALSE;
+ mbFadeIn = FALSE;
+ mbFadeOut = FALSE;
+ mbAutoHideIn = FALSE;
+ mbAutoHideDown = FALSE;
+ mbFadeInDown = FALSE;
+ mbFadeOutDown = FALSE;
+ mbAutoHidePressed = FALSE;
+ mbFadeInPressed = FALSE;
+ mbFadeOutPressed = FALSE;
+ mbFadeNoButtonMode = FALSE;
+ mbNoAlign = FALSE;
if ( nStyle & WB_NOSPLITDRAW )
{
@@ -1506,7 +1506,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
{
Size aSize( aNewSize );
long nSplitSize = mpMainSet->mnSplitSize-2;
-
+
if ( mbAutoHide || mbFadeOut )
nSplitSize += SPLITWIN_SPLITSIZEEXLN;
@@ -1515,9 +1515,9 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
// ist
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCurSize;
- long nCalcSize = 0;
- USHORT i;
+ long nCurSize;
+ long nCalcSize = 0;
+ USHORT i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1529,9 +1529,9 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
if ( i == mpMainSet->mnItems )
{
- long nDelta = 0;
- Point aPos = GetPosPixel();
-
+ long nDelta = 0;
+ Point aPos = GetPosPixel();
+
if ( mbHorz )
nCurSize = aNewSize.Height()-mnTopBorder-mnBottomBorder;
else
@@ -1583,9 +1583,9 @@ void SplitWindow::ImplCalcLayout()
// ist
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCurSize;
- long nCalcSize = 0;
- USHORT i;
+ long nCurSize;
+ long nCalcSize = 0;
+ USHORT i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1614,10 +1614,10 @@ void SplitWindow::ImplCalcLayout()
return;
// Groessen/Position vorberechnen
- long nL;
- long nT;
- long nW;
- long nH;
+ long nL;
+ long nT;
+ long nW;
+ long nH;
if ( mbHorz )
{
@@ -1687,22 +1687,22 @@ void SplitWindow::ImplUpdateSet( ImplSplitSet* pSet )
Rectangle aRect;
if ( pSet == mpMainSet )
{
- aRect.Left() = mnLeftBorder;
- aRect.Top() = mnTopBorder;
- aRect.Right() = mnDX-mnRightBorder-1;
- aRect.Bottom() = mnDY-mnBottomBorder-1;
+ aRect.Left() = mnLeftBorder;
+ aRect.Top() = mnTopBorder;
+ aRect.Right() = mnDX-mnRightBorder-1;
+ aRect.Bottom() = mnDY-mnBottomBorder-1;
}
else
{
- ImplSplitItem* pItem;
- USHORT nPos;
+ ImplSplitItem* pItem;
+ USHORT nPos;
pSet = ImplFindItem( mpMainSet, pSet->mnId, nPos );
pItem = &(pSet->mpItems[nPos]);
- aRect.Left() = pItem->mnLeft;
- aRect.Top() = pItem->mnTop;
- aRect.Right() = aRect.Left()+pItem->mnWidth;
- aRect.Bottom() = aRect.Top()+pItem->mnHeight;
+ aRect.Left() = pItem->mnLeft;
+ aRect.Top() = pItem->mnTop;
+ aRect.Right() = aRect.Left()+pItem->mnWidth;
+ aRect.Bottom() = aRect.Top()+pItem->mnHeight;
}
Invalidate( aRect );
}
@@ -1758,50 +1758,50 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) co
if ( meAlign == WINDOWALIGN_TOP )
{
- rRect.Left() = mnLeftBorder+nEx;
- rRect.Top() = mnDY-mnBottomBorder-nSplitSize;
- rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
- rRect.Bottom() = mnDY-mnBottomBorder-1;
+ rRect.Left() = mnLeftBorder+nEx;
+ rRect.Top() = mnDY-mnBottomBorder-nSplitSize;
+ rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Bottom() = mnDY-mnBottomBorder-1;
if ( bTest )
{
- rRect.Top() -= mnTopBorder;
- rRect.Bottom() += mnBottomBorder;
+ rRect.Top() -= mnTopBorder;
+ rRect.Bottom() += mnBottomBorder;
}
}
else if ( meAlign == WINDOWALIGN_BOTTOM )
{
- rRect.Left() = mnLeftBorder+nEx;
- rRect.Top() = mnTopBorder;
- rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
- rRect.Bottom() = mnTopBorder+nSplitSize-1;
+ rRect.Left() = mnLeftBorder+nEx;
+ rRect.Top() = mnTopBorder;
+ rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Bottom() = mnTopBorder+nSplitSize-1;
if ( bTest )
{
- rRect.Top() -= mnTopBorder;
- rRect.Bottom() += mnBottomBorder;
+ rRect.Top() -= mnTopBorder;
+ rRect.Bottom() += mnBottomBorder;
}
}
else if ( meAlign == WINDOWALIGN_LEFT )
{
- rRect.Left() = mnDX-mnRightBorder-nSplitSize;
- rRect.Top() = mnTopBorder+nEx;
- rRect.Right() = mnDX-mnRightBorder-1;
- rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Left() = mnDX-mnRightBorder-nSplitSize;
+ rRect.Top() = mnTopBorder+nEx;
+ rRect.Right() = mnDX-mnRightBorder-1;
+ rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
if ( bTest )
{
- rRect.Left() -= mnLeftBorder;
- rRect.Right() += mnRightBorder;
+ rRect.Left() -= mnLeftBorder;
+ rRect.Right() += mnRightBorder;
}
}
else if ( meAlign == WINDOWALIGN_RIGHT )
{
- rRect.Left() = mnLeftBorder;
- rRect.Top() = mnTopBorder+nEx;
- rRect.Right() = mnLeftBorder+nSplitSize-1;
- rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Left() = mnLeftBorder;
+ rRect.Top() = mnTopBorder+nEx;
+ rRect.Right() = mnLeftBorder+nSplitSize-1;
+ rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
if ( bTest )
{
- rRect.Left() -= mnLeftBorder;
- rRect.Right() += mnRightBorder;
+ rRect.Left() -= mnLeftBorder;
+ rRect.Right() += mnRightBorder;
}
}
}
@@ -1929,7 +1929,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
// ImageListe laden, wenn noch nicht vorhanden
ImplSVData* pSVData = ImplGetSVData();
- ImageList* pImageList;
+ ImageList* pImageList;
if ( mbHorz )
{
if ( !pSVData->maCtrlData.mpSplitHPinImgList )
@@ -1942,7 +1942,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
pSVData->maCtrlData.mpSplitHPinImgList->InsertFromHorizontalBitmap
( ResId( SV_RESID_BITMAP_SPLITHPIN, *pResMgr ), 4, &aNonAlphaMask );
}
- }
+ }
pImageList = pSVData->maCtrlData.mpSplitHPinImgList;
}
else
@@ -1959,7 +1959,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
}
}
pImageList = pSVData->maCtrlData.mpSplitVPinImgList;
- }
+ }
// Image ermitteln und zurueckgeben
USHORT nId;
@@ -1978,11 +1978,11 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
nId = 2;
}
- Image aImage = pImageList->GetImage( nId );
- Size aImageSize = aImage.GetSizePixel();
- Point aPos( aTempRect.Left()+((aTempRect.GetWidth()-aImageSize.Width())/2),
+ Image aImage = pImageList->GetImage( nId );
+ Size aImageSize = aImage.GetSizePixel();
+ Point aPos( aTempRect.Left()+((aTempRect.GetWidth()-aImageSize.Width())/2),
aTempRect.Top()+((aTempRect.GetHeight()-aImageSize.Height())/2) );
- long nSize;
+ long nSize;
if ( mbHorz )
nSize = aImageSize.Width();
else
@@ -2112,19 +2112,19 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
{
if ( mbFadeIn )
{
- Rectangle aTempRect;
- Image aImage;
+ Rectangle aTempRect;
+ Image aImage;
ImplGetFadeInRect( aTempRect );
BOOL bLeft;
if ( meAlign == WINDOWALIGN_TOP )
- bLeft = FALSE;
+ bLeft = FALSE;
else if ( meAlign == WINDOWALIGN_BOTTOM )
- bLeft = TRUE;
+ bLeft = TRUE;
else if ( meAlign == WINDOWALIGN_LEFT )
- bLeft = FALSE;
+ bLeft = FALSE;
else if ( meAlign == WINDOWALIGN_RIGHT )
- bLeft = TRUE;
+ bLeft = TRUE;
else
bLeft = TRUE;
@@ -2141,19 +2141,19 @@ void SplitWindow::ImplDrawFadeOut( BOOL bInPaint )
{
if ( mbFadeOut )
{
- Rectangle aTempRect;
- Image aImage;
+ Rectangle aTempRect;
+ Image aImage;
ImplGetFadeOutRect( aTempRect );
BOOL bLeft;
if ( meAlign == WINDOWALIGN_TOP )
- bLeft = TRUE;
+ bLeft = TRUE;
else if ( meAlign == WINDOWALIGN_BOTTOM )
- bLeft = FALSE;
+ bLeft = FALSE;
else if ( meAlign == WINDOWALIGN_LEFT )
- bLeft = TRUE;
+ bLeft = TRUE;
else if ( meAlign == WINDOWALIGN_RIGHT )
- bLeft = FALSE;
+ bLeft = FALSE;
else
bLeft = TRUE;
@@ -2172,11 +2172,11 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
if ( mnSplitTest && !(mnSplitTest & SPLIT_NOSPLIT) )
{
- ImplSplitItem* pSplitItem;
- long nCurMaxSize;
- USHORT nTemp;
- BOOL bDown;
- BOOL bPropSmaller;
+ ImplSplitItem* pSplitItem;
+ long nCurMaxSize;
+ USHORT nTemp;
+ BOOL bDown;
+ BOOL bPropSmaller;
mnMouseModifier = rMEvt.GetModifier();
if ( !(mnMouseModifier & KEY_SHIFT) || (mnSplitPos+1 >= mpSplitSet->mnItems) )
@@ -2204,10 +2204,10 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
if ( (mpSplitSet == mpMainSet) && mbBottomRight )
bDown = FALSE;
- pSplitItem = &(mpSplitSet->mpItems[mnSplitPos]);
- maDragRect.Left() = pSplitItem->mnLeft;
- maDragRect.Top() = pSplitItem->mnTop;
- maDragRect.Right() = pSplitItem->mnLeft+pSplitItem->mnWidth-1;
+ pSplitItem = &(mpSplitSet->mpItems[mnSplitPos]);
+ maDragRect.Left() = pSplitItem->mnLeft;
+ maDragRect.Top() = pSplitItem->mnTop;
+ maDragRect.Right() = pSplitItem->mnLeft+pSplitItem->mnWidth-1;
maDragRect.Bottom() = pSplitItem->mnTop+pSplitItem->mnHeight-1;
if ( mnSplitTest & SPLIT_HORZ )
@@ -2302,9 +2302,9 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
}
else
{
- maDragRect.Left() = mnLeftBorder;
- maDragRect.Top() = mnTopBorder;
- maDragRect.Right() = mnDX-mnRightBorder-1;
+ maDragRect.Left() = mnLeftBorder;
+ maDragRect.Top() = mnTopBorder;
+ maDragRect.Right() = mnDX-mnRightBorder-1;
maDragRect.Bottom() = mnDY-mnBottomBorder-1;
if ( mbHorz )
{
@@ -2332,8 +2332,8 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
ImplDrawSplitTracking( this, aMousePosPixel );
else
{
- ImplSplitItem* pItems = mpSplitSet->mpItems;
- USHORT nItems = mpSplitSet->mnItems;
+ ImplSplitItem* pItems = mpSplitSet->mpItems;
+ USHORT nItems = mpSplitSet->mnItems;
mpLastSizes = new long[nItems*2];
for ( USHORT i = 0; i < nItems; i++ )
{
@@ -2407,8 +2407,8 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
return;
}
- Point aMousePosPixel = rMEvt.GetPosPixel();
- Rectangle aTestRect;
+ Point aMousePosPixel = rMEvt.GetPosPixel();
+ Rectangle aTestRect;
mbFadeNoButtonMode = FALSE;
ImplGetAutoHideRect( aTestRect, TRUE );
@@ -2457,15 +2457,15 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
{
if ( !IsTracking() )
{
- Point aPos = rMEvt.GetPosPixel();
- long nTemp;
- ImplSplitSet* pTempSplitSet;
- USHORT nTempSplitPos;
- USHORT nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
- PointerStyle eStyle = POINTER_ARROW;
- Rectangle aAutoHideRect;
- Rectangle aFadeInRect;
- Rectangle aFadeOutRect;
+ Point aPos = rMEvt.GetPosPixel();
+ long nTemp;
+ ImplSplitSet* pTempSplitSet;
+ USHORT nTempSplitPos;
+ USHORT nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
+ PointerStyle eStyle = POINTER_ARROW;
+ Rectangle aAutoHideRect;
+ Rectangle aFadeInRect;
+ Rectangle aFadeOutRect;
ImplGetAutoHideRect( aAutoHideRect );
ImplGetFadeInRect( aFadeInRect );
@@ -2597,11 +2597,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingCanceled() )
{
- ImplSplitItem* pItems = mpSplitSet->mpItems;
- USHORT nItems = mpSplitSet->mnItems;
+ ImplSplitItem* pItems = mpSplitSet->mpItems;
+ USHORT nItems = mpSplitSet->mnItems;
for ( USHORT i = 0; i < nItems; i++ )
{
- pItems[i].mnSize = mpLastSizes[i*2];
+ pItems[i].mnSize = mpLastSizes[i*2];
pItems[i].mnPixSize = mpLastSizes[i*2+1];
}
ImplUpdate();
@@ -2626,9 +2626,9 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
if ( bSplit )
{
- BOOL bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? TRUE : FALSE;
- BOOL bPropGreater = (mnMouseModifier & KEY_MOD1) ? TRUE : FALSE;
- long nDelta = mnMSplitPos-mnMStartPos;
+ BOOL bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? TRUE : FALSE;
+ BOOL bPropGreater = (mnMouseModifier & KEY_MOD1) ? TRUE : FALSE;
+ long nDelta = mnMSplitPos-mnMStartPos;
if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems )
{
@@ -2660,14 +2660,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( mpLastSizes )
delete mpLastSizes;
- mpLastSizes = NULL;
- mpSplitSet = NULL;
- mnMouseOff = 0;
- mnMStartPos = 0;
- mnMSplitPos = 0;
+ mpLastSizes = NULL;
+ mpSplitSet = NULL;
+ mnMouseOff = 0;
+ mnMStartPos = 0;
+ mnMSplitPos = 0;
mnMouseModifier = 0;
- mnSplitTest = 0;
- mnSplitPos = 0;
+ mnSplitTest = 0;
+ mnSplitPos = 0;
}
}
}
@@ -2687,7 +2687,7 @@ long SplitWindow::PreNotify( NotifyEvent& rNEvt )
Rectangle aFadeOutRect;
ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect );
-
+
if ( aFadeInRect.IsInside( GetPointerPosPixel() ) != aFadeInRect.IsInside( GetLastPointerPosPixel() ) )
Invalidate( aFadeInRect );
if ( aFadeOutRect.IsInside( GetPointerPosPixel() ) != aFadeOutRect.IsInside( GetLastPointerPosPixel() ) )
@@ -2749,9 +2749,9 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
// no keyboard help for splitwin
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) && !rHEvt.KeyboardActivated() )
{
- Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
- USHORT nHelpResId = 0;
+ Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
+ Rectangle aHelpRect;
+ USHORT nHelpResId = 0;
ImplGetAutoHideRect( aHelpRect, TRUE );
if ( aHelpRect.IsInside( aMousePosPixel ) )
@@ -2853,7 +2853,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
if ( nSize < 1 )
nSize = 1;
- ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
+ ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
ImplSplitSet* pNewSet;
ImplSplitItem* pItem;
@@ -2871,16 +2871,16 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
pSet->mbCalcPix = TRUE;
// Item anlegen und erweitern
- pItem = &(pSet->mpItems[nPos]);
+ pItem = &(pSet->mpItems[nPos]);
memset( pItem, 0, sizeof( ImplSplitItem ) );
- pItem->mnSize = nSize;
- pItem->mnId = nId;
- pItem->mnBits = nBits;
+ pItem->mnSize = nSize;
+ pItem->mnId = nId;
+ pItem->mnBits = nBits;
if ( pWindow )
{
- pItem->mpWindow = pWindow;
- pItem->mpOrgParent = pWindow->GetParent();
+ pItem->mpWindow = pWindow;
+ pItem->mpOrgParent = pWindow->GetParent();
// Window mit SplitWindow verbinden
pWindow->Hide();
@@ -2888,17 +2888,17 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
}
else
{
- pNewSet = new ImplSplitSet;
- pNewSet->mpItems = NULL;
- pNewSet->mpWallpaper = NULL;
- pNewSet->mpBitmap = NULL;
- pNewSet->mnLastSize = 0;
- pNewSet->mnItems = 0;
- pNewSet->mnId = nId;
- pNewSet->mnSplitSize = pSet->mnSplitSize;
- pNewSet->mbCalcPix = TRUE;
+ pNewSet = new ImplSplitSet;
+ pNewSet->mpItems = NULL;
+ pNewSet->mpWallpaper = NULL;
+ pNewSet->mpBitmap = NULL;
+ pNewSet->mnLastSize = 0;
+ pNewSet->mnItems = 0;
+ pNewSet->mnId = nId;
+ pNewSet->mnSplitSize = pSet->mnSplitSize;
+ pNewSet->mbCalcPix = TRUE;
- pItem->mpSet = pNewSet;
+ pItem->mpSet = pNewSet;
}
ImplUpdate();
@@ -2923,10 +2923,10 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId )
DBG_ASSERT( ImplFindSet( mpMainSet, nNewSetId ), "SplitWindow::MoveItem() - Set not exists" );
#endif
- USHORT nPos;
- ImplSplitSet* pNewSet = ImplFindSet( mpMainSet, nNewSetId );
- ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
- ImplSplitItem aTempItem;
+ USHORT nPos;
+ ImplSplitSet* pNewSet = ImplFindSet( mpMainSet, nNewSetId );
+ ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
+ ImplSplitItem aTempItem;
if ( pNewSet == pSet )
{
@@ -2994,11 +2994,11 @@ void SplitWindow::RemoveItem( USHORT nId, BOOL bHide )
#endif
// Set suchen
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
- ImplSplitItem* pItem = &(pSet->mpItems[nPos]);
- Window* pWindow = pItem->mpWindow;
- Window* pOrgParent = pItem->mpOrgParent;
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
+ ImplSplitItem* pItem = &(pSet->mpItems[nPos]);
+ Window* pWindow = pItem->mpWindow;
+ Window* pOrgParent = pItem->mpOrgParent;
// Evt. Set loeschen
if ( !pWindow )
@@ -3040,18 +3040,18 @@ void SplitWindow::Clear()
ImplDeleteSet( mpMainSet );
// Main-Set wieder anlegen
- mpMainSet = new ImplSplitSet;
- mpMainSet->mpItems = NULL;
- mpMainSet->mpWallpaper = NULL;
- mpMainSet->mpBitmap = NULL;
- mpMainSet->mnLastSize = 0;
- mpMainSet->mnItems = 0;
- mpMainSet->mnId = 0;
- mpMainSet->mnSplitSize = SPLITWIN_SPLITSIZE;
- mpMainSet->mbCalcPix = TRUE;
+ mpMainSet = new ImplSplitSet;
+ mpMainSet->mpItems = NULL;
+ mpMainSet->mpWallpaper = NULL;
+ mpMainSet->mpBitmap = NULL;
+ mpMainSet->mnLastSize = 0;
+ mpMainSet->mnItems = 0;
+ mpMainSet->mnId = 0;
+ mpMainSet->mnSplitSize = SPLITWIN_SPLITSIZE;
+ mpMainSet->mbCalcPix = TRUE;
if ( mnWinStyle & WB_NOSPLITDRAW )
mpMainSet->mnSplitSize -= 2;
- mpBaseSet = mpMainSet;
+ mpBaseSet = mpMainSet;
// Und neu invalidieren
ImplUpdate();
@@ -3233,16 +3233,16 @@ Bitmap SplitWindow::GetItemBitmap( USHORT nSetId ) const
void SplitWindow::SplitItem( USHORT nId, long nNewSize,
BOOL bPropSmall, BOOL bPropGreat )
{
- USHORT nItems;
- USHORT nPos;
- USHORT nMin;
- USHORT nMax;
- USHORT i;
- USHORT n;
- long nDelta;
- long nTempDelta;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
- ImplSplitItem* pItems;
+ USHORT nItems;
+ USHORT nPos;
+ USHORT nMin;
+ USHORT nMax;
+ USHORT i;
+ USHORT n;
+ long nDelta;
+ long nTempDelta;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ ImplSplitItem* pItems;
if ( !pSet )
return;
@@ -3463,9 +3463,9 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize,
void SplitWindow::SetItemSize( USHORT nId, long nNewSize )
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
- ImplSplitItem* pItem;
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ ImplSplitItem* pItem;
if ( !pSet )
return;
@@ -3485,8 +3485,8 @@ void SplitWindow::SetItemSize( USHORT nId, long nNewSize )
long SplitWindow::GetItemSize( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mpItems[nPos].mnSize;
@@ -3498,8 +3498,8 @@ long SplitWindow::GetItemSize( USHORT nId ) const
long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
{
@@ -3509,12 +3509,12 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
{
((SplitWindow*)this)->ImplCalcLayout();
- long nRelSize = 0;
- long nPerSize = 0;
- ImplSplitItem* pItems;
- USHORT nItems;
+ long nRelSize = 0;
+ long nPerSize = 0;
+ ImplSplitItem* pItems;
+ USHORT nItems;
SplitWindowItemBits nTempBits;
- USHORT i;
+ USHORT i;
nItems = pSet->mnItems;
pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -3555,9 +3555,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
- ImplSplitItem* pItem;
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ ImplSplitItem* pItem;
if ( !pSet )
return;
@@ -3579,8 +3579,8 @@ void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mpItems[nPos].mnBits;
@@ -3592,8 +3592,8 @@ SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const
Window* SplitWindow::GetItemWindow( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mpItems[nPos].mpWindow;
@@ -3605,8 +3605,8 @@ Window* SplitWindow::GetItemWindow( USHORT nId ) const
USHORT SplitWindow::GetSet( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mnId;
@@ -3632,8 +3632,8 @@ BOOL SplitWindow::GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const
BOOL SplitWindow::IsItemValid( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return TRUE;
@@ -3659,8 +3659,8 @@ USHORT SplitWindow::GetItemId( const Point& rPos ) const
USHORT SplitWindow::GetItemPos( USHORT nId, USHORT nSetId ) const
{
- ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
- USHORT nPos = SPLITWINDOW_ITEM_NOTFOUND;
+ ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
+ USHORT nPos = SPLITWINDOW_ITEM_NOTFOUND;
if ( pSet )
{
@@ -3705,27 +3705,27 @@ void SplitWindow::ImplNewAlign()
{
if ( mbNoAlign )
{
- mbHorz = FALSE;
+ mbHorz = FALSE;
mbBottomRight = FALSE;
}
else if ( meAlign == WINDOWALIGN_TOP )
{
- mbHorz = TRUE;
+ mbHorz = TRUE;
mbBottomRight = FALSE;
}
else if ( meAlign == WINDOWALIGN_BOTTOM )
{
- mbHorz = TRUE;
+ mbHorz = TRUE;
mbBottomRight = TRUE;
}
else if ( meAlign == WINDOWALIGN_LEFT )
{
- mbHorz = FALSE;
+ mbHorz = FALSE;
mbBottomRight = FALSE;
}
else if ( meAlign == WINDOWALIGN_RIGHT )
{
- mbHorz = FALSE;
+ mbHorz = FALSE;
mbBottomRight = TRUE;
}
@@ -3768,15 +3768,15 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign )
Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign,
WinBits nWinStyle, BOOL bExtra )
{
- long nLeft;
- long nTop;
- long nRight;
- long nBottom;
- Size aSize = rSize;
+ long nLeft;
+ long nTop;
+ long nRight;
+ long nBottom;
+ Size aSize = rSize;
ImplCalcBorder( eAlign, FALSE, nLeft, nTop, nRight, nBottom );
- aSize.Width() += nLeft+nRight;
- aSize.Height() += nTop+nBottom;
+ aSize.Width() += nLeft+nRight;
+ aSize.Height() += nTop+nBottom;
if ( nWinStyle & WB_SIZEABLE )
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index dc0905c8a2de..9cfea5de3e34 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +43,13 @@
// =======================================================================
-#define STATUSBAR_OFFSET_X STATUSBAR_OFFSET
-#define STATUSBAR_OFFSET_Y 2
-#define STATUSBAR_OFFSET_TEXTY 3
+#define STATUSBAR_OFFSET_X STATUSBAR_OFFSET
+#define STATUSBAR_OFFSET_Y 2
+#define STATUSBAR_OFFSET_TEXTY 3
-#define STATUSBAR_PRGS_OFFSET 3
-#define STATUSBAR_PRGS_COUNT 100
-#define STATUSBAR_PRGS_MIN 5
+#define STATUSBAR_PRGS_OFFSET 3
+#define STATUSBAR_PRGS_COUNT 100
+#define STATUSBAR_PRGS_MIN 5
// -----------------------------------------------------------------------
@@ -59,7 +59,7 @@ public:
ImplData();
~ImplData();
- VirtualDevice* mpVirDev;
+ VirtualDevice* mpVirDev;
long mnItemBorderWidth;
bool mbTopBorder:1;
bool mbDrawItemFrames:1;
@@ -79,19 +79,19 @@ StatusBar::ImplData::~ImplData()
struct ImplStatusItem
{
- USHORT mnId;
- StatusBarItemBits mnBits;
- long mnWidth;
- long mnOffset;
- long mnExtraWidth;
- long mnX;
- XubString maText;
- XubString maHelpText;
- XubString maQuickHelpText;
- ULONG mnHelpId;
- void* mpUserData;
- BOOL mbVisible;
- XubString maAccessibleName;
+ USHORT mnId;
+ StatusBarItemBits mnBits;
+ long mnWidth;
+ long mnOffset;
+ long mnExtraWidth;
+ long mnX;
+ XubString maText;
+ XubString maHelpText;
+ XubString maQuickHelpText;
+ ULONG mnHelpId;
+ void* mpUserData;
+ BOOL mbVisible;
+ XubString maAccessibleName;
XubString maCommand;
};
@@ -148,20 +148,20 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle )
Window::ImplInit( pParent, nStyle & ~WB_BORDER, NULL );
// WinBits merken
- mpItemList = new ImplStatusItemList;
- mpImplData->mpVirDev = new VirtualDevice( *this );
- mnCurItemId = 0;
- mbFormat = TRUE;
- mbVisibleItems = TRUE;
- mbProgressMode = FALSE;
- mbInUserDraw = FALSE;
- mbBottomBorder = FALSE;
+ mpItemList = new ImplStatusItemList;
+ mpImplData->mpVirDev = new VirtualDevice( *this );
+ mnCurItemId = 0;
+ mbFormat = TRUE;
+ mbVisibleItems = TRUE;
+ mbProgressMode = FALSE;
+ mbInUserDraw = FALSE;
+ mbBottomBorder = FALSE;
mnItemsWidth = STATUSBAR_OFFSET_X;
- mnDX = 0;
- mnDY = 0;
- mnCalcHeight = 0;
- mnItemY = STATUSBAR_OFFSET_Y;
- mnTextY = STATUSBAR_OFFSET_TEXTY;
+ mnDX = 0;
+ mnDY = 0;
+ mnCalcHeight = 0;
+ mnItemY = STATUSBAR_OFFSET_Y;
+ mnTextY = STATUSBAR_OFFSET_TEXTY;
ImplInitSettings( TRUE, TRUE, TRUE );
SetLineColor();
@@ -255,7 +255,7 @@ void StatusBar::ImplInitSettings( BOOL bFont,
aColor = rStyleSettings.GetWindowColor();
SetBackground( aColor );
mpImplData->mpVirDev->SetBackground( GetBackground() );
-
+
// NWF background
if( ! IsControlBackground() &&
IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_WINDOW ) )
@@ -271,10 +271,10 @@ void StatusBar::ImplInitSettings( BOOL bFont,
void StatusBar::ImplFormat()
{
ImplStatusItem* pItem;
- long nExtraWidth;
- long nExtraWidth2;
- long nX;
- USHORT nAutoSizeItems = 0;
+ long nExtraWidth;
+ long nExtraWidth2;
+ long nX;
+ USHORT nAutoSizeItems = 0;
// Breiten zusammenrechnen
mnItemsWidth = STATUSBAR_OFFSET_X;
@@ -298,9 +298,9 @@ void StatusBar::ImplFormat()
{
// Bei rechtsbuendiger Ausrichtung wird kein AutoSize ausgewertet,
// da wir links den Text anzeigen, der mit SetText gesetzt wird
- nX = mnDX - mnItemsWidth;
- nExtraWidth = 0;
- nExtraWidth2 = 0;
+ nX = mnDX - mnItemsWidth;
+ nExtraWidth = 0;
+ nExtraWidth2 = 0;
}
else
{
@@ -352,7 +352,7 @@ void StatusBar::ImplFormat()
Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
{
- Rectangle aRect;
+ Rectangle aRect;
ImplStatusItem* pItem;
pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -376,7 +376,7 @@ Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
USHORT StatusBar::ImplGetFirstVisiblePos() const
{
ImplStatusItem* pItem;
-
+
for( USHORT nPos = 0; nPos < mpItemList->Count(); nPos++ )
{
pItem = mpItemList->GetObject( nPos );
@@ -386,7 +386,7 @@ USHORT StatusBar::ImplGetFirstVisiblePos() const
return nPos;
}
}
-
+
return ~0;
}
@@ -437,11 +437,11 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
return;
// Ausgabebereich berechnen
- ImplStatusItem* pItem = mpItemList->GetObject( nPos );
+ ImplStatusItem* pItem = mpItemList->GetObject( nPos );
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
- Size aTextRectSize( aTextRect.GetSize() );
+ Size aTextRectSize( aTextRect.GetSize() );
if ( bOffScreen )
mpImplData->mpVirDev->SetOutputSizePixel( aTextRectSize );
@@ -454,8 +454,8 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
// Text ausgeben
if ( bDrawText )
{
- Size aTextSize( GetTextWidth( pItem->maText ), GetTextHeight() );
- Point aTextPos = ImplGetItemTextPos( aTextRectSize, aTextSize, pItem->mnBits );
+ Size aTextSize( GetTextWidth( pItem->maText ), GetTextHeight() );
+ Point aTextPos = ImplGetItemTextPos( aTextRectSize, aTextSize, pItem->mnBits );
if ( bOffScreen )
mpImplData->mpVirDev->DrawText( aTextPos, pItem->maText );
else
@@ -498,12 +498,12 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
if( !(pItem->mnBits & SIB_FLAT) )
{
USHORT nStyle;
-
+
if ( pItem->mnBits & SIB_IN )
nStyle = FRAME_DRAW_IN;
else
nStyle = FRAME_DRAW_OUT;
-
+
DecorationView aDecoView( this );
aDecoView.DrawFrame( aRect, nStyle );
}
@@ -538,7 +538,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
if( pWindow->IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
bool bNeedErase = ImplGetSVData()->maNWFData.mbProgressNeedsErase;
-
+
long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
ImplControlValue aValue( nFullWidth * (long)nPerc / 10000 );
@@ -579,7 +579,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
return;
}
}
-
+
// Werte vorberechnen
USHORT nPerc1 = nPercent1 / nPercentCount;
USHORT nPerc2 = nPercent2 / nPercentCount;
@@ -587,11 +587,11 @@ void DrawProgress( Window* pWindow, const Point& rPos,
if ( nPerc1 > nPerc2 )
{
// Support progress that can also decrease
-
+
// Rechteck berechnen
- long nDX = nPrgsWidth + nOffset;
- long nLeft = rPos.X()+((nPerc1-1)*nDX);
- Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
+ long nDX = nPrgsWidth + nOffset;
+ long nLeft = rPos.X()+((nPerc1-1)*nDX);
+ Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
do
{
@@ -603,7 +603,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
while ( nPerc1 > nPerc2 );
pWindow->Flush();
- }
+ }
else if ( nPerc1 < nPerc2 )
{
// Percent-Rechtecke malen
@@ -616,9 +616,9 @@ void DrawProgress( Window* pWindow, const Point& rPos,
}
// Rechteck berechnen
- long nDX = nPrgsWidth + nOffset;
- long nLeft = rPos.X()+(nPerc1*nDX);
- Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
+ long nDX = nPrgsWidth + nOffset;
+ long nLeft = rPos.X()+(nPerc1*nDX);
+ Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
do
{
@@ -680,12 +680,12 @@ void StatusBar::ImplCalcProgressRect()
{
// calculate text size
Size aPrgsTxtSize( GetTextWidth( maPrgsTxt ), GetTextHeight() );
- maPrgsTxtPos.X() = STATUSBAR_OFFSET_X+1;
-
+ maPrgsTxtPos.X() = STATUSBAR_OFFSET_X+1;
+
// calculate progress frame
- maPrgsFrameRect.Left() = maPrgsTxtPos.X()+aPrgsTxtSize.Width()+STATUSBAR_OFFSET;
- maPrgsFrameRect.Top() = mnItemY;
- maPrgsFrameRect.Bottom() = mnCalcHeight - STATUSBAR_OFFSET_Y;
+ maPrgsFrameRect.Left() = maPrgsTxtPos.X()+aPrgsTxtSize.Width()+STATUSBAR_OFFSET;
+ maPrgsFrameRect.Top() = mnItemY;
+ maPrgsFrameRect.Bottom() = mnCalcHeight - STATUSBAR_OFFSET_Y;
if( IsTopBorder() )
maPrgsFrameRect.Bottom()+=2;
@@ -727,7 +727,7 @@ void StatusBar::ImplCalcProgressRect()
}
}
if( ! bNativeOK )
- maPrgsTxtPos.Y() = mnTextY;
+ maPrgsTxtPos.Y() = mnTextY;
}
// -----------------------------------------------------------------------
@@ -885,7 +885,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
{
- XubString aStr = GetQuickHelpText( nItemId );
+ XubString aStr = GetQuickHelpText( nItemId );
// Show quickhelp if available
if( aStr.Len() )
{
@@ -1025,14 +1025,14 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
// Item anlegen
long nFudge = GetTextHeight()/4;
- ImplStatusItem* pItem = new ImplStatusItem;
- pItem->mnId = nItemId;
- pItem->mnBits = nBits;
- pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
- pItem->mnOffset = nOffset;
- pItem->mnHelpId = 0;
- pItem->mpUserData = 0;
- pItem->mbVisible = TRUE;
+ ImplStatusItem* pItem = new ImplStatusItem;
+ pItem->mnId = nItemId;
+ pItem->mnBits = nBits;
+ pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
+ pItem->mnOffset = nOffset;
+ pItem->mnHelpId = 0;
+ pItem->mpUserData = 0;
+ pItem->mbVisible = TRUE;
// Item in die Liste einfuegen
mpItemList->Insert( pItem, nPos );
@@ -1290,7 +1290,7 @@ Point StatusBar::GetItemTextPos( USHORT nItemId ) const
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
Rectangle aRect = ImplGetItemRectPos( nPos );
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
Point aPos = ImplGetItemTextPos( aTextRect.GetSize(),
Size( GetTextWidth( pItem->maText ), GetTextHeight() ),
@@ -1360,7 +1360,7 @@ void StatusBar::SetItemText( USHORT nItemId, const XubString& rText )
// adjust item width - see also DataChanged()
long nFudge = GetTextHeight()/4;
long nWidth = GetTextWidth( pItem->maText ) + nFudge;
- if( (nWidth > pItem->mnWidth + STATUSBAR_OFFSET) ||
+ if( (nWidth > pItem->mnWidth + STATUSBAR_OFFSET) ||
((nWidth < pItem->mnWidth) && (mnDX - STATUSBAR_OFFSET) < mnItemsWidth ))
{
pItem->mnWidth = nWidth + STATUSBAR_OFFSET;
@@ -1584,9 +1584,9 @@ void StatusBar::StartProgressMode( const XubString& rText )
{
DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" );
- mbProgressMode = TRUE;
- mnPercent = 0;
- maPrgsTxt = rText;
+ mbProgressMode = TRUE;
+ mnPercent = 0;
+ maPrgsTxt = rText;
// Groessen berechnen
ImplCalcProgressRect();
@@ -1650,7 +1650,7 @@ void StatusBar::ResetProgressMode()
{
if ( mbProgressMode )
{
- mnPercent = 0;
+ mnPercent = 0;
maPrgsTxt.Erase();
if ( IsReallyVisible() )
{
@@ -1700,11 +1700,11 @@ void StatusBar::SetText( const XubString& rText )
Size StatusBar::CalcWindowSizePixel() const
{
- ULONG i = 0;
- ULONG nCount = mpItemList->Count();
- long nOffset = 0;
- long nCalcWidth = (STATUSBAR_OFFSET_X*2);
- long nCalcHeight;
+ ULONG i = 0;
+ ULONG nCount = mpItemList->Count();
+ long nOffset = 0;
+ long nCalcWidth = (STATUSBAR_OFFSET_X*2);
+ long nCalcHeight;
while ( i < nCount )
{
@@ -1713,7 +1713,7 @@ Size StatusBar::CalcWindowSizePixel() const
nOffset = pItem->mnOffset;
i++;
}
-
+
long nMinHeight = GetTextHeight();
const long nBarTextOffset = STATUSBAR_OFFSET_TEXTY*2;
long nProgressHeight = nMinHeight + nBarTextOffset;
@@ -1731,14 +1731,14 @@ Size StatusBar::CalcWindowSizePixel() const
nProgressHeight = aNativeControlRegion.GetHeight();
}
}
-
+
if( mpImplData->mbDrawItemFrames &&
pThis->IsNativeControlSupported( CTRL_FRAME, PART_BORDER ) )
{
ImplControlValue aControlValue( FRAME_DRAW_NODRAW );
Rectangle aBound, aContent;
Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
- if( pThis->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
+ if( pThis->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
mpImplData->mnItemBorderWidth =
@@ -1749,7 +1749,7 @@ Size StatusBar::CalcWindowSizePixel() const
nCalcHeight = nMinHeight+nBarTextOffset + 2*mpImplData->mnItemBorderWidth;
if( nCalcHeight < nProgressHeight+2 )
nCalcHeight = nProgressHeight+2;
-
+
// add border
if( IsTopBorder() )
nCalcHeight += 2;
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index a1a33b905cdf..0826ce0f2c48 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index fe3b6f5a585b..dbd52d1a66e7 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -334,7 +334,7 @@ void SystemWindow::EnableSaveBackground( BOOL bSave )
{
if( ImplGetSVData()->maWinData.mbNoSaveBackground )
bSave = false;
-
+
Window* pWindow = this;
while ( pWindow->mpWindowImpl->mpBorderWindow )
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
@@ -562,7 +562,7 @@ static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rS
}
else
rData.SetState( 0 );
-
+
// read maximized pos/size
aTokenStr = rStr.GetToken( 0, ',', nIndex );
if ( aTokenStr.Len() )
@@ -676,7 +676,7 @@ void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, lo
i_nWidth = 50;
if( i_nHeight < 1 )
i_nHeight = 50;
-
+
// check left border
bool bMove = false;
if( io_rX + i_nWidth < aScreenRect.Left() )
@@ -756,7 +756,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
// 91625 - ignore Minimize
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
aState.mnState = nState & SAL_FRAMESTATE_SYSTEMMASK;
-
+
// normalize window positions onto screen
ImplMoveToScreen( aState.mnX, aState.mnY, aState.mnWidth, aState.mnHeight, pWindow );
ImplMoveToScreen( aState.mnMaximizedX, aState.mnMaximizedY, aState.mnMaximizedWidth, aState.mnMaximizedHeight, pWindow );
@@ -782,7 +782,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.nRight ||
(unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
{
- // displacing would leave screen
+ // displacing would leave screen
aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0)
aState.mnY = displacement;
if( bWrapped ||
@@ -840,10 +840,10 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( IsRollUp() )
RollDown();
- long nX = rData.GetX();
- long nY = rData.GetY();
- long nWidth = rData.GetWidth();
- long nHeight = rData.GetHeight();
+ long nX = rData.GetX();
+ long nY = rData.GetY();
+ long nWidth = rData.GetWidth();
+ long nHeight = rData.GetHeight();
const SalFrameGeometry& rGeom = pWindow->mpWindowImpl->mpFrame->GetGeometry();
if( nX < 0 )
nX = 0;
@@ -1021,7 +1021,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar )
}
MenuBar::ImplDestroy( pOldMenuBar, bDelete );
if( bDelete )
- pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
+ pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
}
}
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 54985a3a36e2..9054ca8ca7f8 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,19 +39,19 @@
void TabDialog::ImplInitTabDialogData()
{
- mpFixedLine = NULL;
- mpViewWindow = NULL;
- meViewAlign = WINDOWALIGN_LEFT;
- mbPosControls = TRUE;
+ mpFixedLine = NULL;
+ mpViewWindow = NULL;
+ meViewAlign = WINDOWALIGN_LEFT;
+ mbPosControls = TRUE;
}
// -----------------------------------------------------------------------
void TabDialog::ImplPosControls()
{
- Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
- long nDownCtrl = 0;
- long nOffY = 0;
+ Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
+ long nDownCtrl = 0;
+ long nOffY = 0;
TabControl* pTabControl = NULL;
Window* pChild = GetWindow( WINDOW_FIRSTCHILD );
@@ -91,56 +91,56 @@ void TabDialog::ImplPosControls()
if ( nOffY )
nOffY += IMPL_DIALOG_BAR_OFFSET*2 + 2;
- Point aTabOffset( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+nOffY );
- Size aTabSize = pTabControl->GetSizePixel();
- Size aDlgSize( aTabSize.Width() + IMPL_DIALOG_OFFSET*2,
+ Point aTabOffset( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+nOffY );
+ Size aTabSize = pTabControl->GetSizePixel();
+ Size aDlgSize( aTabSize.Width() + IMPL_DIALOG_OFFSET*2,
aTabSize.Height() + IMPL_DIALOG_OFFSET*2 + nOffY );
- long nBtnEx = 0;
+ long nBtnEx = 0;
// Preview-Fenster beruecksichtigen und die Groessen/Offsets anpassen
if ( mpViewWindow && mpViewWindow->IsVisible() )
{
- long nViewOffX = 0;
- long nViewOffY = 0;
- long nViewWidth = 0;
- long nViewHeight = 0;
- USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
- Size aViewSize = mpViewWindow->GetSizePixel();
+ long nViewOffX = 0;
+ long nViewOffY = 0;
+ long nViewWidth = 0;
+ long nViewHeight = 0;
+ USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
+ Size aViewSize = mpViewWindow->GetSizePixel();
if ( meViewAlign == WINDOWALIGN_TOP )
{
- nViewOffX = aTabOffset.X();
- nViewOffY = nOffY+IMPL_DIALOG_OFFSET;
- nViewWidth = aTabSize.Width();
+ nViewOffX = aTabOffset.X();
+ nViewOffY = nOffY+IMPL_DIALOG_OFFSET;
+ nViewWidth = aTabSize.Width();
nViewPosFlags |= WINDOW_POSSIZE_WIDTH;
aTabOffset.Y() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
}
else if ( meViewAlign == WINDOWALIGN_BOTTOM )
{
- nViewOffX = aTabOffset.X();
- nViewOffY = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET;
- nViewWidth = aTabSize.Width();
+ nViewOffX = aTabOffset.X();
+ nViewOffY = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET;
+ nViewWidth = aTabSize.Width();
nViewPosFlags |= WINDOW_POSSIZE_WIDTH;
aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
}
else if ( meViewAlign == WINDOWALIGN_RIGHT )
{
- nViewOffX = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET;
- nViewOffY = aTabOffset.Y();
- nViewHeight = aTabSize.Height();
+ nViewOffX = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET;
+ nViewOffY = aTabOffset.Y();
+ nViewHeight = aTabSize.Height();
nViewPosFlags |= WINDOW_POSSIZE_HEIGHT;
aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
- nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
+ nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
}
else // meViewAlign == WINDOWALIGN_LEFT
{
- nViewOffX = IMPL_DIALOG_OFFSET;
- nViewOffY = aTabOffset.Y();
- nViewHeight = aTabSize.Height();
+ nViewOffX = IMPL_DIALOG_OFFSET;
+ nViewOffY = aTabOffset.Y();
+ nViewHeight = aTabSize.Height();
nViewPosFlags |= WINDOW_POSSIZE_HEIGHT;
aTabOffset.X() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
- nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
+ nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
}
mpViewWindow->SetPosSizePixel( nViewOffX, nViewOffY,
@@ -152,11 +152,11 @@ void TabDialog::ImplPosControls()
pTabControl->SetPosPixel( aTabOffset );
// Alle anderen Childs positionieren
- BOOL bTabCtrl = FALSE;
- int nLines = 0;
+ BOOL bTabCtrl = FALSE;
+ int nLines = 0;
long nX;
- long nY = aDlgSize.Height();
- long nTopX = IMPL_DIALOG_OFFSET;
+ long nY = aDlgSize.Height();
+ long nTopX = IMPL_DIALOG_OFFSET;
// Unter Windows 95 werden die Buttons rechtsbuendig angeordnet
nX = IMPL_DIALOG_OFFSET;
@@ -179,7 +179,7 @@ void TabDialog::ImplPosControls()
if ( nX+aCtrlSize.Width()-IMPL_DIALOG_OFFSET > (aTabSize.Width()+nBtnEx) )
{
nY += aCtrlSize.Height()+IMPL_DIALOG_OFFSET;
- nX = IMPL_DIALOG_OFFSET;
+ nX = IMPL_DIALOG_OFFSET;
nLines++;
}
@@ -250,7 +250,7 @@ void TabDialog::Resize()
// !!! In the future the controls should be automaticly rearrange
// !!! if the window is resized
// !!! if ( !IsRollUp() )
-// !!! ImplPosControls();
+// !!! ImplPosControls();
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index beb9382ceb76..9319f1bc0d54 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -174,7 +174,7 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
Wallpaper aWallpaper = GetBackground();
if ( !aWallpaper.IsBitmap() )
ImplInitSettings();
-
+
pDev->Push();
pDev->SetMapMode();
pDev->SetLineColor();
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 4299dfc00192..274551579715 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ Point ImplTaskPaneListGetPos( const Window *w )
else
pos = w->OutputToAbsoluteScreenPixel( pos );
}
- else
+ else
pos = w->OutputToAbsoluteScreenPixel( w->GetPosPixel() );
return pos;
@@ -392,7 +392,7 @@ Window* TaskPaneList::FindNextFloat( Window *pWindow, BOOL bForward )
++p;
}
- return pWindow;
+ return pWindow;
}
// --------------------------------------------------
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7c1bc22d916e..256e8478b942 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -230,11 +230,11 @@ ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
ToolBoxItemBits nBits( pItem->mnBits & 0x300 );
if ( nBits & TIB_TEXTICON ) // item has custom setting
{
- tmpButtonType = BUTTON_SYMBOLTEXT;
+ tmpButtonType = BUTTON_SYMBOLTEXT;
if ( nBits == TIB_TEXT_ONLY )
- tmpButtonType = BUTTON_TEXT;
+ tmpButtonType = BUTTON_TEXT;
else if ( nBits == TIB_ICON_ONLY )
- tmpButtonType = BUTTON_SYMBOL;
+ tmpButtonType = BUTTON_SYMBOL;
}
return tmpButtonType;
}
@@ -317,7 +317,7 @@ static void ImplCheckUpdate( ToolBox *pThis )
// which would result in erasing the background only and not painting any items
// this must not be done when we're already in Paint()
- // this is only required for transparent toolbars (see ImplDrawTransparentBackground() )
+ // this is only required for transparent toolbars (see ImplDrawTransparentBackground() )
if( !pThis->IsBackground() && pThis->HasPaintEvent() && !pThis->IsInPaint() )
pThis->Update();
}
@@ -341,7 +341,7 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis )
Rectangle aCtrlRegion( aPt, pThis->GetOutputSizePixel() );
ControlState nState = CTRL_STATE_ENABLED;
- bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
+ bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
aCtrlRegion, nState, aToolbarValue, rtl::OUString() );
}
@@ -555,7 +555,7 @@ BOOL ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & )
Rectangle aCtrlRegion( aPt, pThis->GetOutputSizePixel() );
ControlState nState = CTRL_STATE_ENABLED;
- return pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
+ return pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aCtrlRegion, nState, ImplControlValue(), rtl::OUString() );
}
@@ -563,11 +563,11 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi
{
// just invalidate to trigger paint of the parent
- const bool bOldPaintLock = pThis->mpData->mbIsPaintLocked;
+ const bool bOldPaintLock = pThis->mpData->mbIsPaintLocked;
pThis->mpData->mbIsPaintLocked = true;
// send an invalidate to the first opaque parent and invalidate the whole hierarchy from there (noclipchildren)
- pThis->Invalidate( rRegion, INVALIDATE_UPDATE|INVALIDATE_NOCLIPCHILDREN );
+ pThis->Invalidate( rRegion, INVALIDATE_UPDATE|INVALIDATE_NOCLIPCHILDREN );
pThis->mpData->mbIsPaintLocked = bOldPaintLock;
}
@@ -581,7 +581,7 @@ void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion,
else
{
// use different color in popupmode
- pThis->DrawWallpaper( rRegion.GetBoundRect(),
+ pThis->DrawWallpaper( rRegion.GetBoundRect(),
Wallpaper( pThis->GetSettings().GetStyleSettings().GetFaceGradientColor() ) );
}
}
@@ -643,7 +643,7 @@ void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, BOOL bHighlight
// the background of non NWF buttons is painted in a constant color
// to have the same highlight color (transparency in DrawSelectionBackground())
// items with open popups will also painted using a constant color
- if( !pThis->mpData->mbNativeButtons &&
+ if( !pThis->mpData->mbNativeButtons &&
(bHighlight || ! (((Window*) pThis)->GetStyle() & WB_3DLOOK ) ) )
{
if( (((Window*) pThis)->GetStyle() & WB_3DLOOK ) )
@@ -1043,12 +1043,12 @@ USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
nLineHeight += TB_LINESPACING;
nToolSize += TB_LINESPACING;
}
-
+
// #i91917# always report at least one line
long nLines = nToolSize/nLineHeight;
if( nLines < 1 )
nLines = 1;
-
+
return static_cast<USHORT>(nLines);
}
@@ -1575,7 +1575,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
ImplGetWindowImpl()->mbToolBox = TRUE;
mpBtnDev = NULL;
mpFloatSizeAry = NULL;
- mpData = new ImplToolBoxPrivateData;
+ mpData = new ImplToolBoxPrivateData;
mpFloatWin = NULL;
mnDX = 0;
mnDY = 0;
@@ -1594,7 +1594,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mnCurItemId = 0;
mnDownItemId = 0;
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
- mnFocusPos = TOOLBOX_ITEM_NOTFOUND; // current position during keyboard access
+ mnFocusPos = TOOLBOX_ITEM_NOTFOUND; // current position during keyboard access
mnLines = 1;
mnCurLine = 1;
mnCurLines = 1;
@@ -1620,7 +1620,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mbDragging = FALSE;
mbHideStatusText = FALSE;
mbMenuStrings = FALSE;
- mbIsShift = FALSE;
+ mbIsShift = FALSE;
mbIsKeyEvent = FALSE;
mbChangingHighlight = FALSE;
meButtonType = BUTTON_SYMBOL;
@@ -1628,7 +1628,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
meLastStyle = POINTER_ARROW;
mnWinStyle = nStyle;
mnLastFocusItemId = 0;
- mnKeyModifier = 0;
+ mnKeyModifier = 0;
mnActivateCount = 0;
maTimer.SetTimeout( 50 );
@@ -1725,7 +1725,7 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
-
+
DockingWindow::ImplLoadRes( rResId );
ULONG nObjMask;
@@ -1937,7 +1937,7 @@ BOOL ToolBox::ImplCalcItem()
mpData->mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
}
}
-
+
// also calculate the area for comboboxes, drop down list boxes and spinfields
// as these are often inserted into toolboxes; set mnWinHeight to the
// greater of those values to prevent toolbar flickering (#i103385#)
@@ -1977,10 +1977,10 @@ BOOL ToolBox::ImplCalcItem()
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
- }
-
+ }
+
if ( ! mpData->m_aItems.empty() )
- {
+ {
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
@@ -2000,7 +2000,7 @@ BOOL ToolBox::ImplCalcItem()
bText = FALSE;
else
bText = TRUE;
- ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting
+ ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting
if ( bImage || bText )
{
@@ -2091,7 +2091,7 @@ BOOL ToolBox::ImplCalcItem()
{
// add borders
ImplAddButtonBorder( it->maItemSize.Width(), it->maItemSize.Height(), mnOutStyle, mpData->mbNativeButtons );
-
+
if( it->meType == TOOLBOXITEM_BUTTON )
{
if( it->maItemSize.Width() < nMinWidth )
@@ -3416,13 +3416,13 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highl
ControlState nState = 0;
if ( highlight == 1 ) nState |= CTRL_STATE_PRESSED;
- if ( highlight == 2 ) nState |= CTRL_STATE_ROLLOVER;
+ if ( highlight == 2 ) nState |= CTRL_STATE_ROLLOVER;
if ( bEnabled ) nState |= CTRL_STATE_ENABLED;
aControlValue.setTristateVal( bChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
- bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
+ bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
rRect, nState, aControlValue, rtl::OUString() );
}
@@ -3633,7 +3633,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
// determine what has to be drawn on the button: image, text or both
BOOL bImage;
BOOL bText;
- ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting
+ ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting
pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText );
// compute output values
@@ -3685,7 +3685,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
nImageOffX += (nBtnWidth-aImageSize.Width())/2;
nImageOffY += (nBtnHeight-aImageSize.Height())/2;
}
- if ( bHighlight || (pItem->meState == STATE_CHECK) )
+ if ( bHighlight || (pItem->meState == STATE_CHECK) )
{
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
@@ -3923,7 +3923,7 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow )
// draw current item with highlight and keep old state
BOOL bWasKeyboardActivate = mpData->mbDropDownByKeyboard;
-
+
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
ImplDrawItem( mnCurPos, bWasKeyboardActivate ? 2 : 0 );
Deactivate();
@@ -3962,7 +3962,7 @@ void ToolBox::ShowLine( BOOL bNext )
mnCurLine = mnCurLine - delta;
else
mnCurLine = 1;
- }
+ }
}
else
{
@@ -4060,7 +4060,7 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
{
mpData->maDropdownTimer.Stop();
}
-
+
if ( mbDrag || mbSelection )
{
// Hier die MouseDaten setzen, wenn Selection-Modus, da dann kein
@@ -4753,7 +4753,7 @@ void ToolBox::Move()
// -----------------------------------------------------------------------
void ToolBox::Resize()
-{
+{
Size aSize = GetOutputSizePixel();
// #i31422# some WindowManagers send (0,0) sizes when
// switching virtual desktops - ignore this and avoid reformatting
@@ -4890,7 +4890,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
String aCommand = GetItemCommand( nItemId );
ULONG nHelpId = GetHelpId( nItemId );
-
+
if ( aCommand.Len() || nHelpId )
{
// Wenn eine Hilfe existiert, dann ausloesen
@@ -5388,7 +5388,7 @@ Size ToolBox::CalcWindowSizePixel( USHORT nCalcLines, WindowAlign eAlign ) const
USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
{
USHORT nLines = 0;
-
+
std::vector< ImplToolItem >::const_iterator it = ((ToolBox*)pThis)->mpData->m_aItems.begin();
while ( it != ((ToolBox*)pThis)->mpData->m_aItems.end() )
{
@@ -5403,7 +5403,7 @@ Size ToolBox::CalcPopupWindowSizePixel() const
{
// count number of breaks and calc corresponding floating window size
USHORT nLines = ImplCountLineBreaks( this );
-
+
if( nLines )
nLines++; // add the first line
else
@@ -5732,7 +5732,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
case KEY_UP:
{
// Ctrl-Cursor activates next toolbox, indicated by a blue arrow pointing to the left/up
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( !IsHorizontal() )
ImplChangeHighlightUpDn( TRUE );
@@ -5742,7 +5742,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_LEFT:
{
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( IsHorizontal() )
ImplChangeHighlightUpDn( TRUE );
@@ -5752,7 +5752,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_DOWN:
{
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( !IsHorizontal() )
ImplChangeHighlightUpDn( FALSE );
@@ -5762,7 +5762,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_RIGHT:
{
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( IsHorizontal() )
ImplChangeHighlightUpDn( FALSE );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 0fafed0dd061..d101122701de 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +53,7 @@ using namespace rtl;
// =======================================================================
-#define TB_SEP_SIZE 8
+#define TB_SEP_SIZE 8
// -----------------------------------------------------------------------
@@ -95,22 +95,22 @@ ImplToolBoxPrivateData::~ImplToolBoxPrivateData()
// -----------------------------------------------------------------------
ImplToolItem::ImplToolItem()
{
- mnId = 0;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = 0;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = TRUE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = 0;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = 0;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = TRUE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = FALSE;
+ mnImageAngle = 0;
+ mbMirrorMode = FALSE;
mbVisibleText = FALSE;
}
@@ -120,22 +120,22 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
ToolBoxItemBits nItemBits ) :
maImage( rImage )
{
- mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = nItemBits;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = nItemId;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = nItemBits;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = FALSE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = false;
+ mnImageAngle = 0;
+ mbMirrorMode = false;
mbVisibleText = false;
}
@@ -145,22 +145,22 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText,
ToolBoxItemBits nItemBits ) :
maText( rText )
{
- mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = nItemBits;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = nItemId;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = nItemBits;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = FALSE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = false;
+ mnImageAngle = 0;
+ mbMirrorMode = false;
mbVisibleText = false;
}
@@ -171,54 +171,54 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
maImage( rImage ),
maText( rText )
{
- mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = nItemBits;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = nItemId;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = nItemBits;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = FALSE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = false;
+ mnImageAngle = 0;
+ mbMirrorMode = false;
mbVisibleText = false;
}
// -----------------------------------------------------------------------
ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) :
- mpWindow ( rItem.mpWindow ),
- mpUserData ( rItem.mpUserData ),
- maImage ( rItem.maImage ),
- maHighImage ( rItem.maHighImage ),
- mnImageAngle ( rItem.mnImageAngle ),
- mbMirrorMode ( rItem.mbMirrorMode ),
- maText ( rItem.maText ),
- maQuickHelpText ( rItem.maQuickHelpText ),
- maHelpText ( rItem.maHelpText ),
- maCommandStr ( rItem.maCommandStr ),
- mnHelpId ( rItem.mnHelpId ),
- maRect ( rItem.maRect ),
- maCalcRect ( rItem.maCalcRect ),
- maItemSize ( rItem.maItemSize ),
- mnSepSize ( rItem.mnSepSize ),
+ mpWindow ( rItem.mpWindow ),
+ mpUserData ( rItem.mpUserData ),
+ maImage ( rItem.maImage ),
+ maHighImage ( rItem.maHighImage ),
+ mnImageAngle ( rItem.mnImageAngle ),
+ mbMirrorMode ( rItem.mbMirrorMode ),
+ maText ( rItem.maText ),
+ maQuickHelpText ( rItem.maQuickHelpText ),
+ maHelpText ( rItem.maHelpText ),
+ maCommandStr ( rItem.maCommandStr ),
+ mnHelpId ( rItem.mnHelpId ),
+ maRect ( rItem.maRect ),
+ maCalcRect ( rItem.maCalcRect ),
+ maItemSize ( rItem.maItemSize ),
+ mnSepSize ( rItem.mnSepSize ),
mnDropDownArrowWidth ( rItem.mnDropDownArrowWidth ),
- meType ( rItem.meType ),
- mnBits ( rItem.mnBits ),
- meState ( rItem.meState ),
- mnId ( rItem.mnId ),
- mbEnabled ( rItem.mbEnabled ),
- mbVisible ( rItem.mbVisible ),
- mbEmptyBtn ( rItem.mbEmptyBtn ),
- mbShowWindow ( rItem.mbShowWindow ),
- mbBreak ( rItem.mbBreak ),
- mbVisibleText ( rItem.mbVisibleText )
+ meType ( rItem.meType ),
+ mnBits ( rItem.mnBits ),
+ meState ( rItem.meState ),
+ mnId ( rItem.mnId ),
+ mbEnabled ( rItem.mbEnabled ),
+ mbVisible ( rItem.mbVisible ),
+ mbEmptyBtn ( rItem.mbEmptyBtn ),
+ mbShowWindow ( rItem.mbShowWindow ),
+ mbBreak ( rItem.mbBreak ),
+ mbVisibleText ( rItem.mbVisibleText )
{
}
@@ -232,32 +232,32 @@ ImplToolItem::~ImplToolItem()
ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem )
{
- mpWindow = rItem.mpWindow;
- mpUserData = rItem.mpUserData;
- maImage = rItem.maImage;
- maHighImage = rItem.maHighImage;
- mnImageAngle = rItem.mnImageAngle;
- mbMirrorMode = rItem.mbMirrorMode;
- maText = rItem.maText;
- maQuickHelpText = rItem.maQuickHelpText;
- maHelpText = rItem.maHelpText;
- maCommandStr = rItem.maCommandStr;
- mnHelpId = rItem.mnHelpId;
- maRect = rItem.maRect;
- maCalcRect = rItem.maCalcRect;
- mnSepSize = rItem.mnSepSize;
+ mpWindow = rItem.mpWindow;
+ mpUserData = rItem.mpUserData;
+ maImage = rItem.maImage;
+ maHighImage = rItem.maHighImage;
+ mnImageAngle = rItem.mnImageAngle;
+ mbMirrorMode = rItem.mbMirrorMode;
+ maText = rItem.maText;
+ maQuickHelpText = rItem.maQuickHelpText;
+ maHelpText = rItem.maHelpText;
+ maCommandStr = rItem.maCommandStr;
+ mnHelpId = rItem.mnHelpId;
+ maRect = rItem.maRect;
+ maCalcRect = rItem.maCalcRect;
+ mnSepSize = rItem.mnSepSize;
mnDropDownArrowWidth = rItem.mnDropDownArrowWidth;
- maItemSize = rItem.maItemSize;
- mbVisibleText = rItem.mbVisibleText;
- meType = rItem.meType;
- mnBits = rItem.mnBits;
- meState = rItem.meState;
- mnId = rItem.mnId;
- mbEnabled = rItem.mbEnabled;
- mbVisible = rItem.mbVisible;
- mbEmptyBtn = rItem.mbEmptyBtn;
- mbShowWindow = rItem.mbShowWindow;
- mbBreak = rItem.mbBreak;
+ maItemSize = rItem.maItemSize;
+ mbVisibleText = rItem.mbVisibleText;
+ meType = rItem.meType;
+ mnBits = rItem.mnBits;
+ meState = rItem.meState;
+ mnId = rItem.mnId;
+ mbEnabled = rItem.mbEnabled;
+ mbVisible = rItem.mbVisible;
+ mbEmptyBtn = rItem.mbEmptyBtn;
+ mbShowWindow = rItem.mbShowWindow;
+ mbBreak = rItem.mbBreak;
return *this;
}
@@ -573,14 +573,14 @@ void ToolBox::UserDraw( const UserDrawEvent& )
void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
{
- ULONG nObjMask;
- BOOL bImage = FALSE; // Wurde Image gesetzt
+ ULONG nObjMask;
+ BOOL bImage = FALSE; // Wurde Image gesetzt
// Item anlegen
ImplToolItem aItem;
GetRes( rResId.SetRT( RSC_TOOLBOXITEM ) );
- nObjMask = ReadLongRes();
+ nObjMask = ReadLongRes();
if ( nObjMask & RSC_TOOLBOXITEM_ID )
aItem.mnId = sal::static_int_cast<USHORT>(ReadLongRes());
@@ -621,7 +621,7 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
aItem.mbEnabled = !(BOOL)ReadShortRes();
if ( nObjMask & RSC_TOOLBOXITEM_STATE )
- aItem.meState = (TriState)ReadLongRes();
+ aItem.meState = (TriState)ReadLongRes();
if ( nObjMask & RSC_TOOLBOXITEM_HIDE )
aItem.mbVisible = !((BOOL)ReadShortRes());
@@ -734,10 +734,10 @@ void ToolBox::InsertWindow( USHORT nItemId, Window* pWindow,
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.mnId = nItemId;
- aItem.meType = TOOLBOXITEM_BUTTON;
- aItem.mnBits = nBits;
- aItem.mpWindow = pWindow;
+ aItem.mnId = nItemId;
+ aItem.meType = TOOLBOXITEM_BUTTON;
+ aItem.mnBits = nBits;
+ aItem.mpWindow = pWindow;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
@@ -757,8 +757,8 @@ void ToolBox::InsertSpace( USHORT nPos )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.meType = TOOLBOXITEM_SPACE;
- aItem.mbEnabled = FALSE;
+ aItem.meType = TOOLBOXITEM_SPACE;
+ aItem.mbEnabled = FALSE;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
@@ -775,8 +775,8 @@ void ToolBox::InsertSeparator( USHORT nPos, USHORT nPixSize )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.meType = TOOLBOXITEM_SEPARATOR;
- aItem.mbEnabled = FALSE;
+ aItem.meType = TOOLBOXITEM_SEPARATOR;
+ aItem.mbEnabled = FALSE;
if ( nPixSize )
aItem.mnSepSize = nPixSize;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
@@ -795,8 +795,8 @@ void ToolBox::InsertBreak( USHORT nPos )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.meType = TOOLBOXITEM_BREAK;
- aItem.mbEnabled = FALSE;
+ aItem.meType = TOOLBOXITEM_BREAK;
+ aItem.mbEnabled = FALSE;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
@@ -892,7 +892,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, USHORT nItemId,
// ToolBox-Item in der Liste verschieben
ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos];
// Bestimme Daten zuruecksetzen
- aNewItem.mpWindow = NULL;
+ aNewItem.mpWindow = NULL;
aNewItem.mbShowWindow = FALSE;
mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem );
@@ -919,8 +919,8 @@ void ToolBox::CopyItems( const ToolBox& rToolBox )
for( std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
it != mpData->m_aItems.end(); ++it )
{
- it->mpWindow = NULL;
- it->mbShowWindow = FALSE;
+ it->mpWindow = NULL;
+ it->mbShowWindow = FALSE;
}
ImplInvalidate( TRUE, TRUE );
@@ -1383,8 +1383,8 @@ void ToolBox::SetImageList( const ImageList& rImageList )
static Image ImplRotImage( const Image& rImage, long nAngle10 )
{
- Image aRet;
- BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
+ Image aRet;
+ BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
aRotBitmapEx.Rotate( nAngle10, Color( COL_WHITE ) );
@@ -1426,8 +1426,8 @@ void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 )
static Image ImplMirrorImage( const Image& rImage )
{
- Image aRet;
- BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() );
+ Image aRet;
+ BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() );
aMirrBitmapEx.Mirror( BMP_MIRROR_HORZ );
@@ -1604,7 +1604,7 @@ void ToolBox::StartSelection()
if ( !mbSelection )
{
mbSelection = TRUE;
- mnCurPos = TOOLBOX_ITEM_NOTFOUND;
+ mnCurPos = TOOLBOX_ITEM_NOTFOUND;
mnCurItemId = 0;
Activate();
}
@@ -1628,10 +1628,10 @@ void ToolBox::EndSelection()
Deactivate();
}
- mnCurPos = TOOLBOX_ITEM_NOTFOUND;
- mnCurItemId = 0;
- mnDownItemId = 0;
- mnMouseClicks = 0;
+ mnCurPos = TOOLBOX_ITEM_NOTFOUND;
+ mnCurItemId = 0;
+ mnDownItemId = 0;
+ mnMouseClicks = 0;
mnMouseModifier = 0;
}
@@ -1673,9 +1673,9 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
Deactivate();
}
- mnCurItemId = 0;
- mnDownItemId = 0;
- mnMouseClicks = 0;
+ mnCurItemId = 0;
+ mnDownItemId = 0;
+ mnMouseClicks = 0;
mnMouseModifier = 0;
}
}
@@ -1710,9 +1710,9 @@ void ToolBox::SetItemState( USHORT nItemId, TriState eState )
if ( (eState == STATE_CHECK) && (pItem->mnBits & TIB_AUTOCHECK) &&
(pItem->mnBits & TIB_RADIOCHECK) )
{
- ImplToolItem* pGroupItem;
- USHORT nGroupPos;
- USHORT nItemCount = GetItemCount();
+ ImplToolItem* pGroupItem;
+ USHORT nGroupPos;
+ USHORT nItemCount = GetItemCount();
nGroupPos = nPos;
while ( nGroupPos )
@@ -2422,7 +2422,7 @@ void ToolBox::ImplUpdateImageList()
vcl::IImageListProvider* pImageListProvider = mpData->mpImageListProvider;
SetImageList( pImageListProvider->getImageList(eType) );
mpData->meImageListType = eType;
- }
+ }
}
catch (com::sun::star::lang::IllegalArgumentException &) {}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ffc447b09172..c130c8cf8306 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -497,7 +497,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
}
}
}
-
+
static const char* pEnvHC = getenv( "SAL_FORCE_HC" );
if( pEnvHC && *pEnvHC )
{
@@ -719,7 +719,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
ImplSVData* pSVData = ImplGetSVData();
Window* pRealParent = pParent;
-
+
// 3D-Look vererben
if ( !mpWindowImpl->mbOverlapWin && pParent && (pParent->GetStyle() & WB_3DLOOK) )
nStyle |= WB_3DLOOK;
@@ -2337,7 +2337,7 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags )
// call PrePaint. PrePaint may add to the invalidate region as well as
// other parameters used below.
PrePaint();
-
+
mpWindowImpl->mbPaintFrame = FALSE;
if ( nPaintFlags & IMPL_PAINT_PAINTALLCHILDS )
@@ -3278,7 +3278,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
nX = mpWindowImpl->mpParent->mnOutWidth - mnOutWidth - nX;
}
}
-
+
// check maPos as well, as it could have been changed for client windows (ImplCallMove())
if ( mpWindowImpl->mnAbsScreenX != aPtDev.X() || nX != mpWindowImpl->mnX || nOrgX != mpWindowImpl->maPos.X() )
{
@@ -9359,7 +9359,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
{
if( rRect.IsEmpty() )
return;
-
+
bool bRoundEdges = nCornerRadius > 0;
const StyleSettings& rStyles = GetSettings().GetStyleSettings();
@@ -9838,7 +9838,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
// preserve graphicsstate
Push();
Region aClipRegion( GetClipRegion() );
- SetClipRegion();
+ SetClipRegion();
GDIMetaFile* pOldMtf = GetConnectMetaFile();
GDIMetaFile aMtf;
@@ -9900,7 +9900,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
SetConnectMetaFile( pOldMtf );
EnableOutput( bOutput );
mpWindowImpl->mbReallyVisible = bRVisible;
-
+
// paint metafile to VDev
VirtualDevice* pMaskedDevice = new VirtualDevice( *i_pTargetOutDev, 0, 0 );
pMaskedDevice->SetOutputSizePixel( GetOutputSizePixel() );
@@ -9922,7 +9922,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
nDeltaX = mnOutWidth - nDeltaX - pChild->mnOutWidth;
long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel();
Point aPos( i_rPos );
- Point aDelta( nDeltaX, nDeltaY );
+ Point aDelta( nDeltaX, nDeltaY );
aPos += aDelta;
pChild->ImplPaintToDevice( i_pTargetOutDev, aPos );
}
@@ -9941,11 +9941,11 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /*rSize*/ )
{
// FIXME: scaling: currently this is for pixel copying only
-
+
DBG_ASSERT( ! pDev->ImplHasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" );
-
-
+
+
Point aPos = pDev->LogicToPixel( rPos );
Window* pRealParent = NULL;
@@ -9963,7 +9963,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
BOOL bVisible = mpWindowImpl->mbVisible;
mpWindowImpl->mbVisible = TRUE;
-
+
if( mpWindowImpl->mpBorderWindow )
mpWindowImpl->mpBorderWindow->ImplPaintToDevice( pDev, rPos );
else
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 00f8d7b59705..7ee1a5aa82c2 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -353,13 +353,13 @@ Bitmap Window::SnapShot() const
void Window::ShowFocus( const Rectangle& rRect )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-
+
if( mpWindowImpl->mbInShowFocus )
return;
mpWindowImpl->mbInShowFocus = TRUE;
ImplWinData* pWinData = ImplGetWinData();
-
+
// native themeing suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
IsNativeWidgetEnabled() ) )
@@ -373,10 +373,10 @@ void Window::ShowFocus( const Rectangle& rRect )
mpWindowImpl->mbInShowFocus = FALSE;
return;
}
-
+
ImplInvertFocus( *(pWinData->mpFocusRect) );
}
-
+
ImplInvertFocus( rRect );
}
if ( !pWinData->mpFocusRect )
@@ -402,7 +402,7 @@ void Window::ShowFocus( const Rectangle& rRect )
void Window::HideFocus()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-
+
if( mpWindowImpl->mbInHideFocus )
return;
mpWindowImpl->mbInHideFocus = TRUE;
@@ -1224,9 +1224,9 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
nLines = pData->GetNotchDelta() * (long)nScrollLines;
if ( nLines )
{
- ImplHandleScroll( NULL,
- 0L,
- pData->IsHorz() ? pHScrl : pVScrl,
+ ImplHandleScroll( NULL,
+ 0L,
+ pData->IsHorz() ? pHScrl : pVScrl,
nLines );
bRet = TRUE;
}
@@ -1306,7 +1306,7 @@ void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX,
}
}
-// support for docking
+// support for docking
// this is currently handled in ImplDockingWindowWrapper
/*
void Window::ImplSetFloatingMode( BOOL bFloatMode )
@@ -1441,14 +1441,14 @@ Window* Window::ImplGetTopmostFrameWindow()
// making these Methods out of line to be able to change them lateron without complete rebuild
// TODO: Set the SmartId in here and remove mpWindowImpl->mnHelpId
-void Window::SetHelpId( ULONG nHelpId )
-{
- SetSmartHelpId(SmartId(nHelpId));
+void Window::SetHelpId( ULONG nHelpId )
+{
+ SetSmartHelpId(SmartId(nHelpId));
}
-ULONG Window::GetHelpId() const
-{
- return mpWindowImpl->mnHelpId;
+ULONG Window::GetHelpId() const
+{
+ return mpWindowImpl->mnHelpId;
}
void Window::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
@@ -1463,7 +1463,7 @@ void Window::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
// if we have a SmartId (eather from earlier call or just created) fill with new values
if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartHelpId )
ImplGetWinData()->mpSmartHelpId->UpdateId( aId, aMode );
-
+
if ( (aMode == SMART_SET_NUM) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasNumeric() ) )
{
mpWindowImpl->mnHelpId = aId.GetNum();
@@ -1506,7 +1506,7 @@ void Window::SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode )
// if we have a SmartId (eather from earlier call or just created) fill with new values
if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartUniqueId )
ImplGetWinData()->mpSmartUniqueId->UpdateId( aId, aMode );
-
+
if ( (aMode == SMART_SET_NUM) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasNumeric() ) )
mpWindowImpl->mnUniqId = aId.GetNum();
}
@@ -1820,210 +1820,210 @@ BOOL Window::IsControlFont() const
}
Color Window::GetControlForeground() const
-{
- return mpWindowImpl->maControlForeground;
+{
+ return mpWindowImpl->maControlForeground;
}
-BOOL Window::IsControlForeground() const
-{
- return mpWindowImpl->mbControlForeground;
+BOOL Window::IsControlForeground() const
+{
+ return mpWindowImpl->mbControlForeground;
}
-Color Window::GetControlBackground() const
-{
- return mpWindowImpl->maControlBackground;
+Color Window::GetControlBackground() const
+{
+ return mpWindowImpl->maControlBackground;
}
-BOOL Window::IsControlBackground() const
-{
- return mpWindowImpl->mbControlBackground;
+BOOL Window::IsControlBackground() const
+{
+ return mpWindowImpl->mbControlBackground;
}
-BOOL Window::IsInPaint() const
-{
- return mpWindowImpl->mbInPaint;
+BOOL Window::IsInPaint() const
+{
+ return mpWindowImpl->mbInPaint;
}
-Window* Window::GetParent() const
-{
- return mpWindowImpl->mpRealParent;
+Window* Window::GetParent() const
+{
+ return mpWindowImpl->mpRealParent;
}
-BOOL Window::IsVisible() const
-{
- return mpWindowImpl->mbVisible;
+BOOL Window::IsVisible() const
+{
+ return mpWindowImpl->mbVisible;
}
-BOOL Window::IsReallyVisible() const
-{
- return mpWindowImpl->mbReallyVisible;
+BOOL Window::IsReallyVisible() const
+{
+ return mpWindowImpl->mbReallyVisible;
}
-BOOL Window::IsParentPathVisible() const
-{
- return mpWindowImpl->mbReallyVisible;
+BOOL Window::IsParentPathVisible() const
+{
+ return mpWindowImpl->mbReallyVisible;
}
-BOOL Window::IsReallyShown() const
-{
- return mpWindowImpl->mbReallyShown;
+BOOL Window::IsReallyShown() const
+{
+ return mpWindowImpl->mbReallyShown;
}
-BOOL Window::IsInInitShow() const
-{
- return mpWindowImpl->mbInInitShow;
+BOOL Window::IsInInitShow() const
+{
+ return mpWindowImpl->mbInInitShow;
}
-BOOL Window::IsEnabled() const
-{
- return !mpWindowImpl->mbDisabled;
+BOOL Window::IsEnabled() const
+{
+ return !mpWindowImpl->mbDisabled;
}
-BOOL Window::IsInputEnabled() const
-{
- return !mpWindowImpl->mbInputDisabled;
+BOOL Window::IsInputEnabled() const
+{
+ return !mpWindowImpl->mbInputDisabled;
}
-BOOL Window::IsAlwaysEnableInput() const
-{
- return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
+BOOL Window::IsAlwaysEnableInput() const
+{
+ return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
}
-BOOL Window::IsAlwaysDisableInput() const
-{
- return mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled;
+BOOL Window::IsAlwaysDisableInput() const
+{
+ return mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled;
}
-USHORT Window::GetActivateMode() const
-{
- return mpWindowImpl->mnActivateMode;
+USHORT Window::GetActivateMode() const
+{
+ return mpWindowImpl->mnActivateMode;
}
-BOOL Window::IsAlwaysOnTopEnabled() const
-{
- return mpWindowImpl->mbAlwaysOnTop;
+BOOL Window::IsAlwaysOnTopEnabled() const
+{
+ return mpWindowImpl->mbAlwaysOnTop;
}
-BOOL Window::IsDefaultPos() const
-{
- return mpWindowImpl->mbDefPos;
+BOOL Window::IsDefaultPos() const
+{
+ return mpWindowImpl->mbDefPos;
}
-BOOL Window::IsDefaultSize() const
-{
- return mpWindowImpl->mbDefSize;
+BOOL Window::IsDefaultSize() const
+{
+ return mpWindowImpl->mbDefSize;
}
-void Window::EnablePaint( BOOL bEnable )
-{
- mpWindowImpl->mbPaintDisabled = !bEnable;
+void Window::EnablePaint( BOOL bEnable )
+{
+ mpWindowImpl->mbPaintDisabled = !bEnable;
}
-BOOL Window::IsPaintEnabled() const
-{
- return !mpWindowImpl->mbPaintDisabled;
+BOOL Window::IsPaintEnabled() const
+{
+ return !mpWindowImpl->mbPaintDisabled;
}
-BOOL Window::IsUpdateMode() const
-{
- return !mpWindowImpl->mbNoUpdate;
+BOOL Window::IsUpdateMode() const
+{
+ return !mpWindowImpl->mbNoUpdate;
}
-void Window::SetParentUpdateMode( BOOL bUpdate )
-{
- mpWindowImpl->mbNoParentUpdate = !bUpdate;
+void Window::SetParentUpdateMode( BOOL bUpdate )
+{
+ mpWindowImpl->mbNoParentUpdate = !bUpdate;
}
-BOOL Window::IsParentUpdateMode() const
-{
- return !mpWindowImpl->mbNoParentUpdate;
+BOOL Window::IsParentUpdateMode() const
+{
+ return !mpWindowImpl->mbNoParentUpdate;
}
-BOOL Window::IsActive() const
-{
- return mpWindowImpl->mbActive;
+BOOL Window::IsActive() const
+{
+ return mpWindowImpl->mbActive;
}
-USHORT Window::GetGetFocusFlags() const
-{
- return mpWindowImpl->mnGetFocusFlags;
+USHORT Window::GetGetFocusFlags() const
+{
+ return mpWindowImpl->mnGetFocusFlags;
}
-BOOL Window::IsCompoundControl() const
-{
- return mpWindowImpl->mbCompoundControl;
+BOOL Window::IsCompoundControl() const
+{
+ return mpWindowImpl->mbCompoundControl;
}
-BOOL Window::HasCompoundControlFocus() const
-{
- return mpWindowImpl->mbCompoundControlHasFocus;
+BOOL Window::HasCompoundControlFocus() const
+{
+ return mpWindowImpl->mbCompoundControlHasFocus;
}
-BOOL Window::IsChildPointerOverwrite() const
+BOOL Window::IsChildPointerOverwrite() const
{
- return mpWindowImpl->mbChildPtrOverwrite;
+ return mpWindowImpl->mbChildPtrOverwrite;
}
-BOOL Window::IsPointerVisible() const
-{
- return !mpWindowImpl->mbNoPtrVisible;
+BOOL Window::IsPointerVisible() const
+{
+ return !mpWindowImpl->mbNoPtrVisible;
}
-BOOL Window::IsWait() const
-{
- return (mpWindowImpl->mnWaitCount != 0);
+BOOL Window::IsWait() const
+{
+ return (mpWindowImpl->mnWaitCount != 0);
}
-Cursor* Window::GetCursor() const
-{
- return mpWindowImpl->mpCursor;
+Cursor* Window::GetCursor() const
+{
+ return mpWindowImpl->mpCursor;
}
-const Fraction& Window::GetZoom() const
-{
- return mpWindowImpl->maZoom;
+const Fraction& Window::GetZoom() const
+{
+ return mpWindowImpl->maZoom;
}
-BOOL Window::IsZoom() const
-{
- return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
+BOOL Window::IsZoom() const
+{
+ return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
}
-void Window::SetHelpText( const XubString& rHelpText )
-{
+void Window::SetHelpText( const XubString& rHelpText )
+{
mpWindowImpl->maHelpText = rHelpText;
mpWindowImpl->mbHelpTextDynamic = TRUE;
}
-void Window::SetQuickHelpText( const XubString& rHelpText )
-{
- mpWindowImpl->maQuickHelpText = rHelpText;
+void Window::SetQuickHelpText( const XubString& rHelpText )
+{
+ mpWindowImpl->maQuickHelpText = rHelpText;
}
-const XubString& Window::GetQuickHelpText() const
-{
- return mpWindowImpl->maQuickHelpText;
+const XubString& Window::GetQuickHelpText() const
+{
+ return mpWindowImpl->maQuickHelpText;
}
-void Window::SetData( void* pNewData )
-{
- mpWindowImpl->mpUserData = pNewData;
+void Window::SetData( void* pNewData )
+{
+ mpWindowImpl->mpUserData = pNewData;
}
-void* Window::GetData() const
-{
- return mpWindowImpl->mpUserData;
+void* Window::GetData() const
+{
+ return mpWindowImpl->mpUserData;
}
-BOOL Window::IsCreatedWithToolkit() const
-{
- return mpWindowImpl->mbCreatedWithToolkit;
+BOOL Window::IsCreatedWithToolkit() const
+{
+ return mpWindowImpl->mbCreatedWithToolkit;
}
-void Window::SetCreatedWithToolkit( BOOL b )
-{
- mpWindowImpl->mbCreatedWithToolkit = b;
+void Window::SetCreatedWithToolkit( BOOL b )
+{
+ mpWindowImpl->mbCreatedWithToolkit = b;
}
const Pointer& Window::GetPointer() const
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index f35e85e89464..064ea6b70e6b 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index ca35f12b5ce6..ca593bd948d8 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -475,9 +475,9 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
MouseEvent aMEvt( aChildPos, pWinFrameData->mnClickCount, nMode, nCode, nCode );
NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt );
Application::CallEventHooks( aNEvt );
-
+
if( pChild->IsCallHandlersOnInputDisabled() )
- {
+ {
pWinFrameData->mpMouseMoveWin = pChild;
pChild->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
}
@@ -1254,7 +1254,7 @@ static long ImplHandleExtTextInput( Window* pWindow,
{
ImplSVData* pSVData = ImplGetSVData();
Window* pChild = NULL;
-
+
int nTries = 200;
while( nTries-- )
{
@@ -1540,7 +1540,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
}
}
}
-
+
// close floaters
if( ! bIsFloat && pSVData->maWinData.mpFirstFloat )
{
@@ -1691,7 +1691,7 @@ static void ImplHandleMove( Window* pWindow )
pWindow->ImplGetWindowImpl()->mbCallMove = TRUE; // make sure the framepos will be updated on the next Show()
if ( pWindow->ImplGetWindowImpl()->mbFrame && pWindow->ImplGetWindowImpl()->mpClientWindow )
- pWindow->ImplGetWindowImpl()->mpClientWindow->ImplCallMove(); // notify client to update geometry
+ pWindow->ImplGetWindowImpl()->mpClientWindow->ImplCallMove(); // notify client to update geometry
}
@@ -2272,7 +2272,7 @@ static long ImplHandleShowDialog( Window* pWindow, int nDialogId )
{
if( ! pWindow )
return FALSE;
-
+
if( pWindow->GetType() == WINDOW_BORDERWINDOW )
{
Window* pWrkWin = pWindow->GetWindow( WINDOW_CLIENT );
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 72887ce0f577..384e0bd0cb64 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -309,7 +309,7 @@ BOOL WorkWindow::Close()
// Ist es das Applikationsfenster, dann beende die Applikation
if ( bCanClose && ( ImplGetSVData()->maWinData.mpAppWin == this ) )
GetpApp()->Quit();
-
+
return bCanClose;
}
@@ -325,8 +325,8 @@ BOOL WorkWindow::IsMaximized() const
SalFrameState aState;
if( mpWindowImpl->mpFrame->GetWindowState( &aState ) )
{
- if( aState.mnState & (SAL_FRAMESTATE_MAXIMIZED |
- SAL_FRAMESTATE_MAXIMIZED_HORZ |
+ if( aState.mnState & (SAL_FRAMESTATE_MAXIMIZED |
+ SAL_FRAMESTATE_MAXIMIZED_HORZ |
SAL_FRAMESTATE_MAXIMIZED_VERT ) )
bRet = TRUE;
}
diff --git a/vcl/test/canvasbitmaptest.cxx b/vcl/test/canvasbitmaptest.cxx
index 51ec6685f0ca..907c55dcd5e5 100644
--- a/vcl/test/canvasbitmaptest.cxx
+++ b/vcl/test/canvasbitmaptest.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +79,8 @@ SAL_IMPLEMENT_MAIN()
tools::extendApplicationEnvironment();
uno::Reference< lang::XMultiServiceFactory > xMS;
- xMS = cppu::createRegistryServiceFactory(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ),
+ xMS = cppu::createRegistryServiceFactory(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ),
sal_True );
InitVCL( xMS );
@@ -161,7 +161,7 @@ bool rangeCheck( const rendering::RGBColor& rColor )
//----------------------------------------------------------------------------------
-void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
+void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
const char* msg,
int nOriginalDepth )
{
@@ -192,7 +192,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
rendering::IntegerBitmapLayout aLayout;
uno::Sequence<sal_Int8> aPixelData = xBmp->getData(aLayout, geometry::IntegerRectangle2D(0,0,1,1));
-
+
const sal_Int32 nExpectedBitsPerPixel(
aContainedBmpEx.IsTransparent() ? std::max(8,nDepth)+8 : nDepth);
test( aLayout.ScanLines == 1,
@@ -212,7 +212,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
"Palette existance conforms to bitmap" );
uno::Sequence<sal_Int8> aPixelData2 = xBmp->getPixel( aLayout, geometry::IntegerPoint2D(0,0) );
-
+
test( aPixelData2.getLength() == aPixelData.getLength(),
"getData and getPixel return same amount of data" );
@@ -248,15 +248,15 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
test( pARGBStart[0].Alpha == 0.0,
"First pixel is fully transparent" );
}
-
+
test( pRGBStart[1].Red == 0.0 && pRGBStart[1].Green == 0.0 && pRGBStart[1].Blue == 0.0,
"Second pixel is black" );
if( nOriginalDepth > 8 )
{
const Color aCol(COL_GREEN);
- test( pRGBStart[5].Red == vcl::unotools::toDoubleColor(aCol.GetRed()) &&
- pRGBStart[5].Green == vcl::unotools::toDoubleColor(aCol.GetGreen()) &&
+ test( pRGBStart[5].Red == vcl::unotools::toDoubleColor(aCol.GetRed()) &&
+ pRGBStart[5].Green == vcl::unotools::toDoubleColor(aCol.GetGreen()) &&
pRGBStart[5].Blue == vcl::unotools::toDoubleColor(aCol.GetBlue()),
"Sixth pixel is green" );
}
@@ -312,7 +312,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
//----------------------------------------------------------------------------------
-void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp,
+void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp,
const char* msg,
int nOriginalDepth )
{
@@ -343,7 +343,7 @@ void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp,
rendering::IntegerBitmapLayout aLayout;
uno::Sequence<sal_Int8> aPixelData = xBmp->getData(aLayout, geometry::IntegerRectangle2D(0,0,1,1));
-
+
const sal_Int32 nExpectedBitsPerPixel(
aContainedBmpEx.IsTransparent() ? std::max(8,nDepth)+8 : nDepth);
test( aLayout.ScanLines == 1,
@@ -363,7 +363,7 @@ void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp,
"Palette existance conforms to bitmap" );
uno::Sequence<sal_Int8> aPixelData2 = xBmp->getPixel( aLayout, geometry::IntegerPoint2D(0,0) );
-
+
test( aPixelData2.getLength() == aPixelData.getLength(),
"getData and getPixel return same amount of data" );
@@ -399,15 +399,15 @@ void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp,
test( pARGBStart[0].Alpha == 0.0,
"First pixel is fully transparent" );
}
-
+
test( pRGBStart[1].Red == 0.0 && pRGBStart[1].Green == 0.0 && pRGBStart[1].Blue == 0.0,
"Second pixel is black" );
if( nOriginalDepth > 8 )
{
const Color aCol(COL_GREEN);
- test( pRGBStart[5].Red == vcl::unotools::toDoubleColor(aCol.GetRed()) &&
- pRGBStart[5].Green == vcl::unotools::toDoubleColor(aCol.GetGreen()) &&
+ test( pRGBStart[5].Red == vcl::unotools::toDoubleColor(aCol.GetRed()) &&
+ pRGBStart[5].Green == vcl::unotools::toDoubleColor(aCol.GetGreen()) &&
pRGBStart[5].Blue == vcl::unotools::toDoubleColor(aCol.GetBlue()),
"Sixth pixel is green" );
}
@@ -477,12 +477,12 @@ private:
// XBitmap
virtual geometry::IntegerSize2D SAL_CALL getSize() throw (uno::RuntimeException) { return maSize; }
virtual ::sal_Bool SAL_CALL hasAlpha( ) throw (uno::RuntimeException) { return mnBitsPerPixel != 8; }
- virtual uno::Reference< rendering::XBitmap > SAL_CALL getScaledBitmap( const geometry::RealSize2D&,
+ virtual uno::Reference< rendering::XBitmap > SAL_CALL getScaledBitmap( const geometry::RealSize2D&,
sal_Bool ) throw (uno::RuntimeException) { return this; }
// XIntegerReadOnlyBitmap
- virtual uno::Sequence< ::sal_Int8 > SAL_CALL getData( rendering::IntegerBitmapLayout& bitmapLayout,
- const geometry::IntegerRectangle2D& rect ) throw (lang::IndexOutOfBoundsException,
+ virtual uno::Sequence< ::sal_Int8 > SAL_CALL getData( rendering::IntegerBitmapLayout& bitmapLayout,
+ const geometry::IntegerRectangle2D& rect ) throw (lang::IndexOutOfBoundsException,
rendering::VolatileContentDestroyedException, uno::RuntimeException)
{
test( rect.X1 >= 0, "X1 within bounds" );
@@ -499,9 +499,9 @@ private:
sal_Int8* pOut = aRes.getArray();
bitmapLayout.ScanLines = nHeight;
- bitmapLayout.ScanLineBytes =
+ bitmapLayout.ScanLineBytes =
bitmapLayout.ScanLineStride= nScanlineLen;
-
+
if( mnBitsPerPixel == 8 )
{
for( sal_Int32 y=0; y<nHeight; ++y )
@@ -527,8 +527,8 @@ private:
return aRes;
}
- virtual uno::Sequence< ::sal_Int8 > SAL_CALL getPixel( rendering::IntegerBitmapLayout&,
- const geometry::IntegerPoint2D& ) throw (lang::IndexOutOfBoundsException,
+ virtual uno::Sequence< ::sal_Int8 > SAL_CALL getPixel( rendering::IntegerBitmapLayout&,
+ const geometry::IntegerPoint2D& ) throw (lang::IndexOutOfBoundsException,
rendering::VolatileContentDestroyedException, uno::RuntimeException)
{
test(false, "Method not implemented");
@@ -550,7 +550,7 @@ private:
const sal_Int32 nScanlineLen = (maSize.Width * mnBitsPerPixel + 7)/8;
aLayout.ScanLines = maSize.Height;
- aLayout.ScanLineBytes =
+ aLayout.ScanLineBytes =
aLayout.ScanLineStride= nScanlineLen;
aLayout.Palette = getPalette();
aLayout.ColorSpace.set( this );
@@ -567,26 +567,26 @@ private:
return 255;
}
- virtual ::sal_Bool SAL_CALL getIndex( uno::Sequence< double >& entry,
- ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException,
+ virtual ::sal_Bool SAL_CALL getIndex( uno::Sequence< double >& entry,
+ ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException,
uno::RuntimeException)
{
test( getPalette().is(),
"Got palette interface call without handing out palette?!" );
test( nIndex >= 0 && nIndex < 256,
"Index out of range" );
- entry = colorToStdColorSpaceSequence(
- Color(UINT8(nIndex),
- UINT8(nIndex),
+ entry = colorToStdColorSpaceSequence(
+ Color(UINT8(nIndex),
+ UINT8(nIndex),
UINT8(nIndex)) );
return sal_True; // no palette transparency here.
}
- virtual ::sal_Bool SAL_CALL setIndex( const uno::Sequence< double >&,
- ::sal_Bool,
- ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException,
- lang::IllegalArgumentException,
+ virtual ::sal_Bool SAL_CALL setIndex( const uno::Sequence< double >&,
+ ::sal_Bool,
+ ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException,
+ lang::IllegalArgumentException,
uno::RuntimeException)
{
test( getPalette().is(),
@@ -597,13 +597,13 @@ private:
}
struct PaletteColorSpaceHolder: public rtl::StaticWithInit<uno::Reference<rendering::XColorSpace>,
- PaletteColorSpaceHolder>
+ PaletteColorSpaceHolder>
{
uno::Reference<rendering::XColorSpace> operator()()
{
return vcl::unotools::createStandardColorSpace();
}
- };
+ };
virtual uno::Reference< rendering::XColorSpace > SAL_CALL getColorSpace( ) throw (uno::RuntimeException)
{
@@ -634,49 +634,49 @@ private:
return uno::Sequence< ::beans::PropertyValue >();
}
- virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >&,
+ virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >&,
const uno::Reference< rendering::XColorSpace >& ) throw (uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< double >();
}
- virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< rendering::RGBColor >();
}
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< rendering::ARGBColor >();
}
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< rendering::ARGBColor >();
}
- virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< double >();
}
- virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "This method is not expected to be called!");
return uno::Sequence< double >();
}
- virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "This method is not expected to be called!");
@@ -698,23 +698,23 @@ private:
return util::Endianness::LITTLE;
}
- virtual uno::Sequence< double > SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& ,
- const uno::Reference< rendering::XColorSpace >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< double > SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& ,
+ const uno::Reference< rendering::XColorSpace >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< double >();
}
- virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& ,
- const uno::Reference< rendering::XIntegerBitmapColorSpace >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& ,
+ const uno::Reference< rendering::XIntegerBitmapColorSpace >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< sal_Int8 >();
}
- virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
const uno::Sequence< rendering::ARGBColor > aTemp( convertIntegerToARGB(deviceColor) );
@@ -731,12 +731,12 @@ private:
return aRes;
}
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nBytesPerPixel(mnBitsPerPixel == 8 ? 1 : 4);
- test(nLen%nBytesPerPixel==0,
+ test(nLen%nBytesPerPixel==0,
"number of channels no multiple of pixel element count");
uno::Sequence< rendering::ARGBColor > aRes( nLen / nBytesPerPixel );
@@ -768,12 +768,12 @@ private:
return aRes;
}
- virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nBytesPerPixel(mnBitsPerPixel == 8 ? 1 : 4);
- test(nLen%nBytesPerPixel==0,
+ test(nLen%nBytesPerPixel==0,
"number of channels no multiple of pixel element count");
uno::Sequence< rendering::ARGBColor > aRes( nLen / nBytesPerPixel );
@@ -806,21 +806,21 @@ private:
return aRes;
}
- virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< sal_Int8 >();
}
- virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
return uno::Sequence< sal_Int8 >();
}
- virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
test(false, "Method not implemented");
@@ -911,7 +911,7 @@ void TestWindow::Paint( const Rectangle& )
pAcc->SetPixel(0,2,aWhite);
}
}
-
+
rtl::Reference<VclCanvasBitmap> xBmp( new VclCanvasBitmap(aBitmap) );
checkCanvasBitmap( xBmp, "single bitmap", nDepth );
@@ -930,7 +930,7 @@ void TestWindow::Paint( const Rectangle& )
pAcc->SetPixel(0,2,BitmapColor(1));
}
}
-
+
xBmp.set( new VclCanvasBitmap(BitmapEx(aBitmap,aMask)) );
checkCanvasBitmap( xBmp, "masked bitmap", nDepth );
@@ -949,7 +949,7 @@ void TestWindow::Paint( const Rectangle& )
aAlpha.ReleaseAccess(pAcc);
}
}
-
+
xBmp.set( new VclCanvasBitmap(BitmapEx(aBitmap,aAlpha)) );
checkCanvasBitmap( xBmp, "alpha bitmap", nDepth );
diff --git a/vcl/test/dndtest.cxx b/vcl/test/dndtest.cxx
index 31bc02ffd8ef..8db6ef0a9c9c 100644
--- a/vcl/test/dndtest.cxx
+++ b/vcl/test/dndtest.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace ::com::sun::star::datatransfer::dnd;
class MyApp : public Application
{
public:
- void Main();
+ void Main();
};
MyApp aMyApp;
@@ -74,13 +74,13 @@ class MyWin : public WorkWindow
public:
MyWin( Window* pParent, WinBits nWinStyle );
- void MouseMove( const MouseEvent& rMEvt );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void KeyUp( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
+ void MouseMove( const MouseEvent& rMEvt );
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void KeyInput( const KeyEvent& rKEvt );
+ void KeyUp( const KeyEvent& rKEvt );
+ void Paint( const Rectangle& rRect );
+ void Resize();
};
// -----------------------------------------------------------------------
@@ -103,8 +103,8 @@ public:
virtual void SAL_CALL dragEnter( const DragSourceDragEvent& dsdee ) throw(RuntimeException);
virtual void SAL_CALL dragExit( const DragSourceEvent& dse ) throw(RuntimeException);
virtual void SAL_CALL dragOver( const DragSourceDragEvent& dsde ) throw(RuntimeException);
- virtual void SAL_CALL dropActionChanged( const DragSourceDragEvent& dsde ) throw(RuntimeException);
- virtual void SAL_CALL disposing( const EventObject& eo ) throw(RuntimeException);
+ virtual void SAL_CALL dropActionChanged( const DragSourceDragEvent& dsde ) throw(RuntimeException);
+ virtual void SAL_CALL disposing( const EventObject& eo ) throw(RuntimeException);
};
// -----------------------------------------------------------------------
@@ -134,17 +134,17 @@ class StringTransferable : public ::cppu::WeakImplHelper1< XTransferable >
const OUString m_aData;
Sequence< DataFlavor > m_aFlavorList;
-public:
+public:
StringTransferable( const OUString& rString ) : m_aData( rString ), m_aFlavorList( 1 )
{
DataFlavor df;
df.MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" );
df.DataType = getCppuType( static_cast < OUString * > ( 0 ) );
-
+
m_aFlavorList[0] = df;
};
-
+
virtual Any SAL_CALL getTransferData( const DataFlavor& aFlavor ) throw(UnsupportedFlavorException, IOException, RuntimeException);
virtual Sequence< DataFlavor > SAL_CALL getTransferDataFlavors( ) throw(RuntimeException);
virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& aFlavor ) throw(RuntimeException);
@@ -189,7 +189,7 @@ void MyApp::Main()
}
else
fprintf( stderr, "Usage: %s -r full-path-to-applicat.rdb\n", "dnddemo" );
-
+
MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Drag And Drop - Workbench" ) ) );
@@ -218,7 +218,7 @@ void MyApp::Main()
Reference< XComponent > xComponent( xServiceManager, UNO_QUERY );
if( xComponent.is() )
xComponent->dispose();
-
+
}
// -----------------------------------------------------------------------
@@ -227,9 +227,9 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
WorkWindow( pParent, nWinStyle )
{
Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this );
-
+
Reference< XDropTarget > xDropTarget = GetDropTarget();
- if( xDropTarget.is() )
+ if( xDropTarget.is() )
{
xDropTarget->addDropTargetListener( xListener );
xDropTarget->setActive( sal_True );
@@ -384,13 +384,13 @@ void SAL_CALL MyDragAndDropListener::disposing( const EventObject& ) throw(Runti
// -----------------------------------------------------------------------
-MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent,
+MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent,
OUString::createFromAscii( "dragging over this box should result in another window id in the drag log." ) )
{
Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this );
-
+
Reference< XDropTarget > xDropTarget = GetDropTarget();
- if( xDropTarget.is() )
+ if( xDropTarget.is() )
{
xDropTarget->addDropTargetListener( xListener );
xDropTarget->setActive( sal_True );
@@ -406,9 +406,9 @@ MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent,
MyListBox::MyListBox( Window* pParent ) : ListBox( pParent )
{
Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this );
-
+
Reference< XDropTarget > xDropTarget = GetDropTarget();
- if( xDropTarget.is() )
+ if( xDropTarget.is() )
{
xDropTarget->addDropTargetListener( xListener );
xDropTarget->setActive( sal_True );
@@ -421,15 +421,15 @@ MyListBox::MyListBox( Window* pParent ) : ListBox( pParent )
// -----------------------------------------------------------------------
-Any SAL_CALL StringTransferable::getTransferData( const DataFlavor& )
+Any SAL_CALL StringTransferable::getTransferData( const DataFlavor& )
throw(UnsupportedFlavorException, IOException, RuntimeException)
-{
+{
return makeAny( m_aData );
}
// -----------------------------------------------------------------------
-Sequence< DataFlavor > SAL_CALL StringTransferable::getTransferDataFlavors( )
+Sequence< DataFlavor > SAL_CALL StringTransferable::getTransferDataFlavors( )
throw(RuntimeException)
{
return m_aFlavorList;
@@ -437,7 +437,7 @@ Sequence< DataFlavor > SAL_CALL StringTransferable::getTransferDataFlavors( )
// -----------------------------------------------------------------------
-sal_Bool SAL_CALL StringTransferable::isDataFlavorSupported( const DataFlavor& )
+sal_Bool SAL_CALL StringTransferable::isDataFlavorSupported( const DataFlavor& )
throw(RuntimeException)
{
return sal_True;
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 39c51cb3b274..0b4ed3ab4023 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +61,7 @@ static accessibility::XAccessibleAction*
getAction( AtkAction *action ) throw (uno::RuntimeException)
{
AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( action );
-
+
if( pWrap )
{
if( !pWrap->mpAction && pWrap->mpContext )
@@ -134,7 +134,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" ) );
@@ -147,16 +147,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;
}
@@ -168,11 +168,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 ":"
*/
@@ -187,13 +187,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;
@@ -213,7 +213,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 );
}
@@ -230,20 +230,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 bdd6d526e527..d2c81fe8d266 100644
--- a/vcl/unx/gtk/a11y/atkbridge.cxx
+++ b/vcl/unx/gtk/a11y/atkbridge.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +42,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" );
@@ -60,15 +60,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 37ef152db3c9..8b6cd3b85114 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +51,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 );
@@ -69,7 +69,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
@@ -96,7 +96,7 @@ component_wrapper_grab_focus (AtkComponent *component)
{
g_warning( "Exception in grabFocus()" );
}
-
+
return FALSE;
}
@@ -118,7 +118,7 @@ component_wrapper_contains (AtkComponent *component,
{
g_warning( "Exception in containsPoint()" );
}
-
+
return FALSE;
}
@@ -133,20 +133,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();
@@ -158,11 +158,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;
}
@@ -180,21 +180,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]()" );
}
@@ -215,13 +215,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()" );
}
@@ -275,7 +275,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:
@@ -292,7 +292,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 ) );
@@ -300,11 +300,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 a330bc66e8ce..ac5e791d7469 100644
--- a/vcl/unx/gtk/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk/a11y/atkeditabletext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +52,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 87dcdc46d679..64c02741e527 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +40,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 * )
{
@@ -80,12 +80,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()
{
@@ -114,22 +114,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 )
@@ -148,7 +148,7 @@ wrapper_factory_create_accessible( GObject *obj )
}
}
}
-
+
return NULL;
}
@@ -175,9 +175,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 acb7b026f3a8..b48b3d9349de 100644
--- a/vcl/unx/gtk/a11y/atkfactory.hxx
+++ b/vcl/unx/gtk/a11y/atkfactory.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
#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 b2c7aca857f4..7673b05c59f0 100644
--- a/vcl/unx/gtk/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk/a11y/atkhypertext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ::com::sun::star;
-
+
// ---------------------- AtkHyperlink ----------------------
typedef struct {
@@ -99,7 +99,7 @@ hyper_link_get_end_index( AtkHyperlink *pLink )
{
try {
return getHyperlink( pLink )->getEndIndex();
- }
+ }
catch(const uno::Exception& e) {
}
return -1;
@@ -109,7 +109,7 @@ hyper_link_get_start_index( AtkHyperlink *pLink )
{
try {
return getHyperlink( pLink )->getStartIndex();
- }
+ }
catch(const uno::Exception& e) {
}
return -1;
@@ -216,10 +216,10 @@ static accessibility::XAccessibleHypertext*
pWrap->mpHypertext = reinterpret_cast< accessibility::XAccessibleHypertext * > (any.pReserved);
pWrap->mpHypertext->acquire();
}
-
+
return pWrap->mpHypertext;
}
-
+
return NULL;
}
@@ -244,7 +244,7 @@ hypertext_get_link( AtkHypertext *hypertext,
catch(const uno::Exception& e) {
g_warning( "Exception in getHyperLink()" );
}
-
+
return NULL;
}
@@ -259,7 +259,7 @@ hypertext_get_n_links( AtkHypertext *hypertext )
catch(const uno::Exception& e) {
g_warning( "Exception in getHyperLinkCount()" );
}
-
+
return 0;
}
@@ -275,7 +275,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 04263fd72906..fd5baa5d196e 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +61,10 @@ static accessibility::XAccessibleImage*
pWrap->mpImage = reinterpret_cast< accessibility::XAccessibleImage * > (any.pReserved);
pWrap->mpImage->acquire();
}
-
+
return pWrap->mpImage;
}
-
+
return NULL;
}
@@ -75,13 +75,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 3adca0f55279..513c80aac728 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 dbac3599cd4b..ae3dad6c9c03 100644
--- a/vcl/unx/gtk/a11y/atklistener.hxx
+++ b/vcl/unx/gtk/a11y/atklistener.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 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;
@@ -60,20 +60,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 396683e5fd8c..6f43b27cea81 100644
--- a/vcl/unx/gtk/a11y/atkregistry.cxx
+++ b/vcl/unx/gtk/a11y/atkregistry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ static GHashTable *uno_to_gobject = NULL;
/*****************************************************************************/
-AtkObject *
+AtkObject *
ooo_wrapper_registry_get(const Reference< XAccessible >& rxAccessible)
{
if( uno_to_gobject )
@@ -52,7 +52,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 b3a59b6db8d0..f9cecae3fb51 100644
--- a/vcl/unx/gtk/a11y/atkregistry.hxx
+++ b/vcl/unx/gtk/a11y/atkregistry.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 127730f0a458..6300ec4f3776 100644
--- a/vcl/unx/gtk/a11y/atkselection.cxx
+++ b/vcl/unx/gtk/a11y/atkselection.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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::XAccessibleSelection*
pWrap->mpSelection = reinterpret_cast< accessibility::XAccessibleSelection * > (any.pReserved);
pWrap->mpSelection->acquire();
}
-
+
return pWrap->mpSelection;
}
-
+
return NULL;
}
@@ -73,7 +73,7 @@ selection_add_selection( AtkSelection *selection,
catch(const uno::Exception& e) {
g_warning( "Exception in selectAccessibleChild()" );
}
-
+
return FALSE;
}
@@ -91,7 +91,7 @@ selection_clear_selection( AtkSelection *selection )
catch(const uno::Exception& e) {
g_warning( "Exception in selectAccessibleChild()" );
}
-
+
return FALSE;
}
@@ -107,7 +107,7 @@ selection_ref_selection( AtkSelection *selection,
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChild()" );
}
-
+
return NULL;
}
@@ -122,7 +122,7 @@ selection_get_selection_count( AtkSelection *selection)
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChildCount()" );
}
-
+
return -1;
}
@@ -157,7 +157,7 @@ selection_remove_selection( AtkSelection *selection,
catch(const uno::Exception& e) {
g_warning( "Exception in getSelectedAccessibleChildCount()" );
}
-
+
return FALSE;
}
@@ -175,7 +175,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 fb460f45da53..b9c41e7dc7f9 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +45,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;
}
@@ -80,10 +80,10 @@ static accessibility::XAccessibleTable*
pWrap->mpTable = reinterpret_cast< accessibility::XAccessibleTable * > (any.pReserved);
pWrap->mpTable->acquire();
}
-
+
return pWrap->mpTable;
}
-
+
return NULL;
}
@@ -98,20 +98,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()" );
}
@@ -128,13 +128,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 );
}
@@ -153,13 +153,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 );
}
@@ -178,10 +178,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
@@ -205,7 +205,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
@@ -226,10 +226,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
@@ -252,10 +252,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
@@ -278,10 +278,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
@@ -302,7 +302,7 @@ table_wrapper_get_caption( AtkTable *table )
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getAccessibleCaption() returns" );
@@ -311,7 +311,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()" );
}
@@ -330,7 +330,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
@@ -352,10 +352,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
@@ -408,7 +408,7 @@ table_wrapper_get_column_header( AtkTable *table,
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
if( pTable )
{
uno::Reference< accessibility::XAccessibleTable > xColumnHeaders( pTable->getAccessibleColumnHeaders() );
@@ -439,7 +439,7 @@ table_wrapper_get_summary( AtkTable *table )
{
try {
accessibility::XAccessibleTable* pTable = getTable( table );
-
+
#ifdef ENABLE_TRACING
if( pTable )
fprintf(stderr, "getAccessibleSummary() returns" );
@@ -484,12 +484,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 );
}
@@ -509,12 +509,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 );
}
@@ -533,13 +533,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 );
}
@@ -558,13 +558,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 );
}
@@ -584,13 +584,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 );
}
@@ -691,11 +691,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 9896456f91ec..3cb121109a12 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/atkutil.hxx b/vcl/unx/gtk/a11y/atkutil.hxx
index c996b955d8c1..bcf146b2fd6d 100644
--- a/vcl/unx/gtk/a11y/atkutil.hxx
+++ b/vcl/unx/gtk/a11y/atkutil.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
************************************************************************/
#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 19e92cb9d3b1..0fbb6152c40a 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +50,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 be6d646fdc29..4a6b63b5084b 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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"
-
+
#include <plugins/gtk/gtkframe.hxx>
#include <vcl/window.hxx>
#include "vcl/popupmenuwindow.hxx"
@@ -46,12 +46,12 @@ 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 )
@@ -73,7 +73,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.
*/
@@ -81,13 +81,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 )
{
@@ -95,7 +95,7 @@ init_from_window( AtkObject *accessible, Window *pWindow )
}
}
break;
-
+
default:
{
Window *pChild = pWindow->GetChild( 0 );
@@ -125,10 +125,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 );
@@ -137,7 +137,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 );
@@ -191,7 +191,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
@@ -221,11 +221,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",
@@ -254,18 +254,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;
@@ -276,7 +276,7 @@ ooo_window_wrapper_class_init (AtkObjectClass *klass, gpointer)
/*****************************************************************************/
-GType
+GType
ooo_window_wrapper_get_type (void)
{
static GType type = 0;
@@ -284,16 +284,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,
@@ -307,10 +307,10 @@ ooo_window_wrapper_get_type (void)
(GInstanceInitFunc) NULL,
NULL
} ;
-
+
type = g_type_register_static (parent_type, "OOoWindowAtkObject", &typeInfo, (GTypeFlags)0) ;
}
-
+
return type;
}
@@ -320,13 +320,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 d0bfe41e1601..301dc8f3d218 100644
--- a/vcl/unx/gtk/a11y/atkwindow.hxx
+++ b/vcl/unx/gtk/a11y/atkwindow.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
************************************************************************/
#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 94a8b1981688..0433e11fa066 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +71,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
@@ -86,7 +86,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 );
@@ -121,7 +121,7 @@ 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 950dbcbea0b6..cf21f6e73ffc 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -274,7 +274,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
@@ -518,7 +518,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;
XIOErrorHandler m_aOrigGTKXIOErrorHandler;
@@ -533,9 +533,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 );
@@ -629,7 +629,7 @@ void GtkXLib::Init()
rtl::OString aPrgName = rtl::OUStringToOString(aAppName, aEnc);
g_set_prgname(aPrgName);
}
-
+
// init gtk/gdk
gtk_init_check( &nParams, &pCmdLineAry );
@@ -692,7 +692,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++ )
@@ -756,7 +756,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 );
}
@@ -837,7 +837,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;
{
@@ -848,7 +848,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 159820ec3dbd..3eb410e0dbcd 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,7 +96,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 )
@@ -161,7 +161,7 @@ extern "C"
pYieldMutex = new GtkHookedYieldMutex();
else
pYieldMutex = new GtkYieldMutex();
-
+
gdk_threads_init();
GtkInstance* pInstance = new GtkInstance( pYieldMutex );
@@ -205,7 +205,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 );
}
@@ -224,8 +224,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)
{
@@ -307,13 +307,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
SolarMutexObject::acquire();
mnCount = 1;
mnThreadId = aCurrentThread;
SolarMutexObject::release();
-
+
return sal_True;
}
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 91d40f0e3b16..04dc1269a04a 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 15f0d7f14258..0dcaf0c9caa8 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -69,23 +69,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;
@@ -149,29 +149,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 );
@@ -230,7 +230,7 @@ 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 );
//---
/*********************************************************
@@ -383,10 +383,10 @@ 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;
}
@@ -539,40 +539,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)
@@ -618,11 +618,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 ) ||
@@ -724,11 +724,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,
@@ -741,7 +741,7 @@ 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();
@@ -898,7 +898,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,
@@ -953,11 +953,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,
@@ -977,9 +977,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,
@@ -1028,9 +1028,9 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
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)
))
@@ -1152,16 +1152,16 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
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 );
@@ -1172,10 +1172,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
@@ -1265,21 +1265,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
@@ -1322,11 +1322,11 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
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 );
@@ -1380,11 +1380,11 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
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 );
@@ -1439,32 +1439,32 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
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() );
@@ -1667,7 +1667,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
if ( has_backward )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ 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(),
@@ -1682,7 +1682,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
if ( has_forward2 )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ 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(),
@@ -1698,7 +1698,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
if ( has_backward2 )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ 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(),
@@ -1713,7 +1713,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
if ( has_forward )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
- if ( stateType == GTK_STATE_INSENSITIVE ) stateType = GTK_STATE_NORMAL;
+ 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(),
@@ -1738,7 +1738,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
//---
-static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect )
+static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect )
{
gint slider_width;
gint stepper_size;
@@ -1829,7 +1829,7 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- Rectangle pixmapRect;
+ Rectangle pixmapRect;
GdkRectangle clipRect;
// Find the overall bounding rect of the buttons's drawing area,
@@ -1862,16 +1862,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 )
{
@@ -1888,18 +1888,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 );
@@ -1966,17 +1966,17 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
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 );
@@ -2031,7 +2031,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,
@@ -2057,14 +2057,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 );
@@ -2098,19 +2098,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 )
-{
- Rectangle buttonRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
- Rectangle arrowRect;
- gint arrowSize;
+ 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;
NWEnsureGTKSpinButton( nScreen );
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
@@ -2149,13 +2149,13 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
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 );
@@ -2176,10 +2176,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),
@@ -2222,23 +2222,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 +
@@ -2282,11 +2282,11 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const OUString& )
{
OSL_ASSERT( nType != CTRL_TAB_ITEM || aValue.getType() == CTRL_TAB_ITEM );
- GdkPixmap * pixmap;
- Rectangle pixmapRect;
- Rectangle tabRect;
- GtkStateType stateType;
- GtkShadowType shadowType;
+ GdkPixmap * pixmap;
+ Rectangle pixmapRect;
+ Rectangle tabRect;
+ GtkStateType stateType;
+ GtkShadowType shadowType;
if( ! gWidgetData[ m_nScreen ].gCacheTabItems )
{
gWidgetData[ m_nScreen ].gCacheTabItems = new NWPixmapCache( m_nScreen );
@@ -2314,7 +2314,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
pixmapRect = rControlRectangle;
if ( nType == CTRL_TAB_ITEM )
{
- const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
+ const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
if ( !pTabitemValue->isFirst() )
{
// GTK+ tabs overlap on the right edge (the top tab obscures the
@@ -2355,7 +2355,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
}
-// 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(),
GetX11SalData()->GetDisplay()->GetVisual( m_nScreen ).GetDepth() );
@@ -2423,15 +2423,15 @@ BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
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 );
@@ -2463,9 +2463,9 @@ 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);
}
@@ -2517,14 +2517,14 @@ 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
@@ -2664,11 +2664,11 @@ 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 );
@@ -2754,11 +2754,11 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
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 );
@@ -2881,8 +2881,8 @@ BOOL GtkSalGraphics::NWPaintGTKTooltip(
{
NWEnsureGTKTooltip( m_nScreen );
- gint x, y, w, h;
- GdkRectangle clipRect;
+ gint x, y, w, h;
+ GdkRectangle clipRect;
x = rControlRectangle.Left();
y = rControlRectangle.Top();
@@ -2924,12 +2924,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();
@@ -2973,7 +2973,7 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
{
NWEnsureGTKProgressBar( m_nScreen );
- gint w, h;
+ gint w, h;
w = rControlRectangle.GetWidth();
h = rControlRectangle.GetHeight();
@@ -3038,7 +3038,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
OSL_ASSERT( rValue.getType() == CTRL_SLIDER );
NWEnsureGTKSlider( m_nScreen );
- gint w, h;
+ gint w, h;
w = rControlRectangle.GetWidth();
h = rControlRectangle.GetHeight();
@@ -3130,15 +3130,15 @@ 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 )
@@ -3184,7 +3184,7 @@ static Rectangle NWGetListBoxButtonRect( int nScreen,
static Rectangle NWGetListBoxIndicatorRect( int nScreen,
ControlType,
ControlPart,
- Rectangle aAreaRect,
+ Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
@@ -3192,14 +3192,14 @@ 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 )
@@ -3229,8 +3229,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& )
@@ -3448,10 +3448,10 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
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;
@@ -3460,9 +3460,9 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// 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 )
@@ -3478,15 +3478,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
@@ -3581,7 +3581,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetPreferredSymbolsStyleName( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
- aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+ aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
const cairo_font_options_t* pNewOptions = NULL;
if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
@@ -3652,8 +3652,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 )
{
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 4fcd9be942d6..18ac631b0a77 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -158,61 +158,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;
case GDK_bracketleft: nCode = KEY_BRACKETLEFT; break;
case GDK_bracketright: nCode = KEY_BRACKETRIGHT; break;
case GDK_semicolon: nCode = KEY_SEMICOLON; break;
@@ -302,8 +302,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 ) {}
};
@@ -334,10 +334,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
@@ -363,11 +363,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 );
@@ -401,8 +401,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 );
}
@@ -412,8 +412,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 );
}
@@ -429,9 +429,9 @@ GtkSalFrame::~GtkSalFrame()
if( m_pParent )
m_pParent->m_aChildren.remove( this );
-
+
getDisplay()->deregisterFrame( this );
-
+
if( m_pRegion )
gdk_region_destroy( m_pRegion );
@@ -479,13 +479,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()
{
@@ -506,11 +506,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()
@@ -561,10 +561,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;
@@ -572,7 +572,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 );
@@ -586,7 +586,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) );
@@ -595,42 +595,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
@@ -665,7 +665,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;
@@ -750,7 +750,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 );
}
}
};
@@ -816,7 +816,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" );
@@ -837,14 +837,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 );
@@ -879,7 +879,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 )
@@ -919,7 +919,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 );
@@ -958,7 +958,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;
@@ -969,7 +969,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,
@@ -1120,7 +1120,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
@@ -1159,16 +1159,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 ) ) )
@@ -1202,12 +1202,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
@@ -1222,10 +1222,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;
}
}
@@ -1237,7 +1237,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();
@@ -1284,7 +1284,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 )
@@ -1292,17 +1292,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 &&
@@ -1328,7 +1328,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
@@ -1352,7 +1352,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( ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
m_bSetFocusOnMap = true;
@@ -1417,14 +1417,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;
}
}
@@ -1488,8 +1488,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 );
@@ -1511,10 +1511,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 )
@@ -1537,14 +1537,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();
@@ -1587,13 +1587,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) &&
@@ -1602,7 +1602,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;
@@ -1617,10 +1617,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
@@ -1679,22 +1679,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;
@@ -1704,12 +1704,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 )
{
@@ -1719,13 +1719,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 < SAL_N_ELEMENTS(m_aGraphics); i++ )
{
@@ -1740,7 +1740,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
}
@@ -1748,7 +1748,7 @@ void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
{
if( nNewScreen == maGeometry.nScreenNumber )
return;
-
+
if( m_pWindow && ! isChild() )
{
GtkSalDisplay* pDisp = getDisplay();
@@ -1756,7 +1756,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);
@@ -1887,7 +1887,7 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
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();
@@ -1916,7 +1916,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 );
@@ -2065,7 +2065,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
}
@@ -2134,7 +2134,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 );
@@ -2166,7 +2166,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 );
@@ -2212,7 +2212,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 );
@@ -2349,8 +2349,8 @@ void GtkSalFrame::UpdateSettings( AllSettings& rSettings )
bFreeGraphics = true;
}
- pGraphics->updateSettings( rSettings );
-
+ pGraphics->updateSettings( rSettings );
+
if( bFreeGraphics )
ReleaseGraphics( pGraphics );
}
@@ -2391,7 +2391,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;
@@ -2465,18 +2465,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
}
@@ -2506,11 +2506,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 );
}
}
@@ -2524,7 +2524,7 @@ void GtkSalFrame::EndSetClipRegion()
bool GtkSalFrame::Dispatch( const XEvent* pEvent )
{
bool bContinueDispatch = true;
-
+
if( pEvent->type == PropertyNotify )
{
vcl_sal::WMAdaptor* pAdaptor = getDisplay()->getWMAdaptor();
@@ -2655,15 +2655,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 &&
@@ -2695,7 +2695,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 );
@@ -2734,7 +2734,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" );
@@ -2745,14 +2745,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();
@@ -2770,15 +2770,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;
@@ -2814,11 +2814,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 );
@@ -2886,16 +2886,16 @@ IMPL_LINK( GtkSalFrame, ImplDelayedFullScreenHdl, void*, EMPTYARG )
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;
+ 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,
@@ -2912,7 +2912,7 @@ 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)
@@ -2920,7 +2920,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame )
*/
Application::PostUserEvent( LINK( pThis, GtkSalFrame, ImplDelayedFullScreenHdl ) );
}
-
+
bool bSetFocus = pThis->m_bSetFocusOnMap;
pThis->m_bSetFocusOnMap = false;
if( ImplGetSVData()->mbIsTestTool )
@@ -2941,7 +2941,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;
@@ -2995,8 +2995,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
@@ -3011,20 +3011,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
{
@@ -3120,7 +3120,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:
@@ -3158,9 +3158,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
@@ -3240,7 +3240,7 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
aWin,
pThis->m_hBackgroundPixmap );
}
-
+
if( ! pThis->m_pParent )
{
// signalize theme changed for NWF caches
@@ -3254,7 +3254,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) )
{
@@ -3381,15 +3381,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 );
@@ -3455,7 +3455,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)
@@ -3463,7 +3463,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
@@ -3471,7 +3471,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 );
@@ -3498,7 +3498,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)
{
@@ -3508,7 +3508,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
if( aDel.isDeleted() )
return true;
-
+
m_bPreeditJustChanged = false;
std::list<PreviousKeyPress>::iterator iter = m_aPrevKeyPresses.begin();
@@ -3529,7 +3529,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
if( bResult )
return true;
}
-
+
return false;
}
@@ -3577,17 +3577,17 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
const bool bWasPreedit =
(pThis->m_aInputEvent.mpTextAttr != 0) ||
pThis->m_bPreeditJustChanged;
-
- 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
@@ -3608,7 +3608,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 );
@@ -3642,9 +3642,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,
@@ -3658,16 +3658,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;
@@ -3681,21 +3681,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:
@@ -3716,21 +3716,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();
@@ -3748,14 +3748,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())
@@ -3815,7 +3815,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;
}
@@ -3823,7 +3823,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 e3d8dd2d2ce0..7308dabfae27 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 <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 )
{
@@ -63,25 +63,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();
}
@@ -126,11 +126,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 );
}
@@ -183,7 +183,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 39f74e742550..fddc36753878 100644
--- a/vcl/unx/headless/svpbmp.cxx
+++ b/vcl/unx/headless/svpbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +43,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;
@@ -135,7 +135,7 @@ Size SvpSalBitmap::GetSize() const
B2IVector aVec( m_aBitmap->getSize() );
aSize = Size( aVec.getX(), aVec.getY() );
}
-
+
return aSize;
}
@@ -146,7 +146,7 @@ USHORT SvpSalBitmap::GetBitCount() const
nDepth = getBitCountFromScanlineFormat( m_aBitmap->getScanlineFormat() );
return nDepth;
}
-
+
BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
{
BitmapBuffer* pBuf = NULL;
@@ -299,7 +299,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(),
@@ -309,9 +309,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 5ce5f5bff770..f8810acd0fbd 100644
--- a/vcl/unx/headless/svpbmp.hxx
+++ b/vcl/unx/headless/svpbmp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,31 +38,31 @@ 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 bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
Size& rSize,
bool bMask = false );
- 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 37c92faf92c9..3b6a61fdae5e 100644
--- a/vcl/unx/headless/svpdummies.cxx
+++ b/vcl/unx/headless/svpdummies.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,17 +33,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 98cf2f5ebb92..f005e4276f9a 100644
--- a/vcl/unx/headless/svpdummies.hxx
+++ b/vcl/unx/headless/svpdummies.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,21 +44,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
@@ -84,7 +84,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 08dad9afb5cc..ee3256085bd2 100644
--- a/vcl/unx/headless/svpelement.cxx
+++ b/vcl/unx/headless/svpelement.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +58,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();
};
@@ -87,7 +87,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" );
@@ -166,7 +166,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' )
@@ -229,7 +229,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 c7f647cf3a03..24302d5b6b14 100644
--- a/vcl/unx/headless/svpelement.hxx
+++ b/vcl/unx/headless/svpelement.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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 ab86c3d851b2..9d1f89b385e4 100644
--- a/vcl/unx/headless/svpframe.cxx
+++ b/vcl/unx/headless/svpframe.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace basegfx;
SvpSalFrame* SvpSalFrame::s_pFocusFrame = NULL;
-SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
+SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
ULONG nSalFrameStyle,
SystemParentData* ) :
@@ -51,24 +51,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 );
}
@@ -76,14 +76,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;
@@ -305,7 +305,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 );
@@ -315,8 +315,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 a552eff871b4..7b4f92a379cc 100644
--- a/vcl/unx/headless/svpframe.hxx
+++ b/vcl/unx/headless/svpframe.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#ifndef _SVP_SVPFRAME_HXX
#include <vcl/salframe.hxx>
@@ -41,7 +41,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;
@@ -51,10 +51,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,
@@ -62,66 +62,66 @@ 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 SalIndicatorState GetIndicatorState();
virtual void SimulateKeyPress( USHORT nKeyCode );
- 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 2a717352d84c..8b20514af714 100644
--- a/vcl/unx/headless/svpgdi.cxx
+++ b/vcl/unx/headless/svpgdi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -111,7 +111,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:
@@ -173,7 +173,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
@@ -279,7 +279,7 @@ void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
aColor,
m_aDrawMode,
m_aClipMap
- );
+ );
dbgOut( m_aDevice );
}
@@ -434,7 +434,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,
@@ -442,7 +442,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 );
}
@@ -456,7 +456,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 );
}
@@ -562,7 +562,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 3ac55de5dd14..2a05b104d7d2 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 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;
@@ -58,42 +58,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*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ 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,
@@ -102,69 +102,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 10faf81434ba..4a48ce77d64d 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -74,9 +74,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)
@@ -459,8 +459,8 @@ void* SvpSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
SvpSalYieldMutex::SvpSalYieldMutex()
{
- mnCount = 0;
- mnThreadId = 0;
+ mnCount = 0;
+ mnThreadId = 0;
}
void SvpSalYieldMutex::acquire()
@@ -499,9 +499,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 ace3ac7c236c..ac4e9361074e 100644
--- a/vcl/unx/headless/svpinst.hxx
+++ b/vcl/unx/headless/svpinst.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +52,18 @@
class SvpSalYieldMutex : public ::vcl::SolarMutexObject
{
protected:
- ULONG mnCount;
- oslThreadIdentifier mnThreadId;
+ ULONG mnCount;
+ oslThreadIdentifier 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; }
- oslThreadIdentifier GetThreadId() const { return mnThreadId; }
+ ULONG GetAcquireCount() const { return mnCount; }
+ oslThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// ---------------
@@ -88,7 +88,7 @@ public:
class SvpSalFrame;
class SvpSalInstance : public SalInstance
{
- timeval m_aTimeout;
+ timeval m_aTimeout;
ULONG m_nTimeoutMS;
int m_pTimeoutFDS[2];
SvpSalYieldMutex m_aYieldMutex;
@@ -96,11 +96,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 )
@@ -109,7 +109,7 @@ class SvpSalInstance : public SalInstance
oslMutex m_aEventGuard;
std::list< SalUserEvent > m_aUserEvents;
-
+
std::list< SalFrame* > m_aFrames;
bool isFrameAlive( const SalFrame* pFrame ) const;
@@ -119,72 +119,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 osl::SolarMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ 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 );
@@ -193,9 +193,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 87a64286c908..8c985d0b37d6 100644
--- a/vcl/unx/headless/svpprn.cxx
+++ b/vcl/unx/headless/svpprn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ using namespace psp;
using namespace rtl;
/*
- * static helpers
+ * static helpers
*/
static String getPdfDir( const PrinterInfo& rInfo )
@@ -76,30 +76,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;
}
}
@@ -110,9 +110,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;
@@ -127,7 +127,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" ) ) );
@@ -308,13 +308,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;
@@ -329,9 +329,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
@@ -394,11 +394,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 )
@@ -576,13 +576,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;
@@ -622,7 +622,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 )
{
@@ -697,12 +697,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;
}
}
@@ -811,7 +811,7 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
// =======================================================================
/*
- * SalPrinter
+ * SalPrinter
*/
PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter )
@@ -853,10 +853,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;
@@ -1038,7 +1038,7 @@ void vcl_sal::PrinterUpdate::update()
if( Application::GetSettings().GetMiscSettings().GetDisablePrinting() )
return;
- static bool bOnce = false;
+ static bool bOnce = false;
if( ! bOnce )
{
bOnce = true;
@@ -1046,7 +1046,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 b776e7c3e313..75359178cfbc 100644
--- a/vcl/unx/headless/svpprn.hxx
+++ b/vcl/unx/headless/svpprn.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,44 +39,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;
@@ -85,18 +85,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;
@@ -104,8 +104,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 20990841f785..42f95f57392a 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,19 +72,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);
}
@@ -317,7 +317,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 )
{
@@ -432,11 +432,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");
}
@@ -500,8 +500,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();
}
//--------------------------------------------------------------------------
@@ -589,19 +589,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 )
@@ -612,9 +612,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;
}
@@ -633,7 +633,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();
@@ -805,19 +805,19 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
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;
}
}
@@ -834,9 +834,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;
}
}
@@ -987,9 +987,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 );
@@ -1019,8 +1019,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);
@@ -1080,13 +1080,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;
@@ -1096,16 +1096,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;
@@ -1115,8 +1115,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;
@@ -1126,9 +1126,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;
@@ -1139,11 +1139,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 63b918eaee5f..6e865f3409ba 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 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:
@@ -79,40 +79,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*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ 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,
@@ -121,72 +121,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 4ff363e9d518..8701a7fcddcb 100644
--- a/vcl/unx/headless/svptext.cxx
+++ b/vcl/unx/headless/svptext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ SvpGlyphCache& SvpGlyphCache::GetInstance()
{
static SvpGlyphPeer aSvpGlyphPeer;
static SvpGlyphCache aGC( aSvpGlyphPeer );
- return aGC;
+ return aGC;
}
// ===========================================================================
@@ -162,7 +162,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 2bf9894a1e23..87dff53cfbeb 100644
--- a/vcl/unx/headless/svpvd.cxx
+++ b/vcl/unx/headless/svpvd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +87,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 b30b83642293..d4769fca7f34 100644
--- a/vcl/unx/headless/svpvd.hxx
+++ b/vcl/unx/headless/svpvd.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +45,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 9a061edd1ed4..2aa84ecee71e 100644
--- a/vcl/unx/inc/XIM.h
+++ b/vcl/unx/inc/XIM.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +63,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 */
@@ -75,11 +75,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;
@@ -102,19 +102,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 b6db98dbfe15..07b3394cca4d 100644
--- a/vcl/unx/inc/Xproto.h
+++ b/vcl/unx/inc/Xproto.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 e88d221f3aff..f6f24d1301bf 100644
--- a/vcl/unx/inc/cdeint.hxx
+++ b/vcl/unx/inc/cdeint.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b6f7aa4b9350..b17383090016 100644
--- a/vcl/unx/inc/dtint.hxx
+++ b/vcl/unx/inc/dtint.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,27 +53,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 358538390a8d..8f22b935d4cf 100644
--- a/vcl/unx/inc/i18n_cb.hxx
+++ b/vcl/unx/inc/i18n_cb.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +42,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 );
@@ -85,10 +85,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 e7382ef6ebd8..f082433810cb 100644
--- a/vcl/unx/inc/i18n_ic.hxx
+++ b/vcl/unx/inc/i18n_ic.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +37,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;
@@ -58,17 +58,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 );
@@ -76,7 +76,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 cca69a3de223..9277c9c8491f 100644
--- a/vcl/unx/inc/i18n_im.hxx
+++ b/vcl/unx/inc/i18n_im.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,26 +37,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 e34d80900b79..637459627add 100644
--- a/vcl/unx/inc/i18n_keysym.hxx
+++ b/vcl/unx/inc/i18n_keysym.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,36 +31,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 832f2a713091..6d6f72ceaaac 100644
--- a/vcl/unx/inc/i18n_status.hxx
+++ b/vcl/unx/inc/i18n_status.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ class X11ImeStatus : public SalI18NImeStatus
public:
X11ImeStatus() {}
virtual ~X11ImeStatus();
-
+
virtual bool canToggle();
virtual void toggle();
};
@@ -65,13 +65,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 e077fdb67526..3695466b77ef 100644
--- a/vcl/unx/inc/i18n_xkb.hxx
+++ b/vcl/unx/inc/i18n_xkb.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,83 +27,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 2624f046a612..4b81eca9d082 100644
--- a/vcl/unx/inc/plugins/gtk/atkbridge.hxx
+++ b/vcl/unx/inc/plugins/gtk/atkbridge.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5ea635703189..1c7a729ffdc5 100644
--- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +46,9 @@ class GtkData : public X11SalData
public:
GtkData() {}
virtual ~GtkData();
-
+
virtual void Init();
-
+
virtual void initNWF();
virtual void deInitNWF();
};
@@ -57,7 +57,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,
@@ -83,7 +83,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 0621699b1c11..350185c41904 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +61,7 @@ class GtkSalFrame : public SalFrame
{}
~GraphicsHolder();
};
-
+
struct IMHandler
{
//--------------------------------------------------------
@@ -81,7 +81,7 @@ class GtkSalFrame : public SalFrame
guint keyval;
guint16 hardware_keycode;
guint8 group;
-
+
PreviousKeyPress (GdkEventKey *event)
: window (NULL),
send_event (0),
@@ -102,7 +102,7 @@ class GtkSalFrame : public SalFrame
group = event->group;
}
}
-
+
PreviousKeyPress( const PreviousKeyPress& rPrev )
: window( rPrev.window ),
send_event( rPrev.send_event ),
@@ -112,7 +112,7 @@ class GtkSalFrame : public SalFrame
hardware_keycode( rPrev.hardware_keycode ),
group( rPrev.group )
{}
-
+
bool operator== (GdkEventKey *event) const
{
return (event != NULL)
@@ -127,8 +127,8 @@ class GtkSalFrame : public SalFrame
;
}
};
-
-
+
+
GtkSalFrame* m_pFrame;
std::list< PreviousKeyPress > m_aPrevKeyPresses;
int m_nPrevKeyPresses; // avoid using size()
@@ -137,7 +137,7 @@ class GtkSalFrame : public SalFrame
bool m_bPreeditJustChanged;
SalExtTextInputEvent m_aInputEvent;
std::vector< USHORT > m_aInputFlags;
-
+
IMHandler( GtkSalFrame* );
~IMHandler();
@@ -148,17 +148,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;
@@ -193,40 +193,40 @@ class GtkSalFrame : public SalFrame
bool m_bSetFocusOnMap;
String m_aTitle;
rtl::OUString m_sWMClass;
-
+
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,
@@ -251,7 +251,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;
@@ -261,7 +261,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 );
@@ -272,7 +272,7 @@ class GtkSalFrame : public SalFrame
void askForXEmbedFocus( sal_Int32 nTimecode );
void updateWMClass();
-
+
DECL_LINK( ImplDelayedFullScreenHdl, void* );
public:
GtkSalFrame( SalFrame* pParent, ULONG nStyle );
@@ -284,20 +284,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();
@@ -394,13 +394,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 209ba99cd875..6782e2043502 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,34 +34,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,
@@ -75,28 +75,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,
@@ -143,7 +143,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 325bf54f7998..c0c08594e442 100644
--- a/vcl/unx/inc/plugins/gtk/gtkinst.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkinst.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,19 +36,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();
@@ -62,8 +62,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();
@@ -80,15 +80,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 143f9a2d19a9..7daea86a8a3b 100644
--- a/vcl/unx/inc/plugins/gtk/gtkobject.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,37 +36,37 @@
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 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 void SetForwardKey( BOOL bEnable );
- virtual const SystemEnvData* GetSystemData() const;
-
+ 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 458685ea58b0..29148b2c658e 100644
--- a/vcl/unx/inc/plugins/kde/kdedata.hxx
+++ b/vcl/unx/inc/plugins/kde/kdedata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class KDEData : public X11SalData
public:
KDEData() {}
virtual ~KDEData();
-
+
virtual void Init();
virtual void initNWF();
virtual void deInitNWF();
@@ -57,9 +57,9 @@ class KDESalFrame : public X11SalFrame
struct GraphicsHolder
{
- X11SalGraphics* pGraphics;
- bool bInUse;
- GraphicsHolder()
+ X11SalGraphics* pGraphics;
+ bool bInUse;
+ GraphicsHolder()
: pGraphics( NULL ),
bInUse( false )
{}
@@ -81,7 +81,7 @@ public:
class KDESalInstance : public X11SalInstance
{
public:
- KDESalInstance( SalYieldMutex* pMutex )
+ KDESalInstance( SalYieldMutex* pMutex )
: X11SalInstance( pMutex ) {}
virtual ~KDESalInstance() {}
virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
@@ -104,7 +104,7 @@ public:
{}
virtual ~KDEXLib();
virtual void Init();
-
+
void doStartup();
};
diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h
index eb333018f8fc..9616202e74f7 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +43,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 )
@@ -76,40 +76,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*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ 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,
@@ -118,76 +118,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 1f2dc420cb72..bd9f2ae0ed5b 100644
--- a/vcl/unx/inc/salbmp.h
+++ b/vcl/unx/inc/salbmp.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +37,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 -
@@ -51,10 +51,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,
@@ -63,12 +63,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,
@@ -78,52 +78,52 @@ public:
private:
- BitmapBuffer* mpDIB;
- ImplSalDDB* mpDDB;
+ BitmapBuffer* mpDIB;
+ ImplSalDDB* mpDDB;
bool mbGrey;
-
+
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 bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
+ virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
Size& rSize,
bool bMask = false );
-
- 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 );
};
@@ -135,23 +135,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,
@@ -160,18 +160,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;
};
@@ -183,17 +183,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 e27a9974c872..4164a0fc7c1d 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,46 +48,46 @@ class SalPrinter;
DECLARE_LIST( SalDisplays, SalDisplay* )
#if defined SCO || defined LINUX || defined NETBSD || defined AIX || \
- defined HPUX || defined FREEBSD || defined OPENBSD
+ defined HPUX || defined FREEBSD || defined OPENBSD
#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 1c120491b1d9..0f3d3f3bf55e 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +30,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>
@@ -49,37 +49,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
@@ -103,16 +103,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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -121,7 +121,7 @@ enum SalWM { olwm, // Open Look
enum SalRGB { RGB, RBG,
GBR, GRB,
BGR, BRG,
- RGBA, RBGA,
+ RGBA, RBGA,
GBRA, GRBA,
BGRA, BRGA,
other };
@@ -129,28 +129,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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -158,16 +158,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,
@@ -177,28 +177,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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -208,18 +208,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;
@@ -231,32 +231,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; }
@@ -303,13 +303,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() :
@@ -329,84 +329,84 @@ 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::vector< int > m_aXineramaScreenIndexMap;
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( int i, 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 );
@@ -415,52 +415,52 @@ 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();
+ void ModifierMapping();
void SimulateKeyPress( USHORT nKeyCode );
USHORT GetIndicatorState() const;
- String GetKeyNameFromKeySym( KeySym keysym ) const;
- XubString GetKeyName( USHORT nKeyCode ) const;
- USHORT GetKeyCode( KeySym keysym, char*pcPrintable ) const;
- KeySym GetKeySym( XKeyEvent *pEvent,
+ 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,49 +472,49 @@ 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; }
virtual int GetDefaultMonitorNumber() const { return 0; }
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; }
@@ -539,7 +539,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
@@ -548,10 +548,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 95be76686cee..f5d7a937d43c 100644
--- a/vcl/unx/inc/salfont.h
+++ b/vcl/unx/inc/salfont.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +30,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>
@@ -45,8 +45,8 @@ class SalFonts;
// -=-= forwards =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
typedef ULONG XFP_FLAGS;
-class SalDisplay;
-class SalFontCacheItem;
+class SalDisplay;
+class SalFontCacheItem;
// -=-= SalFontCache -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DECLARE_LIST( SalFontCache, SalFontCacheItem* )
@@ -54,49 +54,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_); }
@@ -109,63 +109,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 7b82f86f53cc..7986ee1ddc6a 100644
--- a/vcl/unx/inc/salframe.h
+++ b/vcl/unx/inc/salframe.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,134 +44,134 @@
#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;
rtl::OUString m_sWMClass;
-
+
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 );
@@ -180,103 +180,103 @@ 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 SalIndicatorState GetIndicatorState();
virtual void SimulateKeyPress( USHORT nKeyCode );
- 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 );
virtual void SetApplicationID( const rtl::OUString &rWMClass );
-
+
// 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 41a4d276f55c..e47c24abe854 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +82,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;
@@ -115,64 +115,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,
@@ -204,11 +204,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 );
@@ -221,7 +221,7 @@ public:
inline Drawable GetDrawable() const { return hDrawable_; }
void SetDrawable( Drawable d, int nScreen );
XID GetXRenderPicture();
- void* GetXRenderFormat() const { return m_pRenderFormat; }
+ void* GetXRenderFormat() const;
inline void SetXRenderFormat( void* pRenderFormat ) { m_pRenderFormat = pRenderFormat; }
inline const SalColormap& GetColormap() const { return *m_pColormap; }
using SalGraphics::GetPixel;
@@ -230,37 +230,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*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
+ virtual void SetTextColor( SalColor nSalColor );
+ virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ 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,
@@ -269,80 +269,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;
@@ -386,20 +386,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 fad9e0e289c5..1d7419993a25 100644
--- a/vcl/unx/inc/salinst.h
+++ b/vcl/unx/inc/salinst.h
@@ -39,26 +39,26 @@
class VCL_DLLPUBLIC SalYieldMutex : public vcl::SolarMutexObject
{
protected:
- ULONG mnCount;
- oslThreadIdentifier mnThreadId;
+ ULONG mnCount;
+ oslThreadIdentifier 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; }
- oslThreadIdentifier GetThreadId() const { return mnThreadId; }
+ ULONG GetAcquireCount() const { return mnCount; }
+ oslThreadIdentifier GetThreadId() const { return mnThreadId; }
};
// -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class VCL_DLLPUBLIC X11SalInstance : public SalInstance
{
protected:
- SalYieldMutex* mpSalYieldMutex;
- bool mbPrinterInit;
+ SalYieldMutex* mpSalYieldMutex;
+ bool mbPrinterInit;
public:
X11SalInstance( SalYieldMutex* pMutex )
@@ -67,47 +67,47 @@ public:
{}
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 osl::SolarMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ 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
diff --git a/vcl/unx/inc/salmenu.h b/vcl/unx/inc/salmenu.h
index e7b5effed653..d761cc1cb929 100644
--- a/vcl/unx/inc/salmenu.h
+++ b/vcl/unx/inc/salmenu.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 2a09222c365c..ecfea5eee3d1 100644
--- a/vcl/unx/inc/salobj.h
+++ b/vcl/unx/inc/salobj.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,26 +42,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;
};
@@ -70,11 +70,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 );
@@ -83,22 +83,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 e91a67f30360..674053477ee2 100644
--- a/vcl/unx/inc/salprn.h
+++ b/vcl/unx/inc/salprn.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,44 +39,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;
@@ -85,18 +85,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;
@@ -104,8 +104,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 07056a91bdec..afe2b875036a 100644
--- a/vcl/unx/inc/salstd.hxx
+++ b/vcl/unx/inc/salstd.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,41 +37,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/saltimer.h b/vcl/unx/inc/saltimer.h
index 7442f307c2c7..e60ffb3a1353 100644
--- a/vcl/unx/inc/saltimer.h
+++ b/vcl/unx/inc/saltimer.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +38,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 9956537a8b80..5946492d6cc6 100644
--- a/vcl/unx/inc/salunx.h
+++ b/vcl/unx/inc/salunx.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || \
- defined NETBSD || defined OPENBSD
+ defined NETBSD || defined OPENBSD
#include <sys/time.h>
#elif defined AIX
#include <time.h>
@@ -42,7 +42,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 0ed0cedad31b..35ba9f922d75 100644
--- a/vcl/unx/inc/salvd.h
+++ b/vcl/unx/inc/salvd.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,46 +40,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 158c320948bc..31852d7a8923 100644
--- a/vcl/unx/inc/sm.hxx
+++ b/vcl/unx/inc/sm.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +35,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();
@@ -80,7 +80,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 bf1810640b54..9d08053d48d8 100644
--- a/vcl/unx/inc/soicon.hxx
+++ b/vcl/unx/inc/soicon.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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 78db60567133..aeb5828a5cf6 100644
--- a/vcl/unx/inc/strhelper.hxx
+++ b/vcl/unx/inc/strhelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 149acc4cc644..5a3dd7013b21 100644
--- a/vcl/unx/inc/svsys.h
+++ b/vcl/unx/inc/svsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 e3ea4cc3e790..1a3ae2bc4b0c 100644
--- a/vcl/unx/inc/svunx.h
+++ b/vcl/unx/inc/svunx.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 23235e479e75..997023c1e468 100644
--- a/vcl/unx/inc/wmadaptor.hxx
+++ b/vcl/unx/inc/wmadaptor.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,7 +99,7 @@ public:
WIN_ICONS,
WIN_WORKSPACE_NAMES,
WIN_CLIENT_LIST,
-
+
// atoms for general WM hints
WM_STATE,
MOTIF_WM_HINTS,
@@ -128,13 +128,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
@@ -151,19 +151,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 * )
;
@@ -210,17 +210,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
*/
@@ -230,7 +230,7 @@ public:
* set WM_CLIENT_MACHINE
*/
virtual void setClientMachine( X11SalFrame* pFrame ) const;
-
+
virtual void answerPing( X11SalFrame*, XClientMessageEvent* ) const;
/*
@@ -266,7 +266,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
*/
@@ -302,12 +302,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
*/
@@ -341,7 +341,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 8fc118808ae3..9edf50ef3f8b 100644
--- a/vcl/unx/inc/xfont.hxx
+++ b/vcl/unx/inc/xfont.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,14 +45,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,
@@ -112,38 +112,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 a9be7668e6b9..363036520e19 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +63,7 @@ class VCLKDEApplication : public KApplication
{
public:
VCLKDEApplication() : KApplication() {}
-
+
virtual void commitData(QSessionManager &sm);
};
@@ -253,7 +253,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 099833a18976..c15e61780922 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
using namespace ::rtl;
/** Cached native widgets.
-
+
A class which caches and paints the native widgets.
*/
class WidgetPainter
@@ -191,7 +191,7 @@ class WidgetPainter
/** Identifiers of popup menu items.
*/
int m_nPopupMenuEnabledItem, m_nPopupMenuDisabledItem;
-
+
/** cached progress bar
*/
QProgressBar *m_pProgressBar;
@@ -335,9 +335,9 @@ class WidgetPainter
@see pushButton()
*/
QPopupMenu *popupMenu( const Rectangle& rControlRegion );
-
+
/** 'Get' method for progress bar
-
+
@see pushButton()
*/
QProgressBar *progressBar( const Rectangle& rControlRegion );
@@ -449,13 +449,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 )
{
@@ -468,7 +468,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 );
@@ -501,15 +501,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 ) );
}
@@ -523,7 +523,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 )
@@ -556,8 +556,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 ) );
}
@@ -565,7 +565,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,
@@ -574,7 +574,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 )
{
@@ -589,9 +589,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,
@@ -661,7 +661,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;
@@ -689,11 +689,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 )
@@ -813,7 +813,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() )
@@ -821,7 +821,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 );
@@ -842,19 +842,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;
}
@@ -871,12 +871,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 );
}
@@ -905,7 +905,7 @@ QComboBox *WidgetPainter::comboBox( const Rectangle& rControlRegion,
}
QRect qRect = region2QRect( rControlRegion );
-
+
pComboBox->move( qRect.topLeft() );
pComboBox->resize( qRect.size() );
@@ -918,7 +918,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() );
@@ -930,13 +930,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();
@@ -952,7 +952,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();
@@ -967,7 +967,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;
@@ -980,10 +980,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;
}
@@ -993,7 +993,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() );
@@ -1011,7 +1011,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 );
@@ -1120,9 +1120,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() );
@@ -1192,10 +1192,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.
*/
@@ -1246,7 +1246,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(
@@ -1294,7 +1294,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;
@@ -1304,21 +1304,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;
@@ -1332,13 +1332,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.)
*/
@@ -1352,7 +1352,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(
@@ -1471,16 +1471,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.)
*/
@@ -1502,10 +1502,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.)
*/
@@ -1518,7 +1518,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
BOOL bReturn = FALSE;
QRect qBoundingRect = WidgetPainter::region2QRect( rControlRegion );
QRect qRect;
-
+
QWidget *pWidget = NULL;
switch ( nType )
{
@@ -1656,7 +1656,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect.setBottom( 0 );
}
}
-
+
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
bReturn = TRUE;
@@ -1699,7 +1699,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
Size aSize( qRect.width(), qRect.height() );
rNativeContentRegion = Rectangle( aPoint, aSize );
}
-
+
return bReturn;
}
@@ -1751,13 +1751,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 )
@@ -1770,7 +1770,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 )
@@ -1791,7 +1791,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
@@ -1809,7 +1809,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 )
@@ -1886,7 +1886,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 );
@@ -1905,7 +1905,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() ) );
@@ -1970,7 +1970,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() );
@@ -1982,7 +1982,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aMenuFore = toColor( qMenuCG.buttonText() );
aMenuBack = toColor( qMenuCG.button() );
}
-
+
aStyleSettings.SetMenuTextColor( aMenuFore );
aStyleSettings.SetMenuBarTextColor( aMenuFore );
aStyleSettings.SetMenuColor( aMenuBack );
@@ -2001,7 +2001,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() );
@@ -2023,7 +2023,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// Scroll bar size
aStyleSettings.SetScrollBarSize( kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
-
+
rSettings.SetStyleSettings( aStyleSettings );
}
@@ -2045,7 +2045,7 @@ SalGraphics* KDESalFrame::GetGraphics()
}
}
}
-
+
return NULL;
}
diff --git a/vcl/unx/kde4/KDEData.cxx b/vcl/unx/kde4/KDEData.cxx
index 97654cf41e76..655a759138f4 100644
--- a/vcl/unx/kde4/KDEData.cxx
+++ b/vcl/unx/kde4/KDEData.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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 31dc7b9dcba7..612ea7566642 100644
--- a/vcl/unx/kde4/KDEData.hxx
+++ b/vcl/unx/kde4/KDEData.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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 dbfba3d4da6c..b1eb0d6ca557 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 37a097f5051f..1a79c86a269a 100644
--- a/vcl/unx/kde4/KDESalDisplay.hxx
+++ b/vcl/unx/kde4/KDESalDisplay.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 107a2a2757b8..80adaa973007 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +69,7 @@ void KDESalFrame::Show( BOOL bVisible, BOOL bNoActivate )
KDEXLib* pXLib = static_cast<KDEXLib*>(GetDisplay()->GetXLib());
pXLib->doStartup();
}
-
+
X11SalFrame::Show( bVisible, bNoActivate );
}
@@ -102,13 +102,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 )
@@ -121,7 +121,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 )
@@ -142,7 +142,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
@@ -160,7 +160,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 )
@@ -181,28 +181,28 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings style( rSettings.GetStyleSettings() );
BOOL bSetTitleFont = false;
-
+
// General settings
QPalette pal = kapp->palette();
-
+
style.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
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 ) )
{
@@ -210,13 +210,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 ) )
@@ -225,7 +225,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 ) );
@@ -252,7 +252,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetHelpColor( aBase );
style.SetWindowColor( aBase );
style.SetActiveTabColor( aBase );
-
+
// Buttons
style.SetButtonTextColor( aButn );
style.SetButtonRolloverTextColor( aButn );
@@ -268,7 +268,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
@@ -287,10 +287,10 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// Font
Font aFont = toFont( kapp->font(), rSettings.GetUILocale() );
-
+
style.SetAppFont( aFont );
style.SetHelpFont( aFont );
-
+
style.SetMenuFont( aFont ); // will be changed according to pMenuBar
//style.SetToolFont( aFont ); //already set above
style.SetLabelFont( aFont );
@@ -307,7 +307,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetTitleFont( aFont );
}
style.SetFloatTitleFont( aFont );
-
+
int flash_time = QApplication::cursorFlashTime();
style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME );
@@ -318,14 +318,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 );
@@ -334,7 +334,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 ) );
@@ -345,12 +345,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 );
}
@@ -404,7 +404,7 @@ SalGraphics* KDESalFrame::GetGraphics()
}
}
}
-
+
return NULL;
}
diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx
index 2d9c7f8a7aa0..d6ae5a842dc1 100644
--- a/vcl/unx/kde4/KDESalFrame.hxx
+++ b/vcl/unx/kde4/KDESalFrame.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +40,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 e130afbecd15..fb8b3b99733b 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +51,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.
@@ -80,7 +80,7 @@ QStyle::State vclStateValue2StateFlag( ControlState nControlState,
return nState;
}
-/**
+/**
Convert VCL Rectangle to QRect.
@param rControlRegion The Rectangle to convert.
@return The matching QRect
@@ -90,7 +90,7 @@ QRect region2QRect( const Rectangle& rControlRegion )
return QRect(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
}
-KDESalGraphics::KDESalGraphics() :
+KDESalGraphics::KDESalGraphics() :
m_image(0)
{
}
@@ -104,54 +104,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;
}
@@ -163,13 +163,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);
}
@@ -180,7 +180,7 @@ namespace
option->rect = image->rect();
if( nAdjust )
option->rect.adjust( nAdjust, nAdjust, -nAdjust, -nAdjust );
-
+
QPainter painter(image);
kapp->style()->drawPrimitive(element, option, &painter);
}
@@ -189,11 +189,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;
@@ -218,12 +218,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();
@@ -243,7 +243,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
return false;
}
-
+
BOOL returnVal = true;
QRect widgetRect = region2QRect(rControlRegion);
@@ -258,34 +258,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)
@@ -297,17 +297,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) )
@@ -324,44 +324,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)
@@ -369,7 +369,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 );
}
@@ -377,15 +377,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
@@ -393,12 +393,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) );
}
}
@@ -407,15 +407,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) );
@@ -427,29 +427,30 @@ 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.maximum = qMax( option.maximum, option.minimum ); // bnc#619772
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
@@ -460,7 +461,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
else if (type == CTRL_SPINBOX)
{
QStyleOptionSpinBox option;
-
+
// determine active control
if( value.getType() == CTRL_SPINBUTTONS )
{
@@ -470,33 +471,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();
@@ -510,7 +511,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 );
@@ -519,7 +520,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)
@@ -531,8 +532,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))
@@ -540,25 +541,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 )
@@ -572,7 +573,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_ )
@@ -597,11 +598,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
@@ -614,9 +615,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;
}
}
@@ -639,46 +640,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();
@@ -703,9 +704,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:
@@ -720,7 +721,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:
@@ -730,7 +731,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 );
@@ -786,7 +787,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(
@@ -795,7 +796,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
QStyle::PM_FocusFrameVMargin, &styleOption)
);
boundingRect = contentRect;
-
+
retVal = true;
break;
}
@@ -831,7 +832,7 @@ 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 5500d5017581..b9f4ec14590a 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 KDESalGraphics : public X11SalGraphics
public:
KDESalGraphics();
virtual ~KDESalGraphics();
-
+
/**
What widgets can be drawn the native way.
@param type Type of the widget.
@@ -52,7 +52,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
@@ -62,13 +62,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.)
*/
@@ -76,21 +76,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
@@ -99,10 +99,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 302d20ca9bc4..976e77a32839 100644
--- a/vcl/unx/kde4/KDESalInstance.cxx
+++ b/vcl/unx/kde4/KDESalInstance.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 c42fea68ddcf..ed463605f95c 100644
--- a/vcl/unx/kde4/KDESalInstance.hxx
+++ b/vcl/unx/kde4/KDESalInstance.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6544dd86be74..1084ba2e5ba5 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +67,8 @@
#include <glib-2.0/glib.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 ),
eventLoopType( LibreOfficeEventLoop )
{
@@ -88,13 +88,13 @@ KDEXLib::KDEXLib() :
KDEXLib::~KDEXLib()
{
delete 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;
}
@@ -115,7 +115,7 @@ void KDEXLib::Init()
ki18n( "LibreOffice is an office suite.\n" ),
"http://libreoffice.org",
"libreoffice@lists.freedesktop.org" );
-
+
kAboutData->addAuthor( ki18n( "Jan Holesovsky" ),
ki18n( "Original author and maintainer of the KDE NWF." ),
"kendy@artax.karlin.mff.cuni.cz",
@@ -126,7 +126,7 @@ void KDEXLib::Init()
kAboutData->addAuthor( ki18n("Eric Bischoff"),
ki18n( "Accessibility fixes, porting to KDE 4." ),
"bischoff@kde.org" );
-
+
//kAboutData->setProgramIconName("OpenOffice");
m_nFakeCmdLineArgs = 2;
@@ -178,7 +178,7 @@ void KDEXLib::Init()
Display* pDisp = QX11Info::display();
SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp);
-
+
pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod );
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 7bfc542427a9..ffe93b40c735 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ class KDEXLib : public QObject, public SalXLib
void startTimeoutTimerSignal();
void startUserEventTimerSignal();
void processYieldSignal( bool bWait, bool bHandleAllCurrentEvents );
-
+
public:
KDEXLib();
virtual ~KDEXLib();
@@ -87,7 +87,7 @@ class KDEXLib : public QObject, public SalXLib
virtual void StopTimer();
virtual void Wakeup();
virtual void PostUserEvent();
-
+
void doStartup();
};
diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
index c923598736e8..678731c6fdb0 100644
--- a/vcl/unx/kde4/VCLKDEApplication.cxx
+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
#include "KDESalDisplay.hxx"
-VCLKDEApplication::VCLKDEApplication() :
+VCLKDEApplication::VCLKDEApplication() :
KApplication()
{
}
@@ -47,7 +47,7 @@ bool VCLKDEApplication::x11EventFilter(XEvent* event)
{
return true;
}
-
+
return false;
}
diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx
index 17a9b6eb0917..d86e85910af4 100644
--- a/vcl/unx/kde4/VCLKDEApplication.hxx
+++ b/vcl/unx/kde4/VCLKDEApplication.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +43,9 @@ class VCLKDEApplication : public KApplication
{
public:
VCLKDEApplication();
-
+
virtual void commitData(QSessionManager&) {};
-
+
virtual bool x11EventFilter(XEvent* event);
};
diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index d38c346c21b8..32561d9c9ee4 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ extern "C" {
*/
if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
XInitThreads();
-
+
#if QT_VERSION < 0x050000
// Qt 4.x support needs >= 4.1.0
rtl::OString aVersion( qVersion() );
@@ -76,12 +76,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 98cba80637f0..5cb51b1e4589 100644
--- a/vcl/unx/source/app/i18n_cb.cxx
+++ b/vcl/unx/source/app/i18n_cb.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -411,7 +411,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;
@@ -536,13 +536,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 48f6c53b5c5c..5a50b6a04937 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,15 +55,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 );
@@ -682,10 +682,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,
@@ -698,7 +698,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 32233cfb748c..580a2515bed1 100644
--- a/vcl/unx/source/app/i18n_im.cxx
+++ b/vcl/unx/source/app/i18n_im.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -217,10 +217,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
@@ -251,7 +251,7 @@ SalI18N_InputMethod::SetLocale( const char* pLocale )
mbUseable = False;
}
}
-
+
// must not fail if mbUseable since XSupportsLocale() asserts success
if ( mbUseable && XSetLocaleModifiers("") == NULL )
{
@@ -317,15 +317,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 }
};
@@ -459,7 +459,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);
@@ -472,7 +472,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;
@@ -532,9 +532,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 985448f3eb8d..3c060e4fc30a 100644
--- a/vcl/unx/source/app/i18n_keysym.cxx
+++ b/vcl/unx/source/app/i18n_keysym.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +34,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,
@@ -73,11 +73,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,
@@ -89,11 +89,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,
@@ -105,11 +105,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,
@@ -121,11 +121,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,
@@ -138,11 +138,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,
@@ -151,11 +151,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,
@@ -167,11 +167,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,
@@ -183,11 +183,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,
@@ -199,19 +199,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,
@@ -223,11 +223,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,
@@ -239,19 +239,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,
@@ -263,11 +263,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,
@@ -279,31 +279,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,
@@ -311,20 +311,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 2f055c573fa3..98d26e4509df 100644
--- a/vcl/unx/source/app/i18n_status.cxx
+++ b/vcl/unx/source/app/i18n_status.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -93,17 +93,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;
@@ -208,7 +208,7 @@ Point XIMStatusWindow::updatePosition()
if( checkLastParent() )
{
const SystemEnvData* pParentEnvData = m_pLastParent->GetSystemData();
-
+
SalExtTextInputPosEvent aPosEvent;
m_pLastParent->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent );
int x, y;
@@ -319,9 +319,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;
@@ -614,7 +614,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 )
{
@@ -625,7 +625,7 @@ void I18NStatus::setStatusText( const String& rText )
bVisible = false;
}
}
-
+
m_pStatusWindow->show( bVisible, contextmap );
}
}
@@ -656,8 +656,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 baf7e175eac5..df64a69b8a36 100644
--- a/vcl/unx/source/app/i18n_wrp.cxx
+++ b/vcl/unx/source/app/i18n_wrp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-struct XIMArg
+struct XIMArg
{
char *name;
char *value;
@@ -48,7 +48,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
@@ -169,8 +169,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;
@@ -180,7 +180,7 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
/*
* so count the stuff dangling here
*/
-
+
#if defined(SOLARIS) && !defined(__GNUC__)
va_start(variable);
#else
@@ -189,8 +189,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) );
@@ -206,23 +206,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;
}
@@ -230,10 +230,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;
}
@@ -245,8 +245,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 bb62e248b1d7..830290405f9d 100644
--- a/vcl/unx/source/app/i18n_xkb.cxx
+++ b/vcl/unx/source/app/i18n_xkb.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +50,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 )
@@ -150,7 +150,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 3ea61eb86bdc..023848adc510 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +40,16 @@
#include <sal/macros.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
@@ -70,17 +70,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
@@ -93,7 +93,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, "+" }
@@ -107,7 +107,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[] =
@@ -116,7 +116,7 @@ namespace vcl_sal {
{ XK_Left, "Влево" },
{ XK_Up, "Вверх" },
{ XK_Down, "Вниз" },
- { XK_space, "Пробел" }
+ { XK_space, "Пробел" }
};
static const struct KeysymNameReplacement aImplReplacements_German[] =
@@ -450,7 +450,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 eb266485ce03..ef4f5de9b583 100644
--- a/vcl/unx/source/app/randrwrapper.cxx
+++ b/vcl/unx/source/app/randrwrapper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ namespace
class RandRWrapper
{
oslModule m_pRandRLib;
-
+
// function pointers
Bool(*m_pXRRQueryExtension)(Display*,int*,int*);
Status(*m_pXRRQueryVersion)(Display*,int*,int*);
@@ -55,17 +55,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;
@@ -125,7 +125,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 &&
@@ -201,12 +201,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;
@@ -282,7 +282,7 @@ void RandRWrapper::releaseWrapper()
} // namespace
#endif
-
+
#include "saldisp.hxx"
#include "salframe.h"
#if OSL_DEBUG_LEVEL > 1
@@ -306,7 +306,7 @@ void SalDisplay::DeInitRandR()
RandRWrapper::releaseWrapper();
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "SalDisplay::DeInitRandR()\n" );
-#endif
+#endif
#endif
}
@@ -331,18 +331,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 609ae471ceaa..bfe96f76e516 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,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 ...
@@ -235,7 +235,7 @@ int X11SalData::XErrorHdl( Display *pDisplay, XErrorEvent *pEvent )
}
int X11SalData::XIOErrorHdl( Display * )
-{
+{
/* #106197# hack: until a real shutdown procedure exists
* _exit ASAP
*/
@@ -264,14 +264,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 );
}
@@ -283,9 +283,9 @@ X11SalData::~X11SalData()
void X11SalData::DeleteDisplay()
{
delete m_pSalDisplay;
- m_pSalDisplay = NULL;
+ m_pSalDisplay = NULL;
delete pXLib_;
- pXLib_ = NULL;
+ pXLib_ = NULL;
}
void X11SalData::Init()
@@ -306,11 +306,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_ );
@@ -349,8 +349,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" ) );
}
@@ -359,7 +359,7 @@ SalXLib::~SalXLib()
// close 'wakeup' pipe.
close (m_pTimeoutFDS[0]);
close (m_pTimeoutFDS[1]);
-
+
PopXErrorLevel();
XSetIOErrorHandler (m_aOrigXIOErrorHandler);
}
@@ -447,9 +447,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);
@@ -517,7 +517,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 );
}
@@ -561,13 +561,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;
@@ -580,16 +580,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
@@ -597,18 +597,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_ );
@@ -683,7 +683,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;
@@ -860,7 +860,7 @@ 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 f2eecf0d9cbd..69ab594ec387 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -296,26 +296,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 )
{
@@ -353,25 +353,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_
@@ -687,8 +687,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
@@ -703,7 +703,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 );
@@ -746,9 +746,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
@@ -780,13 +780,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 );
@@ -819,11 +819,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);
@@ -859,9 +859,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" ) )
@@ -1115,7 +1115,7 @@ USHORT SalDisplay::GetIndicatorState() 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 );
@@ -1159,7 +1159,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 );
@@ -1259,13 +1259,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:
@@ -1772,8 +1772,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 );
@@ -2324,9 +2324,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();
}
@@ -2469,7 +2469,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
return pFrame->Dispatch( pEvent );
}
}
-
+
// dispatch to salobjects
X11SalObject::Dispatch( pEvent );
@@ -2887,9 +2887,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 57f8d891a8a6..4f0d67963378 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +60,8 @@
SalYieldMutex::SalYieldMutex()
{
- mnCount = 0;
- mnThreadId = 0;
+ mnCount = 0;
+ mnThreadId = 0;
::tools::SolarMutex::SetSolarMutex( this );
}
@@ -151,8 +151,8 @@ X11SalInstance::~X11SalInstance()
struct PredicateReturn
{
- USHORT nType;
- BOOL bRet;
+ USHORT nType;
+ BOOL bRet;
};
extern "C" {
@@ -209,10 +209,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 );
@@ -267,8 +267,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*)"";
}
@@ -344,14 +344,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++ )
{
@@ -370,33 +370,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 8024e35cdb12..25a72159a663 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( nScreen );
aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize );
}
-
+
return aRet;
}
@@ -160,7 +160,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 b02ced3a6411..382cadf3de12 100644
--- a/vcl/unx/source/app/saltimer.cxx
+++ b/vcl/unx/source/app/saltimer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +54,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 e7eeaa3cd5ee..c10e5f6573a7 100644
--- a/vcl/unx/source/app/sm.cxx
+++ b/vcl/unx/source/app/sm.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -140,7 +140,7 @@ void IceSalSession::handleOldX11SaveYourself( SalFrame* pFrame )
if( pOneInstance )
{
SalSessionSaveRequestEvent aEvent( true, false );
- pOneInstance->CallCallback( &aEvent );
+ pOneInstance->CallCallback( &aEvent );
}
}
}
@@ -174,15 +174,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;
@@ -201,9 +201,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;
@@ -216,33 +216,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;
@@ -254,21 +254,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++ )
@@ -292,8 +292,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;
@@ -312,7 +312,7 @@ IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
if( pOneInstance )
{
SalSessionSaveRequestEvent aEvent( pThis != 0, false );
- pOneInstance->CallCallback( &aEvent );
+ pOneInstance->CallCallback( &aEvent );
}
else
saveDone();
@@ -328,7 +328,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, InteractionHdl, void*, EMPTYA
SalSessionInteractionEvent aEvent( true );
pOneInstance->CallCallback( &aEvent );
}
-
+
return 0;
}
@@ -340,7 +340,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownCancelHdl, void*, EMP
SalSessionShutdownCancelEvent aEvent;
pOneInstance->CallCallback( &aEvent );
}
-
+
return 0;
}
@@ -465,22 +465,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,
@@ -564,7 +564,7 @@ String SessionManagerClient::getExecName()
rtl::OUString aExec, aSysExec;
osl_getExecutableFile( &aExec.pData );
osl_getSystemPathFromFileURL( aExec.pData, &aSysExec.pData );
-
+
int nPos = aSysExec.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".bin")) );
if( nPos != -1 )
aSysExec = aSysExec.copy( 0, nPos );
@@ -725,16 +725,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 21e4eabedfb8..600370037de3 100644
--- a/vcl/unx/source/app/soicon.cxx
+++ b/vcl/unx/source/app/soicon.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
{
if( ! ImplGetResMgr() )
return FALSE;
-
+
USHORT nIconSizeOffset;
if( iconSize >= 48 )
@@ -69,7 +69,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(),
@@ -88,7 +88,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);
@@ -102,13 +102,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 955d7098192f..6338f24c7d03 100644
--- a/vcl/unx/source/app/wmadaptor.cxx
+++ b/vcl/unx/source/app/wmadaptor.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -105,8 +105,8 @@ using namespace vcl_sal;
struct WMAdaptorProtocol
{
- const char* pProtocol;
- int nProtocol;
+ const char* pProtocol;
+ int nProtocol;
};
@@ -196,7 +196,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 );
@@ -242,11 +242,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;
@@ -428,12 +428,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();
@@ -487,7 +487,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
// #i80971# protect against invalid atoms
if( pAtomNames[i] == NULL )
continue;
-
+
int nProtocol = -1;
WMAdaptorProtocol aSearch;
aSearch.pProtocol = pAtomNames[i];
@@ -622,18 +622,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 ],
@@ -743,7 +743,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
// #i80971# protect against invalid atoms
if( pAtomNames[i] == NULL )
continue;
-
+
int nProtocol = -1;
WMAdaptorProtocol aSearch;
aSearch.pProtocol = pAtomNames[i];
@@ -827,16 +827,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 ],
@@ -1009,8 +1009,8 @@ void WMAdaptor::initAtoms()
// get basic atoms
for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAtomTab ); 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 );
}
/*
@@ -1021,7 +1021,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 );
}
/*
@@ -1032,8 +1032,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 );
}
/*
@@ -1045,7 +1045,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 = " ";
@@ -1072,7 +1072,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
@@ -1120,10 +1120,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,
@@ -1251,8 +1251,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(),
@@ -1341,8 +1341,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(),
@@ -1401,13 +1401,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 )
{
@@ -1417,13 +1417,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;
@@ -1451,7 +1451,7 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
default:
break;
}
-
+
// set the hint
XChangeProperty( m_pDisplay,
pFrame->GetShellWindow(),
@@ -1462,7 +1462,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
@@ -1491,7 +1491,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
@@ -1658,8 +1658,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()
);
@@ -1673,8 +1673,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;
@@ -1703,16 +1703,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,
@@ -1768,18 +1768,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,
@@ -1844,16 +1844,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,
@@ -1878,16 +1878,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,
@@ -2106,16 +2106,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,
@@ -2143,16 +2143,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,
@@ -2195,16 +2195,16 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) 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] = 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,
@@ -2266,11 +2266,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 ],
@@ -2305,11 +2305,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 ],
@@ -2345,16 +2345,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,
@@ -2414,7 +2414,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 dce25af71ca9..20468e71c36c 100644
--- a/vcl/unx/source/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/source/desktopdetect/desktopdetector.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,13 +59,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 );
@@ -86,11 +86,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
@@ -150,7 +150,7 @@ extern "C"
bWasXError = true;
return 0;
}
-
+
typedef int(* XErrorHandler)(Display*,XErrorEvent*);
}
@@ -166,11 +166,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,
@@ -184,7 +184,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 )
{
@@ -246,23 +246,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" ) )
@@ -298,7 +298,7 @@ VCL_DLLPUBLIC rtl::OUString get_desktop_environment()
break;
}
}
-
+
// no server at all
if( ! pDisplayStr || !*pDisplayStr )
aRet.appendAscii( desktop_strings[DESKTOP_NONE] );
@@ -313,12 +313,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 ) )
@@ -329,10 +329,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 f4922f57cf72..18b0bb4e575f 100644
--- a/vcl/unx/source/dtrans/X11_clipboard.cxx
+++ b/vcl/unx/source/dtrans/X11_clipboard.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -137,7 +137,7 @@ void X11Clipboard::clearContents()
// clear members
m_aOwner.clear();
m_aContents.clear();
-
+
// release the mutex
aGuard.clear();
@@ -286,7 +286,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 ed493a33ba2e..05303e58f2af 100644
--- a/vcl/unx/source/dtrans/X11_clipboard.hxx
+++ b/vcl/unx/source/dtrans/X11_clipboard.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +54,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:
@@ -76,7 +76,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 );
@@ -84,29 +84,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
@@ -118,16 +118,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();
@@ -138,7 +138,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 988dce430a51..49baa396d121 100644
--- a/vcl/unx/source/dtrans/X11_dndcontext.cxx
+++ b/vcl/unx/source/dtrans/X11_dndcontext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 cppu;
using namespace x11;
/*
- * DropTargetDropContext
+ * DropTargetDropContext
*/
DropTargetDropContext::DropTargetDropContext(
@@ -71,7 +71,7 @@ void DropTargetDropContext::dropComplete( sal_Bool success ) throw()
/*
- * DropTargetDragContext
+ * DropTargetDragContext
*/
DropTargetDragContext::DropTargetDragContext(
@@ -100,7 +100,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 5c47e6a465a2..74d69cda0785 100644
--- a/vcl/unx/source/dtrans/X11_dndcontext.hxx
+++ b/vcl/unx/source/dtrans/X11_dndcontext.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +95,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 ab12c917297a..ee35860ad7a7 100644
--- a/vcl/unx/source/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/source/dtrans/X11_droptarget.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -196,7 +196,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 18d120d4961b..d06cb261b6f8 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -76,10 +76,10 @@
#include <comphelper/processfactory.hxx>
#include <osl/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;
@@ -114,10 +114,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
@@ -282,7 +282,7 @@ SelectionManager::SelectionManager() :
m_nXdndActionAsk( None ),
m_nXdndActionPrivate( None )
{
- m_aDropEnterEvent.data.l[0] = None;
+ m_aDropEnterEvent.data.l[0] = None;
m_aDragRunning.reset();
}
@@ -330,11 +330,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
@@ -377,34 +377,34 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
XSynchronize( m_pDisplay, True );
#endif
// clipboard selection
- m_nCLIPBOARDAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("CLIPBOARD")) );
+ m_nCLIPBOARDAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("CLIPBOARD")) );
// special targets
- m_nTARGETSAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("TARGETS")) );
+ m_nTARGETSAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("TARGETS")) );
m_nTIMESTAMPAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")) );
- m_nTEXTAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("TEXT")) );
- m_nINCRAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("INCR")) );
- m_nCOMPOUNDAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("COMPOUND_TEXT")) );
- m_nMULTIPLEAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("MULTIPLE")) );
- m_nUTF16Atom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("ISO10646-1")) );
-// m_nUTF16Atom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=ISO-10646-UCS-2")) );
+ m_nTEXTAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("TEXT")) );
+ m_nINCRAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("INCR")) );
+ m_nCOMPOUNDAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("COMPOUND_TEXT")) );
+ m_nMULTIPLEAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("MULTIPLE")) );
+ m_nUTF16Atom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("ISO10646-1")) );
+// m_nUTF16Atom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=ISO-10646-UCS-2")) );
m_nImageBmpAtom = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("image/bmp")) );
// Atoms for Xdnd protocol
- m_nXdndAware = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndAware")) );
- m_nXdndEnter = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndEnter")) );
- m_nXdndLeave = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndLeave")) );
- m_nXdndPosition = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndPosition")) );
- m_nXdndStatus = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndStatus")) );
- m_nXdndDrop = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndDrop")) );
- m_nXdndFinished = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndFinished")) );
- m_nXdndSelection = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndSelection")) );
- m_nXdndTypeList = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndTypeList")) );
- m_nXdndProxy = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndProxy")) );
- m_nXdndActionCopy = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionCopy")) );
- m_nXdndActionMove = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionMove")) );
- m_nXdndActionLink = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionLink")) );
- m_nXdndActionAsk = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionAsk")) );
+ m_nXdndAware = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndAware")) );
+ m_nXdndEnter = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndEnter")) );
+ m_nXdndLeave = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndLeave")) );
+ m_nXdndPosition = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndPosition")) );
+ m_nXdndStatus = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndStatus")) );
+ m_nXdndDrop = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndDrop")) );
+ m_nXdndFinished = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndFinished")) );
+ m_nXdndSelection = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndSelection")) );
+ m_nXdndTypeList = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndTypeList")) );
+ m_nXdndProxy = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndProxy")) );
+ m_nXdndActionCopy = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionCopy")) );
+ m_nXdndActionMove = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionMove")) );
+ m_nXdndActionLink = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionLink")) );
+ m_nXdndActionAsk = getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionAsk")) );
m_nXdndActionPrivate= getAtom( OUString(RTL_CONSTASCII_USTRINGPARAM("XdndActionPrivate")) );
// initialize map with member none
@@ -562,10 +562,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,
@@ -939,9 +939,9 @@ 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
@@ -1098,8 +1098,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 )
@@ -1256,8 +1256,8 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
osl::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
)
{
@@ -1422,21 +1422,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;
}
}
}
@@ -1596,14 +1596,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;
@@ -1812,23 +1812,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();
@@ -1857,8 +1857,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
)
)
@@ -2125,9 +2125,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 );
@@ -2138,8 +2138,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
@@ -2206,10 +2206,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
@@ -2237,10 +2237,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;
@@ -2256,7 +2256,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;
@@ -2302,15 +2302,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();
@@ -2334,7 +2334,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
}
/*
- * methods for XDropTargetDropContext
+ * methods for XDropTargetDropContext
*/
void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow, XLIB_Time )
@@ -2346,11 +2346,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();
@@ -2360,16 +2360,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 )
@@ -2389,9 +2389,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;
}
@@ -2400,7 +2400,7 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
}
/*
- * methods for XDropTargetDragContext
+ * methods for XDropTargetDragContext
*/
// ------------------------------------------------------------------------
@@ -2429,11 +2429,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
@@ -2444,15 +2444,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;
@@ -2521,12 +2521,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;
@@ -2551,12 +2551,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 );
}
@@ -2570,14 +2570,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;
@@ -2613,7 +2613,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" );
@@ -2646,9 +2646,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;
@@ -2675,10 +2675,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;
@@ -2692,11 +2692,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();
@@ -2709,8 +2709,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;
@@ -2747,22 +2747,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();
@@ -2771,9 +2771,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;
@@ -2810,15 +2810,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 );
@@ -2832,18 +2832,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;
}
@@ -2860,16 +2860,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,
@@ -2881,12 +2881,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 >() );
@@ -2899,11 +2899,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();
@@ -2950,11 +2950,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();
}
@@ -2962,7 +2962,7 @@ void SelectionManager::reject( XLIB_Window aDropWindow, XLIB_Time )
}
/*
- * XDragSource
+ * XDragSource
*/
sal_Bool SelectionManager::isDragImageSupported() throw()
@@ -2999,8 +2999,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
@@ -3100,11 +3100,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 )
@@ -3120,7 +3120,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();
@@ -3130,12 +3130,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() )
@@ -3146,9 +3146,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 )
@@ -3168,13 +3168,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();
@@ -3183,12 +3183,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;
@@ -3227,11 +3227,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() )
{
@@ -3379,10 +3379,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 );
@@ -3398,17 +3398,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 )
{
@@ -3439,17 +3439,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 );
@@ -3509,27 +3509,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 );
@@ -3549,7 +3549,7 @@ void SelectionManager::dragDoDispatch()
}
/*
- * XDragSourceContext
+ * XDragSourceContext
*/
sal_Int32 SelectionManager::getCurrentCursor()
@@ -3606,17 +3606,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 )
@@ -3629,7 +3629,7 @@ void SelectionManager::transferablesFlavorsChanged()
}
/*
- * dispatch loop
+ * dispatch loop
*/
// ------------------------------------------------------------------------
@@ -3637,9 +3637,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
@@ -3696,9 +3696,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 );
@@ -3929,10 +3929,10 @@ void SelectionManager::registerHandler( Atom selection, SelectionAdaptor& rAdapt
{
osl::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;
}
// ------------------------------------------------------------------------
@@ -4031,22 +4031,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();
@@ -4055,7 +4055,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
}
/*
- * SelectionAdaptor
+ * SelectionAdaptor
*/
Reference< XTransferable > SelectionManager::getTransferable() throw()
@@ -4086,7 +4086,7 @@ Reference< XInterface > SelectionManager::getReference() throw()
// ------------------------------------------------------------------------
/*
- * SelectionManagerHolder
+ * SelectionManagerHolder
*/
SelectionManagerHolder::SelectionManagerHolder() :
@@ -4126,7 +4126,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) thro
}
/*
- * XDragSource
+ * XDragSource
*/
sal_Bool SelectionManagerHolder::isDragImageSupported() throw()
@@ -4157,7 +4157,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 f5534dab81f5..0b53e39a2e4f 100644
--- a/vcl/unx/source/dtrans/X11_selection.hxx
+++ b/vcl/unx/source/dtrans/X11_selection.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +81,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 > >
@@ -101,19 +101,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();
};
@@ -134,17 +134,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,
@@ -152,8 +152,8 @@ namespace x11 {
) throw();
};
-
-
+
+
class SelectionManager :
public ::cppu::WeakImplHelper4<
::com::sun::star::datatransfer::dnd::XDragSource,
@@ -174,13 +174,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;
@@ -192,26 +192,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;
@@ -234,8 +234,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 ) :
@@ -254,11 +254,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 >
@@ -275,19 +275,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
@@ -297,32 +297,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;
@@ -334,36 +334,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 >
@@ -377,12 +377,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();
@@ -405,7 +405,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,
@@ -441,14 +441,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 );
@@ -482,15 +482,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,
@@ -516,11 +516,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 cfb1fc623c44..11c766f08c56 100644
--- a/vcl/unx/source/dtrans/X11_service.cxx
+++ b/vcl/unx/source/dtrans/X11_service.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,29 +76,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 );
}
@@ -107,7 +107,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 aaf90e4d8ec6..edefc651b94a 100644
--- a/vcl/unx/source/dtrans/X11_transferable.cxx
+++ b/vcl/unx/source/dtrans/X11_transferable.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 cff20e52fe48..ea66098107f1 100644
--- a/vcl/unx/source/dtrans/X11_transferable.hxx
+++ b/vcl/unx/source/dtrans/X11_transferable.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +41,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();
@@ -53,16 +53,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 9b0bb2729c95..f42cf739ab89 100644
--- a/vcl/unx/source/dtrans/bmp.cxx
+++ b/vcl/unx/source/dtrans/bmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +89,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;
@@ -409,17 +409,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" };
@@ -478,17 +478,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
@@ -552,10 +552,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++;
}
@@ -581,8 +581,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;
@@ -610,8 +610,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;
@@ -665,9 +665,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 )
@@ -680,25 +680,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 6d2e76bae0bb..d7fd48f0598d 100644
--- a/vcl/unx/source/dtrans/bmp.hxx
+++ b/vcl/unx/source/dtrans/bmp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +54,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 );
@@ -90,12 +90,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 5add04288aa9..45e56b48b474 100644
--- a/vcl/unx/source/dtrans/config.cxx
+++ b/vcl/unx/source/dtrans/config.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +45,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 b7cb1557c7a3..3f2bb060d56c 100644
--- a/vcl/unx/source/dtrans/copydata_curs.h
+++ b/vcl/unx/source/dtrans/copydata_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 d0cd40bc78fd..3f2009d72322 100644
--- a/vcl/unx/source/dtrans/copydata_mask.h
+++ b/vcl/unx/source/dtrans/copydata_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 02d5709600a8..5c0feab91cbd 100644
--- a/vcl/unx/source/dtrans/linkdata_curs.h
+++ b/vcl/unx/source/dtrans/linkdata_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5bf28eac1bd5..a84059c079c7 100644
--- a/vcl/unx/source/dtrans/linkdata_mask.h
+++ b/vcl/unx/source/dtrans/linkdata_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 cbc3b6b73c1e..cdbc15d948b9 100644
--- a/vcl/unx/source/dtrans/movedata_curs.h
+++ b/vcl/unx/source/dtrans/movedata_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 716e626f778b..a10d7eab5f51 100644
--- a/vcl/unx/source/dtrans/movedata_mask.h
+++ b/vcl/unx/source/dtrans/movedata_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 96b0c51178e6..82efb546d2f0 100644
--- a/vcl/unx/source/dtrans/nodrop_curs.h
+++ b/vcl/unx/source/dtrans/nodrop_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b5bd992c7a4c..c3fa9cda4af4 100644
--- a/vcl/unx/source/dtrans/nodrop_mask.h
+++ b/vcl/unx/source/dtrans/nodrop_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 a0bece000fe4..2dbf9aa085bf 100644
--- a/vcl/unx/source/fontmanager/fontcache.cxx
+++ b/vcl/unx/source/fontmanager/fontcache.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -259,7 +259,7 @@ void FontCache::read()
#endif
return;
}
-
+
ByteString aLine;
aStream.ReadLine( aLine );
@@ -270,7 +270,7 @@ void FontCache::read()
#endif
return;
}
-
+
int nDir = 0;
FontDirMap* pDir = NULL;
xub_StrLen nIndex;
@@ -303,7 +303,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
@@ -326,12 +326,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;
@@ -339,15 +339,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 )
{
@@ -362,10 +362,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 );
@@ -383,7 +383,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];
@@ -488,8 +488,8 @@ void FontCache::read()
delete pFont;
continue;
}
-
- FontCacheEntry& rEntry = (*pDir)[aFile].m_aEntry;
+
+ FontCacheEntry& rEntry = (*pDir)[aFile].m_aEntry;
rEntry.push_back( pFont );
}
}
@@ -505,7 +505,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;
}
@@ -536,24 +536,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;
}
@@ -571,10 +571,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;
@@ -582,9 +582,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;
@@ -592,30 +592,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
)
@@ -784,7 +784,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 1de85367c39d..abb8a6be4455 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +40,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
@@ -94,44 +94,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* );
@@ -144,14 +144,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(); }
@@ -169,13 +169,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 ); }
@@ -367,37 +367,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
) )
{
@@ -422,7 +422,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 );
@@ -433,7 +433,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;
@@ -445,7 +445,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
(void)eSetName; // prevent compiler warning about unused parameter
#endif
}
-
+
FcFontSet* FontCfgWrapper::getFontSet()
{
#ifdef ENABLE_FONTCONFIG
@@ -543,9 +543,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;
@@ -563,13 +563,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)
{
@@ -581,7 +581,7 @@ FcResult FontCfgWrapper::FamilyFromPattern(FcPattern* pPattern, FcChar8 **family
m_aLocalizedToCanonical[OString((const char*)(*family))] = OString((const char*)origfamily);
}
}
-
+
return eFamilyRes;
}
@@ -686,16 +686,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;
@@ -723,9 +723,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 ) )
{
@@ -780,7 +780,7 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl
pUpdate = NULL;
}
}
-
+
if( pUpdate )
{
// set family name
@@ -797,7 +797,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
@@ -820,7 +820,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 );
@@ -875,7 +875,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 )
@@ -883,8 +883,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;
}
@@ -895,16 +895,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;
}
@@ -915,15 +915,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;
}
@@ -934,8 +934,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;
}
@@ -1059,7 +1059,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
{
@@ -1104,13 +1104,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 cb43af0351c6..3bc8a1ea3298 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -378,10 +378,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 )
{}
// -------------------------------------------------------------------------
@@ -595,13 +595,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 );
@@ -613,7 +613,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 )
@@ -654,7 +654,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;
}
*/
}
@@ -690,7 +690,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;
}
}
}
@@ -788,7 +788,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 )
@@ -832,7 +832,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;
@@ -927,7 +927,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;
@@ -964,12 +964,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 )
@@ -1000,13 +1000,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 );
@@ -1021,7 +1021,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;
@@ -1030,7 +1030,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 );
@@ -1044,13 +1044,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 ) ) )
{
@@ -1110,10 +1110,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;
@@ -1123,7 +1123,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
@@ -1289,13 +1289,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 < SAL_N_ELEMENTS(pSuffix); i++ )
{
ByteString aName( rFontFile );
aName.Erase( aName.Len()-4 );
aName.Append( pSuffix[i] );
-
+
ByteString aFilePath( aDir );
aFilePath.Append( '/' );
aFilePath.Append( aName );
@@ -1307,7 +1307,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/";
@@ -1321,10 +1321,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;
@@ -1344,8 +1344,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
@@ -1471,23 +1471,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;
@@ -1506,22 +1506,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 )
@@ -1539,17 +1539,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;
}
@@ -1582,12 +1582,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 );
@@ -1617,7 +1617,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
@@ -1625,15 +1625,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
@@ -2024,18 +2024,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 );
@@ -2059,7 +2059,7 @@ static bool AreFCSubstitutionsEnabled()
{
//
if( (*pEnvStr >= '0') && (*pEnvStr <= '9') )
- nDisableBits = (*pEnvStr - '0');
+ nDisableBits = (*pEnvStr - '0');
else
nDisableBits = ~0U; // no specific bits set: disable all
}
@@ -2073,7 +2073,7 @@ void PrintFontManager::initialize()
CALLGRIND_TOGGLE_COLLECT();
CALLGRIND_ZERO_STATS();
#endif
-
+
long aDirEntBuffer[ (sizeof(struct dirent)+_PC_NAME_MAX)+1 ];
if( ! m_pFontCache )
@@ -2109,7 +2109,7 @@ void PrintFontManager::initialize()
clock_t aStep3;
int nBuiltinFonts = 0;
int nCached = 0;
-
+
struct tms tms;
aStart = times( &tms );
@@ -2135,7 +2135,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;
@@ -2219,7 +2219,7 @@ void PrintFontManager::initialize()
priv_dir != m_aPrivateFontDirectories.end() && *priv_dir != nDirID;
++priv_dir )
;
-
+
if( priv_dir == m_aPrivateFontDirectories.end() )
{
ByteString aGccDummy( aPath );
@@ -2239,7 +2239,7 @@ void PrintFontManager::initialize()
}
}
}
-
+
int nDirFonts = 0;
while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pEntry ) && pEntry )
{
@@ -2308,7 +2308,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
@@ -2413,7 +2413,7 @@ void PrintFontManager::initialize()
#endif
m_pFontCache->flush();
-
+
#ifdef CALLGRIND_COMPILE
CALLGRIND_DUMP_STATS();
CALLGRIND_TOGGLE_COLLECT();
@@ -2456,7 +2456,7 @@ namespace {
weight::type eWeight;
pitch::type ePitch;
rtl_TextEncoding aEncoding;
-
+
BuiltinFontIdentifier( const OUString& rFam,
italic::type eIt,
weight::type eWg,
@@ -2468,7 +2468,7 @@ namespace {
ePitch( ePt ),
aEncoding( enc )
{}
-
+
bool operator==( const BuiltinFontIdentifier& rRight ) const
{
return equalItalic( eItalic, rRight.eItalic ) &&
@@ -2478,7 +2478,7 @@ namespace {
aFamily.equalsIgnoreAsciiCase( rRight.aFamily );
}
};
-
+
struct BuiltinFontIdentifierHash
{
size_t operator()( const BuiltinFontIdentifier& rFont ) const
@@ -2492,7 +2492,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,
@@ -2508,7 +2508,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 )
{
@@ -2530,7 +2530,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 ) ) );
@@ -3167,7 +3167,7 @@ bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal
pArray[ code - minCharacter ] = it->second;
}
} while( code++ != maxCharacter );
-
+
return true;
}
@@ -3274,9 +3274,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() );
}
@@ -3292,10 +3292,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
@@ -3421,7 +3421,7 @@ bool PrintFontManager::changeFontProperties( fontID nFontID, const ::rtl::OUStri
getFontAttributesFromXLFD( pFont, aDummyList );
pFont->m_bUserOverride = true;
m_pFontCache->updateFontCacheEntry( pFont, true );
-
+
return true;
}
@@ -3723,8 +3723,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,
@@ -3831,7 +3831,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 )
{
@@ -3944,7 +3944,7 @@ bool PrintFontManager::readOverrideMetrics()
UNO_QUERY );
if( !xMat.is() )
return false;
-
+
Any aAny( xMat->getMaterial() );
Sequence< Any > aOverrideFonts;
if( ! (aAny >>= aOverrideFonts ) )
@@ -4080,7 +4080,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
{
@@ -4088,7 +4088,7 @@ bool PrintFontManager::readOverrideMetrics()
delete pFont;
}
}
-
+
return true;
}
diff --git a/vcl/unx/source/fontmanager/helper.cxx b/vcl/unx/source/fontmanager/helper.cxx
index e81f36e790cf..155998472bdd 100644
--- a/vcl/unx/source/fontmanager/helper.cxx
+++ b/vcl/unx/source/fontmanager/helper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -107,7 +107,7 @@ OUString getOfficePath( enum whichOfficePath ePath )
static OString getEnvironmentPath( const char* pKey )
{
OString aPath;
-
+
const char* pValue = getenv( pKey );
if( pValue && *pValue )
{
@@ -122,9 +122,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() )
@@ -169,7 +169,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 )
{
@@ -202,7 +202,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 ) );
@@ -369,7 +369,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 6732f4253332..bc35b290875a 100644
--- a/vcl/unx/source/fontmanager/parseAFM.cxx
+++ b/vcl/unx/source/fontmanager/parseAFM.cxx
@@ -3,20 +3,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.
* ************************************************************************
*/
@@ -47,13 +47,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.
*
@@ -108,7 +108,7 @@ class FileInputStream
public:
FileInputStream( const char* pFilename );
~FileInputStream();
-
+
int getChar() { return (m_nPos < m_nLen) ? int(m_pMemory[m_nPos++]) : -1; }
void ungetChar()
{
@@ -149,18 +149,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.
*/
@@ -180,16 +180,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
@@ -200,7 +200,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,
@@ -209,7 +209,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,
@@ -238,7 +238,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,
@@ -247,7 +247,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,
@@ -276,7 +276,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 )
{
@@ -289,7 +289,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 */
@@ -307,15 +307,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;
@@ -327,7 +327,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.
*
@@ -339,7 +339,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 */
@@ -348,34 +348,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 */
@@ -383,15 +383,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;
@@ -417,15 +417,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 );
@@ -439,14 +439,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);
@@ -454,11 +454,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);
@@ -533,7 +533,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 */
@@ -543,38 +543,38 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
break;
} /* switch */
} /* while */
-
+
return(error);
-
-} /* parseGlobals */
+
+} /* parseGlobals */
/************************* 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);
@@ -585,19 +585,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
@@ -631,15 +631,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;
@@ -651,21 +651,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 )
@@ -684,7 +684,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 );
}
@@ -702,7 +702,7 @@ enlargeCount( unsigned int n_oldcount )
if (n_oldcount == n_newcount )
n_newcount = n_oldcount + 5;
- return n_newcount;
+ return n_newcount;
}
/************************* parseCharMetrics ************************/
@@ -714,21 +714,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);
@@ -741,17 +741,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)
@@ -769,8 +769,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 ]);
}
@@ -795,20 +795,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)
@@ -821,14 +821,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);
@@ -837,60 +837,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;
@@ -923,7 +923,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) );
}
@@ -961,44 +961,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;
@@ -1031,7 +1031,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)
@@ -1055,7 +1055,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)
@@ -1088,43 +1088,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);
@@ -1137,7 +1137,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)
@@ -1175,7 +1175,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)
@@ -1227,27 +1227,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.
@@ -1257,41 +1257,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 */
@@ -1299,26 +1299,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);
}
}
@@ -1326,15 +1326,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);
@@ -1356,11 +1356,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 */
@@ -1371,11 +1371,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 */
@@ -1384,18 +1384,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;
@@ -1407,15 +1407,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 0c390bd8cf8d..11abc82d45b6 100644
--- a/vcl/unx/source/fontmanager/parseAFM.hxx
+++ b/vcl/unx/source/fontmanager/parseAFM.hxx
@@ -3,20 +3,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.
* ************************************************************************
*/
@@ -41,23 +41,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
@@ -66,22 +66,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
@@ -113,27 +113,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.
*/
@@ -143,16 +143,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 */
@@ -161,12 +161,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 */
@@ -198,15 +198,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
{
@@ -221,19 +221,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;
@@ -242,11 +242,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;
@@ -258,10 +258,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
{
@@ -271,15 +271,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
{
@@ -296,9 +296,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 */
@@ -317,7 +317,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.
@@ -329,7 +329,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 c46aa5bbe751..a1b43fe74803 100644
--- a/vcl/unx/source/gdi/cdeint.cxx
+++ b/vcl/unx/source/gdi/cdeint.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +74,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,
@@ -124,7 +124,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;
@@ -134,7 +134,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() );
@@ -163,12 +163,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() );
}
}
@@ -178,14 +178,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 );
@@ -200,13 +200,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 e9c2f51698a7..0eb07fbc9a13 100644
--- a/vcl/unx/source/gdi/dtint.cxx
+++ b/vcl/unx/source/gdi/dtint.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7973758d9f0d..eb5f8f5bc86f 100644
--- a/vcl/unx/source/gdi/dtsetenum.hxx
+++ b/vcl/unx/source/gdi/dtsetenum.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 a0ac583cb39d..750687b4e2bb 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -153,7 +153,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;
// ---------------------------------------------------------------------------
@@ -517,7 +517,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 ) {
@@ -643,7 +643,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 b634659876bd..84fe101214e2 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 0c4650a88dcc..29f7ebad7e87 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,29 +63,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) :
@@ -110,17 +110,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:
@@ -201,7 +201,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);
}
@@ -391,7 +391,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 )
{
@@ -566,8 +566,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();
}
//--------------------------------------------------------------------------
@@ -655,19 +655,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 )
@@ -678,9 +678,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;
}
@@ -699,7 +699,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();
@@ -796,7 +796,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
@@ -895,19 +895,19 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
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;
}
}
@@ -924,9 +924,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;
}
}
@@ -1092,9 +1092,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 );
@@ -1124,8 +1124,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);
@@ -1184,13 +1184,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" );
@@ -1203,17 +1203,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;
@@ -1225,9 +1225,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;
@@ -1239,10 +1239,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;
@@ -1255,12 +1255,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;
@@ -1482,7 +1482,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 ec00e0e1fc2e..7c14c7221892 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +65,8 @@ SalBitmap* X11SalInstance::CreateSalBitmap()
return new X11SalBitmap();
}
-ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
-ULONG X11SalBitmap::mnCacheInstCount = 0;
+ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
+ULONG X11SalBitmap::mnCacheInstCount = 0;
// -----------------------------------------------------------------------------
@@ -141,13 +141,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
@@ -200,9 +200,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
@@ -210,16 +210,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;
@@ -312,7 +312,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
for( USHORT i = 0; i < 256; i++ )
{
- BitmapColor& rBmpCol = rPal[ i ];
+ BitmapColor& rBmpCol = rPal[ i ];
rBmpCol.SetRed( i );
rBmpCol.SetGreen( i );
@@ -330,8 +330,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 ) );
@@ -351,7 +351,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;
@@ -361,17 +361,17 @@ 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(),
mbGrey );
}
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;
@@ -382,10 +382,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 )
{
@@ -453,7 +453,7 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
for( USHORT i = 0; i < 256; i++ )
{
- BitmapColor& rBmpCol = (*pPal)[ i ];
+ BitmapColor& rBmpCol = (*pPal)[ i ];
rBmpCol.SetRed( i );
rBmpCol.SetGreen( i );
@@ -470,8 +470,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 ) );
@@ -504,7 +504,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();
@@ -578,7 +578,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,
@@ -595,22 +595,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 ) )
@@ -623,8 +623,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(),
mbGrey );
}
@@ -686,7 +686,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable,
}
}
- XImage* pImage = ImplCreateXImage( GetX11SalData()->GetDisplay(), nScreen,
+ XImage* pImage = ImplCreateXImage( GetX11SalData()->GetDisplay(), nScreen,
nDrawableDepth, aTwoRect );
if( pImage )
@@ -706,9 +706,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 );
@@ -755,7 +755,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 ) ||
@@ -903,19 +903,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;
@@ -940,9 +940,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;
@@ -976,14 +976,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;
@@ -1044,7 +1044,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 );
@@ -1054,12 +1054,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 )
{
@@ -1079,9 +1079,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 ) {}
@@ -1106,7 +1106,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 f757f3fc0ab3..ca8deb058b90 100644
--- a/vcl/unx/source/gdi/salcvt.cxx
+++ b/vcl/unx/source/gdi/salcvt.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +53,7 @@ SalConverterCache::~SalConverterCache()
#include <stdio.h>
// <---
-rtl_UnicodeToTextConverter
+rtl_UnicodeToTextConverter
SalConverterCache::GetU2TConverter( rtl_TextEncoding nEncoding )
{
if( rtl_isOctetTextEncoding( nEncoding ) )
@@ -61,7 +61,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 )
@@ -73,7 +73,7 @@ if ( rConverter.mpU2T == NULL )
return NULL;
}
-rtl_TextToUnicodeConverter
+rtl_TextToUnicodeConverter
SalConverterCache::GetT2UConverter( rtl_TextEncoding nEncoding )
{
if( rtl_isOctetTextEncoding( nEncoding ) )
@@ -81,7 +81,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 )
@@ -107,15 +107,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;
}
@@ -123,7 +123,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;
@@ -141,120 +141,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:
@@ -268,7 +268,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)
@@ -278,7 +278,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;
@@ -296,27 +296,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);
@@ -328,10 +328,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 0c4b1bd3f953..7689ffeedd94 100644
--- a/vcl/unx/source/gdi/salcvt.hxx
+++ b/vcl/unx/source/gdi/salcvt.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,40 +34,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 ),
@@ -84,7 +84,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 9ad8854c59dd..2c275ca36a15 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +65,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]; }
};
@@ -98,19 +98,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 )
@@ -119,42 +119,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;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -169,21 +169,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;
@@ -217,22 +217,22 @@ 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 )
{
- m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
+ m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen);
m_nScreen = nScreen;
SetDrawable( aTarget, nScreen );
- bWindow_ = TRUE;
- m_pFrame = pFrame;
- m_pVDev = NULL;
+ bWindow_ = TRUE;
+ m_pFrame = pFrame;
+ m_pVDev = NULL;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -251,8 +251,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;
@@ -265,8 +265,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 );
}
@@ -280,9 +280,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,
@@ -311,10 +311,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,
@@ -368,7 +368,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
@@ -424,8 +424,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 )
{
@@ -471,11 +471,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 )
{
@@ -492,9 +492,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;
@@ -507,7 +507,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 )
@@ -520,12 +520,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
@@ -570,18 +570,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;
}
}
@@ -600,13 +600,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;
}
@@ -620,16 +620,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_ );
@@ -642,8 +642,8 @@ void X11SalGraphics::SetLineColor()
{
if( nPenColor_ != SALCOLOR_NONE )
{
- nPenColor_ = SALCOLOR_NONE;
- bPenGC_ = FALSE;
+ nPenColor_ = SALCOLOR_NONE;
+ bPenGC_ = FALSE;
}
}
@@ -652,9 +652,9 @@ void X11SalGraphics::SetLineColor( SalColor nSalColor )
{
if( nPenColor_ != nSalColor )
{
- nPenColor_ = nSalColor;
- nPenPixel_ = GetPixel( nSalColor );
- bPenGC_ = FALSE;
+ nPenColor_ = nSalColor;
+ nPenPixel_ = GetPixel( nSalColor );
+ bPenGC_ = FALSE;
}
}
@@ -663,9 +663,9 @@ void X11SalGraphics::SetFillColor()
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- bDitherBrush_ = FALSE;
- nBrushColor_ = SALCOLOR_NONE;
- bBrushGC_ = FALSE;
+ bDitherBrush_ = FALSE;
+ nBrushColor_ = SALCOLOR_NONE;
+ bBrushGC_ = FALSE;
}
}
@@ -674,9 +674,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
@@ -696,7 +696,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;
}
}
@@ -715,8 +715,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;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -734,9 +734,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;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -744,15 +744,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;
}
}
@@ -768,7 +768,7 @@ void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
if( nSalColor != SALCOLOR_NONE )
{
Display *pDisplay = GetXDisplay();
-
+
if( (nPenColor_ == SALCOLOR_NONE) && !bPenGC_ )
{
SetLineColor( nSalColor );
@@ -779,12 +779,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_ );
}
@@ -839,7 +839,7 @@ void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool b
if( nPenColor_ != 0xFFFFFFFF )
{
SalPolyLine Points( nPoints, pPtAry );
-
+
DrawLines( nPoints, Points, SelectPen(), bClose );
}
}
@@ -849,7 +849,7 @@ void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
{
if( nPoints == 0 )
return;
-
+
if( nPoints < 3 )
{
if( !bXORMode_ )
@@ -862,9 +862,9 @@ void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
}
return;
}
-
+
SalPolyLine Points( nPoints, pPtAry );
-
+
nPoints++;
/* WORKAROUND: some Xservers (Xorg, VIA chipset in this case)
@@ -898,29 +898,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] );
@@ -936,24 +936,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 );
@@ -988,7 +988,7 @@ void X11SalGraphics::invert( ULONG nPoints,
SalInvert nFlags )
{
SalPolyLine Points ( nPoints, pPtAry );
-
+
GC pGC;
if( SAL_INVERT_50 & nFlags )
pGC = GetInvert50GC();
@@ -997,7 +997,7 @@ void X11SalGraphics::invert( ULONG nPoints,
pGC = GetTrackingGC();
else
pGC = GetInvertGC();
-
+
if( SAL_INVERT_TRACKFRAME & nFlags )
DrawLines ( nPoints, Points, pGC, true );
else
@@ -1024,17 +1024,9 @@ XID X11SalGraphics::GetXRenderPicture()
if( !m_aRenderPicture )
{
// check xrender support for matching visual
- // find a XRenderPictFormat compatible with the Drawable
XRenderPictFormat* pVisualFormat = static_cast<XRenderPictFormat*>(GetXRenderFormat());
if( !pVisualFormat )
- {
- Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
- pVisualFormat = rRenderPeer.FindVisualFormat( pVisual );
- if( !pVisualFormat )
- return 0;
- // cache the XRenderPictFormat
- SetXRenderFormat( static_cast<void*>(pVisualFormat) );
- }
+ return 0;
// get the matching xrender target for drawable
m_aRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL );
@@ -1051,6 +1043,13 @@ XID X11SalGraphics::GetXRenderPicture()
return m_aRenderPicture;
}
+void* X11SalGraphics::GetXRenderFormat() const
+{
+ if( m_pRenderFormat == NULL )
+ const_cast<X11SalGraphics*>(this)->m_pRenderFormat = XRenderPeer::GetInstance().FindVisualFormat( GetVisual().visual );
+ return m_pRenderFormat;
+}
+
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SystemGraphicsData X11SalGraphics::GetGraphicsData() const
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
index 30094d46be52..7ce8c39836d5 100644
--- a/vcl/unx/source/gdi/salgdi2.cxx
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,12 +53,12 @@
// -----------------------------------------------------------------------------
#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 )
@@ -115,14 +115,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 );
}
@@ -183,12 +183,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
@@ -207,8 +207,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(),
@@ -349,7 +349,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 )
{
@@ -370,12 +370,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 );
@@ -387,7 +387,7 @@ GC X11SalGraphics::SetMask( int &nX,
// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-extern "C"
+extern "C"
{
static Bool GraphicsExposePredicate( Display*, XEvent* pEvent, XPointer pFrameWindow )
{
@@ -446,12 +446,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
@@ -459,7 +459,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
{
return;
}
-
+
int n;
if( pSrcGraphics == this )
{
@@ -486,9 +486,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
)
{
@@ -496,7 +496,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;
@@ -506,7 +506,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() );
@@ -518,17 +518,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 );
@@ -536,16 +536,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 );
@@ -570,18 +570,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 {
@@ -597,17 +597,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 );
}
@@ -615,14 +615,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
@@ -630,9 +630,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 );
@@ -672,23 +672,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 );
@@ -702,14 +702,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_ )
{
@@ -717,10 +717,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 );
@@ -729,30 +729,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 );
}
@@ -768,7 +768,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;
@@ -876,7 +876,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,
@@ -890,29 +890,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,
@@ -936,30 +936,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 ) );
@@ -978,7 +978,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
{
if( bPrinter_ && !bVirDev_ )
return NULL;
-
+
bool bFakeWindowBG = false;
// normalize
@@ -994,9 +994,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;
@@ -1019,7 +1019,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 )
{
@@ -1029,13 +1029,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
@@ -1050,7 +1050,7 @@ SalColor X11SalGraphics::getPixel( long nX, long nY )
if( bWindow_ && !bVirDev_ )
{
XWindowAttributes aAttrib;
-
+
XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib );
if( aAttrib.map_state != IsViewable )
{
@@ -1058,7 +1058,7 @@ SalColor X11SalGraphics::getPixel( long nX, long nY )
return 0;
}
}
-
+
XImage *pXImage = XGetImage( GetXDisplay(),
GetDrawable(),
nX, nY,
@@ -1070,21 +1070,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 )
@@ -1117,10 +1117,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 fa0f695dee8b..d4300a21bb43 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -135,10 +135,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:
@@ -154,18 +154,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;
@@ -174,7 +174,7 @@ class FontLookup
return *this;
}
- size_t Hash() const
+ size_t Hash() const
{
return maName.hashCode ();
}
@@ -234,14 +234,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;
@@ -340,7 +340,7 @@ SalDisplay::GetXlfdList() const
//
BitmapXlfdStorage aBitmapList;
- ScalableXlfd *pScalableFont = NULL;
+ ScalableXlfd *pScalableFont = NULL;
int nFrom = 0;
for ( i = 0; i < nXlfdCount; i++ )
@@ -351,7 +351,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 ) )
@@ -546,10 +546,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_,
@@ -620,7 +620,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;
@@ -641,7 +641,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_ )
{
@@ -758,7 +758,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 *);
@@ -791,7 +791,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); }
@@ -832,7 +832,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;
@@ -841,7 +841,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;
@@ -854,11 +854,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" );
@@ -889,7 +889,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 &&
@@ -969,7 +969,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 ); )
@@ -986,14 +986,6 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
// find a XRenderPictFormat compatible with the Drawable
XRenderPictFormat* pVisualFormat = static_cast<XRenderPictFormat*>(GetXRenderFormat());
- if( !pVisualFormat )
- {
- Visual* pVisual = GetDisplay()->GetVisual( m_nScreen ).GetVisual();
- pVisualFormat = XRenderPeer::GetInstance().FindVisualFormat( pVisual );
- // cache the XRenderPictFormat
- SetXRenderFormat( static_cast<void*>(pVisualFormat) );
- }
-
DBG_ASSERT( pVisualFormat!=NULL, "no matching XRenderPictFormat for text" );
if( !pVisualFormat )
return;
@@ -1021,8 +1013,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);
@@ -1030,8 +1022,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);
@@ -1107,7 +1099,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_ ) )
@@ -1472,7 +1464,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;
@@ -1528,7 +1520,7 @@ USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
void
X11SalGraphics::SetTextColor( SalColor nSalColor )
{
- if( nTextColor_ != nSalColor )
+ if( nTextColor_ != nSalColor )
{
nTextColor_ = nSalColor;
nTextPixel_ = GetPixel( nSalColor );
@@ -1630,7 +1622,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 +1873,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 +1884,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const
aSysFontData.bAntialias = rFont->GetAntialiasAdvice();
aSysFontData.bVerticalCharacterType = rFont->GetFontSelData().mbVertical;
}
-
+
return aSysFontData;
}
@@ -2020,7 +2012,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
}
@@ -2066,16 +2058,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;
}
@@ -2086,15 +2078,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 136bb753d219..f1fcabb9ec23 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,12 +66,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&);
@@ -104,16 +104,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" );
@@ -126,31 +126,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;
}
}
@@ -161,9 +161,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;
@@ -174,11 +174,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" ) ) );
@@ -369,13 +369,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
@@ -391,16 +391,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" ) )
@@ -459,11 +459,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 )
@@ -604,7 +604,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 );
@@ -613,8 +613,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 );
@@ -649,7 +649,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
return SetData( ~0, pJobSetup );
copyJobDataToJobSetup( pJobSetup, m_aJobData );
-
+
return TRUE;
}
@@ -677,13 +677,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;
@@ -696,7 +696,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 )
@@ -707,7 +707,7 @@ BOOL PspSalInfoPrinter::SetData(
TenMuToPt( aInfo.getHeight() ) );
pValue = pKey->getValueCaseInsensitive( aPaper );
}
-
+
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
return FALSE;
}
@@ -810,12 +810,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;
}
}
@@ -904,7 +904,7 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
// =======================================================================
/*
- * SalPrinter
+ * SalPrinter
*/
PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter )
@@ -946,11 +946,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 );
@@ -1002,7 +1002,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 =
@@ -1132,14 +1132,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 c883acfa1973..ac1a03cf5afe 100644
--- a/vcl/unx/source/gdi/salvd.cxx
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,7 +99,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();
@@ -112,18 +112,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;
@@ -142,7 +142,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;
@@ -221,7 +221,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
@@ -261,7 +261,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 e383e779aad8..a999eaf7213b 100644
--- a/vcl/unx/source/gdi/xfont.cxx
+++ b/vcl/unx/source/gdi/xfont.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +47,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
@@ -239,24 +239,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!!!
@@ -550,7 +550,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 eb6dc6372718..787832e5978c 100644
--- a/vcl/unx/source/gdi/xlfd_attr.cxx
+++ b/vcl/unx/source/gdi/xlfd_attr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -175,10 +175,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;
}
@@ -191,7 +191,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;
}
@@ -206,14 +206,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;
@@ -238,76 +238,76 @@ Attribute::TagFeature( unsigned short nFeature )
#define InitializeAttributeWith( p, a ) p, sizeof(p) - 1, a, 0, NULL, NULL
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 ) }
};
// -------------------------------------------------------------------------
@@ -334,7 +334,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 18386a314e4b..dbeed8228cd7 100644
--- a/vcl/unx/source/gdi/xlfd_attr.hxx
+++ b/vcl/unx/source/gdi/xlfd_attr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,39 +34,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();
};
@@ -79,14 +79,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
@@ -106,28 +106,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
};
@@ -161,20 +161,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
@@ -194,34 +194,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 6d691de88a79..1629d132d669 100644
--- a/vcl/unx/source/gdi/xlfd_extd.cxx
+++ b/vcl/unx/source/gdi/xlfd_extd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,12 +78,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;
}
@@ -272,9 +272,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 );
}
@@ -283,9 +283,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 );
}
@@ -853,7 +853,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 ];
@@ -881,7 +881,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 ];
@@ -912,7 +912,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 306b9be74967..70b661ec19ef 100644
--- a/vcl/unx/source/gdi/xlfd_extd.hxx
+++ b/vcl/unx/source/gdi/xlfd_extd.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +58,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;
@@ -89,28 +89,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;
};
@@ -120,11 +120,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;
@@ -141,22 +141,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
@@ -167,12 +167,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;
@@ -186,11 +186,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:
@@ -205,7 +205,7 @@ class BitmapXlfdStorage : public XlfdStorage {
public:
- void AddBitmapFont( const Xlfd *pXlfd );
+ void AddBitmapFont( const Xlfd *pXlfd );
};
@@ -215,17 +215,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;
@@ -233,15 +233,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 d9100a794c72..f03eb38d63d2 100644
--- a/vcl/unx/source/gdi/xlfd_smpl.cxx
+++ b/vcl/unx/source/gdi/xlfd_smpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,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;
@@ -174,7 +174,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-*
@@ -241,9 +241,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 a412d332fd9b..636e1b85a370 100644
--- a/vcl/unx/source/gdi/xlfd_smpl.hxx
+++ b/vcl/unx/source/gdi/xlfd_smpl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,28 +43,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
@@ -75,14 +75,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 533836e2e5d0..7558a81e1d1b 100644
--- a/vcl/unx/source/gdi/xrender_peer.cxx
+++ b/vcl/unx/source/gdi/xrender_peer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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 f9417bb2be95..2a168ab4d28a 100644
--- a/vcl/unx/source/gdi/xrender_peer.hxx
+++ b/vcl/unx/source/gdi/xrender_peer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ public:
int GetVersion() const;
sal_uInt32 InitRenderText();
-
+
protected:
XRenderPeer();
~XRenderPeer();
@@ -282,7 +282,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 3a5555f34384..c70a0cd4f39f 100644
--- a/vcl/unx/source/inc/airbrush_curs.h
+++ b/vcl/unx/source/inc/airbrush_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 35e55b834f77..38d50e81b94a 100644
--- a/vcl/unx/source/inc/airbrush_mask.h
+++ b/vcl/unx/source/inc/airbrush_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 bd968c4e6f17..5bf1472a7a5e 100644
--- a/vcl/unx/source/inc/ase_curs.h
+++ b/vcl/unx/source/inc/ase_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6f765158c400..2d83538505b1 100644
--- a/vcl/unx/source/inc/ase_mask.h
+++ b/vcl/unx/source/inc/ase_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
************************************************************************/
#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 81f5b0bfee63..322ec226dff1 100644
--- a/vcl/unx/source/inc/asn_curs.h
+++ b/vcl/unx/source/inc/asn_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 10f6fb7ff0c9..ebdd59e136a7 100644
--- a/vcl/unx/source/inc/asn_mask.h
+++ b/vcl/unx/source/inc/asn_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 f01ca8814b76..a5cdbe5a019a 100644
--- a/vcl/unx/source/inc/asne_curs.h
+++ b/vcl/unx/source/inc/asne_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 62fc2d1c94e6..2761eac9d684 100644
--- a/vcl/unx/source/inc/asne_mask.h
+++ b/vcl/unx/source/inc/asne_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 db0ff615e309..8f102f2f8ba2 100644
--- a/vcl/unx/source/inc/asns_curs.h
+++ b/vcl/unx/source/inc/asns_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 2d8c689c64a8..674b37a2d1c5 100644
--- a/vcl/unx/source/inc/asns_mask.h
+++ b/vcl/unx/source/inc/asns_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 276d1dbce8ce..773b68b9d3d0 100644
--- a/vcl/unx/source/inc/asnswe_curs.h
+++ b/vcl/unx/source/inc/asnswe_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6e1f22650b1e..42071557d712 100644
--- a/vcl/unx/source/inc/asnswe_mask.h
+++ b/vcl/unx/source/inc/asnswe_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 706e021463c9..6bcb38e67209 100644
--- a/vcl/unx/source/inc/asnw_curs.h
+++ b/vcl/unx/source/inc/asnw_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 189dab48fc82..5a55eb990475 100644
--- a/vcl/unx/source/inc/asnw_mask.h
+++ b/vcl/unx/source/inc/asnw_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 f7cd7e7d5110..583c6c32cb47 100644
--- a/vcl/unx/source/inc/ass_curs.h
+++ b/vcl/unx/source/inc/ass_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6ac71c7b32a5..18131ff1532d 100644
--- a/vcl/unx/source/inc/ass_mask.h
+++ b/vcl/unx/source/inc/ass_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1dd325ac0606..d1b1342d2340 100644
--- a/vcl/unx/source/inc/asse_curs.h
+++ b/vcl/unx/source/inc/asse_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7685aaa21c17..7e03b04cd700 100644
--- a/vcl/unx/source/inc/asse_mask.h
+++ b/vcl/unx/source/inc/asse_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1f8d53ff9b72..d3a833a44747 100644
--- a/vcl/unx/source/inc/assw_curs.h
+++ b/vcl/unx/source/inc/assw_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 243c62c25e10..c6ea8944492c 100644
--- a/vcl/unx/source/inc/assw_mask.h
+++ b/vcl/unx/source/inc/assw_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 80f741496bae..996f65930a71 100644
--- a/vcl/unx/source/inc/asw_curs.h
+++ b/vcl/unx/source/inc/asw_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 18765d5fc452..54629e5af5fb 100644
--- a/vcl/unx/source/inc/asw_mask.h
+++ b/vcl/unx/source/inc/asw_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b2965e42f4a2..7e897617f55e 100644
--- a/vcl/unx/source/inc/aswe_curs.h
+++ b/vcl/unx/source/inc/aswe_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 76c73193d35f..6b67f2a98ed1 100644
--- a/vcl/unx/source/inc/aswe_mask.h
+++ b/vcl/unx/source/inc/aswe_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 77a1dd23d664..ecc5c8dd5135 100644
--- a/vcl/unx/source/inc/chain_curs.h
+++ b/vcl/unx/source/inc/chain_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 e06b038d19be..f34a2ae4409e 100644
--- a/vcl/unx/source/inc/chain_mask.h
+++ b/vcl/unx/source/inc/chain_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ae695e69fd85..de93553e8ec6 100644
--- a/vcl/unx/source/inc/chainnot_curs.h
+++ b/vcl/unx/source/inc/chainnot_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b5311f762fec..5e5841e4032a 100644
--- a/vcl/unx/source/inc/chainnot_mask.h
+++ b/vcl/unx/source/inc/chainnot_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 9210452713cf..73ce584c67fc 100644
--- a/vcl/unx/source/inc/chart_curs.h
+++ b/vcl/unx/source/inc/chart_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b8cf5a69f889..8059d16dd15e 100644
--- a/vcl/unx/source/inc/chart_mask.h
+++ b/vcl/unx/source/inc/chart_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b7cb1557c7a3..3f2bb060d56c 100644
--- a/vcl/unx/source/inc/copydata_curs.h
+++ b/vcl/unx/source/inc/copydata_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 d0cd40bc78fd..3f2009d72322 100644
--- a/vcl/unx/source/inc/copydata_mask.h
+++ b/vcl/unx/source/inc/copydata_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 8b3418ce7336..449d51f1f676 100644
--- a/vcl/unx/source/inc/copydlnk_curs.h
+++ b/vcl/unx/source/inc/copydlnk_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 3ad9e0a1b1e7..9c8a260cbfe6 100644
--- a/vcl/unx/source/inc/copydlnk_mask.h
+++ b/vcl/unx/source/inc/copydlnk_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7ea2cb393944..14f544f433bf 100644
--- a/vcl/unx/source/inc/copyfile_curs.h
+++ b/vcl/unx/source/inc/copyfile_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 200d280c8cd8..c0c083f878bd 100644
--- a/vcl/unx/source/inc/copyfile_mask.h
+++ b/vcl/unx/source/inc/copyfile_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 4842d5fe72ad..5921ebaf6678 100644
--- a/vcl/unx/source/inc/copyfiles_curs.h
+++ b/vcl/unx/source/inc/copyfiles_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b1cbb4a10032..cdbc70bc710c 100644
--- a/vcl/unx/source/inc/copyfiles_mask.h
+++ b/vcl/unx/source/inc/copyfiles_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 def45ab47a8b..e5f5bd341729 100644
--- a/vcl/unx/source/inc/copyflnk_curs.h
+++ b/vcl/unx/source/inc/copyflnk_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ac05eaa13a64..8ccb93b2433b 100644
--- a/vcl/unx/source/inc/copyflnk_mask.h
+++ b/vcl/unx/source/inc/copyflnk_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5cb4874c219f..25d61a366296 100644
--- a/vcl/unx/source/inc/crook_curs.h
+++ b/vcl/unx/source/inc/crook_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 97b47601ebe5..b1c099e6979c 100644
--- a/vcl/unx/source/inc/crook_mask.h
+++ b/vcl/unx/source/inc/crook_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 3e8424657453..d1e07fd7aaa7 100644
--- a/vcl/unx/source/inc/crop_curs.h
+++ b/vcl/unx/source/inc/crop_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 84c37341918c..b416c7731999 100644
--- a/vcl/unx/source/inc/crop_mask.h
+++ b/vcl/unx/source/inc/crop_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 181b6e0d3e28..d84592854ae3 100644
--- a/vcl/unx/source/inc/detective_curs.h
+++ b/vcl/unx/source/inc/detective_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 db93906579a4..ec314697324b 100644
--- a/vcl/unx/source/inc/detective_mask.h
+++ b/vcl/unx/source/inc/detective_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1db1b3a61840..48562f6a2b8d 100644
--- a/vcl/unx/source/inc/drawarc_curs.h
+++ b/vcl/unx/source/inc/drawarc_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 9c5ddd61b471..f811c864ae26 100644
--- a/vcl/unx/source/inc/drawarc_mask.h
+++ b/vcl/unx/source/inc/drawarc_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ad96981c9bb3..5ee9d146e49c 100644
--- a/vcl/unx/source/inc/drawbezier_curs.h
+++ b/vcl/unx/source/inc/drawbezier_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 791d170d4045..b71477f1c366 100644
--- a/vcl/unx/source/inc/drawbezier_mask.h
+++ b/vcl/unx/source/inc/drawbezier_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 45d14a75d18a..8ab9c97569ac 100644
--- a/vcl/unx/source/inc/drawcaption_curs.h
+++ b/vcl/unx/source/inc/drawcaption_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 87c6ff83916c..f0c01d40531f 100644
--- a/vcl/unx/source/inc/drawcaption_mask.h
+++ b/vcl/unx/source/inc/drawcaption_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1554aeb08090..6d01943f2ecf 100644
--- a/vcl/unx/source/inc/drawcirclecut_curs.h
+++ b/vcl/unx/source/inc/drawcirclecut_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 3e5ebe03e164..34c0c246c885 100644
--- a/vcl/unx/source/inc/drawcirclecut_mask.h
+++ b/vcl/unx/source/inc/drawcirclecut_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 2f657f1ba426..d8167c259958 100644
--- a/vcl/unx/source/inc/drawconnect_curs.h
+++ b/vcl/unx/source/inc/drawconnect_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6b48aa5c8945..8538c130f4c7 100644
--- a/vcl/unx/source/inc/drawconnect_mask.h
+++ b/vcl/unx/source/inc/drawconnect_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 8af64195ed51..8f51e4259549 100644
--- a/vcl/unx/source/inc/drawcrook_curs.h
+++ b/vcl/unx/source/inc/drawcrook_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 037889ade041..35dd1f0025c4 100644
--- a/vcl/unx/source/inc/drawcrook_mask.h
+++ b/vcl/unx/source/inc/drawcrook_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 e356a91102d5..f391767f5956 100644
--- a/vcl/unx/source/inc/drawcrop_curs.h
+++ b/vcl/unx/source/inc/drawcrop_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7bfb31382793..df92dc936936 100644
--- a/vcl/unx/source/inc/drawcrop_mask.h
+++ b/vcl/unx/source/inc/drawcrop_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 32d2259dc7d7..d74629025340 100644
--- a/vcl/unx/source/inc/drawellipse_curs.h
+++ b/vcl/unx/source/inc/drawellipse_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5218ac419c97..317a2555adad 100644
--- a/vcl/unx/source/inc/drawellipse_mask.h
+++ b/vcl/unx/source/inc/drawellipse_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7e577fe08940..9951b6f019b7 100644
--- a/vcl/unx/source/inc/drawfreehand_curs.h
+++ b/vcl/unx/source/inc/drawfreehand_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ed06a873d0e2..f816c3d26d4d 100644
--- a/vcl/unx/source/inc/drawfreehand_mask.h
+++ b/vcl/unx/source/inc/drawfreehand_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1d9e3f642704..d9eb9818c40f 100644
--- a/vcl/unx/source/inc/drawline_curs.h
+++ b/vcl/unx/source/inc/drawline_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b9e66306d964..6a35aad09b07 100644
--- a/vcl/unx/source/inc/drawline_mask.h
+++ b/vcl/unx/source/inc/drawline_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 4c93e574e2f6..ce9c4a2f5507 100644
--- a/vcl/unx/source/inc/drawmirror_curs.h
+++ b/vcl/unx/source/inc/drawmirror_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 cfcd0f7abf3b..d95ca93d59f1 100644
--- a/vcl/unx/source/inc/drawmirror_mask.h
+++ b/vcl/unx/source/inc/drawmirror_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 26dae0f57de8..7162700fd417 100644
--- a/vcl/unx/source/inc/drawpie_curs.h
+++ b/vcl/unx/source/inc/drawpie_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 403321f7648d..dad908d943be 100644
--- a/vcl/unx/source/inc/drawpie_mask.h
+++ b/vcl/unx/source/inc/drawpie_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 40805ec5b857..38eb036d8b13 100644
--- a/vcl/unx/source/inc/drawpolygon_curs.h
+++ b/vcl/unx/source/inc/drawpolygon_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6f8eed316e70..a1346d8c8cb6 100644
--- a/vcl/unx/source/inc/drawpolygon_mask.h
+++ b/vcl/unx/source/inc/drawpolygon_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ac5d544122fd..0b2b0b7e39d4 100644
--- a/vcl/unx/source/inc/drawrect_curs.h
+++ b/vcl/unx/source/inc/drawrect_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 03e765e0547a..d6e6d70f80c2 100644
--- a/vcl/unx/source/inc/drawrect_mask.h
+++ b/vcl/unx/source/inc/drawrect_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 d33eb6860219..645dcd51a660 100644
--- a/vcl/unx/source/inc/drawtext_curs.h
+++ b/vcl/unx/source/inc/drawtext_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5f6d4bcfa453..50e42a0dda24 100644
--- a/vcl/unx/source/inc/drawtext_mask.h
+++ b/vcl/unx/source/inc/drawtext_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 c08ae8a70f00..fe01c07c4045 100644
--- a/vcl/unx/source/inc/fill_curs.h
+++ b/vcl/unx/source/inc/fill_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5a1432dccdd1..233a506976b4 100644
--- a/vcl/unx/source/inc/fill_mask.h
+++ b/vcl/unx/source/inc/fill_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 91a89ab99a04..4d6ca8c27a93 100644
--- a/vcl/unx/source/inc/hshear_curs.h
+++ b/vcl/unx/source/inc/hshear_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 15a6e92b412c..30318acf0e49 100644
--- a/vcl/unx/source/inc/hshear_mask.h
+++ b/vcl/unx/source/inc/hshear_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 12f64dff5ce7..cac73ae30923 100644
--- a/vcl/unx/source/inc/invert50.h
+++ b/vcl/unx/source/inc/invert50.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 02d5709600a8..5c0feab91cbd 100644
--- a/vcl/unx/source/inc/linkdata_curs.h
+++ b/vcl/unx/source/inc/linkdata_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 5bf28eac1bd5..a84059c079c7 100644
--- a/vcl/unx/source/inc/linkdata_mask.h
+++ b/vcl/unx/source/inc/linkdata_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 38731cdde471..3f8cd201fead 100644
--- a/vcl/unx/source/inc/linkfile_curs.h
+++ b/vcl/unx/source/inc/linkfile_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 0b36e8a28c41..84469d8e0120 100644
--- a/vcl/unx/source/inc/linkfile_mask.h
+++ b/vcl/unx/source/inc/linkfile_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 d25680bca7ec..a830af41ed4e 100644
--- a/vcl/unx/source/inc/magnify_curs.h
+++ b/vcl/unx/source/inc/magnify_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 723a913eeb20..8dc4956bac4a 100644
--- a/vcl/unx/source/inc/magnify_mask.h
+++ b/vcl/unx/source/inc/magnify_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 6f7ea2de78f5..c5fc1099846f 100644
--- a/vcl/unx/source/inc/mirror_curs.h
+++ b/vcl/unx/source/inc/mirror_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 d39742976c93..031614243b7a 100644
--- a/vcl/unx/source/inc/mirror_mask.h
+++ b/vcl/unx/source/inc/mirror_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1c83a1f72ca0..e26fdd00fc71 100644
--- a/vcl/unx/source/inc/movebezierweight_curs.h
+++ b/vcl/unx/source/inc/movebezierweight_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 392657c42f19..7f7223c4d0fc 100644
--- a/vcl/unx/source/inc/movebezierweight_mask.h
+++ b/vcl/unx/source/inc/movebezierweight_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 cbc3b6b73c1e..cdbc15d948b9 100644
--- a/vcl/unx/source/inc/movedata_curs.h
+++ b/vcl/unx/source/inc/movedata_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 716e626f778b..a10d7eab5f51 100644
--- a/vcl/unx/source/inc/movedata_mask.h
+++ b/vcl/unx/source/inc/movedata_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 62ff813f9366..416f0727e3b8 100644
--- a/vcl/unx/source/inc/movedlnk_curs.h
+++ b/vcl/unx/source/inc/movedlnk_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 4852cbbbc4a5..7c33bb10fc71 100644
--- a/vcl/unx/source/inc/movedlnk_mask.h
+++ b/vcl/unx/source/inc/movedlnk_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7ec7075a4733..36af625a342f 100644
--- a/vcl/unx/source/inc/movefile_curs.h
+++ b/vcl/unx/source/inc/movefile_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 355b571420ea..a7954819e330 100644
--- a/vcl/unx/source/inc/movefile_mask.h
+++ b/vcl/unx/source/inc/movefile_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 a469b10dbb4f..200c178f3897 100644
--- a/vcl/unx/source/inc/movefiles_curs.h
+++ b/vcl/unx/source/inc/movefiles_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 09553289eff0..f544029308ef 100644
--- a/vcl/unx/source/inc/movefiles_mask.h
+++ b/vcl/unx/source/inc/movefiles_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 0986e445d95f..2b1071a6203c 100644
--- a/vcl/unx/source/inc/moveflnk_curs.h
+++ b/vcl/unx/source/inc/moveflnk_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 c73e4b16fc34..124e7eb2f674 100644
--- a/vcl/unx/source/inc/moveflnk_mask.h
+++ b/vcl/unx/source/inc/moveflnk_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1331b81e68aa..9dcb3a11f135 100644
--- a/vcl/unx/source/inc/movepoint_curs.h
+++ b/vcl/unx/source/inc/movepoint_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 e7355183ec2c..8e535d6970ed 100644
--- a/vcl/unx/source/inc/movepoint_mask.h
+++ b/vcl/unx/source/inc/movepoint_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 96b0c51178e6..82efb546d2f0 100644
--- a/vcl/unx/source/inc/nodrop_curs.h
+++ b/vcl/unx/source/inc/nodrop_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 b5bd992c7a4c..c3fa9cda4af4 100644
--- a/vcl/unx/source/inc/nodrop_mask.h
+++ b/vcl/unx/source/inc/nodrop_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7b771173ee44..33463804df50 100644
--- a/vcl/unx/source/inc/null_curs.h
+++ b/vcl/unx/source/inc/null_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
************************************************************************/
#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 5ac9e4df4840..bb268b4101eb 100644
--- a/vcl/unx/source/inc/null_mask.h
+++ b/vcl/unx/source/inc/null_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 751df69b53b9..edbab88c1670 100644
--- a/vcl/unx/source/inc/pivotcol_curs.h
+++ b/vcl/unx/source/inc/pivotcol_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 1792ef6962db..8641f8ad1600 100644
--- a/vcl/unx/source/inc/pivotcol_mask.h
+++ b/vcl/unx/source/inc/pivotcol_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 c1b8a8537ff9..b748cf44f546 100644
--- a/vcl/unx/source/inc/pivotdel_curs.h
+++ b/vcl/unx/source/inc/pivotdel_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 aece5f1bfd60..1ec977c4ff2e 100644
--- a/vcl/unx/source/inc/pivotdel_mask.h
+++ b/vcl/unx/source/inc/pivotdel_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 ed999caa6dcc..e6ab497e76ee 100644
--- a/vcl/unx/source/inc/pivotfld_curs.h
+++ b/vcl/unx/source/inc/pivotfld_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 99f884db83d2..78d14156ed8d 100644
--- a/vcl/unx/source/inc/pivotfld_mask.h
+++ b/vcl/unx/source/inc/pivotfld_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 d504655bd530..9e141b8613f7 100644
--- a/vcl/unx/source/inc/pivotrow_curs.h
+++ b/vcl/unx/source/inc/pivotrow_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 8599bc546d3f..8b47ce25c0a3 100644
--- a/vcl/unx/source/inc/pivotrow_mask.h
+++ b/vcl/unx/source/inc/pivotrow_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 bfaf4ab65726..e748c0bd7ef2 100644
--- a/vcl/unx/source/inc/rotate_curs.h
+++ b/vcl/unx/source/inc/rotate_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 dafb049c8b89..0bcf316a0988 100644
--- a/vcl/unx/source/inc/rotate_mask.h
+++ b/vcl/unx/source/inc/rotate_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 997b94c90054..1aeaa5b317bd 100644
--- a/vcl/unx/source/inc/salcursors.h
+++ b/vcl/unx/source/inc/salcursors.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 c9f9c771ada3..86f0991c5c84 100644
--- a/vcl/unx/source/inc/timemove_curs.h
+++ b/vcl/unx/source/inc/timemove_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 3176258df95d..b3a38cd9ecdd 100644
--- a/vcl/unx/source/inc/timemove_mask.h
+++ b/vcl/unx/source/inc/timemove_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7e75b3e4c95b..b9aa36dd0e18 100644
--- a/vcl/unx/source/inc/timesize_curs.h
+++ b/vcl/unx/source/inc/timesize_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 2f2de862a678..b20150507e71 100644
--- a/vcl/unx/source/inc/timesize_mask.h
+++ b/vcl/unx/source/inc/timesize_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 93767087a405..ebe103bf139d 100644
--- a/vcl/unx/source/inc/vertcurs_curs.h
+++ b/vcl/unx/source/inc/vertcurs_curs.h
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#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 a652d58b8ef3..e472f367659e 100644
--- a/vcl/unx/source/inc/vertcurs_mask.h
+++ b/vcl/unx/source/inc/vertcurs_mask.h
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#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 ba073ca64211..f9dc82f207f5 100644
--- a/vcl/unx/source/inc/vshear_curs.h
+++ b/vcl/unx/source/inc/vshear_curs.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 7a614df0b9fa..5991a8b582b1 100644
--- a/vcl/unx/source/inc/vshear_mask.h
+++ b/vcl/unx/source/inc/vshear_mask.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 0accb8def42f..54f9752b56bc 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +63,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 );
@@ -81,7 +81,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
@@ -90,9 +90,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") )
@@ -107,7 +107,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
{
pCloseModule = NULL;
}
-
+
GetSalData()->m_pPlugin = aMod;
}
else
@@ -127,7 +127,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;
}
@@ -142,7 +142,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 );
@@ -164,12 +164,12 @@ static SalInstance* autodetect_plugin()
{
"kde4", "kde", "gtk", "gen", 0
};
-
+
static const char* pStandardFallbackList[] =
{
"gtk", "gen", 0
};
-
+
static const char* pHeadlessFallbackList[] =
{
"svp", 0
@@ -178,7 +178,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;
@@ -191,12 +191,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] );
@@ -222,7 +222,7 @@ static SalInstance* check_headless_plugin()
SalInstance *CreateSalInstance()
{
- SalInstance* pInst = NULL;
+ SalInstance* pInst = NULL;
static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" );
@@ -230,10 +230,10 @@ 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 };
@@ -248,7 +248,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 fdab933a494c..26cf81d276c7 100644
--- a/vcl/unx/source/printer/cupsmgr.cxx
+++ b/vcl/unx/source/printer/cupsmgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,24 +59,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* );
@@ -119,21 +119,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 ); }
-
+
};
}
@@ -155,7 +155,7 @@ oslGenericFunction CUPSWrapper::loadSymbol( const char* pSymbol )
return pSym;
}
-CUPSWrapper::CUPSWrapper()
+CUPSWrapper::CUPSWrapper()
: m_pLib( NULL ),
m_bPPDThreadRunning( false )
{
@@ -177,51 +177,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
) )
@@ -246,14 +246,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 ),
@@ -264,13 +264,13 @@ struct GetPPDAttribs
m_nRefs = 2;
m_aCondition.reset();
}
-
+
~GetPPDAttribs()
{
if( m_aResult.getLength() )
unlink( m_aResult.getStr() );
}
-
+
void unref()
{
if( --m_nRefs == 0 )
@@ -279,7 +279,7 @@ struct GetPPDAttribs
delete this;
}
}
-
+
void executeCall()
{
// This CUPS method is not at all thread-safe we need
@@ -290,11 +290,11 @@ struct GetPPDAttribs
m_aCondition.set();
unref();
}
-
+
OString waitResult( TimeValue *pDelay )
{
m_pSyncMutex->release();
-
+
if (m_aCondition.wait( pDelay ) != Condition::result_ok
)
{
@@ -305,11 +305,11 @@ struct GetPPDAttribs
#endif
}
m_pSyncMutex->acquire();
-
+
OString aRetval = m_aResult;
m_aResult = OString();
unref();
-
+
return aRetval;
}
};
@@ -335,7 +335,7 @@ OString CUPSWrapper::cupsGetPPD( const char* pPrinter )
pPrinter,
&m_bPPDThreadRunning,
&m_aGetPPDMutex );
-
+
oslThread aThread = osl_createThread( getPPDWorker, pAttribs );
TimeValue aValue;
@@ -355,7 +355,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 );
@@ -372,7 +372,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
@@ -444,7 +444,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];
@@ -452,7 +452,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]);
@@ -464,7 +464,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;
@@ -479,7 +479,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 );
@@ -493,12 +493,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;
@@ -516,7 +516,7 @@ void CUPSManager::initialize()
if( ! (m_nDests && m_pDests ) )
return;
-
+
if( isCUPSDisabled() )
return;
@@ -538,7 +538,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();
@@ -648,8 +648,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 );
@@ -712,7 +712,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",
@@ -723,7 +723,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 );
@@ -732,18 +732,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() );
}
@@ -769,9 +769,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 );
}
@@ -820,8 +820,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
}
@@ -829,7 +829,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 );
@@ -838,7 +838,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;
@@ -847,7 +847,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(); }
};
@@ -888,7 +888,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() )
@@ -900,7 +900,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;
@@ -927,7 +927,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 )
@@ -970,7 +970,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 )
@@ -993,7 +993,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
if( bChanged )
m_bNewDests = true;
}
-
+
if( bChanged )
initialize();
@@ -1038,7 +1038,7 @@ bool CUPSManager::setDefaultPrinter( const OUString& rName )
else
#endif
bSuccess = PrinterInfoManager::setDefaultPrinter( rName );
-
+
return bSuccess;
}
@@ -1055,7 +1055,7 @@ bool CUPSManager::writePrinterConfig()
m_aCUPSDestMap.find( prt->first );
if( nit == m_aCUPSDestMap.end() )
continue;
-
+
if( ! prt->second.m_bModified )
continue;
@@ -1067,7 +1067,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++ )
{
@@ -1124,12 +1124,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 3007a80e8a58..a10d49ad8fdc 100644
--- a/vcl/unx/source/printer/jobdata.cxx
+++ b/vcl/unx/source/printer/jobdata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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 c10f8aca8664..2c589b44a9e8 100644
--- a/vcl/unx/source/printer/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,23 +71,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,
@@ -95,7 +95,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,
@@ -103,14 +103,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,
@@ -131,7 +131,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
@@ -161,7 +161,7 @@ namespace psp
aLoc.Language = aLoc.Language.toAsciiLowerCase();
aLoc.Country = aLoc.Country.toAsciiUpperCase();
aLoc.Variant = aLoc.Variant.toAsciiUpperCase();
-
+
return aLoc;
}
@@ -195,7 +195,7 @@ namespace psp
m_aTranslations[ aK ][ aLoc ] = i_rTranslation;
}
}
-
+
rtl::OUString PPDTranslator::translateValue(
const rtl::OUString& i_rKey,
const rtl::OUString& i_rOption,
@@ -204,7 +204,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() )
@@ -224,7 +224,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++ )
{
@@ -266,15 +266,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);
@@ -301,7 +301,7 @@ void PPDDecompressStream::Open( const rtl::OUString& i_rFile )
mpFileStream = new SvFileStream( i_rFile, STREAM_READ );
maFileName = mpFileStream->GetFileName();
-
+
if( ! mpFileStream->IsOpen() )
{
Close();
@@ -311,7 +311,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 )
@@ -371,7 +371,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 );
@@ -420,17 +420,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++ )
{
@@ -498,7 +498,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 );
@@ -512,7 +512,7 @@ String PPDParser::getPPDFile( const String& rFile )
if( ! aStream.IsOpen() )
{
std::hash_map< OUString, OUString, OUStringHash >::const_iterator it;
-
+
bool bRetry = true;
do
{
@@ -530,7 +530,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
@@ -540,7 +540,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 );
}
@@ -950,7 +950,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 ) == '?' )
{
@@ -978,7 +978,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
}
bIsGlobalizedLine = true;
}
-
+
String aOption;
nPos = aCurrentLine.Search( ':' );
if( nPos != STRING_NOTFOUND )
@@ -1002,7 +1002,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() )
@@ -1019,7 +1019,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
}
}
aLine = WhitespaceToSpace( aLine );
-
+
// #i100644# handle a missing value (actually a broken PPD)
if( ! aLine.Len() )
{
@@ -1066,7 +1066,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
eType = eString;
}
}
-
+
// handle globalized PPD entries
if( bIsGlobalizedLine )
{
@@ -1103,7 +1103,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() )
@@ -1724,7 +1724,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 0fff5b590b98..c71088fb03a5 100644
--- a/vcl/unx/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,16 +71,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 );
};
@@ -95,20 +95,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;
}
@@ -189,7 +189,7 @@ bool PrinterInfoManager::checkPrintersChanged( bool bWait )
}
}
}
-
+
if( bWait && m_pQueueInfo )
{
#if OSL_DEBUG_LEVEL > 1
@@ -200,14 +200,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;
}
@@ -220,19 +220,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
@@ -240,7 +240,7 @@ void PrinterInfoManager::initialize()
#endif
return;
}
-
+
std::list< OUString > aDirList;
psp::getPrinterPathList( aDirList, NULL );
std::list< OUString >::const_iterator print_dir_it;
@@ -255,15 +255,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() )
{
@@ -272,19 +272,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() )
{
@@ -293,7 +293,7 @@ void PrinterInfoManager::initialize()
else
m_aGlobalDefaults.m_bPerformFontSubstitution = false;
}
-
+
aValue = aConfig.ReadKey( "DisableCUPS" );
if( aValue.Len() )
{
@@ -302,7 +302,7 @@ void PrinterInfoManager::initialize()
else
m_bDisableCUPS = false;
}
-
+
// get the PPDContext of global JobData
for( int nKey = 0; nKey < aConfig.GetKeyCount(); nKey++ )
{
@@ -332,14 +332,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 );
@@ -347,12 +347,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;
@@ -367,7 +367,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++ )
{
@@ -376,12 +376,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;
@@ -390,11 +390,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
@@ -403,11 +403,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
@@ -432,7 +432,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
}
}
-
+
aValue = aConfig.ReadKey( "Command" );
// no printer without a command
if( ! aValue.Len() )
@@ -449,32 +449,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() )
{
@@ -483,25 +483,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
@@ -526,10 +526,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;
@@ -545,7 +545,7 @@ void PrinterInfoManager::initialize()
}
}
}
-
+
// set default printer
if( m_aPrinters.size() )
{
@@ -555,23 +555,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 );
@@ -579,23 +579,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;
@@ -604,7 +604,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;
}
}
@@ -625,9 +625,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;
}
@@ -636,9 +636,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;
@@ -669,7 +669,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 ) )
@@ -678,21 +678,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;
@@ -704,7 +704,7 @@ bool PrinterInfoManager::writePrinterConfig()
}
if( bAutoQueue )
continue;
-
+
if( it->second.m_aFile.getLength() )
{
// check if file is writable
@@ -737,16 +737,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 );
@@ -770,7 +770,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)
@@ -779,13 +779,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();
@@ -797,11 +797,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;
}
@@ -810,7 +810,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 ) ) )
{
@@ -821,7 +821,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++ )
@@ -843,7 +843,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
@@ -866,15 +866,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;
@@ -889,7 +889,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();
@@ -920,7 +920,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() )
{
@@ -946,21 +946,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;
@@ -974,8 +974,8 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const
else
aSubstitutions[ aFamily ] = subst->second.toAsciiLowerCase();
}
-
-
+
+
// now find substitutions
for( it = aFonts.begin(); it != aFonts.end(); ++it )
{
@@ -996,15 +996,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;
@@ -1024,7 +1024,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,
@@ -1047,7 +1047,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)" ) );
@@ -1067,7 +1067,7 @@ const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::get
m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
delete m_pQueueInfo, m_pQueueInfo = NULL;
}
-
+
return m_aSystemPrintQueues;
}
@@ -1093,7 +1093,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");
}
@@ -1117,16 +1117,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
@@ -1135,7 +1135,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
#endif
return;
}
-
+
// paper not set, fill in default value
const PPDValue* pPaperVal = NULL;
int nValues = pPageSizeKey->countValues();
@@ -1218,10 +1218,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=" );
@@ -1251,7 +1251,7 @@ static void lpgetSysQueueTokenHandler(
break;
}
}
-
+
bool bInsertAttribute = false;
rtl::OString aDescrStr( "description=" );
rtl::OString aLocStr( "location=" );
@@ -1320,7 +1320,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++ )
@@ -1369,7 +1369,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 < SAL_N_ELEMENTS(aParms); i++ )
{
@@ -1379,7 +1379,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 ) )
@@ -1401,7 +1401,7 @@ void SystemQueueInfo::run()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "failed\n" );
#endif
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/source/printergfx/bitmap_gfx.cxx b/vcl/unx/source/printergfx/bitmap_gfx.cxx
index c33e11122c51..c7bdd33f7137 100644
--- a/vcl/unx/source/printergfx/bitmap_gfx.cxx
+++ b/vcl/unx/source/printergfx/bitmap_gfx.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ const sal_uInt32 nLineLength = 80;
const sal_uInt32 nBufferSize = 16384;
/*
- *
+ *
* Bitmap compression / Hex encoding / Ascii85 Encoding
*
*/
@@ -50,7 +50,7 @@ PrinterBmp::~PrinterBmp ()
/* virtual base class */
-class ByteEncoder
+class ByteEncoder
{
private:
@@ -98,7 +98,7 @@ HexEncoder::~HexEncoder ()
WritePS (mpFile, "\n");
}
-void
+void
HexEncoder::WriteAscii (sal_uInt8 nByte)
{
sal_uInt32 nOff = psp::getHexValueOf (nByte, mpFileBuffer + mnOffset);
@@ -114,10 +114,10 @@ HexEncoder::WriteAscii (sal_uInt8 nByte)
FlushLine ();
}
-void
+void
HexEncoder::EncodeByte (sal_uInt8 nByte)
{
- WriteAscii (nByte);
+ WriteAscii (nByte);
}
void
@@ -130,7 +130,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
@@ -219,7 +219,7 @@ Ascii85Encoder::ConvertToAscii85 ()
{
sal_uInt32 nEolOff = mnColumn - nLineLength;
sal_uInt32 nBufOff = mnOffset - nEolOff;
-
+
std::memmove (mpFileBuffer + nBufOff + 1, mpFileBuffer + nBufOff, nEolOff);
mpFileBuffer[ nBufOff ] = '\n';
@@ -303,7 +303,7 @@ public:
LZWEncoder (osl::File* pOutputFile);
~LZWEncoder ();
-
+
virtual void EncodeByte (sal_uInt8 nByte);
};
@@ -345,7 +345,7 @@ LZWEncoder::~LZWEncoder()
delete[] mpTable;
}
-void
+void
LZWEncoder::WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen)
{
mdwShift |= (nCode << (mnOffset - nCodeLen));
@@ -360,7 +360,7 @@ LZWEncoder::WriteBits (sal_uInt16 nCode, sal_uInt16 nCodeLen)
WriteAscii ((sal_uInt8)(mdwShift >> 24));
}
-void
+void
LZWEncoder::EncodeByte (sal_uInt8 nByte )
{
LZWCTreeNode* p;
@@ -422,7 +422,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();
@@ -445,7 +445,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
@@ -456,7 +456,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
{
DrawPS2TrueColorImage (rBitmap, rSrc);
}
- else
+ else
{
DrawPS2GrayImage (rBitmap, rSrc);
}
@@ -471,7 +471,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();
@@ -479,13 +479,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();
@@ -493,7 +493,7 @@ PrinterGfx::DrawMask (const Rectangle& rDest, const Rectangle& rSrc,
PSGSave ();
PSTranslate (rDest.BottomLeft());
- PSScale (fScaleX, fScaleY);
+ PSScale (fScaleX, fScaleY);
PSGRestore ();
}
@@ -539,7 +539,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
}
}
- delete pEncoder;
+ delete pEncoder;
WritePS (mpPageBody, "\n");
}
@@ -550,7 +550,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
*
*/
-void
+void
PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType)
{
sal_Int32 nChar = 0;
@@ -594,7 +594,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
WritePS (mpPageBody, "/DeviceRGB setcolorspace\n");
break;
- case psp::MonochromeImage:
+ case psp::MonochromeImage:
case psp::PaletteImage:
{
@@ -611,7 +611,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++)
{
@@ -622,7 +622,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
pEncoder->EncodeByte (aColor.GetBlue());
}
delete pEncoder;
-
+
WritePS (mpPageBody, "pop ] setcolorspace\n");
}
break;
@@ -634,9 +634,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++)
@@ -657,20 +657,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);
@@ -692,7 +692,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++)
@@ -713,7 +713,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 d42ece0e6347..abeacdd5bd6c 100644
--- a/vcl/unx/source/printergfx/common_gfx.cxx
+++ b/vcl/unx/source/printergfx/common_gfx.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
using namespace psp ;
-static const sal_Int32 nMaxTextColumn = 80;
+static const sal_Int32 nMaxTextColumn = 80;
GraphicsStatus::GraphicsStatus() :
mbArtItalic( false ),
@@ -67,7 +67,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() ) );
@@ -102,7 +102,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;
}
@@ -119,7 +119,7 @@ PrinterGfx::GetBitCount ()
return mnDepth;
}
-PrinterGfx::PrinterGfx() :
+PrinterGfx::PrinterGfx() :
mpPageHeader (NULL),
mpPageBody (NULL),
mnFontID (0),
@@ -217,7 +217,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() ) );
@@ -227,7 +227,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
@@ -390,7 +390,7 @@ PrinterGfx::DrawLine (const Point& rFrom, const Point& rTo)
PSSetColor (maLineColor);
PSSetColor ();
PSSetLineWidth ();
-
+
PSMoveTo (rFrom);
PSLineTo (rTo);
WritePS (mpPageBody, "stroke\n" );
@@ -423,9 +423,9 @@ PrinterGfx::DrawPolyLine (sal_uInt32 nPoints, const Point* pPath)
PSSetLineWidth ();
PSBinCurrentPath (nPoints, pPath);
-
+
WritePS (mpPageBody, "stroke\n" );
- }
+ }
}
void
@@ -438,7 +438,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++ )
@@ -487,7 +487,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++ )
@@ -532,7 +532,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);
@@ -541,8 +541,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;)
@@ -554,14 +554,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
@@ -586,10 +586,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)
{
@@ -599,14 +599,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);
}
@@ -631,7 +631,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYT
// restore the current path
if( maFillColor.Is() && maLineColor.Is())
- PSGRestore();
+ PSGRestore();
}
void
@@ -641,15 +641,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;)
@@ -669,8 +669,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);
}
@@ -682,7 +682,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
}
}
}
-
+
// if fill and stroke, save the current path
if( maFillColor.Is() && maLineColor.Is())
PSGSave();
@@ -696,7 +696,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
// restore the current path
if( maFillColor.Is() && maLineColor.Is())
- PSGRestore();
+ PSGRestore();
}
@@ -751,14 +751,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 );
}
@@ -778,53 +778,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);
}
@@ -837,13 +837,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);
}
@@ -940,7 +940,7 @@ PrinterGfx::PSBinMoveTo (const Point& rCurrent, Point& rOld, sal_Int32& nColumn)
#else
PSBinPath (rCurrent, rOld, moveto, nColumn);
#endif
-}
+}
void
PrinterGfx::PSBinStartPath ()
@@ -977,7 +977,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];
@@ -989,7 +989,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);
@@ -1012,8 +1012,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)
{
@@ -1078,9 +1078,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++)
{
@@ -1092,7 +1092,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);
@@ -1130,7 +1130,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 );
@@ -1152,7 +1152,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 f34ffa8efb44..98fb2b9a6f4b 100644
--- a/vcl/unx/source/printergfx/glyphset.cxx
+++ b/vcl/unx/source/printergfx/glyphset.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,27 +53,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
@@ -99,29 +99,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
@@ -133,22 +133,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
@@ -169,17 +169,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
@@ -201,9 +201,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;
@@ -212,8 +212,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;
@@ -245,12 +245,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)
@@ -273,15 +273,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;
}
@@ -297,7 +297,7 @@ GlyphSet::AddCharID (
*nOutGlyphSetID = maCharList.size();
*nOutGlyphID = aGlyphSet [nChar];
}
-
+
return sal_True;
}
@@ -309,7 +309,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)
@@ -332,15 +332,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;
}
@@ -356,7 +356,7 @@ GlyphSet::AddGlyphID (
*nOutGlyphSetID = maGlyphList.size();
*nOutGlyphID = aGlyphSet [nGlyph];
}
-
+
return sal_True;
}
@@ -411,7 +411,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;
}
}
@@ -427,8 +427,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
@@ -452,17 +452,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);
@@ -474,14 +474,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
@@ -512,14 +512,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)
{
@@ -528,13 +528,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)
@@ -563,14 +563,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
@@ -578,7 +578,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);
@@ -595,11 +595,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 */)
@@ -613,18 +613,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 )
@@ -645,14 +645,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)
{
@@ -661,13 +661,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)
@@ -696,7 +696,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
@@ -718,7 +718,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
++nGlyphSetID;
if (nGlyphSetID == 1) // latin1 page uses global reencoding table
- {
+ {
PSDefineReencodedFont (pOutFile, nGlyphSetID);
continue;
}
@@ -731,13 +731,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;
@@ -745,21 +745,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) );
@@ -777,7 +777,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
nSize = 0;
}
}
-
+
nSize += psp::appendStr ("] def\n", pEncodingVector + nSize);
psp::WritePS (pOutFile, pEncodingVector);
@@ -791,13 +791,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,
@@ -808,16 +808,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 );
@@ -826,7 +826,7 @@ static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile,
aEncoding[i] = aSorted[i].aEnc;
aRequestedGlyphs[i] = aSorted[i].aGID;
}
-
+
FontSubsetInfo aInfo;
aInfo.LoadFont( pSrcFont );
@@ -841,7 +841,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);
@@ -863,8 +863,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)
@@ -877,9 +877,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);
@@ -895,7 +895,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++)
{
@@ -908,8 +908,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
@@ -921,7 +921,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 f1dee2a08641..ec7fd39162ce 100644
--- a/vcl/unx/source/printergfx/glyphset.hxx
+++ b/vcl/unx/source/printergfx/glyphset.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,42 +49,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);
@@ -92,9 +92,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);
@@ -104,29 +104,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 e565a0e2355f..8c7c710f8e6c 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,11 +63,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))
@@ -92,7 +92,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer,
return sal_True;
}
-
+
} // namespace psp
/*
@@ -120,7 +120,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;
}
@@ -146,7 +146,7 @@ PrinterJob::GetDepth () const
}
sal_uInt16
-PrinterJob::GetPostscriptLevel (const JobData *pJobData) const
+PrinterJob::GetPostscriptLevel (const JobData *pJobData) const
{
sal_uInt16 nPSLevel = 2;
@@ -155,7 +155,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();
@@ -201,7 +201,7 @@ PrinterJob::GetCurrentPageBody ()
/*
* public methods of PrinterJob: the actual job / spool handling
- */
+ */
PrinterJob::PrinterJob () :
mpJobHeader( NULL ),
@@ -213,7 +213,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)
@@ -227,14 +227,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];
@@ -254,7 +254,7 @@ getUserName (char* pName, int nSize)
{
memcpy (pName, pPWEntry->pw_name, nLen);
pName[nLen] = '\0';
-
+
bSuccess = sal_True;
}
}
@@ -278,12 +278,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)
@@ -298,10 +298,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 );
@@ -379,7 +379,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
@@ -409,11 +409,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)
@@ -460,11 +460,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");
}
@@ -522,7 +522,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;
@@ -531,7 +531,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 )
{
@@ -547,7 +547,7 @@ PrinterJob::EndJob ()
}
}
else
- chmod( aFileName.getStr(), mnFileMode );
+ chmod( aFileName.getStr(), mnFileMode );
}
if (pDestFILE == NULL)
pDestFILE = fopen (aFileName.getStr(), "w");
@@ -574,7 +574,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 )
@@ -600,7 +600,7 @@ PrinterJob::EndJob ()
else
bSuccess = sal_False;
}
-
+
AppendPS (pDestFILE, mpJobTrailer, pBuffer);
mpJobTrailer->close();
@@ -611,7 +611,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;
@@ -642,7 +642,7 @@ PrinterJob::InitPaperSize (const JobData& rJobSetup)
if (pParser != NULL)
pParser->getMargins (aPaper, nLeft, nRight, nUpper, nLower);
- mnResolution = nRes;
+ mnResolution = nRes;
mnWidthPt = nWidth;
mnHeightPt = nHeight;
@@ -669,7 +669,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 (
@@ -683,7 +683,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");
@@ -702,7 +702,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);
@@ -718,7 +718,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() )
{
@@ -731,7 +731,7 @@ PrinterJob::StartPage (const JobData& rJobSetup)
m_aLastJobData = rJobSetup;
return true;
}
-
+
return false;
}
@@ -755,7 +755,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();
@@ -772,7 +772,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(); }
};
@@ -799,7 +799,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;
}
@@ -838,9 +838,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
)
@@ -881,13 +881,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",
@@ -895,8 +895,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);
@@ -919,12 +919,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
@@ -1001,7 +1001,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"
@@ -1088,7 +1088,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"
@@ -1186,9 +1186,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 3fe106221ad2..5f4723bc867d 100644
--- a/vcl/unx/source/printergfx/psputil.cxx
+++ b/vcl/unx/source/printergfx/psputil.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +35,8 @@
#include "tools/debug.hxx"
-namespace psp {
-
+namespace psp {
+
/*
* string convenience routines
*/
@@ -44,8 +44,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];
@@ -60,14 +60,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;
@@ -96,7 +96,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
@@ -121,7 +121,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;
@@ -131,14 +131,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;
@@ -148,7 +148,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;
}
@@ -161,7 +161,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);
@@ -172,7 +172,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);
@@ -184,7 +184,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);
@@ -211,7 +211,7 @@ ConverterFactory::~ConverterFactory ()
rtl_destroyUnicodeToTextConverter (it->second);
}
-rtl_UnicodeToTextConverter
+rtl_UnicodeToTextConverter
ConverterFactory::Get (rtl_TextEncoding nEncoding)
{
if (rtl_isOctetTextEncoding( nEncoding ))
@@ -234,7 +234,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
@@ -245,7 +245,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 878fd9c7791a..881e964e5c6e 100644
--- a/vcl/unx/source/printergfx/psputil.hxx
+++ b/vcl/unx/source/printergfx/psputil.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +40,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);
@@ -56,7 +56,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:
@@ -64,11 +64,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 f700a69c932b..349016587af2 100644
--- a/vcl/unx/source/printergfx/text_gfx.cxx
+++ b/vcl/unx/source/printergfx/text_gfx.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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
@@ -60,13 +60,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);
@@ -76,13 +76,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
@@ -99,7 +99,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 ) ||
@@ -134,7 +134,7 @@ PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID)
* implement text handling printer routines,
*/
-sal_uInt16
+sal_uInt16
PrinterGfx::SetFont(
sal_Int32 nFontID,
sal_Int32 nHeight,
@@ -152,15 +152,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;
@@ -176,18 +176,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));
@@ -257,10 +257,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
@@ -293,9 +293,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 ();
@@ -340,13 +340,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;
@@ -358,7 +358,7 @@ PrinterGfx::DrawText (
}
else
{
- pEffectiveStr = const_cast<sal_Unicode*>(pStr);
+ pEffectiveStr = const_cast<sal_Unicode*>(pStr);
}
fontID *pFontMap = (fontID*) alloca(nLen * sizeof(fontID));
@@ -399,7 +399,7 @@ PrinterGfx::DrawText (
PSTranslate (rPoint);
PSRotate (nCurrentTextAngle);
mnTextAngle = 0;
-
+
nCurrentPointX = 0;
nCurrentPointY = 0;
}
@@ -409,7 +409,7 @@ PrinterGfx::DrawText (
nCurrentPointY = rPoint.Y();
}
- // draw the string
+ // draw the string
sal_Int32 nDelta = 0;
for (int nTo = 0; nTo < nLen; )
{
@@ -423,25 +423,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 ];
@@ -456,7 +456,7 @@ PrinterGfx::DrawText (
// restore the original font settings
SetFont( nRestoreFont,
- maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
+ maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
mnTextAngle, mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold
@@ -466,7 +466,7 @@ PrinterGfx::DrawText (
void PrinterGfx::drawVerticalizedText(
const Point& rPoint,
const sal_Unicode* pStr,
- sal_Int16 nLen,
+ sal_Int16 nLen,
const sal_Int32* pDeltaArray
)
{
@@ -495,32 +495,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;
@@ -547,7 +547,7 @@ void PrinterGfx::drawVerticalizedText(
SetFont( mnFontID,
nOldHeight,
nOldWidth,
- nNormalAngle,
+ nNormalAngle,
mbTextVertical,
maVirtualStatus.mbArtItalic,
maVirtualStatus.mbArtBold );
@@ -558,25 +558,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);
@@ -590,11 +590,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
)
{
@@ -606,7 +606,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);
@@ -623,14 +623,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));
@@ -643,11 +643,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;
@@ -703,7 +703,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;
@@ -715,12 +715,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++ )
{
@@ -759,21 +759,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
@@ -810,7 +810,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);
@@ -839,7 +839,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 1c08cd6ed42d..cb98a608ae28 100644
--- a/vcl/unx/source/window/FWS.cxx
+++ b/vcl/unx/source/window/FWS.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 36b4b16a9214..672f167d15b2 100644
--- a/vcl/unx/source/window/FWS.hxx
+++ b/vcl/unx/source/window/FWS.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ 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
@@ -48,13 +48,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 0324f24e03a4..4739b736da95 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +86,7 @@ using namespace vcl_sal;
using namespace vcl;
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define CLIENT_EVENTS StructureNotifyMask \
+#define CLIENT_EVENTS StructureNotifyMask \
| SubstructureNotifyMask \
| KeyPressMask \
| KeyReleaseMask \
@@ -103,9 +103,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;
@@ -160,8 +160,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)
)
);
@@ -188,7 +188,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;
@@ -199,7 +199,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,
@@ -217,9 +217,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;
@@ -235,15 +235,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;
@@ -251,7 +251,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)
)
@@ -346,7 +346,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 )
@@ -373,7 +373,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
break;
++it;
}
-
+
if( it != rFrames.end() )
{
// set a document position and size
@@ -431,7 +431,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 );
}
@@ -441,9 +441,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;
}
}
@@ -474,8 +474,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.
@@ -483,10 +483,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,
@@ -501,8 +501,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 )
{
@@ -510,10 +510,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 );
@@ -565,7 +565,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 );
@@ -639,9 +639,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 );
}
@@ -654,69 +654,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;
@@ -743,9 +743,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 )
{
@@ -763,20 +763,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 );
@@ -896,18 +896,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;
}
@@ -918,8 +918,8 @@ SalGraphics *X11SalFrame::GetGraphics()
if( pFreeGraphics_ )
{
- pGraphics_ = pFreeGraphics_;
- pFreeGraphics_ = NULL;
+ pGraphics_ = pFreeGraphics_;
+ pFreeGraphics_ = NULL;
}
else
{
@@ -937,8 +937,8 @@ void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
if( pGraphics != pGraphics_ )
return;
- pFreeGraphics_ = pGraphics_;
- pGraphics_ = NULL;
+ pFreeGraphics_ = pGraphics_;
+ pGraphics_ = NULL;
}
void X11SalFrame::updateGraphics( bool bClear )
@@ -1025,7 +1025,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;
@@ -1073,7 +1073,7 @@ void X11SalFrame::SetIcon( USHORT nIcon )
}
if( bOk )
{
- pHints->flags |= IconPixmapHint;
+ pHints->flags |= IconPixmapHint;
if( pHints->icon_mask )
pHints->flags |= IconMaskHint;
@@ -1097,8 +1097,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(),
@@ -1121,8 +1121,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(),
@@ -1146,7 +1146,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();
@@ -1170,7 +1170,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 );
@@ -1193,7 +1193,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 );
@@ -1257,7 +1257,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
XSync( GetXDisplay(), False );
-
+
if( IsFloatGrabWindow() )
{
/*
@@ -1347,7 +1347,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
else if( ! m_bXEmbed )
XUnmapWindow( GetXDisplay(), GetWindow() );
-
+
nShowState_ = SHOWSTATE_HIDDEN;
if( IsFloatGrabWindow() && nVisibleFloats )
{
@@ -1410,7 +1410,7 @@ void X11SalFrame::GetClientSize( long &rWidth, long &rHeight )
return;
}
- rWidth = maGeometry.nWidth;
+ rWidth = maGeometry.nWidth;
rHeight = maGeometry.nHeight;
if( !rWidth || !rHeight )
@@ -1432,29 +1432,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() )
{
@@ -1480,10 +1480,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;
}
}
@@ -1497,10 +1497,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 )
@@ -1517,10 +1517,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;
}
}
@@ -1535,14 +1535,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;
@@ -1585,7 +1585,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();
@@ -1655,7 +1655,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
@@ -1674,14 +1674,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 );
@@ -1697,7 +1697,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)
{
@@ -1719,15 +1719,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 &&
@@ -1743,7 +1743,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 );
@@ -1754,7 +1754,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())
{
@@ -1820,7 +1820,7 @@ BOOL X11SalFrame::GetWindowState( SalFrameState* pState )
GetPosSize( aPosSize );
else
aPosSize = maRestorePosSize;
-
+
if( mbMaximizedHorz )
pState->mnState |= SAL_FRAMESTATE_MAXIMIZED_HORZ;
if( mbMaximizedVert )
@@ -1828,8 +1828,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();
@@ -1941,10 +1941,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(),
@@ -1976,10 +1976,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;
@@ -2010,8 +2010,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 ..
@@ -2019,7 +2019,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 ||
@@ -2036,23 +2036,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(),
@@ -2068,19 +2068,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 );
@@ -2099,7 +2099,7 @@ void X11SalFrame::Minimize()
{
if( IsSysChildWindow() )
return;
-
+
if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ )
{
stderr0( "X11SalFrame::Minimize on withdrawn window\n" );
@@ -2117,7 +2117,7 @@ void X11SalFrame::Maximize()
{
if( IsSysChildWindow() )
return;
-
+
if( SHOWSTATE_MINIMIZED == nShowState_ )
{
GetDisplay()->getWMAdaptor()->frameIsMapping( this );
@@ -2133,7 +2133,7 @@ void X11SalFrame::Restore()
{
if( IsSysChildWindow() )
return;
-
+
if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ )
{
stderr0( "X11SalFrame::Restore on withdrawn window\n" );
@@ -2156,12 +2156,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_;
@@ -2243,7 +2243,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);
@@ -2286,7 +2286,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 ) ) )
@@ -2306,7 +2306,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 );
@@ -2317,7 +2317,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,
@@ -2378,10 +2378,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 =
#if !defined(SOLARIS) && !defined(AIX)
(DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0);
@@ -2395,8 +2395,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 )
@@ -2413,20 +2413,20 @@ void X11SalFrame::StartPresentation( BOOL bStart )
&interval,
&prefer_blanking,
&allow_exposures );
-
-
+
+
// get the DPMS state right before the start
if (DPMSExtensionAvailable)
{
#if !defined(SOLARIS) && !defined(AIX)
- 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;
@@ -2435,41 +2435,41 @@ void X11SalFrame::StartPresentation( BOOL bStart )
0,
interval,
prefer_blanking,
- allow_exposures );
+ allow_exposures );
}
#if !defined(SOLARIS) && !defined(AIX)
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;
}
#if !defined(SOLARIS) && !defined(AIX)
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
@@ -2509,16 +2509,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);
@@ -2720,7 +2720,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;
@@ -2775,10 +2775,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 )
@@ -2789,11 +2789,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
}
@@ -2886,9 +2886,9 @@ void X11SalFrame::SimulateKeyPress( USHORT nKeyCode )
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;
@@ -2904,7 +2904,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
if ( pEvent->xcrossing.state & Button2Mask )
{
pEvent->xcrossing.state &= ~Button2Mask;
- pEvent->xcrossing.state |= Button3Mask;
+ pEvent->xcrossing.state |= Button3Mask;
}
break;
@@ -2950,26 +2950,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();
@@ -3000,11 +3000,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;
@@ -3058,7 +3058,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
}
}
}
-
+
if( m_bXEmbed && pEvent->xbutton.button == Button1 )
askForXEmbedFocus( pEvent->xbutton.time );
@@ -3066,19 +3066,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;
}
@@ -3087,17 +3087,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" );
@@ -3106,15 +3106,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;
@@ -3159,8 +3159,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 ) {}
};
@@ -3182,10 +3182,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())
@@ -3215,7 +3215,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
SalKeyEvent aKeyEvt;
USHORT nKeyCode;
USHORT nModCode = 0;
- char aDummy;
+ char aDummy;
if( pEvent->state & ShiftMask )
nModCode |= KEY_SHIFT;
@@ -3224,10 +3224,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;
@@ -3310,9 +3310,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 );
@@ -3340,7 +3340,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
@@ -3418,9 +3418,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 )
@@ -3466,14 +3466,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 )
@@ -3485,7 +3485,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 );
}
@@ -3535,24 +3535,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 &&
@@ -3602,8 +3602,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;
}
@@ -3688,16 +3688,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
@@ -3723,11 +3723,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);
@@ -3784,9 +3784,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
@@ -3835,8 +3835,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,
@@ -3857,16 +3857,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;
}
@@ -3882,16 +3882,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;
}
@@ -3913,18 +3913,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,
@@ -3936,8 +3936,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;
@@ -3991,7 +3991,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 )
@@ -4065,7 +4065,7 @@ void X11SalFrame::SaveYourselfDone( SalFrame* pSaveFrame )
pFrame = static_cast< const X11SalFrame* >(*it);
if( pFrame == pSaveFrame )
break;
- ++it;
+ ++it;
}
if( pFrame == pSaveFrame )
{
@@ -4093,10 +4093,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 )
@@ -4117,9 +4117,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:
@@ -4130,7 +4130,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;
@@ -4191,13 +4191,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,
@@ -4255,7 +4255,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
CurrentTime );
bSetFocus = false;
}
-
+
if( bSetFocus )
{
XSetInputFocus( GetXDisplay(),
@@ -4263,7 +4263,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
RevertToParent,
CurrentTime );
}
-
+
RestackChildren();
mbInShow = FALSE;
@@ -4362,13 +4362,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;
@@ -4376,17 +4376,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 );
}
@@ -4416,9 +4416,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 a5622a48ba70..d1f62da8b0f3 100644
--- a/vcl/unx/source/window/salmenu.cxx
+++ b/vcl/unx/source/window/salmenu.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +75,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 65a53ed8ac12..bbe20d294c3a 100644
--- a/vcl/unx/source/window/salobj.cxx
+++ b/vcl/unx/source/window/salobj.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +60,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 ) )
@@ -71,12 +71,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 );
@@ -134,7 +134,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,
@@ -166,14 +166,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();
@@ -234,8 +234,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;
@@ -250,19 +250,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();
@@ -276,7 +276,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 );
@@ -292,12 +292,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;
@@ -305,17 +305,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 );
}
@@ -338,12 +338,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 )
{
@@ -361,7 +361,7 @@ X11SalObject::EndSetClipRegion()
}
XLIB_Window aShapeWindow = maPrimary;
-
+
XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay,
aShapeWindow,
dest_kind,
@@ -398,7 +398,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 ) {
diff --git a/vcl/util/hidother.src b/vcl/util/hidother.src
index f966fcded1b3..c213fa267154 100644
--- a/vcl/util/hidother.src
+++ b/vcl/util/hidother.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,5 +27,5 @@
#include "vcl/svids.hrc"
-hidspecial HID_PRINTDLG { HelpID = HID_PRINTDLG; };
+hidspecial HID_PRINTDLG { HelpID = HID_PRINTDLG; };
diff --git a/vcl/win/inc/salbmp.h b/vcl/win/inc/salbmp.h
index 466dadce0c46..988d0a3eade3 100644
--- a/vcl/win/inc/salbmp.h
+++ b/vcl/win/inc/salbmp.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,38 +35,38 @@
#include <vcl/salbmp.hxx>
// --------------
-// - SalBitmap -
+// - SalBitmap -
// --------------
-struct BitmapBuffer;
-class BitmapColor;
-class BitmapPalette;
-class SalGraphics;
+struct BitmapBuffer;
+class BitmapColor;
+class BitmapPalette;
+class SalGraphics;
class WinSalBitmap : public SalBitmap
{
private:
- Size maSize;
- HGLOBAL mhDIB;
- HBITMAP mhDDB;
- USHORT mnBitCount;
+ Size maSize;
+ HGLOBAL mhDIB;
+ HBITMAP mhDDB;
+ USHORT mnBitCount;
public:
- HGLOBAL ImplGethDIB() const { return mhDIB; }
- HBITMAP ImplGethDDB() const { return mhDDB; }
+ HGLOBAL ImplGethDIB() const { return mhDIB; }
+ HBITMAP ImplGethDDB() const { return mhDDB; }
- static HGLOBAL ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB );
- static USHORT ImplGetDIBColorCount( HGLOBAL hDIB );
- static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
+ static HGLOBAL ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
+ static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB );
+ static USHORT ImplGetDIBColorCount( HGLOBAL hDIB );
+ static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
const Size& rSizePixel, bool bRLE4 );
public:
WinSalBitmap();
- virtual ~WinSalBitmap();
+ virtual ~WinSalBitmap();
public:
@@ -84,7 +84,7 @@ public:
virtual Size GetSize() const { return maSize; }
virtual USHORT GetBitCount() const { return mnBitCount; }
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
virtual bool GetSystemData( BitmapSystemData& rData );
};
diff --git a/vcl/win/inc/saldata.hxx b/vcl/win/inc/saldata.hxx
index 1b2eafe45b53..7d3729f72146 100644
--- a/vcl/win/inc/saldata.hxx
+++ b/vcl/win/inc/saldata.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,10 +80,10 @@ public:
// native widget framework
void initNWF();
void deInitNWF();
-
+
// fill maVKMap;
void initKeyCodeMap();
-
+
// checks if the menuhandle was created by VCL
BOOL IsKnownMenuHandle( HMENU hMenu );
@@ -100,8 +100,8 @@ public:
BYTE* mpDitherHigh; // Dither mapping table
ULONG mnTimerMS; // Current Time (in MS) of the Timer
ULONG mnTimerOrgMS; // Current Original Time (in MS)
- DWORD mnNextTimerTime;
- DWORD mnLastEventTime;
+ DWORD mnNextTimerTime;
+ DWORD mnLastEventTime;
UINT mnTimerId; // windows timer id
BOOL mbInTimerProc; // timer event is currently being dispatched
HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject
@@ -132,7 +132,7 @@ public:
SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none
TempFontItem* mpTempFontItem;
BOOL mbThemeChanged; // true if visual theme was changed: throw away theme handles
-
+
// for GdiPlus GdiplusStartup/GdiplusShutdown
ULONG_PTR gdiplusToken;
@@ -293,7 +293,7 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
#define SAL_MSG_RECREATEHWND (WM_USER+122)
// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
#define SAL_MSG_RECREATECHILDHWND (WM_USER+123)
-// wParam == 0; lParam == HWND;
+// wParam == 0; lParam == HWND;
#define SAL_MSG_DESTROYHWND (WM_USER+124)
// wParam == 0; lParam == pData
diff --git a/vcl/win/inc/salframe.h b/vcl/win/inc/salframe.h
index 49a1b50c14e2..3db21220e158 100644
--- a/vcl/win/inc/salframe.h
+++ b/vcl/win/inc/salframe.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,67 +86,67 @@ public:
BOOL mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages
BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting
-
+
RGNDATA* mpClipRgnData;
RECT* mpNextClipRect;
BOOL mbFirstClipRect;
- sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor
+ sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor
void updateScreenNumber();
public:
WinSalFrame();
virtual ~WinSalFrame();
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL PostEvent( void* pData );
- virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual BOOL PostEvent( void* pData );
+ virtual void SetTitle( const XubString& rTitle );
+ virtual void SetIcon( USHORT nIcon );
virtual void SetMenu( SalMenu* pSalMenu );
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 SalPointerState GetPointerState();
+ 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 SalIndicatorState GetIndicatorState();
virtual void SimulateKeyPress( USHORT nKeyCode );
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
+ virtual void SetParent( SalFrame* pNewParent );
+ virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber( unsigned int );
virtual void SetApplicationID( const rtl::OUString &rApplicationID );
- 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();
};
void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect );
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
index c09822004981..0ba816c23b22 100644
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +46,8 @@ class ImplFontAttrCache;
// - Defines -
// -----------
-#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
-#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
+#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
+#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
// win32 platform specific options. Move them to the PMK file?
@@ -135,43 +135,43 @@ public:
class WinSalGraphics : public SalGraphics
{
public:
- HDC mhDC; // HDC
- HWND mhWnd; // Window-Handle, when Window-Graphics
- HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
+ HDC mhDC; // HDC
+ HWND mhWnd; // Window-Handle, when Window-Graphics
+ HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
const ImplWinFontData* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face
ImplWinFontEntry* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
float mfFontScale; // allows metrics emulation of huge font sizes
- HPEN mhPen; // Pen
- HBRUSH mhBrush; // Brush
- HRGN mhRegion; // Region Handle
- HPEN mhDefPen; // DefaultPen
- HBRUSH mhDefBrush; // DefaultBrush
- HFONT mhDefFont; // DefaultFont
- HPALETTE mhDefPal; // DefaultPalette
- COLORREF mnPenColor; // PenColor
- COLORREF mnBrushColor; // BrushColor
- COLORREF mnTextColor; // TextColor
- RGNDATA* mpClipRgnData; // ClipRegion-Data
- RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
- RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
- BOOL mbFirstClipRect; // Flag for first cliprect to insert
- LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x)
- ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts
- BYTE* mpFontCharSets; // All Charsets for the current font
- BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
- BOOL mbFontKernInit; // FALSE: FontKerns must be queried
- KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font
- ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
- int mnPenWidth; // Linienbreite
- BOOL mbStockPen; // is Pen a stockpen
- BOOL mbStockBrush; // is Brush a stcokbrush
- BOOL mbPen; // is Pen (FALSE == NULL_PEN)
- BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH)
- BOOL mbPrinter; // is Printer
- BOOL mbVirDev; // is VirDev
- BOOL mbWindow; // is Window
- BOOL mbScreen; // is Screen compatible
- bool mbXORMode; // _every_ output with RasterOp XOR
+ HPEN mhPen; // Pen
+ HBRUSH mhBrush; // Brush
+ HRGN mhRegion; // Region Handle
+ HPEN mhDefPen; // DefaultPen
+ HBRUSH mhDefBrush; // DefaultBrush
+ HFONT mhDefFont; // DefaultFont
+ HPALETTE mhDefPal; // DefaultPalette
+ COLORREF mnPenColor; // PenColor
+ COLORREF mnBrushColor; // BrushColor
+ COLORREF mnTextColor; // TextColor
+ RGNDATA* mpClipRgnData; // ClipRegion-Data
+ RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
+ RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
+ BOOL mbFirstClipRect; // Flag for first cliprect to insert
+ LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x)
+ ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts
+ BYTE* mpFontCharSets; // All Charsets for the current font
+ BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
+ BOOL mbFontKernInit; // FALSE: FontKerns must be queried
+ KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font
+ ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
+ int mnPenWidth; // Linienbreite
+ BOOL mbStockPen; // is Pen a stockpen
+ BOOL mbStockBrush; // is Brush a stcokbrush
+ BOOL mbPen; // is Pen (FALSE == NULL_PEN)
+ BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH)
+ BOOL mbPrinter; // is Printer
+ BOOL mbVirDev; // is VirDev
+ BOOL mbWindow; // is Window
+ BOOL mbScreen; // is Screen compatible
+ bool mbXORMode; // _every_ output with RasterOp XOR
// remember RGB values for SetLineColor/SetFillColor
SalColor maLineColor;
@@ -184,48 +184,48 @@ public:
virtual ~WinSalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
- 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 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 drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
+ virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
// CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
long nSrcHeight, USHORT nFlags );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
- virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
+ virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
+ virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
+ 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 SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
// invert --> ClipRegion (only Windows or VirDevs)
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags);
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ 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 );
// native widget rendering methods that require mirroring
virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
@@ -240,61 +240,61 @@ protected:
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
- 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, long nHeight, sal_uInt8 nTransparency );
+ virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
public:
// public SalGraphics methods, the interface to teh independent vcl part
// get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
+ virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual USHORT GetBitCount();
// get the width of the device
- virtual long GetGraphicsWidth() const;
+ virtual long GetGraphicsWidth() const;
// set the clip region to empty
- virtual void ResetClipRegion();
+ virtual void ResetClipRegion();
// begin setting the clip region, add rectangles to the
// region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
+ virtual void BeginSetClipRegion( ULONG nCount );
// all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion();
+ virtual void EndSetClipRegion();
// set the line color to transparent (= don't draw lines)
- virtual void SetLineColor();
+ virtual void SetLineColor();
// set the line color to a specific color
- virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetLineColor( SalColor nSalColor );
// set the fill color to transparent (= don't fill)
- virtual void SetFillColor();
+ virtual void SetFillColor();
// set the fill color to a specific color, shapes will be
// filled accordingly
- virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetFillColor( SalColor nSalColor );
// enable/disable XOR drawing
- virtual void SetXORMode( bool bSet, bool );
+ virtual void SetXORMode( bool bSet, bool );
// set line color for raster operations
- virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
// set fill color for raster operations
- virtual void SetROPFillColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
// set the text color to a specific color
- virtual void SetTextColor( SalColor nSalColor );
+ virtual void SetTextColor( SalColor nSalColor );
// set the font
virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
// get the current font's etrics
- virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const;
// graphics must fill supplied font list
- virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontList( ImplDevFontList* );
// graphics should call ImplAddDevFontSubstitute on supplied
// OutputDevice for all its device specific preferred font substitutions
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
// returns TRUE if creation of subset was successfull
@@ -307,7 +307,7 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
long* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -332,13 +332,13 @@ public:
// pWidths MUST support at least 256 members;
// rInfo: additional outgoing information
// pDataLen: out parameter, contains the byte length of the returned buffer
- virtual const void* GetEmbedFontData( const ImplFontData*,
+ virtual const void* GetEmbedFontData( const ImplFontData*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
FontSubsetInfo& rInfo,
long* pDataLen );
// frees the font data again
- 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,
@@ -349,7 +349,7 @@ public:
virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
// Query the platform layer for control support
@@ -360,10 +360,10 @@ public:
};
// Init/Deinit Graphics
-void ImplSalInitGraphics( WinSalGraphics* mpData );
-void ImplSalDeInitGraphics( WinSalGraphics* mpData );
-void ImplUpdateSysColorEntries();
-int ImplIsSysColorEntry( SalColor nSalColor );
+void ImplSalInitGraphics( WinSalGraphics* mpData );
+void ImplSalDeInitGraphics( WinSalGraphics* mpData );
+void ImplUpdateSysColorEntries();
+int ImplIsSysColorEntry( SalColor nSalColor );
void ImplGetLogFontFromFontSelect( HDC hDC, const ImplFontSelectData*,
LOGFONTW&, bool bTestVerticalAvail );
@@ -371,7 +371,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, const ImplFontSelectData*,
// - Defines -
// -----------
-#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS))
+#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS))
// -----------
// - Inlines -
diff --git a/vcl/win/inc/salids.hrc b/vcl/win/inc/salids.hrc
index 3049f11b551b..dace5ce658be 100644
--- a/vcl/win/inc/salids.hrc
+++ b/vcl/win/inc/salids.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,83 +29,83 @@
#define _SV_SALIDS_HRC
// Cursor
-#define SAL_RESID_POINTER_NULL 10000
+#define SAL_RESID_POINTER_NULL 10000
#ifndef W40ONLY
-#define SAL_RESID_POINTER_HELP 10001
+#define SAL_RESID_POINTER_HELP 10001
#endif
#ifndef WNT
-#define SAL_RESID_POINTER_HSIZE 10002
-#define SAL_RESID_POINTER_VSIZE 10003
-#define SAL_RESID_POINTER_NESWSIZE 10004
-#define SAL_RESID_POINTER_NWSESIZE 10005
+#define SAL_RESID_POINTER_HSIZE 10002
+#define SAL_RESID_POINTER_VSIZE 10003
+#define SAL_RESID_POINTER_NESWSIZE 10004
+#define SAL_RESID_POINTER_NWSESIZE 10005
#endif
-#define SAL_RESID_POINTER_CROSS 10006
-#define SAL_RESID_POINTER_MOVE 10007
-#define SAL_RESID_POINTER_HSPLIT 10008
-#define SAL_RESID_POINTER_VSPLIT 10009
-#define SAL_RESID_POINTER_HSIZEBAR 10010
-#define SAL_RESID_POINTER_VSIZEBAR 10011
-#define SAL_RESID_POINTER_HAND 10012
-#define SAL_RESID_POINTER_REFHAND 10013
-#define SAL_RESID_POINTER_PEN 10014
-#define SAL_RESID_POINTER_MAGNIFY 10015
-#define SAL_RESID_POINTER_FILL 10016
-#define SAL_RESID_POINTER_ROTATE 10017
-#define SAL_RESID_POINTER_HSHEAR 10018
-#define SAL_RESID_POINTER_VSHEAR 10019
-#define SAL_RESID_POINTER_MIRROR 10020
-#define SAL_RESID_POINTER_CROOK 10021
-#define SAL_RESID_POINTER_CROP 10022
-#define SAL_RESID_POINTER_MOVEPOINT 10023
-#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10024
-#define SAL_RESID_POINTER_MOVEDATA 10025
-#define SAL_RESID_POINTER_COPYDATA 10026
-#define SAL_RESID_POINTER_LINKDATA 10027
-#define SAL_RESID_POINTER_MOVEDATALINK 10028
-#define SAL_RESID_POINTER_COPYDATALINK 10029
-#define SAL_RESID_POINTER_MOVEFILE 10030
-#define SAL_RESID_POINTER_COPYFILE 10031
-#define SAL_RESID_POINTER_LINKFILE 10032
-#define SAL_RESID_POINTER_MOVEFILELINK 10033
-#define SAL_RESID_POINTER_COPYFILELINK 10034
-#define SAL_RESID_POINTER_MOVEFILES 10035
-#define SAL_RESID_POINTER_COPYFILES 10036
-#define SAL_RESID_POINTER_NOTALLOWED 10037
-#define SAL_RESID_POINTER_DRAW_LINE 10038
-#define SAL_RESID_POINTER_DRAW_RECT 10039
-#define SAL_RESID_POINTER_DRAW_POLYGON 10040
-#define SAL_RESID_POINTER_DRAW_BEZIER 10041
-#define SAL_RESID_POINTER_DRAW_ARC 10042
-#define SAL_RESID_POINTER_DRAW_PIE 10043
-#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10044
-#define SAL_RESID_POINTER_DRAW_ELLIPSE 10045
-#define SAL_RESID_POINTER_DRAW_FREEHAND 10046
-#define SAL_RESID_POINTER_DRAW_CONNECT 10047
-#define SAL_RESID_POINTER_DRAW_TEXT 10048
-#define SAL_RESID_POINTER_DRAW_CAPTION 10049
+#define SAL_RESID_POINTER_CROSS 10006
+#define SAL_RESID_POINTER_MOVE 10007
+#define SAL_RESID_POINTER_HSPLIT 10008
+#define SAL_RESID_POINTER_VSPLIT 10009
+#define SAL_RESID_POINTER_HSIZEBAR 10010
+#define SAL_RESID_POINTER_VSIZEBAR 10011
+#define SAL_RESID_POINTER_HAND 10012
+#define SAL_RESID_POINTER_REFHAND 10013
+#define SAL_RESID_POINTER_PEN 10014
+#define SAL_RESID_POINTER_MAGNIFY 10015
+#define SAL_RESID_POINTER_FILL 10016
+#define SAL_RESID_POINTER_ROTATE 10017
+#define SAL_RESID_POINTER_HSHEAR 10018
+#define SAL_RESID_POINTER_VSHEAR 10019
+#define SAL_RESID_POINTER_MIRROR 10020
+#define SAL_RESID_POINTER_CROOK 10021
+#define SAL_RESID_POINTER_CROP 10022
+#define SAL_RESID_POINTER_MOVEPOINT 10023
+#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10024
+#define SAL_RESID_POINTER_MOVEDATA 10025
+#define SAL_RESID_POINTER_COPYDATA 10026
+#define SAL_RESID_POINTER_LINKDATA 10027
+#define SAL_RESID_POINTER_MOVEDATALINK 10028
+#define SAL_RESID_POINTER_COPYDATALINK 10029
+#define SAL_RESID_POINTER_MOVEFILE 10030
+#define SAL_RESID_POINTER_COPYFILE 10031
+#define SAL_RESID_POINTER_LINKFILE 10032
+#define SAL_RESID_POINTER_MOVEFILELINK 10033
+#define SAL_RESID_POINTER_COPYFILELINK 10034
+#define SAL_RESID_POINTER_MOVEFILES 10035
+#define SAL_RESID_POINTER_COPYFILES 10036
+#define SAL_RESID_POINTER_NOTALLOWED 10037
+#define SAL_RESID_POINTER_DRAW_LINE 10038
+#define SAL_RESID_POINTER_DRAW_RECT 10039
+#define SAL_RESID_POINTER_DRAW_POLYGON 10040
+#define SAL_RESID_POINTER_DRAW_BEZIER 10041
+#define SAL_RESID_POINTER_DRAW_ARC 10042
+#define SAL_RESID_POINTER_DRAW_PIE 10043
+#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10044
+#define SAL_RESID_POINTER_DRAW_ELLIPSE 10045
+#define SAL_RESID_POINTER_DRAW_FREEHAND 10046
+#define SAL_RESID_POINTER_DRAW_CONNECT 10047
+#define SAL_RESID_POINTER_DRAW_TEXT 10048
+#define SAL_RESID_POINTER_DRAW_CAPTION 10049
#define SAL_RESID_POINTER_CHART 10050
-#define SAL_RESID_POINTER_DETECTIVE 10051
-#define SAL_RESID_POINTER_PIVOT_COL 10052
-#define SAL_RESID_POINTER_PIVOT_ROW 10053
-#define SAL_RESID_POINTER_PIVOT_FIELD 10054
+#define SAL_RESID_POINTER_DETECTIVE 10051
+#define SAL_RESID_POINTER_PIVOT_COL 10052
+#define SAL_RESID_POINTER_PIVOT_ROW 10053
+#define SAL_RESID_POINTER_PIVOT_FIELD 10054
#define SAL_RESID_POINTER_CHAIN 10055
-#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10056
-#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10057
-#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10058
-#define SAL_RESID_POINTER_AUTOSCROLL_N 10059
-#define SAL_RESID_POINTER_AUTOSCROLL_S 10060
-#define SAL_RESID_POINTER_AUTOSCROLL_W 10061
-#define SAL_RESID_POINTER_AUTOSCROLL_E 10062
-#define SAL_RESID_POINTER_AUTOSCROLL_NW 10063
-#define SAL_RESID_POINTER_AUTOSCROLL_NE 10064
-#define SAL_RESID_POINTER_AUTOSCROLL_SW 10065
-#define SAL_RESID_POINTER_AUTOSCROLL_SE 10066
-#define SAL_RESID_POINTER_AUTOSCROLL_NS 10067
-#define SAL_RESID_POINTER_AUTOSCROLL_WE 10068
-#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10069
+#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10056
+#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10057
+#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10058
+#define SAL_RESID_POINTER_AUTOSCROLL_N 10059
+#define SAL_RESID_POINTER_AUTOSCROLL_S 10060
+#define SAL_RESID_POINTER_AUTOSCROLL_W 10061
+#define SAL_RESID_POINTER_AUTOSCROLL_E 10062
+#define SAL_RESID_POINTER_AUTOSCROLL_NW 10063
+#define SAL_RESID_POINTER_AUTOSCROLL_NE 10064
+#define SAL_RESID_POINTER_AUTOSCROLL_SW 10065
+#define SAL_RESID_POINTER_AUTOSCROLL_SE 10066
+#define SAL_RESID_POINTER_AUTOSCROLL_NS 10067
+#define SAL_RESID_POINTER_AUTOSCROLL_WE 10068
+#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10069
#define SAL_RESID_POINTER_AIRBRUSH 10070
-#define SAL_RESID_POINTER_TEXT_VERTICAL 10071
-#define SAL_RESID_POINTER_PIVOT_DELETE 10072
+#define SAL_RESID_POINTER_TEXT_VERTICAL 10071
+#define SAL_RESID_POINTER_PIVOT_DELETE 10072
#define SAL_RESID_POINTER_TAB_SELECT_S 10073
#define SAL_RESID_POINTER_TAB_SELECT_E 10074
#define SAL_RESID_POINTER_TAB_SELECT_SE 10075
@@ -115,6 +115,6 @@
#define SAL_RESID_BITMAP_50 11000
-#define SAL_RESID_ICON_DEFAULT 1
+#define SAL_RESID_ICON_DEFAULT 1
#endif // _SV_SALIDS_HRC
diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h
index 3b8c32708789..515cb1b40cca 100644
--- a/vcl/win/inc/salinst.h
+++ b/vcl/win/inc/salinst.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,49 +41,49 @@ class SalYieldMutex;
class WinSalInstance : public SalInstance
{
public:
- HINSTANCE mhInst; // Instance Handle
- HWND mhComWnd; // window, for communication (between threads and the main thread)
- SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
- osl::Mutex* mpSalWaitMutex; // Sal-Wait-Mutex
- USHORT mnYieldWaitCount; // Wait-Count
+ HINSTANCE mhInst; // Instance Handle
+ HWND mhComWnd; // window, for communication (between threads and the main thread)
+ SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
+ osl::Mutex* mpSalWaitMutex; // Sal-Wait-Mutex
+ USHORT mnYieldWaitCount; // Wait-Count
public:
WinSalInstance();
virtual ~WinSalInstance();
- 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 SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ 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 SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
USHORT nBitCount, const SystemGraphicsData *pData );
- 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 GetPrinterQueueInfo( ImplPrnQueueList* pList );
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
+ 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 String GetDefaultPrinter();
- virtual SalTimer* CreateSalTimer();
- virtual SalI18NImeStatus* CreateI18NImeStatus();
- virtual SalSystem* CreateSalSystem();
- virtual SalBitmap* CreateSalBitmap();
+ virtual SalTimer* CreateSalTimer();
+ virtual SalI18NImeStatus* CreateI18NImeStatus();
+ virtual SalSystem* CreateSalSystem();
+ virtual SalBitmap* CreateSalBitmap();
virtual osl::SolarMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* );
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* );
+ virtual ULONG ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( ULONG nCount );
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual bool AnyInput( USHORT nType );
+ virtual SalMenu* CreateMenu( BOOL bMenuBar );
+ virtual void DestroyMenu( SalMenu* );
+ virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
+ virtual void DestroyMenuItem( SalMenuItem* );
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);
static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
diff --git a/vcl/win/inc/salmenu.h b/vcl/win/inc/salmenu.h
index 5e821837101f..5fce0ffc5f68 100644
--- a/vcl/win/inc/salmenu.h
+++ b/vcl/win/inc/salmenu.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/win/inc/salnativewidgets.h b/vcl/win/inc/salnativewidgets.h
index 515a4b44d02c..021c213028a9 100644
--- a/vcl/win/inc/salnativewidgets.h
+++ b/vcl/win/inc/salnativewidgets.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
#include <vcl/sv.h>
/* SalControlHandleData:
- *
+ *
* Holds platform specific theming data.
*/
@@ -50,7 +50,7 @@ class SalControlHandleData
};
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#endif
diff --git a/vcl/win/inc/salobj.h b/vcl/win/inc/salobj.h
index 31fb8769b959..168ec95fbec0 100644
--- a/vcl/win/inc/salobj.h
+++ b/vcl/win/inc/salobj.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,32 +39,32 @@
class WinSalObject : public SalObject
{
public:
- HWND mhWnd; // Window handle
- HWND mhWndChild; // Child Window handle
- HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte
- SystemChildData maSysData; // SystemEnvData
- RGNDATA* mpClipRgnData; // ClipRegion-Data
- RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
- RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
- BOOL mbFirstClipRect; // Flag for first cliprect to insert
- WinSalObject* mpNextObject; // pointer to next object
+ HWND mhWnd; // Window handle
+ HWND mhWndChild; // Child Window handle
+ HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte
+ SystemChildData maSysData; // SystemEnvData
+ RGNDATA* mpClipRgnData; // ClipRegion-Data
+ RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
+ RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
+ BOOL mbFirstClipRect; // Flag for first cliprect to insert
+ WinSalObject* mpNextObject; // pointer to next object
WinSalObject();
virtual ~WinSalObject();
- 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/win/inc/salprn.h b/vcl/win/inc/salprn.h
index 55b421a9cba9..deea9d17e338 100644
--- a/vcl/win/inc/salprn.h
+++ b/vcl/win/inc/salprn.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,18 +37,18 @@
// -----------------
// WNT3
-#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433)
-#define SAL_DRIVERDATA_VERSION_A 1
+#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433)
+#define SAL_DRIVERDATA_VERSION_A 1
#define SAL_DRIVERDATA_VERSION_W 2
#pragma pack( 1 )
struct SalDriverData
{
- ULONG mnSysSignature;
- USHORT mnVersion;
- USHORT mnDriverOffset;
- BYTE maDriverData[1];
+ ULONG mnSysSignature;
+ USHORT mnVersion;
+ USHORT mnDriverOffset;
+ BYTE maDriverData[1];
};
#pragma pack()
@@ -62,30 +62,30 @@ class WinSalGraphics;
class WinSalInfoPrinter : public SalInfoPrinter
{
public:
- WinSalGraphics* mpGraphics; // current Printer graphics
- XubString maDriverName; // printer driver name
- XubString maDeviceName; // printer device name
- XubString maPortName; // printer port name
- HDC mhDC; // printer hdc
- BOOL mbGraphics; // is Graphics used
+ WinSalGraphics* mpGraphics; // current Printer graphics
+ XubString maDriverName; // printer driver name
+ XubString maDeviceName; // printer device name
+ XubString maPortName; // printer port name
+ HDC mhDC; // printer hdc
+ BOOL mbGraphics; // is Graphics used
public:
WinSalInfoPrinter();
virtual ~WinSalInfoPrinter();
- 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 );
};
// -----------------
@@ -95,34 +95,34 @@ public:
class WinSalPrinter : public SalPrinter
{
public:
- WinSalGraphics* mpGraphics; // current Printer graphics
- WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
- WinSalPrinter* mpNextPrinter; // next printing printer
- HDC mhDC; // printer hdc
- ULONG mnError; // Error Code
- ULONG mnCopies; // Kopien
- BOOL mbCollate; // Sortierte Kopien
- BOOL mbAbort; // Job Aborted
+ WinSalGraphics* mpGraphics; // current Printer graphics
+ WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ WinSalPrinter* mpNextPrinter; // next printing printer
+ HDC mhDC; // printer hdc
+ ULONG mnError; // Error Code
+ ULONG mnCopies; // Kopien
+ BOOL mbCollate; // Sortierte Kopien
+ BOOL mbAbort; // Job Aborted
bool mbValid;
-
+
public:
WinSalPrinter();
virtual ~WinSalPrinter();
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();
void markInvalid();
bool isValid() const { return mbValid; }
diff --git a/vcl/win/inc/salsys.h b/vcl/win/inc/salsys.h
index 159a6ce1a2d1..cc9b1ea4d328 100644
--- a/vcl/win/inc/salsys.h
+++ b/vcl/win/inc/salsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 WinSalSystem : public SalSystem
Rectangle m_aArea;
Rectangle m_aWorkArea;
sal_Int32 m_nStateFlags;
-
+
DisplayMonitor() : m_nStateFlags( 0 ) {}
DisplayMonitor( const rtl::OUString& rName,
const rtl::OUString& rDevName,
@@ -83,7 +83,7 @@ public:
void clearMonitors();
const std::vector<DisplayMonitor>& getMonitors()
{ initMonitors(); return m_aMonitors;}
-
+
BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/,
sal_IntPtr /*HDC*/,
sal_IntPtr /*LPRECT*/ );
diff --git a/vcl/win/inc/saltimer.h b/vcl/win/inc/saltimer.h
index 82ec8d2f387b..db062224d32f 100644
--- a/vcl/win/inc/saltimer.h
+++ b/vcl/win/inc/saltimer.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +38,8 @@ public:
virtual ~WinSalTimer();
// overload all pure virtual methods
- void Start( ULONG nMS );
- void Stop();
+ void Start( ULONG nMS );
+ void Stop();
};
#endif
diff --git a/vcl/win/inc/salvd.h b/vcl/win/inc/salvd.h
index 6203e286ec0c..85f3599efcd0 100644
--- a/vcl/win/inc/salvd.h
+++ b/vcl/win/inc/salvd.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,22 +41,22 @@ class WinSalGraphics;
class WinSalVirtualDevice : public SalVirtualDevice
{
public:
- HDC mhDC; // HDC or 0 for Cache Device
- HBITMAP mhBmp; // Memory Bitmap
- HBITMAP mhDefBmp; // Default Bitmap
- WinSalGraphics* mpGraphics; // current VirDev graphics
- WinSalVirtualDevice* mpNext; // next VirDev
- USHORT mnBitCount; // BitCount (0 or 1)
- BOOL mbGraphics; // is Graphics used
+ HDC mhDC; // HDC or 0 for Cache Device
+ HBITMAP mhBmp; // Memory Bitmap
+ HBITMAP mhDefBmp; // Default Bitmap
+ WinSalGraphics* mpGraphics; // current VirDev graphics
+ WinSalVirtualDevice* mpNext; // next VirDev
+ USHORT mnBitCount; // BitCount (0 or 1)
+ BOOL mbGraphics; // is Graphics used
BOOL mbForeignDC; // uses a foreign DC instead of a bitmap
WinSalVirtualDevice();
virtual ~WinSalVirtualDevice();
- 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 void GetSize( long& rWidth, long& rHeight );
};
#endif // _SV_SALVD_H
diff --git a/vcl/win/inc/svsys.h b/vcl/win/inc/svsys.h
index a43cbccab541..9dac2d6c2189 100644
--- a/vcl/win/inc/svsys.h
+++ b/vcl/win/inc/svsys.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/win/inc/wincomp.hxx b/vcl/win/inc/wincomp.hxx
index 2fe230b99531..d879f7167d15 100644
--- a/vcl/win/inc/wincomp.hxx
+++ b/vcl/win/inc/wincomp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -190,7 +190,7 @@ inline HINSTANCE GetWindowInstance( HWND hWnd )
#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG"
#define MOUSEZ_CLASSNAME "MouseZ" // wheel window class
-#define MOUSEZ_TITLE "Magellan MSWHEEL" // wheel window title
+#define MOUSEZ_TITLE "Magellan MSWHEEL" // wheel window title
#define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME)
#define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE)
@@ -198,19 +198,19 @@ inline HINSTANCE GetWindowInstance( HWND hWnd )
#define MSH_SCROLL_LINES "MSH_SCROLL_LINES_MSG"
#ifndef WHEEL_DELTA
-#define WHEEL_DELTA 120
+#define WHEEL_DELTA 120
#endif
#ifndef WM_MOUSEWHEEL
-#define WM_MOUSEWHEEL 0x020A
+#define WM_MOUSEWHEEL 0x020A
#endif
#ifndef SPI_GETWHEELSCROLLLINES
-#define SPI_GETWHEELSCROLLLINES 104
+#define SPI_GETWHEELSCROLLLINES 104
#endif
#ifndef SPI_SETWHEELSCROLLLINES
-#define SPI_SETWHEELSCROLLLINES 105
+#define SPI_SETWHEELSCROLLLINES 105
#endif
#ifndef WHEEL_PAGESCROLL
-#define WHEEL_PAGESCROLL (UINT_MAX)
+#define WHEEL_PAGESCROLL (UINT_MAX)
#endif
@@ -218,9 +218,9 @@ inline HINSTANCE GetWindowInstance( HWND hWnd )
// - SystemAgent Erweiterungen -
// -----------------------------
-#define ENABLE_AGENT 1
-#define DISABLE_AGENT 2
-#define GET_AGENT_STATUS 3
+#define ENABLE_AGENT 1
+#define DISABLE_AGENT 2
+#define GET_AGENT_STATUS 3
typedef int (APIENTRY* SysAgt_Enable_PROC)( int );
// ---------------------
@@ -228,10 +228,10 @@ typedef int (APIENTRY* SysAgt_Enable_PROC)( int );
// ---------------------
#ifndef COLOR_GRADIENTACTIVECAPTION
-#define COLOR_GRADIENTACTIVECAPTION 27
+#define COLOR_GRADIENTACTIVECAPTION 27
#endif
#ifndef COLOR_GRADIENTINACTIVECAPTION
-#define COLOR_GRADIENTINACTIVECAPTION 28
+#define COLOR_GRADIENTINACTIVECAPTION 28
#endif
#ifndef SPI_GETFLATMENU
@@ -241,7 +241,7 @@ typedef int (APIENTRY* SysAgt_Enable_PROC)( int );
#define COLOR_MENUBAR 30
#endif
#ifndef COLOR_MENUHILIGHT
-#define COLOR_MENUHILIGHT 29
+#define COLOR_MENUHILIGHT 29
#endif
#ifndef CS_DROPSHADOW
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
index 177e0d8088ff..8f9babfc10f8 100644
--- a/vcl/win/source/app/saldata.cxx
+++ b/vcl/win/source/app/saldata.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +92,9 @@ UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen )
int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 )
{
- int nRet;
- wchar_t c1;
- char c2;
+ int nRet;
+ wchar_t c1;
+ char c2;
do
{
// Ist das Zeichen zwischen 'A' und 'Z' dann umwandeln
diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx
index 943344c189a1..c95fca611339 100644
--- a/vcl/win/source/app/salinfo.cxx
+++ b/vcl/win/source/app/salinfo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -120,19 +120,19 @@ bool WinSalSystem::initMonitors()
{
if( m_aMonitors.size() > 0 )
return true;
-
+
bool winVerOk = true;
// multi monitor calls not available on Win95/NT
if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
{
if ( aSalShlData.maVersionInfo.dwMajorVersion <= 4 )
- winVerOk = false; // NT
+ winVerOk = false; // NT
}
else if( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
{
if ( aSalShlData.maVersionInfo.dwMajorVersion == 4 && aSalShlData.maVersionInfo.dwMinorVersion == 0 )
- winVerOk = false; // Win95
+ winVerOk = false; // Win95
}
if( winVerOk )
{
@@ -218,7 +218,7 @@ bool WinSalSystem::initMonitors()
m_aMonitors.back().m_aWorkArea = Rectangle( aWorkRect.left, aWorkRect.top,
aWorkRect.right, aWorkRect.bottom );
}
-
+
return m_aMonitors.size() > 0;
}
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index fac9c0683e60..01c0b376326c 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,15 +52,15 @@
#include <salbmp.h>
#include <vcl/salimestatus.hxx>
#include <vcl/timer.hxx>
-#include <wincomp.hxx> // CS_DROPSHADOW
+#include <wincomp.hxx> // CS_DROPSHADOW
#include <tools/solarmutex.hxx>
#include <vcl/solarmutex.hxx>
#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#if defined _MSC_VER
@@ -370,7 +370,7 @@ void SalData::initKeyCodeMap()
initKey( '+', KEY_ADD );
initKey( '-', KEY_SUBTRACT );
initKey( '*', KEY_MULTIPLY );
- initKey( '/', KEY_DIVIDE );
+ initKey( '/', KEY_DIVIDE );
initKey( '.', KEY_POINT );
initKey( ',', KEY_COMMA );
initKey( '<', KEY_LESS );
@@ -444,7 +444,7 @@ SalData::SalData()
// init with NULL
gdiplusToken = 0;
-
+
initKeyCodeMap();
SetSalData( this );
@@ -720,7 +720,7 @@ void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents )
{
MSG aMsg;
bool bWasMsg = false, bOneEvent = false;
-
+
int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;
do
{
@@ -760,7 +760,7 @@ void WinSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
}
if ( pSalData->mnAppThreadId != nCurThreadId )
{
- // #97739# A SendMessage call blocks until the called thread (here: the main thread)
+ // #97739# A SendMessage call blocks until the called thread (here: the main thread)
// returns. During a yield however, messages are processed in the main thread that might
// result in a new message loop due to opening a dialog. Thus, SendMessage would not
// return which will block this thread!
@@ -845,7 +845,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
break;
case SAL_MSG_DESTROYHWND:
//We only destroy the native window here. We do NOT destroy the SalFrame contained
- //in the structure (GetWindowPtr()).
+ //in the structure (GetWindowPtr()).
if (DestroyWindow((HWND)lParam) == 0)
{
OSL_ENSURE(0, "DestroyWindow failed!");
@@ -985,7 +985,7 @@ bool WinSalInstance::AnyInput( USHORT nType )
if ( ImplPeekMessage( &aMsg, 0, WM_PAINT, WM_PAINT,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
-
+
if ( ImplPeekMessage( &aMsg, 0, WM_SIZE, WM_SIZE,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
@@ -1072,7 +1072,7 @@ void WinSalInstance::DestroyFrame( SalFrame* pFrame )
SalObject* WinSalInstance::CreateObject( SalFrame* pParent,
SystemWindowData* /*pWindowData*/, // SystemWindowData meaningless on Windows
- BOOL /*bShow*/ )
+ BOOL /*bShow*/ )
{
// Um auf Main-Thread umzuschalten
return (SalObject*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) );
@@ -1097,9 +1097,9 @@ void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
// -----------------------------------------------------------------------
/** Add a file to the system shells recent document list if there is any.
- This function may have no effect under Unix because there is no
+ This function may have no effect under Unix because there is no
standard API among the different desktop managers.
-
+
@param aFileUrl
The file url of the document.
*/
@@ -1107,11 +1107,11 @@ void WinSalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, cons
{
rtl::OUString system_path;
osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(rFileUrl, system_path);
-
+
OSL_ENSURE(osl::FileBase::E_None == rc, "Invalid file url");
-
+
if (osl::FileBase::E_None == rc)
- SHAddToRecentDocs(SHARD_PATHW, system_path.getStr());
+ SHAddToRecentDocs(SHARD_PATHW, system_path.getStr());
}
// -----------------------------------------------------------------------
@@ -1133,7 +1133,7 @@ class WinImeStatus : public SalI18NImeStatus
public:
WinImeStatus() {}
virtual ~WinImeStatus() {}
-
+
// asks whether there is a status window available
// to toggle into menubar
virtual bool canToggle() { return false; }
diff --git a/vcl/win/source/app/salshl.cxx b/vcl/win/source/app/salshl.cxx
index 136474e67f73..6d8ccabf878f 100644
--- a/vcl/win/source/app/salshl.cxx
+++ b/vcl/win/source/app/salshl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx
index 2f57bf810bd0..ac329d9cfb69 100644
--- a/vcl/win/source/app/saltimer.cxx
+++ b/vcl/win/source/app/saltimer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@
// =======================================================================
// Maximale Periode
-#define MAX_SYSPERIOD 65533
+#define MAX_SYSPERIOD 65533
// =======================================================================
@@ -118,7 +118,7 @@ void CALLBACK SalTimerProc( HWND, UINT, UINT_PTR nId, DWORD )
// Test for MouseLeave
SalTestMouseLeave();
-
+
bool bRecursive = pSalData->mbInTimerProc && (nId != SALTIMERPROC_RECURSIVE);
if ( pSVData->mpSalTimer && ! bRecursive )
{
@@ -133,7 +133,7 @@ void CALLBACK SalTimerProc( HWND, UINT, UINT_PTR nId, DWORD )
pSVData->mpSalTimer->CallCallback();
pSalData->mbInTimerProc = FALSE;
ImplSalYieldMutexRelease();
-
+
// Run the timer in the correct time, if we start this
// with a small timeout, because we don't get the mutex
if ( pSalData->mnTimerId &&
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index b201bf7c19b9..d05036be29ce 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +54,9 @@ inline void ImplSetPixel4( const HPBYTE pScanline, long nX, const BYTE cIndex )
// ----------------
WinSalBitmap::WinSalBitmap() :
- mhDIB ( 0 ),
- mhDDB ( 0 ),
- mnBitCount ( 0 )
+ mhDIB ( 0 ),
+ mhDDB ( 0 ),
+ mnBitCount ( 0 )
{
}
@@ -92,7 +92,7 @@ bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle )
}
else if( mhDDB )
{
- BITMAP aDDBInfo;
+ BITMAP aDDBInfo;
if( WIN_GetObject( mhDDB, sizeof( BITMAP ), &aDDBInfo ) )
{
@@ -176,12 +176,12 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics )
if( rSalBmp.mhDIB )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( rSalBmp.mhDIB );
- PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
- HDC hDC = pGraphics->mhDC;
- HBITMAP hNewDDB;
- BITMAP aDDBInfo;
- PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( rSalBmp.mhDIB );
+ PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
+ HDC hDC = pGraphics->mhDC;
+ HBITMAP hNewDDB;
+ BITMAP aDDBInfo;
+ PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
ImplGetDIBColorCount( rSalBmp.mhDIB ) * sizeof( RGBQUAD );
if( pBIH->biBitCount == 1 )
@@ -226,12 +226,12 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, USHORT nNewBitCount )
if( mhDIB )
{
PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
- const int nLines = (int) rSalBmp.maSize.Height();
- HDC hDC = GetDC( 0 );
- PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
+ const int nLines = (int) rSalBmp.maSize.Height();
+ HDC hDC = GetDC( 0 );
+ PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
ImplGetDIBColorCount( mhDIB ) * sizeof( RGBQUAD );
- SalData* pSalData = GetSalData();
- HPALETTE hOldPal = 0;
+ SalData* pSalData = GetSalData();
+ HPALETTE hOldPal = 0;
if ( pSalData->mhDitherPal )
{
@@ -291,8 +291,8 @@ USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB )
if( hDIB )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDIB );
- PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDIB );
+ PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
if ( pBIH->biSize != sizeof( BITMAPCOREHEADER ) )
{
@@ -323,15 +323,15 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitm
if ( rSize.Width() && rSize.Height() )
{
- const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
- const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
+ const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
+ const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
hDIB = GlobalAlloc( GHND, sizeof( BITMAPINFOHEADER ) + nColors * sizeof( RGBQUAD ) + nImageSize );
if( hDIB )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDIB );
- PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDIB );
+ PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
pBIH->biSize = sizeof( BITMAPINFOHEADER );
pBIH->biWidth = rSize.Width();
@@ -364,7 +364,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitm
HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB )
{
- HANDLE hCopy = 0;
+ HANDLE hCopy = 0;
if ( bDIB && hHdl )
{
@@ -388,9 +388,9 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB )
// Destination-Bitmap erzeugen
if ( (hCopy = CreateBitmapIndirect( &aBmp )) != 0 )
{
- HDC hBmpDC = CreateCompatibleDC( 0 );
+ HDC hBmpDC = CreateCompatibleDC( 0 );
HBITMAP hBmpOld = (HBITMAP) SelectObject( hBmpDC, hHdl );
- HDC hCopyDC = CreateCompatibleDC( hBmpDC );
+ HDC hCopyDC = CreateCompatibleDC( hBmpDC );
HBITMAP hCopyOld = (HBITMAP) SelectObject( hCopyDC, hCopy );
BitBlt( hCopyDC, 0, 0, aBmp.bmWidth, aBmp.bmHeight, hBmpDC, 0, 0, SRCCOPY );
@@ -414,22 +414,22 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
if( mhDIB )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
- PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
+ PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
if( ( pBIH->biCompression == BI_RLE4 ) || ( pBIH->biCompression == BI_RLE8 ) )
{
- Size aSizePix( pBIH->biWidth, pBIH->biHeight );
+ Size aSizePix( pBIH->biWidth, pBIH->biHeight );
HGLOBAL hNewDIB = ImplCreateDIB( aSizePix, pBIH->biBitCount, BitmapPalette() );
if( hNewDIB )
{
- PBITMAPINFO pNewBI = (PBITMAPINFO) GlobalLock( hNewDIB );
- PBITMAPINFOHEADER pNewBIH = (PBITMAPINFOHEADER) pNewBI;
- const USHORT nColorCount = ImplGetDIBColorCount( hNewDIB );
- const ULONG nOffset = *(DWORD*) pBI + nColorCount * sizeof( RGBQUAD );
- BYTE* pOldBits = (PBYTE) pBI + nOffset;
- BYTE* pNewBits = (PBYTE) pNewBI + nOffset;
+ PBITMAPINFO pNewBI = (PBITMAPINFO) GlobalLock( hNewDIB );
+ PBITMAPINFOHEADER pNewBIH = (PBITMAPINFOHEADER) pNewBI;
+ const USHORT nColorCount = ImplGetDIBColorCount( hNewDIB );
+ const ULONG nOffset = *(DWORD*) pBI + nColorCount * sizeof( RGBQUAD );
+ BYTE* pOldBits = (PBYTE) pBI + nOffset;
+ BYTE* pNewBits = (PBYTE) pNewBI + nOffset;
memcpy( pNewBI, pBI, nOffset );
pNewBIH->biCompression = 0;
@@ -515,8 +515,8 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
{
if( !bReadOnly && !!pBuffer->maPalette )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
- const USHORT nCount = pBuffer->maPalette.GetEntryCount();
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
+ const USHORT nCount = pBuffer->maPalette.GetEntryCount();
memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), nCount * sizeof( RGBQUAD ) );
GlobalUnlock( mhDIB );
@@ -534,17 +534,17 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
const Size& rSizePixel, bool bRLE4 )
{
- HPBYTE pRLE = (HPBYTE) pSrcBuf;
- HPBYTE pDIB = (HPBYTE) pDstBuf;
- HPBYTE pRow = (HPBYTE) pDstBuf;
- ULONG nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) );
- HPBYTE pLast = pDIB + rSizePixel.Height() * nWidthAl - 1;
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0;
- ULONG i;
- BYTE cTmp;
- bool bEndDecoding = FALSE;
+ HPBYTE pRLE = (HPBYTE) pSrcBuf;
+ HPBYTE pDIB = (HPBYTE) pDstBuf;
+ HPBYTE pRow = (HPBYTE) pDstBuf;
+ ULONG nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) );
+ HPBYTE pLast = pDIB + rSizePixel.Height() * nWidthAl - 1;
+ ULONG nCountByte;
+ ULONG nRunByte;
+ ULONG nX = 0;
+ ULONG i;
+ BYTE cTmp;
+ bool bEndDecoding = FALSE;
if( pRLE && pDIB )
{
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 70b35c4e4f08..89d54b9580f4 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,19 +49,19 @@ using namespace rtl;
// =======================================================================
-#define DITHER_PAL_DELTA 51
-#define DITHER_PAL_STEPS 6
-#define DITHER_PAL_COUNT (DITHER_PAL_STEPS*DITHER_PAL_STEPS*DITHER_PAL_STEPS)
-#define DITHER_MAX_SYSCOLOR 16
-#define DITHER_EXTRA_COLORS 1
-#define DMAP( _def_nVal, _def_nThres ) ((pDitherDiff[_def_nVal]>(_def_nThres))?pDitherHigh[_def_nVal]:pDitherLow[_def_nVal])
+#define DITHER_PAL_DELTA 51
+#define DITHER_PAL_STEPS 6
+#define DITHER_PAL_COUNT (DITHER_PAL_STEPS*DITHER_PAL_STEPS*DITHER_PAL_STEPS)
+#define DITHER_MAX_SYSCOLOR 16
+#define DITHER_EXTRA_COLORS 1
+#define DMAP( _def_nVal, _def_nThres ) ((pDitherDiff[_def_nVal]>(_def_nThres))?pDitherHigh[_def_nVal]:pDitherLow[_def_nVal])
// =======================================================================
struct SysColorEntry
{
- DWORD nRGB;
- SysColorEntry* pNext;
+ DWORD nRGB;
+ SysColorEntry* pNext;
};
// =======================================================================
@@ -81,21 +81,21 @@ static PALETTEENTRY aImplExtraColor1 =
static PALETTEENTRY aImplSalSysPalEntryAry[ DITHER_MAX_SYSCOLOR ] =
{
-{ 0, 0, 0, 0 },
-{ 0, 0, 0x80, 0 },
-{ 0, 0x80, 0, 0 },
-{ 0, 0x80, 0x80, 0 },
-{ 0x80, 0, 0, 0 },
+{ 0, 0, 0, 0 },
+{ 0, 0, 0x80, 0 },
+{ 0, 0x80, 0, 0 },
+{ 0, 0x80, 0x80, 0 },
+{ 0x80, 0, 0, 0 },
{ 0x80, 0, 0x80, 0 },
-{ 0x80, 0x80, 0, 0 },
+{ 0x80, 0x80, 0, 0 },
{ 0x80, 0x80, 0x80, 0 },
{ 0xC0, 0xC0, 0xC0, 0 },
-{ 0, 0, 0xFF, 0 },
-{ 0, 0xFF, 0, 0 },
-{ 0, 0xFF, 0xFF, 0 },
-{ 0xFF, 0, 0, 0 },
+{ 0, 0, 0xFF, 0 },
+{ 0, 0xFF, 0, 0 },
+{ 0, 0xFF, 0xFF, 0 },
+{ 0xFF, 0, 0, 0 },
{ 0xFF, 0, 0xFF, 0 },
-{ 0xFF, 0xFF, 0, 0 },
+{ 0xFF, 0xFF, 0, 0 },
{ 0xFF, 0xFF, 0xFF, 0 }
};
@@ -132,12 +132,12 @@ static BYTE aOrdDither16Bit[8][8] =
// Pens muessen wir mit 1 Pixel-Breite erzeugen, da ansonsten die S3-Karte
// viele Paintprobleme hat, wenn Polygone/PolyLines gezeichnet werden und
// eine komplexe ClipRegion gesetzt ist
-#define GSL_PEN_WIDTH 1
+#define GSL_PEN_WIDTH 1
// =======================================================================
-#define SAL_POLYPOLYCOUNT_STACKBUF 8
-#define SAL_POLYPOLYPOINTS_STACKBUF 64
+#define SAL_POLYPOLYCOUNT_STACKBUF 8
+#define SAL_POLYPOLYPOINTS_STACKBUF 64
// =======================================================================
@@ -146,24 +146,24 @@ void ImplInitSalGDI()
SalData* pSalData = GetSalData();
// init stock brushes
- pSalData->maStockPenColorAry[0] = PALETTERGB( 0, 0, 0 );
- pSalData->maStockPenColorAry[1] = PALETTERGB( 0xFF, 0xFF, 0xFF );
- pSalData->maStockPenColorAry[2] = PALETTERGB( 0xC0, 0xC0, 0xC0 );
- pSalData->maStockPenColorAry[3] = PALETTERGB( 0x80, 0x80, 0x80 );
- pSalData->mhStockPenAry[0] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[0] );
- pSalData->mhStockPenAry[1] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[1] );
- pSalData->mhStockPenAry[2] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[2] );
- pSalData->mhStockPenAry[3] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[3] );
+ pSalData->maStockPenColorAry[0] = PALETTERGB( 0, 0, 0 );
+ pSalData->maStockPenColorAry[1] = PALETTERGB( 0xFF, 0xFF, 0xFF );
+ pSalData->maStockPenColorAry[2] = PALETTERGB( 0xC0, 0xC0, 0xC0 );
+ pSalData->maStockPenColorAry[3] = PALETTERGB( 0x80, 0x80, 0x80 );
+ pSalData->mhStockPenAry[0] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[0] );
+ pSalData->mhStockPenAry[1] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[1] );
+ pSalData->mhStockPenAry[2] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[2] );
+ pSalData->mhStockPenAry[3] = CreatePen( PS_SOLID, GSL_PEN_WIDTH, pSalData->maStockPenColorAry[3] );
pSalData->mnStockPenCount = 4;
- pSalData->maStockBrushColorAry[0] = PALETTERGB( 0, 0, 0 );
- pSalData->maStockBrushColorAry[1] = PALETTERGB( 0xFF, 0xFF, 0xFF );
- pSalData->maStockBrushColorAry[2] = PALETTERGB( 0xC0, 0xC0, 0xC0 );
- pSalData->maStockBrushColorAry[3] = PALETTERGB( 0x80, 0x80, 0x80 );
- pSalData->mhStockBrushAry[0] = CreateSolidBrush( pSalData->maStockBrushColorAry[0] );
- pSalData->mhStockBrushAry[1] = CreateSolidBrush( pSalData->maStockBrushColorAry[1] );
- pSalData->mhStockBrushAry[2] = CreateSolidBrush( pSalData->maStockBrushColorAry[2] );
- pSalData->mhStockBrushAry[3] = CreateSolidBrush( pSalData->maStockBrushColorAry[3] );
+ pSalData->maStockBrushColorAry[0] = PALETTERGB( 0, 0, 0 );
+ pSalData->maStockBrushColorAry[1] = PALETTERGB( 0xFF, 0xFF, 0xFF );
+ pSalData->maStockBrushColorAry[2] = PALETTERGB( 0xC0, 0xC0, 0xC0 );
+ pSalData->maStockBrushColorAry[3] = PALETTERGB( 0x80, 0x80, 0x80 );
+ pSalData->mhStockBrushAry[0] = CreateSolidBrush( pSalData->maStockBrushColorAry[0] );
+ pSalData->mhStockBrushAry[1] = CreateSolidBrush( pSalData->maStockBrushColorAry[1] );
+ pSalData->mhStockBrushAry[2] = CreateSolidBrush( pSalData->maStockBrushColorAry[2] );
+ pSalData->mhStockBrushAry[3] = CreateSolidBrush( pSalData->maStockBrushColorAry[3] );
pSalData->mnStockBrushCount = 4;
// initialize cache of device contexts
@@ -183,12 +183,12 @@ void ImplInitSalGDI()
if ( (nBitCount > 8) && (nBitCount < 24) )
{
// test, if we have to dither
- HDC hMemDC = ::CreateCompatibleDC( hDC );
- HBITMAP hMemBmp = ::CreateCompatibleBitmap( hDC, 8, 8 );
- HBITMAP hBmpOld = (HBITMAP) ::SelectObject( hMemDC, hMemBmp );
- HBRUSH hMemBrush = ::CreateSolidBrush( PALETTERGB( 175, 171, 169 ) );
- HBRUSH hBrushOld = (HBRUSH) ::SelectObject( hMemDC, hMemBrush );
- BOOL bDither16 = TRUE;
+ HDC hMemDC = ::CreateCompatibleDC( hDC );
+ HBITMAP hMemBmp = ::CreateCompatibleBitmap( hDC, 8, 8 );
+ HBITMAP hBmpOld = (HBITMAP) ::SelectObject( hMemDC, hMemBmp );
+ HBRUSH hMemBrush = ::CreateSolidBrush( PALETTERGB( 175, 171, 169 ) );
+ HBRUSH hBrushOld = (HBRUSH) ::SelectObject( hMemDC, hMemBrush );
+ BOOL bDither16 = TRUE;
::PatBlt( hMemDC, 0, 0, 8, 8, PATCOPY );
const COLORREF aCol( ::GetPixel( hMemDC, 0, 0 ) );
@@ -235,12 +235,12 @@ void ImplInitSalGDI()
}
else if ( (nRasterCaps & RC_PALETTE) && (nBitCount == 8) )
{
- BYTE nRed, nGreen, nBlue;
- BYTE nR, nG, nB;
- PALETTEENTRY* pPalEntry;
- LOGPALETTE* pLogPal;
- const USHORT nDitherPalCount = DITHER_PAL_COUNT;
- ULONG nTotalCount = DITHER_MAX_SYSCOLOR + nDitherPalCount + DITHER_EXTRA_COLORS;
+ BYTE nRed, nGreen, nBlue;
+ BYTE nR, nG, nB;
+ PALETTEENTRY* pPalEntry;
+ LOGPALETTE* pLogPal;
+ const USHORT nDitherPalCount = DITHER_PAL_COUNT;
+ ULONG nTotalCount = DITHER_MAX_SYSCOLOR + nDitherPalCount + DITHER_EXTRA_COLORS;
// create logical palette
pLogPal = (LOGPALETTE*) new char[ sizeof( LOGPALETTE ) + ( nTotalCount * sizeof( PALETTEENTRY ) ) ];
@@ -289,8 +289,8 @@ void ImplInitSalGDI()
pSalData->mpDitherDIBData = pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) );
memset( pSalData->mpDitherDIB, 0, sizeof( BITMAPINFOHEADER ) );
- BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) pSalData->mpDitherDIB;
- short* pColors = (short*) ( pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER ) );
+ BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) pSalData->mpDitherDIB;
+ short* pColors = (short*) ( pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER ) );
pBIH->biSize = sizeof( BITMAPINFOHEADER );
pBIH->biWidth = 8;
@@ -322,10 +322,10 @@ void ImplInitSalGDI()
void ImplFreeSalGDI()
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
// destroy stock objects
- int i;
+ int i;
for ( i = 0; i < pSalData->mnStockPenCount; i++ )
DeletePen( pSalData->mhStockPenAry[i] );
for ( i = 0; i < pSalData->mnStockBrushCount; i++ )
@@ -424,8 +424,8 @@ static int ImplIsPaletteEntry( BYTE nRed, BYTE nGreen, BYTE nBlue )
int ImplIsSysColorEntry( SalColor nSalColor )
{
- SysColorEntry* pEntry = pFirstSysColor;
- const DWORD nTestRGB = (DWORD)RGB( SALCOLOR_RED( nSalColor ),
+ SysColorEntry* pEntry = pFirstSysColor;
+ const DWORD nTestRGB = (DWORD)RGB( SALCOLOR_RED( nSalColor ),
SALCOLOR_GREEN( nSalColor ),
SALCOLOR_BLUE( nSalColor ) );
@@ -552,8 +552,8 @@ void ImplSalDeInitGraphics( WinSalGraphics* pData )
HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp )
{
- SalData* pSalData = GetSalData();
- HDCCache* pC = &pSalData->mpHDCCache[ nID ];
+ SalData* pSalData = GetSalData();
+ HDCCache* pC = &pSalData->mpHDCCache[ nID ];
if( !pC->mhDC )
{
@@ -586,8 +586,8 @@ HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp )
void ImplReleaseCachedDC( ULONG nID )
{
- SalData* pSalData = GetSalData();
- HDCCache* pC = &pSalData->mpHDCCache[ nID ];
+ SalData* pSalData = GetSalData();
+ HDCCache* pC = &pSalData->mpHDCCache[ nID ];
if ( pC->mhActBmp )
SelectObject( pC->mhDC, pC->mhSelBmp );
@@ -619,13 +619,13 @@ void ImplClearHDCCache( SalData* pData )
// #100127# Fill point and flag memory from array of points which
// might also contain bezier control points for the PolyDraw() GDI method
// Make sure pWinPointAry and pWinFlagAry are big enough
-void ImplPreparePolyDraw( bool bCloseFigures,
- ULONG nPoly,
- const ULONG* pPoints,
- const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry,
- POINT* pWinPointAry,
- BYTE* pWinFlagAry )
+void ImplPreparePolyDraw( bool bCloseFigures,
+ ULONG nPoly,
+ const ULONG* pPoints,
+ const SalPoint* const* pPtAry,
+ const BYTE* const* pFlgAry,
+ POINT* pWinPointAry,
+ BYTE* pWinFlagAry )
{
ULONG nCurrPoly;
for( nCurrPoly=0; nCurrPoly<nPoly; ++nCurrPoly )
@@ -730,24 +730,24 @@ WinSalGraphics::WinSalGraphics()
mfFontScale = 1.0;
- mhDC = 0;
- mhPen = 0;
- mhBrush = 0;
- mhRegion = 0;
- mhDefPen = 0;
- mhDefBrush = 0;
- mhDefFont = 0;
- mhDefPal = 0;
- mpStdClipRgnData = NULL;
- mpLogFont = NULL;
- mpFontCharSets = NULL;
- mpFontAttrCache = NULL;
- mnFontCharSetCount = 0;
- mpFontKernPairs = NULL;
- mnFontKernPairCount = 0;
- mbFontKernInit = FALSE;
- mbXORMode = FALSE;
- mnPenWidth = GSL_PEN_WIDTH;
+ mhDC = 0;
+ mhPen = 0;
+ mhBrush = 0;
+ mhRegion = 0;
+ mhDefPen = 0;
+ mhDefBrush = 0;
+ mhDefFont = 0;
+ mhDefPal = 0;
+ mpStdClipRgnData = NULL;
+ mpLogFont = NULL;
+ mpFontCharSets = NULL;
+ mpFontAttrCache = NULL;
+ mnFontCharSetCount = 0;
+ mpFontKernPairs = NULL;
+ mnFontKernPairCount = 0;
+ mbFontKernInit = FALSE;
+ mbXORMode = FALSE;
+ mnPenWidth = GSL_PEN_WIDTH;
}
// -----------------------------------------------------------------------
@@ -865,13 +865,13 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount )
}
else
mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
- mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
- mpClipRgnData->rdh.iType = RDH_RECTANGLES;
- mpClipRgnData->rdh.nCount = nRectCount;
- mpClipRgnData->rdh.nRgnSize = nRectBufSize;
+ mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
+ mpClipRgnData->rdh.iType = RDH_RECTANGLES;
+ mpClipRgnData->rdh.nCount = nRectCount;
+ mpClipRgnData->rdh.nRgnSize = nRectBufSize;
SetRectEmpty( &(mpClipRgnData->rdh.rcBound) );
- mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
- mbFirstClipRect = TRUE;
+ mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
+ mbFirstClipRect = TRUE;
}
@@ -881,17 +881,17 @@ BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeigh
{
if ( nWidth && nHeight )
{
- RECT* pRect = mpNextClipRect;
- RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ RECT* pRect = mpNextClipRect;
+ RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
+ long nRight = nX + nWidth;
+ long nBottom = nY + nHeight;
if ( mbFirstClipRect )
{
- pBoundRect->left = nX;
- pBoundRect->top = nY;
- pBoundRect->right = nRight;
- pBoundRect->bottom = nBottom;
+ pBoundRect->left = nX;
+ pBoundRect->top = nY;
+ pBoundRect->right = nRight;
+ pBoundRect->bottom = nBottom;
mbFirstClipRect = FALSE;
}
else
@@ -909,10 +909,10 @@ BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeigh
pBoundRect->bottom = (int)nBottom;
}
- pRect->left = (int)nX;
- pRect->top = (int)nY;
- pRect->right = (int)nRight;
- pRect->bottom = (int)nBottom;
+ pRect->left = (int)nX;
+ pRect->top = (int)nY;
+ pRect->right = (int)nRight;
+ pRect->bottom = (int)nBottom;
mpNextClipRect++;
}
else
@@ -993,9 +993,9 @@ void WinSalGraphics::SetLineColor()
mhDefPen = hOldPen;
// set new data
- mhPen = hNewPen;
- mbPen = FALSE;
- mbStockPen = TRUE;
+ mhPen = hNewPen;
+ mbPen = FALSE;
+ mbStockPen = TRUE;
}
// -----------------------------------------------------------------------
@@ -1003,11 +1003,11 @@ void WinSalGraphics::SetLineColor()
void WinSalGraphics::SetLineColor( SalColor nSalColor )
{
maLineColor = nSalColor;
- COLORREF nPenColor = PALETTERGB( SALCOLOR_RED( nSalColor ),
+ COLORREF nPenColor = PALETTERGB( SALCOLOR_RED( nSalColor ),
SALCOLOR_GREEN( nSalColor ),
SALCOLOR_BLUE( nSalColor ) );
- HPEN hNewPen = 0;
- BOOL bStockPen = FALSE;
+ HPEN hNewPen = 0;
+ BOOL bStockPen = FALSE;
// search for stock pen (only screen, because printer have problems,
// when we use stock objects)
@@ -1051,10 +1051,10 @@ void WinSalGraphics::SetLineColor( SalColor nSalColor )
mhDefPen = hOldPen;
// set new data
- mnPenColor = nPenColor;
- mhPen = hNewPen;
- mbPen = TRUE;
- mbStockPen = bStockPen;
+ mnPenColor = nPenColor;
+ mhPen = hNewPen;
+ mbPen = TRUE;
+ mbStockPen = bStockPen;
}
// -----------------------------------------------------------------------
@@ -1075,8 +1075,8 @@ void WinSalGraphics::SetFillColor()
mhDefBrush = hOldBrush;
// set new data
- mhBrush = hNewBrush;
- mbBrush = FALSE;
+ mhBrush = hNewBrush;
+ mbBrush = FALSE;
mbStockBrush = TRUE;
}
@@ -1085,13 +1085,13 @@ void WinSalGraphics::SetFillColor()
void WinSalGraphics::SetFillColor( SalColor nSalColor )
{
maFillColor = nSalColor;
- SalData* pSalData = GetSalData();
- BYTE nRed = SALCOLOR_RED( nSalColor );
- BYTE nGreen = SALCOLOR_GREEN( nSalColor );
- BYTE nBlue = SALCOLOR_BLUE( nSalColor );
- COLORREF nBrushColor = PALETTERGB( nRed, nGreen, nBlue );
- HBRUSH hNewBrush = 0;
- BOOL bStockBrush = FALSE;
+ SalData* pSalData = GetSalData();
+ BYTE nRed = SALCOLOR_RED( nSalColor );
+ BYTE nGreen = SALCOLOR_GREEN( nSalColor );
+ BYTE nBlue = SALCOLOR_BLUE( nSalColor );
+ COLORREF nBrushColor = PALETTERGB( nRed, nGreen, nBlue );
+ HBRUSH hNewBrush = 0;
+ BOOL bStockBrush = FALSE;
// search for stock brush (only screen, because printer have problems,
// when we use stock objects)
@@ -1180,8 +1180,8 @@ void WinSalGraphics::SetFillColor( SalColor nSalColor )
// set new data
mnBrushColor = nBrushColor;
- mhBrush = hNewBrush;
- mbBrush = TRUE;
+ mhBrush = hNewBrush;
+ mbBrush = TRUE;
mbStockBrush = bStockBrush;
}
@@ -1213,8 +1213,8 @@ void WinSalGraphics::drawPixel( long nX, long nY )
{
if ( mbXORMode )
{
- HBRUSH hBrush = CreateSolidBrush( mnPenColor );
- HBRUSH hOldBrush = SelectBrush( mhDC, hBrush );
+ HBRUSH hBrush = CreateSolidBrush( mnPenColor );
+ HBRUSH hOldBrush = SelectBrush( mhDC, hBrush );
PatBlt( mhDC, (int)nX, (int)nY, (int)1, (int)1, PATINVERT );
SelectBrush( mhDC, hOldBrush );
DeleteBrush( hBrush );
@@ -1238,8 +1238,8 @@ void WinSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
if ( mbXORMode )
{
- HBRUSH hBrush = CreateSolidBrush( nCol );
- HBRUSH hOldBrush = SelectBrush( mhDC, hBrush );
+ HBRUSH hBrush = CreateSolidBrush( nCol );
+ HBRUSH hOldBrush = SelectBrush( mhDC, hBrush );
PatBlt( mhDC, (int)nX, (int)nY, (int)1, (int)1, PATINVERT );
SelectBrush( mhDC, hOldBrush );
DeleteBrush( hBrush );
@@ -1279,8 +1279,8 @@ void WinSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
{
if ( mbXORMode )
{
- HBRUSH hBrush = CreateSolidBrush( mnPenColor );
- HBRUSH hOldBrush = SelectBrush( mhDC, hBrush );
+ HBRUSH hBrush = CreateSolidBrush( mnPenColor );
+ HBRUSH hOldBrush = SelectBrush( mhDC, hBrush );
PatBlt( mhDC, (int)nX2, (int)nY2, (int)1, (int)1, PATINVERT );
SelectBrush( mhDC, hOldBrush );
DeleteBrush( hBrush );
@@ -1304,9 +1304,9 @@ void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
else
{
RECT aWinRect;
- aWinRect.left = nX;
- aWinRect.top = nY;
- aWinRect.right = nX+nWidth;
+ aWinRect.left = nX;
+ aWinRect.top = nY;
+ aWinRect.right = nX+nWidth;
aWinRect.bottom = nY+nHeight;
::FillRect( mhDC, &aWinRect, mhBrush );
}
@@ -1350,11 +1350,11 @@ void WinSalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry )
{
- UINT aWinPointAry[SAL_POLYPOLYCOUNT_STACKBUF];
- UINT* pWinPointAry;
- UINT nPolyPolyPoints = 0;
- UINT nPoints;
- UINT i;
+ UINT aWinPointAry[SAL_POLYPOLYCOUNT_STACKBUF];
+ UINT* pWinPointAry;
+ UINT nPolyPolyPoints = 0;
+ UINT nPoints;
+ UINT i;
if ( nPoly <= SAL_POLYPOLYCOUNT_STACKBUF )
pWinPointAry = aWinPointAry;
@@ -1378,7 +1378,7 @@ void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoint
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
"WinSalGraphics::DrawPolyPolygon(): POINT != SalPoint" );
const SalPoint* pPolyAry;
- UINT n = 0;
+ UINT n = 0;
for ( i = 0; i < (UINT)nPoly; i++ )
{
nPoints = pWinPointAry[i];
@@ -1416,7 +1416,7 @@ void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoint
// -----------------------------------------------------------------------
-#define SAL_POLY_STACKBUF 32
+#define SAL_POLY_STACKBUF 32
// -----------------------------------------------------------------------
@@ -1444,10 +1444,10 @@ sal_Bool WinSalGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAr
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
"WinSalGraphics::DrawPolygonBezier(): POINT != SalPoint" );
- POINT aStackAry1[SAL_POLY_STACKBUF];
- BYTE aStackAry2[SAL_POLY_STACKBUF];
- POINT* pWinPointAry;
- BYTE* pWinFlagAry;
+ POINT aStackAry1[SAL_POLY_STACKBUF];
+ BYTE aStackAry2[SAL_POLY_STACKBUF];
+ POINT* pWinPointAry;
+ BYTE* pWinFlagAry;
if( nPoints > SAL_POLY_STACKBUF )
{
pWinPointAry = new POINT[ nPoints ];
@@ -1501,10 +1501,10 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
for( nCurrPoly=0, nTotalPoints=0; nCurrPoly<nPoly; ++nCurrPoly )
nTotalPoints += *pCurrPoints++;
- POINT aStackAry1[SAL_POLY_STACKBUF];
- BYTE aStackAry2[SAL_POLY_STACKBUF];
- POINT* pWinPointAry;
- BYTE* pWinFlagAry;
+ POINT aStackAry1[SAL_POLY_STACKBUF];
+ BYTE aStackAry2[SAL_POLY_STACKBUF];
+ POINT* pWinPointAry;
+ BYTE* pWinFlagAry;
if( nTotalPoints > SAL_POLY_STACKBUF )
{
pWinPointAry = new POINT[ nTotalPoints ];
@@ -1545,8 +1545,8 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
// -----------------------------------------------------------------------
-#define POSTSCRIPT_BUFSIZE 0x4000 // MAXIMUM BUFSIZE EQ 0xFFFF
-#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox
+#define POSTSCRIPT_BUFSIZE 0x4000 // MAXIMUM BUFSIZE EQ 0xFFFF
+#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox
// in the first 4096 bytes
static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
@@ -1568,7 +1568,7 @@ static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSi
static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
{
- BOOL bRetValue = FALSE;
+ BOOL bRetValue = FALSE;
BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nSize, 14 );
if ( pDest )
{
@@ -1577,15 +1577,15 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
int nSizeLeft = nSize - ( pDest - pSource );
if ( nSizeLeft > 100 )
- nSizeLeft = 100; // only 100 bytes following the bounding box will be checked
+ nSizeLeft = 100; // only 100 bytes following the bounding box will be checked
int i;
for ( i = 0; ( i < 4 ) && nSizeLeft; i++ )
{
- int nDivision = 1;
- BOOL bDivision = FALSE;
- BOOL bNegative = FALSE;
- BOOL bValid = TRUE;
+ int nDivision = 1;
+ BOOL bDivision = FALSE;
+ BOOL bNegative = FALSE;
+ BOOL bValid = TRUE;
while ( ( --nSizeLeft ) && ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) pDest++;
BYTE nByte = *pDest;
@@ -1604,7 +1604,7 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
break;
default :
if ( ( nByte < '0' ) || ( nByte > '9' ) )
- nSizeLeft = 1; // error parsing the bounding box values
+ nSizeLeft = 1; // error parsing the bounding box values
else if ( bValid )
{
if ( bDivision )
@@ -1638,7 +1638,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
if ( Escape( mhDC, QUERYESCSUPPORT, sizeof( int ), ( LPSTR )&nEscape, 0 ) )
{
- double nBoundingBox[4];
+ double nBoundingBox[4];
if ( ImplGetBoundingBox( nBoundingBox, (BYTE*)pPtr, nSize ) )
{
@@ -1728,8 +1728,8 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
// #107797# Write out EPS transformation code
// ----------------------------------------------------------------------------------
- double dM11 = nWidth / ( nBoundingBox[2] - nBoundingBox[0] );
- double dM22 = nHeight / (nBoundingBox[1] - nBoundingBox[3] );
+ double dM11 = nWidth / ( nBoundingBox[2] - nBoundingBox[0] );
+ double dM22 = nHeight / (nBoundingBox[1] - nBoundingBox[3] );
// reserve a USHORT again
aBuf.setLength( 2 );
aBuf.append( "\n\n[" );
@@ -1748,8 +1748,8 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
// #107797# Write out actual EPS content
// ----------------------------------------------------------------------------------
- ULONG nToDo = nSize;
- ULONG nDoNow;
+ ULONG nToDo = nSize;
+ ULONG nDoNow;
while ( nToDo )
{
nDoNow = nToDo;
diff --git a/vcl/win/source/gdi/salgdi2.cxx b/vcl/win/source/gdi/salgdi2.cxx
index b066258c3dac..e5d438972170 100644
--- a/vcl/win/source/gdi/salgdi2.cxx
+++ b/vcl/win/source/gdi/salgdi2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +61,8 @@ bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const
void WinSalGraphics::copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics )
{
- HDC hSrcDC;
- DWORD nRop;
+ HDC hSrcDC;
+ DWORD nRop;
if ( pSrcGraphics )
hSrcDC = static_cast<WinSalGraphics*>(pSrcGraphics)->mhDC;
@@ -159,18 +159,18 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY,
// compute and invalidate those parts that were either off-screen or covered by other windows
// while performing the above BitBlt
// those regions then have to be invalidated as they contain useless/wrong data
- RECT aSrcRect;
- RECT aClipRect;
- RECT aTempRect;
- RECT aTempRect2;
- HRGN hTempRgn;
- HWND hWnd;
- int nRgnType;
+ RECT aSrcRect;
+ RECT aClipRect;
+ RECT aTempRect;
+ RECT aTempRect2;
+ HRGN hTempRgn;
+ HWND hWnd;
+ int nRgnType;
// restrict srcRect to this window (calc intersection)
- aSrcRect.left = (int)nSrcX;
- aSrcRect.top = (int)nSrcY;
- aSrcRect.right = aSrcRect.left+(int)nSrcWidth;
+ aSrcRect.left = (int)nSrcX;
+ aSrcRect.top = (int)nSrcY;
+ aSrcRect.right = aSrcRect.left+(int)nSrcWidth;
aSrcRect.bottom = aSrcRect.top+(int)nSrcHeight;
GetClientRect( mhWnd, &aClipRect );
if ( IntersectRect( &aSrcRect, &aSrcRect, &aClipRect ) )
@@ -180,9 +180,9 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY,
aPt.x = 0;
aPt.y = 0;
ClientToScreen( mhWnd, &aPt );
- aSrcRect.left += aPt.x;
- aSrcRect.top += aPt.y;
- aSrcRect.right += aPt.x;
+ aSrcRect.left += aPt.x;
+ aSrcRect.top += aPt.y;
+ aSrcRect.right += aPt.x;
aSrcRect.bottom += aPt.y;
hInvalidateRgn = 0;
@@ -209,8 +209,8 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY,
aPt2.x = 0;
aPt2.y = 0;
ClientToScreen( hWndTopWindow, &aPt2 );
- aTempRect.left += aPt2.x;
- aTempRect.top += aPt2.y;
+ aTempRect.left += aPt2.x;
+ aTempRect.top += aPt2.y;
aTempRect.right += aPt2.x;
aTempRect.bottom += aPt2.y;
IntersectRect( &aTempRect3, &aTempRect3, &aTempRect );
@@ -328,8 +328,8 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY,
// MainThread ist, damit es beim Bearbeiten der
// Paint-Message keinen Deadlock gibt, da der
// SolarMutex durch diesen Thread schon gelockt ist
- SalData* pSalData = GetSalData();
- DWORD nCurThreadId = GetCurrentThreadId();
+ SalData* pSalData = GetSalData();
+ DWORD nCurThreadId = GetCurrentThreadId();
if ( pSalData->mnAppThreadId == nCurThreadId )
UpdateWindow( mhWnd );
}
@@ -347,10 +347,10 @@ void ImplDrawBitmap( HDC hDC,
{
if( hDC )
{
- HGLOBAL hDrawDIB;
- HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB();
- WinSalBitmap* pTmpSalBmp = NULL;
- BOOL bPrintDDB = ( bPrinter && hDrawDDB );
+ HGLOBAL hDrawDIB;
+ HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB();
+ WinSalBitmap* pTmpSalBmp = NULL;
+ BOOL bPrintDDB = ( bPrinter && hDrawDDB );
if( bPrintDDB )
{
@@ -363,11 +363,11 @@ void ImplDrawBitmap( HDC hDC,
if( hDrawDIB )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDrawDIB );
- PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
- PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDrawDIB );
+ PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
+ PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
rSalBitmap.ImplGetDIBColorCount( hDrawDIB ) * sizeof( RGBQUAD );
- const int nOldStretchMode = SetStretchBltMode( hDC, STRETCH_DELETESCANS );
+ const int nOldStretchMode = SetStretchBltMode( hDC, STRETCH_DELETESCANS );
StretchDIBits( hDC,
(int)pPosAry->mnDestX, (int)pPosAry->mnDestY,
@@ -381,10 +381,10 @@ void ImplDrawBitmap( HDC hDC,
}
else if( hDrawDDB && !bPrintDDB )
{
- HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_DRAW, hDrawDDB );
- COLORREF nOldBkColor = RGB(0xFF,0xFF,0xFF);
- COLORREF nOldTextColor = RGB(0,0,0);
- BOOL bMono = ( rSalBitmap.GetBitCount() == 1 );
+ HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_DRAW, hDrawDDB );
+ COLORREF nOldBkColor = RGB(0xFF,0xFF,0xFF);
+ COLORREF nOldTextColor = RGB(0,0,0);
+ BOOL bMono = ( rSalBitmap.GetBitCount() == 1 );
if( bMono )
{
@@ -451,19 +451,19 @@ void WinSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
const WinSalBitmap& rSalBitmap = static_cast<const WinSalBitmap&>(rSSalBitmap);
- WinSalBitmap* pMask = new WinSalBitmap;
+ WinSalBitmap* pMask = new WinSalBitmap;
const Point aPoint;
- const Size aSize( rSalBitmap.GetSize() );
- HBITMAP hMaskBitmap = CreateBitmap( (int) aSize.Width(), (int) aSize.Height(), 1, 1, NULL );
- HDC hMaskDC = ImplGetCachedDC( CACHED_HDC_1, hMaskBitmap );
- const BYTE cRed = SALCOLOR_RED( nTransparentColor );
- const BYTE cGreen = SALCOLOR_GREEN( nTransparentColor );
- const BYTE cBlue = SALCOLOR_BLUE( nTransparentColor );
+ const Size aSize( rSalBitmap.GetSize() );
+ HBITMAP hMaskBitmap = CreateBitmap( (int) aSize.Width(), (int) aSize.Height(), 1, 1, NULL );
+ HDC hMaskDC = ImplGetCachedDC( CACHED_HDC_1, hMaskBitmap );
+ const BYTE cRed = SALCOLOR_RED( nTransparentColor );
+ const BYTE cGreen = SALCOLOR_GREEN( nTransparentColor );
+ const BYTE cBlue = SALCOLOR_BLUE( nTransparentColor );
if( rSalBitmap.ImplGethDDB() )
{
- HDC hSrcDC = ImplGetCachedDC( CACHED_HDC_2, rSalBitmap.ImplGethDDB() );
- COLORREF aOldCol = SetBkColor( hSrcDC, RGB( cRed, cGreen, cBlue ) );
+ HDC hSrcDC = ImplGetCachedDC( CACHED_HDC_2, rSalBitmap.ImplGethDDB() );
+ COLORREF aOldCol = SetBkColor( hSrcDC, RGB( cRed, cGreen, cBlue ) );
BitBlt( hMaskDC, 0, 0, (int) aSize.Width(), (int) aSize.Height(), hSrcDC, 0, 0, SRCCOPY );
@@ -472,12 +472,12 @@ void WinSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
}
else
{
- WinSalBitmap* pTmpSalBmp = new WinSalBitmap;
+ WinSalBitmap* pTmpSalBmp = new WinSalBitmap;
if( pTmpSalBmp->Create( rSalBitmap, this ) )
{
- HDC hSrcDC = ImplGetCachedDC( CACHED_HDC_2, pTmpSalBmp->ImplGethDDB() );
- COLORREF aOldCol = SetBkColor( hSrcDC, RGB( cRed, cGreen, cBlue ) );
+ HDC hSrcDC = ImplGetCachedDC( CACHED_HDC_2, pTmpSalBmp->ImplGethDDB() );
+ COLORREF aOldCol = SetBkColor( hSrcDC, RGB( cRed, cGreen, cBlue ) );
BitBlt( hMaskDC, 0, 0, (int) aSize.Width(), (int) aSize.Height(), hSrcDC, 0, 0, SRCCOPY );
@@ -508,14 +508,14 @@ void WinSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
const WinSalBitmap& rSalBitmap = static_cast<const WinSalBitmap&>(rSSalBitmap);
const WinSalBitmap& rTransparentBitmap = static_cast<const WinSalBitmap&>(rSTransparentBitmap);
- SalTwoRect aPosAry = *pPosAry;
- int nDstX = (int)aPosAry.mnDestX;
- int nDstY = (int)aPosAry.mnDestY;
- int nDstWidth = (int)aPosAry.mnDestWidth;
- int nDstHeight = (int)aPosAry.mnDestHeight;
- HDC hDC = mhDC;
- HBITMAP hMemBitmap = 0;
- HBITMAP hMaskBitmap = 0;
+ SalTwoRect aPosAry = *pPosAry;
+ int nDstX = (int)aPosAry.mnDestX;
+ int nDstY = (int)aPosAry.mnDestY;
+ int nDstWidth = (int)aPosAry.mnDestWidth;
+ int nDstHeight = (int)aPosAry.mnDestHeight;
+ HDC hDC = mhDC;
+ HBITMAP hMemBitmap = 0;
+ HBITMAP hMaskBitmap = 0;
if( ( nDstWidth > CACHED_HDC_DEFEXT ) || ( nDstHeight > CACHED_HDC_DEFEXT ) )
{
@@ -554,7 +554,7 @@ void WinSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
}
else
{
- BitBlt( hMemDC, 0, 0, nDstWidth, nDstHeight, hMaskDC, 0, 0, SRCAND );
+ BitBlt( hMemDC, 0, 0, nDstWidth, nDstHeight, hMaskDC, 0, 0, SRCAND );
// now MemDC contains background with masked-out bitmap area
ImplDrawBitmap( hMaskDC, &aPosAry, rSalBitmap, FALSE, SRCERASE );
// now MaskDC contains the bitmap area with black background
@@ -578,7 +578,7 @@ void WinSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
// -----------------------------------------------------------------------
bool WinSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
- const SalBitmap& rSrcBitmap,
+ const SalBitmap& rSrcBitmap,
const SalBitmap& rAlphaBmp )
{
(void)rTR; (void)rSrcBitmap; (void)rAlphaBmp;
@@ -590,7 +590,7 @@ bool WinSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// -----------------------------------------------------------------------
-bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
+bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
long nHeight, sal_uInt8 nTransparency )
{
if( mbPen || !mbBrush || mbXORMode )
@@ -608,7 +608,7 @@ bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
// hMemDC contains a 1x1 bitmap of the right color - stretch-blit
// that to dest hdc
- bool bRet = AlphaBlend( mhDC, nX, nY, nWidth, nHeight,
+ bool bRet = AlphaBlend( mhDC, nX, nY, nWidth, nHeight,
hMemDC, 0,0,1,1,
aFunc ) == TRUE;
@@ -627,13 +627,13 @@ void WinSalGraphics::drawMask( const SalTwoRect* pPosAry,
const WinSalBitmap& rSalBitmap = static_cast<const WinSalBitmap&>(rSSalBitmap);
- SalTwoRect aPosAry = *pPosAry;
- const BYTE cRed = SALCOLOR_RED( nMaskColor );
- const BYTE cGreen = SALCOLOR_GREEN( nMaskColor );
- const BYTE cBlue = SALCOLOR_BLUE( nMaskColor );
- HDC hDC = mhDC;
- HBRUSH hMaskBrush = CreateSolidBrush( RGB( cRed, cGreen, cBlue ) );
- HBRUSH hOldBrush = SelectBrush( hDC, hMaskBrush );
+ SalTwoRect aPosAry = *pPosAry;
+ const BYTE cRed = SALCOLOR_RED( nMaskColor );
+ const BYTE cGreen = SALCOLOR_GREEN( nMaskColor );
+ const BYTE cBlue = SALCOLOR_BLUE( nMaskColor );
+ HDC hDC = mhDC;
+ HBRUSH hMaskBrush = CreateSolidBrush( RGB( cRed, cGreen, cBlue ) );
+ HBRUSH hOldBrush = SelectBrush( hDC, hMaskBrush );
// bei Paletten-Displays hat WIN/WNT offenbar ein kleines Problem,
// die Farben der Maske richtig auf die Palette abzubilden,
@@ -663,10 +663,10 @@ SalBitmap* WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
nDX = labs( nDX );
nDY = labs( nDY );
- HDC hDC = mhDC;
+ HDC hDC = mhDC;
HBITMAP hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY );
- HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_1, hBmpBitmap );
- BOOL bRet;
+ HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_1, hBmpBitmap );
+ BOOL bRet;
DWORD err = 0;
bRet = BitBlt( hBmpDC, 0, 0, (int) nDX, (int) nDY, hDC, (int) nX, (int) nY, SRCCOPY ) ? TRUE : FALSE;
@@ -712,10 +712,10 @@ void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv
{
if ( nFlags & SAL_INVERT_TRACKFRAME )
{
- HPEN hDotPen = CreatePen( PS_DOT, 0, 0 );
- HPEN hOldPen = SelectPen( mhDC, hDotPen );
- HBRUSH hOldBrush = SelectBrush( mhDC, GetStockBrush( NULL_BRUSH ) );
- int nOldROP = SetROP2( mhDC, R2_NOT );
+ HPEN hDotPen = CreatePen( PS_DOT, 0, 0 );
+ HPEN hOldPen = SelectPen( mhDC, hDotPen );
+ HBRUSH hOldBrush = SelectBrush( mhDC, GetStockBrush( NULL_BRUSH ) );
+ int nOldROP = SetROP2( mhDC, R2_NOT );
WIN_Rectangle( mhDC, (int)nX, (int)nY, (int)(nX+nWidth), (int)(nY+nHeight) );
@@ -743,10 +743,10 @@ void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv
else
{
RECT aRect;
- aRect.left = (int)nX;
- aRect.top = (int)nY;
- aRect.right = (int)nX+nWidth;
- aRect.bottom = (int)nY+nHeight;
+ aRect.left = (int)nX;
+ aRect.top = (int)nY;
+ aRect.right = (int)nX+nWidth;
+ aRect.bottom = (int)nY+nHeight;
::InvertRect( mhDC, &aRect );
}
}
@@ -755,12 +755,12 @@ void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv
void WinSalGraphics::invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nSalFlags )
{
- HPEN hPen;
- HPEN hOldPen;
- HBRUSH hBrush;
- HBRUSH hOldBrush = 0;
- COLORREF nOldTextColor RGB(0,0,0);
- int nOldROP = SetROP2( mhDC, R2_NOT );
+ HPEN hPen;
+ HPEN hOldPen;
+ HBRUSH hBrush;
+ HBRUSH hOldBrush = 0;
+ COLORREF nOldTextColor RGB(0,0,0);
+ int nOldROP = SetROP2( mhDC, R2_NOT );
if ( nSalFlags & SAL_INVERT_TRACKFRAME )
hPen = CreatePen( PS_DOT, 0, 0 );
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 79315a2e10b6..ae62c6eb7894 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,8 +48,8 @@
#include "vcl/fontsubset.hxx"
#include "vcl/sallayout.hxx"
-#include "vcl/outdev.h" // for ImplGlyphFallbackFontSubstitution
-#include "unotools/fontcfg.hxx" // for IMPL_FONT_ATTR_SYMBOL
+#include "vcl/outdev.h" // for ImplGlyphFallbackFontSubstitution
+#include "unotools/fontcfg.hxx" // for IMPL_FONT_ATTR_SYMBOL
#include "rtl/logfile.hxx"
#include "rtl/tencinfo.h"
@@ -126,13 +126,13 @@ typedef std::map< String, ImplDevFontAttributes > FontAttrMap;
class ImplFontAttrCache
{
private:
- FontAttrMap aFontAttributes;
- rtl::OUString aCacheFileName;
- String aBaseURL;
- BOOL bModified;
+ FontAttrMap aFontAttributes;
+ rtl::OUString aCacheFileName;
+ String aBaseURL;
+ BOOL bModified;
protected:
- String OptimizeURL( const String& rURL ) const;
+ String OptimizeURL( const String& rURL ) const;
enum{ MAGIC = 0x12349876 }; // change if fontattrcache format changes
@@ -147,7 +147,7 @@ public:
ImplFontAttrCache::ImplFontAttrCache( const String& rFileNameURL, const String& rBaseURL ) : aBaseURL( rBaseURL )
{
bModified = FALSE;
- aBaseURL.ToLowerAscii(); // Windows only, no problem...
+ aBaseURL.ToLowerAscii(); // Windows only, no problem...
// open the cache file
osl::FileBase::getSystemPathFromFileURL( rFileNameURL, aCacheFileName );
@@ -225,7 +225,7 @@ ImplFontAttrCache::~ImplFontAttrCache()
String ImplFontAttrCache::OptimizeURL( const String& rURL ) const
{
String aOptimizedFontFileURL( rURL );
- aOptimizedFontFileURL.ToLowerAscii(); // Windows only, no problem...
+ aOptimizedFontFileURL.ToLowerAscii(); // Windows only, no problem...
if ( aOptimizedFontFileURL.CompareTo( aBaseURL, aBaseURL.Len() ) == COMPARE_EQUAL )
aOptimizedFontFileURL = aOptimizedFontFileURL.Copy( aBaseURL.Len() );
return aOptimizedFontFileURL;
@@ -258,20 +258,20 @@ void ImplFontAttrCache::AddFontAttr( const String& rFontFileName, const ImplDevF
class RawFontData
{
public:
- explicit RawFontData( HDC, DWORD nTableTag=0 );
+ explicit RawFontData( HDC, DWORD nTableTag=0 );
~RawFontData() { delete[] mpRawBytes; }
- const unsigned char* get() const { return mpRawBytes; }
- const unsigned char* steal() { unsigned char* p = mpRawBytes; mpRawBytes = NULL; return p; }
- const int size() const { return mnByteCount; }
+ const unsigned char* get() const { return mpRawBytes; }
+ const unsigned char* steal() { unsigned char* p = mpRawBytes; mpRawBytes = NULL; return p; }
+ const int size() const { return mnByteCount; }
private:
- unsigned char* mpRawBytes;
- int mnByteCount;
+ unsigned char* mpRawBytes;
+ int mnByteCount;
};
RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
-: mpRawBytes( NULL )
-, mnByteCount( 0 )
+: mpRawBytes( NULL )
+, mnByteCount( 0 )
{
// get required size in bytes
mnByteCount = ::GetFontData( hDC, nTableTag, 0, NULL, 0 );
@@ -335,77 +335,77 @@ struct Unicode2LangType
// map unicode ranges to languages supported by OOo
// NOTE: due to the binary search used this list must be sorted by mnMinCode
static Unicode2LangType aLangFromCodeChart[]= {
- {0x0000, 0x007F, LANGUAGE_ENGLISH}, // Basic Latin
- {0x0080, 0x024F, LANGUAGE_ENGLISH}, // Latin Extended-A and Latin Extended-B
- {0x0250, 0x02AF, LANGUAGE_SYSTEM}, // IPA Extensions
- {0x0370, 0x03FF, LANGUAGE_GREEK}, // Greek
- {0x0590, 0x05FF, LANGUAGE_HEBREW}, // Hebrew
- {0x0600, 0x06FF, LANGUAGE_ARABIC_PRIMARY_ONLY}, // Arabic
- {0x0900, 0x097F, LANGUAGE_HINDI}, // Devanagari
- {0x0980, 0x09FF, LANGUAGE_BENGALI}, // Bengali
- {0x0A80, 0x0AFF, LANGUAGE_GUJARATI}, // Gujarati
- {0x0B00, 0x0B7F, LANGUAGE_ORIYA}, // Oriya
- {0x0B80, 0x0BFF, LANGUAGE_TAMIL}, // Tamil
- {0x0C00, 0x0C7F, LANGUAGE_TELUGU}, // Telugu
- {0x0C80, 0x0CFF, LANGUAGE_KANNADA}, // Kannada
- {0x0D00, 0x0D7F, LANGUAGE_MALAYALAM}, // Malayalam
- {0x0D80, 0x0D7F, LANGUAGE_SINHALESE_SRI_LANKA}, // Sinhala
- {0x0E00, 0x0E7F, LANGUAGE_THAI}, // Thai
- {0x0E80, 0x0EFF, LANGUAGE_LAO}, // Lao
- {0x0F00, 0x0FFF, LANGUAGE_TIBETAN}, // Tibetan
- {0x1000, 0x109F, LANGUAGE_BURMESE}, // Burmese
- {0x10A0, 0x10FF, LANGUAGE_GEORGIAN}, // Georgian
- {0x1100, 0x11FF, LANGUAGE_KOREAN}, // Hangul Jamo, Korean-specific
-// {0x1200, 0x139F, LANGUAGE_AMHARIC_ETHIOPIA}, // Ethiopic
-// {0x1200, 0x139F, LANGUAGE_TIGRIGNA_ETHIOPIA}, // Ethiopic
+ {0x0000, 0x007F, LANGUAGE_ENGLISH}, // Basic Latin
+ {0x0080, 0x024F, LANGUAGE_ENGLISH}, // Latin Extended-A and Latin Extended-B
+ {0x0250, 0x02AF, LANGUAGE_SYSTEM}, // IPA Extensions
+ {0x0370, 0x03FF, LANGUAGE_GREEK}, // Greek
+ {0x0590, 0x05FF, LANGUAGE_HEBREW}, // Hebrew
+ {0x0600, 0x06FF, LANGUAGE_ARABIC_PRIMARY_ONLY}, // Arabic
+ {0x0900, 0x097F, LANGUAGE_HINDI}, // Devanagari
+ {0x0980, 0x09FF, LANGUAGE_BENGALI}, // Bengali
+ {0x0A80, 0x0AFF, LANGUAGE_GUJARATI}, // Gujarati
+ {0x0B00, 0x0B7F, LANGUAGE_ORIYA}, // Oriya
+ {0x0B80, 0x0BFF, LANGUAGE_TAMIL}, // Tamil
+ {0x0C00, 0x0C7F, LANGUAGE_TELUGU}, // Telugu
+ {0x0C80, 0x0CFF, LANGUAGE_KANNADA}, // Kannada
+ {0x0D00, 0x0D7F, LANGUAGE_MALAYALAM}, // Malayalam
+ {0x0D80, 0x0D7F, LANGUAGE_SINHALESE_SRI_LANKA}, // Sinhala
+ {0x0E00, 0x0E7F, LANGUAGE_THAI}, // Thai
+ {0x0E80, 0x0EFF, LANGUAGE_LAO}, // Lao
+ {0x0F00, 0x0FFF, LANGUAGE_TIBETAN}, // Tibetan
+ {0x1000, 0x109F, LANGUAGE_BURMESE}, // Burmese
+ {0x10A0, 0x10FF, LANGUAGE_GEORGIAN}, // Georgian
+ {0x1100, 0x11FF, LANGUAGE_KOREAN}, // Hangul Jamo, Korean-specific
+// {0x1200, 0x139F, LANGUAGE_AMHARIC_ETHIOPIA}, // Ethiopic
+// {0x1200, 0x139F, LANGUAGE_TIGRIGNA_ETHIOPIA}, // Ethiopic
{0x13A0, 0x13FF, LANGUAGE_CHEROKEE_UNITED_STATES}, // Cherokee
-// {0x1400, 0x167F, LANGUAGE_CANADIAN_ABORIGINAL}, // Canadian Aboriginial Syllabics
-// {0x1680, 0x169F, LANGUAGE_OGHAM}, // Ogham
-// {0x16A0, 0x16F0, LANGUAGE_RUNIC}, // Runic
-// {0x1700, 0x171F, LANGUAGE_TAGALOG}, // Tagalog
-// {0x1720, 0x173F, LANGUAGE_HANUNOO}, // Hanunoo
-// {0x1740, 0x175F, LANGUAGE_BUHID}, // Buhid
-// {0x1760, 0x177F, LANGUAGE_TAGBANWA}, // Tagbanwa
- {0x1780, 0x17FF, LANGUAGE_KHMER}, // Khmer
- {0x18A0, 0x18AF, LANGUAGE_MONGOLIAN}, // Mongolian
-// {0x1900, 0x194F, LANGUAGE_LIMBU}, // Limbu
-// {0x1950, 0x197F, LANGUAGE_TAILE}, // Tai Le
-// {0x1980, 0x19DF, LANGUAGE_TAILUE}, // Tai Lue
- {0x19E0, 0x19FF, LANGUAGE_KHMER}, // Khmer Symbols
-// {0x1A00, 0x1A1F, LANGUAGE_BUGINESE}, // Buginese/Lontara
-// {0x1B00, 0x1B7F, LANGUAGE_BALINESE}, // Balinese
-// {0x1D00, 0x1DFF, LANGUAGE_NONE}, // Phonetic Symbols
- {0x1E00, 0x1EFF, LANGUAGE_ENGLISH}, // Latin Extended Additional
- {0x1F00, 0x1FFF, LANGUAGE_GREEK}, // Greek Extended
- {0x2C60, 0x2C7F, LANGUAGE_ENGLISH}, // Latin Extended-C
- {0x2E80, 0x2FFf, LANGUAGE_CHINESE_SIMPLIFIED}, // CJK Radicals Supplement + Kangxi Radical + Ideographic Description Characters
- {0x3000, 0x303F, LANGUAGE_DEFAULT_CJK}, // CJK Symbols and punctuation
- {0x3040, 0x30FF, LANGUAGE_JAPANESE}, // Japanese Hiragana + Katakana
- {0x3100, 0x312F, LANGUAGE_CHINESE_TRADITIONAL}, // Bopomofo
- {0x3130, 0x318F, LANGUAGE_KOREAN}, // Hangul Compatibility Jamo, Kocrean-specific
- {0x3190, 0x319F, LANGUAGE_JAPANESE}, // Kanbun
- {0x31A0, 0x31BF, LANGUAGE_CHINESE_TRADITIONAL}, // Bopomofo Extended
- {0x31C0, 0x31EF, LANGUAGE_DEFAULT_CJK}, // CJK Ideographs
- {0x31F0, 0x31FF, LANGUAGE_JAPANESE}, // Japanese Katakana Phonetic Extensions
- {0x3200, 0x321F, LANGUAGE_KOREAN}, // Parenthesized Hangul
- {0x3220, 0x325F, LANGUAGE_DEFAULT_CJK}, // Parenthesized Ideographs
- {0x3260, 0x327F, LANGUAGE_KOREAN}, // Circled Hangul
- {0x3280, 0x32CF, LANGUAGE_DEFAULT_CJK}, // Circled Ideographs
- {0x32d0, 0x32FF, LANGUAGE_JAPANESE}, // Japanese Circled Katakana
- {0x3400, 0x4DBF, LANGUAGE_DEFAULT_CJK}, // CJK Unified Ideographs Extension A
- {0x4E00, 0x9FCF, LANGUAGE_DEFAULT_CJK}, // Unified CJK Ideographs
- {0xA720, 0xA7FF, LANGUAGE_ENGLISH}, // Latin Extended-D
- {0xAC00, 0xD7AF, LANGUAGE_KOREAN}, // Hangul Syllables, Korean-specific
- {0xF900, 0xFAFF, LANGUAGE_DEFAULT_CJK}, // CJK Compatibility Ideographs
- {0xFB00, 0xFB4F, LANGUAGE_HEBREW}, // Hebrew Presentation Forms
- {0xFB50, 0xFDFF, LANGUAGE_ARABIC_PRIMARY_ONLY}, // Arabic Presentation Forms-A
- {0xFE70, 0xFEFE, LANGUAGE_ARABIC_PRIMARY_ONLY}, // Arabic Presentation Forms-B
- {0xFF65, 0xFF9F, LANGUAGE_JAPANESE}, // Japanese Halfwidth Katakana variant
- {0xFFA0, 0xFFDC, LANGUAGE_KOREAN}, // Kocrean halfwidth hangual variant
- {0x10140, 0x1018F, LANGUAGE_GREEK}, // Ancient Greak numbers
- {0x1D200, 0x1D24F, LANGUAGE_GREEK}, // Ancient Greek Musical
- {0x20000, 0x2A6DF, LANGUAGE_DEFAULT_CJK}, // CJK Unified Ideographs Extension B
- {0x2F800, 0x2FA1F, LANGUAGE_DEFAULT_CJK} // CJK Compatibility Ideographs Supplement
+// {0x1400, 0x167F, LANGUAGE_CANADIAN_ABORIGINAL}, // Canadian Aboriginial Syllabics
+// {0x1680, 0x169F, LANGUAGE_OGHAM}, // Ogham
+// {0x16A0, 0x16F0, LANGUAGE_RUNIC}, // Runic
+// {0x1700, 0x171F, LANGUAGE_TAGALOG}, // Tagalog
+// {0x1720, 0x173F, LANGUAGE_HANUNOO}, // Hanunoo
+// {0x1740, 0x175F, LANGUAGE_BUHID}, // Buhid
+// {0x1760, 0x177F, LANGUAGE_TAGBANWA}, // Tagbanwa
+ {0x1780, 0x17FF, LANGUAGE_KHMER}, // Khmer
+ {0x18A0, 0x18AF, LANGUAGE_MONGOLIAN}, // Mongolian
+// {0x1900, 0x194F, LANGUAGE_LIMBU}, // Limbu
+// {0x1950, 0x197F, LANGUAGE_TAILE}, // Tai Le
+// {0x1980, 0x19DF, LANGUAGE_TAILUE}, // Tai Lue
+ {0x19E0, 0x19FF, LANGUAGE_KHMER}, // Khmer Symbols
+// {0x1A00, 0x1A1F, LANGUAGE_BUGINESE}, // Buginese/Lontara
+// {0x1B00, 0x1B7F, LANGUAGE_BALINESE}, // Balinese
+// {0x1D00, 0x1DFF, LANGUAGE_NONE}, // Phonetic Symbols
+ {0x1E00, 0x1EFF, LANGUAGE_ENGLISH}, // Latin Extended Additional
+ {0x1F00, 0x1FFF, LANGUAGE_GREEK}, // Greek Extended
+ {0x2C60, 0x2C7F, LANGUAGE_ENGLISH}, // Latin Extended-C
+ {0x2E80, 0x2FFf, LANGUAGE_CHINESE_SIMPLIFIED}, // CJK Radicals Supplement + Kangxi Radical + Ideographic Description Characters
+ {0x3000, 0x303F, LANGUAGE_DEFAULT_CJK}, // CJK Symbols and punctuation
+ {0x3040, 0x30FF, LANGUAGE_JAPANESE}, // Japanese Hiragana + Katakana
+ {0x3100, 0x312F, LANGUAGE_CHINESE_TRADITIONAL}, // Bopomofo
+ {0x3130, 0x318F, LANGUAGE_KOREAN}, // Hangul Compatibility Jamo, Kocrean-specific
+ {0x3190, 0x319F, LANGUAGE_JAPANESE}, // Kanbun
+ {0x31A0, 0x31BF, LANGUAGE_CHINESE_TRADITIONAL}, // Bopomofo Extended
+ {0x31C0, 0x31EF, LANGUAGE_DEFAULT_CJK}, // CJK Ideographs
+ {0x31F0, 0x31FF, LANGUAGE_JAPANESE}, // Japanese Katakana Phonetic Extensions
+ {0x3200, 0x321F, LANGUAGE_KOREAN}, // Parenthesized Hangul
+ {0x3220, 0x325F, LANGUAGE_DEFAULT_CJK}, // Parenthesized Ideographs
+ {0x3260, 0x327F, LANGUAGE_KOREAN}, // Circled Hangul
+ {0x3280, 0x32CF, LANGUAGE_DEFAULT_CJK}, // Circled Ideographs
+ {0x32d0, 0x32FF, LANGUAGE_JAPANESE}, // Japanese Circled Katakana
+ {0x3400, 0x4DBF, LANGUAGE_DEFAULT_CJK}, // CJK Unified Ideographs Extension A
+ {0x4E00, 0x9FCF, LANGUAGE_DEFAULT_CJK}, // Unified CJK Ideographs
+ {0xA720, 0xA7FF, LANGUAGE_ENGLISH}, // Latin Extended-D
+ {0xAC00, 0xD7AF, LANGUAGE_KOREAN}, // Hangul Syllables, Korean-specific
+ {0xF900, 0xFAFF, LANGUAGE_DEFAULT_CJK}, // CJK Compatibility Ideographs
+ {0xFB00, 0xFB4F, LANGUAGE_HEBREW}, // Hebrew Presentation Forms
+ {0xFB50, 0xFDFF, LANGUAGE_ARABIC_PRIMARY_ONLY}, // Arabic Presentation Forms-A
+ {0xFE70, 0xFEFE, LANGUAGE_ARABIC_PRIMARY_ONLY}, // Arabic Presentation Forms-B
+ {0xFF65, 0xFF9F, LANGUAGE_JAPANESE}, // Japanese Halfwidth Katakana variant
+ {0xFFA0, 0xFFDC, LANGUAGE_KOREAN}, // Kocrean halfwidth hangual variant
+ {0x10140, 0x1018F, LANGUAGE_GREEK}, // Ancient Greak numbers
+ {0x1D200, 0x1D24F, LANGUAGE_GREEK}, // Ancient Greek Musical
+ {0x20000, 0x2A6DF, LANGUAGE_DEFAULT_CJK}, // CJK Unified Ideographs Extension B
+ {0x2F800, 0x2FA1F, LANGUAGE_DEFAULT_CJK} // CJK Compatibility Ideographs Supplement
};
// get language matching to the missing char
@@ -433,7 +433,7 @@ LanguageType MapCharToLanguage( sal_UCS4 uChar )
nDefaultLang = (LanguageType)rtl_str_toInt32( aKeyValBuf, 16 );
// TODO: use the default-CJK language selected in
- // Tools->Options->LangSettings->Languages when it becomes available here
+ // Tools->Options->LangSettings->Languages when it becomes available here
if( !nDefaultLang )
nDefaultLang = Application::GetSettings().GetUILanguage();
@@ -470,7 +470,7 @@ LanguageType MapCharToLanguage( sal_UCS4 uChar )
while( nLow <= nHigh )
{
int nMiddle = (nHigh + nLow) / 2;
- if( uChar < aLangFromCodeChart[ nMiddle].mnMinCode )
+ if( uChar < aLangFromCodeChart[ nMiddle].mnMinCode )
nHigh = nMiddle - 1;
else if( uChar > aLangFromCodeChart[ nMiddle].mnMaxCode )
nLow = nMiddle + 1;
@@ -485,7 +485,7 @@ class WinGlyphFallbackSubstititution
: public ImplGlyphFallbackFontSubstitution
{
public:
- explicit WinGlyphFallbackSubstititution( HDC );
+ explicit WinGlyphFallbackSubstititution( HDC );
bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingChars ) const;
private:
@@ -494,7 +494,7 @@ private:
};
inline WinGlyphFallbackSubstititution::WinGlyphFallbackSubstititution( HDC hDC )
-: mhDC( hDC )
+: mhDC( hDC )
{}
void ImplGetLogFontFromFontSelect( HDC, const ImplFontSelectData*,
@@ -517,7 +517,7 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( const ImplFontData* pFace,
// create HFONT from log font
HFONT hNewFont = ::CreateFontIndirectW( &aLogFont );
- // select the new font into device
+ // select the new font into device
HFONT hOldFont = ::SelectFont( mhDC, hNewFont );
// read CMAP table to update their pCharMap
@@ -539,7 +539,7 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( const ImplFontData* pFace,
// static const int nMaxMatchCount = 1; // TODO: check more missing characters?
const sal_Int32 nStrLen = rMissingChars.getLength();
for( sal_Int32 nStrIdx = 0; nStrIdx < nStrLen; ++nStrIdx )
- {
+ {
const sal_UCS4 uChar = rMissingChars.iterateCodePoints( &nStrIdx );
nMatchCount += pCharMap->HasChar( uChar );
break; // for now
@@ -573,7 +573,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
aLocale = Application::GetSettings().GetUILocale();
// first level fallback:
- // try use the locale specific default fonts defined in VCL.xcu
+ // try use the locale specific default fonts defined in VCL.xcu
const ImplDevFontList* pDevFontList = ImplGetSVData()->maGDIData.mpScreenFontList;
/*const*/ ImplDevFontListData* pDevFont = pDevFontList->ImplFindByLocale( aLocale );
if( pDevFont )
@@ -586,7 +586,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
}
}
- // are the missing characters symbols?
+ // are the missing characters symbols?
pDevFont = pDevFontList->ImplFindByAttributes( IMPL_FONT_ATTR_SYMBOL,
rFontSelData.meWeight, rFontSelData.meWidthType,
rFontSelData.meFamily, rFontSelData.meItalic, rFontSelData.maSearchName );
@@ -607,7 +607,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
int nTestFontCount = pTestFontList->Count();
if( nTestFontCount > MAX_GFBFONT_COUNT )
nTestFontCount = MAX_GFBFONT_COUNT;
-
+
for( int i = 0; i < nTestFontCount; ++i )
{
const ImplFontData* pFace = pTestFontList->Get( i );
@@ -2178,8 +2178,8 @@ static int WINAPI __AddFontResourceExW( LPCWSTR lpszfileName, DWORD fl, PVOID pd
{
typedef int (WINAPI *AddFontResourceExW_FUNC)(LPCWSTR, DWORD, PVOID );
- static AddFontResourceExW_FUNC pFunc = NULL;
- static HMODULE hmGDI = NULL;
+ static AddFontResourceExW_FUNC pFunc = NULL;
+ static HMODULE hmGDI = NULL;
if ( !pFunc && !hmGDI )
{
@@ -2207,7 +2207,7 @@ bool ImplAddTempFont( SalData& rSalData, const String& rFontFileURL )
#ifdef FR_PRIVATE
nRet = __AddFontResourceExW( reinterpret_cast<LPCWSTR>(aUSytemPath.getStr()), FR_PRIVATE, NULL );
#endif
-
+
if ( !nRet )
{
static int nCounter = 0;
@@ -2295,7 +2295,7 @@ static bool ImplGetFontAttrFromFile( const String& rFontFileURL,
OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL, aUSytemPath ) );
// get FontAttributes from a *fot file
- // TODO: use GetTTGlobalFontInfo() to access the font directly
+ // TODO: use GetTTGlobalFontInfo() to access the font directly
rDFA.mnQuality = 1000;
rDFA.mbDevice = true;
rDFA.meFamily = FAMILY_DONTKNOW;
@@ -2905,7 +2905,7 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
if( pGlyphIDs[i] & GF_ISCHAR ) // remaining pseudo-glyphs need to be translated
nGlyphIdx = pImplFontCharMap->GetGlyphIndex( nGlyphIdx );
- if( (pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0) // TODO: vertical substitution
+ if( (pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0) // TODO: vertical substitution
{/*####*/}
nRealGlyphIds[i] = nGlyphIdx;
@@ -2939,11 +2939,11 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
::GetTTGlobalFontInfo( aSftTTF.get(), &aTTInfo );
rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF;
rInfo.m_aPSName = ImplSalGetUniString( aTTInfo.psname );
- rInfo.m_nAscent = +aTTInfo.winAscent;
+ rInfo.m_nAscent = +aTTInfo.winAscent;
rInfo.m_nDescent = -aTTInfo.winDescent;
- rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
+ rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
Point( aTTInfo.xMax, aTTInfo.yMax ) );
- rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
+ rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
// subset TTF-glyphs and get their properties
// take care that subset fonts require the NotDef glyph in pos 0
@@ -3055,7 +3055,7 @@ const void* WinSalGraphics::GetEmbedFontData( const ImplFontData* pFont,
*pDataLen = 0;
pCharWidths[i] = nCharWidth;
}
-
+
if( !*pDataLen )
return NULL;
@@ -3110,11 +3110,11 @@ void WinSalGraphics::GetGlyphWidths( const ImplFontData* pFont,
// TODO: much better solution: move SetFont and restoration of old font to caller
ScopedFont aOldFont(*this);
-
+
float fScale = 0.0;
HFONT hOldFont = 0;
ImplDoSetFont( &aIFSD, fScale, hOldFont );
-
+
if( pFont->IsSubsettable() )
{
// get raw font file data
@@ -3126,12 +3126,12 @@ void WinSalGraphics::GetGlyphWidths( const ImplFontData* pFont,
sal_uInt32 nFaceNum = 0;
if( !*xRawFontData.get() ) // TTC candidate
nFaceNum = ~0U; // indicate "TTC font extracts only"
-
+
ScopedTrueTypeFont aSftTTF;
int nRC = aSftTTF.open( (void*)xRawFontData.get(), xRawFontData.size(), nFaceNum );
if( nRC != SF_OK )
return;
-
+
int nGlyphs = GetTTGlyphCount( aSftTTF.get() );
if( nGlyphs > 0 )
{
@@ -3185,7 +3185,7 @@ void WinSalGraphics::GetGlyphWidths( const ImplFontData* pFont,
rWidths.push_back( nCharWidth );
}
}
- }
+ }
}
//--------------------------------------------------------------------------
@@ -3201,14 +3201,14 @@ SystemFontData WinSalGraphics::GetSysFontData( int nFallbacklevel ) const
if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1;
if (nFallbacklevel < 0 ) nFallbacklevel = 0;
-
+
aSysFontData.nSize = sizeof( SystemFontData );
- aSysFontData.hFont = mhFonts[nFallbacklevel];
+ aSysFontData.hFont = mhFonts[nFallbacklevel];
aSysFontData.bFakeBold = false;
aSysFontData.bFakeItalic = false;
aSysFontData.bAntialias = true;
aSysFontData.bVerticalCharacterType = false;
-
+
OSL_TRACE("\r\n:WinSalGraphics::GetSysFontData(): FontID: %p, Fallback level: %d",
aSysFontData.hFont,
nFallbacklevel);
diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx
index 49f56a452faf..9be66be25b76 100644
--- a/vcl/win/source/gdi/salgdi_gdiplus.cxx
+++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,10 +38,10 @@
#include <tools/debug.hxx>
#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#if defined _MSC_VER
@@ -83,7 +83,7 @@ void impAddB2DPolygonToGDIPlusGraphicsPathReal(Gdiplus::GraphicsPath& rPath, con
const basegfx::B2DPoint aCb(rPolygon.getPrevControlPoint(nNextIndex));
rPath.AddBezier(
- aFCurr,
+ aFCurr,
Gdiplus::PointF(Gdiplus::REAL(aCa.getX()), Gdiplus::REAL(aCa.getY())),
Gdiplus::PointF(Gdiplus::REAL(aCb.getX()), Gdiplus::REAL(aCb.getY())),
aFNext);
@@ -129,7 +129,7 @@ void impAddB2DPolygonToGDIPlusGraphicsPathInteger(Gdiplus::GraphicsPath& rPath,
const basegfx::B2DPoint aCb(rPolygon.getPrevControlPoint(nNextIndex));
rPath.AddBezier(
- aICurr,
+ aICurr,
Gdiplus::Point(INT(aCa.getX()), INT(aCa.getY())),
Gdiplus::Point(INT(aCb.getX()), INT(aCb.getY())),
aINext);
@@ -247,7 +247,7 @@ bool WinSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolygon, double f
// #i101491# needed to create the correct line joins
aPath.CloseFigure();
}
-
+
if(getAntiAliasB2DDraw())
{
aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias);
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 884c8e7fc9ff..5f7ebc1dfaf6 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -166,7 +166,7 @@ HRESULT VisualStylesAPI::GetThemePartSize( HTHEME hTheme, HDC hdc, int iPartId,
/*********************************************************
- * Initialize XP theming and local stuff
+ * Initialize XP theming and local stuff
*********************************************************/
void SalData::initNWF( void )
{
@@ -245,8 +245,8 @@ BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
case CTRL_SPINBOX:
if( nPart == PART_ENTIRE_CONTROL )
hTheme = getThemeHandle( mhWnd, L"Edit");
- else if( nPart == PART_ALL_BUTTONS ||
- nPart == PART_BUTTON_UP || nPart == PART_BUTTON_DOWN ||
+ else if( nPart == PART_ALL_BUTTONS ||
+ nPart == PART_BUTTON_UP || nPart == PART_BUTTON_DOWN ||
nPart == PART_BUTTON_LEFT|| nPart == PART_BUTTON_RIGHT )
hTheme = getThemeHandle( mhWnd, L"Spin");
break;
@@ -360,7 +360,7 @@ Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const
// Helper functions
// ----
-void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, const Rectangle& rRect,
+void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, const Rectangle& rRect,
int* pLunaPart, int *pLunaState, RECT *pRect )
{
if( nControlPart == PART_BUTTON_DOWN )
@@ -420,7 +420,7 @@ void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState,
// ----
-BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
+BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
ControlType nType,
ControlPart nPart,
ControlState nState,
@@ -677,7 +677,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
else if( nState & CTRL_STATE_DEFAULT )
iState = PBS_DEFAULTED;
//else if( nState & CTRL_STATE_FOCUSED )
- // iState = PBS_DEFAULTED; // may need to draw focus rect
+ // iState = PBS_DEFAULTED; // may need to draw focus rect
else
iState = PBS_NORMAL;
@@ -699,7 +699,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
iState = bChecked ? RBS_CHECKEDNORMAL : RBS_UNCHECKEDNORMAL;
//if( nState & CTRL_STATE_FOCUSED )
- // iState |= PBS_DEFAULTED; // may need to draw focus rect
+ // iState |= PBS_DEFAULTED; // may need to draw focus rect
return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
}
@@ -710,20 +710,20 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
ButtonValue v = aValue.getTristateVal();
if( nState & CTRL_STATE_PRESSED )
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDPRESSED :
+ iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDPRESSED :
( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDPRESSED : CBS_MIXEDPRESSED );
else if( !(nState & CTRL_STATE_ENABLED) )
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDDISABLED :
+ iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDDISABLED :
( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDDISABLED : CBS_MIXEDDISABLED );
else if( nState & CTRL_STATE_ROLLOVER )
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDHOT :
+ iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDHOT :
( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDHOT : CBS_MIXEDHOT );
else
- iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDNORMAL :
+ iState = (v == BUTTONVALUE_ON) ? CBS_CHECKEDNORMAL :
( (v == BUTTONVALUE_OFF) ? CBS_UNCHECKEDNORMAL : CBS_MIXEDNORMAL );
//if( nState & CTRL_STATE_FOCUSED )
- // iState |= PBS_DEFAULTED; // may need to draw focus rect
+ // iState |= PBS_DEFAULTED; // may need to draw focus rect
//SIZE sz;
//THEMESIZE eSize = TS_DRAW; // TS_MIN, TS_TRUE, TS_DRAW
@@ -787,7 +787,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
{
iPart = TABP_TABITEMLEFTEDGE;
rc.bottom--;
-
+
OSL_ASSERT( aValue.getType() == CTRL_TAB_ITEM );
const TabitemValue *pValue = static_cast<const TabitemValue*>(&aValue);
@@ -801,7 +801,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
else if( pValue->isRightAligned() )
iPart = TABP_TABITEMRIGHTEDGE;
else iPart = TABP_TABITEM;
-
+
if( !(nState & CTRL_STATE_ENABLED) )
iState = TILES_DISABLED;
else if( nState & CTRL_STATE_SELECTED )
@@ -822,7 +822,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
else if( nState & CTRL_STATE_ROLLOVER )
iState = TILES_HOT;
else if( nState & CTRL_STATE_FOCUSED )
- iState = TILES_FOCUSED; // may need to draw focus rect
+ iState = TILES_FOCUSED; // may need to draw focus rect
else
iState = TILES_NORMAL;
return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
@@ -838,18 +838,18 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
//iState = TS_DISABLED;
// disabled buttons are typically not painted at all but we need visual
// feedback when travelling by keyboard over disabled entries
- iState = TS_HOT;
+ iState = TS_HOT;
else if( nState & CTRL_STATE_PRESSED )
iState = TS_PRESSED;
else if( nState & CTRL_STATE_ROLLOVER )
iState = bChecked ? TS_HOTCHECKED : TS_HOT;
- else
+ else
iState = bChecked ? TS_CHECKED : TS_NORMAL;
return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
}
else if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
{
- // the vertical gripper is not supported in most themes and it makes no
+ // the vertical gripper is not supported in most themes and it makes no
// sense to only support horizontal gripper
//iPart = (nPart == PART_THUMB_HORZ) ? RP_GRIPPERVERT : RP_GRIPPER;
//return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
@@ -878,7 +878,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
}
return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption);
}
-
+
if( nType == CTRL_PROGRESS )
{
if( nPart != PART_ENTIRE_CONTROL )
@@ -889,7 +889,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
RECT aProgressRect = rc;
if( vsAPI.GetThemeBackgroundContentRect( hTheme, hDC, PP_BAR, iState, &rc, &aProgressRect) != S_OK )
return false;
-
+
long nProgressWidth = aValue.getNumericVal();
nProgressWidth *= (aProgressRect.right - aProgressRect.left);
nProgressWidth /= (rc.right - rc.left);
@@ -900,12 +900,12 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
return ImplDrawTheme( hTheme, hDC, PP_CHUNK, iState, aProgressRect, aCaption );
}
-
+
if( nType == CTRL_SLIDER )
{
iPart = (nPart == PART_TRACK_HORZ_AREA) ? TKP_TRACK : TKP_TRACKVERT;
iState = (nPart == PART_TRACK_HORZ_AREA) ? TRS_NORMAL : TRVS_NORMAL;
-
+
Rectangle aTrackRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() );
RECT aTRect = rc;
if( nPart == PART_TRACK_HORZ_AREA )
@@ -919,9 +919,9 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
long nW = aTrackRect.GetWidth();
aTRect.left += (rc.right - rc.left - nW)/2;
aTRect.right = aTRect.left + nW;
- }
+ }
ImplDrawTheme( hTheme, hDC, iPart, iState, aTRect, aCaption );
-
+
RECT aThumbRect;
OSL_ASSERT( aValue.getType() == CTRL_SLIDER );
const SliderValue* pVal = static_cast<const SliderValue*>(&aValue);
@@ -933,7 +933,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
iState = (nState & CTRL_STATE_ENABLED) ? TUS_NORMAL : TUS_DISABLED;
return ImplDrawTheme( hTheme, hDC, iPart, iState, aThumbRect, aCaption );
}
-
+
if( nType == CTRL_LISTNODE )
{
if( nPart != PART_ENTIRE_CONTROL )
@@ -963,11 +963,11 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
*
* 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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
-BOOL WinSalGraphics::drawNativeControl( ControlType nType,
+BOOL WinSalGraphics::drawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -1066,7 +1066,7 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
// restore alignment
SetTextAlign( mhDC, ta );
-
+
//GdiFlush();
@@ -1080,11 +1080,11 @@ BOOL WinSalGraphics::drawNativeControl( 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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
-BOOL WinSalGraphics::drawNativeControlText( ControlType,
+BOOL WinSalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -1104,9 +1104,9 @@ BOOL WinSalGraphics::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)
- * aCaption: 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)
+ * aCaption: A caption or title string (like button text etc)
*/
BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
@@ -1125,13 +1125,13 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
{
/*
- // the vertical gripper is not supported in most themes and it makes no
+ // the vertical gripper is not supported in most themes and it makes no
// sense to only support horizontal gripper
HTHEME hTheme = getThemeHandle( mhWnd, L"Rebar");
if( hTheme )
{
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, nPart == PART_THUMB_HORZ ? RP_GRIPPERVERT : RP_GRIPPER,
+ Rectangle aRect( ImplGetThemeRect( hTheme, hDC, nPart == PART_THUMB_HORZ ? RP_GRIPPERVERT : RP_GRIPPER,
0, rControlRegion.GetBoundRect() ) );
if( nPart == PART_THUMB_HORZ && !aRect.IsEmpty() )
{
@@ -1151,7 +1151,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
HTHEME hTheme = getThemeHandle( mhWnd, L"Toolbar");
if( hTheme )
{
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, TP_SPLITBUTTONDROPDOWN,
+ Rectangle aRect( ImplGetThemeRect( hTheme, hDC, TP_SPLITBUTTONDROPDOWN,
TS_HOT, rControlRegion ) );
rNativeContentRegion = aRect;
rNativeBoundingRegion = rNativeContentRegion;
@@ -1165,7 +1165,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
HTHEME hTheme = getThemeHandle( mhWnd, L"Progress");
if( hTheme )
{
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, PP_BAR,
+ Rectangle aRect( ImplGetThemeRect( hTheme, hDC, PP_BAR,
0, rControlRegion ) );
rNativeContentRegion = aRect;
rNativeBoundingRegion = rNativeContentRegion;
@@ -1209,7 +1209,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
long nFontHeight = aNonClientMetrics.lfMessageFont.lfHeight;
if( nFontHeight < 0 )
nFontHeight = -nFontHeight;
-
+
if( aRect.GetHeight() && nFontHeight )
{
aRect.Bottom() += aRect.GetHeight();
@@ -1266,7 +1266,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
const TabitemValue *pValue = static_cast<const TabitemValue*>(&rControlValue);
if ( pValue->isBothAligned() )
--aControlRect.Right();
-
+
if ( nState & CTRL_STATE_SELECTED )
{
aControlRect.Left() -= 2;
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index c198386471b3..d8ec03b0c516 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,7 +67,7 @@
if (__builtin_setjmp(jmpbuf) == 0) \
{ \
han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER)
-
+
#define CATCH_DRIVER_EX_END(mes, p) \
} \
han.Reset()
@@ -189,11 +189,11 @@ static ULONG ImplWinQueueStatusToSal( DWORD nWinStatus )
static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
{
- DWORD i;
- DWORD n;
- DWORD nBytes = 0;
- DWORD nInfoPrn2;
- BOOL bFound = FALSE;
+ DWORD i;
+ DWORD n;
+ DWORD nBytes = 0;
+ DWORD nInfoPrn2;
+ BOOL bFound = FALSE;
PRINTER_INFO_2* pWinInfo2 = NULL;
PRINTER_INFO_2* pGetInfo2;
EnumPrintersA( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &nBytes, &nInfoPrn2 );
@@ -207,7 +207,7 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
{
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
pInfo->maPrinterName = ImplSalGetUniString( pGetInfo2->pPrinterName );
- pInfo->maDriver = ImplSalGetUniString( pGetInfo2->pDriverName );
+ pInfo->maDriver = ImplSalGetUniString( pGetInfo2->pDriverName );
XubString aPortName;
if ( pGetInfo2->pPortName )
aPortName = ImplSalGetUniString( pGetInfo2->pPortName );
@@ -219,9 +219,9 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
// pComment can be 0 (the Windows docu doesn't describe this)
if ( pGetInfo2->pComment )
pInfo->maComment = ImplSalGetUniString( pGetInfo2->pComment );
- pInfo->mnStatus = ImplWinQueueStatusToSal( pGetInfo2->Status );
- pInfo->mnJobs = pGetInfo2->cJobs;
- pInfo->mpSysData = new XubString( aPortName );
+ pInfo->mnStatus = ImplWinQueueStatusToSal( pGetInfo2->Status );
+ pInfo->mnJobs = pGetInfo2->cJobs;
+ pInfo->mpSysData = new XubString( aPortName );
pList->Add( pInfo );
pGetInfo2++;
}
@@ -233,9 +233,9 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
// read printers from win.ini
// TODO: MSDN: GetProfileString() should not be called from server
// code because it is just there for WIN16 compatibility
- UINT nSize = 4096;
- char* pBuf = new char[nSize];
- UINT nRead = GetProfileStringA( aImplDevices, NULL, "", pBuf, nSize );
+ UINT nSize = 4096;
+ char* pBuf = new char[nSize];
+ UINT nRead = GetProfileStringA( aImplDevices, NULL, "", pBuf, nSize );
while ( nRead >= nSize-2 )
{
nSize += 2048;
@@ -248,9 +248,9 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
char* pName = pBuf;
while ( *pName )
{
- char* pPortName;
- char* pTmp;
- char aPortBuf[256];
+ char* pPortName;
+ char* pTmp;
+ char aPortBuf[256];
GetProfileStringA( aImplDevices, pName, "", aPortBuf, sizeof( aPortBuf ) );
pPortName = aPortBuf;
@@ -297,11 +297,11 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
{
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
pInfo->maPrinterName = aName;
- pInfo->maDriver = aDriver;
- pInfo->maLocation = aPortName;
- pInfo->mnStatus = 0;
- pInfo->mnJobs = QUEUE_JOBS_DONTKNOW;
- pInfo->mpSysData = new XubString( aPortName );
+ pInfo->maDriver = aDriver;
+ pInfo->maLocation = aPortName;
+ pInfo->mnStatus = 0;
+ pInfo->mnJobs = QUEUE_JOBS_DONTKNOW;
+ pInfo->mpSysData = new XubString( aPortName );
pList->Add( pInfo );
}
}
@@ -321,9 +321,9 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
getPrinterQueueInfoOldStyle( pList );
return;
}
- DWORD i;
- DWORD nBytes = 0;
- DWORD nInfoPrn4 = 0;
+ DWORD i;
+ DWORD nBytes = 0;
+ DWORD nInfoPrn4 = 0;
PRINTER_INFO_4W* pWinInfo4 = NULL;
EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 4, NULL, 0, &nBytes, &nInfoPrn4 );
if ( nBytes )
@@ -335,9 +335,9 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
{
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
pInfo->maPrinterName = UniString( reinterpret_cast< const sal_Unicode* >(pWinInfo4[i].pPrinterName) );
- pInfo->mnStatus = 0;
- pInfo->mnJobs = 0;
- pInfo->mpSysData = NULL;
+ pInfo->mnStatus = 0;
+ pInfo->mnJobs = 0;
+ pInfo->mpSysData = NULL;
pList->Add( pInfo );
}
}
@@ -349,9 +349,9 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
static void getPrinterQueueStateOldStyle( SalPrinterQueueInfo* pInfo )
{
- DWORD nBytes = 0;
- DWORD nInfoRet;
- PRINTER_INFO_2* pWinInfo2;
+ DWORD nBytes = 0;
+ DWORD nInfoRet;
+ PRINTER_INFO_2* pWinInfo2;
EnumPrintersA( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &nBytes, &nInfoRet );
if ( nBytes )
{
@@ -377,10 +377,10 @@ static void getPrinterQueueStateOldStyle( SalPrinterQueueInfo* pInfo )
// pComment can be 0 (the Windows docu doesn't describe this)
if ( pGetInfo2->pComment )
pInfo->maComment = ImplSalGetUniString( pGetInfo2->pComment );
- pInfo->mnStatus = ImplWinQueueStatusToSal( pGetInfo2->Status );
- pInfo->mnJobs = pGetInfo2->cJobs;
+ pInfo->mnStatus = ImplWinQueueStatusToSal( pGetInfo2->Status );
+ pInfo->mnJobs = pGetInfo2->cJobs;
if( ! pInfo->mpSysData )
- pInfo->mpSysData = new XubString( aPortName );
+ pInfo->mpSysData = new XubString( aPortName );
break;
}
@@ -399,12 +399,12 @@ void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo )
getPrinterQueueStateOldStyle( pInfo );
return;
}
-
+
HANDLE hPrinter = 0;
LPWSTR pPrnName = reinterpret_cast<LPWSTR>(const_cast<sal_Unicode*>(pInfo->maPrinterName.GetBuffer()));
if( OpenPrinterW( pPrnName, &hPrinter, NULL ) )
{
- DWORD nBytes = 0;
+ DWORD nBytes = 0;
GetPrinterW( hPrinter, 2, NULL, 0, &nBytes );
if( nBytes )
{
@@ -424,10 +424,10 @@ void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo )
// pComment can be 0 (the Windows docu doesn't describe this)
if ( pWinInfo2->pComment )
pInfo->maComment = String( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pComment) );
- pInfo->mnStatus = ImplWinQueueStatusToSal( pWinInfo2->Status );
- pInfo->mnJobs = pWinInfo2->cJobs;
+ pInfo->mnStatus = ImplWinQueueStatusToSal( pWinInfo2->Status );
+ pInfo->mnJobs = pWinInfo2->cJobs;
if( ! pInfo->mpSysData )
- pInfo->mpSysData = new XubString( aPortName );
+ pInfo->mpSysData = new XubString( aPortName );
}
rtl_freeMemory(pWinInfo2);
}
@@ -513,7 +513,7 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps,
pDevMode = NULL;
else
pDevMode = SAL_DEVMODE_W( pSetupData );
-
+
return DeviceCapabilitiesW( reinterpret_cast<LPCWSTR>(pPrinter->maDeviceName.GetBuffer()),
reinterpret_cast<LPCWSTR>(pPrinter->maPortName.GetBuffer()),
nCaps, (LPWSTR)pOutput, pDevMode );
@@ -525,7 +525,7 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps,
pDevMode = NULL;
else
pDevMode = SAL_DEVMODE_A( pSetupData );
-
+
return DeviceCapabilitiesA( ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE ).GetBuffer(),
ImplSalGetWinAnsiString( pPrinter->maPortName, TRUE ).GetBuffer(),
nCaps, (LPSTR)pOutput, pDevMode );
@@ -596,7 +596,7 @@ static BOOL ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
(LPSTR)aPrinterNameA.GetBuffer(),
NULL, NULL, 0 );
}
-
+
if( nSysJobSize < 0 )
{
ClosePrinter( hPrn );
@@ -679,12 +679,12 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
if( hPrn == HGDI_ERROR )
return FALSE;
- LONG nRet;
- LONG nSysJobSize = -1;
- HWND hWnd = 0;
- DWORD nMode = DM_OUT_BUFFER;
- ULONG nDriverDataLen = 0;
- SalDriverData* pOutBuffer = NULL;
+ LONG nRet;
+ LONG nSysJobSize = -1;
+ HWND hWnd = 0;
+ DWORD nMode = DM_OUT_BUFFER;
+ ULONG nDriverDataLen = 0;
+ SalDriverData* pOutBuffer = NULL;
BYTE* pInBuffer = NULL;
if( aSalShlData.mbWPrinter )
@@ -704,12 +704,12 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
// Outputbuffer anlegen
- nDriverDataLen = sizeof(SalDriverData) + nSysJobSize-1;
- pOutBuffer = (SalDriverData*)rtl_allocateZeroMemory( nDriverDataLen );
- pOutBuffer->mnSysSignature = SAL_DRIVERDATA_SYSSIGN;
- pOutBuffer->mnVersion = aSalShlData.mbWPrinter ? SAL_DRIVERDATA_VERSION_W : SAL_DRIVERDATA_VERSION_A;
+ nDriverDataLen = sizeof(SalDriverData) + nSysJobSize-1;
+ pOutBuffer = (SalDriverData*)rtl_allocateZeroMemory( nDriverDataLen );
+ pOutBuffer->mnSysSignature = SAL_DRIVERDATA_SYSSIGN;
+ pOutBuffer->mnVersion = aSalShlData.mbWPrinter ? SAL_DRIVERDATA_VERSION_W : SAL_DRIVERDATA_VERSION_A;
// calculate driver data offset including structure padding
- pOutBuffer->mnDriverOffset = sal::static_int_cast<USHORT>(
+ pOutBuffer->mnDriverOffset = sal::static_int_cast<USHORT>(
(char*)pOutBuffer->maDriverData -
(char*)pOutBuffer );
@@ -731,7 +731,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
ULONG nMutexCount=0;
if ( pVisibleDlgParent )
nMutexCount = ImplSalReleaseYieldMutex();
-
+
BYTE* pOutDevMode = (((BYTE*)pOutBuffer) + pOutBuffer->mnDriverOffset);
if( aSalShlData.mbWPrinter )
{
@@ -791,8 +791,8 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
if ( pSetupData->mpDriverData )
rtl_freeMemory( pSetupData->mpDriverData );
pSetupData->mnDriverDataLen = nDriverDataLen;
- pSetupData->mpDriverData = (BYTE*)pOutBuffer;
- pSetupData->mnSystem = JOBSETUP_SYSTEM_WINDOWS;
+ pSetupData->mpDriverData = (BYTE*)pOutBuffer;
+ pSetupData->mnSystem = JOBSETUP_SYSTEM_WINDOWS;
return TRUE;
}
@@ -859,10 +859,10 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
else
{
- ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
- WORD* pPapers = NULL;
- ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
- POINT* pPaperSizes = NULL;
+ ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
+ WORD* pPapers = NULL;
+ ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
+ POINT* pPaperSizes = NULL;
if ( nPaperCount && (nPaperCount != GDI_ERROR) )
{
pPapers = (WORD*)rtl_allocateZeroMemory(nPaperCount*sizeof(WORD));
@@ -922,14 +922,14 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
//See http://wiki.services.openoffice.org/wiki/DefaultPaperSize
//i.e.
//http://msdn.microsoft.com/en-us/library/dd319099(VS.85).aspx
- //DMPAPER_B4 12 B4 (JIS) 257 x 364 mm
+ //DMPAPER_B4 12 B4 (JIS) 257 x 364 mm
//http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf
//also says that the MS DMPAPER_B4 is JIS, which makes most sense. And
//matches our Excel filter's belief about the matching XlPaperSize
//enumeration.
//
//http://msdn.microsoft.com/en-us/library/ms776398(VS.85).aspx said
- ////"DMPAPER_B4 12 B4 (JIS) 250 x 354"
+ ////"DMPAPER_B4 12 B4 (JIS) 250 x 354"
//which is bogus as it's either JIS 257 × 364 or ISO 250 × 353
//(cmc)
case( DMPAPER_B4 ):
@@ -1057,7 +1057,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
break;
}
}
-
+
if( nFlags & SAL_JOBSET_DUPLEXMODE )
{
DuplexMode eDuplex = DUPLEX_UNKNOWN;
@@ -1111,8 +1111,8 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
// PaperSize
if ( nFlags & SAL_JOBSET_PAPERSIZE )
{
- CHOOSE_DEVMODE(dmFields) |= DM_PAPERSIZE;
- CHOOSE_DEVMODE(dmPaperWidth) = 0;
+ CHOOSE_DEVMODE(dmFields) |= DM_PAPERSIZE;
+ CHOOSE_DEVMODE(dmPaperWidth) = 0;
CHOOSE_DEVMODE(dmPaperLength) = 0;
switch( pSetupData->mePaperFormat )
@@ -1144,11 +1144,11 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
#if 0
//http://msdn.microsoft.com/en-us/library/ms776398(VS.85).aspx
//DMPAPER_ENV_B6 is documented as:
- //"DMPAPER_ENV_B6 35 Envelope B6 176 x 125 mm"
+ //"DMPAPER_ENV_B6 35 Envelope B6 176 x 125 mm"
//which is the wrong way around, it is surely 125 x 176, i.e.
//compare DMPAPER_ENV_B4 and DMPAPER_ENV_B4 as
- //DMPAPER_ENV_B4 33 Envelope B4 250 x 353 mm
- //DMPAPER_ENV_B5 34 Envelope B5 176 x 250 mm
+ //DMPAPER_ENV_B4 33 Envelope B4 250 x 353 mm
+ //DMPAPER_ENV_B5 34 Envelope B5 176 x 250 mm
case( PAPER_B6_ISO ):
CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_ENV_B6;
break;
@@ -1273,12 +1273,12 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
break;
default:
{
- short nPaper = 0;
- ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
- WORD* pPapers = NULL;
- ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
- POINT* pPaperSizes = NULL;
- DWORD nLandscapeAngle = ImplDeviceCaps( pPrinter, DC_ORIENTATION, NULL, pSetupData );
+ short nPaper = 0;
+ ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
+ WORD* pPapers = NULL;
+ ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
+ POINT* pPaperSizes = NULL;
+ DWORD nLandscapeAngle = ImplDeviceCaps( pPrinter, DC_ORIENTATION, NULL, pSetupData );
if ( nPaperCount && (nPaperCount != GDI_ERROR) )
{
pPapers = (WORD*)rtl_allocateZeroMemory(nPaperCount*sizeof(WORD));
@@ -1324,9 +1324,9 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
if ( !nPaper )
{
- CHOOSE_DEVMODE(dmFields) |= DM_PAPERLENGTH | DM_PAPERWIDTH;
- CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_USER;
- CHOOSE_DEVMODE(dmPaperWidth) = (short)(pSetupData->mnPaperWidth/10);
+ CHOOSE_DEVMODE(dmFields) |= DM_PAPERLENGTH | DM_PAPERWIDTH;
+ CHOOSE_DEVMODE(dmPaperSize) = DMPAPER_USER;
+ CHOOSE_DEVMODE(dmPaperWidth) = (short)(pSetupData->mnPaperWidth/10);
CHOOSE_DEVMODE(dmPaperLength) = (short)(pSetupData->mnPaperHeight/10);
}
@@ -1452,12 +1452,12 @@ static WinSalGraphics* ImplCreateSalPrnGraphics( HDC hDC )
{
WinSalGraphics* pGraphics = new WinSalGraphics;
pGraphics->SetLayout( 0 );
- pGraphics->mhDC = hDC;
- pGraphics->mhWnd = 0;
+ pGraphics->mhDC = hDC;
+ pGraphics->mhWnd = 0;
pGraphics->mbPrinter = TRUE;
- pGraphics->mbVirDev = FALSE;
- pGraphics->mbWindow = FALSE;
- pGraphics->mbScreen = FALSE;
+ pGraphics->mbVirDev = FALSE;
+ pGraphics->mbWindow = FALSE;
+ pGraphics->mbScreen = FALSE;
ImplSalInitGraphics( pGraphics );
return pGraphics;
}
@@ -1478,7 +1478,7 @@ static BOOL ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetu
}
pPrinter->mpGraphics = ImplCreateSalPrnGraphics( hNewDC );
- pPrinter->mhDC = hNewDC;
+ pPrinter->mhDC = hNewDC;
return TRUE;
}
@@ -1491,9 +1491,9 @@ SalInfoPrinter* WinSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
WinSalInfoPrinter* pPrinter = new WinSalInfoPrinter;
if( ! pQueueInfo->mpSysData )
GetPrinterQueueState( pQueueInfo );
- pPrinter->maDriverName = pQueueInfo->maDriver;
- pPrinter->maDeviceName = pQueueInfo->maPrinterName;
- pPrinter->maPortName = pQueueInfo->mpSysData ?
+ pPrinter->maDriverName = pQueueInfo->maDriver;
+ pPrinter->maDeviceName = pQueueInfo->maPrinterName;
+ pPrinter->maPortName = pQueueInfo->mpSysData ?
*(String*)(pQueueInfo->mpSysData)
: String();
@@ -1508,7 +1508,7 @@ SalInfoPrinter* WinSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
}
pPrinter->mpGraphics = ImplCreateSalPrnGraphics( hDC );
- pPrinter->mhDC = hDC;
+ pPrinter->mhDC = hDC;
if ( !pSetupData->mpDriverData )
ImplUpdateSalJobSetup( pPrinter, pSetupData, FALSE, NULL );
ImplDevModeToJobSetup( pPrinter, pSetupData, SAL_JOBSET_ALL );
@@ -1759,12 +1759,12 @@ void WinSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
{
HDC hDC = mhDC;
- rOutWidth = GetDeviceCaps( hDC, HORZRES );
- rOutHeight = GetDeviceCaps( hDC, VERTRES );
+ rOutWidth = GetDeviceCaps( hDC, HORZRES );
+ rOutHeight = GetDeviceCaps( hDC, VERTRES );
- rPageOffX = GetDeviceCaps( hDC, PHYSICALOFFSETX );
- rPageOffY = GetDeviceCaps( hDC, PHYSICALOFFSETY );
- rPageWidth = GetDeviceCaps( hDC, PHYSICALWIDTH );
+ rPageOffX = GetDeviceCaps( hDC, PHYSICALOFFSETX );
+ rPageOffY = GetDeviceCaps( hDC, PHYSICALOFFSETY );
+ rPageWidth = GetDeviceCaps( hDC, PHYSICALWIDTH );
rPageHeight = GetDeviceCaps( hDC, PHYSICALHEIGHT );
}
@@ -1788,10 +1788,10 @@ void WinSalInstance::DestroyPrinter( SalPrinter* pPrinter )
WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
WinSalPrinter* pPrinter;
- BOOL bWhile = TRUE;
- int i = 0;
+ BOOL bWhile = TRUE;
+ int i = 0;
do
{
@@ -1839,7 +1839,7 @@ static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCo
memcpy( pNewDevMode, pDevMode, nDevSize );
pDevMode = pNewDevMode;
pDevMode->dmFields |= DM_COPIES;
- pDevMode->dmCopies = (short)(USHORT)nCopies;
+ pDevMode->dmCopies = (short)(USHORT)nCopies;
if ( aSalShlData.mbW40 )
{
pDevMode->dmFields |= DM_COLLATE;
@@ -1865,7 +1865,7 @@ static LPDEVMODEW ImplSalSetCopies( LPDEVMODEW pDevMode, ULONG nCopies, BOOL bCo
memcpy( pNewDevMode, pDevMode, nDevSize );
pDevMode = pNewDevMode;
pDevMode->dmFields |= DM_COPIES;
- pDevMode->dmCopies = (short)(USHORT)nCopies;
+ pDevMode->dmCopies = (short)(USHORT)nCopies;
if ( aSalShlData.mbW40 )
{
pDevMode->dmFields |= DM_COLLATE;
@@ -1969,15 +1969,15 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
bool /*bDirect*/,
ImplJobSetup* pSetupData )
{
- mnError = 0;
- mbAbort = FALSE;
- mnCopies = nCopies;
- mbCollate = bCollate;
-
- LPDEVMODEA pOrgDevModeA = NULL;
- LPDEVMODEA pDevModeA = NULL;
- LPDEVMODEW pOrgDevModeW = NULL;
- LPDEVMODEW pDevModeW = NULL;
+ mnError = 0;
+ mbAbort = FALSE;
+ mnCopies = nCopies;
+ mbCollate = bCollate;
+
+ LPDEVMODEA pOrgDevModeA = NULL;
+ LPDEVMODEA pDevModeA = NULL;
+ LPDEVMODEW pOrgDevModeW = NULL;
+ LPDEVMODEW pDevModeW = NULL;
HDC hDC = 0;
if( aSalShlData.mbWPrinter )
{
@@ -1988,7 +1988,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
}
else
pDevModeW = NULL;
-
+
// #95347 some buggy drivers (eg, OKI) write to those buffers in CreateDC, although declared const - so provide some space
sal_Unicode aDrvBuf[4096];
sal_Unicode aDevBuf[4096];
@@ -1998,7 +1998,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
reinterpret_cast<LPCWSTR>(aDevBuf),
NULL,
pDevModeW );
-
+
if ( pDevModeW != pOrgDevModeW )
rtl_freeMemory( pDevModeW );
}
@@ -2011,7 +2011,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
}
else
pDevModeA = NULL;
-
+
// #95347 some buggy drivers (eg, OKI) write to those buffers in CreateDC, although declared const - so provide some space
ByteString aDriver ( ImplSalGetWinAnsiString( mpInfoPrinter->maDriverName, TRUE ) );
ByteString aDevice ( ImplSalGetWinAnsiString( mpInfoPrinter->maDeviceName, TRUE ) );
@@ -2025,10 +2025,10 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
lpszDeviceName,
NULL,
pDevModeA );
-
+
delete [] lpszDriverName;
delete [] lpszDeviceName;
-
+
if ( pDevModeA != pOrgDevModeA )
rtl_freeMemory( pDevModeA );
}
@@ -2047,8 +2047,8 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
return FALSE;
}
- mnError = 0;
- mbAbort = FALSE;
+ mnError = 0;
+ mbAbort = FALSE;
// Wegen Telocom Balloon Fax-Treiber, der uns unsere Messages
// ansonsten oefters schickt, versuchen wir vorher alle
@@ -2126,10 +2126,10 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
}
else
aInfo.lpszOutput = NULL;
-
+
// start Job
int nRet = lcl_StartDocW( hDC, &aInfo, this );
-
+
if ( nRet <= 0 )
{
long nError = GetLastError();
@@ -2137,7 +2137,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
mnError = SAL_PRINTER_ERROR_ABORT;
else
mnError = SAL_PRINTER_ERROR_GENERALERROR;
- return FALSE;
+ return FALSE;
}
}
else
@@ -2145,7 +2145,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
// Both strings must exist, if StartJob() is called
ByteString aJobName( ImplSalGetWinAnsiString( rJobName, TRUE ) );
ByteString aFileName;
-
+
DOCINFOA aInfo;
memset( &aInfo, 0, sizeof( DOCINFOA ) );
aInfo.cbSize = sizeof( aInfo );
@@ -2162,7 +2162,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
}
else
aInfo.lpszOutput = NULL;
-
+
// start Job
int nRet = lcl_StartDocA( hDC, &aInfo, this );
if ( nRet <= 0 )
@@ -2206,7 +2206,7 @@ BOOL WinSalPrinter::EndJob()
if( ::EndDoc( hDC ) <= 0 )
err = GetLastError();
CATCH_DRIVER_EX_END( "exception in EndDoc", this );
-
+
pSalData->mpFirstInstance->AcquireYieldMutex( nAcquire );
DeleteDC( hDC );
mhDC = 0;
@@ -2237,7 +2237,7 @@ BOOL WinSalPrinter::AbortJob()
void ImplSalPrinterAbortJobAsync( HDC hPrnDC )
{
- SalData* pSalData = GetSalData();
+ SalData* pSalData = GetSalData();
WinSalPrinter* pPrinter = pSalData->mpFirstPrinter;
// Feststellen, ob Printer noch existiert
@@ -2278,14 +2278,14 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat
{
if( ! isValid() || mhDC == 0 )
return NULL;
-
+
HDC hDC = mhDC;
if ( pSetupData && pSetupData->mpDriverData && bNewJobData )
{
if( aSalShlData.mbWPrinter )
{
- LPDEVMODEW pOrgDevModeW;
- LPDEVMODEW pDevModeW;
+ LPDEVMODEW pOrgDevModeW;
+ LPDEVMODEW pDevModeW;
pOrgDevModeW = SAL_DEVMODE_W( pSetupData );
pDevModeW = ImplSalSetCopies( pOrgDevModeW, mnCopies, mbCollate );
ResetDCW( hDC, pDevModeW );
@@ -2294,8 +2294,8 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat
}
else
{
- LPDEVMODEA pOrgDevModeA;
- LPDEVMODEA pDevModeA;
+ LPDEVMODEA pOrgDevModeA;
+ LPDEVMODEA pDevModeA;
pOrgDevModeA = SAL_DEVMODE_A( pSetupData );
pDevModeA = ImplSalSetCopies( pOrgDevModeA, mnCopies, mbCollate );
ResetDCA( hDC, pDevModeA );
@@ -2307,7 +2307,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat
CATCH_DRIVER_EX_BEGIN;
nRet = ::StartPage( hDC );
CATCH_DRIVER_EX_END( "exception in StartPage", this );
-
+
if ( nRet <= 0 )
{
GetLastError();
@@ -2317,8 +2317,8 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat
// Hack to work around old PostScript printer drivers optimizing away empty pages
// TODO: move into ImplCreateSalPrnGraphics()?
- HPEN hTempPen = SelectPen( hDC, GetStockPen( NULL_PEN ) );
- HBRUSH hTempBrush = SelectBrush( hDC, GetStockBrush( NULL_BRUSH ) );
+ HPEN hTempPen = SelectPen( hDC, GetStockPen( NULL_PEN ) );
+ HBRUSH hTempBrush = SelectBrush( hDC, GetStockBrush( NULL_BRUSH ) );
WIN_Rectangle( hDC, -8000, -8000, -7999, -7999 );
SelectPen( hDC, hTempPen );
SelectBrush( hDC, hTempBrush );
@@ -2341,7 +2341,7 @@ BOOL WinSalPrinter::EndPage()
if( ! isValid() )
return FALSE;
-
+
int nRet = 0;
CATCH_DRIVER_EX_BEGIN;
nRet = ::EndPage( hDC );
diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx
index a076409aa0ea..d69727e9a460 100644
--- a/vcl/win/source/gdi/salvd.cxx
+++ b/vcl/win/source/gdi/salvd.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,9 +65,9 @@ static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY,
aBitmapInfo.bmiHeader.biYPelsPerMeter = 0;
aBitmapInfo.bmiHeader.biClrUsed = 0;
aBitmapInfo.bmiHeader.biClrImportant = 0;
-
+
void* pDummy;
- hBitmap = CreateDIBSection( hDC, &aBitmapInfo,
+ hBitmap = CreateDIBSection( hDC, &aBitmapInfo,
DIB_RGB_COLORS, &pDummy, NULL,
0 );
}
@@ -84,7 +84,7 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
{
WinSalGraphics* pGraphics = static_cast<WinSalGraphics*>(pSGraphics);
- HDC hDC = NULL;
+ HDC hDC = NULL;
HBITMAP hBmp = NULL;
BOOL bOk = FALSE;
@@ -96,11 +96,11 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
}
else
{
- hDC = CreateCompatibleDC( pGraphics->mhDC );
+ hDC = CreateCompatibleDC( pGraphics->mhDC );
if( !hDC )
ImplWriteLastError( GetLastError(), "CreateCompatibleDC in CreateVirtualDevice" );
- hBmp = ImplCreateVirDevBitmap( pGraphics->mhDC,
+ hBmp = ImplCreateVirDevBitmap( pGraphics->mhDC,
nDX, nDY, nBitCount );
if( !hBmp )
ImplWriteLastError( GetLastError(), "ImplCreateVirDevBitmap in CreateVirtualDevice" );
@@ -115,12 +115,12 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
if ( bOk )
{
- WinSalVirtualDevice* pVDev = new WinSalVirtualDevice;
+ WinSalVirtualDevice* pVDev = new WinSalVirtualDevice;
SalData* pSalData = GetSalData();
WinSalGraphics* pVirGraphics = new WinSalGraphics;
pVirGraphics->SetLayout( 0 ); // by default no! mirroring for VirtualDevices, can be enabled with EnableRTL()
- pVirGraphics->mhDC = hDC;
- pVirGraphics->mhWnd = 0;
+ pVirGraphics->mhDC = hDC;
+ pVirGraphics->mhWnd = 0;
pVirGraphics->mbPrinter = FALSE;
pVirGraphics->mbVirDev = TRUE;
pVirGraphics->mbWindow = FALSE;
@@ -132,15 +132,15 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
}
ImplSalInitGraphics( pVirGraphics );
- pVDev->mhDC = hDC;
- pVDev->mhBmp = hBmp;
+ pVDev->mhDC = hDC;
+ pVDev->mhBmp = hBmp;
if( hBmp )
- pVDev->mhDefBmp = SelectBitmap( hDC, hBmp );
+ pVDev->mhDefBmp = SelectBitmap( hDC, hBmp );
else
pVDev->mhDefBmp = NULL;
- pVDev->mpGraphics = pVirGraphics;
- pVDev->mnBitCount = nBitCount;
- pVDev->mbGraphics = FALSE;
+ pVDev->mpGraphics = pVirGraphics;
+ pVDev->mnBitCount = nBitCount;
+ pVDev->mbGraphics = FALSE;
pVDev->mbForeignDC = (pData != NULL);
// insert VirDev in VirDevList
@@ -170,13 +170,13 @@ void WinSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
WinSalVirtualDevice::WinSalVirtualDevice()
{
- mhDC = (HDC) NULL; // HDC or 0 for Cache Device
- mhBmp = (HBITMAP) NULL; // Memory Bitmap
- mhDefBmp = (HBITMAP) NULL; // Default Bitmap
- mpGraphics = NULL; // current VirDev graphics
- mpNext = NULL; // next VirDev
- mnBitCount = 0; // BitCount (0 or 1)
- mbGraphics = FALSE; // is Graphics used
+ mhDC = (HDC) NULL; // HDC or 0 for Cache Device
+ mhBmp = (HBITMAP) NULL; // Memory Bitmap
+ mhDefBmp = (HBITMAP) NULL; // Default Bitmap
+ mpGraphics = NULL; // current VirDev graphics
+ mpNext = NULL; // next VirDev
+ mnBitCount = 0; // BitCount (0 or 1)
+ mbGraphics = FALSE; // is Graphics used
mbForeignDC = FALSE; // uses a foreign DC instead of a bitmap
}
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 9ef1035fc21c..0be43f46a84c 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -118,14 +118,14 @@ public:
int GetCachedGlyphWidth( int nCharCode ) const;
void CacheGlyphWidth( int nCharCode, int nCharWidth );
- bool InitKashidaHandling( HDC );
- int GetMinKashidaWidth() const { return mnMinKashidaWidth; }
- int GetMinKashidaGlyph() const { return mnMinKashidaGlyph; }
+ bool InitKashidaHandling( HDC );
+ int GetMinKashidaWidth() const { return mnMinKashidaWidth; }
+ int GetMinKashidaGlyph() const { return mnMinKashidaGlyph; }
private:
IntMap maWidthMap;
- mutable int mnMinKashidaWidth;
- mutable int mnMinKashidaGlyph;
+ mutable int mnMinKashidaWidth;
+ mutable int mnMinKashidaGlyph;
};
// -----------------------------------------------------------------------
@@ -1958,11 +1958,11 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos,
}
else
{
- nExtraOfs += nToFillWidth; // at right of cell
- nSubIter = 0; // done with glyph injection
+ nExtraOfs += nToFillWidth; // at right of cell
+ nSubIter = 0; // done with glyph injection
}
if( !bManualCellAlign )
- nExtraOfs -= nExtraWidth; // adjust for right-aligned cells
+ nExtraOfs -= nExtraWidth; // adjust for right-aligned cells
// adjust the draw position for the injected-glyphs case
if( nExtraOfs )
@@ -2171,7 +2171,7 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
}
// If there are still glyphs in the cluster and mnMinGlyphPos
// has changed then we need to remove the dropped glyphs at start
- // to correct logClusters, which is unsigned and relative to the
+ // to correct logClusters, which is unsigned and relative to the
// item start.
if (rVI.mnMinGlyphPos != nOrigMinGlyphPos)
{
@@ -2473,9 +2473,9 @@ void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs )
if( rVisualItem.IsRTL() )
{
for( i = rVisualItem.mnMinGlyphPos; i < rVisualItem.mnEndGlyphPos; ++i )
- if ( (1U << mpVisualAttrs[i].uJustification) & 0xFF82 ) // any Arabic justification
+ if ( (1U << mpVisualAttrs[i].uJustification) & 0xFF82 ) // any Arabic justification
{ // excluding SCRIPT_JUSTIFY_NONE
- // yes
+ // yes
rVisualItem.mbHasKashidas = true;
// so prepare for kashida handling
InitKashidaHandling();
@@ -2528,7 +2528,7 @@ void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs )
{
for( i = nMinGlyphPos; i < nEndGlyphPos; ++i )
nXOffset += mpJustifications[ i ];
-
+
if( rVisualItem.mbHasKashidas )
KashidaItemFix( nMinGlyphPos, nEndGlyphPos );
}
@@ -2559,7 +2559,7 @@ void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs )
void UniscribeLayout::InitKashidaHandling()
{
- if( mnMinKashidaGlyph != 0 ) // already initialized
+ if( mnMinKashidaGlyph != 0 ) // already initialized
return;
mrWinFontEntry.InitKashidaHandling( mhDC );
@@ -2576,8 +2576,8 @@ void UniscribeLayout::KashidaItemFix( int nMinGlyphPos, int nEndGlyphPos )
{
// check for vowels
if( (i > nMinGlyphPos && !mpGlyphAdvances[ i-1 ])
- && (1U << mpVisualAttrs[i].uJustification) & 0xFF83 ) // all Arabic justifiction types
- { // including SCRIPT_JUSTIFY_NONE
+ && (1U << mpVisualAttrs[i].uJustification) & 0xFF83 ) // all Arabic justifiction types
+ { // including SCRIPT_JUSTIFY_NONE
// vowel, we do it like ScriptJustify does
// the vowel gets the extra width
long nSpaceAdded = mpJustifications[ i ] - mpGlyphAdvances[ i ];
@@ -2627,7 +2627,7 @@ bool UniscribeLayout::KashidaWordFix ( int nMinGlyphPos, int nEndGlyphPos, int*
if ( nMaxAdded <= 0 )
return false;
// return early if there is not enough space for an extra kashida
- if( 2*nMaxAdded < mnMinKashidaWidth )
+ if( 2*nMaxAdded < mnMinKashidaWidth )
return false;
// redistribute the extra spacing to the kashida position
@@ -2651,7 +2651,7 @@ bool UniscribeLayout::KashidaWordFix ( int nMinGlyphPos, int nEndGlyphPos, int*
// ugly: steal some pixels
long nSteal = 1;
if ( nMaxPos - nMinPos > 0 && ((mnMinKashidaWidth - nSpaceAdded) > (nMaxPos - nMinPos)))
- nSteal = (mnMinKashidaWidth - nSpaceAdded) / (nMaxPos - nMinPos);
+ nSteal = (mnMinKashidaWidth - nSpaceAdded) / (nMaxPos - nMinPos);
for( int i = nMinPos; i <= nMaxPos; ++i )
{
if( i == nKashPos )
@@ -2710,7 +2710,7 @@ void UniscribeLayout::Justify( long nNewWidth )
if( nOldWidth <= 0 )
return;
- nNewWidth *= mnUnitsPerPixel; // convert into font units
+ nNewWidth *= mnUnitsPerPixel; // convert into font units
if( nNewWidth == nOldWidth )
return;
// prepare to distribute the extra width evenly among the visual items
@@ -2770,11 +2770,11 @@ bool UniscribeLayout::IsKashidaPosValid ( int nCharPos ) const
}
}
// Invalid char pos or leftmost glyph in visual item
- if ( nMinGlyphIndex == -1 || !mpLogClusters[ nCharPos ] )
+ if ( nMinGlyphIndex == -1 || !mpLogClusters[ nCharPos ] )
return false;
-// This test didn't give the expected results
-/* if( mpLogClusters[ nCharPos+1 ] == mpLogClusters[ nCharPos ])
+// This test didn't give the expected results
+/* if( mpLogClusters[ nCharPos+1 ] == mpLogClusters[ nCharPos ])
// two chars, one glyph
return false;*/
@@ -2784,9 +2784,9 @@ bool UniscribeLayout::IsKashidaPosValid ( int nCharPos ) const
// justification is only allowed if the glyph to the left has not SCRIPT_JUSTIFY_NONE
// and not SCRIPT_JUSTIFY_ARABIC_BLANK
// special case: glyph to the left is vowel (no advance width)
- if ( mpVisualAttrs[ nGlyphPos-1 ].uJustification == SCRIPT_JUSTIFY_ARABIC_BLANK
- || ( mpVisualAttrs[ nGlyphPos-1 ].uJustification == SCRIPT_JUSTIFY_NONE
- && mpGlyphAdvances [ nGlyphPos-1 ] ))
+ if ( mpVisualAttrs[ nGlyphPos-1 ].uJustification == SCRIPT_JUSTIFY_ARABIC_BLANK
+ || ( mpVisualAttrs[ nGlyphPos-1 ].uJustification == SCRIPT_JUSTIFY_NONE
+ && mpGlyphAdvances [ nGlyphPos-1 ] ))
return false;
return true;
}
@@ -3084,7 +3084,7 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
// -----------------------------------------------------------------------
-int WinSalGraphics::GetMinKashidaWidth()
+int WinSalGraphics::GetMinKashidaWidth()
{
if( !mpWinFontEntry[0] )
return 0;
@@ -3100,8 +3100,8 @@ ImplWinFontEntry::ImplWinFontEntry( ImplFontSelectData& rFSD )
, maWidthMap( 512 )
, mpKerningPairs( NULL )
, mnKerningPairs( -1 )
-, mnMinKashidaWidth( -1 )
-, mnMinKashidaGlyph( -1 )
+, mnMinKashidaWidth( -1 )
+, mnMinKashidaGlyph( -1 )
{
#ifdef USE_UNISCRIBE
maScriptCache = NULL;
@@ -3162,17 +3162,17 @@ int ImplWinFontEntry::GetKerning( sal_Unicode cLeft, sal_Unicode cRight ) const
bool ImplWinFontEntry::InitKashidaHandling( HDC hDC )
{
- if( mnMinKashidaWidth >= 0 ) // already cached?
+ if( mnMinKashidaWidth >= 0 ) // already cached?
return mnMinKashidaWidth;
// initialize the kashida width
mnMinKashidaWidth = 0;
mnMinKashidaGlyph = 0;
#ifdef USE_UNISCRIBE
- if (aUspModule || (bUspEnabled && InitUSP()))
+ if (aUspModule || (bUspEnabled && InitUSP()))
{
SCRIPT_FONTPROPERTIES aFontProperties;
- aFontProperties.cBytes = sizeof (aFontProperties);
+ aFontProperties.cBytes = sizeof (aFontProperties);
SCRIPT_CACHE& rScriptCache = GetScriptCache();
HRESULT nRC = (*pScriptGetFontProperties)( hDC, &rScriptCache, &aFontProperties );
if( nRC != 0 )
diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx
index 5adc7fe18cf5..b0c470f8d989 100644
--- a/vcl/win/source/gdi/wntgdi.cxx
+++ b/vcl/win/source/gdi/wntgdi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 6c002b673165..46a825b7ab51 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -257,12 +257,12 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect )
if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
{
if ( aSalShlData.maVersionInfo.dwMajorVersion <= 4 )
- winVerOk = 0; // NT
+ winVerOk = 0; // NT
}
else if( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
{
if ( aSalShlData.maVersionInfo.dwMajorVersion == 4 && aSalShlData.maVersionInfo.dwMinorVersion == 0 )
- winVerOk = 0; // Win95
+ winVerOk = 0; // Win95
}
}
@@ -388,7 +388,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
// this breaks SAL_FRAME_STYLE_SYSTEMCHILD handling, which is not
// used currently. Probably SAL_FRAME_STYLE_SYSTEMCHILD should be
// removed again.
-
+
// nSysStyle |= WS_CLIPCHILDREN;
if ( hWndParent )
{
@@ -991,7 +991,7 @@ WinSalFrame::WinSalFrame()
mpClipRgnData = NULL;
mbFirstClipRect = TRUE;
mpNextClipRect = NULL;
- mnDisplay = 0;
+ mnDisplay = 0;
memset( &maState, 0, sizeof( SalFrameState ) );
maSysData.nSize = sizeof( SystemEnvData );
@@ -2179,7 +2179,7 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags )
WinSalFrame* pToTopFrame = GetWindowPtr( hWnd );
if( pToTopFrame && (pToTopFrame->mnStyle & SAL_FRAME_STYLE_SYSTEMCHILD) != 0 )
BringWindowToTop( hWnd );
-
+
if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK )
{
// This magic code is necessary to connect the input focus of the
@@ -2232,7 +2232,7 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags )
void WinSalFrame::ToTop( USHORT nFlags )
{
- nFlags &= ~SAL_FRAME_TOTOP_GRABFOCUS; // this flag is not needed on win32
+ nFlags &= ~SAL_FRAME_TOTOP_GRABFOCUS; // this flag is not needed on win32
// Post this Message to the window, because this only works
// in the thread of the window, which has create this window.
// We post this message to avoid deadlocks
@@ -3277,13 +3277,13 @@ void WinSalFrame::BeginSetClipRegion( ULONG nRects )
delete [] (BYTE*)mpClipRgnData;
ULONG nRectBufSize = sizeof(RECT)*nRects;
mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
- mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
- mpClipRgnData->rdh.iType = RDH_RECTANGLES;
- mpClipRgnData->rdh.nCount = nRects;
+ mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
+ mpClipRgnData->rdh.iType = RDH_RECTANGLES;
+ mpClipRgnData->rdh.nCount = nRects;
mpClipRgnData->rdh.nRgnSize = nRectBufSize;
SetRectEmpty( &(mpClipRgnData->rdh.rcBound) );
- mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
- mbFirstClipRect = TRUE;
+ mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
+ mbFirstClipRect = TRUE;
}
// -----------------------------------------------------------------------
@@ -3293,17 +3293,17 @@ void WinSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
if( ! mpClipRgnData )
return;
- RECT* pRect = mpNextClipRect;
- RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ RECT* pRect = mpNextClipRect;
+ RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
+ long nRight = nX + nWidth;
+ long nBottom = nY + nHeight;
if ( mbFirstClipRect )
{
- pBoundRect->left = nX;
- pBoundRect->top = nY;
- pBoundRect->right = nRight;
- pBoundRect->bottom = nBottom;
+ pBoundRect->left = nX;
+ pBoundRect->top = nY;
+ pBoundRect->right = nRight;
+ pBoundRect->bottom = nBottom;
mbFirstClipRect = FALSE;
}
else
@@ -3321,10 +3321,10 @@ void WinSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
pBoundRect->bottom = (int)nBottom;
}
- pRect->left = (int)nX;
- pRect->top = (int)nY;
- pRect->right = (int)nRight;
- pRect->bottom = (int)nBottom;
+ pRect->left = (int)nX;
+ pRect->top = (int)nY;
+ pRect->right = (int)nRight;
+ pRect->bottom = (int)nBottom;
if( (mpNextClipRect - (RECT*)(&mpClipRgnData->Buffer)) < (int)mpClipRgnData->rdh.nCount )
mpNextClipRect++;
}
@@ -3896,9 +3896,9 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
}
SalKeyEvent aKeyEvt;
- aKeyEvt.mnCode = nModCode; // Or should it be 0? - as this is always a character returned
- aKeyEvt.mnTime = GetMessageTime();
- aKeyEvt.mnRepeat = 0;
+ aKeyEvt.mnCode = nModCode; // Or should it be 0? - as this is always a character returned
+ aKeyEvt.mnTime = GetMessageTime();
+ aKeyEvt.mnRepeat = 0;
if( wParam >= Uni_SupplementaryPlanesStart )
{
@@ -3911,7 +3911,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
wParam = (sal_Unicode) Uni_UTF32ToSurrogate2( wParam );
}
- aKeyEvt.mnCharCode = (sal_Unicode) wParam;
+ aKeyEvt.mnCharCode = (sal_Unicode) wParam;
nLastChar = 0;
nLastVKChar = 0;
@@ -4035,14 +4035,14 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
aKeyEvt.mnTime = GetMessageTime();
aKeyEvt.mnCode |= nModCode;
aKeyEvt.mnRepeat = nRepeat;
-
+
if( (nModCode & (KEY_MOD1|KEY_MOD2)) == (KEY_MOD1|KEY_MOD2) &&
aKeyEvt.mnCharCode )
{
// this is actually AltGr and should not be handled as Alt
aKeyEvt.mnCode &= ~(KEY_MOD1|KEY_MOD2);
}
-
+
bIgnoreCharMsg = bCharPeek ? TRUE : FALSE;
long nRet = pFrame->CallCallback( nEvent, &aKeyEvt );
// independent part only reacts on keyup but Windows does not send
@@ -5014,9 +5014,9 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
COLORREF clrPrevText, clrPrevBkgnd;
HFONT hfntOld;
HBRUSH hbrOld;
- BOOL fChecked = (pDI->itemState & ODS_CHECKED) ? TRUE : FALSE;
- BOOL fSelected = (pDI->itemState & ODS_SELECTED) ? TRUE : FALSE;
- BOOL fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? TRUE : FALSE;
+ BOOL fChecked = (pDI->itemState & ODS_CHECKED) ? TRUE : FALSE;
+ BOOL fSelected = (pDI->itemState & ODS_SELECTED) ? TRUE : FALSE;
+ BOOL fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? TRUE : FALSE;
// Set the appropriate foreground and background colors.
RECT aRect = pDI->rcItem;
@@ -5081,9 +5081,9 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
if( hDrawDIB )
{
- PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDrawDIB );
- PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
- PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
+ PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( hDrawDIB );
+ PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI;
+ PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI +
pSalBmp->ImplGetDIBColorCount( hDrawDIB ) * sizeof( RGBQUAD );
HBITMAP hBmp = CreateDIBitmap( pDI->hDC, pBIH, CBM_INIT, pBits, pBI, DIB_RGB_COLORS );
@@ -5684,23 +5684,23 @@ static boolean ImplHandleAppCommand( HWND hWnd, LPARAM lParam )
sal_Int16 nCommand = 0;
switch( GET_APPCOMMAND_LPARAM(lParam) )
{
- case APPCOMMAND_MEDIA_CHANNEL_DOWN: nCommand = MEDIA_COMMAND_CHANNEL_DOWN; break;
- case APPCOMMAND_MEDIA_CHANNEL_UP: nCommand = MEDIA_COMMAND_CHANNEL_UP; break;
- case APPCOMMAND_MEDIA_NEXTTRACK: nCommand = MEDIA_COMMAND_NEXTTRACK; break;
- case APPCOMMAND_MEDIA_PAUSE: nCommand = MEDIA_COMMAND_PAUSE; break;
- case APPCOMMAND_MEDIA_PLAY: nCommand = MEDIA_COMMAND_PLAY; break;
- case APPCOMMAND_MEDIA_PLAY_PAUSE: nCommand = MEDIA_COMMAND_PLAY_PAUSE; break;
- case APPCOMMAND_MEDIA_PREVIOUSTRACK: nCommand = MEDIA_COMMAND_PREVIOUSTRACK; break;
- case APPCOMMAND_MEDIA_RECORD: nCommand = MEDIA_COMMAND_RECORD; break;
- case APPCOMMAND_MEDIA_REWIND: nCommand = MEDIA_COMMAND_REWIND; break;
- case APPCOMMAND_MEDIA_STOP: nCommand = MEDIA_COMMAND_STOP; break;
- case APPCOMMAND_MIC_ON_OFF_TOGGLE: nCommand = MEDIA_COMMAND_MIC_ON_OFF_TOGGLE; break;
- case APPCOMMAND_MICROPHONE_VOLUME_DOWN: nCommand = MEDIA_COMMAND_MICROPHONE_VOLUME_DOWN; break;
- case APPCOMMAND_MICROPHONE_VOLUME_MUTE: nCommand = MEDIA_COMMAND_MICROPHONE_VOLUME_MUTE; break;
- case APPCOMMAND_MICROPHONE_VOLUME_UP: nCommand = MEDIA_COMMAND_MICROPHONE_VOLUME_UP; break;
- case APPCOMMAND_VOLUME_DOWN: nCommand = MEDIA_COMMAND_VOLUME_DOWN; break;
- case APPCOMMAND_VOLUME_MUTE: nCommand = MEDIA_COMMAND_VOLUME_MUTE; break;
- case APPCOMMAND_VOLUME_UP: nCommand = MEDIA_COMMAND_VOLUME_UP; break;
+ case APPCOMMAND_MEDIA_CHANNEL_DOWN: nCommand = MEDIA_COMMAND_CHANNEL_DOWN; break;
+ case APPCOMMAND_MEDIA_CHANNEL_UP: nCommand = MEDIA_COMMAND_CHANNEL_UP; break;
+ case APPCOMMAND_MEDIA_NEXTTRACK: nCommand = MEDIA_COMMAND_NEXTTRACK; break;
+ case APPCOMMAND_MEDIA_PAUSE: nCommand = MEDIA_COMMAND_PAUSE; break;
+ case APPCOMMAND_MEDIA_PLAY: nCommand = MEDIA_COMMAND_PLAY; break;
+ case APPCOMMAND_MEDIA_PLAY_PAUSE: nCommand = MEDIA_COMMAND_PLAY_PAUSE; break;
+ case APPCOMMAND_MEDIA_PREVIOUSTRACK: nCommand = MEDIA_COMMAND_PREVIOUSTRACK; break;
+ case APPCOMMAND_MEDIA_RECORD: nCommand = MEDIA_COMMAND_RECORD; break;
+ case APPCOMMAND_MEDIA_REWIND: nCommand = MEDIA_COMMAND_REWIND; break;
+ case APPCOMMAND_MEDIA_STOP: nCommand = MEDIA_COMMAND_STOP; break;
+ case APPCOMMAND_MIC_ON_OFF_TOGGLE: nCommand = MEDIA_COMMAND_MIC_ON_OFF_TOGGLE; break;
+ case APPCOMMAND_MICROPHONE_VOLUME_DOWN: nCommand = MEDIA_COMMAND_MICROPHONE_VOLUME_DOWN; break;
+ case APPCOMMAND_MICROPHONE_VOLUME_MUTE: nCommand = MEDIA_COMMAND_MICROPHONE_VOLUME_MUTE; break;
+ case APPCOMMAND_MICROPHONE_VOLUME_UP: nCommand = MEDIA_COMMAND_MICROPHONE_VOLUME_UP; break;
+ case APPCOMMAND_VOLUME_DOWN: nCommand = MEDIA_COMMAND_VOLUME_DOWN; break;
+ case APPCOMMAND_VOLUME_MUTE: nCommand = MEDIA_COMMAND_VOLUME_MUTE; break;
+ case APPCOMMAND_VOLUME_UP: nCommand = MEDIA_COMMAND_VOLUME_UP; break;
break;
default:
return false;
@@ -5802,10 +5802,10 @@ static LRESULT ImplHandleIMEReconvertString( HWND hWnd, LPARAM lParam )
{
// The first call for reconversion.
pFrame->CallCallback( SALEVENT_STARTRECONVERSION, (void*)NULL );
-
+
// Retrieve the surrounding text from the focused control.
pFrame->CallCallback( SALEVENT_SURROUNDINGTEXTREQUEST, (void*)&aEvt );
-
+
if( aEvt.maText.Len() == 0 )
{
return 0;
@@ -5916,7 +5916,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
{
LRESULT nRet = 0;
static int bInWheelMsg = FALSE;
- static int bInQueryEnd = FALSE;
+ static int bInQueryEnd = FALSE;
// By WM_CRETAE we connect the frame with the window handle
if ( nMsg == WM_CREATE )
@@ -6185,7 +6185,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
if ( nRet )
{
- MSG msg;
+ MSG msg;
while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
@@ -6282,7 +6282,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
break;
case WM_APPCOMMAND:
if( ImplHandleAppCommand( hWnd, lParam ) )
- {
+ {
rDef = false;
nRet = 1;
}
diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx
index e86e3f27903d..0a22c2c028fd 100644
--- a/vcl/win/source/window/salmenu.cxx
+++ b/vcl/win/source/window/salmenu.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -108,9 +108,9 @@ SalMenuItem* WinSalInstance::CreateMenuItem( const SalItemParams* pItemData )
// 'translate' mnemonics
pSalMenuItem->mText.SearchAndReplace( '~', '&' );
-
+
pSalMenuItem->mInfo.fMask = MIIM_TYPE | MIIM_STATE | MIIM_ID | MIIM_DATA;
- pSalMenuItem->mInfo.fType = MFT_STRING;
+ pSalMenuItem->mInfo.fType = MFT_STRING;
#ifdef OWNERDRAW
if( pItemData->pMenu && !pItemData->pMenu->IsMenuBar() )
pSalMenuItem->mInfo.fType |= MFT_OWNERDRAW;
@@ -118,7 +118,7 @@ SalMenuItem* WinSalInstance::CreateMenuItem( const SalItemParams* pItemData )
#endif
pSalMenuItem->mInfo.dwTypeData = (LPWSTR) pSalMenuItem->mText.GetBuffer();
pSalMenuItem->mInfo.cch = pSalMenuItem->mText.Len();
-
+
pSalMenuItem->mInfo.wID = pItemData->nId;
pSalMenuItem->mInfo.dwItemData = (ULONG_PTR) pSalMenuItem; // user data
}
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index 22a2622e3cbd..79cef0623469 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
WinSalObject* ImplFindSalObject( HWND hWndChild )
{
SalData* pSalData = GetSalData();
- WinSalObject* pObject = pSalData->mpFirstObject;
+ WinSalObject* pObject = pSalData->mpFirstObject;
while ( pObject )
{
if ( ImplIsSysWindowOrChild( pObject->mhWndChild, hWndChild ) )
@@ -163,8 +163,8 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
BOOL ImplSalPreDispatchMsg( MSG* pMsg )
{
// Used for Unicode and none Unicode
- SalData* pSalData = GetSalData();
- WinSalObject* pObject;
+ SalData* pSalData = GetSalData();
+ WinSalObject* pObject;
if ( (pMsg->message == WM_LBUTTONDOWN) ||
(pMsg->message == WM_RBUTTONDOWN) ||
@@ -250,8 +250,8 @@ BOOL ImplSalPreDispatchMsg( MSG* pMsg )
void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT /* nDispatchResult */ )
{
// Used for Unicode and none Unicode
- SalData* pSalData = GetSalData();
- WinSalFrame* pFrame;
+ SalData* pSalData = GetSalData();
+ WinSalFrame* pFrame;
if ( (pMsg->message == WM_KEYDOWN) || (pMsg->message == WM_KEYUP) )
{
@@ -276,8 +276,8 @@ void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT /* nDispatchResult */ )
LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )
{
- WinSalObject* pSysObj;
- LRESULT nRet = 0;
+ WinSalObject* pSysObj;
+ LRESULT nRet = 0;
switch( nMsg )
{
@@ -336,7 +336,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
if ( ImplSalYieldMutexTryToAcquire() )
{
pSysObj = GetSalObjWindowPtr( hWnd );
- HWND hFocusWnd = ::GetFocus();
+ HWND hFocusWnd = ::GetFocus();
USHORT nEvent;
if ( hFocusWnd && ImplIsSysWindowOrChild( hWnd, hFocusWnd ) )
nEvent = SALOBJ_EVENT_GETFOCUS;
@@ -514,25 +514,25 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
if ( false )//aSalShlData.mbWNT )
{
WNDCLASSEXW aWndClassEx;
- aWndClassEx.cbSize = sizeof( aWndClassEx );
- aWndClassEx.style = 0;
- aWndClassEx.lpfnWndProc = SalSysObjWndProcW;
- aWndClassEx.cbClsExtra = 0;
- aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
- aWndClassEx.hInstance = pSalData->mhInst;
- aWndClassEx.hIcon = 0;
- aWndClassEx.hIconSm = 0;
- aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
- aWndClassEx.hbrBackground = 0;
- aWndClassEx.lpszMenuName = 0;
- aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEW;
+ aWndClassEx.cbSize = sizeof( aWndClassEx );
+ aWndClassEx.style = 0;
+ aWndClassEx.lpfnWndProc = SalSysObjWndProcW;
+ aWndClassEx.cbClsExtra = 0;
+ aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
+ aWndClassEx.hInstance = pSalData->mhInst;
+ aWndClassEx.hIcon = 0;
+ aWndClassEx.hIconSm = 0;
+ aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
+ aWndClassEx.hbrBackground = 0;
+ aWndClassEx.lpszMenuName = 0;
+ aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEW;
if ( RegisterClassExW( &aWndClassEx ) )
{
// Wegen PlugIn's loeschen wir erstmal den Hintergrund
- aWndClassEx.cbWndExtra = 0;
- aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
- aWndClassEx.lpfnWndProc = SalSysObjChildWndProcW;
- aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEW;
+ aWndClassEx.cbWndExtra = 0;
+ aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+ aWndClassEx.lpfnWndProc = SalSysObjChildWndProcW;
+ aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEW;
if ( RegisterClassExW( &aWndClassEx ) )
pSalData->mbObjClassInit = TRUE;
}
@@ -540,25 +540,25 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
else
{
WNDCLASSEXA aWndClassEx;
- aWndClassEx.cbSize = sizeof( aWndClassEx );
- aWndClassEx.style = 0;
- aWndClassEx.lpfnWndProc = SalSysObjWndProcA;
- aWndClassEx.cbClsExtra = 0;
- aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
- aWndClassEx.hInstance = pSalData->mhInst;
- aWndClassEx.hIcon = 0;
- aWndClassEx.hIconSm = 0;
- aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
- aWndClassEx.hbrBackground = 0;
- aWndClassEx.lpszMenuName = 0;
- aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEA;
+ aWndClassEx.cbSize = sizeof( aWndClassEx );
+ aWndClassEx.style = 0;
+ aWndClassEx.lpfnWndProc = SalSysObjWndProcA;
+ aWndClassEx.cbClsExtra = 0;
+ aWndClassEx.cbWndExtra = SAL_OBJECT_WNDEXTRA;
+ aWndClassEx.hInstance = pSalData->mhInst;
+ aWndClassEx.hIcon = 0;
+ aWndClassEx.hIconSm = 0;
+ aWndClassEx.hCursor = LoadCursor( 0, IDC_ARROW );
+ aWndClassEx.hbrBackground = 0;
+ aWndClassEx.lpszMenuName = 0;
+ aWndClassEx.lpszClassName = SAL_OBJECT_CLASSNAMEA;
if ( RegisterClassExA( &aWndClassEx ) )
{
// Wegen PlugIn's loeschen wir erstmal den Hintergrund
- aWndClassEx.cbWndExtra = 0;
- aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
- aWndClassEx.lpfnWndProc = SalSysObjChildWndProcA;
- aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEA;
+ aWndClassEx.cbWndExtra = 0;
+ aWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+ aWndClassEx.lpfnWndProc = SalSysObjChildWndProcA;
+ aWndClassEx.lpszClassName = SAL_OBJECT_CHILDCLASSNAMEA;
if ( RegisterClassExA( &aWndClassEx ) )
pSalData->mbObjClassInit = TRUE;
}
@@ -568,7 +568,7 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
if ( pSalData->mbObjClassInit )
{
WinSalObject* pObject = new WinSalObject;
-
+
// #135235# Clip siblings of this
// SystemChildWindow. Otherwise, DXCanvas (using a hidden
// SystemChildWindow) clobbers applets/plugins during
@@ -601,9 +601,9 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
if ( hWnd )
{
- pObject->mhWnd = hWnd;
- pObject->mhWndChild = hWndChild;
- pObject->maSysData.hWnd = hWndChild;
+ pObject->mhWnd = hWnd;
+ pObject->mhWndChild = hWndChild;
+ pObject->maSysData.hWnd = hWndChild;
return pObject;
}
}
@@ -617,11 +617,11 @@ WinSalObject::WinSalObject()
{
SalData* pSalData = GetSalData();
- mhWnd = 0;
- mhWndChild = 0;
- mhLastFocusWnd = 0;
- maSysData.nSize = sizeof( SystemEnvData );
- mpStdClipRgnData = NULL;
+ mhWnd = 0;
+ mhWndChild = 0;
+ mhLastFocusWnd = 0;
+ maSysData.nSize = sizeof( SystemEnvData );
+ mpStdClipRgnData = NULL;
// Insert object in objectlist
mpNextObject = pSalData->mpFirstObject;
@@ -699,30 +699,30 @@ void WinSalObject::BeginSetClipRegion( ULONG nRectCount )
}
else
mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
- mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
- mpClipRgnData->rdh.iType = RDH_RECTANGLES;
- mpClipRgnData->rdh.nCount = nRectCount;
+ mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
+ mpClipRgnData->rdh.iType = RDH_RECTANGLES;
+ mpClipRgnData->rdh.nCount = nRectCount;
mpClipRgnData->rdh.nRgnSize = nRectBufSize;
SetRectEmpty( &(mpClipRgnData->rdh.rcBound) );
- mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
- mbFirstClipRect = TRUE;
+ mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
+ mbFirstClipRect = TRUE;
}
// -----------------------------------------------------------------------
void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
{
- RECT* pRect = mpNextClipRect;
- RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ RECT* pRect = mpNextClipRect;
+ RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
+ long nRight = nX + nWidth;
+ long nBottom = nY + nHeight;
if ( mbFirstClipRect )
{
- pBoundRect->left = nX;
- pBoundRect->top = nY;
- pBoundRect->right = nRight;
- pBoundRect->bottom = nBottom;
+ pBoundRect->left = nX;
+ pBoundRect->top = nY;
+ pBoundRect->right = nRight;
+ pBoundRect->bottom = nBottom;
mbFirstClipRect = FALSE;
}
else
@@ -740,10 +740,10 @@ void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight
pBoundRect->bottom = (int)nBottom;
}
- pRect->left = (int)nX;
- pRect->top = (int)nY;
- pRect->right = (int)nRight;
- pRect->bottom = (int)nBottom;
+ pRect->left = (int)nX;
+ pRect->top = (int)nY;
+ pRect->right = (int)nRight;
+ pRect->bottom = (int)nBottom;
mpNextClipRect++;
}
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 18b5a19aa646..4d247dd6501f 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -115,7 +115,7 @@ void setupMethodStubs( functor_vector_type& res )
const Point aPt2(500,500);
const Point aPt3(0,0);
const Point aPt4(450,450);
-
+
const Rectangle aRect(aPt1,aPt2);
const Rectangle aRect2(aPt3,aPt4);
const Polygon aPoly(aRect);
@@ -421,7 +421,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const Bitmap& ))(
&OutputDevice::DrawBitmap),
@@ -437,7 +437,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const Bitmap& ))(
&OutputDevice::DrawBitmap),
@@ -553,7 +553,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const BitmapEx& ))(
&OutputDevice::DrawBitmapEx),
@@ -569,7 +569,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const BitmapEx& ))(
&OutputDevice::DrawBitmapEx),
@@ -585,7 +585,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const BitmapEx& ))(
&OutputDevice::DrawBitmapEx),
@@ -601,7 +601,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const BitmapEx& ))(
&OutputDevice::DrawBitmapEx),
@@ -671,7 +671,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const Bitmap&,
const Color& ))(
@@ -688,7 +688,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Point&,
+ const Point&,
const Size&,
const Bitmap&,
const Color& ))(
@@ -703,7 +703,7 @@ void setupMethodStubs( functor_vector_type& res )
"DrawImage",
boost::bind(
(void (OutputDevice::*)( const Point&,
- const Image&,
+ const Image&,
USHORT nStyle ))(
&OutputDevice::DrawImage),
_1,
@@ -717,7 +717,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
(void (OutputDevice::*)( const Point&,
const Size&,
- const Image&,
+ const Image&,
USHORT nStyle ))(
&OutputDevice::DrawImage),
_1,
@@ -774,7 +774,7 @@ void setupMethodStubs( functor_vector_type& res )
aRect,Size(10,20),GRID_HORZLINES|GRID_VERTLINES ));
/* void DrawTransparent( const PolyPolygon& rPolyPoly,
- USHORT nTransparencePercent );
+ USHORT nTransparencePercent );
*/
add(res,
"DrawTransparent",
@@ -792,7 +792,7 @@ void setupMethodStubs( functor_vector_type& res )
"DrawTransparent(metafile)",
boost::bind(
(void (OutputDevice::*)( const GDIMetaFile&,
- const Point&,
+ const Point&,
const Size&,
const Gradient& ))(
&OutputDevice::DrawTransparent),
@@ -810,9 +810,9 @@ void setupMethodStubs( functor_vector_type& res )
//----------------------------------------------------------------------------------
-void grindFunc( OutputDevice& rTarget,
+void grindFunc( OutputDevice& rTarget,
functor_vector_type::const_iterator iter,
- sal_Int32 nTurns,
+ sal_Int32 nTurns,
const char* pMsg )
{
const sal_uInt32 nStartTime( osl_getGlobalTimer() );
@@ -823,7 +823,7 @@ void grindFunc( OutputDevice& rTarget,
if( rTarget.GetOutDevType() == OUTDEV_WINDOW )
static_cast<Window&>(rTarget).Sync();
- fprintf( stdout,
+ fprintf( stdout,
"Duration: %d ms (%d repetitions)\tOperation: %s\tSetup: %s\n",
(int)(osl_getGlobalTimer() - nStartTime),
(int)(nTurns),
@@ -908,7 +908,7 @@ USHORT GrindApp::Exception( USHORT nError )
switch( nError & EXC_MAJORTYPE )
{
case EXC_RSCNOTLOADED:
- Abort( String::CreateFromAscii(
+ Abort( String::CreateFromAscii(
"Error: could not load language resources.\nPlease check your installation.\n" ) );
break;
}
@@ -941,7 +941,7 @@ void GrindApp::Main()
try
{
uno::Reference< uno::XComponentContext > xCtx = ::cppu::defaultBootstrap_InitialComponentContext();
- xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(),
+ xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(),
uno::UNO_QUERY );
if( xFactory.is() )
::comphelper::setProcessServiceFactory( xFactory );
@@ -952,7 +952,7 @@ void GrindApp::Main()
if( !xFactory.is() )
{
- fprintf( stderr,
+ fprintf( stderr,
"Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
exit( 1 );
}
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index 2067fbe696ce..637c3c59b525 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +72,13 @@ class MyWin : public WorkWindow
public:
MyWin( Window* pParent, WinBits nWinStyle );
- void MouseMove( const MouseEvent& rMEvt );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void KeyUp( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
+ void MouseMove( const MouseEvent& rMEvt );
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void KeyInput( const KeyEvent& rKEvt );
+ void KeyUp( const KeyEvent& rKEvt );
+ void Paint( const Rectangle& rRect );
+ void Resize();
};
// -----------------------------------------------------------------------
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 2f5fa442127a..85a3f34244a8 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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 @@ SAL_IMPLEMENT_MAIN()
catch( com::sun::star::uno::Exception& rExc)
{
}
-
+
if( ! xFactory.is() )
{
fprintf( stderr, "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
@@ -97,7 +97,7 @@ SAL_IMPLEMENT_MAIN()
}
/*
- * Create UCB.
+ * Create UCB.
*/
Sequence< Any > aArgs( 2 );
aArgs[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
@@ -133,19 +133,19 @@ class MyWin : public WorkWindow
public:
MyWin( Window* pParent, WinBits nWinStyle );
- void MouseMove( const MouseEvent& rMEvt );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void KeyUp( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
-
+ void MouseMove( const MouseEvent& rMEvt );
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void KeyInput( const KeyEvent& rKEvt );
+ void KeyUp( const KeyEvent& rKEvt );
+ void Paint( const Rectangle& rRect );
+ void Resize();
+
BOOL Close();
-
+
void parseList( const rtl::OString& rList );
rtl::OString processCommand( const rtl::OString& rCommand );
-
+
DECL_LINK( ListHdl, Button* );
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( QuitHdl, Button* );
@@ -175,15 +175,15 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
m_aListButton.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "List Elements" ) ) );
m_aListButton.SetClickHdl( LINK( this, MyWin, ListHdl ) );
m_aListButton.Show();
-
+
m_aSvpBitmaps.SetPosSizePixel( Point( 10, 40 ), Size( 150, 150 ) );
m_aSvpBitmaps.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
m_aSvpBitmaps.Show();
-
+
m_aImage.SetPosSizePixel( Point( 170, 10 ), Size( 400, 400 ) );
m_aImage.SetScaleMode( com::sun::star::awt::ImageScaleMode::None );
m_aImage.Show();
-
+
m_aQuitButton.SetPosSizePixel( Point( 10, 300 ), Size( 120,25 ) );
m_aQuitButton.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Quit SVP server" ) ) );
m_aQuitButton.SetClickHdl( LINK( this, MyWin, QuitHdl ) );
@@ -208,7 +208,7 @@ void MyWin::parseList( const rtl::OString& rList )
rtl::OString aLine = rList.getToken( 0, '\n', nTokenPos );
if( ! aLine.getLength() || *aLine.getStr() == '#' )
continue;
-
+
if( aLine.compareTo( "ElementType: ", 13 ) == 0 )
aElementType = rtl::OStringToOUString( aLine.copy( 13 ), RTL_TEXTENCODING_ASCII_US );
else
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 544f246a030b..4b5c40cb2439 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER 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,13 +79,13 @@ class MyWin : public WorkWindow
public:
MyWin( Window* pParent, WinBits nWinStyle );
- void MouseMove( const MouseEvent& rMEvt );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void KeyUp( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
+ void MouseMove( const MouseEvent& rMEvt );
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void KeyInput( const KeyEvent& rKEvt );
+ void KeyUp( const KeyEvent& rKEvt );
+ void Paint( const Rectangle& rRect );
+ void Resize();
};
// -----------------------------------------------------------------------
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index a4da3f11c966..09e977114945 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,13 +77,13 @@ class MyWin : public WorkWindow
public:
MyWin( Window* pParent, WinBits nWinStyle );
- void MouseMove( const MouseEvent& rMEvt );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void KeyUp( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
+ void MouseMove( const MouseEvent& rMEvt );
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void KeyInput( const KeyEvent& rKEvt );
+ void KeyUp( const KeyEvent& rKEvt );
+ void Paint( const Rectangle& rRect );
+ void Resize();
};
// -----------------------------------------------------------------------
@@ -173,7 +173,7 @@ void MyWin::Paint( const Rectangle& rRect )
DrawLine( Point(r.nLeft, r.nTop+i), Point(r.nRight, r.nBottom-i) );
for(int i=0; i<aSz.Width(); i+=15)
DrawLine( Point(r.nLeft+i, r.nBottom), Point(r.nRight-i, r.nTop) );
-
+
SetTextColor( Color( COL_WHITE ) );
Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Times" ) ), Size( 0, 25 ) );
SetFont( aFont );