summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaccessibility/bridge/org/openoffice/java/accessibility/makefile.mk2
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControl.hxx269
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx470
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx221
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx105
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx229
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx239
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx171
-rw-r--r--accessibility/inc/accessibility/extended/textwindowaccessibility.hxx2
-rwxr-xr-xaccessibility/prj/build.lst3
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControl.cxx382
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlBase.cxx551
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlHeader.cxx312
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlHeaderCell.cxx173
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlTable.cxx404
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlTableBase.cxx308
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlTableCell.cxx379
-rw-r--r--accessibility/source/extended/makefile.mk9
-rw-r--r--accessibility/source/helper/acc_factory.cxx18
-rw-r--r--accessibility/workben/makefile.in1
-rw-r--r--accessibility/workben/makefile.mk1
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/makefile.mk2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/manifest2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common2
-rw-r--r--accessibility/workben/org/openoffice/accessibility/misc/makefile.common2
-rw-r--r--automation/inc/automation/communi.hxx2
-rw-r--r--automation/source/miniapp/testapp.hxx2
-rw-r--r--automation/source/server/scmdstrm.cxx6
-rw-r--r--automation/source/server/server.cxx2
-rw-r--r--automation/source/server/statemnt.cxx41
-rw-r--r--automation/source/testtool/makefile.mk4
-rw-r--r--automation/source/testtool/objtest.cxx6
-rw-r--r--automation/source/testtool/tcommuni.hxx2
-rw-r--r--basctl/inc/basidesh.hrc1
-rw-r--r--basctl/inc/helpid.hrc2
-rw-r--r--basctl/inc/pch/precompiled_basctl.hxx14
-rw-r--r--basctl/sdi/basslots.sdi8
-rw-r--r--basctl/sdi/makefile.mk8
-rw-r--r--basctl/source/basicide/basicbox.hxx2
-rw-r--r--basctl/source/basicide/basicprint.src43
-rw-r--r--basctl/source/basicide/basicrenderable.cxx197
-rw-r--r--basctl/source/basicide/basicrenderable.hxx76
-rw-r--r--basctl/source/basicide/baside2.cxx63
-rw-r--r--basctl/source/basicide/baside2.hxx23
-rw-r--r--basctl/source/basicide/baside2b.cxx27
-rw-r--r--basctl/source/basicide/baside3.cxx823
-rw-r--r--basctl/source/basicide/basides1.cxx2
-rw-r--r--basctl/source/basicide/basides2.cxx10
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--basctl/source/basicide/basobj2.cxx2
-rw-r--r--basctl/source/basicide/basobj3.cxx2
-rw-r--r--basctl/source/basicide/bastype2.hxx2
-rw-r--r--basctl/source/basicide/bastypes.cxx7
-rw-r--r--basctl/source/basicide/brkdlg.hrc2
-rw-r--r--basctl/source/basicide/ide_pch.hxx10
-rw-r--r--basctl/source/basicide/iderdll.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.hrc2
-rw-r--r--basctl/source/basicide/makefile.mk5
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
-rw-r--r--basctl/source/basicide/moduldlg.hrc2
-rw-r--r--basctl/source/basicide/moptions.hrc2
-rw-r--r--basctl/source/basicide/objdlg.cxx2
-rw-r--r--basctl/source/basicide/objdlg.hrc2
-rw-r--r--basctl/source/basicide/scriptdocument.cxx2
-rw-r--r--basctl/source/basicide/tbxctl.cxx4
-rw-r--r--basctl/source/basicide/tbxctl.hrc2
-rw-r--r--basctl/source/dlged/dlged.cxx21
-rw-r--r--basctl/source/inc/accessibledialogwindow.hxx2
-rw-r--r--basctl/source/inc/baside3.hxx7
-rw-r--r--basctl/source/inc/basidesh.hxx4
-rw-r--r--basctl/source/inc/basobj.hxx2
-rw-r--r--basctl/source/inc/bastypes.hxx6
-rw-r--r--basctl/source/inc/dlged.hxx9
-rw-r--r--basctl/source/inc/dlgresid.hrc2
-rw-r--r--basctl/source/inc/propbrw.hxx4
-rw-r--r--basctl/source/inc/sbxitem.hxx2
-rw-r--r--bean/com/sun/star/beans/makefile.mk2
-rw-r--r--bean/com/sun/star/comp/beans/makefile.mk2
-rw-r--r--bean/prj/build.lst2
-rw-r--r--bean/qa/complex/makefile.mk2
-rw-r--r--bean/test/applet/oooapplet/makefile.mk2
-rw-r--r--bean/test/makefile.mk2
-rwxr-xr-xcrashrep/source/unx/res.cxx9
-rw-r--r--cui/inc/makefile.mk52
-rw-r--r--cui/inc/pch/precompiled_cui.cxx32
-rw-r--r--cui/inc/pch/precompiled_cui.hxx968
-rw-r--r--cui/prj/build.lst9
-rwxr-xr-xcui/prj/d.lst8
-rw-r--r--cui/source/customize/acccfg.cxx1702
-rw-r--r--cui/source/customize/acccfg.hrc78
-rw-r--r--cui/source/customize/acccfg.src360
-rw-r--r--cui/source/customize/cfg.cxx6056
-rw-r--r--cui/source/customize/cfg.hrc108
-rw-r--r--cui/source/customize/cfg.src875
-rw-r--r--cui/source/customize/cfgutil.cxx1801
-rw-r--r--cui/source/customize/eventdlg.cxx250
-rw-r--r--cui/source/customize/eventdlg.hrc46
-rw-r--r--cui/source/customize/eventdlg.hxx81
-rw-r--r--cui/source/customize/eventdlg.src114
-rw-r--r--cui/source/customize/macropg.cxx1052
-rw-r--r--cui/source/customize/macropg.hrc104
-rw-r--r--cui/source/customize/macropg.src462
-rw-r--r--cui/source/customize/macropg_impl.hxx76
-rwxr-xr-x[-rw-r--r--]cui/source/customize/makefile.mk (renamed from forms/source/cppugen/makefile.mk)57
-rw-r--r--cui/source/customize/selector.cxx1256
-rw-r--r--cui/source/customize/selector.hrc60
-rw-r--r--cui/source/customize/selector.src215
-rw-r--r--cui/source/dialogs/SpellAttrib.cxx175
-rw-r--r--cui/source/dialogs/SpellAttrib.hxx176
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2155
-rw-r--r--cui/source/dialogs/SpellDialog.hrc58
-rw-r--r--cui/source/dialogs/SpellDialog.src245
-rw-r--r--cui/source/dialogs/charmap.hrc54
-rw-r--r--cui/source/dialogs/charmap.src162
-rw-r--r--cui/source/dialogs/commonlingui.cxx292
-rw-r--r--cui/source/dialogs/commonlingui.hxx174
-rw-r--r--cui/source/dialogs/commonlingui.src156
-rw-r--r--cui/source/dialogs/cuicharmap.cxx589
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx968
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx1272
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx759
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx417
-rwxr-xr-xcui/source/dialogs/cuiimapdlg.hrc47
-rwxr-xr-xcui/source/dialogs/cuiimapdlg.src151
-rw-r--r--cui/source/dialogs/cuiimapwnd.cxx100
-rw-r--r--cui/source/dialogs/cuitbxform.cxx68
-rw-r--r--cui/source/dialogs/dlgname.cxx239
-rw-r--r--cui/source/dialogs/dlgname.hrc49
-rw-r--r--cui/source/dialogs/dlgname.src272
-rw-r--r--cui/source/dialogs/fmsearch.hrc89
-rw-r--r--cui/source/dialogs/fmsearch.src332
-rw-r--r--cui/source/dialogs/gallery.src482
-rw-r--r--cui/source/dialogs/grfflt.hrc83
-rw-r--r--cui/source/dialogs/grfflt.src457
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx1913
-rw-r--r--cui/source/dialogs/hangulhanjadlg.hrc200
-rw-r--r--cui/source/dialogs/hangulhanjadlg.src431
-rw-r--r--cui/source/dialogs/hldocntp.cxx521
-rw-r--r--cui/source/dialogs/hldoctp.cxx383
-rw-r--r--cui/source/dialogs/hlinettp.cxx547
-rw-r--r--cui/source/dialogs/hlmailtp.cxx364
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx546
-rw-r--r--cui/source/dialogs/hlmarkwn.hrc37
-rw-r--r--cui/source/dialogs/hlmarkwn.src98
-rw-r--r--cui/source/dialogs/hltpbase.cxx873
-rw-r--r--cui/source/dialogs/hyperdlg.hrc103
-rw-r--r--cui/source/dialogs/hyperdlg.src971
-rw-r--r--cui/source/dialogs/iconcdlg.cxx1438
-rw-r--r--cui/source/dialogs/iconcdlg.src63
-rw-r--r--cui/source/dialogs/insdlg.cxx1060
-rw-r--r--cui/source/dialogs/insrc.cxx85
-rw-r--r--cui/source/dialogs/insrc.hrc43
-rw-r--r--cui/source/dialogs/insrc.src118
-rw-r--r--cui/source/dialogs/linkdlg.cxx716
-rwxr-xr-xcui/source/dialogs/makefile.mk118
-rw-r--r--cui/source/dialogs/multifil.cxx187
-rw-r--r--cui/source/dialogs/multipat.cxx363
-rw-r--r--cui/source/dialogs/multipat.hrc47
-rw-r--r--cui/source/dialogs/multipat.src153
-rw-r--r--cui/source/dialogs/newtabledlg.cxx74
-rw-r--r--cui/source/dialogs/newtabledlg.hrc38
-rw-r--r--cui/source/dialogs/newtabledlg.src138
-rw-r--r--cui/source/dialogs/pastedlg.cxx310
-rw-r--r--cui/source/dialogs/plfilter.cxx129
-rw-r--r--cui/source/dialogs/postdlg.cxx262
-rw-r--r--cui/source/dialogs/postdlg.hrc (renamed from extensions/source/propctrlr/formhelpid.hrc)41
-rw-r--r--cui/source/dialogs/postdlg.src160
-rw-r--r--cui/source/dialogs/scriptdlg.cxx1694
-rw-r--r--cui/source/dialogs/scriptdlg.hrc83
-rw-r--r--cui/source/dialogs/scriptdlg.src310
-rw-r--r--cui/source/dialogs/sdrcelldlg.cxx104
-rw-r--r--cui/source/dialogs/sdrcelldlg.src144
-rw-r--r--cui/source/dialogs/showcols.cxx141
-rw-r--r--cui/source/dialogs/showcols.src105
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx114
-rw-r--r--cui/source/dialogs/splitcelldlg.hrc45
-rw-r--r--cui/source/dialogs/splitcelldlg.src135
-rw-r--r--cui/source/dialogs/srchxtra.cxx294
-rw-r--r--cui/source/dialogs/srchxtra.hrc54
-rw-r--r--cui/source/dialogs/srchxtra.src282
-rw-r--r--cui/source/dialogs/svuidlg.hrc137
-rw-r--r--cui/source/dialogs/svuidlg.src711
-rw-r--r--cui/source/dialogs/tbxform.src67
-rw-r--r--cui/source/dialogs/winpluginlib.cpp233
-rw-r--r--cui/source/dialogs/zoom.cxx537
-rw-r--r--cui/source/dialogs/zoom.hrc56
-rw-r--r--cui/source/dialogs/zoom.src160
-rw-r--r--cui/source/factory/cuiexp.cxx54
-rw-r--r--cui/source/factory/cuiresmgr.cxx53
-rw-r--r--cui/source/factory/dlgfact.cxx1907
-rw-r--r--cui/source/factory/dlgfact.hxx782
-rw-r--r--cui/source/factory/init.cxx56
-rwxr-xr-xcui/source/factory/makefile.mk56
-rw-r--r--cui/source/inc/ControlFocusHelper.hxx51
-rw-r--r--cui/source/inc/SpellDialog.hxx261
-rw-r--r--cui/source/inc/acccfg.hxx288
-rw-r--r--cui/source/inc/align.hxx104
-rw-r--r--cui/source/inc/autocdlg.hxx508
-rw-r--r--cui/source/inc/backgrnd.hxx173
-rw-r--r--cui/source/inc/bbdlg.hxx59
-rw-r--r--cui/source/inc/border.hxx159
-rw-r--r--cui/source/inc/cfg.hxx836
-rw-r--r--cui/source/inc/cfgutil.hxx220
-rw-r--r--cui/source/inc/chardlg.hxx400
-rw-r--r--cui/source/inc/connect.hxx121
-rw-r--r--cui/source/inc/cuicharmap.hxx146
-rw-r--r--cui/source/inc/cuifmsearch.hxx230
-rw-r--r--cui/source/inc/cuigaldlg.hxx375
-rw-r--r--cui/source/inc/cuigrfflt.hxx256
-rw-r--r--cui/source/inc/cuihyperdlg.hxx117
-rw-r--r--cui/source/inc/cuiimapwnd.hxx54
-rw-r--r--cui/source/inc/cuioptgenrl.hxx131
-rw-r--r--cui/source/inc/cuires.hrc430
-rw-r--r--cui/source/inc/cuisrchdlg.hxx90
-rw-r--r--cui/source/inc/cuitabarea.hxx805
-rw-r--r--cui/source/inc/cuitabline.hxx433
-rw-r--r--cui/source/inc/cuitbxform.hxx29
-rw-r--r--cui/source/inc/dbregister.hxx163
-rw-r--r--cui/source/inc/defdlgname.hxx43
-rw-r--r--cui/source/inc/dialmgr.hxx48
-rw-r--r--cui/source/inc/dlgname.hxx207
-rw-r--r--cui/source/inc/dstribut.hxx128
-rw-r--r--cui/source/inc/gallery.hrc104
-rw-r--r--cui/source/inc/grfpage.hxx143
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx353
-rwxr-xr-xcui/source/inc/headertablistbox.hxx71
-rw-r--r--cui/source/inc/helpid.hrc390
-rw-r--r--cui/source/inc/hldocntp.hxx81
-rw-r--r--cui/source/inc/hldoctp.hxx96
-rw-r--r--cui/source/inc/hlinettp.hxx110
-rw-r--r--cui/source/inc/hlmailtp.hxx80
-rw-r--r--cui/source/inc/hlmarkwn.hxx114
-rw-r--r--cui/source/inc/hlmarkwn_def.hxx39
-rw-r--r--cui/source/inc/hltpbase.hxx211
-rw-r--r--cui/source/inc/iconcdlg.hxx292
-rw-r--r--cui/source/inc/insdlg.hxx217
-rw-r--r--cui/source/inc/insrc.hxx72
-rw-r--r--cui/source/inc/internationaloptions.hxx61
-rw-r--r--cui/source/inc/labdlg.hxx147
-rw-r--r--cui/source/inc/linkdlg.hxx137
-rwxr-xr-xcui/source/inc/macroass.hxx146
-rw-r--r--cui/source/inc/macropg.hxx178
-rw-r--r--cui/source/inc/measure.hxx130
-rw-r--r--cui/source/inc/multifil.hxx62
-rw-r--r--cui/source/inc/multipat.hxx92
-rw-r--r--cui/source/inc/newtabledlg.hxx65
-rw-r--r--cui/source/inc/numfmt.hxx191
-rw-r--r--cui/source/inc/numpages.hxx472
-rw-r--r--cui/source/inc/optasian.hxx84
-rw-r--r--cui/source/inc/optdict.hxx191
-rw-r--r--cui/source/inc/optimprove.hxx143
-rw-r--r--cui/source/inc/optlingu.hxx185
-rw-r--r--cui/source/inc/optpath.hxx119
-rw-r--r--cui/source/inc/page.hxx241
-rw-r--r--cui/source/inc/paragrph.hxx330
-rw-r--r--cui/source/inc/pastedlg.hxx98
-rw-r--r--cui/source/inc/postdlg.hxx129
-rw-r--r--cui/source/inc/radiobtnbox.hxx66
-rw-r--r--cui/source/inc/scriptdlg.hxx251
-rw-r--r--cui/source/inc/sdrcelldlg.hxx66
-rw-r--r--cui/source/inc/selector.hxx249
-rw-r--r--cui/source/inc/showcols.hxx69
-rw-r--r--cui/source/inc/splitcelldlg.hxx72
-rw-r--r--cui/source/inc/srchxtra.hxx111
-rw-r--r--cui/source/inc/tabstpge.hxx162
-rw-r--r--cui/source/inc/textanim.hxx131
-rw-r--r--cui/source/inc/textattr.hxx138
-rw-r--r--cui/source/inc/transfrm.hxx308
-rw-r--r--cui/source/inc/treeopt.hxx362
-rw-r--r--cui/source/inc/zoom.hxx120
-rw-r--r--cui/source/options/cfgchart.cxx327
-rw-r--r--cui/source/options/cfgchart.hxx119
-rw-r--r--cui/source/options/connpoolconfig.cxx226
-rw-r--r--cui/source/options/connpoolconfig.hxx57
-rw-r--r--cui/source/options/connpooloptions.cxx516
-rw-r--r--cui/source/options/connpooloptions.hrc52
-rw-r--r--cui/source/options/connpooloptions.hxx95
-rw-r--r--cui/source/options/connpooloptions.src169
-rw-r--r--cui/source/options/connpoolsettings.cxx126
-rw-r--r--cui/source/options/connpoolsettings.hxx111
-rw-r--r--cui/source/options/cuisrchdlg.cxx103
-rw-r--r--cui/source/options/dbregister.cxx527
-rw-r--r--cui/source/options/dbregister.hrc45
-rw-r--r--cui/source/options/dbregister.src93
-rw-r--r--cui/source/options/dbregisterednamesconfig.cxx144
-rw-r--r--cui/source/options/dbregisterednamesconfig.hxx57
-rw-r--r--cui/source/options/dbregistersettings.cxx79
-rw-r--r--cui/source/options/dbregistersettings.hxx98
-rw-r--r--cui/source/options/doclinkdialog.cxx227
-rw-r--r--cui/source/options/doclinkdialog.hrc53
-rw-r--r--cui/source/options/doclinkdialog.hxx96
-rw-r--r--cui/source/options/doclinkdialog.src154
-rw-r--r--cui/source/options/fontsubs.cxx614
-rw-r--r--cui/source/options/fontsubs.hrc65
-rw-r--r--cui/source/options/fontsubs.hxx137
-rw-r--r--cui/source/options/fontsubs.src199
-rw-r--r--cui/source/options/internationaloptions.cxx167
-rw-r--r--cui/source/options/internationaloptions.hrc75
-rw-r--r--cui/source/options/internationaloptions.src106
-rwxr-xr-xcui/source/options/makefile.mk122
-rw-r--r--cui/source/options/optHeaderTabListbox.cxx90
-rw-r--r--cui/source/options/optHeaderTabListbox.hxx48
-rw-r--r--cui/source/options/optaccessibility.cxx188
-rw-r--r--cui/source/options/optaccessibility.hrc87
-rw-r--r--cui/source/options/optaccessibility.hxx68
-rw-r--r--cui/source/options/optaccessibility.src155
-rw-r--r--cui/source/options/optasian.cxx470
-rw-r--r--cui/source/options/optasian.hrc52
-rw-r--r--cui/source/options/optasian.src177
-rw-r--r--cui/source/options/optchart.cxx239
-rw-r--r--cui/source/options/optchart.hrc40
-rw-r--r--cui/source/options/optchart.hxx92
-rw-r--r--cui/source/options/optchart.src86
-rw-r--r--cui/source/options/optcolor.cxx1633
-rw-r--r--cui/source/options/optcolor.hrc222
-rw-r--r--cui/source/options/optcolor.hxx84
-rw-r--r--cui/source/options/optcolor.src552
-rw-r--r--cui/source/options/optctl.cxx173
-rw-r--r--cui/source/options/optctl.hrc61
-rw-r--r--cui/source/options/optctl.hxx73
-rw-r--r--cui/source/options/optctl.src119
-rw-r--r--cui/source/options/optdict.cxx805
-rw-r--r--cui/source/options/optdict.hrc68
-rw-r--r--cui/source/options/optdict.src282
-rw-r--r--cui/source/options/optfltr.cxx439
-rw-r--r--cui/source/options/optfltr.hrc58
-rw-r--r--cui/source/options/optfltr.hxx118
-rw-r--r--cui/source/options/optfltr.src204
-rw-r--r--cui/source/options/optgdlg.cxx1921
-rw-r--r--cui/source/options/optgdlg.hrc208
-rw-r--r--cui/source/options/optgdlg.hxx220
-rw-r--r--cui/source/options/optgdlg.src643
-rw-r--r--cui/source/options/optgenrl.cxx584
-rw-r--r--cui/source/options/optgenrl.hrc88
-rw-r--r--cui/source/options/optgenrl.src315
-rw-r--r--cui/source/options/opthtml.cxx271
-rw-r--r--cui/source/options/opthtml.hrc66
-rw-r--r--cui/source/options/opthtml.hxx92
-rw-r--r--cui/source/options/opthtml.src290
-rw-r--r--cui/source/options/optimprove.cxx230
-rw-r--r--cui/source/options/optimprove.hrc53
-rw-r--r--cui/source/options/optimprove.src124
-rw-r--r--cui/source/options/optimprove2.cxx272
-rw-r--r--cui/source/options/optinet2.cxx2339
-rw-r--r--cui/source/options/optinet2.hrc180
-rw-r--r--cui/source/options/optinet2.hxx355
-rw-r--r--cui/source/options/optinet2.src647
-rw-r--r--cui/source/options/optjava.cxx1138
-rw-r--r--cui/source/options/optjava.hrc86
-rw-r--r--cui/source/options/optjava.hxx217
-rw-r--r--cui/source/options/optjava.src290
-rw-r--r--cui/source/options/optjsearch.cxx385
-rw-r--r--cui/source/options/optjsearch.hrc53
-rw-r--r--cui/source/options/optjsearch.hxx96
-rw-r--r--cui/source/options/optjsearch.src223
-rw-r--r--cui/source/options/optlingu.cxx2555
-rw-r--r--cui/source/options/optlingu.hrc91
-rw-r--r--cui/source/options/optlingu.src357
-rw-r--r--cui/source/options/optmemory.cxx274
-rw-r--r--cui/source/options/optmemory.hrc89
-rw-r--r--cui/source/options/optmemory.hxx92
-rw-r--r--cui/source/options/optmemory.src210
-rw-r--r--cui/source/options/optpath.cxx866
-rw-r--r--cui/source/options/optpath.hrc46
-rw-r--r--cui/source/options/optpath.src203
-rw-r--r--cui/source/options/optsave.cxx822
-rw-r--r--cui/source/options/optsave.hrc84
-rw-r--r--cui/source/options/optsave.hxx108
-rw-r--r--cui/source/options/optsave.src325
-rw-r--r--cui/source/options/optspell.hrc45
-rw-r--r--cui/source/options/optspell.src128
-rw-r--r--cui/source/options/optupdt.cxx415
-rw-r--r--cui/source/options/optupdt.hrc52
-rw-r--r--cui/source/options/optupdt.hxx84
-rw-r--r--cui/source/options/optupdt.src114
-rw-r--r--cui/source/options/radiobtnbox.cxx118
-rw-r--r--cui/source/options/readonlyimage.cxx84
-rw-r--r--cui/source/options/readonlyimage.hxx46
-rw-r--r--cui/source/options/readonlyimage.src55
-rw-r--r--cui/source/options/sdbcdriverenum.cxx132
-rw-r--r--cui/source/options/sdbcdriverenum.hxx79
-rw-r--r--cui/source/options/securityoptions.cxx107
-rw-r--r--cui/source/options/securityoptions.hrc83
-rw-r--r--cui/source/options/securityoptions.hxx94
-rw-r--r--cui/source/options/securityoptions.src168
-rw-r--r--cui/source/options/treeopt.cxx2850
-rw-r--r--cui/source/options/treeopt.hrc103
-rw-r--r--cui/source/options/treeopt.src387
-rw-r--r--cui/source/options/webconninfo.cxx377
-rw-r--r--cui/source/options/webconninfo.hrc65
-rw-r--r--cui/source/options/webconninfo.hxx88
-rw-r--r--cui/source/options/webconninfo.src106
-rw-r--r--cui/source/tabpages/align.cxx299
-rw-r--r--cui/source/tabpages/align.hrc87
-rw-r--r--cui/source/tabpages/align.src251
-rw-r--r--cui/source/tabpages/autocdlg.cxx2776
-rw-r--r--cui/source/tabpages/autocdlg.hrc162
-rw-r--r--cui/source/tabpages/autocdlg.src856
-rw-r--r--cui/source/tabpages/backgrnd.cxx1980
-rw-r--r--cui/source/tabpages/backgrnd.hrc73
-rw-r--r--cui/source/tabpages/backgrnd.src309
-rw-r--r--cui/source/tabpages/bbdlg.cxx75
-rw-r--r--cui/source/tabpages/bbdlg.src88
-rw-r--r--cui/source/tabpages/border.cxx1270
-rw-r--r--cui/source/tabpages/border.hrc109
-rw-r--r--cui/source/tabpages/border.src431
-rw-r--r--cui/source/tabpages/borderconn.cxx314
-rw-r--r--cui/source/tabpages/borderconn.hxx79
-rw-r--r--cui/source/tabpages/chardlg.cxx4065
-rw-r--r--cui/source/tabpages/chardlg.h74
-rw-r--r--cui/source/tabpages/chardlg.hrc184
-rw-r--r--cui/source/tabpages/chardlg.src1128
-rw-r--r--cui/source/tabpages/connect.cxx567
-rw-r--r--cui/source/tabpages/connect.hrc48
-rw-r--r--cui/source/tabpages/connect.src270
-rw-r--r--cui/source/tabpages/dstribut.cxx247
-rw-r--r--cui/source/tabpages/dstribut.hrc58
-rw-r--r--cui/source/tabpages/dstribut.src294
-rw-r--r--cui/source/tabpages/frmdirlbox.src96
-rw-r--r--cui/source/tabpages/grfpage.cxx838
-rw-r--r--cui/source/tabpages/grfpage.hrc56
-rw-r--r--cui/source/tabpages/grfpage.src335
-rw-r--r--cui/source/tabpages/labdlg.cxx653
-rw-r--r--cui/source/tabpages/labdlg.hrc80
-rw-r--r--cui/source/tabpages/labdlg.src301
-rw-r--r--cui/source/tabpages/macroass.cxx719
-rw-r--r--cui/source/tabpages/macroass.hrc85
-rw-r--r--cui/source/tabpages/macroass.src145
-rwxr-xr-xcui/source/tabpages/makefile.mk114
-rw-r--r--cui/source/tabpages/measure.cxx877
-rw-r--r--cui/source/tabpages/measure.hrc56
-rw-r--r--cui/source/tabpages/measure.src312
-rw-r--r--cui/source/tabpages/numfmt.cxx1953
-rw-r--r--cui/source/tabpages/numfmt.hrc77
-rw-r--r--cui/source/tabpages/numfmt.src297
-rw-r--r--cui/source/tabpages/numpages.cxx4081
-rw-r--r--cui/source/tabpages/numpages.hrc135
-rw-r--r--cui/source/tabpages/numpages.src814
-rw-r--r--cui/source/tabpages/page.cxx1772
-rw-r--r--cui/source/tabpages/page.h74
-rw-r--r--cui/source/tabpages/page.hrc87
-rw-r--r--cui/source/tabpages/page.src507
-rw-r--r--cui/source/tabpages/paragrph.cxx2375
-rw-r--r--cui/source/tabpages/paragrph.hrc124
-rw-r--r--cui/source/tabpages/paragrph.src735
-rw-r--r--cui/source/tabpages/strings.src178
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx1974
-rw-r--r--cui/source/tabpages/swpossizetabpage.hrc62
-rw-r--r--cui/source/tabpages/swpossizetabpage.hxx161
-rw-r--r--cui/source/tabpages/swpossizetabpage.src298
-rw-r--r--cui/source/tabpages/tabarea.cxx371
-rw-r--r--cui/source/tabpages/tabarea.hrc190
-rw-r--r--cui/source/tabpages/tabarea.src1542
-rw-r--r--cui/source/tabpages/tabline.cxx301
-rw-r--r--cui/source/tabpages/tabline.hrc109
-rw-r--r--cui/source/tabpages/tabline.src804
-rw-r--r--cui/source/tabpages/tabstpge.cxx747
-rw-r--r--cui/source/tabpages/tabstpge.hrc66
-rw-r--r--cui/source/tabpages/tabstpge.src234
-rw-r--r--cui/source/tabpages/textanim.cxx760
-rw-r--r--cui/source/tabpages/textanim.hrc50
-rw-r--r--cui/source/tabpages/textanim.src323
-rw-r--r--cui/source/tabpages/textattr.cxx801
-rw-r--r--cui/source/tabpages/textattr.hrc49
-rw-r--r--cui/source/tabpages/textattr.src247
-rw-r--r--cui/source/tabpages/tparea.cxx2583
-rw-r--r--cui/source/tabpages/tpbitmap.cxx1164
-rw-r--r--cui/source/tabpages/tpcolor.cxx1276
-rw-r--r--cui/source/tabpages/tpgradnt.cxx938
-rw-r--r--cui/source/tabpages/tphatch.cxx896
-rw-r--r--cui/source/tabpages/tpline.cxx1927
-rw-r--r--cui/source/tabpages/tplnedef.cxx1015
-rw-r--r--cui/source/tabpages/tplneend.cxx750
-rw-r--r--cui/source/tabpages/tpshadow.cxx613
-rw-r--r--cui/source/tabpages/transfrm.cxx1700
-rw-r--r--cui/source/tabpages/transfrm.hrc79
-rw-r--r--cui/source/tabpages/transfrm.src612
-rw-r--r--cui/util/cui.map7
-rw-r--r--cui/util/hidother.src203
-rw-r--r--cui/util/makefile.mk110
-rw-r--r--cui/util/makefile.pmk47
-rw-r--r--extensions/inc/abpilot.hrc44
-rw-r--r--extensions/inc/bibliography.hrc85
-rw-r--r--extensions/inc/dbpilots.hrc54
-rw-r--r--extensions/inc/extensio.hrc446
-rw-r--r--extensions/inc/pch/precompiled_extensions.hxx6
-rw-r--r--extensions/inc/propctrlr.hrc336
-rw-r--r--extensions/inc/update.hrc48
-rw-r--r--extensions/prj/build.lst3
-rw-r--r--extensions/prj/d.lst1
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx4
-rw-r--r--extensions/source/abpilot/abpresid.hrc4
-rw-r--r--extensions/source/abpilot/abspilot.cxx6
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx86
-rw-r--r--extensions/source/abpilot/makefile.mk2
-rw-r--r--extensions/source/activex/main/SOActiveX.cpp2
-rw-r--r--extensions/source/activex/main/SOComWindowPeer.h2
-rw-r--r--extensions/source/activex/main/makefile.mk55
-rw-r--r--extensions/source/activex/main/so_activex.cpp384
-rw-r--r--extensions/source/bibliography/bib.hrc2
-rw-r--r--extensions/source/bibliography/bibbeam.cxx6
-rw-r--r--extensions/source/bibliography/bibconfig.cxx6
-rw-r--r--extensions/source/bibliography/bibconfig.hxx1
-rw-r--r--extensions/source/bibliography/bibload.cxx6
-rw-r--r--extensions/source/bibliography/bibmod.cxx2
-rw-r--r--extensions/source/bibliography/bibview.hxx2
-rw-r--r--extensions/source/bibliography/datman.cxx49
-rw-r--r--extensions/source/bibliography/datman.hxx6
-rw-r--r--extensions/source/bibliography/framectr.cxx14
-rw-r--r--extensions/source/bibliography/framectr.hxx8
-rw-r--r--extensions/source/bibliography/general.cxx18
-rw-r--r--extensions/source/bibliography/hidother.src4
-rw-r--r--extensions/source/bibliography/menu.src4
-rw-r--r--extensions/source/bibliography/sections.src2
-rw-r--r--extensions/source/bibliography/toolbar.cxx8
-rw-r--r--extensions/source/bibliography/toolbar.hxx2
-rw-r--r--extensions/source/bibliography/toolbar.src2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx6
-rw-r--r--extensions/source/dbpilots/dbpresid.hrc4
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx4
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx4
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx4
-rw-r--r--extensions/source/dbpilots/makefile.mk3
-rw-r--r--extensions/source/inc/componentmodule.cxx2
-rw-r--r--extensions/source/logging/filehandler.cxx11
-rw-r--r--extensions/source/logging/logger.cxx2
-rw-r--r--extensions/source/nsplugin/source/so_env.cxx3
-rw-r--r--extensions/source/oooimprovecore/core.cxx4
-rw-r--r--extensions/source/plugin/base/manager.cxx2
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx5
-rw-r--r--extensions/source/plugin/unx/makefile.mk4
-rw-r--r--extensions/source/plugin/unx/unxmgr.cxx20
-rw-r--r--extensions/source/plugin/util/makefile.mk3
-rw-r--r--extensions/source/preload/makefile.mk3
-rw-r--r--extensions/source/preload/oemwiz.cxx6
-rw-r--r--extensions/source/preload/oemwiz.hxx2
-rw-r--r--extensions/source/propctrlr/browserview.cxx4
-rw-r--r--extensions/source/propctrlr/composeduiupdate.cxx7
-rw-r--r--extensions/source/propctrlr/composeduiupdate.hxx36
-rw-r--r--extensions/source/propctrlr/defaultforminspection.cxx4
-rw-r--r--extensions/source/propctrlr/editpropertyhandler.cxx1
-rw-r--r--extensions/source/propctrlr/eformspropertyhandler.cxx4
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx12
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx16
-rw-r--r--extensions/source/propctrlr/formcontroller.cxx2
-rw-r--r--extensions/source/propctrlr/formlinkdialog.src4
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx6
-rw-r--r--extensions/source/propctrlr/listselectiondlg.src4
-rw-r--r--extensions/source/propctrlr/propertyhandler.cxx2
-rw-r--r--extensions/source/propctrlr/propresid.hrc2
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
-rw-r--r--extensions/source/propctrlr/taborder.cxx2
-rw-r--r--extensions/source/propctrlr/taborder.src4
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx4
-rw-r--r--extensions/source/propctrlr/xsdvalidationhelper.cxx2
-rw-r--r--extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx10
-rw-r--r--extensions/source/update/check/updatecheck.cxx37
-rw-r--r--extensions/source/update/check/updatehdl.cxx12
-rw-r--r--extensions/source/update/feed/makefile.mk16
-rw-r--r--extensions/source/update/feed/updatefeed.cxx368
-rw-r--r--extensions/test/sax/testsax.cxx13
-rw-r--r--extensions/test/sax/testwriter.cxx7
-rw-r--r--extensions/test/stm/datatest.cxx28
-rw-r--r--extensions/test/stm/marktest.cxx12
-rw-r--r--extensions/test/stm/pipetest.cxx6
-rw-r--r--extensions/util/hidother.src25
-rw-r--r--extensions/workben/pythonautotest.cxx76
-rw-r--r--extensions/workben/pythontest.cxx6
-rw-r--r--extensions/workben/testcomponent.cxx11
-rw-r--r--forms/inc/pch/precompiled_forms.hxx18
-rw-r--r--forms/prj/build.lst2
-rwxr-xr-xforms/qa/complex/forms/makefile.mk2
-rw-r--r--forms/qa/forms_all.sce1
-rw-r--r--forms/qa/integration/forms/DocumentViewHelper.java7
-rw-r--r--forms/qa/integration/forms/FormControlTest.java11
-rw-r--r--forms/qa/integration/forms/FormLayer.java48
-rw-r--r--forms/qa/integration/forms/FormPropertyBags.java10
-rw-r--r--forms/qa/integration/forms/ListBox.java290
-rw-r--r--forms/qa/integration/forms/ListSelection.java86
-rw-r--r--forms/qa/integration/forms/MasterDetailForms.java334
-rw-r--r--forms/qa/integration/forms/TestCase.java13
-rw-r--r--forms/qa/integration/forms/dbfTools.java9
-rw-r--r--forms/qa/org/openoffice/complex/forms/tools/ResultSet.java264
-rw-r--r--forms/source/component/Button.cxx14
-rw-r--r--forms/source/component/Button.hxx10
-rw-r--r--forms/source/component/Columns.cxx16
-rw-r--r--forms/source/component/ComboBox.cxx7
-rw-r--r--forms/source/component/ComboBox.hxx2
-rw-r--r--forms/source/component/Currency.cxx9
-rw-r--r--forms/source/component/Currency.hxx2
-rw-r--r--forms/source/component/DatabaseForm.cxx155
-rw-r--r--forms/source/component/Date.cxx7
-rw-r--r--forms/source/component/Date.hxx2
-rw-r--r--forms/source/component/Edit.cxx7
-rw-r--r--forms/source/component/Edit.hxx2
-rw-r--r--forms/source/component/FormComponent.cxx24
-rw-r--r--forms/source/component/FormattedField.cxx13
-rw-r--r--forms/source/component/FormattedField.hxx1
-rw-r--r--forms/source/component/ImageControl.cxx3
-rw-r--r--forms/source/component/ListBox.cxx21
-rw-r--r--forms/source/component/ListBox.hxx1
-rw-r--r--forms/source/component/Numeric.cxx7
-rw-r--r--forms/source/component/Numeric.hxx1
-rw-r--r--forms/source/component/Pattern.cxx7
-rw-r--r--forms/source/component/Pattern.hxx1
-rw-r--r--forms/source/component/Time.cxx7
-rw-r--r--forms/source/component/Time.hxx1
-rw-r--r--forms/source/component/clickableimage.cxx5
-rw-r--r--forms/source/helper/commanddescriptionprovider.cxx139
-rw-r--r--forms/source/helper/commandimageprovider.cxx180
-rw-r--r--forms/source/helper/formnavigation.cxx162
-rw-r--r--forms/source/helper/makefile.mk2
-rw-r--r--forms/source/inc/FormComponent.hxx106
-rw-r--r--forms/source/inc/commanddescriptionprovider.hxx68
-rw-r--r--forms/source/inc/commandimageprovider.hxx77
-rw-r--r--forms/source/inc/featuredispatcher.hxx12
-rw-r--r--forms/source/inc/formnavigation.hxx24
-rw-r--r--forms/source/inc/frm_resource.hrc2
-rw-r--r--forms/source/inc/frm_strings.hxx2
-rw-r--r--forms/source/inc/property.hrc2
-rw-r--r--forms/source/resource/frm_resource.cxx2
-rw-r--r--forms/source/richtext/parametrizedattributedispatcher.cxx4
-rw-r--r--forms/source/richtext/richtextcontrol.cxx33
-rw-r--r--forms/source/richtext/richtextcontrol.hxx3
-rw-r--r--forms/source/richtext/richtextengine.cxx6
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx29
-rw-r--r--forms/source/richtext/richtextmodel.cxx12
-rw-r--r--forms/source/richtext/richtextmodel.hxx3
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx6
-rw-r--r--forms/source/richtext/richtextvclcontrol.hxx4
-rw-r--r--forms/source/richtext/rtattributehandler.cxx4
-rw-r--r--forms/source/richtext/rtattributes.hxx2
-rw-r--r--forms/source/runtime/formoperations.cxx2
-rw-r--r--forms/source/runtime/formoperations.hxx20
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx79
-rw-r--r--forms/source/solar/component/navbarcontrol.hxx22
-rw-r--r--forms/source/solar/control/navtoolbar.cxx254
-rw-r--r--forms/source/solar/inc/navtoolbar.hxx46
-rw-r--r--lingucomponent/prj/build.lst2
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx61
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx2
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx7
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx4
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/makefile.mk2
-rw-r--r--lingucomponent/source/spellcheck/spell/makefile.mk3
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx8
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx5
-rw-r--r--package/source/xstor/makefile.mk1
-rw-r--r--package/source/xstor/owriteablestream.cxx33
-rw-r--r--package/source/xstor/selfterminatefilestream.cxx156
-rw-r--r--package/source/xstor/selfterminatefilestream.hxx79
-rw-r--r--package/source/zipapi/ZipFile.cxx4
-rw-r--r--package/source/zippackage/ZipPackage.cxx35
-rw-r--r--setup_native/prj/build.lst3
-rw-r--r--setup_native/prj/d.lst5
-rw-r--r--setup_native/scripts/admin.pl204
-rwxr-xr-xsetup_native/source/java/javaversion.dat26
-rw-r--r--setup_native/source/java/javaversion2.dat26
-rw-r--r--setup_native/source/opensolaris/bundledextensions/README80
-rw-r--r--setup_native/source/opensolaris/bundledextensions/installed1
-rw-r--r--setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml60
-rw-r--r--setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions108
-rwxr-xr-xsetup_native/source/packinfo/packinfo_office.txt88
-rw-r--r--setup_native/source/packinfo/spellchecker_selection.txt30
-rw-r--r--setup_native/source/ulfconv/ulfconv.cxx6
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/exports.dxp2
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/makefile.mk112
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/reg64.cxx476
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx50
-rwxr-xr-xsetup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx3
-rw-r--r--setup_native/source/win32/customactions/shellextensions/shellextensions.cxx87
-rw-r--r--setup_native/source/win32/msi-encodinglist.txt13
-rw-r--r--setup_native/tests/opensolaris/bundledextensions/send_ooo32
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java4
-rw-r--r--wizards/com/sun/star/wizards/agenda/makefile.mk3
-rw-r--r--wizards/com/sun/star/wizards/common/Desktop.java20
-rw-r--r--wizards/com/sun/star/wizards/db/CommandMetaData.java4
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java187
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java2
-rw-r--r--wizards/com/sun/star/wizards/fax/makefile.mk2
-rw-r--r--wizards/com/sun/star/wizards/form/makefile.mk2
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java2
-rw-r--r--wizards/com/sun/star/wizards/query/Finalizer.java16
-rw-r--r--wizards/com/sun/star/wizards/query/QueryWizard.java7
-rw-r--r--wizards/com/sun/star/wizards/report/CallReportWizard.java23
-rw-r--r--wizards/com/sun/star/wizards/report/IReportDocument.java2
-rw-r--r--wizards/com/sun/star/wizards/report/ReportFinalizer.java32
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextImplementation.java2
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java29
-rw-r--r--wizards/com/sun/star/wizards/table/TableWizard.java6
-rw-r--r--wizards/com/sun/star/wizards/table/makefile.mk2
-rw-r--r--wizards/com/sun/star/wizards/web/CallWizard.java7
-rw-r--r--wizards/com/sun/star/wizards/web/FTPDialog.java2
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizard.java7
-rw-r--r--wizards/source/launcher/FontOOo.xba46
-rw-r--r--wizards/source/launcher/makefile.mk3
-rw-r--r--wizards/source/launcher/script.xlb1
-rw-r--r--xmlsecurity/inc/xmlsecurity/macrosecurity.hxx2
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx10
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx7
-rw-r--r--xmlsecurity/source/dialogs/helpids.hrc2
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx4
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx4
-rw-r--r--xmlsecurity/source/dialogs/stbcontrl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx8
-rw-r--r--xmlsecurity/tools/demo/makefile.mk2
-rw-r--r--xmlsecurity/tools/examples/uno_win.bat2
-rw-r--r--xmlsecurity/tools/standalone/csfit/util/makefile.mk2
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/util/makefile.mk2
-rw-r--r--xmlsecurity/tools/uno/makefile.mk2
714 files changed, 163444 insertions, 3009 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk b/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk
index d48817b51a6c..c1909a807863 100755
--- a/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk
+++ b/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk
@@ -39,7 +39,7 @@ PACKAGE = org$/openoffice$/java$/accessibility
.INCLUDE : settings.mk
JAVADIR = $(OUT)$/misc$/java
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar
+JARFILES = jurt.jar unoil.jar ridl.jar
JAVAFILES = \
logging$/XAccessibleEventLog.java \
logging$/XAccessibleHypertextLog.java \
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
new file mode 100755
index 000000000000..219cf03dfe88
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
@@ -0,0 +1,269 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2009 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleGridControl.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROL_HXX
+
+#include <accessibility/extended/AccessibleGridControlBase.hxx>
+#include <accessibility/extended/AccessibleGridControlTable.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <svtools/accessibletable.hxx>
+
+
+#include <memory>
+
+using namespace ::svt::table;
+
+// ============================================================================
+
+namespace accessibility {
+
+ class AccessibleGridControl_Impl;
+
+// ============================================================================
+
+/** This class represents the complete accessible Grid Control object. */
+class AccessibleGridControl : public AccessibleGridControlBase
+{
+ friend class AccessibleGridControlAccess;
+
+protected:
+ AccessibleGridControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxCreator,
+ ::svt::table::IAccessibleTable& _rTable
+ );
+
+ virtual ~AccessibleGridControl();
+
+ /** Cleans up members. */
+ using AccessibleGridControlBase::disposing;
+ virtual void SAL_CALL disposing();
+
+protected:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The role of this object (a table). */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return
+ The accessible child rendered under the given point.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Grabs the focus to the Grid Control. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+public:
+ // helper functions
+ /** returns the accessible object for the row or the column header bar
+ */
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ getHeaderBar( ::svt::table::AccessibleTableControlObjType _eObjType )
+ {
+ return implGetHeaderBar(_eObjType);
+ }
+
+ /** returns the accessible object for the table representation
+ */
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ getTable( )
+ {
+ return implGetTable();
+ }
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ // internal helper methods ------------------------------------------------
+
+ /** This method creates (once) and returns the accessible data table child.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the data table. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > implGetTable();
+
+ /** This method creates (once) and returns the specified header bar.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the header bar. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetHeaderBar( ::svt::table::AccessibleTableControlObjType eObjType );
+
+ /** This method returns one of the children that are always present:
+ Data table, row and column header bar or corner control.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the specified child. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetFixedChild( sal_Int32 nChildIndex );
+
+ /** This method creates and returns an accessible table.
+ @return An AccessibleGridControlTable. */
+ virtual AccessibleGridControlTable* createAccessibleTable();
+
+private:
+ // members ----------------------------------------------------------------
+ ::std::auto_ptr< AccessibleGridControl_Impl > m_pImpl;
+};
+
+// ============================================================================
+/** the XAccessible which creates/returns an AccessibleGridControl
+
+ <p>The instance holds it's XAccessibleContext with a hard reference, while
+ the contxt holds this instance weak.</p>
+*/
+typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > AccessibleGridControlAccess_Base;
+
+class AccessibleGridControlAccess :public AccessibleGridControlAccess_Base
+ ,public ::svt::table::IAccessibleTableControl
+{
+private:
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ m_xParent;
+ ::svt::table::IAccessibleTable& m_rTable;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ m_xContext;
+ AccessibleGridControl* m_pContext;
+ // note that this pointer is valid as long as m_xContext is valid!
+
+public:
+ AccessibleGridControlAccess(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::table::IAccessibleTable& _rTable
+ );
+
+ /// checks whether the accessible context is still alive
+ bool isContextAlive() const;
+
+ /// returns the AccessibleContext belonging to this Accessible
+ inline AccessibleGridControl* getContext() { return m_pContext; }
+ inline const AccessibleGridControl* getContext() const { return m_pContext; }
+
+protected:
+ virtual ~AccessibleGridControlAccess();
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ SAL_CALL getAccessibleContext() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // IAccessibleTable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getMyself()
+ {
+ return this;
+ }
+ void dispose();
+ virtual sal_Bool isAlive() const
+ {
+ return isContextAlive();
+ }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getTableHeader( ::svt::table::AccessibleTableControlObjType _eObjType )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ AccessibleGridControl* pContext( getContext() );
+ if ( pContext )
+ xAccessible = pContext->getHeaderBar( _eObjType );
+ return xAccessible;
+ }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getTable()
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ AccessibleGridControl* pContext( getContext() );
+ if ( pContext )
+ xAccessible = pContext->getTable();
+ return xAccessible;
+ }
+ virtual void commitEvent( sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue )
+ {
+ AccessibleGridControl* pContext( getContext() );
+ if ( pContext )
+ pContext->commitEvent( nEventId, rNewValue, rOldValue );
+ }
+
+private:
+ AccessibleGridControlAccess(); // never implemented
+ AccessibleGridControlAccess( const AccessibleGridControlAccess& ); // never implemented
+ AccessibleGridControlAccess& operator=( const AccessibleGridControlAccess& ); // never implemented
+};
+
+// ============================================================================
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
new file mode 100755
index 000000000000..3cfdc182aee8
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
@@ -0,0 +1,470 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlBase.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLBASE_HXX
+
+#include <svtools/accessibletable.hxx>
+#include <tools/debug.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/gen.hxx>
+#include <vcl/svapp.hxx>
+#include <cppuhelper/compbase4.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <toolkit/helper/convert.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <comphelper/accessibleeventnotifier.hxx>
+#include <comphelper/uno3.hxx>
+
+// ============================================================================
+
+class Window;
+
+namespace utl {
+ class AccessibleStateSetHelper;
+}
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+/** Aquire the solar mutex. */
+class TCSolarGuard : public ::vos::OGuard
+{
+public:
+ inline TCSolarGuard() : ::vos::OGuard( Application::GetSolarMutex() ) {}
+};
+
+// ============================================================================
+
+typedef ::cppu::WeakAggComponentImplHelper4<
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo >
+ AccessibleGridControlImplHelper;
+
+/** The GridControl accessible objects inherit from this base class. It
+ implements basic functionality for various Accessibility interfaces and
+ the event broadcaster and contains the ::osl::Mutex. */
+class AccessibleGridControlBase :
+ public ::comphelper::OBaseMutex,
+ public AccessibleGridControlImplHelper
+{
+public:
+ /** Constructor sets specified name and description.
+ @param rxParent XAccessible interface of the parent object.
+ @param rTable The Table control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text. */
+ AccessibleGridControlBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+protected:
+ virtual ~AccessibleGridControlBase();
+
+ /** Commits DeFunc event to listeners and cleans up members. */
+ virtual void SAL_CALL disposing();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return A reference to the parent accessible object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The description of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The name of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The relation set (the GridControl does not have one).
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+ getAccessibleRelationSet()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The set of current states. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The parent's locale. */
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
+ throw ( ::com::sun::star::accessibility::IllegalAccessibleComponentStateException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported.
+ */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleChildCount,
+ - getAccessibleChild,
+ - getAccessibleRole.
+ Derived classes may overwrite getAccessibleIndexInParent to increase
+ performance. */
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return
+ <TRUE/>, if the point lies within the bounding box of this object. */
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The bounding box of this object. */
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The upper left corner of the bounding box relative to the parent. */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The upper left corner of the bounding box in screen coordinates. */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The size of the bounding box. */
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object is showing. */
+ virtual sal_Bool SAL_CALL isShowing()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object is visible. */
+ virtual sal_Bool SAL_CALL isVisible()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object can accept the focus. */
+ virtual sal_Bool SAL_CALL isFocusTraversable()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ /* Derived classes have to implement:
+ - getAccessibleAt,
+ - grabFocus,
+ - getAccessibleKeyBinding. */
+
+ /** @return
+ No key bindings supported by default.
+ */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ /** @return
+ The accessible child rendered under the given point.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleEventBroadcaster --------------------------------------------
+
+ /** Adds a new event listener */
+ using cppu::WeakAggComponentImplHelperBase::addEventListener;
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& rxListener )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Removes an event listener. */
+ using cppu::WeakAggComponentImplHelperBase::removeEventListener;
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& rxListener )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return Whether the specified service is supported by this class. */
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return A list of all supported services. */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getImplementationName. */
+
+ // helper methods ---------------------------------------------------------
+
+ /** @return The GridControl object type. */
+ inline ::svt::table::AccessibleTableControlObjType getType() const;
+
+ /** Commits an event to all listeners. */
+ void commitEvent(
+ sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue,
+
+ const ::com::sun::star::uno::Any& rOldValue );
+ /** @return <TRUE/>, if the object is not disposed or disposing. */
+ sal_Bool isAlive() const;
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** Determines whether the Grid control is really showing inside of
+ its parent accessible window. Derived classes may implement different
+ behaviour.
+ @attention This method requires locked mutex's and a living object.
+ @return <TRUE/>, if the object is really showing. */
+ virtual sal_Bool implIsShowing();
+
+ /** Derived classes return the bounding box relative to the parent window.
+ @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox() = 0;
+ ///** Derived classes return the bounding box in screen coordinates.
+ // @attention This method requires locked mutex's and a living object.
+ // @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen() = 0;
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object. This method calls FillStateSet at the GridControl which
+ fills it with more states depending on the object type. Derived classes
+ may overwrite this method and add more states.
+ @attention This method requires locked mutex's.
+ @return A filled AccessibleStateSetHelper. */
+ virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ // internal helper methods ------------------------------------------------
+
+ /** @throws <type>DisposedException</type> If the object is not alive. */
+ void ensureIsAlive() const
+ throw ( ::com::sun::star::lang::DisposedException );
+
+ /** @return The ::osl::Mutex member provided by the class OBaseMutex. */
+ inline ::osl::Mutex& getOslMutex();
+ /** @return Pointer to the global ::osl::Mutex. */
+ static inline ::osl::Mutex* getOslGlobalMutex();
+
+ /** Changes the name of the object (flat assignment, no notify).
+ @attention This method requires a locked mutex. */
+ inline void implSetName( const ::rtl::OUString& rName );
+ /** Changes the description of the object (flat assignment, no notify).
+ @attention This method requires a locked mutex. */
+ inline void implSetDescription( const ::rtl::OUString& rDescription );
+
+ /** Locks all mutex's and calculates the bounding box relative to the
+ parent window.
+ @return The bounding box (VCL rect.) relative to the parent object. */
+ Rectangle getBoundingBox()
+ throw ( ::com::sun::star::lang::DisposedException );
+ ///** Locks all mutex's and calculates the bounding box in screen
+ // coordinates.
+ // @return The bounding box (VCL rect.) in screen coordinates. */
+ Rectangle getBoundingBoxOnScreen()
+ throw ( ::com::sun::star::lang::DisposedException );
+
+ /** Creates a new UUID, if rId is empty.
+ @attention This method requires locked global mutex to prevent double
+ creation of an UUID. */
+ static void implCreateUuid( ::com::sun::star::uno::Sequence< sal_Int8 >& rId );
+
+ ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; }
+ void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; }
+
+public:
+ // public versions of internal helper methods, with access control
+ struct TC_AccessControl { friend class TC_SolarMethodGuard; private: TC_AccessControl() { } };
+
+ inline ::osl::Mutex& getMutex( const TC_AccessControl& ) { return getOslMutex(); }
+ inline void ensureIsAlive( const TC_AccessControl& ) { ensureIsAlive(); }
+
+protected:
+ // members ----------------------------------------------------------------
+
+ /** The parent accessible object. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > m_xParent;
+ /** The SVT Table control. */
+ ::svt::table::IAccessibleTable& m_aTable;
+ /** The type of this object (for names, descriptions, state sets, ...). */
+ ::svt::table::AccessibleTableControlObjType m_eObjType;
+
+private:
+ /** Localized name. */
+ ::rtl::OUString m_aName;
+ /** Localized description text. */
+ ::rtl::OUString m_aDescription;
+ ::comphelper::AccessibleEventNotifier::TClientId m_aClientId;
+};
+
+// ============================================================================
+// a version of AccessibleGridControlBase which implements not only the XAccessibleContext,
+// but also the XAccessible
+
+typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > GridControlAccessibleElement_Base;
+
+class GridControlAccessibleElement
+ :public AccessibleGridControlBase
+ ,public GridControlAccessibleElement_Base
+{
+protected:
+ /** Constructor sets specified name and description.
+
+ @param rxParent XAccessible interface of the parent object.
+ @param rTable The Table control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text.
+ */
+ GridControlAccessibleElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+public:
+ // XInterface
+ DECLARE_XINTERFACE( )
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+protected:
+ virtual ~GridControlAccessibleElement();
+
+protected:
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+private:
+ GridControlAccessibleElement(); // never implemented
+ GridControlAccessibleElement( const GridControlAccessibleElement& ); // never implemented
+ GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ); // never implemented
+};
+
+// ============================================================================
+// a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex
+
+typedef ::osl::MutexGuard OslMutexGuard;
+
+class TC_SolarMethodGuard : public TCSolarGuard, public OslMutexGuard
+{
+public:
+ inline TC_SolarMethodGuard( AccessibleGridControlBase& _rOwner, bool _bEnsureAlive = true )
+ :TCSolarGuard( )
+ ,OslMutexGuard( _rOwner.getMutex( AccessibleGridControlBase::TC_AccessControl() ) )
+ {
+ if ( _bEnsureAlive )
+ _rOwner.ensureIsAlive( AccessibleGridControlBase::TC_AccessControl() );
+ }
+};
+
+// inlines --------------------------------------------------------------------
+
+inline ::svt::table::AccessibleTableControlObjType AccessibleGridControlBase::getType() const
+{
+ return m_eObjType;
+}
+
+inline ::osl::Mutex& AccessibleGridControlBase::getOslMutex()
+{
+ return m_aMutex;
+}
+
+inline ::osl::Mutex* AccessibleGridControlBase::getOslGlobalMutex()
+{
+ return ::osl::Mutex::getGlobalMutex();
+}
+
+inline void AccessibleGridControlBase::implSetName(
+ const ::rtl::OUString& rName )
+{
+ m_aName = rName;
+}
+
+inline void AccessibleGridControlBase::implSetDescription(
+ const ::rtl::OUString& rDescription )
+{
+ m_aDescription = rDescription;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLBASE_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx
new file mode 100755
index 000000000000..1c1a3aee2804
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlHeader.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADER_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADER_HXX
+
+
+#include "accessibility/extended/AccessibleGridControlHeaderCell.hxx"
+#include "accessibility/extended/AccessibleGridControlTableBase.hxx"
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+/** This class represents the accessible object of a header bar of a Grid Control
+ (row or column header bar). This object supports the
+ XAccessibleSelection interface. Selecting a child of this object selects
+ complete rows or columns of the data table. */
+class AccessibleGridControlHeader : public AccessibleGridControlTableBase
+{
+public:
+ /** @param eObjType One of the two allowed types TCTYPE_ROWHEADERBAR or
+ TCTYPE_COLUMNHEADERBAR. */
+ AccessibleGridControlHeader(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+protected:
+ virtual ~AccessibleGridControlHeader();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return
+ The XAccessible interface of the specified child.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return The accessible child rendered under the given point. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Grabs the focus to (the current cell of) the data table. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The description text of the specified row. */
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The description text of the specified column. */
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the row header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the column header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected rows. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected columns. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified row is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified column is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the cell object at the specified
+ cell position. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified cell is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return The name of this class. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal virtual methods -----------------------------------------------
+ /** @attention This method requires locked mutex's and a living object.
+ @return The absolute child index from the index of selected children.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified index is invalid. */
+ //sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex )
+ // throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** Returns the specified row or column. Uses one of the parameters,
+ depending on object type.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the specified column/row. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos );
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of used rows. */
+ virtual sal_Int32 implGetRowCount() const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of used columns. */
+ virtual sal_Int32 implGetColumnCount() const;
+
+ // internal helper methods ------------------------------------------------
+
+ /** @return <TRUE/>, if the objects is a header bar for rows. */
+ inline sal_Bool isRowBar() const;
+ /** @return <TRUE/>, if the objects is a header bar for columns. */
+ inline sal_Bool isColumnBar() const;
+};
+
+// inlines --------------------------------------------------------------------
+
+inline sal_Bool AccessibleGridControlHeader::isRowBar() const
+{
+ return getType() == ::svt::table::TCTYPE_ROWHEADERBAR;
+}
+
+inline sal_Bool AccessibleGridControlHeader::isColumnBar() const
+{
+ return getType() == ::svt::table::TCTYPE_COLUMNHEADERBAR;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLHEADER_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx
new file mode 100755
index 000000000000..3827cc7dad0a
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlHeaderCell.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
+
+#include "accessibility/extended/AccessibleGridControlTableCell.hxx"
+
+namespace accessibility
+{
+ class AccessibleGridControlHeaderCell : public AccessibleGridControlCell, public ::com::sun::star::accessibility::XAccessible
+ {
+ sal_Int32 m_nColumnRowId;
+ public:
+ AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& _rTable,
+ ::svt::table::AccessibleTableControlObjType _eObjType);
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Grabs the focus to the GridControl. */
+ virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ //-------------------------------------------------------------------------
+ inline sal_Bool isRowBarCell() const
+ {
+ return getType() == ::svt::table::TCTYPE_ROWHEADERCELL;
+ }
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ protected:
+ virtual Rectangle implGetBoundingBox();
+
+ virtual Rectangle implGetBoundingBoxOnScreen();
+ private:
+ ::rtl::OUString m_sHeaderName;
+ };
+}
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx
new file mode 100755
index 000000000000..c71bfd5eb65f
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlTable.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLE_HXX
+
+#include "accessibility/extended/AccessibleGridControlTableBase.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleSelection >
+ AccessibleGridControlTableImplHelper1;
+/** This class represents the accessible object of the data table of a
+ Grid control. */
+class AccessibleGridControlTable : public AccessibleGridControlTableBase,
+ public AccessibleGridControlTableImplHelper1
+{
+public:
+ AccessibleGridControlTable(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType _eType);
+
+protected:
+ virtual ~AccessibleGridControlTable();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return The accessible child rendered under the given point. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Grabs the focus to (the current cell of) the data table. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The description text of the specified row. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The description text of the specified column. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the row header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the column header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected rows. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected columns. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified row is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified column is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the cell object at the specified
+ cell position. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified cell is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleSelection ---------------------------------------------------
+
+ /** Selects the specified child (row or column of the table). */
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified child (row/column) is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Clears the complete selection. */
+ virtual void SAL_CALL clearAccessibleSelection()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Selects all children or first, if multiselection is not supported. */
+ virtual void SAL_CALL selectAllAccessibleChildren()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The number of selected rows/columns. */
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The specified selected row/column. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Removes the specified row/column from the selection. */
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return The name of this class. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ ///** @attention This method requires locked mutex's and a living object.
+ // @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+
+ //// internal helper methods ------------------------------------------------
+ ///** @attention This method requires a locked mutex.
+ // @return The XAccessibleTable interface of the specified header bar. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ implGetHeaderBar( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLE_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx
new file mode 100755
index 000000000000..79c294952acf
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlTableBase.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX
+
+#include "accessibility/extended/AccessibleGridControlBase.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+
+// ============================================================================
+
+namespace accessibility {
+
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ AccessibleGridControlTableImplHelper;
+
+/** The Grid Control accessible table objects inherit from this base class. It
+ implements basic functionality for the XAccessibleTable interface.
+ Grid COntrol table objects are: the data table, the column header bar and the
+ row header bar. */
+class AccessibleGridControlTableBase :
+ public GridControlAccessibleElement,
+ public AccessibleGridControlTableImplHelper
+{
+public:
+ /** Constructor sets specified name and description.
+ @param rxParent XAccessible interface of the parent object.
+ @param rTable The Table control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text. */
+ AccessibleGridControlTableBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+protected:
+ virtual ~AccessibleGridControlTableBase();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The role of this object (a table). */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleChild,
+ - getAccessibleIndexInParent. */
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /* Derived classes have to implement:
+ - getAccessibleAt,
+ - grabFocus,
+ - getAccessibleKeyBinding. */
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The number of used rows in the table (0 = empty table). */
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The number of used columns in the table (0 = empty table). */
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The row extent of the specified cell (always 1). */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The column extent of the specified cell (always 1). */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The caption cell of the table (not supported). */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The summary object of the table (not supported). */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The child index of the specified cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The row index of the specified child cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The column index of the specified child cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleRowDescription,
+ - getAccessibleColumnDescription,
+ - getAccessibleRowHeaders,
+ - getAccessibleColumnHeaders,
+ - getSelectedAccessibleRows,
+ - getSelectedAccessibleColumns,
+ - isAccessibleRowSelected,
+ - isAccessibleColumnSelected,
+ - getAccessibleCellAt,
+ - isAccessibleSelected. */
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** @return A sequence of possible types (received from base classes). */
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal helper methods ------------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @param nColumn
+ the position of the column in the Accessible world
+ @return
+ the position of the column in VCL the Accessible world
+ */
+ sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The number of cells of the table. */
+ sal_Int32 implGetChildCount() const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The row index of the specified cell index. */
+ sal_Int32 implGetRow( sal_Int32 nChildIndex ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The column index of the specified cell index. */
+ sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The child index of the specified cell address. */
+ sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const;
+
+ /** Fills a sequence with sorted indexes of completely selected rows.
+ @attention This method requires locked mutex's and a living object.
+ @param rSeq Out-parameter that takes the sorted row index list. */
+ void implGetSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& rSeq );
+ /** Fills a sequence with sorted indexes of completely selected columns.
+ @attention This method requires locked mutex's and a living object.
+ @param rSeq Out-parameter that takes the sorted column index list. */
+ //void implGetSelectedColumns( ::com::sun::star::uno::Sequence< sal_Int32 >& rSeq );
+
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified row index is invalid. */
+ void ensureIsValidRow( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified column index is invalid. */
+ void ensureIsValidColumn( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified cell address is invalid. */
+ void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified child index is invalid. */
+ void ensureIsValidIndex( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLEBASE_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx
new file mode 100755
index 000000000000..537cbc138b1c
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlTableCell.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLECELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLECELL_HXX
+
+#include <comphelper/accessibletexthelper.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include "accessibility/extended/AccessibleGridControlBase.hxx"
+#include <svtools/accessibletable.hxx>
+
+namespace accessibility
+{
+ class AccessibleGridControlCell : public AccessibleGridControlBase
+ {
+ private:
+ sal_Int32 m_nRowPos; // the row number of the table cell
+ sal_Int32 m_nColPos; // the column id of the table cell
+
+ protected:
+ // attribute access
+ inline sal_Int32 getRowPos( ) const { return m_nRowPos; }
+ inline sal_Int32 getColumnPos( ) const { return m_nColPos; }
+
+ // XAccessibleComponent
+ virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
+
+ protected:
+ AccessibleGridControlCell(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::table::IAccessibleTable& _rTable,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos,
+ ::svt::table::AccessibleTableControlObjType _eType
+ );
+
+ virtual ~AccessibleGridControlCell();
+
+ private:
+ AccessibleGridControlCell(); // never implemented
+ AccessibleGridControlCell( const AccessibleGridControlCell& ); // never implemented
+ AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ); // never implemented
+ };
+
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText
+ , ::com::sun::star::accessibility::XAccessible
+ > AccessibleTextHelper_BASE;
+ // implementation of a table cell of GridControl
+ class AccessibleGridControlTableCell :public AccessibleGridControlCell
+ ,public AccessibleTextHelper_BASE
+ ,public ::comphelper::OCommonAccessibleText
+ {
+ private:
+ sal_Int32 m_nOffset;
+
+ protected:
+ // OCommonAccessibleText
+ virtual ::rtl::OUString implGetText();
+ virtual ::com::sun::star::lang::Locale implGetLocale();
+ virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
+ virtual Rectangle implGetBoundingBox();
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ public:
+ AccessibleGridControlTableCell( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::table::IAccessibleTable& _rTable,
+ sal_Int32 _nRowId,
+ sal_uInt16 _nColId,
+ svt::table::AccessibleTableControlObjType eObjType);
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The count of visible children.
+ */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The XAccessible interface of the specified child.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleText
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ };
+}
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLECELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
index 847c8ad2f0af..5f264b388fda 100644
--- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -32,7 +32,7 @@
#define INCLUDED_ACCESSIBILITY_TEXTWINDOWACCESSIBILITY_HXX
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <svtools/textdata.hxx>
#include <svtools/texteng.hxx>
#include <svtools/textview.hxx>
diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst
index cd30f3452a30..f410ece56d9b 100755
--- a/accessibility/prj/build.lst
+++ b/accessibility/prj/build.lst
@@ -14,4 +14,5 @@ ac accessibility\workben\org\openoffice\accessibility\misc nmake -
ac accessibility\workben\org\openoffice\accessibility\awb\canvas nmake - all ac_awb_canvas ac_awb_tree NULL
ac accessibility\workben\org\openoffice\accessibility\awb\tree nmake - all ac_awb_tree ac_awb_misc NULL
ac accessibility\workben\org\openoffice\accessibility\awb\view nmake - all ac_awb_view ac_awb_view_text NULL
-ac accessibility\workben\org\openoffice\accessibility\awb\view\text nmake - all ac_awb_view_text NULL
+# dependency on ac_awb_misc to avoid concurrent creation of java_ver.mk
+ac accessibility\workben\org\openoffice\accessibility\awb\view\text nmake - all ac_awb_view_text ac_awb_misc NULL
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
new file mode 100755
index 000000000000..4671f3284110
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -0,0 +1,382 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControl.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+#include "accessibility/extended/AccessibleGridControl.hxx"
+#include "accessibility/extended/AccessibleGridControlTable.hxx"
+#include "accessibility/extended/AccessibleGridControlHeader.hxx"
+#include <svtools/accessibletable.hxx>
+#include <comphelper/types.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+//#include "svtools/table/tablecontrol.hxx"
+
+// ============================================================================
+
+namespace accessibility
+{
+
+// ============================================================================
+
+using ::rtl::OUString;
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+using namespace ::svt;
+using namespace ::svt::table;
+
+// ============================================================================
+class AccessibleGridControl_Impl
+{
+public:
+ /// the XAccessible which created the AccessibleGridControl
+ WeakReference< XAccessible > m_aCreator;
+
+ /** The data table child. */
+ Reference<
+ ::com::sun::star::accessibility::XAccessible > m_xTable;
+ AccessibleGridControlTable* m_pTable;
+
+ /** The header bar for rows. */
+ Reference<
+ ::com::sun::star::accessibility::XAccessible > m_xRowHeaderBar;
+ AccessibleGridControlHeader* m_pRowHeaderBar;
+
+ /** The header bar for columns (first row of the table). */
+ Reference<
+ ::com::sun::star::accessibility::XAccessible > m_xColumnHeaderBar;
+ AccessibleGridControlHeader* m_pColumnHeaderBar;
+};
+
+// Ctor/Dtor/disposing --------------------------------------------------------
+
+DBG_NAME( AccessibleGridControl )
+
+AccessibleGridControl::AccessibleGridControl(
+ const Reference< XAccessible >& _rxParent, const Reference< XAccessible >& _rxCreator,
+ IAccessibleTable& _rTable )
+ : AccessibleGridControlBase( _rxParent, _rTable, TCTYPE_GRIDCONTROL )
+{
+// DBG_CTOR( AccessibleTableControl, NULL );
+ m_pImpl.reset( new AccessibleGridControl_Impl() );
+ m_pImpl->m_aCreator = _rxCreator;
+}
+
+// -----------------------------------------------------------------------------
+AccessibleGridControl::~AccessibleGridControl()
+{
+ DBG_DTOR( AccessibleGridControl, NULL );
+}
+// -----------------------------------------------------------------------------
+
+void SAL_CALL AccessibleGridControl::disposing()
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ m_pImpl->m_pTable = NULL;
+ m_pImpl->m_pColumnHeaderBar = NULL;
+ m_pImpl->m_pRowHeaderBar = NULL;
+ m_pImpl->m_aCreator = Reference< XAccessible >();
+
+ Reference< XAccessible > xTable = m_pImpl->m_xTable;
+
+ Reference< XComponent > xComp( m_pImpl->m_xTable, UNO_QUERY );
+ if ( xComp.is() )
+ {
+ xComp->dispose();
+ }
+
+ AccessibleGridControlBase::disposing();
+}
+// -----------------------------------------------------------------------------
+
+// XAccessibleContext ---------------------------------------------------------
+
+sal_Int32 SAL_CALL AccessibleGridControl::getAccessibleChildCount()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return m_aTable.GetAccessibleControlCount();
+}
+// -----------------------------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL
+AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ if (nChildIndex<0 || nChildIndex>=getAccessibleChildCount())
+ throw IndexOutOfBoundsException();
+
+ Reference< XAccessible > xChild;
+ if (isAlive())
+ {
+ if(nChildIndex == 0 && m_aTable.HasColHeader())
+ {
+ if(!m_pImpl->m_xColumnHeaderBar.is()){
+ AccessibleGridControlHeader* pColHeaderBar = new AccessibleGridControlHeader(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_COLUMNHEADERBAR);
+ m_pImpl->m_xColumnHeaderBar = pColHeaderBar;
+ }
+ xChild = m_pImpl->m_xColumnHeaderBar;
+ }
+ else if(m_aTable.HasRowHeader() && (nChildIndex == 1 || nChildIndex == 0))
+ {
+ if(!m_pImpl->m_xRowHeaderBar.is()){
+ AccessibleGridControlHeader* pRowHeaderBar = new AccessibleGridControlHeader(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_ROWHEADERBAR);
+ m_pImpl->m_xRowHeaderBar = pRowHeaderBar;
+ }
+ xChild = m_pImpl->m_xRowHeaderBar;
+ }
+ else
+ {
+ AccessibleGridControlTable* pTable = new AccessibleGridControlTable(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_TABLE);
+ m_pImpl->m_xTable = pTable;
+ xChild = m_pImpl->m_xTable;
+ }
+ }
+
+ return xChild;
+}
+// -----------------------------------------------------------------------------
+
+sal_Int16 SAL_CALL AccessibleGridControl::getAccessibleRole()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return AccessibleRole::PANEL;
+}
+// -----------------------------------------------------------------------------
+
+// XAccessibleComponent -------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL
+AccessibleGridControl::getAccessibleAtPoint( const awt::Point& rPoint )
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ Reference< XAccessible > xChild;
+ sal_Int32 nIndex = 0;
+ if( m_aTable.ConvertPointToControlIndex( nIndex, VCLPoint( rPoint ) ) )
+ xChild = m_aTable.CreateAccessibleControl( nIndex );
+ else
+ {
+ // try whether point is in one of the fixed children
+ // (table, header bars, corner control)
+ Point aPoint( VCLPoint( rPoint ) );
+ for( nIndex = 0; (nIndex < 3) && !xChild.is(); ++nIndex )
+ {
+ Reference< XAccessible > xCurrChild( implGetFixedChild( nIndex ) );
+ Reference< XAccessibleComponent >
+ xCurrChildComp( xCurrChild, uno::UNO_QUERY );
+
+ if( xCurrChildComp.is() &&
+ VCLRectangle( xCurrChildComp->getBounds() ).IsInside( aPoint ) )
+ xChild = xCurrChild;
+ }
+ }
+ return xChild;
+}
+// -----------------------------------------------------------------------------
+
+void SAL_CALL AccessibleGridControl::grabFocus()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ m_aTable.GrabFocus();
+}
+// -----------------------------------------------------------------------------
+
+Any SAL_CALL AccessibleGridControl::getAccessibleKeyBinding()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return Any();
+}
+// -----------------------------------------------------------------------------
+
+// XServiceInfo ---------------------------------------------------------------
+
+OUString SAL_CALL AccessibleGridControl::getImplementationName()
+ throw ( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleGridControl" ) );
+}
+// -----------------------------------------------------------------------------
+
+// internal virtual methods ---------------------------------------------------
+
+Rectangle AccessibleGridControl::implGetBoundingBox()
+{
+ Window* pParent = m_aTable.GetAccessibleParentWindow();
+ DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" );
+ return m_aTable.GetWindowExtentsRelative( pParent );
+}
+// -----------------------------------------------------------------------------
+
+Rectangle AccessibleGridControl::implGetBoundingBoxOnScreen()
+{
+ return m_aTable.GetWindowExtentsRelative( NULL );
+}
+// internal helper methods ----------------------------------------------------
+
+Reference< XAccessible > AccessibleGridControl::implGetTable()
+{
+ if( !m_pImpl->m_xTable.is() )
+ {
+ m_pImpl->m_pTable = createAccessibleTable();
+ m_pImpl->m_xTable = m_pImpl->m_pTable;
+
+ }
+ return m_pImpl->m_xTable;
+}
+// -----------------------------------------------------------------------------
+
+Reference< XAccessible >
+AccessibleGridControl::implGetHeaderBar( AccessibleTableControlObjType eObjType )
+{
+ Reference< XAccessible > xRet;
+ Reference< XAccessible >* pxMember = NULL;
+
+ if( eObjType == TCTYPE_ROWHEADERBAR )
+ pxMember = &m_pImpl->m_xRowHeaderBar;
+ else if( eObjType == TCTYPE_COLUMNHEADERBAR )
+ pxMember = &m_pImpl->m_xColumnHeaderBar;
+
+ if( pxMember )
+ {
+ if( !pxMember->is() )
+ {
+ AccessibleGridControlHeader* pHeaderBar = new AccessibleGridControlHeader(
+ (Reference< XAccessible >)m_pImpl->m_aCreator, m_aTable, eObjType );
+
+ if ( TCTYPE_COLUMNHEADERBAR == eObjType)
+ m_pImpl->m_pColumnHeaderBar = pHeaderBar;
+ else
+ m_pImpl->m_pRowHeaderBar = pHeaderBar;
+
+ *pxMember = pHeaderBar;
+ }
+ xRet = *pxMember;
+ }
+ return xRet;
+}
+// -----------------------------------------------------------------------------
+Reference< XAccessible >
+AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex )
+{
+ Reference< XAccessible > xRet;
+ switch( nChildIndex )
+ {
+ case TCINDEX_COLUMNHEADERBAR:
+ xRet = implGetHeaderBar( TCTYPE_COLUMNHEADERBAR );
+ break;
+ case TCINDEX_ROWHEADERBAR:
+ xRet = implGetHeaderBar( TCTYPE_ROWHEADERBAR );
+ break;
+ case TCINDEX_TABLE:
+ xRet = implGetTable();
+ break;
+ }
+ return xRet;
+}
+// -----------------------------------------------------------------------------
+AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable()
+{
+ Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator;
+ DBG_ASSERT( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" );
+ return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE );
+}
+// ============================================================================
+// = AccessibleGridControlAccess
+// ============================================================================
+DBG_NAME( AccessibleGridControlAccess )
+// -----------------------------------------------------------------------------
+AccessibleGridControlAccess::AccessibleGridControlAccess( const Reference< XAccessible >& _rxParent, IAccessibleTable& _rTable )
+ :m_xParent( _rxParent )
+ ,m_rTable( _rTable )
+ ,m_pContext( NULL )
+{
+ DBG_CTOR( AccessibleGridControlAccess, NULL );
+}
+
+// -----------------------------------------------------------------------------
+AccessibleGridControlAccess::~AccessibleGridControlAccess()
+{
+ DBG_DTOR( AccessibleGridControlAccess, NULL );
+}
+
+// -----------------------------------------------------------------------------
+void AccessibleGridControlAccess::dispose()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ m_pContext = NULL;
+ ::comphelper::disposeComponent( m_xContext );
+}
+
+// -----------------------------------------------------------------------------
+Reference< XAccessibleContext > SAL_CALL AccessibleGridControlAccess::getAccessibleContext() throw ( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ DBG_ASSERT( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
+ "accessibility/extended/AccessibleGridControlAccess::getAccessibleContext: inconsistency!" );
+
+ // if the context died meanwhile (we're no listener, so it won't tell us explicitily when this happens),
+ // then reset an re-create.
+ if ( m_pContext && !m_pContext->isAlive() )
+ m_xContext = m_pContext = NULL;
+
+ if ( !m_xContext.is() )
+ m_xContext = m_pContext = new AccessibleGridControl( m_xParent, this, m_rTable );
+
+ return m_xContext;
+}
+
+// -----------------------------------------------------------------------------
+bool AccessibleGridControlAccess::isContextAlive() const
+{
+ return ( NULL != m_pContext ) && m_pContext->isAlive();
+}
+
+// ============================================================================
+
+} // namespace accessibility
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
new file mode 100755
index 000000000000..91dd9bd3bdc5
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -0,0 +1,551 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlBase.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+#include "accessibility/extended/AccessibleGridControlBase.hxx"
+#include <svtools/accessibletable.hxx>
+#include <rtl/uuid.h>
+//
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <unotools/accessiblerelationsethelper.hxx>
+
+// ============================================================================
+
+using ::rtl::OUString;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Any;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using namespace ::comphelper;
+using namespace ::svt;
+using namespace ::svt::table;
+
+
+// ============================================================================
+
+namespace accessibility {
+
+using namespace com::sun::star::accessibility::AccessibleStateType;
+// ============================================================================
+
+// Ctor/Dtor/disposing --------------------------------------------------------
+
+DBG_NAME( AccessibleGridControlBase )
+
+AccessibleGridControlBase::AccessibleGridControlBase(
+ const Reference< XAccessible >& rxParent,
+ svt::table::IAccessibleTable& rTable,
+ AccessibleTableControlObjType eObjType ) :
+ AccessibleGridControlImplHelper( m_aMutex ),
+ m_xParent( rxParent ),
+ m_aTable( rTable),
+ m_eObjType( eObjType ),
+ m_aName( rTable.GetAccessibleObjectName( eObjType, 0, 0 ) ),
+ m_aDescription( rTable.GetAccessibleObjectDescription( eObjType ) ),
+ m_aClientId(0)
+{
+ DBG_CTOR( AccessibleGridControlBase, NULL );
+}
+
+AccessibleGridControlBase::~AccessibleGridControlBase()
+{
+// DBG_DTOR( AccessibleGridControlBase, NULL );
+
+ if( isAlive() )
+ {
+ // increment ref count to prevent double call of Dtor
+ osl_incrementInterlockedCount( &m_refCount );
+ dispose();
+ }
+}
+
+void SAL_CALL AccessibleGridControlBase::disposing()
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ m_xParent = NULL;
+}
+
+// XAccessibleContext ---------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL AccessibleGridControlBase::getAccessibleParent()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return m_xParent;
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlBase::getAccessibleIndexInParent()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ // -1 for child not found/no parent (according to specification)
+ sal_Int32 nRet = -1;
+
+ Reference< uno::XInterface > xMeMyselfAndI( static_cast< XAccessibleContext* >( this ), uno::UNO_QUERY );
+
+ // iterate over parent's children and search for this object
+ if( m_xParent.is() )
+ {
+ Reference< XAccessibleContext >
+ xParentContext( m_xParent->getAccessibleContext() );
+ if( xParentContext.is() )
+ {
+ Reference< uno::XInterface > xChild;
+
+ sal_Int32 nChildCount = xParentContext->getAccessibleChildCount();
+ for( sal_Int32 nChild = 0; nChild < nChildCount; ++nChild )
+ {
+ xChild = xChild.query( xParentContext->getAccessibleChild( nChild ) );
+
+ if ( xMeMyselfAndI.get() == xChild.get() )
+ {
+ nRet = nChild;
+ break;
+ }
+ }
+ }
+ }
+ return nRet;
+}
+
+OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return m_aDescription;
+}
+
+OUString SAL_CALL AccessibleGridControlBase::getAccessibleName()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return m_aName;
+}
+
+Reference< XAccessibleRelationSet > SAL_CALL
+AccessibleGridControlBase::getAccessibleRelationSet()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ // GridControl does not have relations.
+ return new utl::AccessibleRelationSetHelper;
+}
+
+Reference< XAccessibleStateSet > SAL_CALL
+AccessibleGridControlBase::getAccessibleStateSet()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ // don't check whether alive -> StateSet may contain DEFUNC
+ return implCreateStateSetHelper();
+}
+
+lang::Locale SAL_CALL AccessibleGridControlBase::getLocale()
+ throw ( IllegalAccessibleComponentStateException, uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ if( m_xParent.is() )
+ {
+ Reference< XAccessibleContext >
+ xParentContext( m_xParent->getAccessibleContext() );
+ if( xParentContext.is() )
+ return xParentContext->getLocale();
+ }
+ throw IllegalAccessibleComponentStateException();
+}
+
+// XAccessibleComponent -------------------------------------------------------
+
+sal_Bool SAL_CALL AccessibleGridControlBase::containsPoint( const awt::Point& rPoint )
+ throw ( uno::RuntimeException )
+{
+ return Rectangle( Point(), getBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) );
+}
+
+awt::Rectangle SAL_CALL AccessibleGridControlBase::getBounds()
+ throw ( uno::RuntimeException )
+{
+ return AWTRectangle( getBoundingBox() );
+}
+
+awt::Point SAL_CALL AccessibleGridControlBase::getLocation()
+ throw ( uno::RuntimeException )
+{
+ return AWTPoint( getBoundingBox().TopLeft() );
+}
+
+awt::Point SAL_CALL AccessibleGridControlBase::getLocationOnScreen()
+ throw ( uno::RuntimeException )
+{
+ return AWTPoint( getBoundingBoxOnScreen().TopLeft() );
+}
+
+awt::Size SAL_CALL AccessibleGridControlBase::getSize()
+ throw ( uno::RuntimeException )
+{
+ return AWTSize( getBoundingBox().GetSize() );
+}
+
+sal_Bool SAL_CALL AccessibleGridControlBase::isShowing()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return implIsShowing();
+}
+
+sal_Bool SAL_CALL AccessibleGridControlBase::isVisible()
+ throw ( uno::RuntimeException )
+{
+ Reference< XAccessibleStateSet > xStateSet = getAccessibleStateSet();
+ return xStateSet.is() ?
+ xStateSet->contains( AccessibleStateType::VISIBLE ) : sal_False;
+}
+
+sal_Bool SAL_CALL AccessibleGridControlBase::isFocusTraversable()
+ throw ( uno::RuntimeException )
+{
+ Reference< XAccessibleStateSet > xStateSet = getAccessibleStateSet();
+ return xStateSet.is() ?
+ xStateSet->contains( AccessibleStateType::FOCUSABLE ) : sal_False;
+}
+// XAccessibleEventBroadcaster ------------------------------------------------
+
+void SAL_CALL AccessibleGridControlBase::addEventListener(
+ const Reference< XAccessibleEventListener>& _rxListener )
+ throw ( uno::RuntimeException )
+{
+ if ( _rxListener.is() )
+ {
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ if ( !getClientId( ) )
+ setClientId( AccessibleEventNotifier::registerClient( ) );
+
+ AccessibleEventNotifier::addEventListener( getClientId( ), _rxListener );
+ }
+}
+
+void SAL_CALL AccessibleGridControlBase::removeEventListener(
+ const Reference< XAccessibleEventListener>& _rxListener )
+ throw ( uno::RuntimeException )
+{
+ if( _rxListener.is() && getClientId( ) )
+ {
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+
+ AccessibleEventNotifier::TClientId nId( getClientId( ) );
+ setClientId( 0 );
+ AccessibleEventNotifier::revokeClient( nId );
+ }
+ }
+}
+
+// XTypeProvider --------------------------------------------------------------
+
+Sequence< sal_Int8 > SAL_CALL AccessibleGridControlBase::getImplementationId()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslGlobalMutex() );
+ static Sequence< sal_Int8 > aId;
+ implCreateUuid( aId );
+ return aId;
+}
+
+// XServiceInfo ---------------------------------------------------------------
+
+sal_Bool SAL_CALL AccessibleGridControlBase::supportsService(
+ const OUString& rServiceName )
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ Sequence< OUString > aSupportedServices( getSupportedServiceNames() );
+ const OUString* pArrBegin = aSupportedServices.getConstArray();
+ const OUString* pArrEnd = pArrBegin + aSupportedServices.getLength();
+ const OUString* pString = pArrBegin;
+
+ for( ; ( pString != pArrEnd ) && ( rServiceName != *pString ); ++pString )
+ ;
+
+ return pString != pArrEnd;
+}
+
+Sequence< OUString > SAL_CALL AccessibleGridControlBase::getSupportedServiceNames()
+ throw ( uno::RuntimeException )
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleContext" ) );
+ return Sequence< OUString >( &aServiceName, 1 );
+}
+// internal virtual methods ---------------------------------------------------
+
+sal_Bool AccessibleGridControlBase::implIsShowing()
+{
+ sal_Bool bShowing = sal_False;
+ if( m_xParent.is() )
+ {
+ Reference< XAccessibleComponent >
+ xParentComp( m_xParent->getAccessibleContext(), uno::UNO_QUERY );
+ if( xParentComp.is() )
+ bShowing = implGetBoundingBox().IsOver(
+ VCLRectangle( xParentComp->getBounds() ) );
+ }
+ return bShowing;
+}
+
+::utl::AccessibleStateSetHelper* AccessibleGridControlBase::implCreateStateSetHelper()
+{
+ ::utl::AccessibleStateSetHelper*
+ pStateSetHelper = new ::utl::AccessibleStateSetHelper;
+
+ if( isAlive() )
+ {
+ // SHOWING done with m_xParent
+ if( implIsShowing() )
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+ // GridControl fills StateSet with states depending on object type
+ m_aTable.FillAccessibleStateSet( *pStateSetHelper, getType() );
+ }
+ else
+ pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
+
+ return pStateSetHelper;
+}
+
+// internal helper methods ----------------------------------------------------
+
+sal_Bool AccessibleGridControlBase::isAlive() const
+{
+ return !rBHelper.bDisposed && !rBHelper.bInDispose && &m_aTable;
+}
+
+void AccessibleGridControlBase::ensureIsAlive() const
+ throw ( lang::DisposedException )
+{
+ if( !isAlive() )
+ throw lang::DisposedException();
+}
+
+Rectangle AccessibleGridControlBase::getBoundingBox()
+ throw ( lang::DisposedException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ Rectangle aRect = implGetBoundingBox();
+ if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
+ {
+ DBG_ERRORFILE( "rectangle doesn't exist" );
+ }
+ return aRect;
+}
+//
+Rectangle AccessibleGridControlBase::getBoundingBoxOnScreen()
+ throw ( lang::DisposedException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ Rectangle aRect = implGetBoundingBoxOnScreen();
+ if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
+ {
+ DBG_ERRORFILE( "rectangle doesn't exist" );
+ }
+ return aRect;
+}
+
+void AccessibleGridControlBase::commitEvent(
+ sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
+{
+ ::osl::ClearableMutexGuard aGuard( getOslMutex() );
+ if ( !getClientId( ) )
+ // if we don't have a client id for the notifier, then we don't have listeners, then
+ // we don't need to notify anything
+ return;
+
+ // build an event object
+ AccessibleEventObject aEvent;
+ aEvent.Source = *this;
+ aEvent.EventId = _nEventId;
+ aEvent.OldValue = _rOldValue;
+ aEvent.NewValue = _rNewValue;
+
+ // let the notifier handle this event
+
+ AccessibleEventNotifier::addEvent( getClientId( ), aEvent );
+}
+// -----------------------------------------------------------------------------
+
+void AccessibleGridControlBase::implCreateUuid( Sequence< sal_Int8 >& rId )
+{
+ if( !rId.hasElements() )
+ {
+ rId.realloc( 16 );
+ rtl_createUuid( reinterpret_cast< sal_uInt8* >( rId.getArray() ), 0, sal_True );
+ }
+}
+// -----------------------------------------------------------------------------
+sal_Int16 SAL_CALL AccessibleGridControlBase::getAccessibleRole()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ sal_Int16 nRole = AccessibleRole::UNKNOWN;
+ switch ( m_eObjType )
+ {
+ case TCTYPE_ROWHEADERCELL:
+ nRole = AccessibleRole::ROW_HEADER;
+ break;
+ case TCTYPE_COLUMNHEADERCELL:
+ nRole = AccessibleRole::COLUMN_HEADER;
+ break;
+ case TCTYPE_COLUMNHEADERBAR:
+ case TCTYPE_ROWHEADERBAR:
+ case TCTYPE_TABLE:
+ nRole = AccessibleRole::TABLE;
+ break;
+ case TCTYPE_TABLECELL:
+ nRole = AccessibleRole::TABLE_CELL;
+ break;
+ case TCTYPE_GRIDCONTROL:
+ nRole = AccessibleRole::PANEL;
+ break;
+ }
+ return nRole;
+}
+// -----------------------------------------------------------------------------
+Any SAL_CALL AccessibleGridControlBase::getAccessibleKeyBinding()
+ throw ( uno::RuntimeException )
+{
+ return Any();
+}
+// -----------------------------------------------------------------------------
+Reference<XAccessible > SAL_CALL AccessibleGridControlBase::getAccessibleAtPoint( const ::com::sun::star::awt::Point& )
+ throw ( uno::RuntimeException )
+{
+ return NULL;
+}
+//// -----------------------------------------------------------------------------
+sal_Int32 SAL_CALL AccessibleGridControlBase::getForeground( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ sal_Int32 nColor = 0;
+ Window* pInst = m_aTable.GetWindowInstance();
+ if ( pInst )
+ {
+ if ( pInst->IsControlForeground() )
+ nColor = pInst->GetControlForeground().GetColor();
+ else
+ {
+ Font aFont;
+ if ( pInst->IsControlFont() )
+ aFont = pInst->GetControlFont();
+ else
+ aFont = pInst->GetFont();
+ nColor = aFont.GetColor().GetColor();
+ }
+ }
+
+ return nColor;
+}
+// -----------------------------------------------------------------------------
+sal_Int32 SAL_CALL AccessibleGridControlBase::getBackground( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ sal_Int32 nColor = 0;
+ Window* pInst = m_aTable.GetWindowInstance();
+ if ( pInst )
+ {
+ if ( pInst->IsControlBackground() )
+ nColor = pInst->GetControlBackground().GetColor();
+ else
+ nColor = pInst->GetBackground().GetColor().GetColor();
+ }
+
+ return nColor;
+}
+
+//// ============================================================================
+GridControlAccessibleElement::GridControlAccessibleElement( const Reference< XAccessible >& rxParent,
+ IAccessibleTable& rTable,
+ AccessibleTableControlObjType eObjType )
+ :AccessibleGridControlBase( rxParent, rTable, eObjType )
+{
+// DBG_CTOR( GridControlAccessibleElement, NULL );
+}
+
+// XInterface -----------------------------------------------------------------
+IMPLEMENT_FORWARD_XINTERFACE2( GridControlAccessibleElement, AccessibleGridControlBase, GridControlAccessibleElement_Base)
+
+// XTypeProvider --------------------------------------------------------------
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( GridControlAccessibleElement, AccessibleGridControlBase, GridControlAccessibleElement_Base )
+
+// XAccessible ----------------------------------------------------------------
+
+Reference< XAccessibleContext > SAL_CALL GridControlAccessibleElement::getAccessibleContext() throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return this;
+}
+// ----------------------------------------------------------------------------
+GridControlAccessibleElement::~GridControlAccessibleElement( )
+{
+// DBG_DTOR( GridControlAccessibleElement, NULL );
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx
new file mode 100755
index 000000000000..a5a2be4049dc
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx
@@ -0,0 +1,312 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlHeader.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+
+
+#include "accessibility/extended/AccessibleGridControlHeader.hxx"
+#include "accessibility/extended/AccessibleGridControlHeaderCell.hxx"
+#include "accessibility/extended/AccessibleGridControlTableCell.hxx"
+#include <svtools/accessibletable.hxx>
+
+
+// ============================================================================
+
+using ::rtl::OUString;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Any;
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+using namespace ::svt;
+using namespace ::svt::table;
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+// Ctor/Dtor/disposing --------------------------------------------------------
+
+DBG_NAME( AccessibleGridControlHeader )
+
+AccessibleGridControlHeader::AccessibleGridControlHeader(
+ const Reference< XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType):
+ AccessibleGridControlTableBase( rxParent, rTable, eObjType )
+{
+// DBG_CTOR( AccessibleGridControlHeaderBar, NULL );
+
+ DBG_ASSERT( isRowBar() || isColumnBar(),
+ "accessibility/extended/AccessibleGridControlHeaderBar - invalid object type" );
+}
+
+AccessibleGridControlHeader::~AccessibleGridControlHeader()
+{
+// DBG_DTOR( AccessibleGridControlHeader, NULL );
+}
+
+// XAccessibleContext ---------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL
+AccessibleGridControlHeader::getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ if (nChildIndex<0 || nChildIndex>=getAccessibleChildCount())
+ throw IndexOutOfBoundsException();
+ ensureIsAlive();
+ Reference< XAccessible > xChild;
+ if(m_eObjType == svt::table::TCTYPE_COLUMNHEADERBAR)
+ {
+ AccessibleGridControlHeaderCell* pColHeaderCell = new AccessibleGridControlHeaderCell(nChildIndex, this, m_aTable, svt::table::TCTYPE_COLUMNHEADERCELL);
+ xChild = pColHeaderCell;
+ }
+ else if(m_eObjType == svt::table::TCTYPE_ROWHEADERBAR)
+ {
+ AccessibleGridControlHeaderCell* pRowHeaderCell = new AccessibleGridControlHeaderCell(nChildIndex, this, m_aTable, svt::table::TCTYPE_ROWHEADERCELL);
+ xChild = pRowHeaderCell;
+ }
+ return xChild;
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlHeader::getAccessibleIndexInParent()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ if(m_eObjType == svt::table::TCTYPE_ROWHEADERBAR && m_aTable.HasColHeader())
+ return 1;
+ else
+ return 0;
+}
+
+// XAccessibleComponent -------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL
+AccessibleGridControlHeader::getAccessibleAtPoint( const awt::Point& rPoint )
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ sal_Int32 nRow = 0;
+ sal_Int32 nColumnPos = 0;
+ sal_Bool bConverted = isRowBar() ?
+ m_aTable.ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) :
+ m_aTable.ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) );
+
+ return bConverted ? implGetChild( nRow, nColumnPos ) : Reference< XAccessible >();
+}
+
+void SAL_CALL AccessibleGridControlHeader::grabFocus()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ // focus on header not supported
+}
+
+Any SAL_CALL AccessibleGridControlHeader::getAccessibleKeyBinding()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return Any(); // no special key bindings for header
+}
+
+// XAccessibleTable -----------------------------------------------------------
+
+OUString SAL_CALL AccessibleGridControlHeader::getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidRow( nRow );
+ return OUString(); // no headers in headers
+}
+
+OUString SAL_CALL AccessibleGridControlHeader::getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidColumn( nColumn );
+ return OUString(); // no headers in headers
+}
+
+Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibleRowHeaders()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return NULL; // no headers in headers
+}
+
+Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibleColumnHeaders()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return NULL; // no headers in headers
+}
+
+Sequence< sal_Int32 > SAL_CALL AccessibleGridControlHeader::getSelectedAccessibleRows()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ Sequence< sal_Int32 > aSelSeq;
+ // row of column header bar not selectable
+ if( isRowBar() )
+ implGetSelectedRows( aSelSeq );
+ return aSelSeq;
+}
+//columns aren't selectable
+Sequence< sal_Int32 > SAL_CALL AccessibleGridControlHeader::getSelectedAccessibleColumns()
+ throw ( uno::RuntimeException )
+{
+ return NULL;
+}
+//To Do - not yet implemented
+sal_Bool SAL_CALL AccessibleGridControlHeader::isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidRow( nRow );
+ //return isRowBar() ? implIsRowSelected( nRow ) : sal_False;
+ return sal_False;
+}
+//columns aren't selectable
+sal_Bool SAL_CALL AccessibleGridControlHeader::isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ (void)nColumn;
+ return sal_False;
+}
+
+Reference< XAccessible > SAL_CALL AccessibleGridControlHeader::getAccessibleCellAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return implGetChild( nRow, implToVCLColumnPos( nColumn ) );
+}
+// TO DO - not implemented yet
+sal_Bool SAL_CALL AccessibleGridControlHeader::isAccessibleSelected(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return FALSE;
+ // return isRowBar() ? implIsRowSelected( nRow ) : implIsColumnSelected( nColumn );
+}
+
+// XServiceInfo ---------------------------------------------------------------
+
+OUString SAL_CALL AccessibleGridControlHeader::getImplementationName()
+ throw ( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleGridControlHeader" ) );
+}
+
+Sequence< sal_Int8 > SAL_CALL AccessibleGridControlHeader::getImplementationId()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslGlobalMutex() );
+ static Sequence< sal_Int8 > aId;
+ implCreateUuid( aId );
+ return aId;
+}
+
+// internal virtual methods ---------------------------------------------------
+
+Rectangle AccessibleGridControlHeader::implGetBoundingBox()
+{
+ return m_aTable.calcHeaderRect(isColumnBar());
+}
+
+Rectangle AccessibleGridControlHeader::implGetBoundingBoxOnScreen()
+{
+ return m_aTable.calcHeaderRect(isColumnBar());
+}
+
+sal_Int32 AccessibleGridControlHeader::implGetRowCount() const
+{
+ return 1;
+}
+
+sal_Int32 AccessibleGridControlHeader::implGetColumnCount() const
+{
+ return 1;
+}
+
+// internal helper methods ----------------------------------------------------
+
+Reference< XAccessible > AccessibleGridControlHeader::implGetChild(
+ sal_Int32 nRow, sal_uInt32 nColumnPos )
+{
+ Reference< XAccessible > xChild;
+ if(m_eObjType == svt::table::TCTYPE_COLUMNHEADERBAR)
+ {
+ AccessibleGridControlHeaderCell* pColHeaderCell = new AccessibleGridControlHeaderCell(nColumnPos, this, m_aTable, svt::table::TCTYPE_COLUMNHEADERCELL);
+ xChild = pColHeaderCell;
+ }
+ else if(m_eObjType == svt::table::TCTYPE_ROWHEADERBAR)
+ {
+ AccessibleGridControlHeaderCell* pRowHeaderCell = new AccessibleGridControlHeaderCell(nRow, this, m_aTable, svt::table::TCTYPE_ROWHEADERCELL);
+ xChild = pRowHeaderCell;
+ }
+ return xChild;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
diff --git a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx
new file mode 100755
index 000000000000..52139a694aef
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlHeaderCell.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+
+#include "accessibility/extended/AccessibleGridControlHeaderCell.hxx"
+#include <svtools/accessibletable.hxx>
+#include "accessibility/extended/AccessibleGridControl.hxx"
+
+namespace accessibility
+{
+ using namespace ::com::sun::star::accessibility;
+ using namespace ::com::sun::star::lang;
+ using namespace ::com::sun::star::uno;
+ using namespace ::svt;
+ using namespace ::svt::table;
+
+AccessibleGridControlHeaderCell::AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId,
+ const Reference< XAccessible >& rxParent,
+ IAccessibleTable& rTable,
+ AccessibleTableControlObjType eObjType)
+: AccessibleGridControlCell( rxParent, rTable, _nColumnRowId, 0, eObjType)
+, m_nColumnRowId(_nColumnRowId)
+{
+}
+/** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+*/
+::utl::AccessibleStateSetHelper* AccessibleGridControlHeaderCell::implCreateStateSetHelper()
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ::utl::AccessibleStateSetHelper*
+ pStateSetHelper = new ::utl::AccessibleStateSetHelper;
+
+ if( isAlive() )
+ {
+ // SHOWING done with mxParent
+ if( implIsShowing() )
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+
+ TCSolarGuard aSolarGuard;
+ pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
+ pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
+ pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
+ pStateSetHelper->AddState( AccessibleStateType::SELECTABLE );
+
+ if ( m_aTable.IsRowSelected(m_nColumnRowId) )
+ pStateSetHelper->AddState( AccessibleStateType::SELECTED );
+ }
+ else
+ pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
+
+ return pStateSetHelper;
+}
+// -----------------------------------------------------------------------------
+/** @return
+ The count of visible children.
+*/
+sal_Int32 SAL_CALL AccessibleGridControlHeaderCell::getAccessibleChildCount()
+ throw ( RuntimeException )
+{
+ return 0;
+}
+// -----------------------------------------------------------------------------
+
+/** @return
+ The XAccessible interface of the specified child.
+*/
+Reference<XAccessible > SAL_CALL AccessibleGridControlHeaderCell::getAccessibleChild( sal_Int32 )
+ throw ( IndexOutOfBoundsException,RuntimeException )
+{
+ throw IndexOutOfBoundsException();
+}
+// XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL AccessibleGridControlHeaderCell::queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException )
+ {
+ Any aRet = AccessibleGridControlCell::queryInterface(rType);
+ return aRet;
+ }
+
+ /** Aquires the object (calls acquire() on base class). */
+ void SAL_CALL AccessibleGridControlHeaderCell::acquire() throw ()
+ {
+ AccessibleGridControlCell::acquire();
+ }
+
+ /** Releases the object (calls release() on base class). */
+ void SAL_CALL AccessibleGridControlHeaderCell::release() throw ()
+ {
+ AccessibleGridControlCell::release();
+ }
+ /** @return The XAccessibleContext interface of this object. */
+ Reference< com::sun::star::accessibility::XAccessibleContext > SAL_CALL AccessibleGridControlHeaderCell::getAccessibleContext() throw ( RuntimeException )
+ {
+ ensureIsAlive();
+ return this;
+ }
+
+// -----------------------------------------------------------------------------
+
+/** Grabs the focus to the column header. */
+void SAL_CALL AccessibleGridControlHeaderCell::grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException )
+{
+}
+// -----------------------------------------------------------------------------
+/** @return
+ The name of this class.
+*/
+::rtl::OUString SAL_CALL AccessibleGridControlHeaderCell::getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException )
+{
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleGridControlHeaderCell" ) );
+}
+// -----------------------------------------------------------------------------
+Rectangle AccessibleGridControlHeaderCell::implGetBoundingBox()
+{
+ return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle
+}
+// -----------------------------------------------------------------------------
+
+Rectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen()
+{
+ return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle
+}
+// -----------------------------------------------------------------------------
+sal_Int32 SAL_CALL AccessibleGridControlHeaderCell::getAccessibleIndexInParent()
+ throw ( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ sal_Int32 nIndex = m_nColumnRowId;
+ return nIndex;
+}
+// -----------------------------------------------------------------------------
+} // namespace accessibility
+// -----------------------------------------------------------------------------
+
+
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
new file mode 100755
index 000000000000..3b51c986b8b1
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -0,0 +1,404 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlTable.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+
+
+#include "accessibility/extended/AccessibleGridControlTable.hxx"
+#include "accessibility/extended/AccessibleGridControlTableCell.hxx"
+#include <svtools/accessibletable.hxx>
+
+// ============================================================================
+
+using ::rtl::OUString;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Any;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using namespace ::svt;
+using namespace ::svt::table;
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+// Ctor/Dtor/disposing --------------------------------------------------------
+
+DBG_NAME( AccessibleGridControlTable )
+
+AccessibleGridControlTable::AccessibleGridControlTable(
+ const Reference< XAccessible >& rxParent,
+ IAccessibleTable& rTable,
+ AccessibleTableControlObjType _eType) :
+ AccessibleGridControlTableBase( rxParent, rTable, _eType )
+{
+ DBG_CTOR( AccessibleGridControlTable, NULL );
+}
+
+AccessibleGridControlTable::~AccessibleGridControlTable()
+{
+ DBG_DTOR( AccessibleGridControlTable, NULL );
+}
+
+// XAccessibleContext ---------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL
+AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidIndex( nChildIndex );
+ return new AccessibleGridControlTableCell(this, m_aTable, nChildIndex/m_aTable.GetColumnCount(), nChildIndex%m_aTable.GetColumnCount(), TCTYPE_TABLECELL);
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTable::getAccessibleIndexInParent()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ if(m_aTable.HasRowHeader() && m_aTable.HasColHeader())
+ return 0;
+ else if((!m_aTable.HasRowHeader() && m_aTable.HasColHeader()) || (m_aTable.HasRowHeader() && !m_aTable.HasColHeader()) )
+ return 1;
+ else
+ return 2;
+
+}
+
+// XAccessibleComponent -------------------------------------------------------
+
+Reference< XAccessible > SAL_CALL
+AccessibleGridControlTable::getAccessibleAtPoint( const awt::Point& rPoint )
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ Reference< XAccessible > xChild;
+ sal_Int32 nRow = 0;
+ sal_Int32 nColumnPos = 0;
+ if( m_aTable.ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) )
+ xChild = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumnPos, TCTYPE_TABLECELL);
+
+ return xChild;
+}
+
+void SAL_CALL AccessibleGridControlTable::grabFocus()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ m_aTable.GrabFocus();
+}
+
+Any SAL_CALL AccessibleGridControlTable::getAccessibleKeyBinding()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return Any(); // no special key bindings for data table
+}
+
+// XAccessibleTable -----------------------------------------------------------
+
+OUString SAL_CALL AccessibleGridControlTable::getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidRow( nRow );
+ return m_aTable.GetRowDescription( nRow );
+}
+
+OUString SAL_CALL AccessibleGridControlTable::getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidColumn( nColumn );
+ return m_aTable.GetColumnDescription( (sal_uInt16)nColumn );
+}
+
+Reference< XAccessibleTable > SAL_CALL AccessibleGridControlTable::getAccessibleRowHeaders()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ if(m_aTable.HasColHeader())
+ return implGetHeaderBar( 1 );
+ else
+ return implGetHeaderBar( 0 );
+}
+
+Reference< XAccessibleTable > SAL_CALL AccessibleGridControlTable::getAccessibleColumnHeaders()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return implGetHeaderBar( 0 );
+}
+
+Sequence< sal_Int32 > SAL_CALL AccessibleGridControlTable::getSelectedAccessibleRows()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ Sequence< sal_Int32 > aSelSeq;
+ implGetSelectedRows( aSelSeq );
+ return aSelSeq;
+}
+
+//columns aren't selectable
+Sequence< sal_Int32 > SAL_CALL AccessibleGridControlTable::getSelectedAccessibleColumns()
+ throw ( uno::RuntimeException )
+{
+// TCSolarGuard aSolarGuard;
+// ::osl::MutexGuard aGuard( getOslMutex() );
+// ensureIsAlive();
+//
+// Sequence< sal_Int32 > aSelSeq;
+// implGetSelectedColumns( aSelSeq );
+// return aSelSeq;
+ return NULL;
+}
+
+//To Do: not implemented yet
+sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ //TCSolarGuard aSolarGuard;
+ //::osl::MutexGuard aGuard( getOslMutex() );
+ //ensureIsAlive();
+ //ensureIsValidRow( nRow );
+ //return implIsRowSelected( nRow );
+ (void) nRow;
+ return sal_False;
+}
+
+//columns aren't selectable
+sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ /*TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidColumn( nColumn );
+ return implIsColumnSelected( nColumn );*/
+ (void) nColumn;
+ return sal_False;
+}
+
+Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn, TCTYPE_TABLECELL);
+}
+
+sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleSelected(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ /*TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return implIsRowSelected( nRow ) || implIsColumnSelected( nColumn );*/
+ (void) nRow;
+ (void) nColumn;
+ return sal_False;
+}
+//To Do: not implemented yet
+void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidIndex( nChildIndex );
+ //if( isRowBar() )
+ // implSelectRow( nChildIndex, sal_True );
+ //else
+ // implSelectColumn( implToVCLColumnPos( nChildIndex ), sal_True );
+}
+//To Do - not implemented yet
+sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ // using interface methods - no mutex
+ /*return isRowBar() ?
+ isAccessibleRowSelected( nChildIndex ) :
+ isAccessibleColumnSelected( nChildIndex );*/
+ (void)nChildIndex;
+ return FALSE;
+}
+//To Do - not implemented yet
+void SAL_CALL AccessibleGridControlTable::clearAccessibleSelection()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+}
+//To Do - not implemented yet
+void SAL_CALL AccessibleGridControlTable::selectAllAccessibleChildren()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+}
+//To Do - not implemented yet
+sal_Int32 SAL_CALL AccessibleGridControlTable::getSelectedAccessibleChildCount()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return 0;
+}
+//To Do - not implemented yet
+Reference< XAccessible > SAL_CALL
+AccessibleGridControlTable::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ (void)nSelectedChildIndex;
+ return NULL;
+}
+//To Do - not implemented yet
+void SAL_CALL AccessibleGridControlTable::deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ (void)nSelectedChildIndex;
+ // method may throw lang::IndexOutOfBoundsException
+ //if ( isAccessibleChildSelected(nSelectedChildIndex) )
+ //{
+ // if( isRowBar() )
+ // implSelectRow( nSelectedChildIndex, sal_False );
+ // else
+ // implSelectColumn( implToVCLColumnPos( nSelectedChildIndex ), sal_False );
+ //}
+}
+// XInterface -----------------------------------------------------------------
+
+Any SAL_CALL AccessibleGridControlTable::queryInterface( const uno::Type& rType )
+ throw ( uno::RuntimeException )
+{
+ Any aAny( AccessibleGridControlTableBase::queryInterface( rType ) );
+ return aAny.hasValue() ?
+ aAny : AccessibleGridControlTableImplHelper1::queryInterface( rType );
+}
+
+void SAL_CALL AccessibleGridControlTable::acquire() throw ()
+{
+ AccessibleGridControlTableBase::acquire();
+}
+
+void SAL_CALL AccessibleGridControlTable::release() throw ()
+{
+ AccessibleGridControlTableBase::release();
+}
+// XServiceInfo ---------------------------------------------------------------
+
+OUString SAL_CALL AccessibleGridControlTable::getImplementationName()
+ throw ( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleGridControlTable" ) );
+}
+
+// internal virtual methods ---------------------------------------------------
+
+Rectangle AccessibleGridControlTable::implGetBoundingBox()
+{
+ return m_aTable.calcTableRect();
+}
+
+Rectangle AccessibleGridControlTable::implGetBoundingBoxOnScreen()
+{
+ return m_aTable.calcTableRect();
+}
+// internal helper methods ----------------------------------------------------
+//To Do - not implemented yet
+//sal_Int32 AccessibleGridControlTable::implGetChildIndexFromSelectedIndex(
+// sal_Int32 nSelectedChildIndex )
+// throw ( lang::IndexOutOfBoundsException )
+//{
+// (void)nSelectedChildIndex;
+// return 0;
+//}
+Reference< XAccessibleTable > AccessibleGridControlTable::implGetHeaderBar(
+ sal_Int32 nChildIndex )
+ throw ( uno::RuntimeException )
+{
+ Reference< XAccessible > xRet;
+ Reference< XAccessibleContext > xContext( m_xParent, uno::UNO_QUERY );
+ if( xContext.is() )
+ {
+ try
+ {
+ xRet = xContext->getAccessibleChild( nChildIndex );
+ }
+ catch( lang::IndexOutOfBoundsException& )
+ {
+ DBG_ERROR( "implGetHeaderBar - wrong child index" );
+ }
+ // RuntimeException goes to caller
+ }
+ return Reference< XAccessibleTable >( xRet, uno::UNO_QUERY );
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
new file mode 100755
index 000000000000..76584bf4b965
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
@@ -0,0 +1,308 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2009 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleGridControlTableBase.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+
+
+#include "accessibility/extended/AccessibleGridControlTableBase.hxx"
+#include <svtools/accessibletable.hxx>
+#include <tools/multisel.hxx>
+#include <comphelper/sequence.hxx>
+
+// ============================================================================
+
+using ::rtl::OUString;
+
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Any;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using namespace ::svt;
+using namespace ::svt::table;
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+// Ctor/Dtor/disposing --------------------------------------------------------
+
+DBG_NAME( AccessibleGridControlTableBase )
+
+AccessibleGridControlTableBase::AccessibleGridControlTableBase(
+ const Reference< XAccessible >& rxParent,
+ IAccessibleTable& rTable,
+ AccessibleTableControlObjType eObjType ) :
+ GridControlAccessibleElement( rxParent, rTable, eObjType )
+{
+ DBG_CTOR( AccessibleGridControlTableBase, NULL );
+}
+
+AccessibleGridControlTableBase::~AccessibleGridControlTableBase()
+{
+ DBG_DTOR( AccessibleGridControlTableBase, NULL );
+}
+
+// XAccessibleContext ---------------------------------------------------------
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleChildCount()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ sal_Int32 nChildren = 0;
+ if(m_eObjType == TCTYPE_ROWHEADERBAR)
+ nChildren = m_aTable.GetRowCount();
+ else if(m_eObjType == TCTYPE_TABLE)
+ nChildren = m_aTable.GetRowCount()*m_aTable.GetColumnCount();
+ else if(m_eObjType == TCTYPE_COLUMNHEADERBAR)
+ nChildren = m_aTable.GetColumnCount();
+ return nChildren;
+}
+
+sal_Int16 SAL_CALL AccessibleGridControlTableBase::getAccessibleRole()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return AccessibleRole::TABLE;
+}
+
+// XAccessibleTable -----------------------------------------------------------
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRowCount()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return m_aTable.GetRowCount();
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnCount()
+ throw ( uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ return m_aTable.GetColumnCount();
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRowExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return 1; // merged cells not supported
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return 1; // merged cells not supported
+}
+
+Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleCaption()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return NULL; // not supported
+}
+
+Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleSummary()
+ throw ( uno::RuntimeException )
+{
+ ensureIsAlive();
+ return NULL; // not supported
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleIndex(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidAddress( nRow, nColumn );
+ return implGetChildIndex( nRow, nColumn );
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRow( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidIndex( nChildIndex );
+ return implGetRow( nChildIndex );
+}
+
+sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumn( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+ ensureIsValidIndex( nChildIndex );
+ return implGetColumn( nChildIndex );
+}
+
+// XInterface -----------------------------------------------------------------
+
+Any SAL_CALL AccessibleGridControlTableBase::queryInterface( const uno::Type& rType )
+ throw ( uno::RuntimeException )
+{
+ Any aAny( GridControlAccessibleElement::queryInterface( rType ) );
+ return aAny.hasValue() ?
+ aAny : AccessibleGridControlTableImplHelper::queryInterface( rType );
+}
+
+void SAL_CALL AccessibleGridControlTableBase::acquire() throw ()
+{
+ GridControlAccessibleElement::acquire();
+}
+
+void SAL_CALL AccessibleGridControlTableBase::release() throw ()
+{
+ GridControlAccessibleElement::release();
+}
+
+// XTypeProvider --------------------------------------------------------------
+
+Sequence< uno::Type > SAL_CALL AccessibleGridControlTableBase::getTypes()
+ throw ( uno::RuntimeException )
+{
+ return ::comphelper::concatSequences(
+ GridControlAccessibleElement::getTypes(),
+ AccessibleGridControlTableImplHelper::getTypes() );
+}
+
+Sequence< sal_Int8 > SAL_CALL AccessibleGridControlTableBase::getImplementationId()
+ throw ( uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( getOslGlobalMutex() );
+ static Sequence< sal_Int8 > aId;
+ implCreateUuid( aId );
+ return aId;
+}
+
+// internal helper methods ----------------------------------------------------
+
+sal_uInt16 AccessibleGridControlTableBase::implToVCLColumnPos( sal_Int32 nColumn ) const
+{
+ sal_uInt16 nVCLPos = 0;
+ if( (0 <= nColumn) && (nColumn < m_aTable.GetColumnCount()) )
+ {
+ // regard "handle column"
+ if( m_aTable.HasRowHeader() )
+ ++nColumn;
+ nVCLPos = static_cast< sal_uInt16 >( nColumn );
+ }
+ return nVCLPos;
+}
+
+sal_Int32 AccessibleGridControlTableBase::implGetChildCount() const
+{
+ return m_aTable.GetRowCount()*m_aTable.GetColumnCount();
+}
+
+sal_Int32 AccessibleGridControlTableBase::implGetRow( sal_Int32 nChildIndex ) const
+{
+ sal_Int32 nColumns = m_aTable.GetColumnCount();
+ return nColumns ? (nChildIndex / nColumns) : 0;
+}
+
+sal_Int32 AccessibleGridControlTableBase::implGetColumn( sal_Int32 nChildIndex ) const
+{
+ sal_Int32 nColumns = m_aTable.GetColumnCount();
+ return nColumns ? (nChildIndex % nColumns) : 0;
+}
+
+sal_Int32 AccessibleGridControlTableBase::implGetChildIndex(
+ sal_Int32 nRow, sal_Int32 nColumn ) const
+{
+ return nRow * m_aTable.GetColumnCount() + nColumn;
+}
+
+void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq )
+{
+ rSeq = comphelper::containerToSequence(m_aTable.GetSelectedRows());
+}
+
+void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ if( nRow >= m_aTable.GetRowCount() )
+ throw lang::IndexOutOfBoundsException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "row index is invalid" ) ), *this );
+}
+
+void AccessibleGridControlTableBase::ensureIsValidColumn( sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ if( nColumn >= m_aTable.GetColumnCount() )
+ throw lang::IndexOutOfBoundsException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("column index is invalid") ), *this );
+}
+
+void AccessibleGridControlTableBase::ensureIsValidAddress(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ ensureIsValidRow( nRow );
+ ensureIsValidColumn( nColumn );
+}
+
+void AccessibleGridControlTableBase::ensureIsValidIndex( sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException )
+{
+ if( nChildIndex >= implGetChildCount() )
+ throw lang::IndexOutOfBoundsException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("child index is invalid") ), *this );
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
new file mode 100755
index 000000000000..981a3e6086b0
--- /dev/null
+++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
@@ -0,0 +1,379 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AccessibleGridControlTableCell.cxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_accessibility.hxx"
+
+#include "accessibility/extended/AccessibleGridControlTableCell.hxx"
+#include <svtools/accessibletable.hxx>
+#include "accessibility/extended/AccessibleGridControl.hxx"
+#include <tools/gen.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+
+namespace accessibility
+{
+ namespace
+ {
+ void checkIndex_Impl( sal_Int32 _nIndex, const ::rtl::OUString& _sText ) throw (::com::sun::star::lang::IndexOutOfBoundsException)
+ {
+ if ( _nIndex >= _sText.getLength() )
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+ }
+
+ sal_Int32 getIndex_Impl( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_uInt16 _nColumnCount )
+ {
+ return _nRow * _nColumnCount + _nColumn;
+ }
+ }
+ using namespace ::com::sun::star::lang;
+ using namespace utl;
+ using namespace comphelper;
+ using ::rtl::OUString;
+ using ::accessibility::AccessibleGridControl;
+ using namespace ::com::sun::star::uno;
+ using ::com::sun::star::accessibility::XAccessible;
+ using namespace ::com::sun::star::accessibility;
+ using namespace ::svt;
+ using namespace ::svt::table;
+
+
+ // =============================================================================
+ // = AccessibleGridControlCell
+ // =============================================================================
+ //DBG_NAME( svt_AccessibleGridControlCell )
+ // -----------------------------------------------------------------------------
+ AccessibleGridControlCell::AccessibleGridControlCell(
+ const Reference< XAccessible >& _rxParent, IAccessibleTable& _rTable,
+ sal_Int32 _nRowPos, sal_uInt16 _nColPos, AccessibleTableControlObjType _eType )
+ :AccessibleGridControlBase( _rxParent, _rTable, _eType )
+ ,m_nRowPos( _nRowPos )
+ ,m_nColPos( _nColPos )
+ {
+// DBG_CTOR( svt_AccessibleGridControlCell, NULL );
+ // set accessible name here, because for that we need the position of the cell
+ // and so the base class isn't capable of doing this
+ ::rtl::OUString aAccName;
+ if(_eType == TCTYPE_TABLECELL)
+ aAccName = _rTable.GetAccessibleObjectName( TCTYPE_TABLECELL, _nRowPos, _nColPos );
+ else if(_eType == TCTYPE_ROWHEADERCELL)
+ aAccName = _rTable.GetAccessibleObjectName( TCTYPE_ROWHEADERCELL, _nRowPos, 0 );
+ else if(_eType == TCTYPE_COLUMNHEADERCELL)
+ aAccName = _rTable.GetAccessibleObjectName( TCTYPE_COLUMNHEADERCELL, 0, _nRowPos );
+ implSetName( aAccName );
+ }
+
+ // -----------------------------------------------------------------------------
+ AccessibleGridControlCell::~AccessibleGridControlCell()
+ {
+ }
+
+ // -----------------------------------------------------------------------------
+ void SAL_CALL AccessibleGridControlCell::grabFocus() throw ( RuntimeException )
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ m_aTable.GoToCell( m_nColPos, m_nRowPos );
+ }
+ //// -----------------------------------------------------------------------------
+ // implementation of a table cell
+ ::rtl::OUString AccessibleGridControlTableCell::implGetText()
+ {
+ ensureIsAlive();
+ //return mpTable->GetAccessibleCellText( getRowPos(), static_cast< USHORT >( getColumnPos() ) );
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "test" ));
+ }
+
+ ::com::sun::star::lang::Locale AccessibleGridControlTableCell::implGetLocale()
+ {
+ ensureIsAlive();
+ return m_aTable.GetAccessible()->getAccessibleContext()->getLocale();
+ }
+
+ void AccessibleGridControlTableCell::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex )
+ {
+ nStartIndex = 0;
+ nEndIndex = 0;
+ }
+
+ AccessibleGridControlTableCell::AccessibleGridControlTableCell(const Reference<XAccessible >& _rxParent,
+ IAccessibleTable& _rTable,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos,
+ AccessibleTableControlObjType eObjType)
+ :AccessibleGridControlCell( _rxParent, _rTable, _nRowPos, _nColPos, eObjType )
+ {
+ }
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL AccessibleGridControlTableCell::queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException )
+ {
+ Any aRet = AccessibleGridControlCell::queryInterface(rType);
+ if ( !aRet.hasValue() )
+ aRet = AccessibleTextHelper_BASE::queryInterface(rType);
+ return aRet;
+ }
+
+ /** Aquires the object (calls acquire() on base class). */
+ void SAL_CALL AccessibleGridControlTableCell::acquire() throw ()
+ {
+ AccessibleGridControlCell::acquire();
+ }
+
+ /** Releases the object (calls release() on base class). */
+ void SAL_CALL AccessibleGridControlTableCell::release() throw ()
+ {
+ AccessibleGridControlCell::release();
+ }
+
+ ::com::sun::star::awt::Rectangle SAL_CALL AccessibleGridControlTableCell::getCharacterBounds( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ ensureIsAlive();
+ if ( !implIsValidIndex( nIndex, implGetText().getLength() ) )
+ throw IndexOutOfBoundsException();
+
+ ::com::sun::star::awt::Rectangle aRect;
+
+ if ( &m_aTable )
+ {
+ aRect = AWTRectangle( m_aTable.GetFieldCharacterBounds( getRowPos(), getColumnPos(), nIndex ) );
+ }
+
+ return aRect;
+ }
+
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getIndexAtPoint( const ::com::sun::star::awt::Point& _aPoint ) throw (RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ return m_aTable.GetFieldIndexAtPoint( getRowPos(), getColumnPos(), VCLPoint( _aPoint ) );
+ }
+
+ /** @return
+ The name of this class.
+ */
+ ::rtl::OUString SAL_CALL AccessibleGridControlTableCell::getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException )
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleGridControlTableCell" ) );
+ }
+
+ /** @return The count of visible children. */
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException )
+ {
+ return 0;
+ }
+
+ /** @return The XAccessible interface of the specified child. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ AccessibleGridControlTableCell::getAccessibleChild( sal_Int32 )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException )
+ {
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+ }
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* AccessibleGridControlTableCell::implCreateStateSetHelper()
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ ::utl::AccessibleStateSetHelper* pStateSetHelper = new ::utl::AccessibleStateSetHelper;
+
+ if( isAlive() )
+ {
+ // SHOWING done with mxParent
+ if( implIsShowing() )
+ pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+
+ m_aTable.FillAccessibleStateSetForCell( *pStateSetHelper, getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) );
+ }
+ else
+ pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
+
+ return pStateSetHelper;
+ }
+
+
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ Reference< XAccessibleContext > SAL_CALL AccessibleGridControlTableCell::getAccessibleContext() throw ( RuntimeException )
+ {
+ ensureIsAlive();
+ return this;
+ }
+
+ // XAccessibleContext -----------------------------------------------------
+
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException )
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ensureIsAlive();
+
+ return ( getRowPos() * m_aTable.GetColumnCount() ) + getColumnPos();
+ }
+
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ return -1;
+ }
+ sal_Bool SAL_CALL AccessibleGridControlTableCell::setCaretPosition ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
+ throw IndexOutOfBoundsException();
+
+ return sal_False;
+ }
+ sal_Unicode SAL_CALL AccessibleGridControlTableCell::getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getCharacter( nIndex );
+ }
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL AccessibleGridControlTableCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+
+ ::rtl::OUString sText( implGetText() );
+
+ if ( !implIsValidIndex( nIndex, sText.getLength() ) )
+ throw IndexOutOfBoundsException();
+
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >();
+ }
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getCharacterCount( );
+ }
+
+ ::rtl::OUString SAL_CALL AccessibleGridControlTableCell::getSelectedText( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getSelectedText( );
+ }
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getSelectionStart( );
+ }
+ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getSelectionEnd( );
+ }
+ sal_Bool SAL_CALL AccessibleGridControlTableCell::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) )
+ throw IndexOutOfBoundsException();
+
+ return sal_False;
+ }
+ ::rtl::OUString SAL_CALL AccessibleGridControlTableCell::getText( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getText( );
+ }
+ ::rtl::OUString SAL_CALL AccessibleGridControlTableCell::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex );
+ }
+ ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleGridControlTableCell::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getTextAtIndex( nIndex ,aTextType);
+ }
+ ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleGridControlTableCell::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getTextBeforeIndex( nIndex ,aTextType);
+ }
+ ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleGridControlTableCell::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType);
+ }
+ sal_Bool SAL_CALL AccessibleGridControlTableCell::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ TCSolarGuard aSolarGuard;
+ ::osl::MutexGuard aGuard( getOslMutex() );
+ ::rtl::OUString sText = implGetText();
+ checkIndex_Impl( nStartIndex, sText );
+ checkIndex_Impl( nEndIndex, sText );
+
+ //!!! don't know how to put a string into the clipboard
+ return sal_False;
+ }
+ Rectangle AccessibleGridControlTableCell::implGetBoundingBox()
+ {
+ return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle
+ }
+ // -----------------------------------------------------------------------------
+
+ Rectangle AccessibleGridControlTableCell::implGetBoundingBoxOnScreen()
+ {
+ return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle
+ }
+}
diff --git a/accessibility/source/extended/makefile.mk b/accessibility/source/extended/makefile.mk
index 701bff8f7b51..34f9158f1f02 100644
--- a/accessibility/source/extended/makefile.mk
+++ b/accessibility/source/extended/makefile.mk
@@ -64,7 +64,14 @@ SLOFILES=\
$(SLO)$/listboxaccessible.obj \
$(SLO)$/accessiblebrowseboxcell.obj \
$(SLO)$/accessibleeditbrowseboxcell.obj \
- $(SLO)$/textwindowaccessibility.obj
+ $(SLO)$/textwindowaccessibility.obj \
+ $(SLO)$/AccessibleGridControlBase.obj \
+ $(SLO)$/AccessibleGridControl.obj \
+ $(SLO)$/AccessibleGridControlTableBase.obj \
+ $(SLO)$/AccessibleGridControlHeader.obj \
+ $(SLO)$/AccessibleGridControlTableCell.obj \
+ $(SLO)$/AccessibleGridControlHeaderCell.obj \
+ $(SLO)$/AccessibleGridControlTable.obj
# --- Targets -------------------------------------------------------
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index bdb3787df6ad..91476bc42863 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -72,7 +72,9 @@
#include <accessibility/extended/accessibleeditbrowseboxcell.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/combobox.hxx>
-#include "vcl/popupmenuwindow.hxx"
+#include <accessibility/extended/AccessibleGridControl.hxx>
+#include <svtools/accessibletable.hxx>
+//#include "vcl/popupmenuwindow.hxx"
#include <floatingwindowaccessible.hxx>
@@ -95,6 +97,7 @@ inline bool hasFloatingChild(Window *pWindow)
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::accessibility;
using namespace ::svt;
+ using namespace ::svt::table;
//================================================================
//= IAccessibleFactory
@@ -151,6 +154,12 @@ inline bool hasFloatingChild(Window *pWindow)
IAccessibleTableProvider& _rBrowseBox
) const;
+ virtual IAccessibleTableControl*
+ createAccessibleTableControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ IAccessibleTable& _rTable
+ ) const;
+
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
createAccessibleIconChoiceCtrl(
SvtIconChoiceCtrl& _rIconCtrl,
@@ -423,6 +432,13 @@ inline bool hasFloatingChild(Window *pWindow)
}
//--------------------------------------------------------------------
+ IAccessibleTableControl* AccessibleFactory::createAccessibleTableControl(
+ const Reference< XAccessible >& _rxParent, IAccessibleTable& _rTable ) const
+ {
+ return new AccessibleGridControlAccess( _rxParent, _rTable );
+ }
+
+ //--------------------------------------------------------------------
Reference< XAccessible > AccessibleFactory::createAccessibleIconChoiceCtrl(
SvtIconChoiceCtrl& _rIconCtrl, const Reference< XAccessible >& _xParent ) const
{
diff --git a/accessibility/workben/makefile.in b/accessibility/workben/makefile.in
index ad97448e7780..d81df5fb7363 100644
--- a/accessibility/workben/makefile.in
+++ b/accessibility/workben/makefile.in
@@ -11,7 +11,6 @@ CLASS_FILES = $(patsubst %.java, %.class, $(JAVAFILES))
CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(OFFICE_CLASSES_DIR)/jurt.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/unoil.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/ridl.jar\
- $(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/sandbox.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/juh.jar\
$(PATH_SEPARATOR)$(OUT_COMP_JAVA)\
$(PATH_SEPARATOR).\
diff --git a/accessibility/workben/makefile.mk b/accessibility/workben/makefile.mk
index 33c1e2a0ef5e..7f19d8936757 100644
--- a/accessibility/workben/makefile.mk
+++ b/accessibility/workben/makefile.mk
@@ -15,7 +15,6 @@ JAR_PATH = $(SOLARBINDIR)$/
JAR_FILES = \
unoil.jar \
- sandbox.jar \
ridl.jar \
jurt.jar \
juh.jar \
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common
index 3b7262a8489d..5bb567414220 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common
+++ b/accessibility/workben/org/openoffice/accessibility/awb/canvas/makefile.common
@@ -56,7 +56,7 @@
#
#*************************************************************************
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar
+JARFILES = jurt.jar unoil.jar ridl.jar
JAVAFILES = \
CanvasShape.java \
Canvas.java \
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk b/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk
index eb744d465cfb..032a75b16d04 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk
+++ b/accessibility/workben/org/openoffice/accessibility/awb/makefile.mk
@@ -68,7 +68,7 @@ USE_JAVAVER:=TRUE
.INCLUDE : settings.mk
.IF "$(JAVAVER:s/.//)" >= "140"
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar
+JARFILES = jurt.jar unoil.jar ridl.jar
.INCLUDE : makefile.common
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/manifest b/accessibility/workben/org/openoffice/accessibility/awb/manifest
index 951f9ec3128f..36111c54081d 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/manifest
+++ b/accessibility/workben/org/openoffice/accessibility/awb/manifest
@@ -1,3 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.openoffice.accessibility.awb.AccessibilityWorkBench
-Class-Path: classes.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar xt.jar jaxp.jar
+Class-Path: classes.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar xt.jar jaxp.jar
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common
index 7a0813b099db..6b32a5db09a8 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common
+++ b/accessibility/workben/org/openoffice/accessibility/awb/tree/makefile.common
@@ -56,7 +56,7 @@
#
#*************************************************************************
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar
+JARFILES = jurt.jar unoil.jar ridl.jar
JAVAFILES = \
AccessibilityModel.java \
AccessibilityNode.java \
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common
index d4929e3f1cd8..4f5f99ed0cf1 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/makefile.common
@@ -56,7 +56,7 @@
#
#*************************************************************************
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar
+JARFILES = jurt.jar unoil.jar ridl.jar
JAVAFILES = \
ComponentView.java \
ContextView.java \
diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common b/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common
index 32655a0c6a6f..e3303bb6890f 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/text/makefile.common
@@ -56,7 +56,7 @@
#
#*************************************************************************
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar
+JARFILES = jurt.jar unoil.jar ridl.jar
JAVAFILES = \
CaretSpinnerModel.java \
TextActionDialog.java \
diff --git a/accessibility/workben/org/openoffice/accessibility/misc/makefile.common b/accessibility/workben/org/openoffice/accessibility/misc/makefile.common
index d06336e12c56..f2462a88f841 100644
--- a/accessibility/workben/org/openoffice/accessibility/misc/makefile.common
+++ b/accessibility/workben/org/openoffice/accessibility/misc/makefile.common
@@ -56,7 +56,7 @@
#
#*************************************************************************
-JARFILES = sandbox.jar jurt.jar unoil.jar ridl.jar juh.jar java_uno.jar
+JARFILES = jurt.jar unoil.jar ridl.jar juh.jar java_uno.jar
JAVAFILES = \
AccessibleEventMulticaster.java \
InformationWriter.java \
diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
index 2a7b702e38cb..3804ad3048e5 100644
--- a/automation/inc/automation/communi.hxx
+++ b/automation/inc/automation/communi.hxx
@@ -31,7 +31,7 @@
#ifndef _COMMUNI_HXX
#define _COMMUNI_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <vos/thread.hxx>
#include <vos/mutex.hxx>
#include <vcl/timer.hxx>
diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx
index 0ab2b48d3579..55048d05cbb0 100644
--- a/automation/source/miniapp/testapp.hxx
+++ b/automation/source/miniapp/testapp.hxx
@@ -58,7 +58,7 @@
#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
#endif
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include "editwin.hxx"
diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx
index 8888a007918c..a8abce528746 100644
--- a/automation/source/server/scmdstrm.cxx
+++ b/automation/source/server/scmdstrm.cxx
@@ -30,9 +30,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_automation.hxx"
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include "scmdstrm.hxx"
#include "svcommstream.hxx"
#include "rcontrol.hxx"
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 988f4055a2eb..890e6ace540d 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -55,7 +55,7 @@
#if 1
#include <svtools/ttprops.hxx>
#include <basic/ttstrhlp.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/stringtransfer.hxx>
#include <vcl/sound.hxx>
#include "testtool.hrc"
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 4219d1d5b099..be501ae901f6 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -85,31 +85,22 @@
#include <vcl/wintypes.hxx>
#include <svtools/valueset.hxx>
#include <svtools/roadmap.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include <svtools/extensionlistbox.hxx>
// Hat keinen Includeschutz
#include <svtools/svtdata.hxx>
#include <tools/time.hxx>
#include <svtools/stringtransfer.hxx>
-#ifndef _PRINT_HXX //autogen
-#include <vcl/print.hxx>
-#endif
-#ifndef _PRNDLG_HXX //autogen
-#include <vcl/prndlg.hxx>
-#endif
#include <tools/stream.hxx>
-#ifndef _SV_DRAG_HXX //autogen
-//#include <vcl/drag.hxx>
-#endif
#include <tools/fsys.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/ttprops.hxx>
#ifndef _BASIC_TTRESHLP_HXX
#include <basic/ttstrhlp.hxx>
#endif
#include <basic/dispdefs.hxx>
#include <vos/socket.hxx>
-#include <svtools/pickerhistory.hxx>
+#include <svl/pickerhistory.hxx>
#include <com/sun/star/util/XCancellable.hpp>
#include <sot/storage.hxx>
@@ -4288,7 +4279,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
Edit *pMyEd = new Edit(pDlg,WB_CENTER | WB_BORDER );
pMyEd->SetSizePixel(Size(100,30));
- pDlg->SetText(CUniString("Schließen"));
+ pDlg->SetText(UniString("Schließen", RTL_TEXTENCODING_ISO_8859_1));
pDlg->Show();
pMyEd->Show();
ULONG nTime = Time().GetTime();
@@ -4820,37 +4811,49 @@ BOOL StatementControl::Execute()
}
break;
case M_GetPage:
- pRet->GenReturn ( RET_Value, aUId, static_cast<comm_ULONG>(((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetSmartUniqueOrHelpId().GetNum())); //GetNum() ULONG != comm_ULONG on 64bit
+ pRet->GenReturn ( RET_Value, aUId, ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetSmartUniqueOrHelpId().GetText());
break;
case M_SetPage :
{ // Wegen lokaler Variablen
TabControl *pTControl = ((TabControl*)pControl);
USHORT nActive = pTControl->GetCurPageId();
USHORT i,anz;
- ULONG nID = 0;
+ SmartId aID;
+ SmartId aWantedID;
+ if ( (nParams & PARAM_ULONG_1) )
+ {
+ aWantedID = SmartId( nLNr1 );
+ }
+ else if ( (nParams & PARAM_STR_1) )
+ {
+ aWantedID = SmartId( aString1 );
+ }
+ else
+ ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
+
i = pTControl->GetPagePos( pTControl->GetCurPageId() );
- for ( anz=0 ; anz < pTControl->GetPageCount() && nID != nLNr1 ; anz++ )
+ for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.Matches( aWantedID ) ; anz++ )
{
pTControl->SelectTabPage( pTControl->GetPageId(i) );
/*if (pTControl->GetCurPageId())
pTControl->DeactivatePage();
pTControl->SetCurPageId( pTControl->GetPageId(i) );
pTControl->ActivatePage();*/
- nID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetSmartUniqueOrHelpId().GetNum();
+ aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetSmartUniqueOrHelpId();
i++;
if ( i >= pTControl->GetPageCount() )
i = 0;
if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen
break;
}
- if ( nID != nLNr1 )
+ if ( !aID.Matches( aWantedID ) )
{
pTControl->SelectTabPage( nActive );
/*if (pTControl->GetCurPageId())
pTControl->DeactivatePage();
pTControl->SetCurPageId( nActive );
pTControl->ActivatePage();*/
- ReportError( SmartId( nLNr1 ), GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) );
+ ReportError( aWantedID, GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) );
}
}
break;
diff --git a/automation/source/testtool/makefile.mk b/automation/source/testtool/makefile.mk
index 79a811fdaee7..e72c92c3b8e1 100644
--- a/automation/source/testtool/makefile.mk
+++ b/automation/source/testtool/makefile.mk
@@ -84,9 +84,9 @@ $(INCCOM)$/r_cmds.hxx : ..$/inc$/rcontrol.hxx \
$(MISC)$/xfilter.pl
$(PERL) $(MISC)$/xfilter.pl ..$/inc rcontrol.hxx $(INCCOM)$/r_cmds RC_
-$(INCCOM)$/res_type.hxx : $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/vcl$/wintypes.hxx \
+$(INCCOM)$/res_type.hxx : $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/tools$/wintypes.hxx \
$(MISC)$/xfilter.pl
- $(PERL) $(MISC)$/xfilter.pl $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT) vcl$/wintypes.hxx $(INCCOM)$/res_type WINDOW_
+ $(PERL) $(MISC)$/xfilter.pl $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT) tools$/wintypes.hxx $(INCCOM)$/res_type WINDOW_
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index e068530459a8..84dc21a1321a 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -58,7 +58,7 @@ using namespace com::sun::star::devtools;
#include <vcl/svapp.hxx>
#endif
#include <svtools/stringtransfer.hxx>
-#include <svtools/brdcst.hxx>
+#include <svl/brdcst.hxx>
//#ifndef _SBXCLASS_HXX //autogen
#include <basic/sbx.hxx>
//#endif
@@ -495,8 +495,6 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
abGP.Append( "04" );
#elif defined SOLARIS && defined INTEL
abGP.Append( "05" ); // Solaris x86
-#elif defined IRIX
- abGP.Append( "06" );
#elif defined HPUX
abGP.Append( "07" );
#elif defined FREEBSD
@@ -521,6 +519,8 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d
abGP.Append( "20" ); // Linux ia64
#elif defined LINUX && defined S390
abGP.Append( "21" ); // Linux S390
+#elif defined LINUX && defined HPPA
+ abGP.Append( "22" ); // Linux PA-RISC
#else
#error ("unknown platform. please request an ID for your platform on qa/dev")
#endif
diff --git a/automation/source/testtool/tcommuni.hxx b/automation/source/testtool/tcommuni.hxx
index 4863f1fd428c..f31d397a7a00 100644
--- a/automation/source/testtool/tcommuni.hxx
+++ b/automation/source/testtool/tcommuni.hxx
@@ -30,7 +30,7 @@
#include <automation/communi.hxx>
#include <tools/link.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <vos/thread.hxx>
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index ddff29283d2d..d4f048cda8d7 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -58,6 +58,7 @@
#define RID_DLG_NEWLIB ( RID_BASICIDE_START + 42 )
#define RID_DLG_EXPORT ( RID_BASICIDE_START + 43 )
#define RID_POPUP_DLGED ( RID_BASICIDE_START + 62 )
+#define RID_PRINTDLG_STRLIST ( RID_BASICIDE_START + 78 )
#define RID_IMG_LOCKED_HC ( RID_BASICIDE_START + 6 )
#define RID_IMGBTN_REMOVEWATCH ( RID_BASICIDE_START + 8 )
diff --git a/basctl/inc/helpid.hrc b/basctl/inc/helpid.hrc
index 0ff13c806a07..00356d2bc5c4 100644
--- a/basctl/inc/helpid.hrc
+++ b/basctl/inc/helpid.hrc
@@ -32,7 +32,7 @@
// include ---------------------------------------------------------------
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
// Help-Ids --------------------------------------------------------------
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index e975d6464194..be1612ea7429 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -77,19 +77,19 @@
#include "vcl/svapp.hxx"
#include "vcl/scrbar.hxx"
-#include "svtools/svarray.hxx"
-#include "svtools/itempool.hxx"
-#include "svtools/itemset.hxx"
-#include "svtools/aeitem.hxx"
-#include "svtools/stritem.hxx"
-#include "svtools/whiter.hxx"
+#include "svl/svarray.hxx"
+#include "svl/itempool.hxx"
+#include "svl/itemset.hxx"
+#include "svl/aeitem.hxx"
+#include "svl/stritem.hxx"
+#include "svl/whiter.hxx"
#include "svtools/langtab.hxx"
#include "svtools/texteng.hxx"
#include "svtools/textview.hxx"
#include "svtools/xtextedt.hxx"
#include "svtools/txtattr.hxx"
#include "svtools/textwindowpeer.hxx"
-#include "svtools/urihelper.hxx"
+#include "svl/urihelper.hxx"
#define _BASIC_TEXTPORTIONS
#include "basic/sbdef.hxx"
diff --git a/basctl/sdi/basslots.sdi b/basctl/sdi/basslots.sdi
index bb9cd1172af9..d2b3cb602ab8 100644
--- a/basctl/sdi/basslots.sdi
+++ b/basctl/sdi/basslots.sdi
@@ -28,8 +28,6 @@
*
************************************************************************/
-import "svxslots.ilb"
-
module
"6706E0E7-FB05-101B-804c-04021c007002"
"6806E0E7-FB05-101B-804c-04021c007002"
@@ -37,10 +35,14 @@ BasicIDE
[
HelpText( "BasicIDE" )
SlotIdFile( "basslots.hrc" )
-TypeLibFile( "basslots.tlb" )
]
{
//=========================================================================
+ include "sfx2/sfxitems.sdi"
+ include "sfx2/sfx.sdi"
+ include "svx/svxitems.sdi"
+ include "svx/xoitems.sdi"
+ include "svx/svx.sdi"
include "baside.sdi"
diff --git a/basctl/sdi/makefile.mk b/basctl/sdi/makefile.mk
index d94921bf9ae2..2244eafcd654 100644
--- a/basctl/sdi/makefile.mk
+++ b/basctl/sdi/makefile.mk
@@ -1,7 +1,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
@@ -45,7 +45,11 @@ SDI1EXPORT=basctl
# --- Files --------------------------------------------------------
SVSDI1DEPEND= \
- $(SOLARINCXDIR)$/svxslots.ilb \
+ $(SOLARINCXDIR)$/sfx2/sfx.sdi \
+ $(SOLARINCXDIR)$/sfx2/sfxitems.sdi \
+ $(SOLARINCXDIR)$/svx/svx.sdi \
+ $(SOLARINCXDIR)$/svx/svxitems.sdi \
+ $(SOLARINCXDIR)$/svx/xoitems.sdi \
baside.sdi
# --- Targets -------------------------------------------------------
diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx
index e21a0c9d09c6..25f47c980c5d 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -32,7 +32,7 @@
#define _BASICBOX_HXX
#include "doceventnotifier.hxx"
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svheader.hxx>
#include <sfx2/tbxctrl.hxx>
#include <vcl/lstbox.hxx>
diff --git a/basctl/source/basicide/basicprint.src b/basctl/source/basicide/basicprint.src
new file mode 100644
index 000000000000..be5e7d2e1de3
--- /dev/null
+++ b/basctl/source/basicide/basicprint.src
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: basidesh.src,v $
+ * $Revision: 1.107 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <basidesh.hrc>
+
+StringArray RID_PRINTDLG_STRLIST
+{
+ ItemList [en-US] =
+ {
+ < "Print range"; >;
+ < "All ~Pages"; >;
+ < "Print all pages of the printable content."; >;
+ < "Pa~ges"; >;
+ < "Print only some pages of the printable content."; >;
+ };
+};
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
new file mode 100644
index 000000000000..fa30af874cff
--- /dev/null
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: basidesh.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "precompiled_basctl.hxx"
+
+#include "basicrenderable.hxx"
+#include "bastypes.hxx"
+#include "basidesh.hrc"
+
+#include "com/sun/star/awt/XDevice.hpp"
+#include "toolkit/awt/vclxdevice.hxx"
+#include "vcl/print.hxx"
+#include "tools/multisel.hxx"
+#include "tools/resary.hxx"
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace basicide;
+
+BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
+: cppu::WeakComponentImplHelper1< com::sun::star::view::XRenderable >( maMutex )
+, mpWindow( pWin )
+{
+ ResStringArray aStrings( IDEResId( RID_PRINTDLG_STRLIST ) );
+ DBG_ASSERT( aStrings.Count() >= 5, "resource incomplete" );
+ if( aStrings.Count() < 5 ) // bad resource ?
+ return;
+
+ m_aUIProperties.realloc( 3 );
+
+ // create Subgroup for print range
+ vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
+ aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ aPrintRangeOpt.mbInternalOnly = sal_True;
+ m_aUIProperties[0].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ),
+ rtl::OUString(),
+ aPrintRangeOpt
+ );
+
+ // create a choice for the range to print
+ rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
+ Sequence< rtl::OUString > aChoices( 2 );
+ Sequence< rtl::OUString > aHelpTexts( 2 );
+ aChoices[0] = aStrings.GetString( 1 );
+ aHelpTexts[0] = aStrings.GetString( 2 );
+ aChoices[1] = aStrings.GetString( 3 );
+ aHelpTexts[1] = aStrings.GetString( 4 );
+ m_aUIProperties[1].Value = getChoiceControlOpt( rtl::OUString(),
+ aHelpTexts,
+ aPrintContentName,
+ aChoices,
+ 0 );
+
+ // create a an Edit dependent on "Pages" selected
+ vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintContentName, 1, sal_True );
+ m_aUIProperties[2].Value = getEditControlOpt( rtl::OUString(),
+ rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
+ rtl::OUString(),
+ aPageRangeOpt
+ );
+}
+
+BasicRenderable::~BasicRenderable()
+{
+}
+
+Printer* BasicRenderable::getPrinter()
+{
+ Printer* pPrinter = NULL;
+ Any aValue( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) );
+ Reference<awt::XDevice> xRenderDevice;
+
+ if( aValue >>= xRenderDevice )
+ {
+ VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
+ OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
+ pPrinter = dynamic_cast<Printer*>(pOut);
+ }
+ return pPrinter;
+}
+
+sal_Int32 SAL_CALL BasicRenderable::getRendererCount (
+ const Any&, const Sequence<beans::PropertyValue >& i_xOptions
+ ) throw (lang::IllegalArgumentException, RuntimeException)
+{
+ processProperties( i_xOptions );
+
+ sal_Int32 nCount = 0;
+ if( mpWindow )
+ {
+ Printer* pPrinter = getPrinter();
+ if( pPrinter )
+ {
+ nCount = mpWindow->countPages( pPrinter );
+ sal_Int64 nContent = getIntValue( "PrintContent", -1 );
+ if( nContent == 1 )
+ {
+ rtl::OUString aPageRange( getStringValue( "PageRange" ) );
+ MultiSelection aSel( aPageRange );
+ long nSelCount = aSel.GetSelectCount();
+ if( nSelCount >= 0 && nSelCount < nCount )
+ nCount = nSelCount;
+ }
+ }
+ else
+ throw lang::IllegalArgumentException();
+ }
+
+ return nCount;
+}
+
+Sequence<beans::PropertyValue> SAL_CALL BasicRenderable::getRenderer (
+ sal_Int32, const Any&, const Sequence<beans::PropertyValue>& i_xOptions
+ ) throw (lang::IllegalArgumentException, RuntimeException)
+{
+ processProperties( i_xOptions );
+
+ Sequence< beans::PropertyValue > aVals;
+ // insert page size here
+ Printer* pPrinter = getPrinter();
+ // no renderdevice is legal; the first call is to get our print ui options
+ if( pPrinter )
+ {
+ Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+
+ aVals.realloc( 1 );
+ aVals[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
+ awt::Size aSize;
+ aSize.Width = aPageSize.Width();
+ aSize.Height = aPageSize.Height();
+ aVals[0].Value <<= aSize;
+ }
+
+ appendPrintUIOptions( aVals );
+
+ return aVals;
+}
+
+void SAL_CALL BasicRenderable::render (
+ sal_Int32 nRenderer, const Any&,
+ const Sequence<beans::PropertyValue>& i_xOptions
+ ) throw (lang::IllegalArgumentException, RuntimeException)
+{
+ processProperties( i_xOptions );
+
+ if( mpWindow )
+ {
+ Printer* pPrinter = getPrinter();
+ if( pPrinter )
+ {
+ sal_Int64 nContent = getIntValue( "PrintContent", -1 );
+ if( nContent == 1 )
+ {
+ rtl::OUString aPageRange( getStringValue( "PageRange" ) );
+ MultiSelection aSel( aPageRange );
+ long nSelect = aSel.FirstSelected();
+ while( nSelect != long(SFX_ENDOFSELECTION) && nRenderer-- )
+ nSelect = aSel.NextSelected();
+ if( nSelect != long(SFX_ENDOFSELECTION) )
+ mpWindow->printPage( sal_Int32(nSelect-1), pPrinter );
+ }
+ else
+ mpWindow->printPage( nRenderer, pPrinter );
+ }
+ else
+ throw lang::IllegalArgumentException();
+ }
+}
+
+
diff --git a/basctl/source/basicide/basicrenderable.hxx b/basctl/source/basicide/basicrenderable.hxx
new file mode 100644
index 000000000000..7cad19c784be
--- /dev/null
+++ b/basctl/source/basicide/basicrenderable.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: basidesh.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _BASICRENDERABLE_HXX
+#define _BASICRENDERABLE_HXX
+
+#include "com/sun/star/view/XRenderable.hpp"
+#include "cppuhelper/compbase1.hxx"
+
+#include "vcl/print.hxx"
+
+class IDEBaseWindow;
+
+namespace basicide
+{
+class BasicRenderable :
+ public cppu::WeakComponentImplHelper1< com::sun::star::view::XRenderable >,
+ public vcl::PrinterOptionsHelper
+{
+ IDEBaseWindow* mpWindow;
+ osl::Mutex maMutex;
+
+ Printer* getPrinter();
+public:
+ BasicRenderable( IDEBaseWindow* pWin );
+ virtual ~BasicRenderable();
+
+ // XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount (
+ const com::sun::star::uno::Any& aSelection,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue >& xOptions)
+ throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+
+ virtual com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> SAL_CALL getRenderer (
+ sal_Int32 nRenderer,
+ const com::sun::star::uno::Any& rSelection,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rxOptions)
+ throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL render (
+ sal_Int32 nRenderer,
+ const com::sun::star::uno::Any& rSelection,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rxOptions)
+ throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+
+};
+
+} // namespace
+
+#endif
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 030fa5e68e26..6612f82fb92b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -110,7 +110,7 @@ DBG_NAME( ModulWindow )
TYPEINIT1( ModulWindow , IDEBaseWindow );
-void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle, bool bOutput )
{
short nLeftMargin = LMARGPRN;
Size aSz = pPrinter->GetOutputSize();
@@ -136,14 +136,16 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
long nXLeft = nLeftMargin-nBorder;
long nXRight = aSz.Width()-RMARGPRN+nBorder;
- pPrinter->DrawRect( Rectangle(
- Point( nXLeft, nYTop ),
- Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
+ if( bOutput )
+ pPrinter->DrawRect( Rectangle(
+ Point( nXLeft, nYTop ),
+ Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
long nY = TMARGPRN-2*nBorder;
Point aPos( nLeftMargin, nY );
- pPrinter->DrawText( aPos, rTitle );
+ if( bOutput )
+ pPrinter->DrawText( aPos, rTitle );
if ( nPages != 1 )
{
aFont.SetWeight( WEIGHT_NORMAL );
@@ -154,13 +156,15 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
aPageStr += String::CreateFromInt32( nCurPage );
aPageStr += ']';
aPos.X() += pPrinter->GetTextWidth( rTitle );
- pPrinter->DrawText( aPos, aPageStr );
+ if( bOutput )
+ pPrinter->DrawText( aPos, aPageStr );
}
nY = TMARGPRN-nBorder;
- pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
+ if( bOutput )
+ pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
pPrinter->SetFont( aOldFont );
pPrinter->SetFillColor( aOldFillColor );
@@ -914,8 +918,23 @@ void __EXPORT ModulWindow::UpdateData()
}
}
+sal_Int32 ModulWindow::countPages( Printer* pPrinter )
+{
+ return FormatAndPrint( pPrinter, -1 );
+}
-void __EXPORT ModulWindow::PrintData( Printer* pPrinter )
+void ModulWindow::printPage( sal_Int32 nPage, Printer* pPrinter )
+{
+ FormatAndPrint( pPrinter, nPage );
+}
+
+/* implementation note: this is totally inefficient for the XRenderable interface
+ usage since the whole "document" will be format for every page. Should this ever
+ become a problem we should
+ - format only once for every new printer
+ - keep an index list for each page which is the starting paragraph
+*/
+sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
{
DBG_CHKTHIS( ModulWindow, 0 );
@@ -949,10 +968,8 @@ void __EXPORT ModulWindow::PrintData( Printer* pPrinter )
USHORT nPages = (USHORT) (nParas/nLinespPage+1 );
USHORT nCurPage = 1;
- pPrinter->StartJob( aTitle );
- pPrinter->StartPage();
// Header drucken...
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
+ lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle, nPrintPage == 0 );
Point aPos( LMARGPRN, TMARGPRN );
for ( ULONG nPara = 0; nPara < nParas; nPara++ )
{
@@ -966,20 +983,19 @@ void __EXPORT ModulWindow::PrintData( Printer* pPrinter )
if ( aPos.Y() > ( aPaperSz.Height()+TMARGPRN ) )
{
nCurPage++;
- pPrinter->EndPage();
- pPrinter->StartPage();
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
+ lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle, nCurPage-1 == nPrintPage );
aPos = Point( LMARGPRN, TMARGPRN+nLineHeight );
}
- pPrinter->DrawText( aPos, aTmpLine );
+ if( nCurPage-1 == nPrintPage )
+ pPrinter->DrawText( aPos, aTmpLine );
}
aPos.Y() += nParaSpace;
}
- pPrinter->EndPage();
- pPrinter->EndJob();
pPrinter->SetFont( aOldFont );
pPrinter->SetMapMode( eOldMapMode );
+
+ return sal_Int32(nCurPage);
}
@@ -1430,7 +1446,7 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
m_aSyntaxColors[TT_UNKNOWN] = aColor;
m_aSyntaxColors[TT_WHITESPACE] = aColor;
m_aSyntaxColors[TT_EOL] = aColor;
- StartListening(m_aColorConfig);
+ m_aColorConfig.AddListener(this);
m_aSyntaxColors[TT_IDENTIFIER]
= Color(m_aColorConfig.GetColorValue(svtools::BASICIDENTIFIER).nColor);
m_aSyntaxColors[TT_NUMBER]
@@ -1458,7 +1474,7 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
ModulWindowLayout::~ModulWindowLayout()
{
- EndListening(m_aColorConfig);
+ m_aColorConfig.RemoveListener(this);
}
void __EXPORT ModulWindowLayout::Resize()
@@ -1602,7 +1618,7 @@ void ModulWindowLayout::DockaWindow( DockingWindow* pDockingWindow )
// evtl. Sonderbehandlung...
ArrangeWindows();
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
DBG_ERROR( "Wer will sich denn hier andocken ?" );
#endif
@@ -1652,13 +1668,8 @@ void ModulWindowLayout::DataChanged(DataChangedEvent const & rDCEvt)
}
// virtual
-void ModulWindowLayout::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
+void ModulWindowLayout::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
{
- (void)rBc;
-
- if (rHint.ISA(SfxSimpleHint)
- && (static_cast< SfxSimpleHint const & >(rHint).GetId()
- == SFX_HINT_COLORS_CHANGED))
{
Color aColor(m_aColorConfig.GetColorValue(svtools::BASICIDENTIFIER).
nColor);
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 7c9fd764cef0..25a04b0da6ab 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -48,7 +48,7 @@ class SvxSearchItem;
#endif
#include <basic/sbmod.hxx>
#include <vcl/split.hxx>
-#include "svtools/lstner.hxx"
+#include "svl/lstner.hxx"
#include <svtools/colorcfg.hxx>
#include <sfx2/progress.hxx>
@@ -58,6 +58,10 @@ DBG_NAMEEX( ModulWindow )
#define MARKER_NOMARKER 0xFFFF
+namespace utl
+{
+ class SourceViewConfig;
+}
// #108672 Helper functions to get/set text in TextEngine
// using the stream interface (get/setText() only supports
@@ -108,13 +112,13 @@ namespace svt {
class SourceViewConfig;
}
-class EditorWindow : public Window, public SfxListener
+class EditorWindow : public Window, public SfxListener, public utl::ConfigurationListener
{
private:
ExtTextView* pEditView;
ExtTextEngine* pEditEngine;
- svt::SourceViewConfig* pSourceViewConfig;
+ utl::SourceViewConfig* pSourceViewConfig;
long nCurTextWidth;
@@ -151,6 +155,7 @@ protected:
virtual void Command( const CommandEvent& rCEvt );
virtual void LoseFocus();
virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
void DoSyntaxHighlight( ULONG nPara );
String GetWordAtCursor();
@@ -354,6 +359,7 @@ private:
void GoOnTop();
void AssertValidEditEngine();
+ sal_Int32 FormatAndPrint( Printer* pPrinter, sal_Int32 nPage = -1 );
protected:
virtual void Resize();
virtual void GetFocus();
@@ -375,7 +381,11 @@ public:
virtual void StoreData();
virtual void UpdateData();
virtual BOOL CanClose();
- virtual void PrintData( Printer* pPrinter );
+ // virtual void PrintData( Printer* pPrinter );
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter );
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual String GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor();
virtual BOOL AllowUndo();
@@ -442,7 +452,7 @@ public:
void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; }
};
-class ModulWindowLayout: public Window, public SfxListener
+class ModulWindowLayout: public Window, public utl::ConfigurationListener
{
private:
@@ -465,8 +475,7 @@ private:
virtual void DataChanged(DataChangedEvent const & rDCEvt);
- using Window::Notify;
- virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
void updateSyntaxHighlighting();
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 27dce8dccc2f..66065d77f71e 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -32,7 +32,7 @@
#include "precompiled_basctl.hxx"
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#define _BASIC_TEXTPORTIONS
#include <basic/sbdef.hxx>
#include <ide_pch.hxx>
@@ -40,7 +40,7 @@
#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <basic/sbx.hxx>
#include <vcl/sound.hxx>
#include <svtools/xtextedt.hxx>
@@ -62,7 +62,7 @@
//#ifndef _SFX_HELP_HXX //autogen
//#include <sfx2/sfxhelp.hxx>
//#endif
-#include <svtools/sourceviewconfig.hxx>
+#include <unotools/sourceviewconfig.hxx>
#ifndef _COM_SUN_STAR_SCRIPT_XLIBRYARYCONTAINER2_HPP_
#include <com/sun/star/script/XLibraryContainer2.hpp>
@@ -172,7 +172,7 @@ EditorWindow::EditorWindow( Window* pParent ) :
pModulWindow = 0;
pEditView = 0;
pEditEngine = 0;
- pSourceViewConfig = new svt::SourceViewConfig;
+ pSourceViewConfig = new utl::SourceViewConfig;
bHighlightning = FALSE;
pProgress = 0;
nCurTextWidth = 0;
@@ -181,15 +181,14 @@ EditorWindow::EditorWindow( Window* pParent ) :
SetPointer( Pointer( POINTER_TEXT ) );
SetHelpId( HID_BASICIDE_EDITORWINDOW );
-
- StartListening( *pSourceViewConfig );
+ pSourceViewConfig->AddListener(this);
}
__EXPORT EditorWindow::~EditorWindow()
{
- EndListening( *pSourceViewConfig );
+ pSourceViewConfig->RemoveListener(this);
delete pSourceViewConfig;
aSyntaxIdleTimer.Stop();
@@ -662,7 +661,7 @@ void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
}
}
-void EditorWindow::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if ( rHint.ISA( TextHint ) )
{
@@ -718,10 +717,11 @@ void EditorWindow::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
}
- else if ( &rBC == pSourceViewConfig )
- {
- ImplSetFont();
- }
+}
+
+void EditorWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
+{
+ ImplSetFont();
}
void EditorWindow::SetScrollBarRanges()
@@ -944,6 +944,7 @@ BreakPointWindow::BreakPointWindow( Window* pParent ) :
pModulWindow = 0;
nCurYOffset = 0;
setBackgroundColor(GetSettings().GetStyleSettings().GetFieldColor());
+ m_bHighContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
nMarkerPos = MARKER_NOMARKER;
// nCurYOffset merken und nicht von EditEngine holen.
@@ -1161,6 +1162,7 @@ void BreakPointWindow::DataChanged(DataChangedEvent const & rDCEvt)
!= rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
{
setBackgroundColor(aColor);
+ m_bHighContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
Invalidate();
}
}
@@ -1169,7 +1171,6 @@ void BreakPointWindow::DataChanged(DataChangedEvent const & rDCEvt)
void BreakPointWindow::setBackgroundColor(Color aColor)
{
SetBackground(Wallpaper(aColor));
- m_bHighContrastMode = aColor.IsDark();
}
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index d89191803c9f..77181a0a2044 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -46,7 +46,7 @@
#include <ide_pch.hxx>
-#include <vector>
+#include <vector>
#include <basidesh.hrc>
#include <baside3.hxx>
#include <localizationmgr.hxx>
@@ -64,7 +64,7 @@
#include <helpid.hrc>
#include <bastype2.hxx>
#include <svx/svdview.hxx>
-#include <svx/unolingu.hxx>
+#include <svx/unolingu.hxx>
#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
@@ -75,7 +75,7 @@
#include <com/sun/star/script/XLibraryContainer2.hpp>
#endif
#include <svtools/ehdl.hxx>
-#include <svtools/langtab.hxx>
+#include <svtools/langtab.hxx>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
@@ -641,10 +641,10 @@ void __EXPORT DialogWindow::ExecuteCommand( SfxRequest& rReq )
case SID_EXPORT_DIALOG:
SaveDialog();
break;
-
- case SID_IMPORT_DIALOG:
- ImportDialog();
- break;
+
+ case SID_IMPORT_DIALOG:
+ ImportDialog();
+ break;
}
rReq.Done();
@@ -866,406 +866,406 @@ BOOL DialogWindow::SaveDialog()
return bDone;
}
-extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
- const ::com::sun::star::lang::Locale& rLocaleRight );
-
-std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq
- ( Sequence< lang::Locale > aFirstSeq, Sequence< lang::Locale > aSecondSeq )
-{
- std::vector< lang::Locale > avRet;
-
- const lang::Locale* pFirst = aFirstSeq.getConstArray();
- const lang::Locale* pSecond = aSecondSeq.getConstArray();
- sal_Int32 nFirstCount = aFirstSeq.getLength();
- sal_Int32 nSecondCount = aSecondSeq.getLength();
-
- for( sal_Int32 iFirst = 0 ; iFirst < nFirstCount ; iFirst++ )
- {
- const lang::Locale& rFirstLocale = pFirst[ iFirst ];
-
- bool bAlsoContainedInSecondSeq = false;
- for( sal_Int32 iSecond = 0 ; iSecond < nSecondCount ; iSecond++ )
- {
- const lang::Locale& rSecondLocale = pSecond[ iSecond ];
-
- bool bMatch = localesAreEqual( rFirstLocale, rSecondLocale );
- if( bMatch )
- {
- bAlsoContainedInSecondSeq = true;
- break;
- }
- }
-
- if( !bAlsoContainedInSecondSeq )
- avRet.push_back( rFirstLocale );
- }
-
- return avRet;
-}
-
-
-class NameClashQueryBox : public MessBox
-{
-public:
- NameClashQueryBox( Window* pParent,
- const XubString& rTitle, const XubString& rMessage );
-};
-
-NameClashQueryBox::NameClashQueryBox( Window* pParent,
- const XubString& rTitle, const XubString& rMessage )
- : MessBox( pParent, 0, rTitle, rMessage )
-{
- if ( rTitle.Len() )
- SetText( rTitle );
-
- maMessText = rMessage;
-
- AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_RENAME ) ), RET_YES,
- BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
- AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_REPLACE ) ), RET_NO, 0 );
- AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
-
- SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
- QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
-}
-
-
-class LanguageMismatchQueryBox : public MessBox
-{
-public:
- LanguageMismatchQueryBox( Window* pParent,
- const XubString& rTitle, const XubString& rMessage );
-};
-
-LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
- const XubString& rTitle, const XubString& rMessage )
- : MessBox( pParent, 0, rTitle, rMessage )
-{
- if ( rTitle.Len() )
- SetText( rTitle );
-
- maMessText = rMessage;
- AddButton( String( IDEResId( RID_STR_DLGIMP_MISMATCH_ADD ) ), RET_YES,
- BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
- AddButton( String( IDEResId( RID_STR_DLGIMP_MISMATCH_OMIT ) ), RET_NO, 0 );
- AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
- AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 4 );
-
- SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
- QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
-}
-
-BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName )
-{
- BOOL bDone = FALSE;
-
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
- }
-
- Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
- xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False);
- Any aValue;
- aValue <<= (sal_Bool) sal_True;
- xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
-
- String aCurPath( rCurPath );
- if ( aCurPath.Len() )
- xFP->setDisplayDirectory ( aCurPath );
-
- String aDialogStr( IDEResId( RID_STR_STDDIALOGNAME ) );
- Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
- xFltMgr->appendFilter( String( IDEResId( RID_STR_FILTER_ALLFILES ) ), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
- xFltMgr->setCurrentFilter( aDialogStr );
-
- if( xFP->execute() == RET_OK )
- {
- Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
- aCurPath = aPaths[0];
-
- ::rtl::OUString aBasePath;
- ::rtl::OUString aOUCurPath( aCurPath );
- sal_Int32 iSlash = aOUCurPath.lastIndexOf( '/' );
- if( iSlash != -1 )
- aBasePath = aOUCurPath.copy( 0, iSlash + 1 );
-
- try
- {
- // create dialog model
- Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY_THROW );
-
- Reference< XSimpleFileAccess > xSFI( xMSF->createInstance
- ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY_THROW );
-
- Reference< XInputStream > xInput;
- if( xSFI->exists( aCurPath ) )
- xInput = xSFI->openFileRead( aCurPath );
-
- Reference< XComponentContext > xContext;
- Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
- OSL_ASSERT( xProps.is() );
- OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
- ::xmlscript::importDialogModel( xInput, xDialogModel, xContext );
-
- String aXmlDlgName;
- Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
- if( xDialogModelPropSet.is() )
- {
- try
- {
- Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME );
- ::rtl::OUString aOUXmlDialogName;
- aXmlDialogNameAny >>= aOUXmlDialogName;
- aXmlDlgName = aOUXmlDialogName;
- }
- catch( beans::UnknownPropertyException& )
- {}
- }
- bool bValidName = (aXmlDlgName.Len() != 0);
- OSL_ASSERT( bValidName );
- if( !bValidName )
- return bDone;
-
- bool bDialogAlreadyExists = rDocument.hasDialog( aLibName, aXmlDlgName );
-
- String aNewDlgName = aXmlDlgName;
- enum NameClashMode
- {
- NO_CLASH,
- CLASH_OVERWRITE_DIALOG,
- CLASH_RENAME_DIALOG,
- };
- NameClashMode eNameClashMode = NO_CLASH;
- if( bDialogAlreadyExists )
- {
- String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_CLASH_TITLE ) );
- String aQueryBoxText( IDEResId( RID_STR_DLGIMP_CLASH_TEXT ) );
- aQueryBoxText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "$(ARG1)" ) ), aXmlDlgName );
-
- NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
- USHORT nRet = aQueryBox.Execute();
- if( RET_YES == nRet )
- {
- // RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox
- eNameClashMode = CLASH_RENAME_DIALOG;
-
- aNewDlgName = rDocument.createObjectName( E_DIALOGS, aLibName );
- }
- else if( RET_NO == nRet )
- {
- // RET_NO == Replace, see NameClashQueryBox::NameClashQueryBox
- eNameClashMode = CLASH_OVERWRITE_DIALOG;
- }
- else if( RET_CANCEL == nRet )
- {
- return bDone;
- }
- }
-
- BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
- if( pIDEShell == NULL )
- {
- OSL_ASSERT( pIDEShell != NULL );
- return bDone;
- }
-
- // Resource?
- ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
- Reference< task::XInteractionHandler > xDummyHandler;
- bool bReadOnly = true;
- Reference< XStringResourceWithLocation > xImportStringResource =
- StringResourceWithLocation::create( xContext, aBasePath, bReadOnly,
- aLocale, aXmlDlgName, ::rtl::OUString(), xDummyHandler );
-
- Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales();
- sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength();
-
- Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
- Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
- sal_Int32 nLibLocaleCount = 0;
- Sequence< lang::Locale > aLibLocaleSeq;
- if( xLibStringResourceManager.is() )
- {
- aLibLocaleSeq = xLibStringResourceManager->getLocales();
- nLibLocaleCount = aLibLocaleSeq.getLength();
- }
-
- // Check language matches
- std::vector< lang::Locale > aOnlyInImportLanguages =
- implGetLanguagesOnlyContainedInFirstSeq( aImportLocaleSeq, aLibLocaleSeq );
- int nOnlyInImportLanguageCount = aOnlyInImportLanguages.size();
-
- // For now: Keep languages from lib
- bool bLibLocalized = (nLibLocaleCount > 0);
- bool bImportLocalized = (nImportLocaleCount > 0);
-
- bool bAddDialogLanguagesToLib = false;
- if( nOnlyInImportLanguageCount > 0 )
- {
- String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_MISMATCH_TITLE ) );
- String aQueryBoxText( IDEResId( RID_STR_DLGIMP_MISMATCH_TEXT ) );
- LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
- USHORT nRet = aQueryBox.Execute();
- if( RET_YES == nRet )
- {
- // RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
- bAddDialogLanguagesToLib = true;
- }
- // RET_NO == Omit, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
- // -> nothing to do here
- //else if( RET_NO == nRet )
- //{
- //}
- else if( RET_CANCEL == nRet )
- {
- return bDone;
- }
- }
-
- if( bImportLocalized )
- {
- bool bCopyResourcesForDialog = true;
- if( bAddDialogLanguagesToLib )
- {
- LocalizationMgr* pCurMgr = pIDEShell->GetCurLocalizationMgr();
-
- lang::Locale aFirstLocale;
- aFirstLocale = aOnlyInImportLanguages[0];
- if( nOnlyInImportLanguageCount > 1 )
- {
- // Check if import default belongs to only import languages and use it then
- lang::Locale aImportDefaultLocale = xImportStringResource->getDefaultLocale();
- lang::Locale aTmpLocale;
- for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i )
- {
- aTmpLocale = aOnlyInImportLanguages[i];
- if( localesAreEqual( aImportDefaultLocale, aTmpLocale ) )
- {
- aFirstLocale = aImportDefaultLocale;
- break;
- }
- }
- }
-
- Sequence< lang::Locale > aFirstLocaleSeq( 1 );
- aFirstLocaleSeq[0] = aFirstLocale;
- pCurMgr->handleAddLocales( aFirstLocaleSeq );
-
- if( nOnlyInImportLanguageCount > 1 )
- {
- Sequence< lang::Locale > aRemainingLocaleSeq( nOnlyInImportLanguageCount - 1 );
- lang::Locale aTmpLocale;
- int iSeq = 0;
- for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i )
- {
- aTmpLocale = aOnlyInImportLanguages[i];
- if( !localesAreEqual( aFirstLocale, aTmpLocale ) )
- aRemainingLocaleSeq[iSeq++] = aTmpLocale;
- }
- pCurMgr->handleAddLocales( aRemainingLocaleSeq );
- }
- }
- else if( !bLibLocalized )
- {
- Reference< resource::XStringResourceManager > xImportStringResourceManager( xImportStringResource, UNO_QUERY );
- LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResourceManager );
- bCopyResourcesForDialog = false;
- }
-
- if( bCopyResourcesForDialog )
- {
- Reference< resource::XStringResourceResolver > xImportStringResourceResolver( xImportStringResource, UNO_QUERY );
- LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName,
- xLibStringResourceManager, xImportStringResourceResolver );
- }
- }
- else if( bLibLocalized )
- {
- LocalizationMgr::setResourceIDsForDialog( xDialogModel, xLibStringResourceManager );
- }
-
-
- LocalizationMgr::setStringResourceAtDialog( rDocument, aLibName, aNewDlgName, xDialogModel );
-
- if( eNameClashMode == CLASH_OVERWRITE_DIALOG )
- {
- if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) )
- {
- IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, FALSE, TRUE );
- if( pDlgWin != NULL )
- pIDEShell->RemoveWindow( pDlgWin, TRUE );
- BasicIDE::MarkDocumentModified( rDocument );
- }
- else
- {
- // TODO: Assertion?
- return bDone;
- }
- }
-
- if( eNameClashMode == CLASH_RENAME_DIALOG )
- {
- bool bRenamed = false;
- if( xDialogModelPropSet.is() )
- {
- try
- {
- Any aXmlDialogNameAny;
- aXmlDialogNameAny <<= ::rtl::OUString( aNewDlgName );
- xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, aXmlDialogNameAny );
- bRenamed = true;
- }
- catch( beans::UnknownPropertyException& )
- {}
- }
-
-
- if( bRenamed )
- {
- LocalizationMgr::renameStringResourceIDs( rDocument, aLibName, aNewDlgName, xDialogModel );
- }
- else
- {
- // TODO: Assertion?
- return bDone;
- }
- }
-
- Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext );
- bool bSuccess = rDocument.insertDialog( aLibName, aNewDlgName, xISP );
- if( bSuccess )
- {
- DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName );
- pIDEShell->SetCurWindow( pNewDlgWin, TRUE );
- }
-
- bDone = TRUE;
- }
- catch( Exception& )
- {}
- }
-
- return bDone;
-}
-
-BOOL DialogWindow::ImportDialog()
-{
- DBG_CHKTHIS( DialogWindow, 0 );
-
- const ScriptDocument& rDocument = GetDocument();
- String aLibName = GetLibName();
- BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
- return bRet;
-}
-
+extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
+ const ::com::sun::star::lang::Locale& rLocaleRight );
+
+std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq
+ ( Sequence< lang::Locale > aFirstSeq, Sequence< lang::Locale > aSecondSeq )
+{
+ std::vector< lang::Locale > avRet;
+
+ const lang::Locale* pFirst = aFirstSeq.getConstArray();
+ const lang::Locale* pSecond = aSecondSeq.getConstArray();
+ sal_Int32 nFirstCount = aFirstSeq.getLength();
+ sal_Int32 nSecondCount = aSecondSeq.getLength();
+
+ for( sal_Int32 iFirst = 0 ; iFirst < nFirstCount ; iFirst++ )
+ {
+ const lang::Locale& rFirstLocale = pFirst[ iFirst ];
+
+ bool bAlsoContainedInSecondSeq = false;
+ for( sal_Int32 iSecond = 0 ; iSecond < nSecondCount ; iSecond++ )
+ {
+ const lang::Locale& rSecondLocale = pSecond[ iSecond ];
+
+ bool bMatch = localesAreEqual( rFirstLocale, rSecondLocale );
+ if( bMatch )
+ {
+ bAlsoContainedInSecondSeq = true;
+ break;
+ }
+ }
+
+ if( !bAlsoContainedInSecondSeq )
+ avRet.push_back( rFirstLocale );
+ }
+
+ return avRet;
+}
+
+
+class NameClashQueryBox : public MessBox
+{
+public:
+ NameClashQueryBox( Window* pParent,
+ const XubString& rTitle, const XubString& rMessage );
+};
+
+NameClashQueryBox::NameClashQueryBox( Window* pParent,
+ const XubString& rTitle, const XubString& rMessage )
+ : MessBox( pParent, 0, rTitle, rMessage )
+{
+ if ( rTitle.Len() )
+ SetText( rTitle );
+
+ maMessText = rMessage;
+
+ AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_RENAME ) ), RET_YES,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+ AddButton( String( IDEResId( RID_STR_DLGIMP_CLASH_REPLACE ) ), RET_NO, 0 );
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
+}
+
+
+class LanguageMismatchQueryBox : public MessBox
+{
+public:
+ LanguageMismatchQueryBox( Window* pParent,
+ const XubString& rTitle, const XubString& rMessage );
+};
+
+LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
+ const XubString& rTitle, const XubString& rMessage )
+ : MessBox( pParent, 0, rTitle, rMessage )
+{
+ if ( rTitle.Len() )
+ SetText( rTitle );
+
+ maMessText = rMessage;
+ AddButton( String( IDEResId( RID_STR_DLGIMP_MISMATCH_ADD ) ), RET_YES,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+ AddButton( String( IDEResId( RID_STR_DLGIMP_MISMATCH_OMIT ) ), RET_NO, 0 );
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+ AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 4 );
+
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
+}
+
+BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName )
+{
+ BOOL bDone = FALSE;
+
+ Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
+ Reference < XFilePicker > xFP;
+ if( xMSF.is() )
+ {
+ Sequence <Any> aServiceType(1);
+ aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
+ xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
+ }
+
+ Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
+ xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False);
+ Any aValue;
+ aValue <<= (sal_Bool) sal_True;
+ xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
+
+ String aCurPath( rCurPath );
+ if ( aCurPath.Len() )
+ xFP->setDisplayDirectory ( aCurPath );
+
+ String aDialogStr( IDEResId( RID_STR_STDDIALOGNAME ) );
+ Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
+ xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
+ xFltMgr->appendFilter( String( IDEResId( RID_STR_FILTER_ALLFILES ) ), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
+ xFltMgr->setCurrentFilter( aDialogStr );
+
+ if( xFP->execute() == RET_OK )
+ {
+ Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
+ aCurPath = aPaths[0];
+
+ ::rtl::OUString aBasePath;
+ ::rtl::OUString aOUCurPath( aCurPath );
+ sal_Int32 iSlash = aOUCurPath.lastIndexOf( '/' );
+ if( iSlash != -1 )
+ aBasePath = aOUCurPath.copy( 0, iSlash + 1 );
+
+ try
+ {
+ // create dialog model
+ Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
+ ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY_THROW );
+
+ Reference< XSimpleFileAccess > xSFI( xMSF->createInstance
+ ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY_THROW );
+
+ Reference< XInputStream > xInput;
+ if( xSFI->exists( aCurPath ) )
+ xInput = xSFI->openFileRead( aCurPath );
+
+ Reference< XComponentContext > xContext;
+ Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
+ OSL_ASSERT( xProps.is() );
+ OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
+ ::xmlscript::importDialogModel( xInput, xDialogModel, xContext );
+
+ String aXmlDlgName;
+ Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
+ if( xDialogModelPropSet.is() )
+ {
+ try
+ {
+ Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME );
+ ::rtl::OUString aOUXmlDialogName;
+ aXmlDialogNameAny >>= aOUXmlDialogName;
+ aXmlDlgName = aOUXmlDialogName;
+ }
+ catch( beans::UnknownPropertyException& )
+ {}
+ }
+ bool bValidName = (aXmlDlgName.Len() != 0);
+ OSL_ASSERT( bValidName );
+ if( !bValidName )
+ return bDone;
+
+ bool bDialogAlreadyExists = rDocument.hasDialog( aLibName, aXmlDlgName );
+
+ String aNewDlgName = aXmlDlgName;
+ enum NameClashMode
+ {
+ NO_CLASH,
+ CLASH_OVERWRITE_DIALOG,
+ CLASH_RENAME_DIALOG,
+ };
+ NameClashMode eNameClashMode = NO_CLASH;
+ if( bDialogAlreadyExists )
+ {
+ String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_CLASH_TITLE ) );
+ String aQueryBoxText( IDEResId( RID_STR_DLGIMP_CLASH_TEXT ) );
+ aQueryBoxText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "$(ARG1)" ) ), aXmlDlgName );
+
+ NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
+ USHORT nRet = aQueryBox.Execute();
+ if( RET_YES == nRet )
+ {
+ // RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox
+ eNameClashMode = CLASH_RENAME_DIALOG;
+
+ aNewDlgName = rDocument.createObjectName( E_DIALOGS, aLibName );
+ }
+ else if( RET_NO == nRet )
+ {
+ // RET_NO == Replace, see NameClashQueryBox::NameClashQueryBox
+ eNameClashMode = CLASH_OVERWRITE_DIALOG;
+ }
+ else if( RET_CANCEL == nRet )
+ {
+ return bDone;
+ }
+ }
+
+ BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
+ if( pIDEShell == NULL )
+ {
+ OSL_ASSERT( pIDEShell != NULL );
+ return bDone;
+ }
+
+ // Resource?
+ ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
+ Reference< task::XInteractionHandler > xDummyHandler;
+ bool bReadOnly = true;
+ Reference< XStringResourceWithLocation > xImportStringResource =
+ StringResourceWithLocation::create( xContext, aBasePath, bReadOnly,
+ aLocale, aXmlDlgName, ::rtl::OUString(), xDummyHandler );
+
+ Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales();
+ sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength();
+
+ Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) );
+ Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
+ sal_Int32 nLibLocaleCount = 0;
+ Sequence< lang::Locale > aLibLocaleSeq;
+ if( xLibStringResourceManager.is() )
+ {
+ aLibLocaleSeq = xLibStringResourceManager->getLocales();
+ nLibLocaleCount = aLibLocaleSeq.getLength();
+ }
+
+ // Check language matches
+ std::vector< lang::Locale > aOnlyInImportLanguages =
+ implGetLanguagesOnlyContainedInFirstSeq( aImportLocaleSeq, aLibLocaleSeq );
+ int nOnlyInImportLanguageCount = aOnlyInImportLanguages.size();
+
+ // For now: Keep languages from lib
+ bool bLibLocalized = (nLibLocaleCount > 0);
+ bool bImportLocalized = (nImportLocaleCount > 0);
+
+ bool bAddDialogLanguagesToLib = false;
+ if( nOnlyInImportLanguageCount > 0 )
+ {
+ String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_MISMATCH_TITLE ) );
+ String aQueryBoxText( IDEResId( RID_STR_DLGIMP_MISMATCH_TEXT ) );
+ LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
+ USHORT nRet = aQueryBox.Execute();
+ if( RET_YES == nRet )
+ {
+ // RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
+ bAddDialogLanguagesToLib = true;
+ }
+ // RET_NO == Omit, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
+ // -> nothing to do here
+ //else if( RET_NO == nRet )
+ //{
+ //}
+ else if( RET_CANCEL == nRet )
+ {
+ return bDone;
+ }
+ }
+
+ if( bImportLocalized )
+ {
+ bool bCopyResourcesForDialog = true;
+ if( bAddDialogLanguagesToLib )
+ {
+ LocalizationMgr* pCurMgr = pIDEShell->GetCurLocalizationMgr();
+
+ lang::Locale aFirstLocale;
+ aFirstLocale = aOnlyInImportLanguages[0];
+ if( nOnlyInImportLanguageCount > 1 )
+ {
+ // Check if import default belongs to only import languages and use it then
+ lang::Locale aImportDefaultLocale = xImportStringResource->getDefaultLocale();
+ lang::Locale aTmpLocale;
+ for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i )
+ {
+ aTmpLocale = aOnlyInImportLanguages[i];
+ if( localesAreEqual( aImportDefaultLocale, aTmpLocale ) )
+ {
+ aFirstLocale = aImportDefaultLocale;
+ break;
+ }
+ }
+ }
+
+ Sequence< lang::Locale > aFirstLocaleSeq( 1 );
+ aFirstLocaleSeq[0] = aFirstLocale;
+ pCurMgr->handleAddLocales( aFirstLocaleSeq );
+
+ if( nOnlyInImportLanguageCount > 1 )
+ {
+ Sequence< lang::Locale > aRemainingLocaleSeq( nOnlyInImportLanguageCount - 1 );
+ lang::Locale aTmpLocale;
+ int iSeq = 0;
+ for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i )
+ {
+ aTmpLocale = aOnlyInImportLanguages[i];
+ if( !localesAreEqual( aFirstLocale, aTmpLocale ) )
+ aRemainingLocaleSeq[iSeq++] = aTmpLocale;
+ }
+ pCurMgr->handleAddLocales( aRemainingLocaleSeq );
+ }
+ }
+ else if( !bLibLocalized )
+ {
+ Reference< resource::XStringResourceManager > xImportStringResourceManager( xImportStringResource, UNO_QUERY );
+ LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResourceManager );
+ bCopyResourcesForDialog = false;
+ }
+
+ if( bCopyResourcesForDialog )
+ {
+ Reference< resource::XStringResourceResolver > xImportStringResourceResolver( xImportStringResource, UNO_QUERY );
+ LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName,
+ xLibStringResourceManager, xImportStringResourceResolver );
+ }
+ }
+ else if( bLibLocalized )
+ {
+ LocalizationMgr::setResourceIDsForDialog( xDialogModel, xLibStringResourceManager );
+ }
+
+
+ LocalizationMgr::setStringResourceAtDialog( rDocument, aLibName, aNewDlgName, xDialogModel );
+
+ if( eNameClashMode == CLASH_OVERWRITE_DIALOG )
+ {
+ if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) )
+ {
+ IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, FALSE, TRUE );
+ if( pDlgWin != NULL )
+ pIDEShell->RemoveWindow( pDlgWin, TRUE );
+ BasicIDE::MarkDocumentModified( rDocument );
+ }
+ else
+ {
+ // TODO: Assertion?
+ return bDone;
+ }
+ }
+
+ if( eNameClashMode == CLASH_RENAME_DIALOG )
+ {
+ bool bRenamed = false;
+ if( xDialogModelPropSet.is() )
+ {
+ try
+ {
+ Any aXmlDialogNameAny;
+ aXmlDialogNameAny <<= ::rtl::OUString( aNewDlgName );
+ xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, aXmlDialogNameAny );
+ bRenamed = true;
+ }
+ catch( beans::UnknownPropertyException& )
+ {}
+ }
+
+
+ if( bRenamed )
+ {
+ LocalizationMgr::renameStringResourceIDs( rDocument, aLibName, aNewDlgName, xDialogModel );
+ }
+ else
+ {
+ // TODO: Assertion?
+ return bDone;
+ }
+ }
+
+ Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext );
+ bool bSuccess = rDocument.insertDialog( aLibName, aNewDlgName, xISP );
+ if( bSuccess )
+ {
+ DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName );
+ pIDEShell->SetCurWindow( pNewDlgWin, TRUE );
+ }
+
+ bDone = TRUE;
+ }
+ catch( Exception& )
+ {}
+ }
+
+ return bDone;
+}
+
+BOOL DialogWindow::ImportDialog()
+{
+ DBG_CHKTHIS( DialogWindow, 0 );
+
+ const ScriptDocument& rDocument = GetDocument();
+ String aLibName = GetLibName();
+ BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
+ return bRet;
+}
+
DlgEdModel* DialogWindow::GetModel() const
{
return pEditor ? pEditor->GetModel() : NULL;
@@ -1368,9 +1368,14 @@ void DialogWindow::Deactivating()
BasicIDE::MarkDocumentModified( GetDocument() );
}
-void DialogWindow::PrintData( Printer* pPrinter )
+sal_Int32 DialogWindow::countPages( Printer* pPrinter )
+{
+ return pEditor->countPages( pPrinter );
+}
+
+void DialogWindow::printPage( sal_Int32 nPage, Printer* pPrinter )
{
- pEditor->PrintData( pPrinter, CreateQualifiedName() );
+ pEditor->printPage( nPage, pPrinter, CreateQualifiedName() );
}
void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index b821c7ca51c6..044c61d5cc21 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -36,7 +36,7 @@
#define GLOBALOVERFLOW2
#include <basic/sbx.hxx>
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <ide_pch.hxx>
#define _SOLAR__PRIVATE 1
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 74e1d59aad4d..eb59ca4f082b 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -38,8 +38,7 @@
#include <ide_pch.hxx>
#include <basic/sbx.hxx>
-
-#define _SOLAR__PRIVATE 1
+#include "basicrenderable.hxx"
#include <com/sun/star/frame/XTitle.hpp>
@@ -85,6 +84,12 @@ IMPL_LINK( BasicIDEShell, ObjectDialogInsertHdl, ObjectCatalog *, pObjCat )
}
*/
+Reference< view::XRenderable > BasicIDEShell::GetRenderable()
+{
+ return Reference< view::XRenderable >( new basicide::BasicRenderable( pCurWin ) );
+}
+
+#if 0
USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog )
{
if ( pCurWin )
@@ -98,6 +103,7 @@ USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, Print
}
return 0;
}
+#endif
BOOL BasicIDEShell::HasSelection( BOOL /* bText */ ) const
{
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index e6b147cc46c8..2d2e0f6a5693 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -52,7 +52,7 @@
#define _SOLAR__PRIVATE 1
#include <basic/sbx.hxx>
-#include <svtools/hint.hxx>
+#include <svl/hint.hxx>
#include <tools/diagnose_ex.h>
#include <basidesh.hrc>
#include <basidesh.hxx>
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index e4abb3fad92e..f7ddd62e144a 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -36,7 +36,7 @@
#include <vector>
#include <algorithm>
#include <basic/sbx.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <basobj.hxx>
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 8ef06af7dc25..a1887e0ea7a0 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -36,7 +36,7 @@
#include <vector>
#include <algorithm>
#include <basic/sbx.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <iderdll.hxx>
#include <iderdll2.hxx>
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index d10bdbc0e7f2..ce96ca3892a9 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -37,7 +37,7 @@
#define _SVICNVW_HXX
#include <svtools/svtreebx.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <basic/sbstar.hxx>
#include <sbxitem.hxx>
#include "basobj.hxx"
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 3b64b11b9abc..c44d3d00fdf0 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -207,13 +207,6 @@ void __EXPORT IDEBaseWindow::UpdateData()
}
-
-void __EXPORT IDEBaseWindow::PrintData( Printer* )
-{
-}
-
-
-
String __EXPORT IDEBaseWindow::GetTitle()
{
return String();
diff --git a/basctl/source/basicide/brkdlg.hrc b/basctl/source/basicide/brkdlg.hrc
index aaf243b5475a..1fcfc9286cff 100644
--- a/basctl/source/basicide/brkdlg.hrc
+++ b/basctl/source/basicide/brkdlg.hrc
@@ -30,7 +30,7 @@
#ifndef _BRKDLG_HRC
#define _BRKDLG_HRC
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#define RID_BASICIDE_BREAKPOINTDLG ( RID_BASICIDE_START + 80 )
diff --git a/basctl/source/basicide/ide_pch.hxx b/basctl/source/basicide/ide_pch.hxx
index 4029e45fe082..9f294b87577d 100644
--- a/basctl/source/basicide/ide_pch.hxx
+++ b/basctl/source/basicide/ide_pch.hxx
@@ -33,11 +33,11 @@
#include <vcl/msgbox.hxx>
#include <vcl/menu.hxx>
-#include <svtools/svarray.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/svarray.hxx>
+#include <svl/itemset.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
#define _BASIC_TEXTPORTIONS
#include <basic/sbdef.hxx>
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index cf8ed498d474..5f2ed2301758 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -41,7 +41,7 @@
#include <sfx2/genlink.hxx>
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#include <iderdll.hxx>
#include <iderdll2.hxx>
#include <iderid.hxx>
diff --git a/basctl/source/basicide/macrodlg.hrc b/basctl/source/basicide/macrodlg.hrc
index 6702af8febab..23005cddd294 100644
--- a/basctl/source/basicide/macrodlg.hrc
+++ b/basctl/source/basicide/macrodlg.hrc
@@ -30,7 +30,7 @@
#ifndef _MACRODLG_HRC
#define _MACRODLG_HRC
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#define RID_MACROCHOOSER ( RID_BASICIDE_START + 50 )
#define RID_STR_BTNDEL ( RID_BASICIDE_START + 51 )
diff --git a/basctl/source/basicide/makefile.mk b/basctl/source/basicide/makefile.mk
index 8766473d8157..c5222951da6c 100644
--- a/basctl/source/basicide/makefile.mk
+++ b/basctl/source/basicide/makefile.mk
@@ -51,7 +51,8 @@ CDEFS+=-DBASICDEBUG
# --- Allgemein ----------------------------------------------------------
-EXCEPTIONSFILES=$(SLO)$/scriptdocument.obj \
+EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \
+ $(SLO)$/scriptdocument.obj \
$(SLO)$/basidesh.obj \
$(SLO)$/basides1.obj \
$(SLO)$/basides2.obj \
@@ -84,7 +85,7 @@ SLOFILES = $(EXCEPTIONSFILES) \
$(SLO)$/objdlg.obj \
SRS1NAME=$(TARGET)
-SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src tbxctl.src
+SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src tbxctl.src basicprint.src
.INCLUDE : target.mk
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index f0143cc8517b..ea5f7cec9878 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -72,7 +72,7 @@
#include "com/sun/star/ucb/XCommandEnvironment.hpp"
#include <com/sun/star/ucb/NameClash.hpp>
#include "com/sun/star/packages/manifest/XManifestWriter.hpp"
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/util/VetoException.hpp>
diff --git a/basctl/source/basicide/moduldlg.hrc b/basctl/source/basicide/moduldlg.hrc
index 88f167167d42..755e382cf618 100644
--- a/basctl/source/basicide/moduldlg.hrc
+++ b/basctl/source/basicide/moduldlg.hrc
@@ -30,7 +30,7 @@
#ifndef _MODULDLG_HRC
#define _MODULDLG_HRC
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#define RID_STR_LIB 1
#define RID_TRLBOX 2
diff --git a/basctl/source/basicide/moptions.hrc b/basctl/source/basicide/moptions.hrc
index a03a90c2d59a..ca1e43e080fb 100644
--- a/basctl/source/basicide/moptions.hrc
+++ b/basctl/source/basicide/moptions.hrc
@@ -30,7 +30,7 @@
#ifndef _MOPTIONS_HRC
#define _MOPTIONS_HRC
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#define RID_MACROOPTIONS ( RID_BASICIDE_START + 55 )
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 55bc15810a2b..d71f1b2929d7 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -300,7 +300,7 @@ void ObjectCatalogToolBox_Impl::DataChanged(DataChangedEvent const & rDCEvt)
void ObjectCatalogToolBox_Impl::setImages()
{
- bool bHC = GetDisplayBackground().GetColor().IsDark();
+ bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
if (bHC != m_bHighContrast)
{
SetImageList(bHC ? m_aImagesHighContrast : m_aImagesNormal);
diff --git a/basctl/source/basicide/objdlg.hrc b/basctl/source/basicide/objdlg.hrc
index 7004541ea465..490a38a5c8fd 100644
--- a/basctl/source/basicide/objdlg.hrc
+++ b/basctl/source/basicide/objdlg.hrc
@@ -30,7 +30,7 @@
#ifndef _OBJDLG_HRC
#define _OBJDLG_HRC
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#define RID_BASICIDE_OBJCAT ( RID_BASICIDE_START + 70 )
#define RID_FT_MACRODESCR 8
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index b9ffe708e6fa..a87ad521c2f5 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -70,7 +70,7 @@
#include <xmlscript/xmldlg_imexp.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <unotools/collatorwrapper.hxx>
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index e2af9e0346a1..bac7e8854cf6 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -42,7 +42,7 @@
#include <tbxctl.hrc>
#include <idetemp.hxx>
#include <sfx2/imagemgr.hxx>
-#include <svtools/aeitem.hxx>
+#include <svl/aeitem.hxx>
#include <vcl/toolbox.hxx>
using namespace ::com::sun::star::uno;
@@ -186,7 +186,7 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState,
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- GetToolBox().GetDisplayBackground().GetColor().IsDark() );
+ GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() );
ToolBox& rBox = GetToolBox();
rBox.SetItemImage(GetId(), aImage);
nLastSlot = nLastEnum;
diff --git a/basctl/source/basicide/tbxctl.hrc b/basctl/source/basicide/tbxctl.hrc
index 1811614d9d37..b26570b5b8bf 100644
--- a/basctl/source/basicide/tbxctl.hrc
+++ b/basctl/source/basicide/tbxctl.hrc
@@ -27,7 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#define RID_TBXCONTROLS ( RID_BASICIDE_START + 65 )
#define RID_TOOLBOX ( RID_BASICIDE_START + 66 )
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 6d1080ed659b..80b9c26e07b4 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -46,7 +46,7 @@
#include <iderdll.hxx>
#include <vcl/scrbar.hxx>
#include <tools/shl.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <sfx2/viewfrm.hxx>
#ifndef _SVX_SVXIDS_HRC
@@ -1283,7 +1283,20 @@ void lcl_PrintHeader( Printer* pPrinter, const String& rTitle ) // not working y
//----------------------------------------------------------------------------
-void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not working yet
+sal_Int32 DlgEditor::countPages( Printer* )
+{
+ return 1;
+}
+
+void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const String& rTitle )
+{
+ if( nPage == 0 )
+ Print( pPrinter, rTitle );
+}
+
+//----------------------------------------------------------------------------
+
+void DlgEditor::Print( Printer* pPrinter, const String& rTitle ) // not working yet
{
if( pDlgEdView )
{
@@ -1304,8 +1317,6 @@ void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not w
aPaperSz.Width() -= (LMARGPRN+RMARGPRN);
aPaperSz.Height() -= (TMARGPRN+BMARGPRN);
- pPrinter->StartPage();
-
lcl_PrintHeader( pPrinter, rTitle );
Bitmap aDlg;
@@ -1350,8 +1361,6 @@ void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not w
pPrinter->DrawBitmap( aPosOffs, aOutputSz, aDlg );
- pPrinter->EndPage();
-
pPrinter->SetMapMode( aOldMap );
pPrinter->SetFont( aOldFont );
}
diff --git a/basctl/source/inc/accessibledialogwindow.hxx b/basctl/source/inc/accessibledialogwindow.hxx
index 8552f9f09e10..db446d479ead 100644
--- a/basctl/source/inc/accessibledialogwindow.hxx
+++ b/basctl/source/inc/accessibledialogwindow.hxx
@@ -37,7 +37,7 @@
#include <comphelper/accessiblecomponenthelper.hxx>
#include <cppuhelper/implbase3.hxx>
#include <tools/link.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <vector>
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 45eace9f6137..7920e9ebdfc6 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -36,7 +36,7 @@
#endif
#include <bastypes.hxx>
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/lstbox.hxx>
@@ -110,7 +110,10 @@ public:
virtual BOOL IsPasteAllowed();
virtual SfxUndoManager* GetUndoManager();
- virtual void PrintData( Printer* pPrinter );
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter );
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual void Deactivating();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index d8e58b968398..f4f118b0b277 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -199,7 +199,9 @@ public:
SfxUndoManager* GetUndoManager();
- virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
+ virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
+
+ // virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
virtual SfxPrinter* GetPrinter( BOOL bCreate );
virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual String GetSelectionText( BOOL bCompleteWords );
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index c917de5a6dee..a2911dcccb8f 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -32,7 +32,7 @@
#include "scriptdocument.hxx"
#include <tools/string.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
#include <com/sun/star/io/XInputStreamProvider.hpp>
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 0c542ac405ad..a9540762172d 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -205,9 +205,13 @@ public:
virtual void StoreData();
virtual void UpdateData();
- virtual void PrintData( Printer* pPrinter );
virtual BOOL CanClose();
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter ) = 0;
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0;
+
virtual String GetTitle();
String CreateQualifiedName();
virtual BasicEntryDescriptor CreateEntryDescriptor() = 0;
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 908331b0ad63..001c689a78a5 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -38,8 +38,8 @@
#include <tools/link.hxx>
#include <tools/gen.hxx>
#include <vcl/timer.hxx>
-#include <svtools/hint.hxx>
-#include <svtools/brdcst.hxx>
+#include <svl/hint.hxx>
+#include <svl/brdcst.hxx>
#define DLGED_PAGE_WIDTH_MIN 1280
#define DLGED_PAGE_HEIGHT_MIN 1024
@@ -102,6 +102,8 @@ private:
DECL_LINK( PaintTimeout, Timer * );
DECL_LINK( MarkTimeout, Timer * );
+ void Print( Printer* pPrinter, const String& rTitle );
+
protected:
ScrollBar* pHScroll;
ScrollBar* pVScroll;
@@ -199,7 +201,8 @@ public:
void ShowProperties();
void UpdatePropertyBrowserDelayed();
- void PrintData( Printer*, const String& rTitle ); // not working yet
+ sal_Int32 countPages( Printer* pPrinter );
+ void printPage( sal_Int32 nPage, Printer* pPrinter, const String& );
bool AdjustPageSize();
diff --git a/basctl/source/inc/dlgresid.hrc b/basctl/source/inc/dlgresid.hrc
index 928434749862..b92be11b286f 100644
--- a/basctl/source/inc/dlgresid.hrc
+++ b/basctl/source/inc/dlgresid.hrc
@@ -33,7 +33,7 @@
// include -----------------------------------------------------------
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
// Dialog Control Id's -----------------------------------------------------------
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index 8e3fa615d960..f9be90b38b4b 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -37,8 +37,8 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <comphelper/composedprops.hxx>
#include <sfx2/basedlgs.hxx>
-#include <svtools/brdcst.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/lstner.hxx>
#include <sfx2/childwin.hxx>
#include <svx/svdmark.hxx>
diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx
index 654e283128fb..b1192b51d9bf 100644
--- a/basctl/source/inc/sbxitem.hxx
+++ b/basctl/source/inc/sbxitem.hxx
@@ -31,7 +31,7 @@
#define _SBXITEM_HXX
#include "scriptdocument.hxx"
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
const USHORT BASICIDE_TYPE_UNKNOWN = 0;
const USHORT BASICIDE_TYPE_SHELL = 1;
diff --git a/bean/com/sun/star/beans/makefile.mk b/bean/com/sun/star/beans/makefile.mk
index 1c38ff105ec9..cb4be6263a37 100644
--- a/bean/com/sun/star/beans/makefile.mk
+++ b/bean/com/sun/star/beans/makefile.mk
@@ -44,7 +44,7 @@ dummy:
.ELSE # "$(OS)"=="MACOSX"
-JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar
+JARFILES = ridl.jar unoil.jar jurt.jar juh.jar
# --- Sources --------------------------------------------------------
diff --git a/bean/com/sun/star/comp/beans/makefile.mk b/bean/com/sun/star/comp/beans/makefile.mk
index 983991fd0c70..2faff8ac14ae 100644
--- a/bean/com/sun/star/comp/beans/makefile.mk
+++ b/bean/com/sun/star/comp/beans/makefile.mk
@@ -44,7 +44,7 @@ dummy:
.ELSE # "$(OS)"=="MACOSX"
-JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar
+JARFILES = ridl.jar unoil.jar jurt.jar juh.jar
# --- Sources --------------------------------------------------------
diff --git a/bean/prj/build.lst b/bean/prj/build.lst
index 06b806b613a5..3767e8fff387 100644
--- a/bean/prj/build.lst
+++ b/bean/prj/build.lst
@@ -1,4 +1,4 @@
-ob bean : javaunohelper sandbox jurt ridljar unoil offapi udkapi NULL
+ob bean : javaunohelper jurt ridljar unoil offapi udkapi NULL
ob bean\com\sun\star\comp\beans nmake - all ob_beanjava NULL
ob bean\com\sun\star\beans nmake - all ob_legacybeanjava ob_beanjava NULL
ob bean\native\win32 nmake - n ob_beanwin32 NULL
diff --git a/bean/qa/complex/makefile.mk b/bean/qa/complex/makefile.mk
index dbf6e8362e1b..4fb1ce0ea8b2 100644
--- a/bean/qa/complex/makefile.mk
+++ b/bean/qa/complex/makefile.mk
@@ -38,7 +38,7 @@ PACKAGE = complex
#----- compile .java files -----------------------------------------
-JARFILES = officebean.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = OOoBeanTest.java ScreenComparer.java WriterFrame.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff --git a/bean/test/applet/oooapplet/makefile.mk b/bean/test/applet/oooapplet/makefile.mk
index 5056e0bbb4c6..8abfe7131aed 100644
--- a/bean/test/applet/oooapplet/makefile.mk
+++ b/bean/test/applet/oooapplet/makefile.mk
@@ -38,7 +38,7 @@ PACKAGE = oooapplet
#----- compile .java files -----------------------------------------
-JARFILES = officebean.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
+JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
JAVAFILES = OOoViewer.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff --git a/bean/test/makefile.mk b/bean/test/makefile.mk
index f214fe4f24cc..5a29c4b1033c 100644
--- a/bean/test/makefile.mk
+++ b/bean/test/makefile.mk
@@ -38,7 +38,7 @@ PACKAGE = test
#----- compile .java files -----------------------------------------
-JARFILES = officebean.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
+JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar
JAVAFILES = Test.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff --git a/crashrep/source/unx/res.cxx b/crashrep/source/unx/res.cxx
index 63910d606a09..54968bb2259d 100755
--- a/crashrep/source/unx/res.cxx
+++ b/crashrep/source/unx/res.cxx
@@ -28,13 +28,6 @@
*
************************************************************************/
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
-
#include <interface.hxx>
#include <cstdio>
#include <hash_map>
@@ -49,7 +42,7 @@ static string getResFileName( const char* progname )
string aRet = progname;
size_t pos = aRet.rfind( '/' );
// FIXME: search PATH if necessary
- assert( pos != string::npos );
+ OSL_ASSERT( pos != string::npos );
aRet.erase( pos );
aRet.append( "/resource/crash_dump.res" );
diff --git a/cui/inc/makefile.mk b/cui/inc/makefile.mk
new file mode 100644
index 000000000000..74e38ff96c51
--- /dev/null
+++ b/cui/inc/makefile.mk
@@ -0,0 +1,52 @@
+#*************************************************************************
+#
+# 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
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.5 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=cui
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!=""
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
diff --git a/cui/inc/pch/precompiled_cui.cxx b/cui/inc/pch/precompiled_cui.cxx
new file mode 100644
index 000000000000..2dcd495e1647
--- /dev/null
+++ b/cui/inc/pch/precompiled_cui.cxx
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: precompiled_svx.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_cui.hxx"
+
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
new file mode 100644
index 000000000000..1704b8281d86
--- /dev/null
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -0,0 +1,968 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: precompiled_svx.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): Generated on 2006-09-01 17:50:08.279739
+#if 0
+#ifdef PRECOMPILED_HEADERS
+//---MARKER---
+#include "sal/config.h"
+#include "avmedia/mediaitem.hxx"
+#include "avmedia/mediawindow.hxx"
+#include "basegfx/matrix/b2dhommatrix.hxx"
+#include "basegfx/numeric/ftools.hxx"
+#include "basegfx/point/b2dpoint.hxx"
+#include "basegfx/point/b3dpoint.hxx"
+#include "basegfx/polygon/b2dlinegeometry.hxx"
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolygontools.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygontools.hxx"
+#include "basegfx/polygon/b3dpolygon.hxx"
+#include "basegfx/polygon/b3dpolypolygon.hxx"
+#include "basegfx/polygon/b3dpolypolygontools.hxx"
+#include "basegfx/range/b2drange.hxx"
+#include "basegfx/vector/b2dvector.hxx"
+#include "basegfx/vector/b3dvector.hxx"
+#include "basic/basmgr.hxx"
+#include "basic/sbmod.hxx"
+#include "basic/sbuno.hxx"
+#include "basic/sbx.hxx"
+#include "basic/sbxvar.hxx"
+#include "boost/scoped_ptr.hpp"
+#include "boost/shared_ptr.hpp"
+#include "boost/spirit/core.hpp"
+#include "bootstrp/sstring.hxx"
+#include "com/sun/star/accessibility/AccessibleEventId.hpp"
+#include "com/sun/star/accessibility/AccessibleEventObject.hpp"
+#include "com/sun/star/accessibility/AccessibleRelationType.hpp"
+#include "com/sun/star/accessibility/AccessibleRole.hpp"
+#include "com/sun/star/accessibility/AccessibleStateType.hpp"
+#include "com/sun/star/accessibility/AccessibleTextType.hpp"
+#include "com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp"
+#include "com/sun/star/accessibility/TextSegment.hpp"
+#include "com/sun/star/accessibility/XAccessible.hpp"
+#include "com/sun/star/accessibility/XAccessibleAction.hpp"
+#include "com/sun/star/accessibility/XAccessibleContext.hpp"
+#include "com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp"
+#include "com/sun/star/accessibility/XAccessibleEventListener.hpp"
+#include "com/sun/star/accessibility/XAccessibleImage.hpp"
+#include "com/sun/star/accessibility/XAccessibleRelationSet.hpp"
+#include "com/sun/star/accessibility/XAccessibleSelection.hpp"
+#include "com/sun/star/accessibility/XAccessibleStateSet.hpp"
+#include "com/sun/star/accessibility/XAccessibleTable.hpp"
+#include "com/sun/star/accessibility/XAccessibleTextAttributes.hpp"
+#include "com/sun/star/accessibility/XAccessibleValue.hpp"
+#include "com/sun/star/awt/CharSet.hpp"
+#include "com/sun/star/awt/FocusChangeReason.hpp"
+#include "com/sun/star/awt/FontDescriptor.hpp"
+#include "com/sun/star/awt/FontFamily.hpp"
+#include "com/sun/star/awt/FontPitch.hpp"
+#include "com/sun/star/awt/FontSlant.hpp"
+#include "com/sun/star/awt/FontType.hpp"
+#include "com/sun/star/awt/FontWeight.hpp"
+#include "com/sun/star/awt/FontWidth.hpp"
+#include "com/sun/star/awt/Gradient.hpp"
+#include "com/sun/star/awt/GradientStyle.hpp"
+#include "com/sun/star/awt/Key.hpp"
+#include "com/sun/star/awt/KeyEvent.hpp"
+#include "com/sun/star/awt/KeyModifier.hpp"
+#include "com/sun/star/awt/LineEndFormat.hpp"
+#include "com/sun/star/awt/PosSize.hpp"
+#include "com/sun/star/awt/RasterOperation.hpp"
+#include "com/sun/star/awt/Rectangle.hpp"
+#include "com/sun/star/awt/ScrollBarOrientation.hpp"
+#include "com/sun/star/awt/SimpleFontMetric.hpp"
+#include "com/sun/star/awt/Size.hpp"
+#include "com/sun/star/awt/TextAlign.hpp"
+#include "com/sun/star/awt/VisualEffect.hpp"
+#include "com/sun/star/awt/WindowAttribute.hpp"
+#include "com/sun/star/awt/WindowDescriptor.hpp"
+#include "com/sun/star/awt/XBitmap.hpp"
+#include "com/sun/star/awt/XCheckBox.hpp"
+#include "com/sun/star/awt/XComboBox.hpp"
+#include "com/sun/star/awt/XControl.hpp"
+#include "com/sun/star/awt/XControlContainer.hpp"
+#include "com/sun/star/awt/XControlModel.hpp"
+#include "com/sun/star/awt/XDevice.hpp"
+#include "com/sun/star/awt/XFocusListener.hpp"
+#include "com/sun/star/awt/XFont.hpp"
+#include "com/sun/star/awt/XGraphics.hpp"
+#include "com/sun/star/awt/XImageConsumer.hpp"
+#include "com/sun/star/awt/XItemListener.hpp"
+#include "com/sun/star/awt/XLayoutConstrains.hpp"
+#include "com/sun/star/awt/XListBox.hpp"
+#include "com/sun/star/awt/XMouseListener.hpp"
+#include "com/sun/star/awt/XProgressMonitor.hpp"
+#include "com/sun/star/awt/XTabController.hpp"
+#include "com/sun/star/awt/XTabControllerModel.hpp"
+#include "com/sun/star/awt/XTextListener.hpp"
+#include "com/sun/star/awt/XToolkit.hpp"
+#include "com/sun/star/awt/XVclWindowPeer.hpp"
+#include "com/sun/star/awt/XWindow.hpp"
+#include "com/sun/star/awt/XWindowListener.hpp"
+#include "com/sun/star/awt/XWindowPeer.hpp"
+#include "com/sun/star/beans/NamedValue.hpp"
+#include "com/sun/star/beans/PropertyAttribute.hpp"
+#include "com/sun/star/beans/PropertyChangeEvent.hpp"
+#include "com/sun/star/beans/PropertyState.hpp"
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/beans/PropertyValues.hdl"
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/beans/XFastPropertySet.hpp"
+#include "com/sun/star/beans/XIntrospection.hpp"
+#include "com/sun/star/beans/XMultiPropertySet.hpp"
+#include "com/sun/star/beans/XMultiPropertyStates.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XPropertyState.hpp"
+#include "com/sun/star/chart/ChartAxisArrangeOrderType.hpp"
+#include "com/sun/star/container/ContainerEvent.hpp"
+#include "com/sun/star/container/NoSuchElementException.hpp"
+#include "com/sun/star/container/XChild.hpp"
+#include "com/sun/star/container/XContainer.hpp"
+#include "com/sun/star/container/XContainerListener.hpp"
+#include "com/sun/star/container/XContainerQuery.hpp"
+#include "com/sun/star/container/XContentEnumerationAccess.hpp"
+#include "com/sun/star/container/XEnumeration.hpp"
+#include "com/sun/star/container/XEnumerationAccess.hpp"
+#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
+#include "com/sun/star/container/XIdentifierContainer.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/container/XIndexContainer.hpp"
+#include "com/sun/star/container/XIndexReplace.hpp"
+#include "com/sun/star/container/XNameAccess.hpp"
+#include "com/sun/star/container/XNameContainer.hpp"
+#include "com/sun/star/container/XNameReplace.hpp"
+#include "com/sun/star/container/XNamed.hpp"
+#include "com/sun/star/container/XSet.hpp"
+#include "com/sun/star/datatransfer/DataFlavor.hpp"
+#include "com/sun/star/datatransfer/XTransferable.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp"
+#include "com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp"
+#include "com/sun/star/datatransfer/dnd/DNDConstants.hpp"
+#include "com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp"
+#include "com/sun/star/datatransfer/dnd/XDropTarget.hpp"
+#include "com/sun/star/document/EventObject.hpp"
+#include "com/sun/star/document/UpdateDocMode.hpp"
+#include "com/sun/star/document/XActionLockable.hpp"
+#include "com/sun/star/document/XBinaryStreamResolver.hpp"
+#include "com/sun/star/document/XDocumentInfoSupplier.hpp"
+#include "com/sun/star/document/XEmbeddedObjectResolver.hpp"
+#include "com/sun/star/document/XEventBroadcaster.hpp"
+#include "com/sun/star/document/XEventListener.hpp"
+#include "com/sun/star/document/XEventsSupplier.hpp"
+#include "com/sun/star/document/XExporter.hpp"
+#include "com/sun/star/document/XFilter.hpp"
+#include "com/sun/star/document/XGraphicObjectResolver.hpp"
+#include "com/sun/star/document/XImporter.hpp"
+#include "com/sun/star/document/XLinkTargetSupplier.hpp"
+#include "com/sun/star/document/XMimeTypeInfo.hpp"
+#include "com/sun/star/drawing/BitmapMode.hpp"
+#include "com/sun/star/drawing/CameraGeometry.hpp"
+#include "com/sun/star/drawing/CircleKind.hpp"
+#include "com/sun/star/drawing/ColorMode.hpp"
+#include "com/sun/star/drawing/ConnectionType.hpp"
+#include "com/sun/star/drawing/ConnectorType.hpp"
+#include "com/sun/star/drawing/DashStyle.hpp"
+#include "com/sun/star/drawing/Direction3D.hpp"
+#include "com/sun/star/drawing/DoubleSequence.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeParameter.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeSegment.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp"
+#include "com/sun/star/drawing/FillStyle.hpp"
+#include "com/sun/star/drawing/FlagSequence.hpp"
+#include "com/sun/star/drawing/Hatch.hpp"
+#include "com/sun/star/drawing/HomogenMatrix.hpp"
+#include "com/sun/star/drawing/HomogenMatrix3.hpp"
+#include "com/sun/star/drawing/LineDash.hpp"
+#include "com/sun/star/drawing/LineJoint.hpp"
+#include "com/sun/star/drawing/LineStyle.hpp"
+#include "com/sun/star/drawing/MeasureKind.hpp"
+#include "com/sun/star/drawing/MeasureTextHorzPos.hpp"
+#include "com/sun/star/drawing/MeasureTextVertPos.hpp"
+#include "com/sun/star/drawing/NormalsKind.hpp"
+#include "com/sun/star/drawing/PolyPolygonShape3D.hpp"
+#include "com/sun/star/drawing/PolygonFlags.hpp"
+#include "com/sun/star/drawing/PolygonKind.hpp"
+#include "com/sun/star/drawing/Position3D.hpp"
+#include "com/sun/star/drawing/ProjectionMode.hpp"
+#include "com/sun/star/drawing/RectanglePoint.hpp"
+#include "com/sun/star/drawing/ShadeMode.hpp"
+#include "com/sun/star/drawing/TextAdjust.hpp"
+#include "com/sun/star/drawing/TextAnimationDirection.hpp"
+#include "com/sun/star/drawing/TextAnimationKind.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
+#include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
+#include "com/sun/star/drawing/TextVerticalAdjust.hpp"
+#include "com/sun/star/drawing/TextureKind.hpp"
+#include "com/sun/star/drawing/TextureMode.hpp"
+#include "com/sun/star/drawing/TextureProjectionMode.hpp"
+#include "com/sun/star/drawing/XGluePointsSupplier.hpp"
+#include "com/sun/star/drawing/XShapeDescriptor.hpp"
+#include "com/sun/star/embed/Aspects.hpp"
+#include "com/sun/star/embed/ElementModes.hpp"
+#include "com/sun/star/embed/EmbedMisc.hpp"
+#include "com/sun/star/embed/EmbedStates.hpp"
+#include "com/sun/star/embed/EntryInitModes.hpp"
+#include "com/sun/star/embed/NoVisualAreaSizeException.hpp"
+#include "com/sun/star/embed/XEmbedObjectCreator.hpp"
+#include "com/sun/star/embed/XEmbedObjectFactory.hpp"
+#include "com/sun/star/embed/XEmbedPersist.hpp"
+#include "com/sun/star/embed/XEmbeddedObject.hpp"
+#include "com/sun/star/embed/XInsertObjectDialog.hpp"
+#include "com/sun/star/embed/XLinkageSupport.hpp"
+#include "com/sun/star/embed/XStorage.hpp"
+#include "com/sun/star/embed/XTransactedObject.hpp"
+#include "com/sun/star/form/DatabaseDeleteEvent.hpp"
+#include "com/sun/star/form/DatabaseParameterEvent.hpp"
+#include "com/sun/star/form/ErrorEvent.hpp"
+#include "com/sun/star/form/FormButtonType.hpp"
+#include "com/sun/star/form/FormComponentType.hpp"
+#include "com/sun/star/form/ListSourceType.hpp"
+#include "com/sun/star/form/NavigationBarMode.hpp"
+#include "com/sun/star/form/TabulatorCycle.hpp"
+#include "com/sun/star/form/XBoundComponent.hpp"
+#include "com/sun/star/form/XBoundControl.hpp"
+#include "com/sun/star/form/XConfirmDeleteBroadcaster.hpp"
+#include "com/sun/star/form/XConfirmDeleteListener.hpp"
+#include "com/sun/star/form/XDatabaseParameterBroadcaster2.hpp"
+#include "com/sun/star/form/XDatabaseParameterListener.hpp"
+#include "com/sun/star/form/XForm.hpp"
+#include "com/sun/star/form/XFormComponent.hpp"
+#include "com/sun/star/form/XFormController.hpp"
+#include "com/sun/star/form/XFormControllerListener.hpp"
+#include "com/sun/star/form/XFormsSupplier.hpp"
+#include "com/sun/star/form/XFormsSupplier2.hpp"
+#include "com/sun/star/form/XGrid.hpp"
+#include "com/sun/star/form/XGridColumnFactory.hpp"
+#include "com/sun/star/form/XGridFieldDataSupplier.hpp"
+#include "com/sun/star/form/XGridPeer.hpp"
+#include "com/sun/star/form/XImageProducerSupplier.hpp"
+#include "com/sun/star/form/XLoadListener.hpp"
+#include "com/sun/star/form/XLoadable.hpp"
+#include "com/sun/star/form/XReset.hpp"
+#include "com/sun/star/form/XResetListener.hpp"
+#include "com/sun/star/form/binding/XBindableValue.hpp"
+#include "com/sun/star/form/binding/XListEntrySink.hpp"
+#include "com/sun/star/form/binding/XValueBinding.hpp"
+#include "com/sun/star/form/submission/XSubmissionSupplier.hpp"
+#include "com/sun/star/form/validation/XFormComponentValidityListener.hpp"
+#include "com/sun/star/form/validation/XValidatableFormComponent.hpp"
+#include "com/sun/star/frame/DispatchDescriptor.hpp"
+#include "com/sun/star/frame/DispatchInformation.hpp"
+#include "com/sun/star/frame/FeatureStateEvent.hpp"
+#include "com/sun/star/frame/FrameSearchFlag.hpp"
+#include "com/sun/star/frame/XComponentLoader.hpp"
+#include "com/sun/star/frame/XController.hpp"
+#include "com/sun/star/frame/XDesktop.hpp"
+#include "com/sun/star/frame/XDispatch.hpp"
+#include "com/sun/star/frame/XDispatchInformationProvider.hpp"
+#include "com/sun/star/frame/XDispatchProvider.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterception.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterceptor.hpp"
+#include "com/sun/star/frame/XFrame.hpp"
+#include "com/sun/star/frame/XFrameActionListener.hpp"
+#include "com/sun/star/frame/XFrames.hpp"
+#include "com/sun/star/frame/XFramesSupplier.hpp"
+#include "com/sun/star/frame/XInterceptorInfo.hpp"
+#include "com/sun/star/frame/XModel.hpp"
+#include "com/sun/star/frame/XModuleManager.hpp"
+#include "com/sun/star/frame/XStatusListener.hpp"
+#include "com/sun/star/frame/XStorable.hpp"
+#include "com/sun/star/frame/XSynchronousDispatch.hpp"
+#include "com/sun/star/frame/status/ClipboardFormats.hpp"
+#include "com/sun/star/frame/status/FontHeight.hpp"
+#include "com/sun/star/frame/status/ItemStatus.hpp"
+#include "com/sun/star/frame/status/LeftRightMargin.hpp"
+#include "com/sun/star/frame/status/UpperLowerMargin.hpp"
+#include "com/sun/star/frame/status/UpperLowerMarginScale.hpp"
+#include "com/sun/star/gallery/GalleryItemType.hpp"
+#include "com/sun/star/gallery/XGalleryItem.hpp"
+#include "com/sun/star/gallery/XGalleryTheme.hpp"
+#include "com/sun/star/gallery/XGalleryThemeProvider.hpp"
+#include "com/sun/star/graphic/XGraphic.hpp"
+#include "com/sun/star/graphic/XGraphicProvider.hpp"
+#include "com/sun/star/graphic/XGraphicRenderer.hpp"
+#include "com/sun/star/i18n/CharacterIteratorMode.hdl"
+#include "com/sun/star/i18n/CharacterIteratorMode.hpp"
+#include "com/sun/star/i18n/CollatorOptions.hpp"
+#include "com/sun/star/i18n/ForbiddenCharacters.hpp"
+#include "com/sun/star/i18n/InputSequenceCheckMode.hpp"
+#include "com/sun/star/i18n/KCharacterType.hpp"
+#include "com/sun/star/i18n/ScriptType.hdl"
+#include "com/sun/star/i18n/ScriptType.hpp"
+#include "com/sun/star/i18n/TextConversionOption.hdl"
+#include "com/sun/star/i18n/TextConversionOption.hpp"
+#include "com/sun/star/i18n/TextConversionType.hpp"
+#include "com/sun/star/i18n/TransliterationModules.hpp"
+#include "com/sun/star/i18n/UnicodeScript.hpp"
+#include "com/sun/star/i18n/UnicodeType.hdl"
+#include "com/sun/star/i18n/WordType.hpp"
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/XExtendedInputSequenceChecker.hpp"
+#include "com/sun/star/i18n/XExtendedTextConversion.hpp"
+#include "com/sun/star/i18n/XForbiddenCharacters.hpp"
+#include "com/sun/star/i18n/XTextConversion.hpp"
+#include "com/sun/star/inspection/XObjectInspector.hpp"
+#include "com/sun/star/inspection/XObjectInspectorModel.hpp"
+#include "com/sun/star/io/IOException.hpp"
+#include "com/sun/star/io/XActiveDataControl.hpp"
+#include "com/sun/star/io/XActiveDataSink.hpp"
+#include "com/sun/star/io/XActiveDataSource.hpp"
+#include "com/sun/star/io/XInputStream.hpp"
+#include "com/sun/star/io/XInputStreamProvider.hpp"
+#include "com/sun/star/io/XMarkableStream.hpp"
+#include "com/sun/star/io/XObjectInputStream.hpp"
+#include "com/sun/star/io/XObjectOutputStream.hpp"
+#include "com/sun/star/io/XOutputStream.hpp"
+#include "com/sun/star/io/XPersistObject.hpp"
+#include "com/sun/star/io/XSeekable.hdl"
+#include "com/sun/star/io/XStream.hpp"
+#include "com/sun/star/lang/DisposedException.hpp"
+#include "com/sun/star/lang/EventObject.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/IndexOutOfBoundsException.hpp"
+#include "com/sun/star/lang/Locale.hpp"
+#include "com/sun/star/lang/NoSupportException.hpp"
+#include "com/sun/star/lang/ServiceNotRegisteredException.hpp"
+#include "com/sun/star/lang/XComponent.hpp"
+#include "com/sun/star/lang/XEventListener.hpp"
+#include "com/sun/star/lang/XInitialization.hpp"
+#include "com/sun/star/lang/XMultiComponentFactory.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/lang/XServiceDisplayName.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/XServiceName.hpp"
+#include "com/sun/star/lang/XSingleComponentFactory.hpp"
+#include "com/sun/star/lang/XTypeProvider.hpp"
+#include "com/sun/star/lang/XUnoTunnel.hpp"
+#include "com/sun/star/linguistic2/ConversionDictionaryType.hpp"
+#include "com/sun/star/linguistic2/ConversionDirection.hdl"
+#include "com/sun/star/linguistic2/ConversionPropertyType.hpp"
+#include "com/sun/star/linguistic2/DictionaryEvent.hpp"
+#include "com/sun/star/linguistic2/DictionaryEventFlags.hpp"
+#include "com/sun/star/linguistic2/DictionaryListEvent.hpp"
+#include "com/sun/star/linguistic2/DictionaryListEventFlags.hpp"
+#include "com/sun/star/linguistic2/DictionaryType.hpp"
+#include "com/sun/star/linguistic2/SpellFailure.hpp"
+#include "com/sun/star/linguistic2/XAvailableLocales.hpp"
+#include "com/sun/star/linguistic2/XConversionDictionary.hpp"
+#include "com/sun/star/linguistic2/XConversionDictionaryList.hpp"
+#include "com/sun/star/linguistic2/XConversionPropertyType.hpp"
+#include "com/sun/star/linguistic2/XDictionary.hpp"
+#include "com/sun/star/linguistic2/XDictionary1.hpp"
+#include "com/sun/star/linguistic2/XDictionaryEntry.hpp"
+#include "com/sun/star/linguistic2/XDictionaryEventListener.hpp"
+#include "com/sun/star/linguistic2/XDictionaryList.hpp"
+#include "com/sun/star/linguistic2/XDictionaryListEventListener.hpp"
+#include "com/sun/star/linguistic2/XHyphenatedWord.hpp"
+#include "com/sun/star/linguistic2/XHyphenator.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceManager.hdl"
+#include "com/sun/star/linguistic2/XLinguServiceManager.hpp"
+#include "com/sun/star/linguistic2/XMeaning.hpp"
+#include "com/sun/star/linguistic2/XPossibleHyphens.hpp"
+#include "com/sun/star/linguistic2/XSpellAlternatives.hpp"
+#include "com/sun/star/linguistic2/XSpellChecker.hpp"
+#include "com/sun/star/linguistic2/XSpellChecker1.hpp"
+#include "com/sun/star/linguistic2/XSupportedLocales.hpp"
+#include "com/sun/star/linguistic2/XThesaurus.hpp"
+#include "com/sun/star/media/XPlayer.hpp"
+#include "com/sun/star/media/ZoomLevel.hpp"
+#include "com/sun/star/plugin/PluginDescription.hpp"
+#include "com/sun/star/plugin/XPluginManager.hpp"
+#include "com/sun/star/reflection/XIdlClass.hpp"
+#include "com/sun/star/reflection/XIdlMethod.hpp"
+#include "com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp"
+#include "com/sun/star/reflection/XProxyFactory.hpp"
+#include "com/sun/star/registry/XRegistryKey.hpp"
+#include "com/sun/star/registry/XSimpleRegistry.hpp"
+#include "com/sun/star/script/ScriptEvent.hpp"
+#include "com/sun/star/script/ScriptEventDescriptor.hpp"
+#include "com/sun/star/script/XEventAttacherManager.hpp"
+#include "com/sun/star/script/XInvocation.hpp"
+#include "com/sun/star/script/XLibraryContainer.hpp"
+#include "com/sun/star/script/XScriptListener.hpp"
+#include "com/sun/star/script/XTypeConverter.hpp"
+#include "com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp"
+#include "com/sun/star/script/browse/BrowseNodeTypes.hpp"
+#include "com/sun/star/script/browse/XBrowseNode.hpp"
+#include "com/sun/star/script/browse/XBrowseNodeFactory.hpp"
+#include "com/sun/star/script/provider/ScriptErrorRaisedException.hpp"
+#include "com/sun/star/script/provider/ScriptExceptionRaisedException.hpp"
+#include "com/sun/star/script/provider/ScriptFrameworkErrorType.hpp"
+#include "com/sun/star/script/provider/XScriptProvider.hpp"
+#include "com/sun/star/script/provider/XScriptProviderSupplier.hpp"
+#include "com/sun/star/sdb/CommandType.hpp"
+#include "com/sun/star/sdb/ParametersRequest.hpp"
+#include "com/sun/star/sdb/RowChangeAction.hpp"
+#include "com/sun/star/sdb/RowChangeEvent.hpp"
+#include "com/sun/star/sdb/SQLContext.hpp"
+#include "com/sun/star/sdb/SQLErrorEvent.hpp"
+#include "com/sun/star/sdb/XColumn.hpp"
+#include "com/sun/star/sdb/XColumnUpdate.hpp"
+#include "com/sun/star/sdb/XCompletedConnection.hpp"
+#include "com/sun/star/sdb/XInteractionSupplyParameters.hpp"
+#include "com/sun/star/sdb/XQueriesSupplier.hpp"
+#include "com/sun/star/sdb/XResultSetAccess.hpp"
+#include "com/sun/star/sdb/XRowSetApproveBroadcaster.hpp"
+#include "com/sun/star/sdb/XRowSetApproveListener.hpp"
+#include "com/sun/star/sdb/XRowSetSupplier.hpp"
+#include "com/sun/star/sdb/XSQLErrorBroadcaster.hpp"
+#include "com/sun/star/sdb/XSQLErrorListener.hpp"
+#include "com/sun/star/sdb/XSQLQueryComposer.hpp"
+#include "com/sun/star/sdb/XSQLQueryComposerFactory.hpp"
+#include "com/sun/star/sdb/XSingleSelectQueryComposer.hpp"
+#include "com/sun/star/sdbc/ColumnValue.hpp"
+#include "com/sun/star/sdbc/DataType.hpp"
+#include "com/sun/star/sdbc/ResultSetConcurrency.hpp"
+#include "com/sun/star/sdbc/ResultSetType.hpp"
+#include "com/sun/star/sdbc/XConnection.hpp"
+#include "com/sun/star/sdbc/XDataSource.hpp"
+#include "com/sun/star/sdbc/XDatabaseMetaData.hpp"
+#include "com/sun/star/sdbc/XPreparedStatement.hpp"
+#include "com/sun/star/sdbc/XResultSet.hpp"
+#include "com/sun/star/sdbc/XResultSetUpdate.hpp"
+#include "com/sun/star/sdbc/XRow.hpp"
+#include "com/sun/star/sdbc/XRowSet.hpp"
+#include "com/sun/star/sdbc/XRowSetListener.hpp"
+#include "com/sun/star/sdbc/XStatement.hpp"
+#include "com/sun/star/sdbcx/Privilege.hpp"
+#include "com/sun/star/sdbcx/XColumnsSupplier.hpp"
+#include "com/sun/star/sdbcx/XDataDescriptorFactory.hpp"
+#include "com/sun/star/sdbcx/XDeleteRows.hpp"
+#include "com/sun/star/sdbcx/XRowLocate.hpp"
+#include "com/sun/star/sdbcx/XTablesSupplier.hpp"
+#include "com/sun/star/security/XDocumentDigitalSignatures.hpp"
+#include "com/sun/star/style/BreakType.hpp"
+#include "com/sun/star/style/CaseMap.hpp"
+#include "com/sun/star/style/GraphicLocation.hpp"
+#include "com/sun/star/style/LineSpacing.hpp"
+#include "com/sun/star/style/LineSpacingMode.hpp"
+#include "com/sun/star/style/NumberingType.hpp"
+#include "com/sun/star/style/PageStyleLayout.hpp"
+#include "com/sun/star/style/ParagraphAdjust.hpp"
+#include "com/sun/star/style/TabStop.hpp"
+#include "com/sun/star/style/VerticalAlignment.hpp"
+#include "com/sun/star/style/XStyle.hpp"
+#include "com/sun/star/style/XStyleFamiliesSupplier.hpp"
+#include "com/sun/star/table/BorderLine.hpp"
+#include "com/sun/star/table/CellAddress.hpp"
+#include "com/sun/star/table/CellContentType.hpp"
+#include "com/sun/star/table/CellHoriJustify.hpp"
+#include "com/sun/star/table/CellOrientation.hpp"
+#include "com/sun/star/table/CellRangeAddress.hpp"
+#include "com/sun/star/table/CellVertJustify.hpp"
+#include "com/sun/star/table/ShadowFormat.hpp"
+#include "com/sun/star/table/ShadowLocation.hpp"
+#include "com/sun/star/table/TableBorder.hpp"
+#include "com/sun/star/table/TableOrientation.hpp"
+#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XStatusIndicator.hpp"
+#include "com/sun/star/task/XStatusIndicatorFactory.hpp"
+#include "com/sun/star/text/CharacterCompressionType.hpp"
+#include "com/sun/star/text/ControlCharacter.hpp"
+#include "com/sun/star/text/FilenameDisplayFormat.hpp"
+#include "com/sun/star/text/FontEmphasis.hpp"
+#include "com/sun/star/text/GraphicCrop.hpp"
+#include "com/sun/star/text/HoriOrientation.hpp"
+#include "com/sun/star/text/RelOrientation.hpp"
+#include "com/sun/star/text/RubyAdjust.hpp"
+#include "com/sun/star/text/TextContentAnchorType.hpp"
+#include "com/sun/star/text/VertOrientation.hpp"
+#include "com/sun/star/text/WrapTextMode.hpp"
+#include "com/sun/star/text/WritingMode.hpp"
+#include "com/sun/star/text/WritingMode2.hpp"
+#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
+#include "com/sun/star/text/XNumberingFormatter.hpp"
+#include "com/sun/star/text/XNumberingTypeInfo.hpp"
+#include "com/sun/star/text/XRubySelection.hpp"
+#include "com/sun/star/text/XSimpleText.hpp"
+#include "com/sun/star/text/XText.hpp"
+#include "com/sun/star/text/XTextContent.hpp"
+#include "com/sun/star/text/XTextCursor.hpp"
+#include "com/sun/star/text/XTextField.hdl"
+#include "com/sun/star/text/XTextField.hpp"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/text/XTextRangeCompare.hpp"
+#include "com/sun/star/text/XTextRangeMover.hpp"
+#include "com/sun/star/ucb/CommandAbortedException.hpp"
+#include "com/sun/star/ucb/NameClash.hpp"
+#include "com/sun/star/ucb/NumberedSortingInfo.hpp"
+#include "com/sun/star/ucb/TransferInfo.hpp"
+#include "com/sun/star/ucb/XAnyCompare.hpp"
+#include "com/sun/star/ucb/XAnyCompareFactory.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+#include "com/sun/star/ucb/XContent.hpp"
+#include "com/sun/star/ucb/XContentAccess.hpp"
+#include "com/sun/star/ucb/XContentProvider.hpp"
+#include "com/sun/star/ucb/XSimpleFileAccess.hpp"
+#include "com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp"
+#include "com/sun/star/ui/ImageType.hpp"
+#include "com/sun/star/ui/ItemStyle.hpp"
+#include "com/sun/star/ui/ItemType.hpp"
+#include "com/sun/star/ui/UIElementType.hpp"
+#include "com/sun/star/ui/XImageManager.hpp"
+#include "com/sun/star/ui/XModuleUIConfigurationManager.hpp"
+#include "com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp"
+#include "com/sun/star/ui/XUIConfiguration.hpp"
+#include "com/sun/star/ui/XUIConfigurationListener.hpp"
+#include "com/sun/star/ui/XUIConfigurationManager.hpp"
+#include "com/sun/star/ui/XUIConfigurationManagerSupplier.hpp"
+#include "com/sun/star/ui/XUIConfigurationPersistence.hpp"
+#include "com/sun/star/ui/XUIConfigurationStorage.hpp"
+#include "com/sun/star/ui/XUIElement.hpp"
+#include "com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
+#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/FilePreviewImageFormats.hpp"
+#include "com/sun/star/ui/dialogs/ListboxControlActions.hpp"
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include "com/sun/star/ui/dialogs/XExecutableDialog.hpp"
+#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerListener.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerNotifier.hpp"
+#include "com/sun/star/ui/dialogs/XFilePreview.hpp"
+#include "com/sun/star/ui/dialogs/XFilterManager.hpp"
+#include "com/sun/star/ui/dialogs/XFolderPicker.hpp"
+#include "com/sun/star/uno/Any.h"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.h"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/Type.h"
+#include "com/sun/star/uno/XAggregation.hpp"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "com/sun/star/uno/XNamingService.hpp"
+#include "com/sun/star/util/Date.hpp"
+#include "com/sun/star/util/DateTime.hpp"
+#include "com/sun/star/util/Language.hpp"
+#include "com/sun/star/util/MeasureUnit.hpp"
+#include "com/sun/star/util/NumberFormat.hpp"
+#include "com/sun/star/util/SearchAlgorithms.hpp"
+#include "com/sun/star/util/SearchFlags.hpp"
+#include "com/sun/star/util/SearchOptions.hpp"
+#include "com/sun/star/util/SearchResult.hpp"
+#include "com/sun/star/util/SortField.hpp"
+#include "com/sun/star/util/SortFieldType.hpp"
+#include "com/sun/star/util/URL.hpp"
+#include "com/sun/star/util/XCancellable.hpp"
+#include "com/sun/star/util/XChangesBatch.hpp"
+#include "com/sun/star/util/XCloneable.hpp"
+#include "com/sun/star/util/XCloseable.hpp"
+#include "com/sun/star/util/XFlushable.hpp"
+#include "com/sun/star/util/XLocalizedAliases.hpp"
+#include "com/sun/star/util/XModeChangeBroadcaster.hpp"
+#include "com/sun/star/util/XModeChangeListener.hpp"
+#include "com/sun/star/util/XModeSelector.hpp"
+#include "com/sun/star/util/XModifiable.hpp"
+#include "com/sun/star/util/XModifyBroadcaster.hpp"
+#include "com/sun/star/util/XModifyListener.hpp"
+#include "com/sun/star/util/XNumberFormatTypes.hpp"
+#include "com/sun/star/util/XNumberFormats.hpp"
+#include "com/sun/star/util/XNumberFormatsSupplier.hpp"
+#include "com/sun/star/util/XNumberFormatter.hpp"
+#include "com/sun/star/util/XTextSearch.hpp"
+#include "com/sun/star/util/XURLTransformer.hpp"
+#include "com/sun/star/util/logging/LogLevel.hpp"
+#include "com/sun/star/util/logging/XLogger.hpp"
+#include "com/sun/star/view/XSelectionChangeListener.hpp"
+#include "com/sun/star/view/XSelectionSupplier.hpp"
+#include "com/sun/star/xforms/XFormsSupplier.hpp"
+#include "com/sun/star/xforms/XFormsUIHelper1.hpp"
+#include "com/sun/star/xforms/XModel.hpp"
+#include "com/sun/star/xforms/XSubmission.hpp"
+#include "com/sun/star/xml/AttributeData.hpp"
+#include "com/sun/star/xml/dom/DOMException.hpp"
+#include "com/sun/star/xml/dom/XDocument.hpp"
+#include "com/sun/star/xml/dom/XNode.hpp"
+#include "com/sun/star/xml/dom/events/XEventListener.hpp"
+#include "com/sun/star/xml/dom/events/XEventTarget.hpp"
+#include "com/sun/star/xml/sax/InputSource.hpp"
+#include "com/sun/star/xml/sax/SAXParseException.hpp"
+#include "com/sun/star/xml/sax/XAttributeList.hpp"
+#include "com/sun/star/xml/sax/XDocumentHandler.hpp"
+#include "com/sun/star/xml/sax/XParser.hpp"
+#include "comphelper/accessibleeventnotifier.hxx"
+#include "comphelper/anytostring.hxx"
+#include "comphelper/broadcasthelper.hxx"
+#include "comphelper/componentcontext.hxx"
+#include "comphelper/configurationhelper.hxx"
+#include "comphelper/container.hxx"
+#include "comphelper/embeddedobjectcontainer.hxx"
+#include "comphelper/enumhelper.hxx"
+#include "comphelper/implementationreference.hxx"
+#include "comphelper/interaction.hxx"
+#include "comphelper/numbers.hxx"
+#include "comphelper/processfactory.hxx"
+#include "comphelper/propertycontainer.hxx"
+#include "comphelper/propertysethelper.hxx"
+#include "comphelper/regpathhelper.hxx"
+#include "comphelper/scopeguard.hxx"
+#include "comphelper/seqstream.hxx"
+#include "comphelper/sequence.hxx"
+#include "comphelper/sequenceashashmap.hxx"
+#include "comphelper/sequenceasvector.hxx"
+#include "comphelper/servicehelper.hxx"
+#include "comphelper/storagehelper.hxx"
+#include "comphelper/types.hxx"
+#include "comphelper/uno3.hxx"
+#include "connectivity/IParseContext.hxx"
+#include "connectivity/dbexception.hxx"
+#include "connectivity/sqlnode.hxx"
+#include "connectivity/sqlparse.hxx"
+#include "cppuhelper/bootstrap.hxx"
+#include "cppuhelper/compbase12.hxx"
+#include "cppuhelper/compbase2.hxx"
+#include "cppuhelper/compbase3.hxx"
+#include "cppuhelper/compbase4.hxx"
+#include "cppuhelper/compbase6.hxx"
+#include "cppuhelper/compbase7.hxx"
+#include "cppuhelper/component.hxx"
+#include "cppuhelper/component_context.hxx"
+#include "cppuhelper/exc_hlp.hxx"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase11.hxx"
+#include "cppuhelper/implbase12.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implbase3.hxx"
+#include "cppuhelper/implbase4.hxx"
+#include "cppuhelper/implbase5.hxx"
+#include "cppuhelper/implbase6.hxx"
+#include "cppuhelper/implbase8.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "cppuhelper/interfacecontainer.h"
+#include "cppuhelper/interfacecontainer.hxx"
+#include "cppuhelper/propshlp.hxx"
+#include "cppuhelper/queryinterface.hxx"
+#include "cppuhelper/servicefactory.hxx"
+#include "cppuhelper/typeprovider.hxx"
+#include "cppuhelper/weak.hxx"
+#include "cppuhelper/weakagg.hxx"
+#include "cppuhelper/weakref.hxx"
+#include "i18npool/lang.h"
+#include "i18npool/mslangid.hxx"
+#include "jvmfwk/framework.h"
+#include "linguistic/lngprops.hxx"
+#include "osl/diagnose.h"
+#include "osl/endian.h"
+#include "osl/file.hxx"
+#include "osl/interlck.h"
+#include "osl/module.h"
+#include "osl/module.hxx"
+#include "osl/mutex.hxx"
+#include "osl/nlsupport.h"
+#include "osl/process.h"
+#include "osl/security.hxx"
+#include "rsc/rscsfx.hxx"
+#include "rtl/bootstrap.hxx"
+#include "rtl/cipher.h"
+#include "rtl/crc.h"
+#include "rtl/digest.h"
+#include "rtl/locale.h"
+#include "rtl/logfile.hxx"
+#include "rtl/math.hxx"
+#include "rtl/memory.h"
+#include "rtl/tencinfo.h"
+#include "rtl/textenc.h"
+#include "rtl/ustrbuf.hxx"
+#include "rtl/ustring.hxx"
+#include "rtl/uuid.h"
+#include "sal/config.h"
+#include "sal/main.h"
+#include "sal/types.h"
+#include "sfx2/bindings.hxx"
+#include "sfx2/ctrlitem.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfx2/docfilt.hxx"
+#include "sfx2/event.hxx"
+#include "sfx2/frame.hxx"
+#include "sfx2/frmdescr.hxx"
+#include "sfx2/imagemgr.hxx"
+#include "sfx2/imgmgr.hxx"
+#include "sfx2/linkmgr.hxx"
+#include "sfx2/linksrc.hxx"
+#include "sfx2/lnkbase.hxx"
+#include "sfx2/minarray.hxx"
+#include "sfx2/minfitem.hxx"
+#include "sfx2/mnuitem.hxx"
+#include "sfx2/module.hxx"
+#include "sfx2/msg.hxx"
+#include "sfx2/msgpool.hxx"
+#include "sfx2/objface.hxx"
+#include "sfx2/objitem.hxx"
+#include "sfx2/progress.hxx"
+#include "sfx2/querystatus.hxx"
+#include "sfx2/request.hxx"
+#include "sfx2/sfxdefs.hxx"
+#include "sfx2/sfxdlg.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include "sfx2/sfxhtml.hxx"
+#include "sfx2/sfxstatuslistener.hxx"
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/shell.hxx"
+#include "sfx2/srchdefs.hxx"
+#include "sfx2/tplpitem.hxx"
+#include "sfx2/viewfrm.hxx"
+#include "sot/clsids.hxx"
+#include "sot/exchange.hxx"
+#include "sot/factory.hxx"
+#include "sot/formats.hxx"
+#include <map>
+#include <set>
+#include <slist>
+#include <vector>
+#include "svtools/FilterConfigItem.hxx"
+#include "svtools/accessibilityoptions.hxx"
+#include "svl/adrparse.hxx"
+#include "svtools/apearcfg.hxx"
+#include "svl/brdcst.hxx"
+#include "unotools/cacheoptions.hxx"
+#include "svl/cancel.hxx"
+#include "svl/cjkoptions.hxx"
+#include "unotools/cmdoptions.hxx"
+#include "svl/cntwall.hxx"
+#include "svtools/colorcfg.hxx"
+#include "svl/ctloptions.hxx"
+#include "unotools/defaultoptions.hxx"
+#include "unotools/dynamicmenuoptions.hxx"
+#include "svtools/ehdl.hxx"
+#include "svl/eitem.hxx"
+#include "unotools/eventcfg.hxx"
+#include "unotools/extendedsecurityoptions.hxx"
+#include "svl/filenotation.hxx"
+#include "svl/flagitem.hxx"
+#include "unotools/fltrcfg.hxx"
+#include "unotools/fontoptions.hxx"
+#include "svtools/fontsubstconfig.hxx"
+#include "svtools/helpopt.hxx"
+#include "svl/hint.hxx"
+#include "svtools/htmlkywd.hxx"
+#include "svtools/htmltokn.h"
+#include "svtools/imagemgr.hxx"
+#include "svtools/imapcirc.hxx"
+#include "svtools/imapobj.hxx"
+#include "svtools/imappoly.hxx"
+#include "svtools/imaprect.hxx"
+#include "svtools/inetimg.hxx"
+#include "unotools/inetoptions.hxx"
+#include "svl/intitem.hxx"
+#include "svl/isethint.hxx"
+#include "svl/itemiter.hxx"
+#include "svl/itempool.hxx"
+#include "svl/itemprop.hxx"
+#include "svl/itemset.hxx"
+#include "unotools/javaoptions.hxx"
+#include "svl/languageoptions.hxx"
+#include "unotools/lingucfg.hxx"
+#include "unotools/linguprops.hxx"
+#include "svl/lngmisc.hxx"
+#include "svtools/localresaccess.hxx"
+#include "svl/lstner.hxx"
+#include "svl/macitem.hxx"
+#include "svtools/menuoptions.hxx"
+#include "svl/metitem.hxx"
+#include "unotools/misccfg.hxx"
+#include "svtools/miscopt.hxx"
+#include "unotools/moduleoptions.hxx"
+#include "svl/numuno.hxx"
+#include "unotools/optionsdlg.hxx"
+#include "svtools/parhtml.hxx"
+#include "svtools/parrtf.hxx"
+#include "unotools/pathoptions.hxx"
+#include "svl/pickerhelper.hxx"
+#include "svl/poolitem.hxx"
+#include "unotools/printwarningoptions.hxx"
+#include "svl/ptitem.hxx"
+#include "svl/rectitem.hxx"
+#include "svl/rngitem.hxx"
+#include "svtools/rtfkeywd.hxx"
+#include "svtools/rtfout.hxx"
+#include "svtools/rtftoken.h"
+#include "unotools/saveopt.hxx"
+#include "unotools/searchopt.hxx"
+#include "unotools/securityoptions.hxx"
+#include "svl/sfontitm.hxx"
+#include "svl/slstitm.hxx"
+#include "svl/smplhint.hxx"
+#include "svtools/soerr.hxx"
+#include "unotools/sourceviewconfig.hxx"
+#include "unotools/startoptions.hxx"
+#include "svtools/stdmenu.hxx"
+#include "svtools/stringtransfer.hxx"
+#include "svl/stritem.hxx"
+#include "svl/style.hxx"
+#include "svl/svarray.hxx"
+#include "svl/svstdarr.hxx"
+#include "unotools/syslocaleoptions.hxx"
+#include "svl/szitem.hxx"
+#include "svtools/textdata.hxx"
+#include "svtools/transfer.hxx"
+#include "svtools/txtcmp.hxx"
+#include "svl/undo.hxx"
+#include "unotools/undoopt.hxx"
+#include "svtools/unoevent.hxx"
+#include "svtools/unoimap.hxx"
+#include "svl/urihelper.hxx"
+#include "svl/urlbmk.hxx"
+#include "unotools/useroptions.hxx"
+#include "unotools/viewoptions.hxx"
+#include "svl/visitem.hxx"
+#include "svl/whiter.hxx"
+#include "sys/stat.h"
+#include "sys/types.h"
+#include "toolkit/awt/vclxdevice.hxx"
+#include "toolkit/controls/unocontrol.hxx"
+#include "tools/bigint.hxx"
+#include "tools/color.hxx"
+#include "tools/config.hxx"
+#include "tools/contnr.hxx"
+#include "tools/debug.hxx"
+#include "tools/diagnose_ex.h"
+#include "tools/dynary.hxx"
+#include "tools/errcode.hxx"
+#include "tools/errinf.hxx"
+#include "tools/fract.hxx"
+#include "tools/gen.hxx"
+#include "tools/globname.hxx"
+#include "tools/inetdef.hxx"
+#include "tools/line.hxx"
+#include "tools/link.hxx"
+#include "tools/list.hxx"
+#include "tools/multisel.hxx"
+#include "tools/poly.hxx"
+#include "tools/rc.h"
+#include "tools/rc.hxx"
+#include "tools/rcid.h"
+#include "tools/ref.hxx"
+#include "tools/resary.hxx"
+#include "tools/resid.hxx"
+#include "tools/resmgr.hxx"
+#include "tools/rtti.hxx"
+#include "tools/shl.hxx"
+#include "tools/solar.h"
+#include "tools/stack.hxx"
+#include "tools/string.hxx"
+#include "tools/table.hxx"
+#include "tools/tenccvt.hxx"
+#include "tools/urlobj.hxx"
+#include "tools/vcompat.hxx"
+#include "tools/vector2d.hxx"
+#include "tools/weakbase.hxx"
+#include "tools/wldcrd.hxx"
+#include "tools/zcodec.hxx"
+#include "ucbhelper/commandenvironment.hxx"
+#include "ucbhelper/configurationkeys.hxx"
+#include "ucbhelper/content.hxx"
+#include "ucbhelper/contentbroker.hxx"
+#include "unicode/ubidi.h"
+#include "uno/lbnames.h"
+#include "uno/mapping.hxx"
+#include "unotools/accessiblerelationsethelper.hxx"
+#include "unotools/accessiblestatesethelper.hxx"
+#include "unotools/bootstrap.hxx"
+#include "unotools/charclass.hxx"
+#include "unotools/collatorwrapper.hxx"
+#include "unotools/configitem.hxx"
+#include "unotools/configmgr.hxx"
+#include "unotools/confignode.hxx"
+#include "unotools/configpathes.hxx"
+#include "unotools/configvaluecontainer.hxx"
+#include "unotools/localfilehelper.hxx"
+#include "unotools/processfactory.hxx"
+#include "comphelper/servicehelper.hxx"
+#include "unotools/streamwrap.hxx"
+#include "unotools/textsearch.hxx"
+#include "unotools/transliterationwrapper.hxx"
+#include "unotools/ucbhelper.hxx"
+#include "vcl/abstdlg.hxx"
+#include "vcl/animate.hxx"
+#include "vcl/bitmap.hxx"
+#include "vcl/bitmapex.hxx"
+#include "vcl/bmpacc.hxx"
+#include "vcl/cmdevt.h"
+#include "vcl/configsettings.hxx"
+#include "vcl/controllayout.hxx"
+#include "vcl/cursor.hxx"
+#include "vcl/decoview.hxx"
+#include "vcl/dndhelp.hxx"
+#include "vcl/fldunit.hxx"
+#include "vcl/fntstyle.hxx"
+#include "unotools/fontcvt.hxx"
+#include "vcl/gdimtf.hxx"
+#include "vcl/help.hxx"
+#include "vcl/image.hxx"
+#include "vcl/jobset.hxx"
+#include "vcl/keycodes.hxx"
+#include "vcl/mapmod.hxx"
+#include "vcl/menu.hxx"
+#include "vcl/mnemonic.hxx"
+#include "vcl/pointr.hxx"
+#include "vcl/region.hxx"
+#include "vcl/salbtype.hxx"
+#include "vcl/stdtext.hxx"
+#include "vcl/timer.hxx"
+#include "vcl/unohelp.hxx"
+#include "vcl/unohelp2.hxx"
+#include "vcl/wall.hxx"
+#include "vcl/wintypes.hxx"
+#include "vos/mutex.hxx"
+#include "vos/ref.hxx"
+#include "vos/refernce.hxx"
+#include "vos/thread.hxx"
+#include "vos/xception.hxx"
+#include "xmloff/DashStyle.hxx"
+#include "xmloff/GradientStyle.hxx"
+#include "xmloff/HatchStyle.hxx"
+#include "xmloff/ImageStyle.hxx"
+#include "xmloff/MarkerStyle.hxx"
+#include "xmloff/attrlist.hxx"
+#include "xmloff/nmspmap.hxx"
+#include "xmloff/xmlcnimp.hxx"
+#include "xmloff/xmlictxt.hxx"
+#include "xmloff/xmlnmspe.hxx"
+#include "xmloff/xmlstyle.hxx"
+#include "xmloff/xmltoken.hxx"
+#include "xmlscript/xmldlg_imexp.hxx"
+//---MARKER---
+#endif
+#endif
diff --git a/cui/prj/build.lst b/cui/prj/build.lst
new file mode 100644
index 000000000000..776d6a6af82e
--- /dev/null
+++ b/cui/prj/build.lst
@@ -0,0 +1,9 @@
+cu cui : svx NULL
+cu cui usr1 - all cui_mkout NULL
+cu cui\inc nmake - all cui_inc NULL
+cu cui\source\options nmake - all cui_options cui_inc NULL
+cu cui\source\customize nmake - all cui_customize cui_inc NULL
+cu cui\source\dialogs nmake - all cui_dialogs cui_inc NULL
+cu cui\source\tabpages nmake - all cui_tabpages cui_inc NULL
+cu cui\source\factory nmake - all cui_factory cui_inc NULL
+cu cui\util nmake - all cui_util cui_factory cui_tabpages cui_dialogs cui_customize cui_options NULL
diff --git a/cui/prj/d.lst b/cui/prj/d.lst
new file mode 100755
index 000000000000..ce672717bfff
--- /dev/null
+++ b/cui/prj/d.lst
@@ -0,0 +1,8 @@
+mkdir: %COMMON_DEST%\bin%_EXT%\hid
+mkdir: %COMMON_DEST%\res%_EXT%
+
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
+..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
+..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
+
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
new file mode 100644
index 000000000000..8ff50323cc76
--- /dev/null
+++ b/cui/source/customize/acccfg.cxx
@@ -0,0 +1,1702 @@
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: acccfg.cxx,v $
+ * $Revision: 1.40 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_cui.hxx"
+
+//-----------------------------------------------
+// include own files
+
+#include "acccfg.hxx"
+#include "cfgutil.hxx"
+#include <dialmgr.hxx>
+
+#include <sfx2/msg.hxx>
+#include <sfx2/macrconf.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/filedlghelper.hxx>
+#include <sfx2/minfitem.hxx>
+#include <svl/stritem.hxx>
+
+#include "cuires.hrc"
+#include "acccfg.hrc"
+
+#include <svx/svxids.hrc> // SID_CHARMAP, SID_ATTR_SPECIALCHAR
+
+//-----------------------------------------------
+// include interface declarations
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/form/XReset.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+
+#ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGERSUPLLIER_HPP_
+#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
+#endif
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+
+//-----------------------------------------------
+// include other projects
+#include <unotools/processfactory.hxx>
+#include <svtools/acceleratorexecute.hxx>
+#include <comphelper/processfactory.hxx>
+#include <svtools/svlbitm.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/help.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+
+//-----------------------------------------------
+// namespaces
+
+#ifdef css
+ #error "ambigous praeprozessor directive for css ..."
+#else
+ namespace css = ::com::sun::star;
+#endif
+
+using namespace com::sun::star;
+
+//-----------------------------------------------
+// definitions
+
+//-----------------------------------------------
+static ::rtl::OUString SERVICE_STORAGEFACTORY = ::rtl::OUString::createFromAscii("com.sun.star.embed.StorageFactory" );
+static ::rtl::OUString SERVICE_UICONFIGMGR = ::rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager" );
+static ::rtl::OUString SERVICE_DESKTOP = ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop" );
+static ::rtl::OUString SERVICE_MODULEMANAGER = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager" );
+static ::rtl::OUString SERVICE_GLOBALACCCFG = ::rtl::OUString::createFromAscii("com.sun.star.ui.GlobalAcceleratorConfiguration" );
+static ::rtl::OUString SERVICE_MODULEUICONFIGSUPPLIER = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
+static ::rtl::OUString SERVICE_UICMDDESCRIPTION = ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription" );
+
+static ::rtl::OUString MODULEPROP_SHORTNAME = ::rtl::OUString::createFromAscii("ooSetupFactoryShortName" );
+static ::rtl::OUString MODULEPROP_UINAME = ::rtl::OUString::createFromAscii("ooSetupFactoryUIName" );
+static ::rtl::OUString CMDPROP_UINAME = ::rtl::OUString::createFromAscii("Name" );
+
+static ::rtl::OUString FOLDERNAME_UICONFIG = ::rtl::OUString::createFromAscii("Configurations2" );
+
+static ::rtl::OUString MEDIATYPE_PROPNAME = ::rtl::OUString::createFromAscii("MediaType" );
+static ::rtl::OUString MEDIATYPE_UICONFIG = ::rtl::OUString::createFromAscii("application/vnd.sun.xml.ui.configuration" );
+
+//-----------------------------------------------
+static USHORT __FAR_DATA KEYCODE_ARRAY[] =
+{
+ KEY_F1 ,
+ KEY_F2 ,
+ KEY_F3 ,
+ KEY_F4 ,
+ KEY_F5 ,
+ KEY_F6 ,
+ KEY_F7 ,
+ KEY_F8 ,
+ KEY_F9 ,
+ KEY_F10 ,
+ KEY_F11 ,
+ KEY_F12 ,
+
+ KEY_DOWN ,
+ KEY_UP ,
+ KEY_LEFT ,
+ KEY_RIGHT ,
+ KEY_HOME ,
+ KEY_END ,
+ KEY_PAGEUP ,
+ KEY_PAGEDOWN ,
+ KEY_RETURN ,
+ KEY_ESCAPE ,
+ KEY_BACKSPACE,
+ KEY_INSERT ,
+ KEY_DELETE ,
+
+ KEY_OPEN ,
+ KEY_CUT ,
+ KEY_COPY ,
+ KEY_PASTE ,
+ KEY_UNDO ,
+ KEY_REPEAT ,
+ KEY_FIND ,
+ KEY_PROPERTIES ,
+ KEY_FRONT ,
+ KEY_CONTEXTMENU ,
+ KEY_MENU ,
+ KEY_HELP ,
+
+ KEY_F1 | KEY_SHIFT,
+ KEY_F2 | KEY_SHIFT,
+ KEY_F3 | KEY_SHIFT,
+ KEY_F4 | KEY_SHIFT,
+ KEY_F5 | KEY_SHIFT,
+ KEY_F6 | KEY_SHIFT,
+ KEY_F7 | KEY_SHIFT,
+ KEY_F8 | KEY_SHIFT,
+ KEY_F9 | KEY_SHIFT,
+ KEY_F10 | KEY_SHIFT,
+ KEY_F11 | KEY_SHIFT,
+ KEY_F12 | KEY_SHIFT,
+
+ KEY_DOWN | KEY_SHIFT,
+ KEY_UP | KEY_SHIFT,
+ KEY_LEFT | KEY_SHIFT,
+ KEY_RIGHT | KEY_SHIFT,
+ KEY_HOME | KEY_SHIFT,
+ KEY_END | KEY_SHIFT,
+ KEY_PAGEUP | KEY_SHIFT,
+ KEY_PAGEDOWN | KEY_SHIFT,
+ KEY_RETURN | KEY_SHIFT,
+ KEY_SPACE | KEY_SHIFT,
+ KEY_ESCAPE | KEY_SHIFT,
+ KEY_BACKSPACE | KEY_SHIFT,
+ KEY_INSERT | KEY_SHIFT,
+ KEY_DELETE | KEY_SHIFT,
+
+ KEY_0 | KEY_MOD1 ,
+ KEY_1 | KEY_MOD1 ,
+ KEY_2 | KEY_MOD1 ,
+ KEY_3 | KEY_MOD1 ,
+ KEY_4 | KEY_MOD1 ,
+ KEY_5 | KEY_MOD1 ,
+ KEY_6 | KEY_MOD1 ,
+ KEY_7 | KEY_MOD1 ,
+ KEY_8 | KEY_MOD1 ,
+ KEY_9 | KEY_MOD1 ,
+ KEY_A | KEY_MOD1 ,
+ KEY_B | KEY_MOD1 ,
+ KEY_C | KEY_MOD1 ,
+ KEY_D | KEY_MOD1 ,
+ KEY_E | KEY_MOD1 ,
+ KEY_F | KEY_MOD1 ,
+ KEY_G | KEY_MOD1 ,
+ KEY_H | KEY_MOD1 ,
+ KEY_I | KEY_MOD1 ,
+ KEY_J | KEY_MOD1 ,
+ KEY_K | KEY_MOD1 ,
+ KEY_L | KEY_MOD1 ,
+ KEY_M | KEY_MOD1 ,
+ KEY_N | KEY_MOD1 ,
+ KEY_O | KEY_MOD1 ,
+ KEY_P | KEY_MOD1 ,
+ KEY_Q | KEY_MOD1 ,
+ KEY_R | KEY_MOD1 ,
+ KEY_S | KEY_MOD1 ,
+ KEY_T | KEY_MOD1 ,
+ KEY_U | KEY_MOD1 ,
+ KEY_V | KEY_MOD1 ,
+ KEY_W | KEY_MOD1 ,
+ KEY_X | KEY_MOD1 ,
+ KEY_Y | KEY_MOD1 ,
+ KEY_Z | KEY_MOD1 ,
+
+ KEY_F1 | KEY_MOD1 ,
+ KEY_F2 | KEY_MOD1 ,
+ KEY_F3 | KEY_MOD1 ,
+ KEY_F4 | KEY_MOD1 ,
+ KEY_F5 | KEY_MOD1 ,
+ KEY_F6 | KEY_MOD1 ,
+ KEY_F7 | KEY_MOD1 ,
+ KEY_F8 | KEY_MOD1 ,
+ KEY_F9 | KEY_MOD1 ,
+ KEY_F10 | KEY_MOD1 ,
+ KEY_F11 | KEY_MOD1 ,
+ KEY_F12 | KEY_MOD1 ,
+
+ KEY_DOWN | KEY_MOD1 ,
+ KEY_UP | KEY_MOD1 ,
+ KEY_LEFT | KEY_MOD1 ,
+ KEY_RIGHT | KEY_MOD1 ,
+ KEY_HOME | KEY_MOD1 ,
+ KEY_END | KEY_MOD1 ,
+ KEY_PAGEUP | KEY_MOD1 ,
+ KEY_PAGEDOWN | KEY_MOD1 ,
+ KEY_RETURN | KEY_MOD1 ,
+ KEY_SPACE | KEY_MOD1 ,
+ KEY_BACKSPACE | KEY_MOD1 ,
+ KEY_INSERT | KEY_MOD1 ,
+ KEY_DELETE | KEY_MOD1 ,
+
+ KEY_ADD | KEY_MOD1 ,
+ KEY_SUBTRACT | KEY_MOD1 ,
+ KEY_MULTIPLY | KEY_MOD1 ,
+ KEY_DIVIDE | KEY_MOD1 ,
+
+ KEY_0 | KEY_SHIFT | KEY_MOD1,
+ KEY_1 | KEY_SHIFT | KEY_MOD1,
+ KEY_2 | KEY_SHIFT | KEY_MOD1,
+ KEY_3 | KEY_SHIFT | KEY_MOD1,
+ KEY_4 | KEY_SHIFT | KEY_MOD1,
+ KEY_5 | KEY_SHIFT | KEY_MOD1,
+ KEY_6 | KEY_SHIFT | KEY_MOD1,
+ KEY_7 | KEY_SHIFT | KEY_MOD1,
+ KEY_8 | KEY_SHIFT | KEY_MOD1,
+ KEY_9 | KEY_SHIFT | KEY_MOD1,
+ KEY_A | KEY_SHIFT | KEY_MOD1,
+ KEY_B | KEY_SHIFT | KEY_MOD1,
+ KEY_C | KEY_SHIFT | KEY_MOD1,
+ KEY_D | KEY_SHIFT | KEY_MOD1,
+ KEY_E | KEY_SHIFT | KEY_MOD1,
+ KEY_F | KEY_SHIFT | KEY_MOD1,
+ KEY_G | KEY_SHIFT | KEY_MOD1,
+ KEY_H | KEY_SHIFT | KEY_MOD1,
+ KEY_I | KEY_SHIFT | KEY_MOD1,
+ KEY_J | KEY_SHIFT | KEY_MOD1,
+ KEY_K | KEY_SHIFT | KEY_MOD1,
+ KEY_L | KEY_SHIFT | KEY_MOD1,
+ KEY_M | KEY_SHIFT | KEY_MOD1,
+ KEY_N | KEY_SHIFT | KEY_MOD1,
+ KEY_O | KEY_SHIFT | KEY_MOD1,
+ KEY_P | KEY_SHIFT | KEY_MOD1,
+ KEY_Q | KEY_SHIFT | KEY_MOD1,
+ KEY_R | KEY_SHIFT | KEY_MOD1,
+ KEY_S | KEY_SHIFT | KEY_MOD1,
+ KEY_T | KEY_SHIFT | KEY_MOD1,
+ KEY_U | KEY_SHIFT | KEY_MOD1,
+ KEY_V | KEY_SHIFT | KEY_MOD1,
+ KEY_W | KEY_SHIFT | KEY_MOD1,
+ KEY_X | KEY_SHIFT | KEY_MOD1,
+ KEY_Y | KEY_SHIFT | KEY_MOD1,
+ KEY_Z | KEY_SHIFT | KEY_MOD1,
+
+ KEY_F1 | KEY_SHIFT | KEY_MOD1,
+ KEY_F2 | KEY_SHIFT | KEY_MOD1,
+ KEY_F3 | KEY_SHIFT | KEY_MOD1,
+ KEY_F4 | KEY_SHIFT | KEY_MOD1,
+ KEY_F5 | KEY_SHIFT | KEY_MOD1,
+ KEY_F6 | KEY_SHIFT | KEY_MOD1,
+ KEY_F7 | KEY_SHIFT | KEY_MOD1,
+ KEY_F8 | KEY_SHIFT | KEY_MOD1,
+ KEY_F9 | KEY_SHIFT | KEY_MOD1,
+ KEY_F10 | KEY_SHIFT | KEY_MOD1,
+ KEY_F11 | KEY_SHIFT | KEY_MOD1,
+ KEY_F12 | KEY_SHIFT | KEY_MOD1,
+
+ KEY_DOWN | KEY_SHIFT | KEY_MOD1,
+ KEY_UP | KEY_SHIFT | KEY_MOD1,
+ KEY_LEFT | KEY_SHIFT | KEY_MOD1,
+ KEY_RIGHT | KEY_SHIFT | KEY_MOD1,
+ KEY_HOME | KEY_SHIFT | KEY_MOD1,
+ KEY_END | KEY_SHIFT | KEY_MOD1,
+ KEY_PAGEUP | KEY_SHIFT | KEY_MOD1,
+ KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD1,
+ KEY_RETURN | KEY_SHIFT | KEY_MOD1,
+ KEY_SPACE | KEY_SHIFT | KEY_MOD1,
+ KEY_BACKSPACE | KEY_SHIFT | KEY_MOD1,
+ KEY_INSERT | KEY_SHIFT | KEY_MOD1,
+ KEY_DELETE | KEY_SHIFT | KEY_MOD1,
+
+ KEY_0 | KEY_MOD2 ,
+ KEY_1 | KEY_MOD2 ,
+ KEY_2 | KEY_MOD2 ,
+ KEY_3 | KEY_MOD2 ,
+ KEY_4 | KEY_MOD2 ,
+ KEY_5 | KEY_MOD2 ,
+ KEY_6 | KEY_MOD2 ,
+ KEY_7 | KEY_MOD2 ,
+ KEY_8 | KEY_MOD2 ,
+ KEY_9 | KEY_MOD2 ,
+ KEY_A | KEY_MOD2 ,
+ KEY_B | KEY_MOD2 ,
+ KEY_C | KEY_MOD2 ,
+ KEY_D | KEY_MOD2 ,
+ KEY_E | KEY_MOD2 ,
+ KEY_F | KEY_MOD2 ,
+ KEY_G | KEY_MOD2 ,
+ KEY_H | KEY_MOD2 ,
+ KEY_I | KEY_MOD2 ,
+ KEY_J | KEY_MOD2 ,
+ KEY_K | KEY_MOD2 ,
+ KEY_L | KEY_MOD2 ,
+ KEY_M | KEY_MOD2 ,
+ KEY_N | KEY_MOD2 ,
+ KEY_O | KEY_MOD2 ,
+ KEY_P | KEY_MOD2 ,
+ KEY_Q | KEY_MOD2 ,
+ KEY_R | KEY_MOD2 ,
+ KEY_S | KEY_MOD2 ,
+ KEY_T | KEY_MOD2 ,
+ KEY_U | KEY_MOD2 ,
+ KEY_V | KEY_MOD2 ,
+ KEY_W | KEY_MOD2 ,
+ KEY_X | KEY_MOD2 ,
+ KEY_Y | KEY_MOD2 ,
+ KEY_Z | KEY_MOD2 ,
+
+ KEY_F1 | KEY_MOD2 ,
+ KEY_F2 | KEY_MOD2 ,
+ KEY_F3 | KEY_MOD2 ,
+ KEY_F4 | KEY_MOD2 ,
+ KEY_F5 | KEY_MOD2 ,
+ KEY_F6 | KEY_MOD2 ,
+ KEY_F7 | KEY_MOD2 ,
+ KEY_F8 | KEY_MOD2 ,
+ KEY_F9 | KEY_MOD2 ,
+ KEY_F10 | KEY_MOD2 ,
+ KEY_F11 | KEY_MOD2 ,
+ KEY_F12 | KEY_MOD2 ,
+
+ KEY_DOWN | KEY_MOD2 ,
+ KEY_UP | KEY_MOD2 ,
+ KEY_LEFT | KEY_MOD2 ,
+ KEY_RIGHT | KEY_MOD2 ,
+ KEY_HOME | KEY_MOD2 ,
+ KEY_END | KEY_MOD2 ,
+ KEY_PAGEUP | KEY_MOD2 ,
+ KEY_PAGEDOWN | KEY_MOD2 ,
+ KEY_RETURN | KEY_MOD2 ,
+ KEY_SPACE | KEY_MOD2 ,
+ KEY_BACKSPACE | KEY_MOD2 ,
+ KEY_INSERT | KEY_MOD2 ,
+ KEY_DELETE | KEY_MOD2 ,
+
+ KEY_0 | KEY_SHIFT | KEY_MOD2,
+ KEY_1 | KEY_SHIFT | KEY_MOD2,
+ KEY_2 | KEY_SHIFT | KEY_MOD2,
+ KEY_3 | KEY_SHIFT | KEY_MOD2,
+ KEY_4 | KEY_SHIFT | KEY_MOD2,
+ KEY_5 | KEY_SHIFT | KEY_MOD2,
+ KEY_6 | KEY_SHIFT | KEY_MOD2,
+ KEY_7 | KEY_SHIFT | KEY_MOD2,
+ KEY_8 | KEY_SHIFT | KEY_MOD2,
+ KEY_9 | KEY_SHIFT | KEY_MOD2,
+ KEY_A | KEY_SHIFT | KEY_MOD2,
+ KEY_B | KEY_SHIFT | KEY_MOD2,
+ KEY_C | KEY_SHIFT | KEY_MOD2,
+ KEY_D | KEY_SHIFT | KEY_MOD2,
+ KEY_E | KEY_SHIFT | KEY_MOD2,
+ KEY_F | KEY_SHIFT | KEY_MOD2,
+ KEY_G | KEY_SHIFT | KEY_MOD2,
+ KEY_H | KEY_SHIFT | KEY_MOD2,
+ KEY_I | KEY_SHIFT | KEY_MOD2,
+ KEY_J | KEY_SHIFT | KEY_MOD2,
+ KEY_K | KEY_SHIFT | KEY_MOD2,
+ KEY_L | KEY_SHIFT | KEY_MOD2,
+ KEY_M | KEY_SHIFT | KEY_MOD2,
+ KEY_N | KEY_SHIFT | KEY_MOD2,
+ KEY_O | KEY_SHIFT | KEY_MOD2,
+ KEY_P | KEY_SHIFT | KEY_MOD2,
+ KEY_Q | KEY_SHIFT | KEY_MOD2,
+ KEY_R | KEY_SHIFT | KEY_MOD2,
+ KEY_S | KEY_SHIFT | KEY_MOD2,
+ KEY_T | KEY_SHIFT | KEY_MOD2,
+ KEY_U | KEY_SHIFT | KEY_MOD2,
+ KEY_V | KEY_SHIFT | KEY_MOD2,
+ KEY_W | KEY_SHIFT | KEY_MOD2,
+ KEY_X | KEY_SHIFT | KEY_MOD2,
+ KEY_Y | KEY_SHIFT | KEY_MOD2,
+ KEY_Z | KEY_SHIFT | KEY_MOD2,
+
+ KEY_F1 | KEY_SHIFT | KEY_MOD2,
+ KEY_F2 | KEY_SHIFT | KEY_MOD2,
+ KEY_F3 | KEY_SHIFT | KEY_MOD2,
+ KEY_F4 | KEY_SHIFT | KEY_MOD2,
+ KEY_F5 | KEY_SHIFT | KEY_MOD2,
+ KEY_F6 | KEY_SHIFT | KEY_MOD2,
+ KEY_F7 | KEY_SHIFT | KEY_MOD2,
+ KEY_F8 | KEY_SHIFT | KEY_MOD2,
+ KEY_F9 | KEY_SHIFT | KEY_MOD2,
+ KEY_F10 | KEY_SHIFT | KEY_MOD2,
+ KEY_F11 | KEY_SHIFT | KEY_MOD2,
+ KEY_F12 | KEY_SHIFT | KEY_MOD2,
+
+ KEY_DOWN | KEY_SHIFT | KEY_MOD2,
+ KEY_UP | KEY_SHIFT | KEY_MOD2,
+ KEY_LEFT | KEY_SHIFT | KEY_MOD2,
+ KEY_RIGHT | KEY_SHIFT | KEY_MOD2,
+ KEY_HOME | KEY_SHIFT | KEY_MOD2,
+ KEY_END | KEY_SHIFT | KEY_MOD2,
+ KEY_PAGEUP | KEY_SHIFT | KEY_MOD2,
+ KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD2,
+ KEY_RETURN | KEY_SHIFT | KEY_MOD2,
+ KEY_SPACE | KEY_SHIFT | KEY_MOD2,
+ KEY_BACKSPACE | KEY_SHIFT | KEY_MOD2,
+ KEY_INSERT | KEY_SHIFT | KEY_MOD2,
+ KEY_DELETE | KEY_SHIFT | KEY_MOD2,
+
+ KEY_0 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_1 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_2 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_3 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_4 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_5 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_6 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_7 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_8 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_9 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_A | KEY_MOD1 | KEY_MOD2 ,
+ KEY_B | KEY_MOD1 | KEY_MOD2 ,
+ KEY_C | KEY_MOD1 | KEY_MOD2 ,
+ KEY_D | KEY_MOD1 | KEY_MOD2 ,
+ KEY_E | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F | KEY_MOD1 | KEY_MOD2 ,
+ KEY_G | KEY_MOD1 | KEY_MOD2 ,
+ KEY_H | KEY_MOD1 | KEY_MOD2 ,
+ KEY_I | KEY_MOD1 | KEY_MOD2 ,
+ KEY_J | KEY_MOD1 | KEY_MOD2 ,
+ KEY_K | KEY_MOD1 | KEY_MOD2 ,
+ KEY_L | KEY_MOD1 | KEY_MOD2 ,
+ KEY_M | KEY_MOD1 | KEY_MOD2 ,
+ KEY_N | KEY_MOD1 | KEY_MOD2 ,
+ KEY_O | KEY_MOD1 | KEY_MOD2 ,
+ KEY_P | KEY_MOD1 | KEY_MOD2 ,
+ KEY_Q | KEY_MOD1 | KEY_MOD2 ,
+ KEY_R | KEY_MOD1 | KEY_MOD2 ,
+ KEY_S | KEY_MOD1 | KEY_MOD2 ,
+ KEY_T | KEY_MOD1 | KEY_MOD2 ,
+ KEY_U | KEY_MOD1 | KEY_MOD2 ,
+ KEY_V | KEY_MOD1 | KEY_MOD2 ,
+ KEY_W | KEY_MOD1 | KEY_MOD2 ,
+ KEY_X | KEY_MOD1 | KEY_MOD2 ,
+ KEY_Y | KEY_MOD1 | KEY_MOD2 ,
+ KEY_Z | KEY_MOD1 | KEY_MOD2 ,
+
+ KEY_F1 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F2 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F3 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F4 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F5 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F6 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F7 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F8 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F9 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F10 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F11 | KEY_MOD1 | KEY_MOD2 ,
+ KEY_F12 | KEY_MOD1 | KEY_MOD2 ,
+
+ KEY_DOWN | KEY_MOD1 | KEY_MOD2 ,
+ KEY_UP | KEY_MOD1 | KEY_MOD2 ,
+ KEY_LEFT | KEY_MOD1 | KEY_MOD2 ,
+ KEY_RIGHT | KEY_MOD1 | KEY_MOD2 ,
+ KEY_HOME | KEY_MOD1 | KEY_MOD2 ,
+ KEY_END | KEY_MOD1 | KEY_MOD2 ,
+ KEY_PAGEUP | KEY_MOD1 | KEY_MOD2 ,
+ KEY_PAGEDOWN | KEY_MOD1 | KEY_MOD2 ,
+ KEY_RETURN | KEY_MOD1 | KEY_MOD2 ,
+ KEY_SPACE | KEY_MOD1 | KEY_MOD2 ,
+ KEY_BACKSPACE | KEY_MOD1 | KEY_MOD2 ,
+ KEY_INSERT | KEY_MOD1 | KEY_MOD2 ,
+ KEY_DELETE | KEY_MOD1 | KEY_MOD2 ,
+
+ KEY_0 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_1 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_2 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_3 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_4 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_5 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_6 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_7 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_8 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_9 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_A | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_B | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_C | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_D | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_E | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_G | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_H | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_I | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_J | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_K | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_L | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_M | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_N | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_O | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_P | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_Q | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_R | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_S | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_T | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_U | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_V | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_W | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_X | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_Y | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_Z | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+
+ KEY_F1 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F2 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F3 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F4 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F5 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F6 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F7 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F8 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F9 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F10 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F11 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_F12 | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+
+ KEY_DOWN | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_UP | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_LEFT | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_RIGHT | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_HOME | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_END | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_PAGEUP | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_RETURN | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_SPACE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_BACKSPACE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_INSERT | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+ KEY_DELETE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2
+};
+
+static USHORT KEYCODE_ARRAY_SIZE = (sizeof(KEYCODE_ARRAY) / sizeof(KEYCODE_ARRAY[0]));
+
+//-----------------------------------------------
+// seems to be needed to layout the list box, which shows all
+// assignable shortcuts
+static long AccCfgTabs[] =
+{
+ 2, // Number of Tabs
+ 0,
+ 120 // Function
+};
+
+//-----------------------------------------------
+class SfxAccCfgLBoxString_Impl : public SvLBoxString
+{
+ public:
+ SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry,
+ USHORT nFlags,
+ const String& sText );
+
+ virtual ~SfxAccCfgLBoxString_Impl();
+
+ virtual void Paint(const Point& aPos ,
+ SvLBox& rDevice,
+ USHORT nFlags ,
+ SvLBoxEntry* pEntry );
+};
+
+//-----------------------------------------------
+SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry,
+ USHORT nFlags,
+ const String& sText )
+ : SvLBoxString(pEntry, nFlags, sText)
+{
+}
+
+//-----------------------------------------------
+SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl()
+{
+}
+
+//-----------------------------------------------
+void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos ,
+ SvLBox& rDevice,
+ USHORT /*nFlags*/,
+ SvLBoxEntry* pEntry )
+{
+ /*/ ??? realy needed !!!
+ Font aOldFont(rDevice.GetFont());
+ Font aNewFont(aOldFont );
+ rDevice.SetFont( aFont );
+ */
+
+ if (!pEntry)
+ return;
+
+ TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData();
+ if (!pUserData)
+ return;
+
+ if (pUserData->m_bIsConfigurable)
+ rDevice.DrawText(aPos, GetText());
+ else
+ rDevice.DrawCtrlText(aPos, GetText(), 0, STRING_LEN, TEXT_DRAW_DISABLE);
+
+ //rDev.SetFont( aOldFont );
+}
+
+//-----------------------------------------------
+void SfxAccCfgTabListBox_Impl::InitEntry( SvLBoxEntry* pEntry ,
+ const XubString& sText ,
+ const Image& aImage1,
+ const Image& aImage2,
+ SvLBoxButtonKind eButtonKind)
+{
+ SvTabListBox::InitEntry(pEntry, sText, aImage1, aImage2, eButtonKind);
+}
+
+//-----------------------------------------------
+/** select the entry, which match the current key input ... excepting
+ keys, which are used for the dialog itself.
+ */
+void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey)
+{
+ KeyCode aCode1 = aKey.GetKeyCode();
+ USHORT nCode1 = aCode1.GetCode();
+ USHORT nMod1 = aCode1.GetModifier();
+
+ // is it related to our list box ?
+ if (
+ (nCode1 != KEY_DOWN ) &&
+ (nCode1 != KEY_UP ) &&
+ (nCode1 != KEY_LEFT ) &&
+ (nCode1 != KEY_RIGHT ) &&
+ (nCode1 != KEY_PAGEUP ) &&
+ (nCode1 != KEY_PAGEDOWN)
+ )
+ {
+ SvLBoxEntry* pEntry = First();
+ while (pEntry)
+ {
+ TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData();
+ if (pUserData)
+ {
+ USHORT nCode2 = pUserData->m_aKey.GetCode();
+ USHORT nMod2 = pUserData->m_aKey.GetModifier();
+ if (
+ (nCode1 == nCode2) &&
+ (nMod1 == nMod2 )
+ )
+ {
+ Select (pEntry);
+ MakeVisible(pEntry);
+ return;
+ }
+ }
+ pEntry = Next(pEntry);
+ }
+ }
+
+ // no - handle it as normal dialog input
+ SvTabListBox::KeyInput(aKey);
+}
+
+//-----------------------------------------------
+SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxItemSet& aSet )
+ : SfxTabPage (pParent, CUI_RES(RID_SVXPAGE_KEYBOARD), aSet)
+ , m_pMacroInfoItem ()
+ , m_pStringItem ()
+ , m_pFontItem ()
+ , m_pFileDlg (NULL)
+ , aEntriesBox (this , this, CUI_RES(BOX_ACC_ENTRIES ))
+ , aKeyboardGroup (this , CUI_RES(GRP_ACC_KEYBOARD ))
+ , aOfficeButton (this , CUI_RES(RB_OFFICE ))
+ , aModuleButton (this , CUI_RES(RB_MODULE ))
+ , aChangeButton (this , CUI_RES(BTN_ACC_CHANGE ))
+ , aRemoveButton (this , CUI_RES(BTN_ACC_REMOVE ))
+ , aGroupText (this , CUI_RES(TXT_ACC_GROUP ))
+ , pGroupLBox(new SfxConfigGroupListBox_Impl( this, CUI_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG ))
+ , aFunctionText (this , CUI_RES(TXT_ACC_FUNCTION ))
+ , pFunctionBox(new SfxConfigFunctionListBox_Impl( this, CUI_RES( BOX_ACC_FUNCTION )))
+ , aKeyText (this , CUI_RES(TXT_ACC_KEY ))
+ , aKeyBox (this , CUI_RES(BOX_ACC_KEY ))
+ , aFunctionsGroup (this , CUI_RES(GRP_ACC_FUNCTIONS ))
+ , aLoadButton (this , CUI_RES(BTN_LOAD ))
+ , aSaveButton (this , CUI_RES(BTN_SAVE ))
+ , aResetButton (this , CUI_RES(BTN_RESET ))
+ , aLoadAccelConfigStr ( CUI_RES( STR_LOADACCELCONFIG ) )
+ , aSaveAccelConfigStr ( CUI_RES( STR_SAVEACCELCONFIG ) )
+ , aFilterAllStr ( CUI_RES( STR_SFX_FILTERNAME_ALL ) )
+ , aFilterCfgStr ( CUI_RES( STR_FILTERNAME_CFG ) )
+ , m_bStylesInfoInitialized(sal_False)
+ , m_xGlobal ()
+ , m_xModule ()
+ , m_xAct ()
+{
+ FreeResource();
+
+// install handler functions
+ aChangeButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, ChangeHdl ));
+ aRemoveButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, RemoveHdl ));
+ aEntriesBox.SetSelectHdl ( LINK( this, SfxAcceleratorConfigPage, SelectHdl ));
+ pGroupLBox->SetSelectHdl ( LINK( this, SfxAcceleratorConfigPage, SelectHdl ));
+ pFunctionBox->SetSelectHdl( LINK( this, SfxAcceleratorConfigPage, SelectHdl ));
+ aKeyBox.SetSelectHdl ( LINK( this, SfxAcceleratorConfigPage, SelectHdl ));
+ aLoadButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage, Load ));
+ aSaveButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage, Save ));
+ aResetButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage, Default ));
+ aOfficeButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, RadioHdl ));
+ aModuleButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, RadioHdl ));
+
+ // initialize Entriesbox
+ aEntriesBox.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN);
+ aEntriesBox.SetSelectionMode(SINGLE_SELECTION);
+ aEntriesBox.SetTabs(&AccCfgTabs[0], MAP_APPFONT);
+ aEntriesBox.Resize(); // OS: Hack for right selection
+ aEntriesBox.SetSpaceBetweenEntries(0);
+ aEntriesBox.SetDragDropMode(0);
+
+ // detect max keyname width
+ long nMaxWidth = 0;
+ for ( USHORT i = 0; i < KEYCODE_ARRAY_SIZE; ++i )
+ {
+ long nTmp = GetTextWidth( KeyCode( KEYCODE_ARRAY[i] ).GetName() );
+ if ( nTmp > nMaxWidth )
+ nMaxWidth = nTmp;
+ }
+ // recalc second tab
+ long nNewTab = PixelToLogic( Size( nMaxWidth, 0 ), MAP_APPFONT ).Width();
+ nNewTab = nNewTab + 5; // additional space
+ aEntriesBox.SetTab( 1, nNewTab );
+
+ // initialize GroupBox
+ pGroupLBox->SetFunctionListBox(pFunctionBox);
+
+ // initialize KeyBox
+ aKeyBox.SetWindowBits(WB_CLIPCHILDREN|WB_HSCROLL|WB_SORT);
+}
+
+//-----------------------------------------------
+SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage()
+{
+ // free memory - remove all dynamic user data
+ SvLBoxEntry* pEntry = aEntriesBox.First();
+ while (pEntry)
+ {
+ TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData();
+ if (pUserData)
+ delete pUserData;
+ pEntry = aEntriesBox.Next(pEntry);
+ }
+
+ pEntry = aKeyBox.First();
+ while (pEntry)
+ {
+ TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData();
+ if (pUserData)
+ delete pUserData;
+ pEntry = aKeyBox.Next(pEntry);
+ }
+
+ aEntriesBox.Clear();
+ aKeyBox.Clear();
+
+ delete m_pFileDlg;
+ delete pGroupLBox;
+ delete pFunctionBox;
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::InitAccCfg()
+{
+ // already initialized ?
+ if (m_xSMGR.is())
+ return; // yes -> do nothing
+
+ try
+ {
+ // no - initialize this instance
+ m_xSMGR = ::utl::getProcessServiceFactory();
+
+ m_xUICmdDescription = css::uno::Reference< css::container::XNameAccess >(m_xSMGR->createInstance(SERVICE_UICMDDESCRIPTION), css::uno::UNO_QUERY_THROW);
+
+ // get the current active frame, which should be our "parent"
+ // for this session
+ m_xFrame = GetFrame();
+ if ( !m_xFrame.is() )
+ {
+ css::uno::Reference< css::frame::XFramesSupplier > xDesktop(m_xSMGR->createInstance(SERVICE_DESKTOP), css::uno::UNO_QUERY_THROW);
+ m_xFrame = xDesktop->getActiveFrame();
+ }
+
+ // identify module
+ css::uno::Reference< css::frame::XModuleManager > xModuleManager (m_xSMGR->createInstance(SERVICE_MODULEMANAGER), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::container::XNameAccess > xModuleManagerCont(xModuleManager , css::uno::UNO_QUERY_THROW);
+ m_sModuleLongName = xModuleManager->identify(m_xFrame);
+ ::comphelper::SequenceAsHashMap lModuleProps(xModuleManagerCont->getByName(m_sModuleLongName));
+ m_sModuleShortName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_SHORTNAME, ::rtl::OUString());
+ m_sModuleUIName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_UINAME , ::rtl::OUString());
+
+ // get global accelerator configuration
+ m_xGlobal = css::uno::Reference< css::ui::XAcceleratorConfiguration >(m_xSMGR->createInstance(SERVICE_GLOBALACCCFG), css::uno::UNO_QUERY_THROW);
+
+ // get module accelerator configuration
+ css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(m_xSMGR->createInstance(SERVICE_MODULEUICONFIGSUPPLIER), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName);
+ m_xModule = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUICfgManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
+ }
+ catch(const css::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const css::uno::Exception&)
+ { m_xSMGR.clear(); }
+}
+
+//-----------------------------------------------
+/** Initialize text columns with own class to enable custom painting
+ This is needed as we have to paint disabled entries by ourself. No support for that in the
+ original SvTabListBox!
+ */
+void SfxAcceleratorConfigPage::CreateCustomItems( SvLBoxEntry* pEntry,
+ const String& sCol1 ,
+ const String& sCol2 )
+{
+ SfxAccCfgLBoxString_Impl* pStringItem = new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol1);
+ pEntry->ReplaceItem(pStringItem, 1);
+
+ pStringItem = new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol2);
+ pEntry->ReplaceItem(pStringItem, 2);
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xAccMgr)
+{
+ if (!xAccMgr.is())
+ return;
+
+ if (!m_bStylesInfoInitialized)
+ {
+ css::uno::Reference< css::frame::XController > xController;
+ css::uno::Reference< css::frame::XModel > xModel;
+ if (m_xFrame.is())
+ xController = m_xFrame->getController();
+ if (xController.is())
+ xModel = xController->getModel();
+
+ m_aStylesInfo.setModel(xModel);
+ pFunctionBox->SetStylesInfo(&m_aStylesInfo);
+ pGroupLBox->SetStylesInfo(&m_aStylesInfo);
+ m_bStylesInfoInitialized = sal_True;
+ }
+
+ // Insert all editable accelerators into list box. It is possible
+ // that some accelerators are not mapped on the current system/keyboard
+ // but we don't want to lose these mappings.
+ USHORT c1 = KEYCODE_ARRAY_SIZE;
+ USHORT i1 = 0;
+ USHORT nListPos = 0;
+ for (i1=0; i1<c1; ++i1)
+ {
+ KeyCode aKey = KEYCODE_ARRAY[i1];
+ String sKey = aKey.GetName();
+ if (!sKey.Len())
+ continue;
+ TAccInfo* pEntry = new TAccInfo(i1, nListPos, aKey);
+ SvLBoxEntry* pLBEntry = aEntriesBox.InsertEntryToColumn(sKey, 0L, LIST_APPEND, 0xFFFF);
+ pLBEntry->SetUserData(pEntry);
+ }
+
+ // Assign all commands to its shortcuts - reading the accelerator config.
+ css::uno::Sequence< css::awt::KeyEvent > lKeys = xAccMgr->getAllKeyEvents();
+ sal_Int32 c2 = lKeys.getLength();
+ sal_Int32 i2 = 0;
+ USHORT nCol = aEntriesBox.TabCount()-1;
+
+ for (i2=0; i2<c2; ++i2)
+ {
+ const css::awt::KeyEvent& aAWTKey = lKeys[i2];
+ ::rtl::OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey);
+ String sLabel = GetLabel4Command(sCommand);
+ KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey);
+ USHORT nPos = MapKeyCodeToPos(aKeyCode);
+
+ if (nPos == LISTBOX_ENTRY_NOTFOUND)
+ continue;
+
+ aEntriesBox.SetEntryText(sLabel, nPos, nCol);
+
+ SvLBoxEntry* pLBEntry = aEntriesBox.GetEntry(0, nPos);
+ TAccInfo* pEntry = (TAccInfo*)pLBEntry->GetUserData();
+
+ pEntry->m_bIsConfigurable = sal_True;
+ pEntry->m_sCommand = sCommand;
+ CreateCustomItems(pLBEntry, aEntriesBox.GetEntryText(pLBEntry, 0), sLabel);
+ }
+
+ // Map the VCL hardcoded key codes and mark them as not changeable
+ ULONG c3 = Application::GetReservedKeyCodeCount();
+ ULONG i3 = 0;
+ for (i3=0; i3<c3; ++i3)
+ {
+ const KeyCode* pKeyCode = Application::GetReservedKeyCode(i3);
+ USHORT nPos = MapKeyCodeToPos(*pKeyCode);
+
+ if (nPos == LISTBOX_ENTRY_NOTFOUND)
+ continue;
+
+ // Hardcoded function mapped so no ID possible and mark entry as not changeable
+ SvLBoxEntry* pLBEntry = aEntriesBox.GetEntry(0, nPos);
+ TAccInfo* pEntry = (TAccInfo*)pLBEntry->GetUserData();
+
+ pEntry->m_bIsConfigurable = sal_False;
+ CreateCustomItems(pLBEntry, aEntriesBox.GetEntryText(pLBEntry, 0), String());
+ }
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xAccMgr)
+{
+ if (!xAccMgr.is())
+ return;
+
+ // Go through the list from the bottom to the top ...
+ // because logical accelerator must be preferred instead of
+ // physical ones!
+ SvLBoxEntry* pEntry = aEntriesBox.First();
+ while (pEntry)
+ {
+ TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData();
+ ::rtl::OUString sCommand ;
+ css::awt::KeyEvent aAWTKey ;
+
+ if (pUserData)
+ {
+ sCommand = pUserData->m_sCommand;
+ aAWTKey = ::svt::AcceleratorExecute::st_VCLKey2AWTKey(pUserData->m_aKey);
+ }
+
+ try
+ {
+ if (sCommand.getLength())
+ xAccMgr->setKeyEvent(aAWTKey, sCommand);
+ else
+ xAccMgr->removeKeyEvent(aAWTKey);
+ }
+ catch(const css::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const css::uno::Exception&)
+ {}
+
+ pEntry = aEntriesBox.Next(pEntry);
+ }
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::ResetConfig()
+{
+ aEntriesBox.Clear();
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, Load, Button*, EMPTYARG )
+{
+ // ask for filename, where we should load the new config data from
+ StartFileDialog( WB_OPEN | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr );
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, Save, Button*, EMPTYARG )
+{
+ StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr );
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK(SfxAcceleratorConfigPage, Default, PushButton*, EMPTYARG)
+{
+ css::uno::Reference< css::form::XReset > xReset(m_xAct, css::uno::UNO_QUERY);
+ if (xReset.is())
+ xReset->reset();
+
+ aEntriesBox.SetUpdateMode(FALSE);
+ ResetConfig();
+ Init(m_xAct);
+ aEntriesBox.SetUpdateMode(TRUE);
+ aEntriesBox.Invalidate();
+ aEntriesBox.Select(aEntriesBox.GetEntry(0, 0));
+
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG )
+{
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
+ String sNewCommand = pFunctionBox->GetCurCommand();
+ String sLabel = pFunctionBox->GetCurLabel();
+ if (!sLabel.Len())
+ sLabel = GetLabel4Command(sNewCommand);
+
+ pEntry->m_sCommand = sNewCommand;
+ USHORT nCol = aEntriesBox.TabCount() - 1;
+ aEntriesBox.SetEntryText(sLabel, nPos, nCol);
+
+ ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox );
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, RemoveHdl, Button *, EMPTYARG )
+{
+ // get selected entry
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
+
+ // remove function name from selected entry
+ USHORT nCol = aEntriesBox.TabCount() - 1;
+ aEntriesBox.SetEntryText( String(), nPos, nCol );
+ pEntry->m_sCommand = ::rtl::OUString();
+
+ ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox );
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
+{
+ // disable help
+ Help::ShowBalloon( this, Point(), String() );
+ if ( pListBox == &aEntriesBox )
+ {
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
+ ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand();
+
+ aRemoveButton.Enable( FALSE );
+ aChangeButton.Enable( FALSE );
+
+ if (pEntry->m_bIsConfigurable)
+ {
+ if (pEntry->isConfigured())
+ aRemoveButton.Enable( TRUE );
+ aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand );
+ }
+ }
+ else if ( pListBox == pGroupLBox )
+ {
+ pGroupLBox->GroupSelected();
+ if ( !pFunctionBox->FirstSelected() )
+ aChangeButton.Enable( FALSE );
+ }
+ else if ( pListBox == pFunctionBox )
+ {
+ aRemoveButton.Enable( FALSE );
+ aChangeButton.Enable( FALSE );
+
+ // #i36994 First selected can return zero!
+ SvLBoxEntry* pLBEntry = aEntriesBox.FirstSelected();
+ if ( pLBEntry != 0 )
+ {
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( pLBEntry );
+ TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
+ ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand();
+
+ if (pEntry->m_bIsConfigurable)
+ {
+ if (pEntry->isConfigured())
+ aRemoveButton.Enable( TRUE );
+ aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand );
+ }
+
+ // update key box
+ aKeyBox.Clear();
+ SvLBoxEntry* pIt = aEntriesBox.First();
+ while ( pIt )
+ {
+ TAccInfo* pUserData = (TAccInfo*)pIt->GetUserData();
+ if ( pUserData && pUserData->m_sCommand == sPossibleNewCommand )
+ {
+ TAccInfo* pU1 = new TAccInfo(-1, -1, pUserData->m_aKey);
+ SvLBoxEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, TRUE, LIST_APPEND );
+ pE1->SetUserData(pU1);
+ pE1->EnableChildsOnDemand( FALSE );
+ }
+ pIt = aEntriesBox.Next(pIt);
+ }
+ }
+ }
+ else
+ {
+ // goto selected "key" entry of the key box
+ SvLBoxEntry* pE2 = 0;
+ TAccInfo* pU2 = 0;
+ USHORT nP2 = LISTBOX_ENTRY_NOTFOUND;
+ SvLBoxEntry* pE3 = 0;
+
+ pE2 = aKeyBox.FirstSelected();
+ if (pE2)
+ pU2 = (TAccInfo*)pE2->GetUserData();
+ if (pU2)
+ nP2 = MapKeyCodeToPos(pU2->m_aKey);
+ if (nP2 != LISTBOX_ENTRY_NOTFOUND)
+ pE3 = aEntriesBox.GetEntry( 0, nP2 );
+ if (pE3)
+ {
+ aEntriesBox.Select( pE3 );
+ aEntriesBox.MakeVisible( pE3 );
+ }
+ }
+
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, RadioHdl, RadioButton *, EMPTYARG )
+{
+ css::uno::Reference< css::ui::XAcceleratorConfiguration > xOld = m_xAct;
+
+ if (aOfficeButton.IsChecked())
+ m_xAct = m_xGlobal;
+ else if (aModuleButton.IsChecked())
+ m_xAct = m_xModule;
+
+ // nothing changed? => do nothing!
+ if ( m_xAct.is() && ( xOld == m_xAct ) )
+ return 0;
+
+ aEntriesBox.SetUpdateMode( FALSE );
+ ResetConfig();
+ Init(m_xAct);
+ aEntriesBox.SetUpdateMode( TRUE );
+ aEntriesBox.Invalidate();
+
+ pGroupLBox->Init(m_xSMGR, m_xFrame, m_sModuleLongName);
+
+ // pb: #133213# do not select NULL entries
+ SvLBoxEntry* pEntry = aEntriesBox.GetEntry( 0, 0 );
+ if ( pEntry )
+ aEntriesBox.Select( pEntry );
+ pEntry = pGroupLBox->GetEntry( 0, 0 );
+ if ( pEntry )
+ pGroupLBox->Select( pEntry );
+
+ ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox );
+ return 1L;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*, EMPTYARG )
+{
+ DBG_ASSERT( m_pFileDlg, "SfxInternetPage::DialogClosedHdl(): no file dialog" );
+
+ ::rtl::OUString sCfgName;
+ if ( ERRCODE_NONE == m_pFileDlg->GetError() )
+ sCfgName = m_pFileDlg->GetPath();
+
+ if ( !sCfgName.getLength() )
+ return 0;
+
+ GetTabDialog()->EnterWait();
+
+ css::uno::Reference< css::frame::XModel > xDoc ;
+ css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr ;
+ css::uno::Reference< css::embed::XStorage > xRootStorage; // we must hold the root storage alive, if xCfgMgr is used!
+
+ try
+ {
+ // first check if URL points to a document already loaded
+ xDoc = SearchForAlreadyLoadedDoc(sCfgName);
+ if (xDoc.is())
+ {
+ // Get ui config manager. There should always be one at the model.
+ css::uno::Reference< css::ui::XUIConfigurationManagerSupplier > xCfgSupplier(xDoc, css::uno::UNO_QUERY_THROW);
+ xCfgMgr = xCfgSupplier->getUIConfigurationManager();
+ }
+ else
+ {
+ // URL doesn't point to a loaded document, try to access it as a single storage
+ // dont forget to release the storage afterwards!
+ css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory(m_xSMGR->createInstance(SERVICE_STORAGEFACTORY), css::uno::UNO_QUERY_THROW);
+ css::uno::Sequence< css::uno::Any > lArgs(2);
+ lArgs[0] <<= sCfgName;
+ lArgs[1] <<= css::embed::ElementModes::READ;
+
+ xRootStorage = css::uno::Reference< css::embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::embed::XStorage > xUIConfig = xRootStorage->openStorageElement(FOLDERNAME_UICONFIG, css::embed::ElementModes::READ);
+ if (xUIConfig.is())
+ {
+ xCfgMgr = css::uno::Reference< css::ui::XUIConfigurationManager >(m_xSMGR->createInstance(SERVICE_UICONFIGMGR), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::ui::XUIConfigurationStorage > xCfgMgrStore(xCfgMgr, css::uno::UNO_QUERY_THROW);
+ xCfgMgrStore->setStorage(xUIConfig);
+ }
+ }
+
+ if (xCfgMgr.is())
+ {
+ // open the configuration and update our UI
+ css::uno::Reference< css::ui::XAcceleratorConfiguration > xTempAccMgr(xCfgMgr->getShortCutManager(), css::uno::UNO_QUERY_THROW);
+
+ aEntriesBox.SetUpdateMode(FALSE);
+ ResetConfig();
+ Init(xTempAccMgr);
+ aEntriesBox.SetUpdateMode(TRUE);
+ aEntriesBox.Invalidate();
+ aEntriesBox.Select(aEntriesBox.GetEntry(0, 0));
+
+ }
+
+ // dont forget to close the new opened storage!
+ // We are the owner of it.
+ if (xRootStorage.is())
+ {
+ css::uno::Reference< css::lang::XComponent > xComponent;
+ xComponent = css::uno::Reference< css::lang::XComponent >(xCfgMgr, css::uno::UNO_QUERY);
+ if (xComponent.is())
+ xComponent->dispose();
+ xComponent = css::uno::Reference< css::lang::XComponent >(xRootStorage, css::uno::UNO_QUERY);
+ if (xComponent.is())
+ xComponent->dispose();
+ }
+ }
+ catch(const css::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const css::uno::Exception&)
+ {}
+
+ GetTabDialog()->LeaveWait();
+
+ return 0;
+}
+
+//-----------------------------------------------
+IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG )
+{
+ DBG_ASSERT( m_pFileDlg, "SfxInternetPage::DialogClosedHdl(): no file dialog" );
+
+ ::rtl::OUString sCfgName;
+ if ( ERRCODE_NONE == m_pFileDlg->GetError() )
+ sCfgName = m_pFileDlg->GetPath();
+
+ if ( !sCfgName.getLength() )
+ return 0;
+
+ GetTabDialog()->EnterWait();
+
+ css::uno::Reference< css::frame::XModel > xDoc ;
+ css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr ;
+ css::uno::Reference< css::embed::XStorage > xRootStorage;
+
+ try
+ {
+ // first check if URL points to a document already loaded
+ xDoc = SearchForAlreadyLoadedDoc(sCfgName);
+ if (xDoc.is())
+ {
+ // get config manager, force creation if there was none before
+ css::uno::Reference< css::ui::XUIConfigurationManagerSupplier > xCfgSupplier(xDoc, css::uno::UNO_QUERY_THROW);
+ xCfgMgr = xCfgSupplier->getUIConfigurationManager();
+ }
+ else
+ {
+ // URL doesn't point to a loaded document, try to access it as a single storage
+ css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory(m_xSMGR->createInstance(SERVICE_STORAGEFACTORY), css::uno::UNO_QUERY_THROW);
+ css::uno::Sequence< css::uno::Any > lArgs(2);
+ lArgs[0] <<= sCfgName;
+ lArgs[1] <<= css::embed::ElementModes::WRITE;
+
+ xRootStorage = css::uno::Reference< css::embed::XStorage >(
+ xStorageFactory->createInstanceWithArguments(lArgs),
+ css::uno::UNO_QUERY_THROW);
+
+ css::uno::Reference< css::embed::XStorage > xUIConfig(
+ xRootStorage->openStorageElement(FOLDERNAME_UICONFIG, css::embed::ElementModes::WRITE),
+ css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::beans::XPropertySet > xUIConfigProps(
+ xUIConfig,
+ css::uno::UNO_QUERY_THROW);
+
+ // set the correct media type if the storage was new created
+ ::rtl::OUString sMediaType;
+ xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType;
+ if (!sMediaType.getLength())
+ xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG));
+
+ xCfgMgr = css::uno::Reference< css::ui::XUIConfigurationManager >(m_xSMGR->createInstance(SERVICE_UICONFIGMGR), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::ui::XUIConfigurationStorage > xUICfgStore(xCfgMgr, css::uno::UNO_QUERY_THROW);
+ xUICfgStore->setStorage(xUIConfig);
+ }
+
+ if (xCfgMgr.is())
+ {
+ // get the target configuration access and update with all shortcuts
+ // which are set currently at the UI !
+ // Dont copy the m_xAct content to it ... because m_xAct will be updated
+ // from the UI on pressing the button "OK" only. And inbetween it's not up to date !
+ css::uno::Reference< css::ui::XAcceleratorConfiguration > xTargetAccMgr(xCfgMgr->getShortCutManager(), css::uno::UNO_QUERY_THROW);
+ Apply(xTargetAccMgr);
+
+ // commit (order is important!)
+ css::uno::Reference< css::ui::XUIConfigurationPersistence > xCommit1(xTargetAccMgr, css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::ui::XUIConfigurationPersistence > xCommit2(xCfgMgr , css::uno::UNO_QUERY_THROW);
+ xCommit1->store();
+ xCommit2->store();
+
+ if (xRootStorage.is())
+ {
+ // Commit root storage
+ css::uno::Reference< css::embed::XTransactedObject > xCommit3(xRootStorage, css::uno::UNO_QUERY_THROW);
+ xCommit3->commit();
+ }
+ }
+
+ if (xRootStorage.is())
+ {
+ css::uno::Reference< css::lang::XComponent > xComponent;
+ xComponent = css::uno::Reference< css::lang::XComponent >(xCfgMgr, css::uno::UNO_QUERY);
+ if (xComponent.is())
+ xComponent->dispose();
+ xComponent = css::uno::Reference< css::lang::XComponent >(xRootStorage, css::uno::UNO_QUERY);
+ if (xComponent.is())
+ xComponent->dispose();
+ }
+ }
+ catch(const css::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const css::uno::Exception&)
+ {}
+
+ GetTabDialog()->LeaveWait();
+
+ return 0;
+}
+
+::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL )
+{
+ ::rtl::OUString aLabel;
+ if ( aCmdURL.getLength() )
+ {
+ try
+ {
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ if ( xNameAccess.is() )
+ {
+ uno::Reference< container::XNameAccess > xUICommandLabels;
+ const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) );
+ uno::Any a = xNameAccess->getByName( aModule );
+ uno::Reference< container::XNameAccess > xUICommands;
+ a >>= xUICommandLabels;
+ rtl::OUString aStr;
+ uno::Sequence< beans::PropertyValue > aPropSeq;
+ a = xUICommandLabels->getByName( aCmdURL );
+ if ( a >>= aPropSeq )
+ {
+ for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if ( aPropSeq[i].Name.equalsAscii( "Name" ))
+ {
+ aPropSeq[i].Value >>= aStr;
+ break;
+ }
+ }
+ }
+ aLabel = aStr;
+ }
+ }
+ catch ( uno::Exception& )
+ {
+ }
+ }
+
+ return aLabel;
+}
+
+
+//-----------------------------------------------
+String SfxAcceleratorConfigPage::GetFunctionName(KeyFuncType eType) const
+{
+ ::rtl::OUStringBuffer sName(256);
+ sName.appendAscii("\"");
+ switch(eType)
+ {
+ case KEYFUNC_NEW :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:NewDoc") ) );
+ break;
+
+ case KEYFUNC_OPEN :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Open") ) );
+ break;
+
+ case KEYFUNC_SAVE :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Save") ) );
+ break;
+
+ case KEYFUNC_SAVEAS :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SaveAs") ) );
+ break;
+
+ case KEYFUNC_PRINT :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Print") ) );
+ break;
+
+ case KEYFUNC_CLOSE :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Close") ) );
+ break;
+
+ case KEYFUNC_QUIT :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Quit") ) );
+ break;
+
+ case KEYFUNC_CUT :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Cut") ) );
+ break;
+
+ case KEYFUNC_COPY :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Copy") ) );
+ break;
+
+ case KEYFUNC_PASTE :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Paste") ) );
+ break;
+
+ case KEYFUNC_UNDO :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Undo") ) );
+ break;
+
+ case KEYFUNC_REDO :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Redo") ) );
+ break;
+
+ case KEYFUNC_DELETE :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Delete") ) );
+ break;
+
+ case KEYFUNC_REPEAT :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Repeat") ) );
+ break;
+
+ case KEYFUNC_FIND :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Search") ) );
+ break;
+
+ case KEYFUNC_FINDBACKWARD :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SearchBackwards") ) );
+ break;
+
+ case KEYFUNC_PROPERTIES :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Options") ) );
+ break;
+
+ case KEYFUNC_FRONT :
+ sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:ToFront") ) );
+ break;
+
+ default:
+ break;
+ }
+ sName.appendAscii("\"");
+ return String(sName.makeStringAndClear());
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTitle )
+{
+ bool bSave = ( ( nBits & WB_SAVEAS ) == WB_SAVEAS );
+ short nDialogType = bSave ? css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE
+ : css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
+ if ( m_pFileDlg )
+ delete m_pFileDlg;
+ m_pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0 );
+
+ m_pFileDlg->SetTitle( rTitle );
+// m_pFileDlg->SetDialogHelpId( bSave ? HID_CONFIG_SAVE : HID_CONFIG_LOAD );
+ m_pFileDlg->AddFilter( aFilterAllStr, DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) );
+ m_pFileDlg->AddFilter( aFilterCfgStr, DEFINE_CONST_UNICODE( "*.cfg" ) );
+
+ Link aDlgClosedLink = bSave ? LINK( this, SfxAcceleratorConfigPage, SaveHdl )
+ : LINK( this, SfxAcceleratorConfigPage, LoadHdl );
+ m_pFileDlg->StartExecuteModal( aDlgClosedLink );
+}
+
+//-----------------------------------------------
+BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& )
+{
+ Apply(m_xAct);
+ try
+ {
+ m_xAct->store();
+ }
+ catch(const css::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const css::uno::Exception&)
+ { return FALSE; }
+
+ return TRUE;
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet )
+{
+ // open accelerator configs
+ // Note: It initialize some other members too, which are needed here ...
+ // e.g. m_sModuleUIName!
+ InitAccCfg();
+
+ // change te description of the radio button, which switch to the module
+ // dependend accelerator configuration
+ String sButtonText = aModuleButton.GetText();
+ sButtonText.SearchAndReplace(String::CreateFromAscii("$(MODULE)"), m_sModuleUIName);
+ aModuleButton.SetText(sButtonText);
+
+ if (m_xModule.is())
+ aModuleButton.Check();
+ else
+ {
+ aModuleButton.Hide();
+ aOfficeButton.Check();
+ }
+
+ RadioHdl(0);
+
+ const SfxPoolItem* pMacroItem=0;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_MACROINFO, TRUE, &pMacroItem ) )
+ {
+ m_pMacroInfoItem = PTR_CAST( SfxMacroInfoItem, pMacroItem );
+ pGroupLBox->SelectMacro( m_pMacroInfoItem );
+ }
+ else
+ {
+ const SfxPoolItem* pStringItem=0;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_CHARMAP, TRUE, &pStringItem ) )
+ m_pStringItem = PTR_CAST( SfxStringItem, pStringItem );
+
+ const SfxPoolItem* pFontItem=0;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, TRUE, &pFontItem ) )
+ m_pFontItem = PTR_CAST( SfxStringItem, pFontItem );
+
+ if ( m_pStringItem )
+ pGroupLBox->AddAndSelect( m_pStringItem, m_pFontItem );
+ }
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::SelectMacro(const SfxMacroInfoItem *pItem)
+{
+ m_pMacroInfoItem = pItem;
+ pGroupLBox->SelectMacro( pItem );
+}
+
+//-----------------------------------------------
+void SfxAcceleratorConfigPage::CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr,
+ const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr)
+{
+ const css::uno::Sequence< css::awt::KeyEvent > lKeys = xSourceAccMgr->getAllKeyEvents();
+ sal_Int32 c = lKeys.getLength();
+ sal_Int32 i = 0;
+ for (i=0; i<c; ++i)
+ {
+ const css::awt::KeyEvent& rKey = lKeys[i];
+ ::rtl::OUString sCommand = xSourceAccMgr->getCommandByKeyEvent(rKey);
+ xTargetAccMgr->setKeyEvent(rKey, sCommand);
+ }
+}
+
+//-----------------------------------------------
+KeyCode SfxAcceleratorConfigPage::MapPosToKeyCode(USHORT nPos) const
+{
+ TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
+ KeyCode aCode(KEYCODE_ARRAY[pEntry->m_nKeyPos] & 0xFFF ,
+ KEYCODE_ARRAY[pEntry->m_nKeyPos] & (KEY_SHIFT | KEY_MOD2));
+ return aCode;
+}
+
+//-----------------------------------------------
+USHORT SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const
+{
+ USHORT nCode1 = aKey.GetCode()+aKey.GetModifier();
+ SvLBoxEntry* pEntry = aEntriesBox.First();
+ USHORT i = 0;
+
+ while (pEntry)
+ {
+ TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData();
+ if (pUserData)
+ {
+ USHORT nCode2 = pUserData->m_aKey.GetCode()+pUserData->m_aKey.GetModifier();
+ if (nCode1 == nCode2)
+ return i;
+ }
+ pEntry = aEntriesBox.Next(pEntry);
+ ++i;
+ }
+
+ return LISTBOX_ENTRY_NOTFOUND;
+}
+
+//-----------------------------------------------
+String SfxAcceleratorConfigPage::GetLabel4Command(const String& sCommand)
+{
+ try
+ {
+ // check global command configuration first
+ css::uno::Reference< css::container::XNameAccess > xModuleConf;
+ m_xUICmdDescription->getByName(m_sModuleLongName) >>= xModuleConf;
+ if (xModuleConf.is())
+ {
+ ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand));
+ String sLabel = String(lProps.getUnpackedValueOrDefault(CMDPROP_UINAME, ::rtl::OUString()));
+ if (sLabel.Len())
+ return sLabel;
+ }
+ }
+ catch(const css::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const css::uno::Exception&)
+ {}
+
+ // may be it's a style URL .. they must be handled special
+ SfxStyleInfo_Impl aStyle;
+ aStyle.sCommand = sCommand;
+ if (m_aStylesInfo.parseStyleCommand(aStyle))
+ {
+ m_aStylesInfo.getLabel4Style(aStyle);
+ return aStyle.sLabel;
+ }
+ else
+ {
+ String aRet( String::CreateFromAscii("Symbols: ") );
+ xub_StrLen nPos = sCommand.SearchAscii(".uno:InsertSymbol?Symbols:string=");
+ if ( nPos == 0 )
+ {
+ aRet += String( sCommand, 34, sCommand.Len()-34 );
+ return aRet;
+ }
+ }
+
+ return sCommand;
+}
+
+SfxTabPage* SfxAcceleratorConfigPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
+{
+ return new SfxAcceleratorConfigPage( pParent, rAttrSet );
+}
+
+//-----------------------------------------------
+css::uno::Reference< css: